@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
|
@@ -0,0 +1,279 @@
|
|
|
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 g4e=Object.freeze({tools:!1,codemode:!1,codemodeOnly:!1,globalTools:!1,goalMode:!1,localDecision:!1,autoCompaction:!1});function Qg(e){let t=e.trim();return t==="/"||["/settings","/codemode","/tools","/goal-mode"].some(r=>t.length>1&&r.startsWith(t))}var dZ=Object.create,Gw=Object.defineProperty,fZ=Object.getOwnPropertyDescriptor,pZ=Object.getOwnPropertyNames,mZ=Object.getPrototypeOf,hZ=Object.prototype.hasOwnProperty,gZ=(e,t,r)=>t in e?Gw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jt=(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)Gw(e,r,{get:t[r],enumerable:!0})},vZ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of pZ(t))!hZ.call(e,a)&&a!==r&&Gw(e,a,{get:()=>t[a],enumerable:!(n=fZ(t,a))||n.enumerable});return e},B=(e,t,r)=>(r=e!=null?dZ(mZ(e)):{},vZ(t||!e||!e.__esModule?Gw(r,"default",{value:e,enumerable:!0}):r,e)),oe=(e,t,r)=>gZ(e,typeof t!="symbol"?t+"":t,r);var Us=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 Us{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}},Kn=new bZ;function Kw(e){return/^wlt_[a-zA-Z0-9_-]{43}$/.test(e)}function F8(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 D8="data:image/svg+xml,"+encodeURIComponent(F_());var yZ=Jt(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"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),y=Symbol.iterator;function x(T){return T===null||typeof T!="object"?null:(T=y&&T[y]||T["@@iterator"],typeof T=="function"?T:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,F={};function C(T,U,X){this.props=T,this.context=U,this.refs=F,this.updater=X||w}C.prototype.isReactComponent={},C.prototype.setState=function(T,U){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,U,"setState")},C.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function D(){}D.prototype=C.prototype;function S(T,U,X){this.props=T,this.context=U,this.refs=F,this.updater=X||w}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},N=Object.prototype.hasOwnProperty;function P(T,U,X){var Y=X.ref;return{$$typeof:t,type:T,key:U,ref:Y!==void 0?Y:null,props:X}}function O(T,U){return P(T.type,U,T.props)}function V(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function H(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(X){return U[X]})}var q=/\/+/g;function L(T,U){return typeof T=="object"&&T!==null&&T.key!=null?H(""+T.key):U.toString(36)}function R(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(U){T.status==="pending"&&(T.status="fulfilled",T.value=U)},function(U){T.status==="pending"&&(T.status="rejected",T.reason=U)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function W(T,U,X,Y,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),U,X,Y,re)}}if(se)return re=re(T),se=Y===""?"."+L(T,0):Y,I(re)?(X="",se!=null&&(X=se.replace(q,"$&/")+"/"),W(re,U,X,"",function(he){return he})):re!=null&&(V(re)&&(re=O(re,X+(re.key==null||T&&T.key===re.key?"":(""+re.key).replace(q,"$&/")+"/")+se)),U.push(re)),1;se=0;var me=Y===""?".":Y+":";if(I(T))for(var le=0;le<T.length;le++)Y=T[le],J=me+L(Y,le),se+=W(Y,U,X,J,re);else if(le=x(T),typeof le=="function")for(T=le.call(T),le=0;!(Y=T.next()).done;)Y=Y.value,J=me+L(Y,le++),se+=W(Y,U,X,J,re);else if(J==="object"){if(typeof T.then=="function")return W(R(T),U,X,Y,re);throw U=String(T),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return se}function z(T,U,X){if(T==null)return T;var Y=[],re=0;return W(T,Y,"","",function(J){return U.call(X,J,re++)}),Y}function Q(T){if(T._status===-1){var U=T._result;U=U(),U.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=U)}if(T._status===1)return T._result.default;throw T._result}var K=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=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(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},Z={map:z,forEach:function(T,U,X){z(T,function(){U.apply(this,arguments)},X)},count:function(T){var U=0;return z(T,function(){U++}),U},toArray:function(T){return z(T,function(U){return U})||[]},only:function(T){if(!V(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=f,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,U,X){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Y=k({},T.props),re=T.key;if(U!=null)for(J in U.key!==void 0&&(re=""+U.key),U)!N.call(U,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&U.ref===void 0||(Y[J]=U[J]);var J=arguments.length-2;if(J===1)Y.children=X;else if(1<J){for(var se=Array(J),me=0;me<J;me++)se[me]=arguments[me+2];Y.children=se}return P(T.type,re,Y)},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,U,X){var Y,re={},J=null;if(U!=null)for(Y in U.key!==void 0&&(J=""+U.key),U)N.call(U,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(re[Y]=U[Y]);var se=arguments.length-2;if(se===1)re.children=X;else if(1<se){for(var me=Array(se),le=0;le<se;le++)me[le]=arguments[le+2];re.children=me}if(T&&T.defaultProps)for(Y in se=T.defaultProps,se)re[Y]===void 0&&(re[Y]=se[Y]);return P(T,J,re)},e.createRef=function(){return{current:null}},e.forwardRef=function(T){return{$$typeof:d,render:T}},e.isValidElement=V,e.lazy=function(T){return{$$typeof:g,_payload:{_status:-1,_result:T},_init:Q}},e.memo=function(T,U){return{$$typeof:h,type:T,compare:U===void 0?null:U}},e.startTransition=function(T){var U=$.T,X={};$.T=X;try{var Y=T(),re=$.S;re!==null&&re(X,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(j,K)}catch(J){K(J)}finally{U!==null&&X.types!==null&&(U.types=X.types),$.T=U}},e.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},e.use=function(T){return $.H.use(T)},e.useActionState=function(T,U,X){return $.H.useActionState(T,U,X)},e.useCallback=function(T,U){return $.H.useCallback(T,U)},e.useContext=function(T){return $.H.useContext(T)},e.useDebugValue=function(){},e.useDeferredValue=function(T,U){return $.H.useDeferredValue(T,U)},e.useEffect=function(T,U){return $.H.useEffect(T,U)},e.useEffectEvent=function(T){return $.H.useEffectEvent(T)},e.useId=function(){return $.H.useId()},e.useImperativeHandle=function(T,U,X){return $.H.useImperativeHandle(T,U,X)},e.useInsertionEffect=function(T,U){return $.H.useInsertionEffect(T,U)},e.useLayoutEffect=function(T,U){return $.H.useLayoutEffect(T,U)},e.useMemo=function(T,U){return $.H.useMemo(T,U)},e.useOptimistic=function(T,U){return $.H.useOptimistic(T,U)},e.useReducer=function(T,U,X){return $.H.useReducer(T,U,X)},e.useRef=function(T){return $.H.useRef(T)},e.useState=function(T){return $.H.useState(T)},e.useSyncExternalStore=function(T,U,X){return $.H.useSyncExternalStore(T,U,X)},e.useTransition=function(){return $.H.useTransition()},e.version="19.2.7"}),_=Jt((e,t)=>{"use strict";t.exports=yZ()});var Am=B(_(),1),D_=(0,Am.createContext)(null);function wZ(e){return{subscribe:t=>e.subscribe(t),getSnapshot:()=>e.getSnapshot()}}function A8({store:e,children:t}){return(0,Am.createElement)(D_.Provider,{value:e},t)}function A_(){let e=(0,Am.useContext)(D_);if(!e)throw new Error("useUiStore must be used inside UiStoreProvider");return e}function ai(){let e=A_(),t=(0,Am.useMemo)(()=>wZ(e),[e]);return(0,Am.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function Fi(){let e=A_();return(0,Am.useCallback)(t=>e.dispatch(t),[e])}function ct(...e){return e.filter(Boolean).join(" ")}var xZ=Jt(e=>{"use strict";var t=_();function r(f){var h="https://react.dev/errors/"+f;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 #"+f+"; 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(f,h,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:f,containerInfo:h,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="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(f,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(f,h,null,g)},e.flushSync=function(f){var h=c.T,g=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=h,a.p=g,a.d.f()}},e.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},e.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},e.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var g=h.as,v=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:x}):g==="script"&&a.d.X(f,{crossOrigin:v,integrity:y,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},e.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(f,{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(f)},e.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,v=d(g,h.crossOrigin);a.d.L(f,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(f,h){if(typeof f=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(f,{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(f)},e.requestFormReset=function(f){a.d.r(f)},e.unstable_batchedUpdates=function(f,h){return f(h)},e.useFormState=function(f,h,g){return c.H.useFormState(f,h,g)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.7"}),tr=Jt((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=Jt(e=>{"use strict";function t(R,W){var z=R.length;R.push(W);e:for(;0<z;){var Q=z-1>>>1,K=R[Q];if(0<a(K,W))R[Q]=W,R[z]=K,z=Q;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var W=R[0],z=R.pop();if(z!==W){R[0]=z;e:for(var Q=0,K=R.length,Z=K>>>1;Q<Z;){var T=2*(Q+1)-1,U=R[T],X=T+1,Y=R[X];if(0>a(U,z))X<K&&0>a(Y,U)?(R[Q]=Y,R[X]=z,Q=X):(R[Q]=U,R[T]=z,Q=T);else if(X<K&&0>a(Y,z))R[Q]=Y,R[X]=z,Q=X;else break e}}return W}function a(R,W){var z=R.sortIndex-W.sortIndex;return z!==0?z:R.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=[],f=[],h=1,g=null,v=3,y=!1,x=!1,w=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function S(R){for(var W=r(f);W!==null;){if(W.callback===null)n(f);else if(W.startTime<=R)n(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=r(f)}}function A(R){if(w=!1,S(R),!x)if(r(d)!==null)x=!0,I||(I=!0,V());else{var W=r(f);W!==null&&L(A,W.startTime-R)}}var I=!1,j=-1,$=5,N=-1;function P(){return k?!0:!(e.unstable_now()-N<$)}function O(){if(k=!1,I){var R=e.unstable_now();N=R;var W=!0;try{e:{x=!1,w&&(w=!1,C(j),j=-1),y=!0;var z=v;try{t:{for(S(R),g=r(d);g!==null&&!(g.expirationTime>R&&P());){var Q=g.callback;if(typeof Q=="function"){g.callback=null,v=g.priorityLevel;var K=Q(g.expirationTime<=R);if(R=e.unstable_now(),typeof K=="function"){g.callback=K,S(R),W=!0;break t}g===r(d)&&n(d),S(R)}else n(d);g=r(d)}if(g!==null)W=!0;else{var Z=r(f);Z!==null&&L(A,Z.startTime-R),W=!1}}break e}finally{g=null,v=z,y=!1}W=void 0}}finally{W?V():I=!1}}}var V;typeof D=="function"?V=function(){D(O)}:typeof MessageChannel<"u"?(H=new MessageChannel,q=H.port2,H.port1.onmessage=O,V=function(){q.postMessage(null)}):V=function(){F(O,0)};var H,q;function L(R,W){j=F(function(){R(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(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(R){switch(v){case 1:case 2:case 3:var W=3;break;default:W=v}var z=v;v=W;try{return R()}finally{v=z}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(R,W){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var z=v;v=R;try{return W()}finally{v=z}},e.unstable_scheduleCallback=function(R,W,z){var Q=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Q+z:Q):z=Q,R){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=z+K,R={id:h++,callback:W,priorityLevel:R,startTime:z,expirationTime:K,sortIndex:-1},z>Q?(R.sortIndex=z,t(f,R),r(d)===null&&R===r(f)&&(w?(C(j),j=-1):w=!0,L(A,z-Q))):(R.sortIndex=K,t(d,R),x||y||(x=!0,I||(I=!0,V()))),R},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(R){var W=v;return function(){var z=v;v=W;try{return R.apply(this,arguments)}finally{v=z}}}}),kZ=Jt((e,t)=>{"use strict";t.exports=EZ()}),CZ=Jt(e=>{"use strict";var t=kZ(),r=_(),n=tr();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 f(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,p=s;;){var b=u.return;if(b===null)break;var E=b.alternate;if(E===null){if(p=b.return,p!==null){u=p;continue}break}if(b.child===E.child){for(E=b.child;E;){if(E===u)return f(b),i;if(E===p)return f(b),s;E=E.sibling}throw Error(a(188))}if(u.return!==p.return)u=b,p=E;else{for(var M=!1,G=b.child;G;){if(G===u){M=!0,u=b,p=E;break}if(G===p){M=!0,p=b,u=E;break}G=G.sibling}if(!M){for(G=E.child;G;){if(G===u){M=!0,u=E,p=b;break}if(G===p){M=!0,p=E,u=b;break}G=G.sibling}if(!M)throw Error(a(189))}}if(u.alternate!==p)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"),x=Symbol.for("react.transitional.element"),w=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"),N=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function H(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||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 P:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case w: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 N:s=i._payload,i=i._init;try{return L(i(s))}catch{}}return null}var R=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,Q={pending:!1,data:null,method:null,action:null},K=[],Z=-1;function T(i){return{current:i}}function U(i){0>Z||(i.current=K[Z],K[Z]=null,Z--)}function X(i,s){Z++,K[Z]=i.current,i.current=s}var Y=T(null),re=T(null),J=T(null),se=T(null);function me(i,s){switch(X(J,s),X(re,i),X(Y,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=Qj(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}U(Y),X(Y,i)}function le(){U(Y),U(re),U(J)}function he(i){i.memoizedState!==null&&X(se,i);var s=Y.current,u=Qj(s,i.type);s!==u&&(X(re,i),X(Y,u))}function ae(i){re.current===i&&(U(Y),U(re)),se.current===i&&(U(se),Ug._currentValue=Q)}var ce,ye;function Te(i){if(ce===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||"",ye=-1<u.stack.indexOf(`
|
|
4
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
5
|
+
`+ce+i+ye}var De=!1;function ke(i,s){if(!i||De)return"";De=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={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 pe=ge}Reflect.construct(i,[],xe)}else{try{xe.call()}catch(ge){pe=ge}i.call(xe.prototype)}}else{try{throw Error()}catch(ge){pe=ge}(xe=i())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ge){if(ge&&pe&&typeof ge.stack=="string")return[ge.stack,pe.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=p.DetermineComponentFrameRoot(),M=E[0],G=E[1];if(M&&G){var ee=M.split(`
|
|
6
|
+
`),fe=G.split(`
|
|
7
|
+
`);for(b=p=0;p<ee.length&&!ee[p].includes("DetermineComponentFrameRoot");)p++;for(;b<fe.length&&!fe[b].includes("DetermineComponentFrameRoot");)b++;if(p===ee.length||b===fe.length)for(p=ee.length-1,b=fe.length-1;1<=p&&0<=b&&ee[p]!==fe[b];)b--;for(;1<=p&&0<=b;p--,b--)if(ee[p]!==fe[b]){if(p!==1||b!==1)do if(p--,b--,0>b||ee[p]!==fe[b]){var be=`
|
|
8
|
+
`+ee[p].replace(" at new "," at ");return i.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",i.displayName)),be}while(1<=p&&0<=b);break}}}finally{De=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Te(u):""}function Ce(i,s){switch(i.tag){case 26:case 27:case 5:return Te(i.type);case 16:return Te("Lazy");case 13:return i.child!==s&&s!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return ke(i.type,!1);case 11:return ke(i.type.render,!1);case 1:return ke(i.type,!0);case 31:return Te("Activity");default:return""}}function Le(i){try{var s="",u=null;do s+=Ce(i,u),u=i,i=i.return;while(i);return s}catch(p){return`
|
|
9
|
+
Error generating stack: `+p.message+`
|
|
10
|
+
`+p.stack}}var $e=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ve=t.unstable_shouldYield,qe=t.unstable_requestPaint,Ie=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,gt=t.unstable_UserBlockingPriority,et=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,Fe=t.unstable_IdlePriority,_e=t.log,dt=t.unstable_setDisableYieldValue,at=null,Ge=null;function je(i){if(typeof _e=="function"&&dt(i),Ge&&typeof Ge.setStrictMode=="function")try{Ge.setStrictMode(at,i)}catch{}}var rt=Math.clz32?Math.clz32:Gr,Bt=Math.log,It=Math.LN2;function Gr(i){return i>>>=0,i===0?32:31-(Bt(i)/It|0)|0}var Ht=256,$r=262144,Kt=4194304;function Ft(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 ar(i,s,u){var p=i.pendingLanes;if(p===0)return 0;var b=0,E=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~E,p!==0?b=Ft(p):(M&=G,M!==0?b=Ft(M):u||(u=G&~i,u!==0&&(b=Ft(u))))):(G=p&~E,G!==0?b=Ft(G):M!==0?b=Ft(M):u||(u=p&~i,u!==0&&(b=Ft(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 Cr(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Ot(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 Re(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ye(i,s,u,p,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 G=i.entanglements,ee=i.expirationTimes,fe=i.hiddenUpdates;for(u=M&~u;0<u;){var be=31-rt(u),xe=1<<be;G[be]=0,ee[be]=-1;var pe=fe[be];if(pe!==null)for(fe[be]=null,be=0;be<pe.length;be++){var ge=pe[be];ge!==null&&(ge.lane&=-536870913)}u&=~xe}p!==0&&it(i,p,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 p=31-rt(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function ze(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var p=31-rt(u),b=1<<p;b&s|i[p]&s&&(i[p]|=s),u&=~b}}function Ze(i,s){var u=s&-s;return u=(u&42)!==0?1:ft(u),(u&(i.suspendedLanes|s))!==0?0:u}function ft(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 qt(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Wt(){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),Xt="__reactFiber$"+Tr,zr="__reactProps$"+Tr,pt="__reactContainer$"+Tr,Mt="__reactEvents$"+Tr,dr="__reactListeners$"+Tr,Cn="__reactHandles$"+Tr,_a="__reactResources$"+Tr,lr="__reactMarker$"+Tr;function ri(i){delete i[Xt],delete i[zr],delete i[Mt],delete i[dr],delete i[Cn]}function Na(i){var s=i[Xt];if(s)return s;for(var u=i.parentNode;u;){if(s=u[pt]||u[Xt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=n_(i);i!==null;){if(u=i[Xt])return u;i=n_(i)}return s}i=u,u=i.parentNode}return null}function Sr(i){if(i=i[Xt]||i[pt]){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 ha(i){var s=i[_a];return s||(s=i[_a]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function ur(i){i[lr]=!0}var bi=new Set,Gi={};function ga(i,s){mt(i,s),mt(i+"Capture",s)}function mt(i,s){for(Gi[i]=s,i=0;i<s.length;i++)bi.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]*$"),Un={},Vn={};function Cd(i){return $e.call(Vn,i)?!0:$e.call(Un,i)?!1:Wn.test(i)?Vn[i]=!0:(Un[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 p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function zs(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 yi(i,s,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+p)}}function va(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Up(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ig(i,s,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var b=p.get,E=p.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:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function og(i){if(!i._valueTracker){var s=Up(i)?"checked":"value";i._valueTracker=ig(i,s,""+i[s])}}function We(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),p="";return i&&(p=Up(i)?i.checked?"true":"false":i.value),i=p,i!==u?(s.setValue(i),!0):!1}function Qt(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 Vp=/[\n"\\]/g;function Ki(i){return i.replace(Vp,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Gp(i,s,u,p,b,E,M,G){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=""+va(s)):i.value!==""+va(s)&&(i.value=""+va(s)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),s!=null?lg(i,M,va(s)):u!=null?lg(i,M,va(u)):p!=null&&i.removeAttribute("value"),b==null&&E!=null&&(i.defaultChecked=!!E),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+va(G):i.removeAttribute("name")}function sg(i,s,u,p,b,E,M,G){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)){og(i);return}u=u!=null?""+va(u):"",s=s!=null?""+va(s):u,G||s===i.value||(i.value=s),i.defaultValue=s}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=G?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),og(i)}function lg(i,s,u){s==="number"&&Qt(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Kp(i,s,u,p){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&&p&&(i[u].defaultSelected=!0)}else{for(u=""+va(u),s=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,p&&(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=""+va(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+va(u):""}function WI(i,s,u,p){if(s==null){if(p!=null){if(u!=null)throw Error(a(92));if(R(p)){if(1<p.length)throw Error(a(93));p=p[0]}u=p}u==null&&(u=""),s=u}u=va(s),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),og(i)}function Xp(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var oQ=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 UI(i,s,u){var p=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,u):typeof u!="number"||u===0||oQ.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function VI(i,s,u){if(s!=null&&typeof s!="object")throw Error(a(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var b in s)p=s[b],s.hasOwnProperty(b)&&u[b]!==p&&UI(i,b,p)}else for(var E in s)s.hasOwnProperty(E)&&UI(i,E,s[E])}function Ck(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 sQ=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"]]),lQ=/^[\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 Ny(i){return lQ.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Nl(){}var Sk=null;function Fk(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Qp=null,Yp=null;function GI(i){var s=Sr(i);if(s&&(i=s.stateNode)){var u=i[zr]||null;e:switch(i=s.stateNode,s.type){case"input":if(Gp(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="'+Ki(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var p=u[s];if(p!==i&&p.form===i.form){var b=p[zr]||null;if(!b)throw Error(a(90));Gp(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)p=u[s],p.form===i.form&&We(p)}break e;case"textarea":qI(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Kp(i,!!u.multiple,s,!1)}}}var Dk=!1;function KI(i,s,u){if(Dk)return i(s,u);Dk=!0;try{var p=i(s);return p}finally{if(Dk=!1,(Qp!==null||Yp!==null)&&(Cw(),Qp&&(s=Qp,i=Yp,Yp=Qp=null,GI(s),i)))for(s=0;s<i.length;s++)GI(i[s])}}function ug(i,s){var u=i.stateNode;if(u===null)return null;var p=u[zr]||null;if(p===null)return null;u=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(a(231,s,typeof u));return u}var Pl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ak=!1;if(Pl)try{Zp={},Object.defineProperty(Zp,"passive",{get:function(){Ak=!0}}),window.addEventListener("test",Zp,Zp),window.removeEventListener("test",Zp,Zp)}catch{Ak=!1}var Zp,zu=null,$k=null,Py=null;function XI(){if(Py)return Py;var i,s=$k,u=s.length,p,b="value"in zu?zu.value:zu.textContent,E=b.length;for(i=0;i<u&&s[i]===b[i];i++);var M=u-i;for(p=1;p<=M&&s[u-p]===b[E-p];p++);return Py=b.slice(i,1<p?1-p:void 0)}function Ry(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 Oy(){return!0}function QI(){return!1}function wi(i){function s(u,p,b,E,M){this._reactName=u,this._targetInst=b,this.type=p,this.nativeEvent=E,this.target=M,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(u=i[G],this[G]=u?u(E):E[G]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Oy:QI,this.isPropagationStopped=QI,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=Oy)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Oy)},persist:function(){},isPersistent:Oy}),s}var Sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zy=wi(Sd),cg=v({},Sd,{view:0,detail:0}),uQ=wi(cg),Bk,Ik,dg,Ly=v({},cg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tk,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!==dg&&(dg&&i.type==="mousemove"?(Bk=i.screenX-dg.screenX,Ik=i.screenY-dg.screenY):Ik=Bk=0,dg=i),Bk)},movementY:function(i){return"movementY"in i?i.movementY:Ik}}),YI=wi(Ly),cQ=v({},Ly,{dataTransfer:0}),dQ=wi(cQ),fQ=v({},cg,{relatedTarget:0}),Mk=wi(fQ),pQ=v({},Sd,{animationName:0,elapsedTime:0,pseudoElement:0}),mQ=wi(pQ),hQ=v({},Sd,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),gQ=wi(hQ),vQ=v({},Sd,{data:0}),ZI=wi(vQ),bQ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yQ={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"},wQ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xQ(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=wQ[i])?!!s[i]:!1}function Tk(){return xQ}var EQ=v({},cg,{key:function(i){if(i.key){var s=bQ[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ry(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?yQ[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tk,charCode:function(i){return i.type==="keypress"?Ry(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ry(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),kQ=wi(EQ),CQ=v({},Ly,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JI=wi(CQ),SQ=v({},cg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tk}),FQ=wi(SQ),DQ=v({},Sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),AQ=wi(DQ),$Q=v({},Ly,{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}),BQ=wi($Q),IQ=v({},Sd,{newState:0,oldState:0}),MQ=wi(IQ),TQ=[9,13,27,32],jk=Pl&&"CompositionEvent"in window,fg=null;Pl&&"documentMode"in document&&(fg=document.documentMode);var jQ=Pl&&"TextEvent"in window&&!fg,eM=Pl&&(!jk||fg&&8<fg&&11>=fg),tM=" ",rM=!1;function nM(i,s){switch(i){case"keyup":return TQ.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 Jp=!1;function _Q(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 NQ(i,s){if(Jp)return i==="compositionend"||!jk&&nM(i,s)?(i=XI(),Py=$k=zu=null,Jp=!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 PQ={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"?!!PQ[i.type]:s==="textarea"}function oM(i,s,u,p){Qp?Yp?Yp.push(p):Yp=[p]:Qp=p,s=Tw(s,"onChange"),0<s.length&&(u=new zy("onChange","change",null,u,p),i.push({event:u,listeners:s}))}var pg=null,mg=null;function RQ(i){qj(i,0)}function Hy(i){var s=Mn(i);if(We(s))return i}function sM(i,s){if(i==="change")return s}var lM=!1;Pl&&(Pl?(qy="oninput"in document,qy||(Nk=document.createElement("div"),Nk.setAttribute("oninput","return;"),qy=typeof Nk.oninput=="function"),_k=qy):_k=!1,lM=_k&&(!document.documentMode||9<document.documentMode));var _k,qy,Nk;function uM(){pg&&(pg.detachEvent("onpropertychange",cM),mg=pg=null)}function cM(i){if(i.propertyName==="value"&&Hy(mg)){var s=[];oM(s,mg,i,Fk(i)),KI(RQ,s)}}function OQ(i,s,u){i==="focusin"?(uM(),pg=s,mg=u,pg.attachEvent("onpropertychange",cM)):i==="focusout"&&uM()}function zQ(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Hy(mg)}function LQ(i,s){if(i==="click")return Hy(s)}function HQ(i,s){if(i==="input"||i==="change")return Hy(s)}function qQ(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Xi=typeof Object.is=="function"?Object.is:qQ;function hg(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),p=Object.keys(s);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var b=u[p];if(!$e.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 fM(i,s){var u=dM(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=s&&p>=s)return{node:u,offset:s-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=dM(u)}}function pM(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?pM(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=Qt(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=Qt(i.document)}return s}function Pk(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 WQ=Pl&&"documentMode"in document&&11>=document.documentMode,em=null,Rk=null,gg=null,Ok=!1;function hM(i,s,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ok||em==null||em!==Qt(p)||(p=em,"selectionStart"in p&&Pk(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),gg&&hg(gg,p)||(gg=p,p=Tw(Rk,"onSelect"),0<p.length&&(s=new zy("onSelect","select",null,s,u),i.push({event:s,listeners:p}),s.target=em)))}function Fd(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var tm={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")},zk={},gM={};Pl&&(gM=document.createElement("div").style,"AnimationEvent"in window||(delete tm.animationend.animation,delete tm.animationiteration.animation,delete tm.animationstart.animation),"TransitionEvent"in window||delete tm.transitionend.transition);function Dd(i){if(zk[i])return zk[i];if(!tm[i])return i;var s=tm[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in gM)return zk[i]=s[u];return i}var vM=Dd("animationend"),bM=Dd("animationiteration"),yM=Dd("animationstart"),UQ=Dd("transitionrun"),VQ=Dd("transitionstart"),GQ=Dd("transitioncancel"),wM=Dd("transitionend"),xM=new Map,Lk="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(" ");Lk.push("scrollEnd");function os(i,s){xM.set(i,s),ga(s,[i])}var Wy=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=[],rm=0,Hk=0;function Uy(){for(var i=rm,s=Hk=rm=0;s<i;){var u=ko[s];ko[s++]=null;var p=ko[s];ko[s++]=null;var b=ko[s];ko[s++]=null;var E=ko[s];if(ko[s++]=null,p!==null&&b!==null){var M=p.pending;M===null?b.next=b:(b.next=M.next,M.next=b),p.pending=b}E!==0&&EM(u,b,E)}}function Vy(i,s,u,p){ko[rm++]=i,ko[rm++]=s,ko[rm++]=u,ko[rm++]=p,Hk|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function qk(i,s,u,p){return Vy(i,s,u,p),Gy(i)}function Ad(i,s){return Vy(i,null,null,s),Gy(i)}function EM(i,s,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var b=!1,E=i.return;E!==null;)E.childLanes|=u,p=E.alternate,p!==null&&(p.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,p=i[b],p===null?i[b]=[s]:p.push(s),s.lane=u|536870912),E):null}function Gy(i){if(50<Rg)throw Rg=0,ZC=null,Error(a(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var nm={};function KQ(i,s,u,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qi(i,s,u,p){return new KQ(i,s,u,p)}function Wk(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Rl(i,s){var u=i.alternate;return u===null?(u=Qi(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 Ky(i,s,u,p,b,E){var M=0;if(p=i,typeof i=="function")Wk(i)&&(M=1);else if(typeof i=="string")M=YY(i,u,Y.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case P:return i=Qi(31,u,s,b),i.elementType=P,i.lanes=E,i;case k:return $d(u.children,b,E,s);case F:M=8,b|=24;break;case C:return i=Qi(12,u,s,b|2),i.elementType=C,i.lanes=E,i;case I:return i=Qi(13,u,s,b),i.elementType=I,i.lanes=E,i;case j:return i=Qi(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 N:M=16,p=null;break e}M=29,u=Error(a(130,i===null?"null":typeof i,"")),p=null}return s=Qi(M,u,s,b),s.elementType=i,s.type=p,s.lanes=E,s}function $d(i,s,u,p){return i=Qi(7,i,p,s),i.lanes=u,i}function Uk(i,s,u){return i=Qi(6,i,null,s),i.lanes=u,i}function CM(i){var s=Qi(18,null,null,0);return s.stateNode=i,s}function Vk(i,s,u){return s=Qi(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:Le(s)},SM.set(i,s),s)}return{value:i,source:s,stack:Le(s)}}var am=[],im=0,Xy=null,vg=0,So=[],Fo=0,Lu=null,Ls=1,Hs="";function Ol(i,s){am[im++]=vg,am[im++]=Xy,Xy=i,vg=s}function FM(i,s,u){So[Fo++]=Ls,So[Fo++]=Hs,So[Fo++]=Lu,Lu=i;var p=Ls;i=Hs;var b=32-rt(p)-1;p&=~(1<<b),u+=1;var E=32-rt(s)+b;if(30<E){var M=b-b%5;E=(p&(1<<M)-1).toString(32),p>>=M,b-=M,Ls=1<<32-rt(s)+b|u<<b|p,Hs=E+i}else Ls=1<<E|u<<b|p,Hs=i}function Gk(i){i.return!==null&&(Ol(i,1),FM(i,1,0))}function Kk(i){for(;i===Xy;)Xy=am[--im],am[im]=null,vg=am[--im],am[im]=null;for(;i===Lu;)Lu=So[--Fo],So[Fo]=null,Hs=So[--Fo],So[Fo]=null,Ls=So[--Fo],So[Fo]=null}function DM(i,s){So[Fo++]=Ls,So[Fo++]=Hs,So[Fo++]=Lu,Ls=s.id,Hs=s.overflow,Lu=i}var ba=null,en=null,ir=!1,Hu=null,Do=!1,Xk=Error(a(519));function qu(i){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bg(Co(s,i)),Xk}function AM(i){var s=i.stateNode,u=i.type,p=i.memoizedProps;switch(s[Xt]=i,s[zr]=p,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<zg.length;u++)Vt(zg[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),sg(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Vt("invalid",s);break;case"textarea":Vt("invalid",s),WI(s,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||p.suppressHydrationWarning===!0||Gj(s.textContent,u)?(p.popover!=null&&(Vt("beforetoggle",s),Vt("toggle",s)),p.onScroll!=null&&Vt("scroll",s),p.onScrollEnd!=null&&Vt("scrollend",s),p.onClick!=null&&(s.onclick=Nl),s=!0):s=!1,s||qu(i,!0)}function $M(i){for(ba=i.return;ba;)switch(ba.tag){case 5:case 31:case 13:Do=!1;return;case 27:case 3:Do=!0;return;default:ba=ba.return}}function om(i){if(i!==ba)return!1;if(!ir)return $M(i),ir=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||d8(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=g8,g8=null,en=i):en=s):en=ba?Ao(i.stateNode.nextSibling):null;return!0}function Bd(){en=ba=null,ir=!1}function Qk(){var i=Hu;return i!==null&&(Ci===null?Ci=i:Ci.push.apply(Ci,i),Hu=null),i}function bg(i){Hu===null?Hu=[i]:Hu.push(i)}var Yk=T(null),Id=null,zl=null;function Wu(i,s,u){X(Yk,s._currentValue),s._currentValue=u}function Ll(i){i._currentValue=Yk.current,U(Yk)}function Zk(i,s,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===u)break;i=i.return}}function Jk(i,s,u,p){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 G=E;E=b;for(var ee=0;ee<s.length;ee++)if(G.context===s[ee]){E.lanes|=u,G=E.alternate,G!==null&&(G.lanes|=u),Zk(E.return,u,i),p||(M=null);break e}E=G.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),Zk(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 sm(i,s,u,p){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 G=b.type;Xi(b.pendingProps.value,M.value)||(i!==null?i.push(G):i=[G])}}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(Ug):i=[Ug])}b=b.return}i!==null&&Jk(s,i,u,p),s.flags|=262144}function Qy(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,zl=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ya(i){return BM(Id,i)}function Yy(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},zl===null){if(i===null)throw Error(a(308));zl=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else zl=zl.next=s;return u}var XQ=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},QQ=t.unstable_scheduleCallback,YQ=t.unstable_NormalPriority,Tn={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eC(){return{controller:new XQ,data:new Map,refCount:0}}function yg(i){i.refCount--,i.refCount===0&&QQ(YQ,function(){i.controller.abort()})}var wg=null,tC=0,lm=0,um=null;function ZQ(i,s){if(wg===null){var u=wg=[];tC=0,lm=a8(),um={status:"pending",value:void 0,then:function(p){u.push(p)}}}return tC++,s.then(IM,IM),s}function IM(){if(--tC===0&&wg!==null){um!==null&&(um.status="fulfilled");var i=wg;wg=null,lm=0,um=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function JQ(i,s){var u=[],p={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(p.status="rejected",p.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),p}var MM=W.S;W.S=function(i,s){hj=Ie(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&ZQ(i,s),MM!==null&&MM(i,s)};var Td=T(null);function rC(){var i=Td.current;return i!==null?i:Lr.pooledCache}function Zy(i,s){s===null?X(Td,Td.current):X(Td,s.pool)}function TM(){var i=rC();return i===null?null:{parent:Tn._currentValue,pool:i}}var cm=Error(a(460)),nC=Error(a(474)),Jy=Error(a(542)),ew={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(Nl,Nl),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,PM(i),i;default:if(typeof s.status=="string")s.then(Nl,Nl);else{if(i=Lr,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=p}},function(p){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,PM(i),i}throw _d=s,cm}}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,cm):u}}var _d=null;function NM(){if(_d===null)throw Error(a(459));var i=_d;return _d=null,i}function PM(i){if(i===cm||i===Jy)throw Error(a(483))}var dm=null,xg=0;function tw(i){var s=xg;return xg+=1,dm===null&&(dm=[]),_M(dm,i,s)}function Eg(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function rw(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 RM(i){function s(ue,ie){if(i){var de=ue.deletions;de===null?(ue.deletions=[ie],ue.flags|=16):de.push(ie)}}function u(ue,ie){if(!i)return null;for(;ie!==null;)s(ue,ie),ie=ie.sibling;return null}function p(ue){for(var ie=new Map;ue!==null;)ue.key!==null?ie.set(ue.key,ue):ie.set(ue.index,ue),ue=ue.sibling;return ie}function b(ue,ie){return ue=Rl(ue,ie),ue.index=0,ue.sibling=null,ue}function E(ue,ie,de){return ue.index=de,i?(de=ue.alternate,de!==null?(de=de.index,de<ie?(ue.flags|=67108866,ie):de):(ue.flags|=67108866,ie)):(ue.flags|=1048576,ie)}function M(ue){return i&&ue.alternate===null&&(ue.flags|=67108866),ue}function G(ue,ie,de,we){return ie===null||ie.tag!==6?(ie=Uk(de,ue.mode,we),ie.return=ue,ie):(ie=b(ie,de),ie.return=ue,ie)}function ee(ue,ie,de,we){var st=de.type;return st===k?be(ue,ie,de.props.children,we,de.key):ie!==null&&(ie.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===N&&jd(st)===ie.type)?(ie=b(ie,de.props),Eg(ie,de),ie.return=ue,ie):(ie=Ky(de.type,de.key,de.props,null,ue.mode,we),Eg(ie,de),ie.return=ue,ie)}function fe(ue,ie,de,we){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=Vk(de,ue.mode,we),ie.return=ue,ie):(ie=b(ie,de.children||[]),ie.return=ue,ie)}function be(ue,ie,de,we,st){return ie===null||ie.tag!==7?(ie=$d(de,ue.mode,we,st),ie.return=ue,ie):(ie=b(ie,de),ie.return=ue,ie)}function xe(ue,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Uk(""+ie,ue.mode,de),ie.return=ue,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return de=Ky(ie.type,ie.key,ie.props,null,ue.mode,de),Eg(de,ie),de.return=ue,de;case w:return ie=Vk(ie,ue.mode,de),ie.return=ue,ie;case N:return ie=jd(ie),xe(ue,ie,de)}if(R(ie)||H(ie))return ie=$d(ie,ue.mode,de,null),ie.return=ue,ie;if(typeof ie.then=="function")return xe(ue,tw(ie),de);if(ie.$$typeof===S)return xe(ue,Yy(ue,ie),de);rw(ue,ie)}return null}function pe(ue,ie,de,we){var st=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return st!==null?null:G(ue,ie,""+de,we);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case x:return de.key===st?ee(ue,ie,de,we):null;case w:return de.key===st?fe(ue,ie,de,we):null;case N:return de=jd(de),pe(ue,ie,de,we)}if(R(de)||H(de))return st!==null?null:be(ue,ie,de,we,null);if(typeof de.then=="function")return pe(ue,ie,tw(de),we);if(de.$$typeof===S)return pe(ue,ie,Yy(ue,de),we);rw(ue,de)}return null}function ge(ue,ie,de,we,st){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ue=ue.get(de)||null,G(ie,ue,""+we,st);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case x:return ue=ue.get(we.key===null?de:we.key)||null,ee(ie,ue,we,st);case w:return ue=ue.get(we.key===null?de:we.key)||null,fe(ie,ue,we,st);case N:return we=jd(we),ge(ue,ie,de,we,st)}if(R(we)||H(we))return ue=ue.get(de)||null,be(ie,ue,we,st,null);if(typeof we.then=="function")return ge(ue,ie,de,tw(we),st);if(we.$$typeof===S)return ge(ue,ie,de,Yy(ie,we),st);rw(ie,we)}return null}function tt(ue,ie,de,we){for(var st=null,hr=null,nt=ie,Tt=ie=0,Zt=null;nt!==null&&Tt<de.length;Tt++){nt.index>Tt?(Zt=nt,nt=null):Zt=nt.sibling;var gr=pe(ue,nt,de[Tt],we);if(gr===null){nt===null&&(nt=Zt);break}i&&nt&&gr.alternate===null&&s(ue,nt),ie=E(gr,ie,Tt),hr===null?st=gr:hr.sibling=gr,hr=gr,nt=Zt}if(Tt===de.length)return u(ue,nt),ir&&Ol(ue,Tt),st;if(nt===null){for(;Tt<de.length;Tt++)nt=xe(ue,de[Tt],we),nt!==null&&(ie=E(nt,ie,Tt),hr===null?st=nt:hr.sibling=nt,hr=nt);return ir&&Ol(ue,Tt),st}for(nt=p(nt);Tt<de.length;Tt++)Zt=ge(nt,ue,Tt,de[Tt],we),Zt!==null&&(i&&Zt.alternate!==null&&nt.delete(Zt.key===null?Tt:Zt.key),ie=E(Zt,ie,Tt),hr===null?st=Zt:hr.sibling=Zt,hr=Zt);return i&&nt.forEach(function(lc){return s(ue,lc)}),ir&&Ol(ue,Tt),st}function ht(ue,ie,de,we){if(de==null)throw Error(a(151));for(var st=null,hr=null,nt=ie,Tt=ie=0,Zt=null,gr=de.next();nt!==null&&!gr.done;Tt++,gr=de.next()){nt.index>Tt?(Zt=nt,nt=null):Zt=nt.sibling;var lc=pe(ue,nt,gr.value,we);if(lc===null){nt===null&&(nt=Zt);break}i&&nt&&lc.alternate===null&&s(ue,nt),ie=E(lc,ie,Tt),hr===null?st=lc:hr.sibling=lc,hr=lc,nt=Zt}if(gr.done)return u(ue,nt),ir&&Ol(ue,Tt),st;if(nt===null){for(;!gr.done;Tt++,gr=de.next())gr=xe(ue,gr.value,we),gr!==null&&(ie=E(gr,ie,Tt),hr===null?st=gr:hr.sibling=gr,hr=gr);return ir&&Ol(ue,Tt),st}for(nt=p(nt);!gr.done;Tt++,gr=de.next())gr=ge(nt,ue,Tt,gr.value,we),gr!==null&&(i&&gr.alternate!==null&&nt.delete(gr.key===null?Tt:gr.key),ie=E(gr,ie,Tt),hr===null?st=gr:hr.sibling=gr,hr=gr);return i&&nt.forEach(function(lZ){return s(ue,lZ)}),ir&&Ol(ue,Tt),st}function Nr(ue,ie,de,we){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 x:e:{for(var st=de.key;ie!==null;){if(ie.key===st){if(st=de.type,st===k){if(ie.tag===7){u(ue,ie.sibling),we=b(ie,de.props.children),we.return=ue,ue=we;break e}}else if(ie.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===N&&jd(st)===ie.type){u(ue,ie.sibling),we=b(ie,de.props),Eg(we,de),we.return=ue,ue=we;break e}u(ue,ie);break}else s(ue,ie);ie=ie.sibling}de.type===k?(we=$d(de.props.children,ue.mode,we,de.key),we.return=ue,ue=we):(we=Ky(de.type,de.key,de.props,null,ue.mode,we),Eg(we,de),we.return=ue,ue=we)}return M(ue);case w: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(ue,ie.sibling),we=b(ie,de.children||[]),we.return=ue,ue=we;break e}else{u(ue,ie);break}else s(ue,ie);ie=ie.sibling}we=Vk(de,ue.mode,we),we.return=ue,ue=we}return M(ue);case N:return de=jd(de),Nr(ue,ie,de,we)}if(R(de))return tt(ue,ie,de,we);if(H(de)){if(st=H(de),typeof st!="function")throw Error(a(150));return de=st.call(de),ht(ue,ie,de,we)}if(typeof de.then=="function")return Nr(ue,ie,tw(de),we);if(de.$$typeof===S)return Nr(ue,ie,Yy(ue,de),we);rw(ue,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ie!==null&&ie.tag===6?(u(ue,ie.sibling),we=b(ie,de),we.return=ue,ue=we):(u(ue,ie),we=Uk(de,ue.mode,we),we.return=ue,ue=we),M(ue)):u(ue,ie)}return function(ue,ie,de,we){try{xg=0;var st=Nr(ue,ie,de,we);return dm=null,st}catch(nt){if(nt===cm||nt===Jy)throw nt;var hr=Qi(29,nt,null,ue.mode);return hr.lanes=we,hr.return=ue,hr}}}var Nd=RM(!0),OM=RM(!1),Uu=!1;function aC(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iC(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 Vu(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Gu(i,s,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(br&2)!==0){var b=p.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),p.pending=s,s=Gy(i),EM(i,null,u),s}return Vy(i,p,s,u),Gy(i)}function kg(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,ze(i,u)}}function oC(i,s){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){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:p.baseState,firstBaseUpdate:b,lastBaseUpdate:E,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var sC=!1;function Cg(){if(sC){var i=um;if(i!==null)throw i}}function Sg(i,s,u,p){sC=!1;var b=i.updateQueue;Uu=!1;var E=b.firstBaseUpdate,M=b.lastBaseUpdate,G=b.shared.pending;if(G!==null){b.shared.pending=null;var ee=G,fe=ee.next;ee.next=null,M===null?E=fe:M.next=fe,M=ee;var be=i.alternate;be!==null&&(be=be.updateQueue,G=be.lastBaseUpdate,G!==M&&(G===null?be.firstBaseUpdate=fe:G.next=fe,be.lastBaseUpdate=ee))}if(E!==null){var xe=b.baseState;M=0,be=fe=ee=null,G=E;do{var pe=G.lane&-536870913,ge=pe!==G.lane;if(ge?(Yt&pe)===pe:(p&pe)===pe){pe!==0&&pe===lm&&(sC=!0),be!==null&&(be=be.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var tt=i,ht=G;pe=s;var Nr=u;switch(ht.tag){case 1:if(tt=ht.payload,typeof tt=="function"){xe=tt.call(Nr,xe,pe);break e}xe=tt;break e;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=ht.payload,pe=typeof tt=="function"?tt.call(Nr,xe,pe):tt,pe==null)break e;xe=v({},xe,pe);break e;case 2:Uu=!0}}pe=G.callback,pe!==null&&(i.flags|=64,ge&&(i.flags|=8192),ge=b.callbacks,ge===null?b.callbacks=[pe]:ge.push(pe))}else ge={lane:pe,tag:G.tag,payload:G.payload,callback:G.callback,next:null},be===null?(fe=be=ge,ee=xe):be=be.next=ge,M|=pe;if(G=G.next,G===null){if(G=b.shared.pending,G===null)break;ge=G,G=ge.next,ge.next=null,b.lastBaseUpdate=ge,b.shared.pending=null}}while(!0);be===null&&(ee=xe),b.baseState=ee,b.firstBaseUpdate=fe,b.lastBaseUpdate=be,E===null&&(b.shared.lanes=0),Zu|=M,i.lanes=M,i.memoizedState=xe}}function zM(i,s){if(typeof i!="function")throw Error(a(191,i));i.call(s)}function LM(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)zM(u[i],s)}var fm=T(null),nw=T(0);function HM(i,s){i=Ql,X(nw,i),X(fm,s),Ql=i|s.baseLanes}function lC(){X(nw,Ql),X(fm,fm.current)}function uC(){Ql=nw.current,U(fm),U(nw)}var Yi=T(null),ss=null;function Ku(i){var s=i.alternate;X(Sn,Sn.current&1),X(Yi,i),ss===null&&(s===null||fm.current!==null||s.memoizedState!==null)&&(ss=i)}function cC(i){X(Sn,Sn.current),X(Yi,i),ss===null&&(ss=i)}function qM(i){i.tag===22?(X(Sn,Sn.current),X(Yi,i),ss===null&&(ss=i)):Xu(i)}function Xu(){X(Sn,Sn.current),X(Yi,Yi.current)}function Zi(i){U(Yi),ss===i&&(ss=null),U(Sn)}var Sn=T(0);function aw(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||m8(u)||h8(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,Dt=null,jr=null,jn=null,iw=!1,pm=!1,Pd=!1,ow=0,Fg=0,mm=null,eY=0;function bn(){throw Error(a(321))}function dC(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 fC(i,s,u,p,b,E){return Hl=E,Dt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,W.H=i===null||i.memoizedState===null?FT:DC,Pd=!1,E=u(p,b),Pd=!1,pm&&(E=UM(s,u,p,b)),WM(i),E}function WM(i){W.H=$g;var s=jr!==null&&jr.next!==null;if(Hl=0,jn=jr=Dt=null,iw=!1,Fg=0,mm=null,s)throw Error(a(300));i===null||_n||(i=i.dependencies,i!==null&&Qy(i)&&(_n=!0))}function UM(i,s,u,p){Dt=i;var b=0;do{if(pm&&(mm=null),Fg=0,pm=!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,p)}while(pm);return E}function tY(){var i=W.H,s=i.useState()[0];return s=typeof s.then=="function"?Dg(s):s,i=i.useState()[0],(jr!==null?jr.memoizedState:null)!==i&&(Dt.flags|=1024),s}function pC(){var i=ow!==0;return ow=0,i}function mC(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function hC(i){if(iw){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}iw=!1}Hl=0,jn=jr=Dt=null,pm=!1,Fg=ow=0,mm=null}function ni(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?Dt.memoizedState=jn=i:jn=jn.next=i,jn}function Fn(){if(jr===null){var i=Dt.alternate;i=i!==null?i.memoizedState:null}else i=jr.next;var s=jn===null?Dt.memoizedState:jn.next;if(s!==null)jn=s,jr=i;else{if(i===null)throw Dt.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?Dt.memoizedState=jn=i:jn=jn.next=i}return jn}function sw(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dg(i){var s=Fg;return Fg+=1,mm===null&&(mm=[]),i=_M(mm,i,s),s=Dt,(jn===null?s.memoizedState:jn.next)===null&&(s=s.alternate,W.H=s===null||s.memoizedState===null?FT:DC),i}function lw(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Dg(i);if(i.$$typeof===S)return ya(i)}throw Error(a(438,String(i)))}function gC(i){var s=null,u=Dt.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var p=Dt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=sw(),Dt.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),p=0;p<i;p++)u[p]=O;return s.index++,u}function ql(i,s){return typeof s=="function"?s(i):s}function uw(i){var s=Fn();return vC(s,jr,i)}function vC(i,s,u){var p=i.queue;if(p===null)throw Error(a(311));p.lastRenderedReducer=u;var b=i.baseQueue,E=p.pending;if(E!==null){if(b!==null){var M=b.next;b.next=E.next,E.next=M}s.baseQueue=b=E,p.pending=null}if(E=i.baseState,b===null)i.memoizedState=E;else{s=b.next;var G=M=null,ee=null,fe=s,be=!1;do{var xe=fe.lane&-536870913;if(xe!==fe.lane?(Yt&xe)===xe:(Hl&xe)===xe){var pe=fe.revertLane;if(pe===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),xe===lm&&(be=!0);else if((Hl&pe)===pe){fe=fe.next,pe===lm&&(be=!0);continue}else xe={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},ee===null?(G=ee=xe,M=E):ee=ee.next=xe,Dt.lanes|=pe,Zu|=pe;xe=fe.action,Pd&&u(E,xe),E=fe.hasEagerState?fe.eagerState:u(E,xe)}else pe={lane:xe,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},ee===null?(G=ee=pe,M=E):ee=ee.next=pe,Dt.lanes|=xe,Zu|=xe;fe=fe.next}while(fe!==null&&fe!==s);if(ee===null?M=E:ee.next=G,!Xi(E,i.memoizedState)&&(_n=!0,be&&(u=um,u!==null)))throw u;i.memoizedState=E,i.baseState=M,i.baseQueue=ee,p.lastRenderedState=E}return b===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function bC(i){var s=Fn(),u=s.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=i;var p=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,p]}function VM(i,s,u){var p=Dt,b=Fn(),E=ir;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,xC(XM.bind(null,p,b,i),[i]),b.getSnapshot!==s||M||jn!==null&&jn.memoizedState.tag&1){if(p.flags|=2048,hm(9,{destroy:void 0},KM.bind(null,p,b,u,s),null),Lr===null)throw Error(a(349));E||(Hl&127)!==0||GM(p,s,u)}return u}function GM(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=Dt.updateQueue,s===null?(s=sw(),Dt.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function KM(i,s,u,p){s.value=u,s.getSnapshot=p,QM(s)&&YM(i)}function XM(i,s,u){return u(function(){QM(s)&&YM(i)})}function QM(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Xi(i,u)}catch{return!0}}function YM(i){var s=Ad(i,2);s!==null&&Si(s,i,2)}function yC(i){var s=ni();if(typeof i=="function"){var u=i;if(i=u(),Pd){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,p){return i.baseState=u,vC(i,jr,typeof p=="function"?p:ql)}function rY(i,s,u,p,b){if(fw(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,p(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,p=s.payload,b=i.state;if(s.isTransition){var E=W.T,M={};W.T=M;try{var G=u(b,p),ee=W.S;ee!==null&&ee(M,G),eT(i,s,G)}catch(fe){wC(i,s,fe)}finally{E!==null&&M.types!==null&&(E.types=M.types),W.T=E}}else try{E=u(b,p),eT(i,s,E)}catch(fe){wC(i,s,fe)}}function eT(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){tT(i,s,p)},function(p){return wC(i,s,p)}):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 wC(i,s,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=u,rT(s),s=s.next;while(s!==p)}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(ir){var u=Lr.formState;if(u!==null){e:{var p=Dt;if(ir){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),p=b.data==="F!";break e}}qu(p)}p=!1}p&&(s=u[0])}}return u=ni(),u.memoizedState=u.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nT,lastRenderedState:s},u.queue=p,u=kT.bind(null,Dt,p),p.dispatch=u,p=yC(!1),E=FC.bind(null,Dt,!1,p.queue),p=ni(),b={state:s,dispatch:null,action:i,pending:null},p.queue=b,u=rY.bind(null,Dt,b,E,u),b.dispatch=u,p.memoizedState=i,[s,u,!1]}function iT(i){var s=Fn();return oT(s,jr,i)}function oT(i,s,u){if(s=vC(i,s,nT)[0],i=uw(ql)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=Dg(s)}catch(M){throw M===cm?Jy:M}else p=s;s=Fn();var b=s.queue,E=b.dispatch;return u!==s.memoizedState&&(Dt.flags|=2048,hm(9,{destroy:void 0},nY.bind(null,b,u),null)),[p,E,i]}function nY(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 p=u.queue.dispatch;return u.memoizedState=i,[s,p,!1]}function hm(i,s,u,p){return i={tag:i,create:u,deps:p,inst:s,next:null},s=Dt.updateQueue,s===null&&(s=sw(),Dt.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,s.lastEffect=i),i}function lT(){return Fn().memoizedState}function cw(i,s,u,p){var b=ni();Dt.flags|=i,b.memoizedState=hm(1|s,{destroy:void 0},u,p===void 0?null:p)}function dw(i,s,u,p){var b=Fn();p=p===void 0?null:p;var E=b.memoizedState.inst;jr!==null&&p!==null&&dC(p,jr.memoizedState.deps)?b.memoizedState=hm(s,E,u,p):(Dt.flags|=i,b.memoizedState=hm(1|s,E,u,p))}function uT(i,s){cw(8390656,8,i,s)}function xC(i,s){dw(2048,8,i,s)}function aY(i){Dt.flags|=4;var s=Dt.updateQueue;if(s===null)s=sw(),Dt.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 aY({ref:s,nextImpl:i}),function(){if((br&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function dT(i,s){return dw(4,2,i,s)}function fT(i,s){return dw(4,4,i,s)}function pT(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,dw(4,4,pT.bind(null,s,i),u)}function EC(){}function hT(i,s){var u=Fn();s=s===void 0?null:s;var p=u.memoizedState;return s!==null&&dC(s,p[1])?p[0]:(u.memoizedState=[i,s],i)}function gT(i,s){var u=Fn();s=s===void 0?null:s;var p=u.memoizedState;if(s!==null&&dC(s,p[1]))return p[0];if(p=i(),Pd){je(!0);try{i()}finally{je(!1)}}return u.memoizedState=[p,s],p}function kC(i,s,u){return u===void 0||(Hl&1073741824)!==0&&(Yt&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=vj(),Dt.lanes|=i,Zu|=i,u)}function vT(i,s,u,p){return Xi(u,s)?u:fm.current!==null?(i=kC(i,u,p),Xi(i,s)||(_n=!0),i):(Hl&42)===0||(Hl&1073741824)!==0&&(Yt&261930)===0?(_n=!0,i.memoizedState=u):(i=vj(),Dt.lanes|=i,Zu|=i,s)}function bT(i,s,u,p,b){var E=z.p;z.p=E!==0&&8>E?E:8;var M=W.T,G={};W.T=G,FC(i,!1,s,u);try{var ee=b(),fe=W.S;if(fe!==null&&fe(G,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var be=JQ(ee,p);Ag(i,s,be,to(i))}else Ag(i,s,p,to(i))}catch(xe){Ag(i,s,{then:function(){},status:"rejected",reason:xe},to())}finally{z.p=E,M!==null&&G.types!==null&&(M.types=G.types),W.T=M}}function iY(){}function CC(i,s,u,p){if(i.tag!==5)throw Error(a(476));var b=yT(i).queue;bT(i,b,s,Q,u===null?iY:function(){return wT(i),u(p)})}function yT(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ql,lastRenderedState:Q},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),Ag(i,s.next.queue,{},to())}function SC(){return ya(Ug)}function xT(){return Fn().memoizedState}function ET(){return Fn().memoizedState}function oY(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=to();i=Vu(u);var p=Gu(s,i,u);p!==null&&(Si(p,s,u),kg(p,s,u)),s={cache:eC()},i.payload=s;return}s=s.return}}function sY(i,s,u){var p=to();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},fw(i)?CT(s,u):(u=qk(i,s,u,p),u!==null&&(Si(u,i,p),ST(u,s,p)))}function kT(i,s,u){var p=to();Ag(i,s,u,p)}function Ag(i,s,u,p){var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(fw(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,G=E(M,u);if(b.hasEagerState=!0,b.eagerState=G,Xi(G,M))return Vy(i,s,b,0),Lr===null&&Uy(),!1}catch{}if(u=qk(i,s,b,p),u!==null)return Si(u,i,p),ST(u,s,p),!0}return!1}function FC(i,s,u,p){if(p={lane:2,revertLane:a8(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},fw(i)){if(s)throw Error(a(479))}else s=qk(i,u,p,2),s!==null&&Si(s,i,2)}function fw(i){var s=i.alternate;return i===Dt||s!==null&&s===Dt}function CT(i,s){pm=iw=!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 p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,ze(i,u)}}var $g={readContext:ya,use:lw,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};$g.useEffectEvent=bn;var FT={readContext:ya,use:lw,useCallback:function(i,s){return ni().memoizedState=[i,s===void 0?null:s],i},useContext:ya,useEffect:uT,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,cw(4194308,4,pT.bind(null,s,i),u)},useLayoutEffect:function(i,s){return cw(4194308,4,i,s)},useInsertionEffect:function(i,s){cw(4,2,i,s)},useMemo:function(i,s){var u=ni();s=s===void 0?null:s;var p=i();if(Pd){je(!0);try{i()}finally{je(!1)}}return u.memoizedState=[p,s],p},useReducer:function(i,s,u){var p=ni();if(u!==void 0){var b=u(s);if(Pd){je(!0);try{u(s)}finally{je(!1)}}}else b=s;return p.memoizedState=p.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},p.queue=i,i=i.dispatch=sY.bind(null,Dt,i),[p.memoizedState,i]},useRef:function(i){var s=ni();return i={current:i},s.memoizedState=i},useState:function(i){i=yC(i);var s=i.queue,u=kT.bind(null,Dt,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:EC,useDeferredValue:function(i,s){var u=ni();return kC(u,i,s)},useTransition:function(){var i=yC(!1);return i=bT.bind(null,Dt,i.queue,!0,!1),ni().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var p=Dt,b=ni();if(ir){if(u===void 0)throw Error(a(407));u=u()}else{if(u=s(),Lr===null)throw Error(a(349));(Yt&127)!==0||GM(p,s,u)}b.memoizedState=u;var E={value:u,getSnapshot:s};return b.queue=E,uT(XM.bind(null,p,E,i),[i]),p.flags|=2048,hm(9,{destroy:void 0},KM.bind(null,p,E,u,s),null),u},useId:function(){var i=ni(),s=Lr.identifierPrefix;if(ir){var u=Hs,p=Ls;u=(p&~(1<<32-rt(p)-1)).toString(32)+u,s="_"+s+"R_"+u,u=ow++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=eY++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:SC,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=FC.bind(null,Dt,!0,u),u.dispatch=s,[i,s]},useMemoCache:gC,useCacheRefresh:function(){return ni().memoizedState=oY.bind(null,Dt)},useEffectEvent:function(i){var s=ni(),u={impl:i};return s.memoizedState=u,function(){if((br&2)!==0)throw Error(a(440));return u.impl.apply(void 0,arguments)}}},DC={readContext:ya,use:lw,useCallback:hT,useContext:ya,useEffect:xC,useImperativeHandle:mT,useInsertionEffect:dT,useLayoutEffect:fT,useMemo:gT,useReducer:uw,useRef:lT,useState:function(){return uw(ql)},useDebugValue:EC,useDeferredValue:function(i,s){var u=Fn();return vT(u,jr.memoizedState,i,s)},useTransition:function(){var i=uw(ql)[0],s=Fn().memoizedState;return[typeof i=="boolean"?i:Dg(i),s]},useSyncExternalStore:VM,useId:xT,useHostTransitionStatus:SC,useFormState:iT,useActionState:iT,useOptimistic:function(i,s){var u=Fn();return ZM(u,jr,i,s)},useMemoCache:gC,useCacheRefresh:ET};DC.useEffectEvent=cT;var DT={readContext:ya,use:lw,useCallback:hT,useContext:ya,useEffect:xC,useImperativeHandle:mT,useInsertionEffect:dT,useLayoutEffect:fT,useMemo:gT,useReducer:bC,useRef:lT,useState:function(){return bC(ql)},useDebugValue:EC,useDeferredValue:function(i,s){var u=Fn();return jr===null?kC(u,i,s):vT(u,jr.memoizedState,i,s)},useTransition:function(){var i=bC(ql)[0],s=Fn().memoizedState;return[typeof i=="boolean"?i:Dg(i),s]},useSyncExternalStore:VM,useId:xT,useHostTransitionStatus:SC,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:gC,useCacheRefresh:ET};DT.useEffectEvent=cT;function AC(i,s,u,p){s=i.memoizedState,u=u(p,s),u=u==null?s:v({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var $C={enqueueSetState:function(i,s,u){i=i._reactInternals;var p=to(),b=Vu(p);b.payload=s,u!=null&&(b.callback=u),s=Gu(i,b,p),s!==null&&(Si(s,i,p),kg(s,i,p))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var p=to(),b=Vu(p);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=Gu(i,b,p),s!==null&&(Si(s,i,p),kg(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=to(),p=Vu(u);p.tag=2,s!=null&&(p.callback=s),s=Gu(i,p,u),s!==null&&(Si(s,i,u),kg(s,i,u))}};function AT(i,s,u,p,b,E,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,E,M):s.prototype&&s.prototype.isPureReactComponent?!hg(u,p)||!hg(b,E):!0}function $T(i,s,u,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,p),s.state!==i&&$C.enqueueReplaceState(s,s.state,null)}function Rd(i,s){var u=s;if("ref"in s){u={};for(var p in s)p!=="ref"&&(u[p]=s[p])}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){Wy(i)}function IT(i){console.error(i)}function MT(i){Wy(i)}function pw(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function TT(i,s,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function BC(i,s,u){return u=Vu(u),u.tag=3,u.payload={element:null},u.callback=function(){pw(i,s)},u}function jT(i){return i=Vu(i),i.tag=3,i}function _T(i,s,u,p){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var E=p.value;i.payload=function(){return b(E)},i.callback=function(){TT(s,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){TT(s,u,p),typeof b!="function"&&(Ju===null?Ju=new Set([this]):Ju.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})})}function lY(i,s,u,p,b){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=u.alternate,s!==null&&sm(s,u,b,!0),u=Yi.current,u!==null){switch(u.tag){case 31:case 13:return ss===null?Sw():u.alternate===null&&yn===0&&(yn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,p===ew?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([p]):s.add(p),t8(i,p,b)),!1;case 22:return u.flags|=65536,p===ew?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([p]):u.add(p)),t8(i,p,b)),!1}throw Error(a(435,u.tag))}return t8(i,p,b),Sw(),!1}if(ir)return s=Yi.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,p!==Xk&&(i=Error(a(422),{cause:p}),bg(Co(i,u)))):(p!==Xk&&(s=Error(a(423),{cause:p}),bg(Co(s,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,p=Co(p,u),b=BC(i.stateNode,p,b),oC(i,b),yn!==4&&(yn=2)),!1;var E=Error(a(520),{cause:p});if(E=Co(E,u),Pg===null?Pg=[E]:Pg.push(E),yn!==4&&(yn=2),s===null)return!0;p=Co(p,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=BC(u.stateNode,p,i),oC(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,p),oC(u,b),!1}u=u.return}while(u!==null);return!1}var IC=Error(a(461)),_n=!1;function wa(i,s,u,p){s.child=i===null?OM(s,null,u,p):Nd(s,i.child,u,p)}function NT(i,s,u,p,b){u=u.render;var E=s.ref;if("ref"in p){var M={};for(var G in p)G!=="ref"&&(M[G]=p[G])}else M=p;return Md(s),p=fC(i,s,u,M,E,b),G=pC(),i!==null&&!_n?(mC(i,s,b),Wl(i,s,b)):(ir&&G&&Gk(s),s.flags|=1,wa(i,s,p,b),s.child)}function PT(i,s,u,p,b){if(i===null){var E=u.type;return typeof E=="function"&&!Wk(E)&&E.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=E,RT(i,s,E,p,b)):(i=Ky(u.type,null,p,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(E=i.child,!OC(i,b)){var M=E.memoizedProps;if(u=u.compare,u=u!==null?u:hg,u(M,p)&&i.ref===s.ref)return Wl(i,s,b)}return s.flags|=1,i=Rl(E,p),i.ref=s.ref,i.return=s,s.child=i}function RT(i,s,u,p,b){if(i!==null){var E=i.memoizedProps;if(hg(E,p)&&i.ref===s.ref)if(_n=!1,s.pendingProps=p=E,OC(i,b))(i.flags&131072)!==0&&(_n=!0);else return s.lanes=i.lanes,Wl(i,s,b)}return MC(i,s,u,p,b)}function OT(i,s,u,p){var b=p.children,E=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(E=E!==null?E.baseLanes|u:u,i!==null){for(p=s.child=i.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~E}else p=0,s.child=null;return zT(i,s,E,u,p)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Zy(s,E!==null?E.cachePool:null),E!==null?HM(s,E):lC(),qM(s);else return p=s.lanes=536870912,zT(i,s,E!==null?E.baseLanes|u:u,u,p)}else E!==null?(Zy(s,E.cachePool),HM(s,E),Xu(s),s.memoizedState=null):(i!==null&&Zy(s,null),lC(),Xu(s));return wa(i,s,b,u),s.child}function Bg(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function zT(i,s,u,p,b){var E=rC();return E=E===null?null:{parent:Tn._currentValue,pool:E},s.memoizedState={baseLanes:u,cachePool:E},i!==null&&Zy(s,null),lC(),qM(s),i!==null&&sm(i,s,p,!0),s.childLanes=b,null}function mw(i,s){return s=gw({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function LT(i,s,u){return Nd(s,i.child,null,u),i=mw(s,s.pendingProps),i.flags|=2,Zi(s),s.memoizedState=null,i}function uY(i,s,u){var p=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(ir){if(p.mode==="hidden")return i=mw(s,p),s.lanes=536870912,Bg(null,i);if(cC(s),(i=en)?(i=t_(i,Do),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Lu!==null?{id:Ls,overflow:Hs}:null,retryLane:536870912,hydrationErrors:null},u=CM(i),u.return=s,s.child=u,ba=s,en=null)):i=null,i===null)throw qu(s);return s.lanes=536870912,null}return mw(s,p)}var E=i.memoizedState;if(E!==null){var M=E.dehydrated;if(cC(s),b)if(s.flags&256)s.flags&=-257,s=LT(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||sm(i,s,u,!1),b=(u&i.childLanes)!==0,_n||b){if(p=Lr,p!==null&&(M=Ze(p,u),M!==0&&M!==E.retryLane))throw E.retryLane=M,Ad(i,M),Si(p,i,M),IC;Sw(),s=LT(i,s,u)}else i=E.treeContext,en=Ao(M.nextSibling),ba=s,ir=!0,Hu=null,Do=!1,i!==null&&DM(s,i),s=mw(s,p),s.flags|=4096;return s}return i=Rl(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function hw(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 MC(i,s,u,p,b){return Md(s),u=fC(i,s,u,p,void 0,b),p=pC(),i!==null&&!_n?(mC(i,s,b),Wl(i,s,b)):(ir&&p&&Gk(s),s.flags|=1,wa(i,s,u,b),s.child)}function HT(i,s,u,p,b,E){return Md(s),s.updateQueue=null,u=UM(s,p,u,b),WM(i),p=pC(),i!==null&&!_n?(mC(i,s,E),Wl(i,s,E)):(ir&&p&&Gk(s),s.flags|=1,wa(i,s,u,E),s.child)}function qT(i,s,u,p,b){if(Md(s),s.stateNode===null){var E=nm,M=u.contextType;typeof M=="object"&&M!==null&&(E=ya(M)),E=new u(p,E),s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=$C,s.stateNode=E,E._reactInternals=s,E=s.stateNode,E.props=p,E.state=s.memoizedState,E.refs={},aC(s),M=u.contextType,E.context=typeof M=="object"&&M!==null?ya(M):nm,E.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(AC(s,u,M,p),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&&$C.enqueueReplaceState(E,E.state,null),Sg(s,p,E,b),Cg(),E.state=s.memoizedState),typeof E.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){E=s.stateNode;var G=s.memoizedProps,ee=Rd(u,G);E.props=ee;var fe=E.context,be=u.contextType;M=nm,typeof be=="object"&&be!==null&&(M=ya(be));var xe=u.getDerivedStateFromProps;be=typeof xe=="function"||typeof E.getSnapshotBeforeUpdate=="function",G=s.pendingProps!==G,be||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(G||fe!==M)&&$T(s,E,p,M),Uu=!1;var pe=s.memoizedState;E.state=pe,Sg(s,p,E,b),Cg(),fe=s.memoizedState,G||pe!==fe||Uu?(typeof xe=="function"&&(AC(s,u,xe,p),fe=s.memoizedState),(ee=Uu||AT(s,u,ee,p,pe,fe,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=p,s.memoizedState=fe),E.props=p,E.state=fe,E.context=M,p=ee):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{E=s.stateNode,iC(i,s),M=s.memoizedProps,be=Rd(u,M),E.props=be,xe=s.pendingProps,pe=E.context,fe=u.contextType,ee=nm,typeof fe=="object"&&fe!==null&&(ee=ya(fe)),G=u.getDerivedStateFromProps,(fe=typeof G=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(M!==xe||pe!==ee)&&$T(s,E,p,ee),Uu=!1,pe=s.memoizedState,E.state=pe,Sg(s,p,E,b),Cg();var ge=s.memoizedState;M!==xe||pe!==ge||Uu||i!==null&&i.dependencies!==null&&Qy(i.dependencies)?(typeof G=="function"&&(AC(s,u,G,p),ge=s.memoizedState),(be=Uu||AT(s,u,be,p,pe,ge,ee)||i!==null&&i.dependencies!==null&&Qy(i.dependencies))?(fe||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(p,ge,ee),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(p,ge,ee)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ge),E.props=p,E.state=ge,E.context=ee,p=be):(typeof E.componentDidUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&pe===i.memoizedState||(s.flags|=1024),p=!1)}return E=p,hw(i,s),p=(s.flags&128)!==0,E||p?(E=s.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:E.render(),s.flags|=1,i!==null&&p?(s.child=Nd(s,i.child,null,b),s.child=Nd(s,null,u,b)):wa(i,s,u,b),s.memoizedState=E.state,i=s.child):i=Wl(i,s,b),i}function WT(i,s,u,p){return Bd(),s.flags|=256,wa(i,s,u,p),s.child}var TC={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jC(i){return{baseLanes:i,cachePool:TM()}}function _C(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=eo),i}function UT(i,s,u){var p=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(ir){if(b?Ku(s):Xu(s),(i=en)?(i=t_(i,Do),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Lu!==null?{id:Ls,overflow:Hs}:null,retryLane:536870912,hydrationErrors:null},u=CM(i),u.return=s,s.child=u,ba=s,en=null)):i=null,i===null)throw qu(s);return h8(i)?s.lanes=32:s.lanes=536870912,null}var G=p.children;return p=p.fallback,b?(Xu(s),b=s.mode,G=gw({mode:"hidden",children:G},b),p=$d(p,b,u,null),G.return=s,p.return=s,G.sibling=p,s.child=G,p=s.child,p.memoizedState=jC(u),p.childLanes=_C(i,M,u),s.memoizedState=TC,Bg(null,p)):(Ku(s),NC(s,G))}var ee=i.memoizedState;if(ee!==null&&(G=ee.dehydrated,G!==null)){if(E)s.flags&256?(Ku(s),s.flags&=-257,s=PC(i,s,u)):s.memoizedState!==null?(Xu(s),s.child=i.child,s.flags|=128,s=null):(Xu(s),G=p.fallback,b=s.mode,p=gw({mode:"visible",children:p.children},b),G=$d(G,b,u,null),G.flags|=2,p.return=s,G.return=s,p.sibling=G,s.child=p,Nd(s,i.child,null,u),p=s.child,p.memoizedState=jC(u),p.childLanes=_C(i,M,u),s.memoizedState=TC,s=Bg(null,p));else if(Ku(s),h8(G)){if(M=G.nextSibling&&G.nextSibling.dataset,M)var fe=M.dgst;M=fe,p=Error(a(419)),p.stack="",p.digest=M,bg({value:p,source:null,stack:null}),s=PC(i,s,u)}else if(_n||sm(i,s,u,!1),M=(u&i.childLanes)!==0,_n||M){if(M=Lr,M!==null&&(p=Ze(M,u),p!==0&&p!==ee.retryLane))throw ee.retryLane=p,Ad(i,p),Si(M,i,p),IC;m8(G)||Sw(),s=PC(i,s,u)}else m8(G)?(s.flags|=192,s.child=i.child,s=null):(i=ee.treeContext,en=Ao(G.nextSibling),ba=s,ir=!0,Hu=null,Do=!1,i!==null&&DM(s,i),s=NC(s,p.children),s.flags|=4096);return s}return b?(Xu(s),G=p.fallback,b=s.mode,ee=i.child,fe=ee.sibling,p=Rl(ee,{mode:"hidden",children:p.children}),p.subtreeFlags=ee.subtreeFlags&65011712,fe!==null?G=Rl(fe,G):(G=$d(G,b,u,null),G.flags|=2),G.return=s,p.return=s,p.sibling=G,s.child=p,Bg(null,p),p=s.child,G=i.child.memoizedState,G===null?G=jC(u):(b=G.cachePool,b!==null?(ee=Tn._currentValue,b=b.parent!==ee?{parent:ee,pool:ee}:b):b=TM(),G={baseLanes:G.baseLanes|u,cachePool:b}),p.memoizedState=G,p.childLanes=_C(i,M,u),s.memoizedState=TC,Bg(i.child,p)):(Ku(s),u=i.child,i=u.sibling,u=Rl(u,{mode:"visible",children:p.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 NC(i,s){return s=gw({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function gw(i,s){return i=Qi(22,i,null,s),i.lanes=0,i}function PC(i,s,u){return Nd(s,i.child,null,u),i=NC(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function VT(i,s,u){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Zk(i.return,s,u)}function RC(i,s,u,p,b,E){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:b,treeForkCount:E}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=b,M.treeForkCount=E)}function GT(i,s,u){var p=s.pendingProps,b=p.revealOrder,E=p.tail;p=p.children;var M=Sn.current,G=(M&2)!==0;if(G?(M=M&1|2,s.flags|=128):M&=1,X(Sn,M),wa(i,s,p,u),p=ir?vg:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&VT(i,u,s);else if(i.tag===19)VT(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&&aw(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),RC(s,!1,b,u,E,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&aw(i)===null){s.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}RC(s,!0,u,null,E,p);break;case"together":RC(s,!1,null,null,void 0,p);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(sm(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=Rl(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=Rl(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function OC(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Qy(i)))}function cY(i,s,u){switch(s.tag){case 3:me(s,s.stateNode.containerInfo),Wu(s,Tn,i.memoizedState.cache),Bd();break;case 27:case 5:he(s);break;case 4:me(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,cC(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Ku(s),s.flags|=128,null):(u&s.child.childLanes)!==0?UT(i,s,u):(Ku(s),i=Wl(i,s,u),i!==null?i.sibling:null);Ku(s);break;case 19:var b=(i.flags&128)!==0;if(p=(u&s.childLanes)!==0,p||(sm(i,s,u,!1),p=(u&s.childLanes)!==0),b){if(p)return GT(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),p)break;return null;case 22:return s.lanes=0,OT(i,s,u,s.pendingProps);case 24:Wu(s,Tn,i.memoizedState.cache)}return Wl(i,s,u)}function KT(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)_n=!0;else{if(!OC(i,u)&&(s.flags&128)===0)return _n=!1,cY(i,s,u);_n=(i.flags&131072)!==0}else _n=!1,ir&&(s.flags&1048576)!==0&&FM(s,vg,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=jd(s.elementType),s.type=i,typeof i=="function")Wk(i)?(p=Rd(i,p),s.tag=1,s=qT(null,s,i,p,u)):(s.tag=0,s=MC(null,s,i,p,u));else{if(i!=null){var b=i.$$typeof;if(b===A){s.tag=11,s=NT(null,s,i,p,u);break e}else if(b===$){s.tag=14,s=PT(null,s,i,p,u);break e}}throw s=L(i)||i,Error(a(306,s,""))}}return s;case 0:return MC(i,s,s.type,s.pendingProps,u);case 1:return p=s.type,b=Rd(p,s.pendingProps),qT(i,s,p,b,u);case 3:e:{if(me(s,s.stateNode.containerInfo),i===null)throw Error(a(387));p=s.pendingProps;var E=s.memoizedState;b=E.element,iC(i,s),Sg(s,p,null,u);var M=s.memoizedState;if(p=M.cache,Wu(s,Tn,p),p!==E.cache&&Jk(s,[Tn],u,!0),Cg(),p=M.element,E.isDehydrated)if(E={element:p,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=E,s.memoizedState=E,s.flags&256){s=WT(i,s,p,u);break e}else if(p!==b){b=Co(Error(a(424)),s),bg(b),s=WT(i,s,p,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),ba=s,ir=!0,Hu=null,Do=!0,u=OM(s,null,p,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Bd(),p===b){s=Wl(i,s,u);break e}wa(i,s,p,u)}s=s.child}return s;case 26:return hw(i,s),i===null?(u=s_(s.type,null,s.pendingProps,null))?s.memoizedState=u:ir||(u=s.type,i=s.pendingProps,p=jw(J.current).createElement(u),p[Xt]=s,p[zr]=i,xa(p,u,i),ur(p),s.stateNode=p):s.memoizedState=s_(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return he(s),i===null&&ir&&(p=s.stateNode=a_(s.type,s.pendingProps,J.current),ba=s,Do=!0,b=en,nc(s.type)?(g8=b,en=Ao(p.firstChild)):en=b),wa(i,s,s.pendingProps.children,u),hw(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&ir&&((b=p=en)&&(p=RY(p,s.type,s.pendingProps,Do),p!==null?(s.stateNode=p,ba=s,en=Ao(p.firstChild),Do=!1,b=!0):b=!1),b||qu(s)),he(s),b=s.type,E=s.pendingProps,M=i!==null?i.memoizedProps:null,p=E.children,d8(b,E)?p=null:M!==null&&d8(b,M)&&(s.flags|=32),s.memoizedState!==null&&(b=fC(i,s,tY,null,null,u),Ug._currentValue=b),hw(i,s),wa(i,s,p,u),s.child;case 6:return i===null&&ir&&((i=u=en)&&(u=OY(u,s.pendingProps,Do),u!==null?(s.stateNode=u,ba=s,en=null,i=!0):i=!1),i||qu(s)),null;case 13:return UT(i,s,u);case 4:return me(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=Nd(s,null,p,u):wa(i,s,p,u),s.child;case 11:return NT(i,s,s.type,s.pendingProps,u);case 7:return wa(i,s,s.pendingProps,u),s.child;case 8:return wa(i,s,s.pendingProps.children,u),s.child;case 12:return wa(i,s,s.pendingProps.children,u),s.child;case 10:return p=s.pendingProps,Wu(s,s.type,p.value),wa(i,s,p.children,u),s.child;case 9:return b=s.type._context,p=s.pendingProps.children,Md(s),b=ya(b),p=p(b),s.flags|=1,wa(i,s,p,u),s.child;case 14:return PT(i,s,s.type,s.pendingProps,u);case 15:return RT(i,s,s.type,s.pendingProps,u);case 19:return GT(i,s,u);case 31:return uY(i,s,u);case 22:return OT(i,s,u,s.pendingProps);case 24:return Md(s),p=ya(Tn),i===null?(b=rC(),b===null&&(b=Lr,E=eC(),b.pooledCache=E,E.refCount++,E!==null&&(b.pooledCacheLanes|=u),b=E),s.memoizedState={parent:p,cache:b},aC(s),Wu(s,Tn,b)):((i.lanes&u)!==0&&(iC(i,s),Sg(s,null,null,u),Cg()),b=i.memoizedState,E=s.memoizedState,b.parent!==p?(b={parent:p,cache:p},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),Wu(s,Tn,p)):(p=E.cache,Wu(s,Tn,p),p!==b.cache&&Jk(s,[Tn],u,!0))),wa(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function Ul(i){i.flags|=4}function zC(i,s,u,p,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=ew,nC}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,!f_(s))if(xj())i.flags|=8192;else throw _d=ew,nC}function vw(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?ot():536870912,i.lanes|=s,ym|=s)}function Ig(i,s){if(!ir)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 p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function tn(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(s)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=p,i.childLanes=u,s}function dY(i,s,u){var p=s.pendingProps;switch(Kk(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,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),Ll(Tn),le(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(om(s)?Ul(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Qk())),tn(s),null;case 26:var b=s.type,E=s.memoizedState;return i===null?(Ul(s),E!==null?(tn(s),XT(s,E)):(tn(s),zC(s,b,null,p,u))):E?E!==i.memoizedState?(Ul(s),tn(s),XT(s,E)):(tn(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&Ul(s),tn(s),zC(s,b,i,p,u)),null;case 27:if(ae(s),u=J.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Ul(s);else{if(!p){if(s.stateNode===null)throw Error(a(166));return tn(s),null}i=Y.current,om(s)?AM(s,i):(i=a_(b,p,u),s.stateNode=i,Ul(s))}return tn(s),null;case 5:if(ae(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&Ul(s);else{if(!p){if(s.stateNode===null)throw Error(a(166));return tn(s),null}if(E=Y.current,om(s))AM(s,E);else{var M=jw(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 p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?E.multiple=!0:p.size&&(E.size=p.size);break;default:E=typeof p.is=="string"?M.createElement(b,{is:p.is}):M.createElement(b)}}E[Xt]=s,E[zr]=p;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(xa(E,b,p),b){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Ul(s)}}return tn(s),zC(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&Ul(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(a(166));if(i=J.current,om(s)){if(i=s.stateNode,u=s.memoizedProps,p=null,b=ba,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}i[Xt]=s,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||Gj(i.nodeValue,u)),i||qu(s,!0)}else i=jw(i).createTextNode(p),i[Xt]=s,s.stateNode=i}return tn(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(p=om(s),u!==null){if(i===null){if(!p)throw Error(a(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Xt]=s}else Bd(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;tn(s),i=!1}else u=Qk(),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(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=om(s),p!==null&&p.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[Xt]=s}else Bd(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;tn(s),b=!1}else b=Qk(),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=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=s.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),E=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(E=p.memoizedState.cachePool.pool),E!==b&&(p.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),vw(s,s.updateQueue),tn(s),null);case 4:return le(),i===null&&o8(s.stateNode.containerInfo),tn(s),null;case 10:return Ll(s.type),tn(s),null;case 19:if(U(Sn),p=s.memoizedState,p===null)return tn(s),null;if(b=(s.flags&128)!==0,E=p.rendering,E===null)if(b)Ig(p,!1);else{if(yn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=aw(i),E!==null){for(s.flags|=128,Ig(p,!1),i=E.updateQueue,s.updateQueue=i,vw(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),ir&&Ol(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&Ie()>Ew&&(s.flags|=128,b=!0,Ig(p,!1),s.lanes=4194304)}else{if(!b)if(i=aw(E),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,vw(s,i),Ig(p,!0),p.tail===null&&p.tailMode==="hidden"&&!E.alternate&&!ir)return tn(s),null}else 2*Ie()-p.renderingStartTime>Ew&&u!==536870912&&(s.flags|=128,b=!0,Ig(p,!1),s.lanes=4194304);p.isBackwards?(E.sibling=s.child,s.child=E):(i=p.last,i!==null?i.sibling=E:s.child=E,p.last=E)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Ie(),i.sibling=null,u=Sn.current,X(Sn,b?u&1|2:u&1),ir&&Ol(s,p.treeForkCount),i):(tn(s),null);case 22:case 23:return Zi(s),uC(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(u&536870912)!==0&&(s.flags&128)===0&&(tn(s),s.subtreeFlags&6&&(s.flags|=8192)):tn(s),u=s.updateQueue,u!==null&&vw(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==u&&(s.flags|=2048),i!==null&&U(Td),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Ll(Tn),tn(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function fY(i,s){switch(Kk(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ll(Tn),le(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return ae(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 U(Sn),null;case 4:return le(),null;case 10:return Ll(s.type),null;case 22:case 23:return Zi(s),uC(),i!==null&&U(Td),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return Ll(Tn),null;case 25:return null;default:return null}}function QT(i,s){switch(Kk(s),s.tag){case 3:Ll(Tn),le();break;case 26:case 27:case 5:ae(s);break;case 4:le();break;case 31:s.memoizedState!==null&&Zi(s);break;case 13:Zi(s);break;case 19:U(Sn);break;case 10:Ll(s.type);break;case 22:case 23:Zi(s),uC(),i!==null&&U(Td);break;case 24:Ll(Tn)}}function Mg(i,s){try{var u=s.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){p=void 0;var E=u.create,M=u.inst;p=E(),M.destroy=p}u=u.next}while(u!==b)}}catch(G){Ir(s,s.return,G)}}function Qu(i,s,u){try{var p=s.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var E=b.next;p=E;do{if((p.tag&i)===i){var M=p.inst,G=M.destroy;if(G!==void 0){M.destroy=void 0,b=s;var ee=u,fe=G;try{fe()}catch(be){Ir(b,ee,be)}}}p=p.next}while(p!==E)}}catch(be){Ir(s,s.return,be)}}function YT(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{LM(s,u)}catch(p){Ir(i,i.return,p)}}}function ZT(i,s,u){u.props=Rd(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){Ir(i,s,p)}}function Tg(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(b){Ir(i,s,b)}}function qs(i,s){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}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,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(b){Ir(i,i.return,b)}}function LC(i,s,u){try{var p=i.stateNode;MY(p,i.type,u,s),p[zr]=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 HC(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 qC(i,s,u){var p=i.tag;if(p===5||p===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=Nl));else if(p!==4&&(p===27&&nc(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(qC(i,s,u),i=i.sibling;i!==null;)qC(i,s,u),i=i.sibling}function bw(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(p!==4&&(p===27&&nc(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(bw(i,s,u),i=i.sibling;i!==null;)bw(i,s,u),i=i.sibling}function tj(i){var s=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);xa(s,p,u),s[Xt]=i,s[zr]=u}catch(E){Ir(i,i.return,E)}}var Vl=!1,Nn=!1,WC=!1,rj=typeof WeakSet=="function"?WeakSet:Set,la=null;function pY(i,s){if(i=i.containerInfo,u8=Lw,i=mM(i),Pk(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var b=p.anchorOffset,E=p.focusNode;p=p.focusOffset;try{u.nodeType,E.nodeType}catch{u=null;break e}var M=0,G=-1,ee=-1,fe=0,be=0,xe=i,pe=null;t:for(;;){for(var ge;xe!==u||b!==0&&xe.nodeType!==3||(G=M+b),xe!==E||p!==0&&xe.nodeType!==3||(ee=M+p),xe.nodeType===3&&(M+=xe.nodeValue.length),(ge=xe.firstChild)!==null;)pe=xe,xe=ge;for(;;){if(xe===i)break t;if(pe===u&&++fe===b&&(G=M),pe===E&&++be===p&&(ee=M),(ge=xe.nextSibling)!==null)break;xe=pe,pe=xe.parentNode}xe=ge}u=G===-1||ee===-1?null:{start:G,end:ee}}else u=null}u=u||{start:0,end:0}}else u=null;for(c8={focusedElem:i,selectionRange:u},Lw=!1,la=s;la!==null;)if(s=la,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,la=i;else for(;la!==null;){switch(s=la,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,p=u.stateNode;try{var tt=Rd(u.type,b);i=p.getSnapshotBeforeUpdate(tt,E),p.__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)p8(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":p8(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,la=i;break}la=s.return}}function nj(i,s,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:Kl(i,u),p&4&&Mg(5,u);break;case 1:if(Kl(i,u),p&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(M){Ir(u,u.return,M)}else{var b=Rd(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(M){Ir(u,u.return,M)}}p&64&&YT(u),p&512&&Tg(u,u.return);break;case 3:if(Kl(i,u),p&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{LM(i,s)}catch(M){Ir(u,u.return,M)}}break;case 27:s===null&&p&4&&tj(u);case 26:case 5:Kl(i,u),s===null&&p&4&&JT(u),p&512&&Tg(u,u.return);break;case 12:Kl(i,u);break;case 31:Kl(i,u),p&4&&oj(i,u);break;case 13:Kl(i,u),p&4&&sj(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=EY.bind(null,u),zY(i,u))));break;case 22:if(p=u.memoizedState!==null||Vl,!p){s=s!==null&&s.memoizedState!==null||Nn,b=Vl;var E=Nn;Vl=p,(Nn=s)&&!E?Xl(i,u,(u.subtreeFlags&8772)!==0):Kl(i,u),Vl=b,Nn=E}break;case 30:break;default:Kl(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,xi=!1;function Gl(i,s,u){for(u=u.child;u!==null;)ij(i,s,u),u=u.sibling}function ij(i,s,u){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(at,u)}catch{}switch(u.tag){case 26:Nn||qs(u,s),Gl(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Nn||qs(u,s);var p=sn,b=xi;nc(u.type)&&(sn=u.stateNode,xi=!1),Gl(i,s,u),Hg(u.stateNode),sn=p,xi=b;break;case 5:Nn||qs(u,s);case 6:if(p=sn,b=xi,sn=null,Gl(i,s,u),sn=p,xi=b,sn!==null)if(xi)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&&(xi?(i=sn,Jj(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Dm(i)):Jj(sn,u.stateNode));break;case 4:p=sn,b=xi,sn=u.stateNode.containerInfo,xi=!0,Gl(i,s,u),sn=p,xi=b;break;case 0:case 11:case 14:case 15:Qu(2,u,s),Nn||Qu(4,u,s),Gl(i,s,u);break;case 1:Nn||(qs(u,s),p=u.stateNode,typeof p.componentWillUnmount=="function"&&ZT(u,s,p)),Gl(i,s,u);break;case 21:Gl(i,s,u);break;case 22:Nn=(p=Nn)||u.memoizedState!==null,Gl(i,s,u),Nn=p;break;default:Gl(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{Dm(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{Dm(i)}catch(u){Ir(s,s.return,u)}}function mY(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 yw(i,s){var u=mY(i);s.forEach(function(p){if(!u.has(p)){u.add(p);var b=kY.bind(null,i,p);p.then(b,b)}})}function Ei(i,s){var u=s.deletions;if(u!==null)for(var p=0;p<u.length;p++){var b=u[p],E=i,M=s,G=M;e:for(;G!==null;){switch(G.tag){case 27:if(nc(G.type)){sn=G.stateNode,xi=!1;break e}break;case 5:sn=G.stateNode,xi=!1;break e;case 3:case 4:sn=G.stateNode.containerInfo,xi=!0;break e}G=G.return}if(sn===null)throw Error(a(160));ij(E,M,b),sn=null,xi=!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,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Ei(s,i),ki(i),p&4&&(Qu(3,i,i.return),Mg(3,i),Qu(5,i,i.return));break;case 1:Ei(s,i),ki(i),p&512&&(Nn||u===null||qs(u,u.return)),p&64&&Vl&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var b=ls;if(Ei(s,i),ki(i),p&512&&(Nn||u===null||qs(u,u.return)),p&4){var E=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":E=b.getElementsByTagName("title")[0],(!E||E[lr]||E[Xt]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=b.createElement(p),b.head.insertBefore(E,b.querySelector("head > title"))),xa(E,p,u),E[Xt]=i,ur(E),p=E;break e;case"link":var M=c_("link","href",b).get(p+(u.href||""));if(M){for(var G=0;G<M.length;G++)if(E=M[G],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(G,1);break t}}E=b.createElement(p),xa(E,p,u),b.head.appendChild(E);break;case"meta":if(M=c_("meta","content",b).get(p+(u.content||""))){for(G=0;G<M.length;G++)if(E=M[G],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(G,1);break t}}E=b.createElement(p),xa(E,p,u),b.head.appendChild(E);break;default:throw Error(a(468,p))}E[Xt]=i,ur(E),p=E}i.stateNode=p}else d_(b,i.type,i.stateNode);else i.stateNode=u_(b,p,i.memoizedProps);else E!==p?(E===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):E.count--,p===null?d_(b,i.type,i.stateNode):u_(b,p,i.memoizedProps)):p===null&&i.stateNode!==null&&LC(i,i.memoizedProps,u.memoizedProps)}break;case 27:Ei(s,i),ki(i),p&512&&(Nn||u===null||qs(u,u.return)),u!==null&&p&4&&LC(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Ei(s,i),ki(i),p&512&&(Nn||u===null||qs(u,u.return)),i.flags&32){b=i.stateNode;try{Xp(b,"")}catch(tt){Ir(i,i.return,tt)}}p&4&&i.stateNode!=null&&(b=i.memoizedProps,LC(i,b,u!==null?u.memoizedProps:b)),p&1024&&(WC=!0);break;case 6:if(Ei(s,i),ki(i),p&4){if(i.stateNode===null)throw Error(a(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(tt){Ir(i,i.return,tt)}}break;case 3:if(Pw=null,b=ls,ls=_w(s.containerInfo),Ei(s,i),ls=b,ki(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Dm(s.containerInfo)}catch(tt){Ir(i,i.return,tt)}WC&&(WC=!1,uj(i));break;case 4:p=ls,ls=_w(i.stateNode.containerInfo),Ei(s,i),ki(i),ls=p;break;case 12:Ei(s,i),ki(i);break;case 31:Ei(s,i),ki(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,yw(i,p)));break;case 13:Ei(s,i),ki(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(xw=Ie()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,yw(i,p)));break;case 22:b=i.memoizedState!==null;var ee=u!==null&&u.memoizedState!==null,fe=Vl,be=Nn;if(Vl=fe||b,Nn=be||ee,Ei(s,i),Nn=be,Vl=fe,ki(i),p&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||ee||Vl||Nn||Od(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{G=ee.stateNode;var xe=ee.memoizedProps.style,pe=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;G.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).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}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,yw(i,u))));break;case 19:Ei(s,i),ki(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,yw(i,p)));break;case 30:break;case 21:break;default:Ei(s,i),ki(i)}}function ki(i){var s=i.flags;if(s&2){try{for(var u,p=i.return;p!==null;){if(ej(p)){u=p;break}p=p.return}if(u==null)throw Error(a(160));switch(u.tag){case 27:var b=u.stateNode,E=HC(i);bw(i,E,b);break;case 5:var M=u.stateNode;u.flags&32&&(Xp(M,""),u.flags&=-33);var G=HC(i);bw(i,G,M);break;case 3:case 4:var ee=u.stateNode.containerInfo,fe=HC(i);qC(i,fe,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 Kl(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)nj(i,s.alternate,s),s=s.sibling}function Od(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Qu(4,s,s.return),Od(s);break;case 1:qs(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&ZT(s,s.return,u),Od(s);break;case 27:Hg(s.stateNode);case 26:case 5:qs(s,s.return),Od(s);break;case 22:s.memoizedState===null&&Od(s);break;case 30:Od(s);break;default:Od(s)}i=i.sibling}}function Xl(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,b=i,E=s,M=E.flags;switch(E.tag){case 0:case 11:case 15:Xl(b,E,u),Mg(4,E);break;case 1:if(Xl(b,E,u),p=E,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(fe){Ir(p,p.return,fe)}if(p=E,b=p.updateQueue,b!==null){var G=p.stateNode;try{var ee=b.shared.hiddenCallbacks;if(ee!==null)for(b.shared.hiddenCallbacks=null,b=0;b<ee.length;b++)zM(ee[b],G)}catch(fe){Ir(p,p.return,fe)}}u&&M&64&&YT(E),Tg(E,E.return);break;case 27:tj(E);case 26:case 5:Xl(b,E,u),u&&p===null&&M&4&&JT(E),Tg(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),Tg(E,E.return);break;case 30:break;default:Xl(b,E,u)}s=s.sibling}}function UC(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&&yg(u))}function VC(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&yg(i))}function us(i,s,u,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)cj(i,s,u,p),s=s.sibling}function cj(i,s,u,p){var b=s.flags;switch(s.tag){case 0:case 11:case 15:us(i,s,u,p),b&2048&&Mg(9,s);break;case 1:us(i,s,u,p);break;case 3:us(i,s,u,p),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&yg(i)));break;case 12:if(b&2048){us(i,s,u,p),i=s.stateNode;try{var E=s.memoizedProps,M=E.id,G=E.onPostCommit;typeof G=="function"&&G(M,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(ee){Ir(s,s.return,ee)}}else us(i,s,u,p);break;case 31:us(i,s,u,p);break;case 13:us(i,s,u,p);break;case 23:break;case 22:E=s.stateNode,M=s.alternate,s.memoizedState!==null?E._visibility&2?us(i,s,u,p):jg(i,s):E._visibility&2?us(i,s,u,p):(E._visibility|=2,gm(i,s,u,p,(s.subtreeFlags&10256)!==0||!1)),b&2048&&UC(M,s);break;case 24:us(i,s,u,p),b&2048&&VC(s.alternate,s);break;default:us(i,s,u,p)}}function gm(i,s,u,p,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var E=i,M=s,G=u,ee=p,fe=M.flags;switch(M.tag){case 0:case 11:case 15:gm(E,M,G,ee,b),Mg(8,M);break;case 23:break;case 22:var be=M.stateNode;M.memoizedState!==null?be._visibility&2?gm(E,M,G,ee,b):jg(E,M):(be._visibility|=2,gm(E,M,G,ee,b)),b&&fe&2048&&UC(M.alternate,M);break;case 24:gm(E,M,G,ee,b),b&&fe&2048&&VC(M.alternate,M);break;default:gm(E,M,G,ee,b)}s=s.sibling}}function jg(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,p=s,b=p.flags;switch(p.tag){case 22:jg(u,p),b&2048&&UC(p.alternate,p);break;case 24:jg(u,p),b&2048&&VC(p.alternate,p);break;default:jg(u,p)}s=s.sibling}}var _g=8192;function vm(i,s,u){if(i.subtreeFlags&_g)for(i=i.child;i!==null;)dj(i,s,u),i=i.sibling}function dj(i,s,u){switch(i.tag){case 26:vm(i,s,u),i.flags&_g&&i.memoizedState!==null&&ZY(u,ls,i.memoizedState,i.memoizedProps);break;case 5:vm(i,s,u);break;case 3:case 4:var p=ls;ls=_w(i.stateNode.containerInfo),vm(i,s,u),ls=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=_g,_g=16777216,vm(i,s,u),_g=p):vm(i,s,u));break;default:vm(i,s,u)}}function fj(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 Ng(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];la=p,mj(p,i)}fj(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)pj(i),i=i.sibling}function pj(i){switch(i.tag){case 0:case 11:case 15:Ng(i),i.flags&2048&&Qu(9,i,i.return);break;case 3:Ng(i);break;case 12:Ng(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,ww(i)):Ng(i);break;default:Ng(i)}}function ww(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];la=p,mj(p,i)}fj(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Qu(8,s,s.return),ww(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,ww(s));break;default:ww(s)}i=i.sibling}}function mj(i,s){for(;la!==null;){var u=la;switch(u.tag){case 0:case 11:case 15:Qu(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:yg(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,la=p;else e:for(u=i;la!==null;){p=la;var b=p.sibling,E=p.return;if(aj(p),p===u){la=null;break e}if(b!==null){b.return=E,la=b;break e}la=E}}}var hY={getCacheForType:function(i){var s=ya(Tn),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return ya(Tn).controller.signal}},gY=typeof WeakMap=="function"?WeakMap:Map,br=0,Lr=null,Ut=null,Yt=0,Br=0,Ji=null,Yu=!1,bm=!1,GC=!1,Ql=0,yn=0,Zu=0,zd=0,KC=0,eo=0,ym=0,Pg=null,Ci=null,XC=!1,xw=0,hj=0,Ew=1/0,kw=null,Ju=null,Gn=0,ec=null,wm=null,Yl=0,QC=0,YC=null,gj=null,Rg=0,ZC=null;function to(){return(br&2)!==0&&Yt!==0?Yt&-Yt:W.T!==null?a8():Wt()}function vj(){if(eo===0)if((Yt&536870912)===0||ir){var i=$r;$r<<=1,($r&3932160)===0&&($r=262144),eo=i}else eo=536870912;return i=Yi.current,i!==null&&(i.flags|=32),eo}function Si(i,s,u){(i===Lr&&(Br===2||Br===9)||i.cancelPendingCommit!==null)&&(xm(i,0),tc(i,Yt,eo,!1)),Re(i,u),((br&2)===0||i!==Lr)&&(i===Lr&&((br&2)===0&&(zd|=u),yn===4&&tc(i,Yt,eo,!1)),Ws(i))}function bj(i,s,u){if((br&6)!==0)throw Error(a(327));var p=!u&&(s&127)===0&&(s&i.expiredLanes)===0||Cr(i,s),b=p?yY(i,s):e8(i,s,!0),E=p;do{if(b===0){bm&&!p&&tc(i,s,0,!1);break}else{if(u=i.current.alternate,E&&!vY(u)){b=e8(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 G=i;b=Pg;var ee=G.current.memoizedState.isDehydrated;if(ee&&(xm(G,M).flags|=256),M=e8(G,M,!1),M!==2){if(GC&&!ee){G.errorRecoveryDisabledLanes|=E,zd|=E,b=4;break e}E=Ci,Ci=b,E!==null&&(Ci===null?Ci=E:Ci.push.apply(Ci,E))}b=M}if(E=!1,b!==2)continue}}if(b===1){xm(i,0),tc(i,s,0,!0);break}e:{switch(p=i,E=b,E){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:tc(p,s,eo,!Yu);break e;case 2:Ci=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(b=xw+300-Ie(),10<b)){if(tc(p,s,eo,!Yu),ar(p,0,!0)!==0)break e;Yl=s,p.timeoutHandle=Yj(yj.bind(null,p,u,Ci,kw,XC,s,eo,zd,ym,Yu,E,"Throttled",-0,0),b);break e}yj(p,u,Ci,kw,XC,s,eo,zd,ym,Yu,E,null,-0,0)}}break}while(!0);Ws(i)}function yj(i,s,u,p,b,E,M,G,ee,fe,be,xe,pe,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:Nl},dj(s,E,xe);var tt=(E&62914560)===E?xw-Ie():(E&4194048)===E?hj-Ie():0;if(tt=JY(xe,tt),tt!==null){Yl=E,i.cancelPendingCommit=tt(Dj.bind(null,i,s,E,u,p,b,M,G,ee,be,xe,null,pe,ge)),tc(i,E,M,!fe);return}}Dj(i,s,E,u,p,b,M,G,ee)}function vY(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 p=0;p<u.length;p++){var b=u[p],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,p){s&=~KC,s&=~zd,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var b=s;0<b;){var E=31-rt(b),M=1<<E;p[E]=-1,b&=~M}u!==0&&it(i,u,s)}function Cw(){return(br&6)===0?(Og(0,!1),!1):!0}function JC(){if(Ut!==null){if(Br===0)var i=Ut.return;else i=Ut,zl=Id=null,hC(i),dm=null,xg=0,i=Ut;for(;i!==null;)QT(i.alternate,i),i=i.return;Ut=null}}function xm(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,_Y(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Yl=0,JC(),Lr=i,Ut=u=Rl(i.current,null),Yt=s,Br=0,Ji=null,Yu=!1,bm=Cr(i,s),GC=!1,ym=eo=KC=zd=Zu=yn=0,Ci=Pg=null,XC=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var b=31-rt(p),E=1<<b;s|=i[b],p&=~E}return Ql=s,Uy(),u}function wj(i,s){Dt=null,W.H=$g,s===cm||s===Jy?(s=NM(),Br=3):s===nC?(s=NM(),Br=4):Br=s===IC?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Ji=s,Ut===null&&(yn=1,pw(i,Co(s,i.current)))}function xj(){var i=Yi.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=$g,i===null?$g:i}function kj(){var i=W.A;return W.A=hY,i}function Sw(){yn=4,Yu||(Yt&4194048)!==Yt&&Yi.current!==null||(bm=!0),(Zu&134217727)===0&&(zd&134217727)===0||Lr===null||tc(Lr,Yt,eo,!1)}function e8(i,s,u){var p=br;br|=2;var b=Ej(),E=kj();(Lr!==i||Yt!==s)&&(kw=null,xm(i,s)),s=!1;var M=yn;e:do try{if(Br!==0&&Ut!==null){var G=Ut,ee=Ji;switch(Br){case 8:JC(),M=6;break e;case 3:case 2:case 9:case 6:Yi.current===null&&(s=!0);var fe=Br;if(Br=0,Ji=null,Em(i,G,ee,fe),u&&bm){M=0;break e}break;default:fe=Br,Br=0,Ji=null,Em(i,G,ee,fe)}}bY(),M=yn;break}catch(be){wj(i,be)}while(!0);return s&&i.shellSuspendCounter++,zl=Id=null,br=p,W.H=b,W.A=E,Ut===null&&(Lr=null,Yt=0,Uy()),M}function bY(){for(;Ut!==null;)Cj(Ut)}function yY(i,s){var u=br;br|=2;var p=Ej(),b=kj();Lr!==i||Yt!==s?(kw=null,Ew=Ie()+500,xm(i,s)):bm=Cr(i,s);e:do try{if(Br!==0&&Ut!==null){s=Ut;var E=Ji;t:switch(Br){case 1:Br=0,Ji=null,Em(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||Lr!==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,Em(i,s,E,7));break;case 5:var M=null;switch(Ut.tag){case 26:M=Ut.memoizedState;case 5:case 27:var G=Ut;if(M?f_(M):G.stateNode.complete){Br=0,Ji=null;var ee=G.sibling;if(ee!==null)Ut=ee;else{var fe=G.return;fe!==null?(Ut=fe,Fw(fe)):Ut=null}break t}}Br=0,Ji=null,Em(i,s,E,5);break;case 6:Br=0,Ji=null,Em(i,s,E,6);break;case 8:JC(),yn=6;break e;default:throw Error(a(462))}}wY();break}catch(be){wj(i,be)}while(!0);return zl=Id=null,W.H=p,W.A=b,br=u,Ut!==null?0:(Lr=null,Yt=0,Uy(),yn)}function wY(){for(;Ut!==null&&!Ve();)Cj(Ut)}function Cj(i){var s=KT(i.alternate,i,Ql);i.memoizedProps=i.pendingProps,s===null?Fw(i):Ut=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:hC(s);default:QT(u,s),s=Ut=kM(s,Ql),s=KT(u,s,Ql)}i.memoizedProps=i.pendingProps,s===null?Fw(i):Ut=s}function Em(i,s,u,p){zl=Id=null,hC(s),dm=null,xg=0;var b=s.return;try{if(lY(i,b,s,u,Yt)){yn=1,pw(i,Co(u,i.current)),Ut=null;return}}catch(E){if(b!==null)throw Ut=b,E;yn=1,pw(i,Co(u,i.current)),Ut=null;return}s.flags&32768?(ir||p===1?i=!0:bm||(Yt&536870912)!==0?i=!1:(Yu=i=!0,(p===2||p===9||p===3||p===6)&&(p=Yi.current,p!==null&&p.tag===13&&(p.flags|=16384))),Fj(s,i)):Fw(s)}function Fw(i){var s=i;do{if((s.flags&32768)!==0){Fj(s,Yu);return}i=s.return;var u=dY(s.alternate,s,Ql);if(u!==null){Ut=u;return}if(s=s.sibling,s!==null){Ut=s;return}Ut=s=i}while(s!==null);yn===0&&(yn=5)}function Fj(i,s){do{var u=fY(i.alternate,i);if(u!==null){u.flags&=32767,Ut=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){Ut=i;return}Ut=i=u}while(i!==null);yn=6,Ut=null}function Dj(i,s,u,p,b,E,M,G,ee){i.cancelPendingCommit=null;do Dw();while(Gn!==0);if((br&6)!==0)throw Error(a(327));if(s!==null){if(s===i.current)throw Error(a(177));if(E=s.lanes|s.childLanes,E|=Hk,Ye(i,u,E,M,G,ee),i===Lr&&(Ut=Lr=null,Yt=0),wm=s,ec=i,Yl=u,QC=E,YC=b,gj=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,CY(et,function(){return Mj(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=W.T,W.T=null,b=z.p,z.p=2,M=br,br|=4;try{pY(i,s,u)}finally{br=M,z.p=b,W.T=p}}Gn=1,Aj(),$j(),Bj()}}function Aj(){if(Gn===1){Gn=0;var i=ec,s=wm,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=W.T,W.T=null;var p=z.p;z.p=2;var b=br;br|=4;try{lj(s,i);var E=c8,M=mM(i.containerInfo),G=E.focusedElem,ee=E.selectionRange;if(M!==G&&G&&G.ownerDocument&&pM(G.ownerDocument.documentElement,G)){if(ee!==null&&Pk(G)){var fe=ee.start,be=ee.end;if(be===void 0&&(be=fe),"selectionStart"in G)G.selectionStart=fe,G.selectionEnd=Math.min(be,G.value.length);else{var xe=G.ownerDocument||document,pe=xe&&xe.defaultView||window;if(pe.getSelection){var ge=pe.getSelection(),tt=G.textContent.length,ht=Math.min(ee.start,tt),Nr=ee.end===void 0?ht:Math.min(ee.end,tt);!ge.extend&&ht>Nr&&(M=Nr,Nr=ht,ht=M);var ue=fM(G,ht),ie=fM(G,Nr);if(ue&&ie&&(ge.rangeCount!==1||ge.anchorNode!==ue.node||ge.anchorOffset!==ue.offset||ge.focusNode!==ie.node||ge.focusOffset!==ie.offset)){var de=xe.createRange();de.setStart(ue.node,ue.offset),ge.removeAllRanges(),ht>Nr?(ge.addRange(de),ge.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ge.addRange(de))}}}}for(xe=[],ge=G;ge=ge.parentNode;)ge.nodeType===1&&xe.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<xe.length;G++){var we=xe[G];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}Lw=!!u8,c8=u8=null}finally{br=b,z.p=p,W.T=u}}i.current=s,Gn=2}}function $j(){if(Gn===2){Gn=0;var i=ec,s=wm,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=W.T,W.T=null;var p=z.p;z.p=2;var b=br;br|=4;try{nj(i,s.alternate,s)}finally{br=b,z.p=p,W.T=u}}Gn=3}}function Bj(){if(Gn===4||Gn===3){Gn=0,qe();var i=ec,s=wm,u=Yl,p=gj;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Gn=5:(Gn=0,wm=ec=null,Ij(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(Ju=null),qt(u),s=s.stateNode,Ge&&typeof Ge.onCommitFiberRoot=="function")try{Ge.onCommitFiberRoot(at,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=W.T,b=z.p,z.p=2,W.T=null;try{for(var E=i.onRecoverableError,M=0;M<p.length;M++){var G=p[M];E(G.value,{componentStack:G.stack})}}finally{W.T=s,z.p=b}}(Yl&3)!==0&&Dw(),Ws(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===ZC?Rg++:(Rg=0,ZC=i):Rg=0,Og(0,!1)}}function Ij(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,yg(s)))}function Dw(){return Aj(),$j(),Bj(),Mj()}function Mj(){if(Gn!==5)return!1;var i=ec,s=QC;QC=0;var u=qt(Yl),p=W.T,b=z.p;try{z.p=32>u?32:u,W.T=null,u=YC,YC=null;var E=ec,M=Yl;if(Gn=0,wm=ec=null,Yl=0,(br&6)!==0)throw Error(a(331));var G=br;if(br|=4,pj(E.current),cj(E,E.current,M,u),br=G,Og(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(at,E)}catch{}return!0}finally{z.p=b,W.T=p,Ij(i,s)}}function Tj(i,s,u){s=Co(u,s),s=BC(i.stateNode,s,2),i=Gu(i,s,2),i!==null&&(Re(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 p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ju===null||!Ju.has(p))){i=Co(u,i),u=jT(2),p=Gu(s,u,2),p!==null&&(_T(u,p,s,i),Re(p,2),Ws(p));break}}s=s.return}}function t8(i,s,u){var p=i.pingCache;if(p===null){p=i.pingCache=new gY;var b=new Set;p.set(s,b)}else b=p.get(s),b===void 0&&(b=new Set,p.set(s,b));b.has(u)||(GC=!0,b.add(u),i=xY.bind(null,i,s,u),s.then(i,i))}function xY(i,s,u){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Lr===i&&(Yt&u)===u&&(yn===4||yn===3&&(Yt&62914560)===Yt&&300>Ie()-xw?(br&2)===0&&xm(i,0):KC|=u,ym===Yt&&(ym=0)),Ws(i)}function jj(i,s){s===0&&(s=ot()),i=Ad(i,s),i!==null&&(Re(i,s),Ws(i))}function EY(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),jj(i,u)}function kY(i,s){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(a(314))}p!==null&&p.delete(s),jj(i,u)}function CY(i,s){return Be(i,s)}var Aw=null,km=null,r8=!1,$w=!1,n8=!1,rc=0;function Ws(i){i!==km&&i.next===null&&(km===null?Aw=km=i:km=km.next=i),$w=!0,r8||(r8=!0,FY())}function Og(i,s){if(!n8&&$w){n8=!0;do for(var u=!1,p=Aw;p!==null;){if(!s)if(i!==0){var b=p.pendingLanes;if(b===0)var E=0;else{var M=p.suspendedLanes,G=p.pingedLanes;E=(1<<31-rt(42|i)+1)-1,E&=b&~(M&~G),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(u=!0,Rj(p,E))}else E=Yt,E=ar(p,p===Lr?E:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(E&3)===0||Cr(p,E)||(u=!0,Rj(p,E));p=p.next}while(u);n8=!1}}function SY(){_j()}function _j(){$w=r8=!1;var i=0;rc!==0&&jY()&&(i=rc);for(var s=Ie(),u=null,p=Aw;p!==null;){var b=p.next,E=Nj(p,s);E===0?(p.next=null,u===null?Aw=b:u.next=b,b===null&&(km=u)):(u=p,(i!==0||(E&3)!==0)&&($w=!0)),p=b}Gn!==0&&Gn!==5||Og(i,!1),rc!==0&&(rc=0)}function Nj(i,s){for(var u=i.suspendedLanes,p=i.pingedLanes,b=i.expirationTimes,E=i.pendingLanes&-62914561;0<E;){var M=31-rt(E),G=1<<M,ee=b[M];ee===-1?((G&u)===0||(G&p)!==0)&&(b[M]=Ot(G,s)):ee<=s&&(i.expiredLanes|=G),E&=~G}if(s=Lr,u=Yt,u=ar(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===s&&(Br===2||Br===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Me(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Cr(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(p!==null&&Me(p),qt(u)){case 2:case 8:u=gt;break;case 32:u=et;break;case 268435456:u=Fe;break;default:u=et}return p=Pj.bind(null,i),u=Be(u,p),i.callbackPriority=s,i.callbackNode=u,s}return p!==null&&p!==null&&Me(p),i.callbackPriority=2,i.callbackNode=null,2}function Pj(i,s){if(Gn!==0&&Gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Dw()&&i.callbackNode!==u)return null;var p=Yt;return p=ar(i,i===Lr?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(bj(i,p,s),Nj(i,Ie()),i.callbackNode!=null&&i.callbackNode===u?Pj.bind(null,i):null)}function Rj(i,s){if(Dw())return null;bj(i,s,!0)}function FY(){NY(function(){(br&6)!==0?Be(Je,SY):_j()})}function a8(){if(rc===0){var i=lm;i===0&&(i=Ht,Ht<<=1,(Ht&261888)===0&&(Ht=256)),rc=i}return rc}function Oj(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ny(""+i)}function zj(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 DY(i,s,u,p,b){if(s==="submit"&&u&&u.stateNode===b){var E=Oj((b[zr]||null).action),M=p.submitter;M&&(s=(s=M[zr]||null)?Oj(s.formAction):M.getAttribute("formAction"),s!==null&&(E=s,M=null));var G=new zy("action","action",null,p,b);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(rc!==0){var ee=M?zj(b,M):new FormData(b);CC(u,{pending:!0,data:ee,method:b.method,action:E},null,ee)}}else typeof E=="function"&&(G.preventDefault(),ee=M?zj(b,M):new FormData(b),CC(u,{pending:!0,data:ee,method:b.method,action:E},E,ee))},currentTarget:b}]})}}for(Iw=0;Iw<Lk.length;Iw++)Bw=Lk[Iw],Lj=Bw.toLowerCase(),Hj=Bw[0].toUpperCase()+Bw.slice(1),os(Lj,"on"+Hj);var Bw,Lj,Hj,Iw;os(vM,"onAnimationEnd"),os(bM,"onAnimationIteration"),os(yM,"onAnimationStart"),os("dblclick","onDoubleClick"),os("focusin","onFocus"),os("focusout","onBlur"),os(UQ,"onTransitionRun"),os(VQ,"onTransitionStart"),os(GQ,"onTransitionCancel"),os(wM,"onTransitionEnd"),mt("onMouseEnter",["mouseout","mouseover"]),mt("onMouseLeave",["mouseout","mouseover"]),mt("onPointerEnter",["pointerout","pointerover"]),mt("onPointerLeave",["pointerout","pointerover"]),ga("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ga("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ga("onBeforeInput",["compositionend","keypress","textInput","paste"]),ga("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ga("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ga("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zg="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(" "),AY=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zg));function qj(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],b=p.event;p=p.listeners;e:{var E=void 0;if(s)for(var M=p.length-1;0<=M;M--){var G=p[M],ee=G.instance,fe=G.currentTarget;if(G=G.listener,ee!==E&&b.isPropagationStopped())break e;E=G,b.currentTarget=fe;try{E(b)}catch(be){Wy(be)}b.currentTarget=null,E=ee}else for(M=0;M<p.length;M++){if(G=p[M],ee=G.instance,fe=G.currentTarget,G=G.listener,ee!==E&&b.isPropagationStopped())break e;E=G,b.currentTarget=fe;try{E(b)}catch(be){Wy(be)}b.currentTarget=null,E=ee}}}}function Vt(i,s){var u=s[Mt];u===void 0&&(u=s[Mt]=new Set);var p=i+"__bubble";u.has(p)||(Wj(s,i,2,!1),u.add(p))}function i8(i,s,u){var p=0;s&&(p|=4),Wj(u,i,p,s)}var Mw="_reactListening"+Math.random().toString(36).slice(2);function o8(i){if(!i[Mw]){i[Mw]=!0,bi.forEach(function(u){u!=="selectionchange"&&(AY.has(u)||i8(u,!1,i),i8(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Mw]||(s[Mw]=!0,i8("selectionchange",!1,s))}}function Wj(i,s,u,p){switch(y_(s)){case 2:var b=rZ;break;case 8:b=nZ;break;default:b=x8}u=b.bind(null,s,u,i),b=void 0,!Ak||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),p?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 s8(i,s,u,p,b){var E=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var G=p.stateNode.containerInfo;if(G===b)break;if(M===4)for(M=p.return;M!==null;){var ee=M.tag;if((ee===3||ee===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;G!==null;){if(M=Na(G),M===null)return;if(ee=M.tag,ee===5||ee===6||ee===26||ee===27){p=E=M;continue e}G=G.parentNode}}p=p.return}KI(function(){var fe=E,be=Fk(u),xe=[];e:{var pe=xM.get(i);if(pe!==void 0){var ge=zy,tt=i;switch(i){case"keypress":if(Ry(u)===0)break e;case"keydown":case"keyup":ge=kQ;break;case"focusin":tt="focus",ge=Mk;break;case"focusout":tt="blur",ge=Mk;break;case"beforeblur":case"afterblur":ge=Mk;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=YI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=dQ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=FQ;break;case vM:case bM:case yM:ge=mQ;break;case wM:ge=AQ;break;case"scroll":case"scrollend":ge=uQ;break;case"wheel":ge=BQ;break;case"copy":case"cut":case"paste":ge=gQ;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=MQ}var ht=(s&4)!==0,Nr=!ht&&(i==="scroll"||i==="scrollend"),ue=ht?pe!==null?pe+"Capture":null:pe;ht=[];for(var ie=fe,de;ie!==null;){var we=ie;if(de=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||de===null||ue===null||(we=ug(ie,ue),we!=null&&ht.push(Lg(ie,we,de))),Nr)break;ie=ie.return}0<ht.length&&(pe=new ge(pe,tt,null,u,be),xe.push({event:pe,listeners:ht}))}}if((s&7)===0){e:{if(pe=i==="mouseover"||i==="pointerover",ge=i==="mouseout"||i==="pointerout",pe&&u!==Sk&&(tt=u.relatedTarget||u.fromElement)&&(Na(tt)||tt[pt]))break e;if((ge||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ge?(tt=u.relatedTarget||u.toElement,ge=fe,tt=tt?Na(tt):null,tt!==null&&(Nr=l(tt),ht=tt.tag,tt!==Nr||ht!==5&&ht!==27&&ht!==6)&&(tt=null)):(ge=null,tt=fe),ge!==tt)){if(ht=YI,we="onMouseLeave",ue="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(ht=JI,we="onPointerLeave",ue="onPointerEnter",ie="pointer"),Nr=ge==null?pe:Mn(ge),de=tt==null?pe:Mn(tt),pe=new ht(we,ie+"leave",ge,u,be),pe.target=Nr,pe.relatedTarget=de,we=null,Na(be)===fe&&(ht=new ht(ue,ie+"enter",tt,u,be),ht.target=de,ht.relatedTarget=Nr,we=ht),Nr=we,ge&&tt)t:{for(ht=$Y,ue=ge,ie=tt,de=0,we=ue;we;we=ht(we))de++;we=0;for(var st=ie;st;st=ht(st))we++;for(;0<de-we;)ue=ht(ue),de--;for(;0<we-de;)ie=ht(ie),we--;for(;de--;){if(ue===ie||ie!==null&&ue===ie.alternate){ht=ue;break t}ue=ht(ue),ie=ht(ie)}ht=null}else ht=null;ge!==null&&Uj(xe,pe,ge,ht,!1),tt!==null&&Nr!==null&&Uj(xe,Nr,tt,ht,!0)}}e:{if(pe=fe?Mn(fe):window,ge=pe.nodeName&&pe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&pe.type==="file")var hr=sM;else if(iM(pe))if(lM)hr=HQ;else{hr=zQ;var nt=OQ}else ge=pe.nodeName,!ge||ge.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?fe&&Ck(fe.elementType)&&(hr=sM):hr=LQ;if(hr&&(hr=hr(i,fe))){oM(xe,hr,u,be);break e}nt&&nt(i,pe,fe),i==="focusout"&&fe&&pe.type==="number"&&fe.memoizedProps.value!=null&&lg(pe,"number",pe.value)}switch(nt=fe?Mn(fe):window,i){case"focusin":(iM(nt)||nt.contentEditable==="true")&&(em=nt,Rk=fe,gg=null);break;case"focusout":gg=Rk=em=null;break;case"mousedown":Ok=!0;break;case"contextmenu":case"mouseup":case"dragend":Ok=!1,hM(xe,u,be);break;case"selectionchange":if(WQ)break;case"keydown":case"keyup":hM(xe,u,be)}var Tt;if(jk)e:{switch(i){case"compositionstart":var Zt="onCompositionStart";break e;case"compositionend":Zt="onCompositionEnd";break e;case"compositionupdate":Zt="onCompositionUpdate";break e}Zt=void 0}else Jp?nM(i,u)&&(Zt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Zt="onCompositionStart");Zt&&(eM&&u.locale!=="ko"&&(Jp||Zt!=="onCompositionStart"?Zt==="onCompositionEnd"&&Jp&&(Tt=XI()):(zu=be,$k="value"in zu?zu.value:zu.textContent,Jp=!0)),nt=Tw(fe,Zt),0<nt.length&&(Zt=new ZI(Zt,i,null,u,be),xe.push({event:Zt,listeners:nt}),Tt?Zt.data=Tt:(Tt=aM(u),Tt!==null&&(Zt.data=Tt)))),(Tt=jQ?_Q(i,u):NQ(i,u))&&(Zt=Tw(fe,"onBeforeInput"),0<Zt.length&&(nt=new ZI("onBeforeInput","beforeinput",null,u,be),xe.push({event:nt,listeners:Zt}),nt.data=Tt)),DY(xe,i,fe,u,be)}qj(xe,s)})}function Lg(i,s,u){return{instance:i,listener:s,currentTarget:u}}function Tw(i,s){for(var u=s+"Capture",p=[];i!==null;){var b=i,E=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||E===null||(b=ug(i,u),b!=null&&p.unshift(Lg(i,b,E)),b=ug(i,s),b!=null&&p.push(Lg(i,b,E))),i.tag===3)return p;i=i.return}return[]}function $Y(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Uj(i,s,u,p,b){for(var E=s._reactName,M=[];u!==null&&u!==p;){var G=u,ee=G.alternate,fe=G.stateNode;if(G=G.tag,ee!==null&&ee===p)break;G!==5&&G!==26&&G!==27||fe===null||(ee=fe,b?(fe=ug(u,E),fe!=null&&M.unshift(Lg(u,fe,ee))):b||(fe=ug(u,E),fe!=null&&M.push(Lg(u,fe,ee)))),u=u.return}M.length!==0&&i.push({event:s,listeners:M})}var BY=/\r\n?/g,IY=/\u0000|\uFFFD/g;function Vj(i){return(typeof i=="string"?i:""+i).replace(BY,`
|
|
11
|
+
`).replace(IY,"")}function Gj(i,s){return s=Vj(s),Vj(i)===s}function _r(i,s,u,p,b,E){switch(u){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Xp(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Xp(i,""+p);break;case"className":zs(i,"class",p);break;case"tabIndex":zs(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":zs(i,u,p);break;case"style":VI(i,p,E);break;case"data":if(s!=="object"){zs(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Ny(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="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(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Ny(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Nl);break;case"onScroll":p!=null&&Vt("scroll",i);break;case"onScrollEnd":p!=null&&Vt("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(a(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(a(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=Ny(""+p),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":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":Vt("beforetoggle",i),Vt("toggle",i),is(i,"popover",p);break;case"xlinkActuate":yi(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":yi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":yi(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":yi(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":yi(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":yi(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":yi(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":yi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":yi(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":is(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=sQ.get(u)||u,is(i,u,p))}}function l8(i,s,u,p,b,E){switch(u){case"style":VI(i,p,E);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(a(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(a(60));i.innerHTML=u}}break;case"children":typeof p=="string"?Xp(i,p):(typeof p=="number"||typeof p=="bigint")&&Xp(i,""+p);break;case"onScroll":p!=null&&Vt("scroll",i);break;case"onScrollEnd":p!=null&&Vt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Nl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gi.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[zr]||null,E=E!=null?E[u]:null,typeof E=="function"&&i.removeEventListener(s,E,b),typeof p=="function")){typeof E!="function"&&E!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,p,b);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):is(i,u,p)}}}function xa(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 p=!1,b=!1,E;for(E in u)if(u.hasOwnProperty(E)){var M=u[E];if(M!=null)switch(E){case"src":p=!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),p&&_r(i,s,"src",u.src,u,null);return;case"input":Vt("invalid",i);var G=E=M=b=null,ee=null,fe=null;for(p in u)if(u.hasOwnProperty(p)){var be=u[p];if(be!=null)switch(p){case"name":b=be;break;case"type":M=be;break;case"checked":ee=be;break;case"defaultChecked":fe=be;break;case"value":E=be;break;case"defaultValue":G=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(a(137,s));break;default:_r(i,s,p,be,u,null)}}sg(i,E,G,ee,fe,M,b,!1);return;case"select":Vt("invalid",i),p=M=E=null;for(b in u)if(u.hasOwnProperty(b)&&(G=u[b],G!=null))switch(b){case"value":E=G;break;case"defaultValue":M=G;break;case"multiple":p=G;default:_r(i,s,b,G,u,null)}s=E,u=M,i.multiple=!!p,s!=null?Kp(i,!!p,s,!1):u!=null&&Kp(i,!!p,u,!0);return;case"textarea":Vt("invalid",i),E=b=p=null;for(M in u)if(u.hasOwnProperty(M)&&(G=u[M],G!=null))switch(M){case"value":p=G;break;case"defaultValue":b=G;break;case"children":E=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(91));break;default:_r(i,s,M,G,u,null)}WI(i,p,b,E);return;case"option":for(ee in u)u.hasOwnProperty(ee)&&(p=u[ee],p!=null)&&(ee==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":_r(i,s,ee,p,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(p=0;p<zg.length;p++)Vt(zg[p],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(fe in u)if(u.hasOwnProperty(fe)&&(p=u[fe],p!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:_r(i,s,fe,p,u,null)}return;default:if(Ck(s)){for(be in u)u.hasOwnProperty(be)&&(p=u[be],p!==void 0&&l8(i,s,be,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&_r(i,s,G,p,u,null))}function MY(i,s,u,p){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,G=null,ee=null,fe=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:p.hasOwnProperty(ge)||_r(i,s,ge,null,p,xe)}}for(var pe in p){var ge=p[pe];if(xe=u[pe],p.hasOwnProperty(pe)&&(ge!=null||xe!=null))switch(pe){case"type":E=ge;break;case"name":b=ge;break;case"checked":fe=ge;break;case"defaultChecked":be=ge;break;case"value":M=ge;break;case"defaultValue":G=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(a(137,s));break;default:ge!==xe&&_r(i,s,pe,ge,p,xe)}}Gp(i,M,G,ee,fe,be,E,b);return;case"select":ge=M=G=pe=null;for(E in u)if(ee=u[E],u.hasOwnProperty(E)&&ee!=null)switch(E){case"value":break;case"multiple":ge=ee;default:p.hasOwnProperty(E)||_r(i,s,E,null,p,ee)}for(b in p)if(E=p[b],ee=u[b],p.hasOwnProperty(b)&&(E!=null||ee!=null))switch(b){case"value":pe=E;break;case"defaultValue":G=E;break;case"multiple":M=E;default:E!==ee&&_r(i,s,b,E,p,ee)}s=G,u=M,p=ge,pe!=null?Kp(i,!!u,pe,!1):!!p!=!!u&&(s!=null?Kp(i,!!u,s,!0):Kp(i,!!u,u?[]:"",!1));return;case"textarea":ge=pe=null;for(G in u)if(b=u[G],u.hasOwnProperty(G)&&b!=null&&!p.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:_r(i,s,G,null,p,b)}for(M in p)if(b=p[M],E=u[M],p.hasOwnProperty(M)&&(b!=null||E!=null))switch(M){case"value":pe=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,p,E)}qI(i,pe,ge);return;case"option":for(var tt in u)pe=u[tt],u.hasOwnProperty(tt)&&pe!=null&&!p.hasOwnProperty(tt)&&(tt==="selected"?i.selected=!1:_r(i,s,tt,null,p,pe));for(ee in p)pe=p[ee],ge=u[ee],p.hasOwnProperty(ee)&&pe!==ge&&(pe!=null||ge!=null)&&(ee==="selected"?i.selected=pe&&typeof pe!="function"&&typeof pe!="symbol":_r(i,s,ee,pe,p,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)pe=u[ht],u.hasOwnProperty(ht)&&pe!=null&&!p.hasOwnProperty(ht)&&_r(i,s,ht,null,p,pe);for(fe in p)if(pe=p[fe],ge=u[fe],p.hasOwnProperty(fe)&&pe!==ge&&(pe!=null||ge!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,s));break;default:_r(i,s,fe,pe,p,ge)}return;default:if(Ck(s)){for(var Nr in u)pe=u[Nr],u.hasOwnProperty(Nr)&&pe!==void 0&&!p.hasOwnProperty(Nr)&&l8(i,s,Nr,void 0,p,pe);for(be in p)pe=p[be],ge=u[be],!p.hasOwnProperty(be)||pe===ge||pe===void 0&&ge===void 0||l8(i,s,be,pe,p,ge);return}}for(var ue in u)pe=u[ue],u.hasOwnProperty(ue)&&pe!=null&&!p.hasOwnProperty(ue)&&_r(i,s,ue,null,p,pe);for(xe in p)pe=p[xe],ge=u[xe],!p.hasOwnProperty(xe)||pe===ge||pe==null&&ge==null||_r(i,s,xe,pe,p,ge)}function Kj(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TY(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var b=u[p],E=b.transferSize,M=b.initiatorType,G=b.duration;if(E&&G&&Kj(M)){for(M=0,G=b.responseEnd,p+=1;p<u.length;p++){var ee=u[p],fe=ee.startTime;if(fe>G)break;var be=ee.transferSize,xe=ee.initiatorType;be&&Kj(xe)&&(ee=ee.responseEnd,M+=be*(ee<G?1:(G-fe)/(ee-fe)))}if(--p,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 u8=null,c8=null;function jw(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 Qj(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 d8(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 f8=null;function jY(){var i=window.event;return i&&i.type==="popstate"?i===f8?!1:(f8=i,!0):(f8=null,!1)}var Yj=typeof setTimeout=="function"?setTimeout:void 0,_Y=typeof clearTimeout=="function"?clearTimeout:void 0,Zj=typeof Promise=="function"?Promise:void 0,NY=typeof queueMicrotask=="function"?queueMicrotask:typeof Zj<"u"?function(i){return Zj.resolve(null).then(i).catch(PY)}:Yj;function PY(i){setTimeout(function(){throw i})}function nc(i){return i==="head"}function Jj(i,s){var u=s,p=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(b),Dm(s);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Hg(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Hg(u);for(var E=u.firstChild;E;){var M=E.nextSibling,G=E.nodeName;E[lr]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&E.rel.toLowerCase()==="stylesheet"||u.removeChild(E),E=M}}else u==="body"&&Hg(i.ownerDocument.body);u=b}while(u);Dm(s)}function e_(i,s){var u=i;i=0;do{var p=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||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function p8(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":p8(u),ri(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function RY(i,s,u,p){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[lr])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 OY(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 m8(i){return i.data==="$?"||i.data==="$~"}function h8(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function zY(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var p=function(){s(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}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 g8=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=jw(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 Hg(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);ri(i)}var $o=new Map,i_=new Set;function _w(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Zl=z.d;z.d={f:LY,r:HY,D:qY,C:WY,L:UY,m:VY,X:KY,S:GY,M:XY};function LY(){var i=Zl.f(),s=Cw();return i||s}function HY(i){var s=Sr(i);s!==null&&s.tag===5&&s.type==="form"?wT(s):Zl.r(i)}var Cm=typeof document>"u"?null:document;function o_(i,s,u){var p=Cm;if(p&&typeof s=="string"&&s){var b=Ki(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},p.querySelector(b)===null&&(s=p.createElement("link"),xa(s,"link",i),ur(s),p.head.appendChild(s)))}}function qY(i){Zl.D(i),o_("dns-prefetch",i,null)}function WY(i,s){Zl.C(i,s),o_("preconnect",i,s)}function UY(i,s,u){Zl.L(i,s,u);var p=Cm;if(p&&i&&s){var b='link[rel="preload"][as="'+Ki(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+Ki(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+Ki(u.imageSizes)+'"]')):b+='[href="'+Ki(i)+'"]';var E=b;switch(s){case"style":E=Sm(i);break;case"script":E=Fm(i)}$o.has(E)||(i=v({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),$o.set(E,i),p.querySelector(b)!==null||s==="style"&&p.querySelector(qg(E))||s==="script"&&p.querySelector(Wg(E))||(s=p.createElement("link"),xa(s,"link",i),ur(s),p.head.appendChild(s)))}}function VY(i,s){Zl.m(i,s);var u=Cm;if(u&&i){var p=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+Ki(p)+'"][href="'+Ki(i)+'"]',E=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Fm(i)}if(!$o.has(E)&&(i=v({rel:"modulepreload",href:i},s),$o.set(E,i),u.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Wg(E)))return}p=u.createElement("link"),xa(p,"link",i),ur(p),u.head.appendChild(p)}}}function GY(i,s,u){Zl.S(i,s,u);var p=Cm;if(p&&i){var b=ha(p).hoistableStyles,E=Sm(i);s=s||"default";var M=b.get(E);if(!M){var G={loading:0,preload:null};if(M=p.querySelector(qg(E)))G.loading=5;else{i=v({rel:"stylesheet",href:i,"data-precedence":s},u),(u=$o.get(E))&&v8(i,u);var ee=M=p.createElement("link");ur(ee),xa(ee,"link",i),ee._p=new Promise(function(fe,be){ee.onload=fe,ee.onerror=be}),ee.addEventListener("load",function(){G.loading|=1}),ee.addEventListener("error",function(){G.loading|=2}),G.loading|=4,Nw(M,s,p)}M={type:"stylesheet",instance:M,count:1,state:G},b.set(E,M)}}}function KY(i,s){Zl.X(i,s);var u=Cm;if(u&&i){var p=ha(u).hoistableScripts,b=Fm(i),E=p.get(b);E||(E=u.querySelector(Wg(b)),E||(i=v({src:i,async:!0},s),(s=$o.get(b))&&b8(i,s),E=u.createElement("script"),ur(E),xa(E,"link",i),u.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},p.set(b,E))}}function XY(i,s){Zl.M(i,s);var u=Cm;if(u&&i){var p=ha(u).hoistableScripts,b=Fm(i),E=p.get(b);E||(E=u.querySelector(Wg(b)),E||(i=v({src:i,async:!0,type:"module"},s),(s=$o.get(b))&&b8(i,s),E=u.createElement("script"),ur(E),xa(E,"link",i),u.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},p.set(b,E))}}function s_(i,s,u,p){var b=(b=J.current)?_w(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=Sm(u.href),u=ha(b).hoistableStyles,p=u.get(s),p||(p={type:"style",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Sm(u.href);var E=ha(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(qg(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||QY(b,i,u,M.state))),s&&p===null)throw Error(a(528,""));return M}if(s&&p!==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=Fm(u),u=ha(b).hoistableScripts,p=u.get(s),p||(p={type:"script",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function Sm(i){return'href="'+Ki(i)+'"'}function qg(i){return'link[rel="stylesheet"]['+i+"]"}function l_(i){return v({},i,{"data-precedence":i.precedence,precedence:null})}function QY(i,s,u,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),xa(s,"link",u),ur(s),i.head.appendChild(s))}function Fm(i){return'[src="'+Ki(i)+'"]'}function Wg(i){return"script[async]"+i}function u_(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+Ki(u.href)+'"]');if(p)return s.instance=p,ur(p),p;var b=v({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),ur(p),xa(p,"style",b),Nw(p,u.precedence,i),s.instance=p;case"stylesheet":b=Sm(u.href);var E=i.querySelector(qg(b));if(E)return s.state.loading|=4,s.instance=E,ur(E),E;p=l_(u),(b=$o.get(b))&&v8(p,b),E=(i.ownerDocument||i).createElement("link"),ur(E);var M=E;return M._p=new Promise(function(G,ee){M.onload=G,M.onerror=ee}),xa(E,"link",p),s.state.loading|=4,Nw(E,u.precedence,i),s.instance=E;case"script":return E=Fm(u.src),(b=i.querySelector(Wg(E)))?(s.instance=b,ur(b),b):(p=u,(b=$o.get(E))&&(p=v({},u),b8(p,b)),i=i.ownerDocument||i,b=i.createElement("script"),ur(b),xa(b,"link",p),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&&(p=s.instance,s.state.loading|=4,Nw(p,u.precedence,i));return s.instance}function Nw(i,s,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,E=b,M=0;M<p.length;M++){var G=p[M];if(G.dataset.precedence===s)E=G;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 v8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function b8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var Pw=null;function c_(i,s,u){if(Pw===null){var p=new Map,b=Pw=new Map;b.set(u,p)}else b=Pw,p=b.get(u),p||(p=new Map,b.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var E=u[b];if(!(E[lr]||E[Xt]||i==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var M=E.getAttribute(s)||"";M=i+M;var G=p.get(M);G?G.push(E):p.set(M,[E])}}return p}function d_(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function YY(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 f_(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function ZY(i,s,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=Sm(p.href),E=s.querySelector(qg(b));if(E){s=E._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Rw.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=E,ur(E);return}E=s.ownerDocument||s,p=l_(p),(b=$o.get(b))&&v8(p,b),E=E.createElement("link"),ur(E);var M=E;M._p=new Promise(function(G,ee){M.onload=G,M.onerror=ee}),xa(E,"link",p),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=Rw.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var y8=0;function JY(i,s){return i.stylesheets&&i.count===0&&zw(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&zw(i,i.stylesheets),i.unsuspend){var E=i.unsuspend;i.unsuspend=null,E()}},6e4+s);0<i.imgBytes&&y8===0&&(y8=62500*TY());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&zw(i,i.stylesheets),i.unsuspend)){var E=i.unsuspend;i.unsuspend=null,E()}},(i.imgBytes>y8?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(b)}}:null}function Rw(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zw(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Ow=null;function zw(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Ow=new Map,s.forEach(eZ,i),Ow=null,Rw.call(i))}function eZ(i,s){if(!(s.state.loading&4)){var u=Ow.get(i);if(u)var p=u.get(null);else{u=new Map,Ow.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),p=M)}p&&u.set(null,p)}b=s.instance,M=b.getAttribute("data-precedence"),E=u.get(M)||p,E===p&&u.set(null,b),u.set(M,b),this.count++,p=Rw.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),E?E.parentNode.insertBefore(b,E.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var Ug={$$typeof:S,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function tZ(i,s,u,p,b,E,M,G,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=p,this.onUncaughtError=b,this.onCaughtError=E,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function p_(i,s,u,p,b,E,M,G,ee,fe,be,xe){return i=new tZ(i,s,u,M,ee,fe,be,xe,G),s=1,E===!0&&(s|=24),E=Qi(3,null,null,s),i.current=E,E.stateNode=i,s=eC(),s.refCount++,i.pooledCache=s,s.refCount++,E.memoizedState={element:p,isDehydrated:u,cache:s},aC(E),i}function m_(i){return i?(i=nm,i):nm}function h_(i,s,u,p,b,E){b=m_(b),p.context===null?p.context=b:p.pendingContext=b,p=Vu(s),p.payload={element:u},E=E===void 0?null:E,E!==null&&(p.callback=E),u=Gu(i,p,s),u!==null&&(Si(u,i,s),kg(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 w8(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&&Si(s,i,67108864),w8(i,67108864)}}function b_(i){if(i.tag===13||i.tag===31){var s=to();s=ft(s);var u=Ad(i,s);u!==null&&Si(u,i,s),w8(i,s)}}var Lw=!0;function rZ(i,s,u,p){var b=W.T;W.T=null;var E=z.p;try{z.p=2,x8(i,s,u,p)}finally{z.p=E,W.T=b}}function nZ(i,s,u,p){var b=W.T;W.T=null;var E=z.p;try{z.p=8,x8(i,s,u,p)}finally{z.p=E,W.T=b}}function x8(i,s,u,p){if(Lw){var b=E8(p);if(b===null)s8(i,s,p,Hw,u),w_(i,p);else if(iZ(b,i,s,u,p))p.stopPropagation();else if(w_(i,p),s&4&&-1<aZ.indexOf(i)){for(;b!==null;){var E=Sr(b);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var M=Ft(E.pendingLanes);if(M!==0){var G=E;for(G.pendingLanes|=2,G.entangledLanes|=2;M;){var ee=1<<31-rt(M);G.entanglements[1]|=ee,M&=~ee}Ws(E),(br&6)===0&&(Ew=Ie()+500,Og(0,!1))}}break;case 31:case 13:G=Ad(E,2),G!==null&&Si(G,E,2),Cw(),w8(E,2)}if(E=E8(p),E===null&&s8(i,s,p,Hw,u),E===b)break;b=E}b!==null&&p.stopPropagation()}else s8(i,s,p,null,u)}}function E8(i){return i=Fk(i),k8(i)}var Hw=null;function k8(i){if(Hw=null,i=Na(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 Hw=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(Pe()){case Je:return 2;case gt:return 8;case et:case Ue:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var C8=!1,ac=null,ic=null,oc=null,Vg=new Map,Gg=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":Gg.delete(s.pointerId)}}function Kg(i,s,u,p,b,E){return i===null||i.nativeEvent!==E?(i={blockedOn:s,domEventName:u,eventSystemFlags:p,nativeEvent:E,targetContainers:[b]},s!==null&&(s=Sr(s),s!==null&&v_(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function iZ(i,s,u,p,b){switch(s){case"focusin":return ac=Kg(ac,i,s,u,p,b),!0;case"dragenter":return ic=Kg(ic,i,s,u,p,b),!0;case"mouseover":return oc=Kg(oc,i,s,u,p,b),!0;case"pointerover":var E=b.pointerId;return Vg.set(E,Kg(Vg.get(E)||null,i,s,u,p,b)),!0;case"gotpointercapture":return E=b.pointerId,Gg.set(E,Kg(Gg.get(E)||null,i,s,u,p,b)),!0}return!1}function x_(i){var s=Na(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 qw(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=E8(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);Sk=p,u.target.dispatchEvent(p),Sk=null}else return s=Sr(u),s!==null&&v_(s),i.blockedOn=u,!1;s.shift()}return!0}function E_(i,s,u){qw(i)&&u.delete(s)}function oZ(){C8=!1,ac!==null&&qw(ac)&&(ac=null),ic!==null&&qw(ic)&&(ic=null),oc!==null&&qw(oc)&&(oc=null),Vg.forEach(E_),Gg.forEach(E_)}function Ww(i,s){i.blockedOn===s&&(i.blockedOn=null,C8||(C8=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,oZ)))}var Uw=null;function k_(i){Uw!==i&&(Uw=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uw===i&&(Uw=null);for(var s=0;s<i.length;s+=3){var u=i[s],p=i[s+1],b=i[s+2];if(typeof p!="function"){if(k8(p||u)===null)continue;break}var E=Sr(u);E!==null&&(i.splice(s,3),s-=3,CC(E,{pending:!0,data:b,method:u.method,action:p},p,b))}}))}function Dm(i){function s(ee){return Ww(ee,i)}ac!==null&&Ww(ac,i),ic!==null&&Ww(ic,i),oc!==null&&Ww(oc,i),Vg.forEach(s),Gg.forEach(s);for(var u=0;u<sc.length;u++){var p=sc[u];p.blockedOn===i&&(p.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(p=0;p<u.length;p+=3){var b=u[p],E=u[p+1],M=b[zr]||null;if(typeof E=="function")M||k_(u);else if(M){var G=null;if(E&&E.hasAttribute("formAction")){if(b=E,M=E[zr]||null)G=M.formAction;else if(k8(b)!==null)continue}else G=M.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=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),p||setTimeout(u,20)}function u(){if(!p&&!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 p=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function S8(i){this._internalRoot=i}Vw.prototype.render=S8.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(a(409));var u=s.current,p=to();h_(u,p,i,s,null,null)},Vw.prototype.unmount=S8.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),Cw(),s[pt]=null}};function Vw(i){this._internalRoot=i}Vw.prototype.unstable_scheduleHydration=function(i){if(i){var s=Wt();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"&&(Xg=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Xg.isDisabled&&Xg.supportsFiber))try{at=Xg.inject(sZ),Ge=Xg}catch{}var Xg;e.createRoot=function(i,s){if(!o(i))throw Error(a(299));var u=!1,p="",b=BT,E=IT,M=MT;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(E=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=p_(i,1,!1,null,null,u,p,null,b,E,M,C_),i[pt]=s.current,o8(i),new S8(s)},e.hydrateRoot=function(i,s,u){if(!o(i))throw Error(a(299));var p=!1,b="",E=BT,M=IT,G=MT,ee=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!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&&(G=u.onRecoverableError),u.formState!==void 0&&(ee=u.formState)),s=p_(i,1,!0,s,u??null,p,b,ee,E,M,G,C_),s.context=m_(null),u=s.current,p=to(),p=ft(p),b=Vu(p),b.callback=null,Gu(u,b,p),u=p,s.current.lanes=u,Re(s,u),Ws(s),i[pt]=s.current,o8(i),new Vw(s)},e.version="19.2.7"}),si=Jt((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=Jt(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=Jt((e,t)=>{"use strict";t.exports=SZ()}),FZ=Jt(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"),f=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"),x=Symbol.for("react.client.reference");function w(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 f: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=f,e.SuspenseList=h,e.isContextConsumer=function(k){return w(k)===l},e.isContextProvider=function(k){return w(k)===c},e.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},e.isForwardRef=function(k){return w(k)===d},e.isFragment=function(k){return w(k)===n},e.isLazy=function(k){return w(k)===v},e.isMemo=function(k){return w(k)===g},e.isPortal=function(k){return w(k)===r},e.isProfiler=function(k){return w(k)===o},e.isStrictMode=function(k){return w(k)===a},e.isSuspense=function(k){return w(k)===f},e.isSuspenseList=function(k){return w(k)===h},e.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===n||k===o||k===a||k===f||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===x||k.getModuleId!==void 0)},e.typeOf=w}),DZ=Jt((e,t)=>{"use strict";t.exports=FZ()}),AZ=Jt((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 rP(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=rP(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=rP(e))&&(n&&(n+=" "),n+=t);return n}var WS=te,$Z=B(_()),X8=B(_());function Pa(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $_=Pa()?X8.useLayoutEffect:X8.useEffect,nP=(e,t)=>{let r=X8.useRef(!0);$_(()=>e(r.current),t),$_(()=>(r.current=!1,()=>{r.current=!0}),[])},US=(e,t)=>{nP(r=>{if(!r)return e()},t)},er=nP;function wr(e,t){let[r,n]=(0,$Z.useState)(e),a=t!==void 0?t:r;return er(o=>{o||n(t)},[t]),[a,n]}var Q8=B(_());function BZ(){return{...Q8}.useId}var B_=0,I_=BZ(),Xs=I_?function(e){let t=I_();return e||t}:function(e){let[t,r]=Q8.useState("ssr-id");return Q8.useEffect(()=>{let n=B_;B_+=1,r(`rc_unique_${n}`)},[]),e||t};function Qr(e){return e!=null}function or(e){return Qr(e)&&e!==!1&&e!==""}function xr(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 aP(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)):aP(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 E5=_Z,NZ=B(si()),g5="__rc_react_root__";function VS(e,t){let r=t[g5]||(0,NZ.createRoot)(t);r.render(e),t[g5]=r}async function GS(e){return Promise.resolve().then(()=>{e[g5]?.unmount(),delete e[g5]})}var M_=B(_()),PZ=e=>{let t=M_.useRef(e);return t.current=e,M_.useCallback((...r)=>t.current?.(...r),[])},xt=PZ,$8=B(_()),RZ=e=>{let t=$8.useRef(!1),[r,n]=$8.useState(e);$8.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function a(o,l){l&&t.current||n(o)}return[r,a]},iP=RZ,T_=B(_()),oP=e=>+setTimeout(e,16),sP=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(oP=e=>window.requestAnimationFrame(e),sP=e=>window.cancelAnimationFrame(e));var j_=0,KS=new Map;function lP(e){KS.delete(e)}var uP=(e,t=1)=>{j_+=1;let r=j_;function n(a){if(a===0)lP(r),e();else{let o=oP(()=>{n(a-1)});KS.set(r,o)}}return n(t),r};uP.cancel=e=>{let t=KS.get(e);return lP(e),sP(t)};var fr=uP;function zm(e){let[t,r]=T_.useState(e),n=T_.useRef(null),a=xt(()=>{if(n.current){let[l,c]=n.current;l?fr.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,fr(()=>r(l),d.frame)]});return[t,o]}var OZ=B(_());function Lm(e,t,r){let n=OZ.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 zZ(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 cP=zZ,dP=B(_()),B8=B(DZ()),LZ=Number(dP.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)=>Lm(()=>ln(...e),e,(t,r)=>t.length!==r.length||t.every((n,a)=>n!==r[a])),ru=e=>{if(!e)return!1;if(XS(e)&&LZ>=19)return!0;let t=(0,B8.isMemo)(e)?e.type.type:e.type;return!(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==B8.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==B8.ForwardRef)};function XS(e){return(0,dP.isValidElement)(e)&&!aP(e)}var fP=e=>XS(e)&&ru(e),Qs=e=>{if(e&&XS(e)){let t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function pP(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 N_="data-rc-order",P_="data-rc-priority",qZ="rc-util-key",Y8=new Map;function mP({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:qZ}function k5(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function WZ(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function QS(e){return Array.from((Y8.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function hP(e,t={}){if(!Pa())return null;let{csp:r,prepend:n,priority:a=0}=t,o=WZ(n),l=o==="prependQueue",c=document.createElement("style");c.setAttribute(N_,o),l&&a&&c.setAttribute(P_,`${a}`),r?.nonce&&(c.nonce=r?.nonce),c.innerHTML=e;let d=k5(t),{firstChild:f}=d;if(n){if(l){let h=(t.styles||QS(d)).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(N_)))return!1;let v=Number(g.getAttribute(P_)||0);return a>=v});if(h.length)return d.insertBefore(c,h[h.length-1].nextSibling),c}d.insertBefore(c,f)}else d.appendChild(c);return c}function gP(e,t={}){let{styles:r}=t;return r||(r=QS(k5(t))),r.find(n=>n.getAttribute(mP(t))===e)}function ov(e,t={}){let r=gP(e,t);r&&k5(t).removeChild(r)}function UZ(e,t){let r=Y8.get(e);if(!r||!pP(document,r)){let n=hP("",t),{parentNode:a}=n;Y8.set(e,a),e.removeChild(n)}}function Kd(e,t,r={}){let n=k5(r),a=QS(n),o={...r,styles:a};UZ(n,o);let l=gP(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=hP(e,o);return c.setAttribute(mP(o),t),c}function Nm(e){return e instanceof HTMLElement||e instanceof SVGElement}function C5(e){return e&&typeof e=="object"&&Nm(e.nativeElement)?e.nativeElement:Nm(e)?e:null}var Jg=B(_()),dv=(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 R_(e,t=!1){if(dv(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 fv(e,t=!1){let r=[...e.querySelectorAll("*")].filter(n=>R_(n,t));return R_(e,t)&&r.unshift(e),r}function S5(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 _m=null,fc=[],Z8=new Map,YS=new Map;function ZS(){return fc[fc.length-1]}function VZ(e){let t=ZS();if(e&&t){let r;for(let[a,o]of Z8.entries())if(o===t){r=a;break}let n=YS.get(r);return!!n&&(n===e||n.contains(e))}return!1}function GZ(e){let{activeElement:t}=document;return e===t||e.contains(t)}function I8(){let e=ZS(),{activeElement:t}=document;if(!VZ(t))if(e&&!GZ(e)){let r=fv(e);(r.includes(_m)?_m:r[0])?.focus({preventScroll:!0})}else _m=t}function O_(e){if(e.key==="Tab"){let{activeElement:t}=document,r=ZS(),n=fv(r),a=n[n.length-1];e.shiftKey&&t===n[0]?_m=a:!e.shiftKey&&t===a&&(_m=n[0])}}function KZ(e,t){return e&&(Z8.set(t,e),fc=fc.filter(r=>r!==e),fc.push(e),window.addEventListener("focusin",I8),window.addEventListener("keydown",O_,!0),I8()),()=>{_m=null,fc=fc.filter(r=>r!==e),Z8.delete(t),YS.delete(t),fc.length===0&&(window.removeEventListener("focusin",I8),window.removeEventListener("keydown",O_,!0))}}function XZ(e,t){let r=(0,Jg.useRef)(0),[n,a]=(0,Jg.useState)(0);(0,Jg.useEffect)(()=>{r.current=0},t),(0,Jg.useEffect)(()=>{let[o,l]=e(r.current);return l||(r.current+=1,a(c=>c+1)),o},[...t,n])}function QZ(e,t){let r=Xs(),n=(0,Jg.useRef)(t);return n.current=t,XZ(a=>{if(!e)return[void 0,!0];let o=n.current();return o?[KZ(o,r),!0]:[void 0,a>=1]},[r,e]),[a=>{a&&YS.set(r,a)}]}function vP(e){return e?.getRootNode?.()}function YZ(e){return vP(e)instanceof ShadowRoot}function J8(e){return YZ(e)?vP(e):null}var bP=e=>{if(Pa()&&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(!bP(e))return!1;let r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function F5(e,t){return!Array.isArray(e)&&t!==void 0?ZZ(e,t):bP(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)}},Rn=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 f=getComputedStyle(e,"::-webkit-scrollbar"),h=parseInt(f.width,10),g=parseInt(f.height,10);try{let v=h?`width: ${f.width};`:"",y=g?`height: ${f.height};`:"";Kd(`
|
|
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),ov(t),{width:l,height:c}}function eJ(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:JZ(e)}var eS={},tJ=[],rJ=e=>{tJ.push(e)};function nJ(e,t){}function aJ(e,t){}function iJ(){eS={}}function yP(e,t,r){!t&&!eS[r]&&(e(!1,r),eS[r]=!0)}function D5(e,t){yP(nJ,e,t)}function oJ(e,t){yP(aJ,e,t)}D5.preMessage=rJ;D5.resetWarned=iJ;D5.noteOnce=oJ;var Ea=D5;function sJ(e,t,r=!1){let n=new Set;function a(o,l,c=1){let d=n.has(o);if(Ea(!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 f=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],f))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],f))}return!1}return a(e,t)}var yc=sJ,lJ=B(AZ()),M8,uJ=()=>(typeof M8>"u"&&(M8=(0,lJ.default)()),M8),JS=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`,fJ=`${cJ} ${dJ}`.split(/[\s\n]+/),pJ="aria-",mJ="data-";function z_(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"||z_(a,pJ))||r.data&&z_(a,mJ)||r.attr&&fJ.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 Ai(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 wP(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]=wP(l[a],o,r,n),l}function oi(e,t,r,n=!1){return t.length&&n&&r===void 0&&!Ai(e,t.slice(0,-1))?e:wP(e,t,r,n)}function gJ(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function L_(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=L_(e[0]);return e.forEach(o=>{function l(c,d){let f=new Set(d),h=Ai(o,c),g=Array.isArray(h);if(g||gJ(h)){if(!f.has(h)){f.add(h);let v=Ai(a,c);g?a=oi(a,c,n(v,h)):(!v||typeof v!="object")&&(a=oi(a,c,L_(h))),vJ(h).forEach(y=>{Object.getOwnPropertyDescriptor(h,y).enumerable&&l([...c,y],f)})}}else a=oi(a,c,h)}l([])}),a}function wc(...e){return bJ(e)}var R4e=B(_()),O4e=B(tr());function tS(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 tS(e)}function wJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xP(e,t){if(e){if(typeof e=="string")return tS(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)?tS(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)||xP(e)||xJ()}var Ra=e=>typeof e=="number"&&!Number.isNaN(e),$i=e=>typeof e=="string",Ct=e=>e!==null&&typeof e=="object",Er=e=>typeof e=="function",EJ=e=>Qr(e)&&Er(e.then),kJ=e=>typeof e!="object"&&!Er(e)||e===null,pv=e=>Ct(e)&&"propertyName"in e&&$i(e.propertyName),A5=B(_()),rS=(e,t)=>{let r={...e};return Object.keys(t).forEach(n=>{t[n]._default?r[n]||(r[n]={}):r[n]=rS(r[n],t[n])}),r},EP=(e={},...t)=>t.filter(r=>!!r).reduce((r,n)=>(Object.keys(n).forEach(a=>{let o=e[a],l=n[a];if(o)if(Ct(l))r[a]=EP(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)=>A5.useMemo(()=>EP.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)=>A5.useMemo(()=>SJ.apply(void 0,e),[].concat(e)),lt=(e,t="root")=>A5.useMemo(()=>e?{[t]:e}:void 0,[e,t]),nS=(e,t)=>Er(e)?e(t):e,jt=(e,t,r,n)=>{let a=e.map(d=>d?nS(d,r):void 0),o=t.map(d=>d?nS(d,r):void 0),l=CJ.apply(void 0,[n].concat(Xr(a))),c=FJ.apply(void 0,Xr(o));return A5.useMemo(()=>n?[rS(l,n),rS(c,n)]:[l,c],[l,c,n])},DJ=B(_());function AJ(){}var{resetWarned:z4e}=Ea,$J=DJ.createContext({}),kP=()=>{let e=()=>{};return e.deprecated=AJ,e},$5=kP,CP=B(_()),gc="ant",B5="anticon",e4=["outlined","borderless","filled","underlined"],BJ=(e,t)=>t||(e?`${gc}-${e}`:gc),wt=CP.createContext({getPrefixCls:BJ,iconPrefixCls:B5}),{Consumer:L4e}=wt,H_={};function _t(e){let t=CP.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 sv=IJ,MJ=B(_()),TJ=B(_());function aS(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(aS(e))}opGet(e){return this.cache.get(e)||null}update(e,t){return this.opUpdate(aS(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,I5="data-token-hash",Ks="data-css-hash",pc="__cssinjs_instance__";function NJ(){let e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${Ks}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(a=>{a[pc]||(a[pc]=e),a[pc]===e&&document.head.insertBefore(a,r)});let n={};Array.from(document.querySelectorAll(`style[${Ks}]`)).forEach(a=>{let o=a.getAttribute(Ks);n[o]?a[pc]===e&&a.parentNode?.removeChild(a):n[o]=!0})}return new _J(e)}var PJ=TJ.createContext({hashPriority:"low",cache:NJ(),defaultCache:!0,autoPrefix:!1}),xc=PJ,RJ="CALC_UNIT",H4e=new RegExp(RJ,"g");function OJ(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 iS=class oS{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>oS.MAX_CACHE_SIZE+oS.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=>!OJ(r,t)),this.deleteByPath(this.cache,t)}};oe(iS,"MAX_CACHE_SIZE",20),oe(iS,"MAX_CACHE_OFFSET",5);var zJ=iS,U_=0,SP=class{constructor(e){oe(this,"derivatives"),oe(this,"id"),this.derivatives=Array.isArray(e)?e:[e],this.id=U_,e.length===0&&e.length>0,U_+=1}getDerivativeToken(e){return this.derivatives.reduce((t,r)=>r(e,t),void 0)}},T8=new zJ;function Pm(e){let t=Array.isArray(e)?e:[e];return T8.has(t)||T8.set(t,new SP(t)),T8.get(t)}var LJ=new WeakMap,j8={};function HJ(e,t){let r=LJ;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(j8)||r.set(j8,e()),r.get(j8)}var V_=new WeakMap;function rv(e){let t=V_.get(e)||"";return t||(Object.keys(e).forEach(r=>{let n=e[r];t+=r,n instanceof SP?t+=n.id:n&&typeof n=="object"?t+=rv(n):t+=n}),t=sv(t),V_.set(e,t)),t}function qJ(e,t){return sv(`${t}_${rv(e)}`)}var q4e=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),sS=Pa();function ve(e){return typeof e=="number"?`${e}px`:e}function v5(e,t,r,n={},a=!1){if(a)return e;let o={...n,[I5]:t,[Ks]:r};return`<style ${Object.keys(o).map(l=>{let c=o[l];return c?`${l}="${c}"`:null}).filter(l=>l).join(" ")}>${e}</style>`}function FP(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 t4(e,t){let r=typeof t=="function"?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}var u5=(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(),UJ=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",scope:o}=r||{};if(!Object.keys(e).length)return"";let l=`${FP({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,f])=>`${d}:${f};`).join("")}}`},DP=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",prefix:o,unitless:l,ignore:c,preserve:d}=r||{},f={},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=u5(g,o);f[y]=typeof v=="number"&&!l?.[g]?`${v}px`:String(v),h[g]=`var(${y})`}}),[h,UJ(f,t,{scope:r?.scope,hashCls:n,hashPriority:a})]},G_=B(_()),VJ=B(_());function GJ(){return!1}var KJ=GJ,Xw=new Map;function r4(e,t,r,n,a){let{cache:o}=G_.useContext(xc),l=[e,...t],c=aS(l),d=KJ(),f=g=>{o.opUpdate(c,v=>{let[y=0,x]=v||[void 0,void 0],w=x||r(),k=[y,w];return g?g(k):k})};G_.useMemo(()=>{f()},[c]);let h=o.opGet(c)[1];return(0,VJ.useInsertionEffect)(()=>(f(([g,v])=>[g+1,v]),Xw.has(c)||(a?.(h),Xw.set(c,!0),Promise.resolve().then(()=>{Xw.delete(c)})),()=>{o.opUpdate(c,g=>{let[v=0,y]=g||[];return v-1===0?(n?.(y,!1),Xw.delete(c),null):[v-1,y]})}),[c]),h}var XJ={},QJ="css",qd=new Map;function YJ(e){qd.set(e,(qd.get(e)||0)+1)}function ZJ(e,t){typeof document<"u"&&document.querySelectorAll(`style[${I5}="${e}"]`).forEach(r=>{r[pc]===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 M5=(e,t,r,n)=>{let a={...r.getDerivativeToken(e),...t};return n&&(a=n(a)),a},AP="token";function $P(e,t,r){let{cache:{instanceId:n},container:a,hashPriority:o}=(0,MJ.useContext)(xc),{salt:l="",override:c=XJ,formatToken:d,getComputedToken:f,cssVar:h,nonce:g}=r,v=HJ(()=>Object.assign({},...t),t),y=rv(v),x=rv(c),w=rv(h);return r4(AP,[l,e.id,y,x,w],()=>{let k=f?f(v,c,e):M5(v,c,e,d),F={...k},C=`${l}_${h.prefix}`,D=sv(C),S=`${QJ}-${D}`;F._tokenKey=qJ(F,C);let[A,I]=DP(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,YJ(h.key),[A,S,F,I,h.key]},([,,,,k])=>{eee(k,n)},([,,,k,F])=>{if(!k)return;let C={mark:Ks,prepend:"queue",attachTo:a,priority:-999};C=t4(C,g);let D=Kd(k,sv(`css-var-${F}`),C);D[pc]=n,D.setAttribute(I5,F)})}var tee=(e,t,r)=>{let[,,n,a,o]=e,{plain:l}=r||{};if(!a)return null;let c=n._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":`${d}`},h=v5(a,o,c,f,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-",nv="-moz-",yr="-webkit-",BP="comm",n4="rule",a4="decl",oee="@import",see="@namespace",IP="@keyframes",lee="@layer",uee=Math.abs,av=String.fromCharCode,lS=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 MP(e){return e.trim()}function eu(e,t){return(e=t.exec(e))?e[0]:e}function Rt(e,t,r){return e.replace(t,r)}function _8(e,t){return e.indexOf(t)}function Xn(e,t){return e.charCodeAt(t)|0}function Qd(e,t,r){return e.slice(t,r)}function cs(e){return e.length}function TP(e){return e.length}function ev(e,t){return t.push(e),e}function dee(e,t){return e.map(t).join("")}function K_(e,t){return e.filter(function(r){return!eu(r,t)})}var T5=1,Rm=1,jP=0,To=0,Pn=0,Hm="";function j5(e,t,r,n,a,o,l,c){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:T5,column:Rm,length:l,return:"",siblings:c}}function dc(e,t){return lS(j5("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function $m(e){for(;e.root;)e=dc(e.root,{children:[e]});ev(e,e.siblings)}function fee(){return Pn}function pee(){return Pn=To>0?Xn(Hm,--To):0,Rm--,Pn===10&&(Rm=1,T5--),Pn}function fs(){return Pn=To<jP?Xn(Hm,To++):0,Rm++,Pn===10&&(Rm=1,T5++),Pn}function mc(){return Xn(Hm,To)}function c5(){return To}function _5(e,t){return Qd(Hm,e,t)}function lv(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 T5=Rm=1,jP=cs(Hm=e),To=0,[]}function hee(e){return Hm="",e}function N8(e){return MP(_5(To-1,uS(e===91?e+2:e===40?e+1:e)))}function gee(e){for(;(Pn=mc())&&Pn<33;)fs();return lv(e)>2||lv(Pn)>3?"":" "}function vee(e,t){for(;--t&&fs()&&!(Pn<48||Pn>102||Pn>57&&Pn<65||Pn>70&&Pn<97););return _5(e,c5()+(t<6&&mc()==32&&fs()==32))}function uS(e){for(;fs();)switch(Pn){case e:return To;case 34:case 39:e!==34&&e!==39&&uS(Pn);break;case 40:e===41&&uS(e);break;case 92:fs();break}return To}function bee(e,t){for(;fs()&&e+Pn!==57&&!(e+Pn===84&&mc()===47););return"/*"+_5(t,To-1)+"*"+av(e===47?e:fs())}function yee(e){for(;!lv(mc());)fs();return _5(e,To)}function X_(e){return hee(d5("",null,null,null,[""],e=mee(e),0,[0],e))}function d5(e,t,r,n,a,o,l,c,d){for(var f=0,h=0,g=l,v=0,y=0,x=0,w=1,k=1,F=1,C=0,D=0,S="",A=a,I=o,j=n,$=S;k;)switch(x=D,D=fs()){case 40:x!=108&&Xn($,g-1)==58?(C++,$+="("):$+=N8(D);break;case 41:C--,$+=")";break;case 34:case 39:case 91:$+=N8(D);break;case 9:case 10:case 13:case 32:if(C>0){$+=av(D);break}$+=gee(x);break;case 92:$+=vee(c5()-1,7);continue;case 47:switch(mc()){case 42:case 47:ev(wee(bee(fs(),c5()),t,r,d),d),(lv(x||1)==5||lv(mc()||1)==5)&&cs($)&&Qd($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*w:c[f++]=cs($)*F;case 125*w:case 59:case 0:if(C>0&&D){$+=av(D);break}switch(D){case 0:case 125:k=0;case 59+h:F==-1&&($=Rt($,/\f/g,"")),y>0&&(cs($)-g||w===0)&&ev(y>32?Y_($+";",n,r,g-1,d):Y_(Rt($," ","")+";",n,r,g-2,d),d);break;case 59:$+=";";default:if(ev(j=Q_($,t,r,f,h,a,c,S,A=[],I=[],g,o),o),D===123)if(h===0)d5($,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?d5(e,j,j,n&&ev(Q_(e,j,j,0,0,a,c,S,a,A=[],g,I),I),a,I,g,c,n?A:I):d5($,j,j,j,[""],I,0,c,I)}}f=h=y=0,w=F=1,S=$="",g=l;break;case 58:g=1+cs($),y=x;default:if(w<1){if(D==123)--w;else if(D==125&&w++==0&&pee()==125)continue}switch($+=av(D),D*w){case 38:F=h>0?1:($+="\f",-1);break;case 44:if(C>0)break;c[f++]=(cs($)-1)*F,F=1;break;case 64:mc()===45&&($+=N8(fs())),v=mc(),h=g=cs(S=$+=yee(c5())),D++;break;case 45:x===45&&cs($)==2&&(w=0)}}return o}function Q_(e,t,r,n,a,o,l,c,d,f,h,g){for(var v=a-1,y=a===0?o:[""],x=TP(y),w=0,k=0,F=0;w<n;++w)for(var C=0,D=Qd(e,v+1,v=uee(k=l[w])),S=e;C<x;++C)(S=MP(k>0?y[C]+" "+D:Rt(D,/&\f/g,y[C])))&&(d[F++]=S);return j5(e,t,r,a===0?n4:c,d,f,h,g)}function wee(e,t,r,n){return j5(e,t,r,BP,av(fee()),Qd(e,2,-2),0,n)}function Y_(e,t,r,n,a){return j5(e,t,r,a4,Qd(e,0,n),Qd(e,n+1,-1),n,a)}function _P(e,t,r){switch(cee(e,t)){case 5103:return yr+"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 yr+e+e;case 4855:return yr+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return nv+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return yr+e+nv+e+rn+e+e;case 5936:switch(Xn(e,t+11)){case 114:return yr+e+rn+Rt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return yr+e+rn+Rt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return yr+e+rn+Rt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return yr+e+rn+e+e;case 6165:return yr+e+rn+"flex-"+e+e;case 5187:return yr+e+Rt(e,/(\w+).+(:[^]+)/,yr+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return yr+e+rn+"flex-item-"+Rt(e,/flex-|-self/g,"")+(eu(e,/flex-|baseline/)?"":rn+"grid-row-"+Rt(e,/flex-|-self/g,""))+e;case 4675:return yr+e+rn+"flex-line-pack"+Rt(e,/align-content|flex-|-self/g,"")+e;case 5548:return yr+e+rn+Rt(e,"shrink","negative")+e;case 5292:return yr+e+rn+Rt(e,"basis","preferred-size")+e;case 6060:return yr+"box-"+Rt(e,"-grow","")+yr+e+rn+Rt(e,"grow","positive")+e;case 4554:return yr+Rt(e,/([^-])(transform)/g,"$1"+yr+"$2")+e;case 6187:return Rt(Rt(Rt(e,/(zoom-|grab)/,yr+"$1"),/(image-set)/,yr+"$1"),e,"")+e;case 5495:case 3959:return Rt(e,/(image-set\([^]*)/,yr+"$1$`$1");case 4968:return Rt(Rt(e,/(.+:)(flex-)?(.*)/,yr+"box-pack:$3"+rn+"flex-pack:$3"),/space-between/,"justify")+yr+e+e;case 4200:if(!eu(e,/flex-|baseline/))return rn+"grid-column-align"+Qd(e,t)+e;break;case 2592:case 3360:return rn+Rt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,a){return t=a,eu(n.props,/grid-\w+-end/)})?~_8(e+(r=r[t].value),"span")?e:rn+Rt(e,"-start","")+e+rn+"grid-row-span:"+(~_8(r,"span")?eu(r,/\d+/):+eu(r,/\d+/)-+eu(e,/\d+/))+";":rn+Rt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return eu(n.props,/grid-\w+-start/)})?e:rn+Rt(Rt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Rt(e,/(.+)-inline(.+)/,yr+"$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 Rt(e,/(.+:)(.+)-([^]+)/,"$1"+yr+"$2-$3$1"+nv+(Xn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_8(e,"stretch")?_P(Rt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Rt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,o,l,c,d,f){return rn+a+":"+o+f+(l?rn+a+"-span:"+(c?d:+d-+o)+f:"")+e});case 4949:if(Xn(e,t+6)===121)return Rt(e,":",":"+yr)+e;break;case 6444:switch(Xn(e,Xn(e,14)===45?18:11)){case 120:return Rt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+yr+(Xn(e,14)===45?"inline-":"")+"box$3$1"+yr+"$2$3$1"+rn+"$2box$3")+e;case 100:return Rt(e,":",":"+rn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Rt(e,"scroll-","scroll-snap-")+e}return e}function uv(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 a4:return e.return=e.return||e.value;case BP:return"";case IP:return e.return=e.value+"{"+uv(e.children,n)+"}";case n4:if(!cs(e.value=e.props.join(",")))return""}return cs(r=uv(e.children,n))?e.return=e.value+"{"+r+"}":""}function xee(e){var t=TP(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 a4:e.return=_P(e.value,e.length,r);return;case IP:return uv([dc(e,{value:Rt(e.value,"@","@"+yr)})],n);case n4:if(e.length)return dee(r=e.props,function(a){switch(eu(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":$m(dc(e,{props:[Rt(a,/:(read-\w+)/,":"+nv+"$1")]})),$m(dc(e,{props:[a]})),lS(e,{props:K_(r,n)});break;case"::placeholder":$m(dc(e,{props:[Rt(a,/:(plac\w+)/,":"+yr+"input-$1")]})),$m(dc(e,{props:[Rt(a,/:(plac\w+)/,":"+nv+"$1")]})),$m(dc(e,{props:[Rt(a,/:(plac\w+)/,rn+"input-$1")]})),$m(dc(e,{props:[a]})),lS(e,{props:K_(r,n)});break}return""})}}var J_="data-ant-cssinjs-cache-path",NP="_FILE_STYLE__",Xd,PP=!0;function kee(){if(!Xd&&(Xd={},Pa())){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&&(PP=!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&&Pa())if(PP)r=NP;else{let n=document.querySelector(`style[${Ks}="${Xd[e]}"]`);n?r=n.innerHTML:delete Xd[e]}return[r,t]}var Fee="_skip_check_",RP="_multi_value_";function f5(e,t){return(t?uv(X_(e),xee([Eee,Z_])):uv(X_(e),Z_)).replace(/\{%%%\:[^;];}/g,";")}function Dee(e){return typeof e=="object"&&e&&(Fee in e||RP in e)}function eN(e,t,r="high"){if(!t)return e;let n=FP({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 cS=(e,t={},{root:r,injectHash:n,parentSelectors:a}={root:!0,parentSelectors:[]})=>{let{hashId:o,layer:l,path:c,hashPriority:d,transformers:f=[],linters:h=[]}=t,g="",v={};function y(w){let k=w.getName(o);if(!v[k]){let[F]=cS(w.style,t,{root:!1,parentSelectors:a});v[k]=`@keyframes ${w.getName(o)}${F}`}}function x(w,k=[]){return w.forEach(F=>{Array.isArray(F)?x(F,k):F&&k.push(F)}),k}return x(Array.isArray(e)?e:[e]).forEach(w=>{let k=typeof w=="string"&&!r?{}:w;if(typeof k=="string")g+=`${k}
|
|
39
|
+
`;else if(k._keyframe)y(k);else{let F=f.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=eN("",o,d):A=eN(C,o,d):r&&!o&&(A==="&"||A==="")&&(A="",I=!0);let[j,$]=cS(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,P=>`-${P.toLowerCase()}`),N=j;!iee[I]&&typeof N=="number"&&N!==0&&(N=`${N}px`),I==="animationName"&&j?._keyframe&&(y(j),N=j.getName(o)),g+=`${$}:${N};`},A=D?.value??D;typeof D=="object"&&D?.[RP]&&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(w=>`@layer ${w}, ${l.name};`).join(`
|
|
40
|
+
`))):g=`{${g}}`,[g,v]};function OP(e,t){return sv(`${e.join("%")}${t}`)}var zP="style";function dS(e,t){let{path:r,hashId:n,layer:a,nonce:o,clientOnly:l,order:c=0}=e,{mock:d,hashPriority:f,container:h,transformers:g,linters:v,cache:y,layer:x,autoPrefix:w}=nee.useContext(xc),k=[n||""];x&&k.push("layer"),k.push(...r);let F=sS;r4(zP,k,()=>{let C=k.join("|");if(Cee(C)){let[$,N]=See(C);if($)return[$,N,{},l,c]}let D=t(),[S,A]=cS(D,{hashId:n,hashPriority:f,layer:x?a:void 0,path:r.join("-"),transformers:g,linters:v}),I=f5(S,w||!1),j=OP(k,I);return[I,j,A,l,c]},(C,D)=>{let[,S]=C;D&&sS&&ov(S,{mark:Ks,attachTo:h})},C=>{let[D,S,A,,I]=C;if(F&&D!==NP){let j={mark:Ks,prepend:x?!1:"queue",attachTo:h,priority:I};j=t4(j,o);let $=[],N=[];Object.keys(A).forEach(O=>{O.startsWith("@layer")?$.push(O):N.push(O)}),$.forEach(O=>{Kd(f5(A[O],w||!1),`_layer-${O}`,{...j,prepend:!0})});let P=Kd(D,S,j);P[pc]=y.instanceId,N.forEach(O=>{Kd(f5(A[O],w||!1),`_effect-${O}`,j)})}})}var Aee=(e,t,r)=>{let[n,a,o,l,c]=e,{plain:d,autoPrefix:f}=r||{};if(l)return null;let h=n,g={"data-rc-order":"prependQueue","data-rc-priority":`${c}`};return h=v5(n,void 0,a,g,d),o&&Object.keys(o).forEach(v=>{if(!t[v]){t[v]=!0;let y=f5(o[v],f||!1),x=v5(y,void 0,`_effect-${v}`,g,d);v.startsWith("@layer")?h=x+h:h+=x}}),[c,a,h]},LP="cssVar",$ee=(e,t)=>{let{key:r,prefix:n,unitless:a,ignore:o,token:l,hashId:c,scope:d,nonce:f}=e,{cache:{instanceId:h},container:g,hashPriority:v}=(0,ree.useContext)(xc),{_tokenKey:y}=l,x=Array.isArray(d)?d.join("@@"):d,w=[...e.path,r,x,y];return r4(LP,w,()=>{let k=t(),[F,C]=DP(k,r,{prefix:n,unitless:a,ignore:o,scope:d,hashPriority:v,hashCls:c}),D=OP(w,C);return[F,C,D,r]},([,,k])=>{sS&&ov(k,{mark:Ks,attachTo:g})},([,k,F])=>{if(!k)return;let C={mark:Ks,prepend:"queue",attachTo:g,priority:-999};C=t4(C,f);let D=Kd(k,F,C);D[pc]=h,D.setAttribute(I5,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}`},f=v5(n,o,a,d,l);return[c,a,f]},Iee=$ee,W4e={[zP]:Aee,[AP]:tee,[LP]: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}},St=Mee;function Bm(e){return e.notSplit=!0,e}var U4e={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:Bm(["borderTop","borderBottom"]),borderBlockStart:Bm(["borderTop"]),borderBlockEnd:Bm(["borderBottom"]),borderInline:Bm(["borderLeft","borderRight"]),borderInlineStart:Bm(["borderLeft"]),borderInlineEnd:Bm(["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(_()),mv={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"},Nee={...mv,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=Nee,Pee={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"},ua=Math.round;function P8(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 tN=(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 HP{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=Pee[a.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(t instanceof HP)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=ua(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:ua(o("r")),g:ua(o("g")),b:ua(o("b")),a:ua(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=>ua((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=ua(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=ua(this.getHSLSaturation()*100),n=ua(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=ua(n*255);this.r=y,this.g=y,this.b=y;return}let l=0,c=0,d=0,f=o/60,h=(1-Math.abs(2*n-1))*r,g=h*(1-Math.abs(f%2-1));f>=0&&f<1?(l=h,c=g):f>=1&&f<2?(l=g,c=h):f>=2&&f<3?(c=h,d=g):f>=3&&f<4?(c=g,d=h):f>=4&&f<5?(l=g,d=h):f>=5&&f<6&&(l=h,d=g);let v=n-h/2;this.r=ua((l+v)*255),this.g=ua((c+v)*255),this.b=ua((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=ua(n*255);if(this.r=l,this.g=l,this.b=l,r<=0)return;let c=o/60,d=Math.floor(c),f=c-d,h=ua(n*(1-r)*255),g=ua(n*(1-r*f)*255),v=ua(n*(1-r*(1-f))*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=P8(t,tN);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=P8(t,tN);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=P8(t,(n,a)=>a.includes("%")?ua(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}},Qw=2,rN=.16,Ree=.05,Oee=.05,zee=.15,qP=5,WP=4,Lee=[{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 nN(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Qw*t:Math.round(e.h)+Qw*t:n=r?Math.round(e.h)+Qw*t:Math.round(e.h)-Qw*t,n<0?n+=360:n>=360&&(n-=360),n}function aN(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-rN*t:t===WP?n=e.s+rN:n=e.s+Ree*t,n>1&&(n=1),r&&t===qP&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function iN(e,t,r){let n;return r?n=e.v+Oee*t:n=e.v-zee*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function qm(e,t={}){let r=[],n=new nn(e),a=n.toHsv();for(let o=qP;o>0;o-=1){let l=new nn({h:nN(a,o,!0),s:aN(a,o,!0),v:iN(a,o,!0)});r.push(l)}r.push(n);for(let o=1;o<=WP;o+=1){let l=new nn({h:nN(a,o),s:aN(a,o),v:iN(a,o)});r.push(l)}return t.theme==="dark"?Lee.map(({index:o,amount:l})=>new nn(t.backgroundColor||"#141414").mix(r[o],l).toHexString()):r.map(o=>o.toHexString())}var p5={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"},fS=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];fS.primary=fS[5];var pS=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];pS.primary=pS[5];var mS=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];mS.primary=mS[5];var Om=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Om.primary=Om[5];var hS=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];hS.primary=hS[5];var gS=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];gS.primary=gS[5];var vS=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];vS.primary=vS[5];var bS=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];bS.primary=bS[5];var yS=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];yS.primary=yS[5];var wS=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];wS.primary=wS[5];var xS=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];xS.primary=xS[5];var ES=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ES.primary=ES[5];var kS=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];kS.primary=kS[5];var R8={red:fS,volcano:pS,orange:mS,gold:Om,yellow:hS,lime:gS,green:vS,cyan:bS,blue:yS,geekblue:wS,purple:xS,magenta:ES,grey:kS},oN=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];oN.primary=oN[5];var sN=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];sN.primary=sN[5];var lN=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];lN.primary=lN[5];var uN=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];uN.primary=uN[5];var cN=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];cN.primary=cN[5];var dN=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];dN.primary=dN[5];var fN=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];fN.primary=fN[5];var pN=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];pN.primary=pN[5];var mN=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];mN.primary=mN[5];var hN=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];hN.primary=hN[5];var gN=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];gN.primary=gN[5];var vN=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];vN.primary=vN[5];var bN=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];bN.primary=bN[5];var li=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function N5(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){let{colorSuccess:n,colorWarning:a,colorError:o,colorInfo:l,colorPrimary:c,colorBgBase:d,colorTextBase:f}=e,h=t(c),g=t(n),v=t(a),y=t(o),x=t(l),w=r(d,f),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]}}),{...w,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:x[1],colorInfoBgHover:x[2],colorInfoBorder:x[3],colorInfoBorderHover:x[4],colorInfoHover:x[4],colorInfo:x[6],colorInfoActive:x[7],colorInfoTextHover:x[8],colorInfoText:x[9],colorInfoTextActive:x[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 Uee=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},P5=Uee;function Wm(e){return(e+8)/e}function Vee(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:Wm(r)}))}var Gee=e=>{let t=Vee(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],f=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:f,lineHeightSM:d,fontHeight:Math.round(c*a),fontHeightLG:Math.round(f*l),fontHeightSM:Math.round(d*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},R5=Gee;function Kee(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(),Im=(e,t)=>new nn(e).darken(t).toHexString(),Xee=e=>{let t=qm(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]}},Qee=(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:Im(n,4),colorBgContainer:Im(n,0),colorBgElevated:Im(n,0),colorBgSpotlight:Io(a,.85),colorBgBlur:"transparent",colorBorder:Im(n,15),colorBorderDisabled:Im(n,15),colorBorderSecondary:Im(n,6)}};function Um(e){p5.pink=p5.magenta,R8.pink=R8.magenta;let t=Object.keys(mv).map(r=>{let n=e[r]===p5[r]?R8[r]:qm(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,...N5(e,{generateColorPalettes:Xee,generateNeutralColorPalettes:Qee}),...R5(e.fontSize),...Kee(e),...P5(e),...Wee(e)}}var Yee=Pm(Um),hv=Yee,Yd={token:vc,override:{override:vc},hashed:!0},gv=_ee.default.createContext(Yd);function O8(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 f=.01;f<=1;f+=.01){let h=Math.round((r-l*(1-f))/f),g=Math.round((n-c*(1-f))/f),v=Math.round((a-d*(1-f))/f);if(O8(h)&&O8(g)&&O8(v))return new nn({r:h,g,b:v,a:Math.round(f*100)/100}).toRgbString()}return new nn({r,g:n,b:a,a:1}).toRgbString()}var Vd=Zee;function O5(e){let{override:t,...r}=e,n={...t};Object.keys(vc).forEach(w=>{delete n[w]});let a={...r,...n},o=new nn(a.colorShadow),l=o.a,c=w=>o.clone().setA(l*w).toRgbString(),d=480,f=576,h=768,g=992,v=1200,y=1600,x=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:Vd(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:Vd(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:Vd(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:Vd(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:f-1,screenSM:f,screenSMMin:f,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:x-1,screenXXXL:x,screenXXXLMin:x,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 UP={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},VP=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:a,...o}=t,l={...n,override:a};return l=O5(l),o&&Object.entries(o).forEach(([c,d])=>{let{theme:f,...h}=d,g=h;f&&(g=VP({...l,...h},{override:h},f)),l[c]=g}),l};function ui(){let{token:e,hashed:t,theme:r,override:n,cssVar:a,zeroRuntime:o}=q_.default.useContext(gv),{csp:l,getPrefixCls:c}=q_.default.useContext(wt),d={prefix:a?.prefix??c(),key:a?.key??"css-var-root"},f=`${jee}-${t||""}`,h=r||hv,[g,v,y]=$P(h,[vc,e],{salt:f,override:n,getComputedToken:VP,cssVar:{...d,unitless:UP,ignore:Jee,preserve:ete},nonce:l?.nonce});return[h,y,t?v:"",g,d,!!o]}function ps(e){"@babel/helpers - typeof";return ps=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},ps(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,f=!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){f=!0,a=h}finally{try{if(!d&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(f)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 i4(e,t){return tte(e)||rte(e,t)||xP(e,t)||nte()}function ate(e,t){if(ps(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ps(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GP(e){var t=ate(e,"string");return ps(t)=="symbol"?t:t+""}function Mo(e,t,r){return(t=GP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yN(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 Di(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yN(Object(r),!0).forEach(function(n){Mo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yN(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 wN(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,GP(n.key),n)}}function au(e,t,r){return t&&wN(e.prototype,t),r&&wN(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function iv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CS(e,t){return CS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},CS(e,t)}function vv(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&&CS(e,t)}function bc(e){return bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bc(e)}function bv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bv=function(){return!!e})()}function z5(e,t){if(t&&(ps(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iv(e)}function KP(e){var t=bv();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 z5(this,r)}}var ote=au(function e(){nu(this,e)}),XP=ote,QP="CALC_UNIT",ste=new RegExp(QP,"g");function z8(e){return typeof e=="number"?"".concat(e).concat(QP):e}var lte=(function(e){vv(r,e);var t=KP(r);function r(n,a){var o;nu(this,r),o=t.call(this),Mo(iv(o),"result",""),Mo(iv(o),"unitlessCssVar",void 0),Mo(iv(o),"lowPriority",void 0);var l=ps(n);return o.unitlessCssVar=a,n instanceof r?o.result="(".concat(n.result,")"):l==="number"?o.result=z8(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(z8(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(z8(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})(XP),ute=(function(e){vv(r,e);var t=KP(r);function r(n){var a;return nu(this,r),a=t.call(this),Mo(iv(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})(XP),cte=ute,dte=function(e,t){var r=e==="css"?lte:cte;return function(n){return new r(n,t)}},fte=dte,pte=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("-"))},xN=pte;function mte(e,t,r,n){var a=Di({},t[e]);if(n!=null&&n.deprecatedTokens){var o=n.deprecatedTokens;o.forEach(function(c){var d=i4(c,2),f=d[0],h=d[1];if(a!=null&&a[f]||a!=null&&a[h]){var g;(g=a[h])!==null&&g!==void 0||(a[h]=a?.[f])}})}var l=Di(Di({},r),a);return Object.keys(l).forEach(function(c){l[c]===t[c]&&delete l[c]}),l}var EN=mte,YP=typeof CSSINJS_STATISTIC<"u",SS=!0;function Nt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!YP)return Object.assign.apply(Object,[{}].concat(t));SS=!1;var n={};return t.forEach(function(a){if(ps(a)==="object"){var o=Object.keys(a);o.forEach(function(l){Object.defineProperty(n,l,{configurable:!0,enumerable:!0,get:function(){return a[l]}})})}}),SS=!0,n}var kN={};function hte(){}var gte=function(e){var t,r=e,n=hte;return YP&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(a,o){if(SS){var l;(l=t)===null||l===void 0||l.add(o)}return a[o]}}),n=function(a,o){var l;kN[a]={global:Array.from(t),component:Di(Di({},(l=kN[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(Nt(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}var CN=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&&ps(a)==="object"?"obj_".concat(r.getObjectID(a)):"".concat(ps(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})(),SN=new kte;function Cte(e,t){return xte.default.useMemo(function(){var r=SN.get(t);if(r)return r;var n=e();return SN.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,x,w){var k=Array.isArray(v)?v[0]:v;function F($){return"".concat(String(k)).concat($.slice(0,1).toUpperCase()).concat($.slice(1))}var C=w?.unitless||{},D=typeof c=="function"?c(v):{},S=Di(Di({},D),{},Mo({},F("zIndexPopup"),!0));Object.keys(C).forEach(function($){S[F($)]=C[$]});var A=Di(Di({},w),{},{unitless:S,prefixToken:F}),I=h(v,y,x,A),j=f(k,x,A);return function($){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,P=I($,N),O=w?.extraCssVarPrefixCls,V=typeof O=="function"?O({prefixCls:$,rootCls:N}):O,H=j(V!=null&&V.length?[N].concat(Xr(V)):N);return[P,H]}}function f(v,y,x){var w=x.unitless,k=x.prefixToken,F=x.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:w,ignore:F,token:A,scope:C,nonce:function(){return I.nonce}},function(){var j=CN(v,A,y),$=EN(v,A,j,{deprecatedTokens:x?.deprecatedTokens});return j&&Object.keys(j).forEach(function(N){$[k(N)]=$[N],delete $[N]}),$}),S?.key}}function h(v,y,x){var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=Array.isArray(v)?v:[v,v],F=i4(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,N=j.realToken,P=j.hashId,O=j.token,V=j.cssVar,H=j.zeroRuntime,q=(0,ite.useMemo)(function(){return H},[]);if(q)return P;var L=a(),R=L.rootPrefixCls,W=L.iconPrefixCls,z=r(),Q="css",K=Ste(function(){var Y=new Set;return Object.keys(w.unitless||{}).forEach(function(re){Y.add(u5(re,V.prefix)),Y.add(u5(re,xN(C,V.prefix)))}),fte(Q,Y)},[Q,C,V?.prefix]),Z=wte(Q),T=Z.max,U=Z.min,X={theme:$,token:O,hashId:P,nonce:function(){return z.nonce},clientOnly:w.clientOnly,layer:S,order:w.order||-999};return typeof o=="function"&&dS(Di(Di({},X),{},{clientOnly:!1,path:["Shared",R]}),function(){return o(O,{prefix:{rootPrefixCls:R,iconPrefixCls:W},csp:z})}),dS(Di(Di({},X),{},{path:[D,A,W]}),function(){if(w.injectStyle===!1)return[];var Y=vte(O),re=Y.token,J=Y.flush,se=CN(C,N,x),me=".".concat(A),le=EN(C,N,se,{deprecatedTokens:w.deprecatedTokens});se&&ps(se)==="object"&&Object.keys(se).forEach(function(ye){se[ye]="var(".concat(u5(ye,xN(C,V.prefix)),")")});var he=Nt(re,{componentCls:me,prefixCls:A,iconCls:".".concat(W),antCls:".".concat(R),calc:K,max:T,min:U},se),ae=y(he,{hashId:P,prefixCls:A,rootPrefixCls:R,iconPrefixCls:W});J(C,le);var ce=typeof l=="function"?l(he,A,I,w.resetFont):null;return[w.resetStyle===!1?null:ce,ae]}),P}}function g(v,y,x){var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=h(v,y,x,Di({resetStyle:!1,order:-998},w)),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 ZP=Ate,FN=B(_()),Zd={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},pr=(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}),yv=()=>({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 St("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),o4=()=>({"&::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(", ")}),Bi=(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},...Bi(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}}},JP=e=>({[`.${e}`]:{...yv(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:$te,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),L5=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Bi(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:kt,genComponentStyleHook:s4,genSubStyleComponent:Vm}=ZP({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,FN.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,FN.useContext)(wt);return e??{}},getResetStyles:(e,t)=>{let r=Bte(e);return[r,{"&":r},JP(t?.prefix.iconPrefixCls??B5)]},getCommonStyle:Ite,getCompUnitless:()=>UP}),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 dS({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>JP(e))},Tte=Mte,L8=B(_()),jte=B(_()),_te=(0,jte.createContext)(void 0),l4=_te,Nte={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"},eR=Nte,Pte={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},Rte={...Pte,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"},Ote=Rte,zte={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},tR=zte,Lte={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"],...Ote},timePickerLocale:{...tR}},u4=Lte,rR=u4,ro="${label} is not a valid ${type}",Hte={locale:"en",Pagination:eR,DatePicker:u4,TimePicker:tR,Calendar:rR,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=L8.useContext(l4),n=L8.useMemo(()=>{let o=t||tu[e],l=r?.[e]??{};return{...Er(o)?o():o,...l||{}}},[e,t,r]),a=L8.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?tu.locale:o},[r]);return[n,a]},Jd=qte,H8=B(_()),m5={...tu.Modal},h5=[],DN=()=>h5.reduce((e,t)=>({...e,...t}),tu.Modal);function Wte(e){if(e){let t={...e};return h5.push(t),m5=DN(),()=>{h5=h5.filter(r=>r!==t),m5=DN()}}m5={...tu.Modal}}function Ute(){return m5}var Vte="internalMark",Gte=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;H8.useEffect(()=>Wte(t?.Modal),[t]);let a=H8.useMemo(()=>({...t,exist:!0}),[t]);return H8.createElement(l4.Provider,{value:a},r)},Kte=Gte,b5=B(_());function wv(e){return e&&b5.default.isValidElement(e)&&e.type===b5.default.Fragment}var H5=(e,t,r)=>b5.default.isValidElement(e)?b5.default.cloneElement(e,Er(r)?r(e.props||{}):r):t;function mn(e,t){return H5(e,e,t)}var AN=B(_()),Ld=B(_()),Xte=B(tr()),Qte=B(_()),Yte=Qte.createContext(null),nR=Yte,$N=!1;function Zte(e){return typeof e=="boolean"&&($N=e),$N}var Yw=B(_()),BN=[];function Jte(e,t){let[r]=Yw.useState(()=>Pa()?document.createElement("div"):null),n=Yw.useRef(!1),a=Yw.useContext(nR),[o,l]=Yw.useState(BN),c=a||(n.current?void 0:h=>{l(g=>[h,...g])});function d(){r.parentElement||document.body.appendChild(r),n.current=!0}function f(){r.parentElement?.removeChild(r),n.current=!1}return er(()=>(e?a?a(d):d():f(),f),[e]),er(()=>{o.length&&(o.forEach(h=>h()),l(BN))},[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()}`,IN=0;function nre(e){let t=!!e,[r]=ere.useState(()=>(IN+=1,`${rre}_${IN}`));er(()=>{if(t){let n=eJ(document.body).width,a=tre();Kd(`
|
|
76
|
+
html body {
|
|
77
|
+
overflow-y: hidden;
|
|
78
|
+
${a?`width: calc(100% - ${n}px);`:""}
|
|
79
|
+
}`,r)}else ov(r);return()=>{ov(r)}},[t,r])}var MN=B(_()),Gd=[],are=200,aR=0,iR=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-aR<are)return;let t=Gd.length;for(let r=t-1;r>=0;r-=1)Gd[r].onEsc({top:r===t-1,event:e})}},oR=()=>{aR=Date.now()};function ire(){window.addEventListener("keydown",iR),window.addEventListener("compositionend",oR)}function ore(){Gd.length===0&&(window.removeEventListener("keydown",iR),window.removeEventListener("compositionend",oR))}function sre(e,t){let r=Xs(),n=xt(t),a=()=>{Gd.find(l=>l.id===r)||Gd.push({id:r,onEsc:n})},o=()=>{Gd=Gd.filter(l=>l.id!==r)};(0,MN.useMemo)(()=>{e?a():e||o()},[e]),(0,MN.useEffect)(()=>{if(e)return a(),ire(),()=>{o(),ore()}},[e])}var TN=e=>e===!1?!1:!Pa()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,lre=Ld.forwardRef((e,t)=>{let{open:r,autoLock:n,getContainer:a,debug:o,autoDestroy:l=!0,children:c,onEsc:d}=e,[f,h]=Ld.useState(r),g=f||r;Ld.useEffect(()=>{(l||r)&&h(r)},[r,l]);let[v,y]=Ld.useState(()=>TN(a));Ld.useEffect(()=>{let A=TN(a);y(()=>A??null)});let[x,w]=Jte(g&&!v,o),k=v??x;nre(n&&r&&Pa()&&(k===x||k===document.body)),sre(r,d);let F=null;c&&ru(c)&&t&&(F=Qs(c));let C=jo(F,t);if(!g||!Pa()||v===void 0)return null;let D=k===!1||Zte(),S=c;return t&&(S=Ld.cloneElement(c,{ref:C})),Ld.createElement(nR.Provider,{value:w},D?S:(0,Xte.createPortal)(S,k))}),ure=lre,q5=ure,sR=B(_()),Tm=B(_()),jm=B(_()),FS=jm.createContext(null);function cre({children:e,onBatchResize:t}){let r=jm.useRef(0),n=jm.useRef([]),a=jm.useContext(FS),o=jm.useCallback((l,c,d)=>{r.current+=1;let f=r.current;n.current.push({size:l,element:c,data:d}),Promise.resolve().then(()=>{f===r.current&&(t?.(n.current),n.current=[])}),a?.(l,c,d)},[t,a]);return jm.createElement(FS.Provider,{value:o},e)}var q8=B(_()),hc=new Map;function dre(e){e.forEach(t=>{let{target:r}=t;hc.get(r)?.forEach(n=>n(r))})}var W8;function lR(){return W8||(W8=new ResizeObserver(dre)),W8}function fre(e,t){hc.has(e)||(hc.set(e,new Set),lR().observe(e)),hc.get(e).add(t)}function pre(e,t){hc.has(e)&&(hc.get(e).delete(t),hc.get(e).size||(lR().unobserve(e),hc.delete(e)))}function uR(e,t,r,n){let a=q8.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=xt(d=>{let{width:f,height:h}=d.getBoundingClientRect(),{offsetWidth:g,offsetHeight:v}=d,y=Math.floor(f),x=Math.floor(h);if(a.current.width!==y||a.current.height!==x||a.current.offsetWidth!==g||a.current.offsetHeight!==v){let w={width:y,height:x,offsetWidth:g,offsetHeight:v};a.current=w;let k=g===Math.round(f)?f:g,F=v===Math.round(h)?h:v,C={...w,offsetWidth:k,offsetHeight:F};n?.(C,d),Promise.resolve().then(()=>{r?.(C,d)})}}),l=typeof t=="function",c=q8.useRef(0);q8.useEffect(()=>{let d=l?t():t;return d&&e?fre(d,o):e&&l&&(c.current+=1),()=>{d&&pre(d,o)}},[e,l?c.current:t])}function mre(e,t){let{children:r,disabled:n,onResize:a,data:o}=e,l=Tm.useRef(null),c=Tm.useContext(FS),d=typeof r=="function",f=d?r(l):r,h=!d&&Tm.isValidElement(f)&&ru(f),g=h?Qs(f):null,v=jo(g,l),y=()=>C5(l.current);return Tm.useImperativeHandle(t,()=>y()),uR(!n,y,a,(x,w)=>{c?.(x,w,o)}),h?Tm.cloneElement(f,{ref:v}):f}var hre=Tm.forwardRef(mre),gre=hre;function DS(){return DS=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},DS.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 sR.createElement(gre,DS({},e,{key:o,ref:a===0?t:void 0}),n)})}var cR=sR.forwardRef(bre);cR.Collection=cre;var ka=cR,Kr=B(_()),uc=B(_()),yre=B(_()),AS=B(_()),dR=AS.createContext({}),wre=e=>{let{children:t,...r}=e,n=AS.useMemo(()=>({motion:r.motion}),[r.motion]);return AS.createElement(dR.Provider,{value:n},t)},xre=wre,Zw=B(_()),Hd=B(_()),Gs="none",Jw="appear",e5="enter",t5="leave",jN="none",ds="prepare",Wd="start",Ud="active",fR="prepared",Ere=B(_()),kre=B(_());function _N(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:_N("Animation","AnimationEnd"),transitionend:_N("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var Sre=Cre(Pa(),typeof window<"u"?window:{}),pR={};Pa()&&({style:pR}=document.createElement("div"));var r5={};function mR(e){if(r5[e])return r5[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 pR)return r5[e]=t[o],r5[e]}}return""}var hR=mR("animationend"),gR=mR("transitionend"),vR=!!(hR&&gR),NN=hR||"animationend",PN=gR||"transitionend";function RN(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(PN,e),a.removeEventListener(NN,e))}function n(a){t.current&&t.current!==a&&r(t.current),a&&a!==t.current&&(a.addEventListener(PN,e),a.addEventListener(NN,e),t.current=a)}return Ere.useEffect(()=>()=>{r(t.current),t.current=null},[]),[n,r]}),ON=B(_()),Dre=Pa()?ON.useLayoutEffect:ON.useEffect,bR=Dre,Are=B(_()),zN=B(_()),$re=(()=>{let e=zN.useRef(null);function t(){fr.cancel(e.current)}function r(n,a=2){t();let o=fr(()=>{a<=1?n({isCanceled:()=>o!==e.current}):r(n,a-1)});e.current=o}return zN.useEffect(()=>()=>{t()},[]),[r,t]}),Bre=[ds,Wd,Ud,"end"],Ire=[ds,fR],yR=!1,Mre=!0;function wR(e){return e===Ud||e==="end"}var Tre=((e,t,r)=>{let[n,a]=iP(jN),[o,l]=$re();function c(){a(ds,!0)}let d=t?Ire:Bre;return bR(()=>{if(n!==jN&&n!=="end"){let f=d.indexOf(n),h=d[f+1],g=r(n);g===yR?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:f,onLeavePrepare:h,onAppearStart:g,onEnterStart:v,onLeaveStart:y,onAppearActive:x,onEnterActive:w,onLeaveActive:k,onAppearEnd:F,onEnterEnd:C,onLeaveEnd:D,onVisibleChanged:S}){let[A,I]=Zw.useState(),[j,$]=cP(Gs),[N,P]=Zw.useState([null,null]),O=j(),V=(0,Hd.useRef)(!1),H=(0,Hd.useRef)(null);function q(){return r()}let L=(0,Hd.useRef)(!1);function R(){$(Gs),P([null,null])}let W=xt(se=>{let me=j();if(me===Gs)return;let le=q();if(se&&!se.deadline&&se.target!==le)return;let he=L.current,ae;me===Jw&&he?ae=F?.(le,se):me===e5&&he?ae=C?.(le,se):me===t5&&he&&(ae=D?.(le,se)),he&&ae!==!1&&R()}),[z]=Fre(W),Q=se=>{switch(se){case Jw:return{[ds]:d,[Wd]:g,[Ud]:x};case e5:return{[ds]:f,[Wd]:v,[Ud]:w};case t5:return{[ds]:h,[Wd]:y,[Ud]:k};default:return{}}},K=Zw.useMemo(()=>Q(O),[O]),[Z,T]=Tre(O,!e,se=>{if(se===ds){let me=K[ds];return me?me(q()):yR}return se in K&&P([K[se]?.(q(),null)||null,se]),se===Ud&&O!==Gs&&(z(q()),l>0&&(clearTimeout(H.current),H.current=setTimeout(()=>{W({deadline:!0})},l))),se===fR&&R(),Mre}),U=wR(T);L.current=U;let X=(0,Hd.useRef)(null);bR(()=>{if(V.current&&X.current===t)return;I(t);let se=V.current;V.current=!0;let me;!se&&t&&a&&(me=Jw),se&&t&&n&&(me=e5),(se&&!t&&o||!se&&c&&!t&&o)&&(me=t5);let le=Q(me);me&&(e||le[ds])?($(me),Z()):$(Gs),X.current=t},[t]),(0,Hd.useEffect)(()=>{(O===Jw&&!a||O===e5&&!n||O===t5&&!o)&&$(Gs)},[a,n,o]),(0,Hd.useEffect)(()=>()=>{V.current=!1,clearTimeout(H.current)},[]);let Y=Zw.useRef(!1);(0,Hd.useEffect)(()=>{A&&(Y.current=!0),A!==void 0&&O===Gs&&((Y.current||A)&&S?.(A),Y.current=!0)},[A,O]);let re=N[0];K[ds]&&T===Wd&&(re={transition:"none",...re});let J=N[1];return[j,T,re,A??t,!V.current&&O===Gs&&e&&a?"NONE":T===Wd||T===Ud?J===T:!0]}function xR(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:f,motionName:h,leavedClassName:g,eventProps:v}=a,{motion:y}=uc.useContext(dR),x=r(a,y),w=(0,yre.useRef)();function k(){return C5(w.current)}let[F,C,D,S,A]=jre(x,l,k,a),I=F(),j=uc.useRef(S);S&&(j.current=!0);let $=uc.useMemo(()=>{let O={};return Object.defineProperties(O,{nativeElement:{enumerable:!0,get:k},inMotion:{enumerable:!0,get:()=>()=>F()!==Gs},enableMotion:{enumerable:!0,get:()=>()=>x}}),O},[]);uc.useImperativeHandle(o,()=>$,[]);let N=uc.useRef(0);A&&(N.current+=1);let P=uc.useMemo(()=>{if(A==="NONE")return null;let O,V={...v,visible:l};if(!f)O=null;else if(I===Gs)S?O=f({...V},w):!c&&j.current&&g?O=f({...V,className:g},w):d||!c&&!g?O=f({...V,style:{display:"none"}},w):O=null;else{let H;C===ds?H="prepare":wR(C)?H="active":C===Wd&&(H="start");let q=RN(h,`${I}-${H}`);O=f({...V,className:te(RN(h,I),{[q]:q&&H,[h]:typeof h=="string"}),style:D},w)}return O},[N.current]);if(xR(f)&&fP(P)){let O=Qs(P);if(O!==w)return uc.cloneElement(P,{ref:ln(O,w)})}return P});return n.displayName="CSSMotion",n}var ER=_re(vR),n5=B(_()),$S="keep",BS="remove",U8="removed";function Nre(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function IS(e=[]){return e.map(Nre)}function Pre(e=[],t=[]){let r=[],n=0,a=t.length,o=IS(e),l=IS(t);o.forEach(d=>{let f=!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:$S}),n+=1,f=!0;break}}f||r.push({...d,status:BS})}),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:f,status:h})=>f!==d||h!==BS),r.forEach(f=>{f.key===d&&(f.status=$S)})}),r}function MS(){return MS=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},MS.apply(this,arguments)}var Rre=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Ore(e,t=ER){class r extends n5.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:U8})}),()=>{let{keyEntities:o}=this.state;o.filter(({status:l})=>l!==U8).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})})}static getDerivedStateFromProps({keys:a},{keyEntities:o}){let l=IS(a);return{keyEntities:Pre(o,l).filter(c=>{let d=o.find(({key:f})=>c.key===f);return!(d&&d.status===U8&&c.status===BS)})}}render(){let{keyEntities:a}=this.state,{component:o,children:l,onVisibleChanged:c,onAllRemoved:d,...f}=this.props,h=o||n5.Fragment,g={};return Rre.forEach(v=>{g[v]=f[v],delete f[v]}),delete f.keys,n5.createElement(h,f,a.map(({status:v,...y},x)=>{let w=v==="add"||v===$S;return n5.createElement(t,MS({},g,{key:y.key,visible:w,eventProps:y,onVisibleChanged:k=>{c?.(k,{key:y.key}),k||this.removeKey(y.key)}}),xR(l)?k=>l({...k,index:x}):(k,F)=>l({...k,index:x},F))}))}}return oe(r,"defaultProps",{component:"div"}),r}var zre=Ore(vR),Qn=ER,Vs=B(_()),LN=B(_());function Lre(e){let{prefixCls:t,align:r,arrow:n,arrowPos:a}=e,{className:o,content:l,style:c}=n||{},{x:d=0,y:f=0}=a,h=LN.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],x=v[0],w=v[1],k=y[0],F=y[1];x===k||!["t","b"].includes(x)?g.top=f:x==="t"?g.top=0:g.bottom=0,w===F||!["l","r"].includes(w)?g.left=d:w==="l"?g.left=0:g.right=0}return LN.createElement("div",{ref:h,className:te(`${t}-arrow`,o),style:{...g,...c}},l)}var HN=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)}function Hre(e){let{prefixCls:t,open:r,zIndex:n,mask:a,motion:o,mobile:l}=e;return a?HN.createElement(Qn,TS({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),({className:c})=>HN.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),Ure=Wre;function kR(e,t,r,n,a,o,l,c){let d="auto",f=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?(f.right=a,f.left=d):(f.left=l,f.right=d),y?(f.bottom=o,f.top=d):(f.top=c,f.bottom=d)}return f}function jS(){return jS=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},jS.apply(this,arguments)}var Vre=Vs.forwardRef((e,t)=>{let{onEsc:r,popup:n,className:a,prefixCls:o,style:l,target:c,onVisibleChanged:d,open:f,keepDom:h,fresh:g,onClick:v,mask:y,arrow:x,arrowPos:w,align:k,motion:F,maskMotion:C,mobile:D,forceRender:S,getPopupContainer:A,autoDestroy:I,portal:j,children:$,zIndex:N,onMouseEnter:P,onMouseLeave:O,onPointerEnter:V,onPointerDownCapture:H,ready:q,offsetX:L,offsetY:R,offsetR:W,offsetB:z,onAlign:Q,onPrepare:K,onResize:Z,stretch:T,targetWidth:U,targetHeight:X}=e,Y=typeof n=="function"?n():n,re=f||h,J=!!D,[se,me,le]=Vs.useMemo(()=>D?[D.mask,D.maskMotion,D.motion]:[y,C,F],[D,y,C,F]),he=A?.length>0,[ae,ce]=Vs.useState(!A||!he);er(()=>{!ae&&he&&c&&ce(!0)},[ae,he,c]);let ye=xt((ke,Ce)=>{Z?.(ke,Ce),Q()}),Te=kR(J,q,f,k,W,z,L,R);if(!ae)return null;let De={};return T&&(T.includes("height")&&X?De.height=X:T.includes("minHeight")&&X&&(De.minHeight=X),T.includes("width")&&U?De.width=U:T.includes("minWidth")&&U&&(De.minWidth=U)),f||(De.pointerEvents="none"),Vs.createElement(j,{open:S||re,getContainer:A&&(()=>A(c)),autoDestroy:I,onEsc:r},Vs.createElement(Hre,{prefixCls:o,open:f,zIndex:N,mask:se,motion:me,mobile:J}),Vs.createElement(ka,{onResize:ye,disabled:!f},ke=>Vs.createElement(Qn,jS({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:S,leavedClassName:`${o}-hidden`},le,{onAppearPrepare:K,onEnterPrepare:K,visible:f,onVisibleChanged:Ce=>{F?.onVisibleChanged?.(Ce),d(Ce)}}),({className:Ce,style:Le},$e)=>{let Be=te(o,Ce,a,{[`${o}-mobile`]:J});return Vs.createElement("div",{ref:ln(ke,t,$e),className:Be,style:{"--arrow-x":`${w.x||0}px`,"--arrow-y":`${w.y||0}px`,...Te,...De,...Le,boxSizing:"border-box",zIndex:N,...l},onMouseEnter:P,onMouseLeave:O,onPointerEnter:V,onClick:v,onPointerDownCapture:H},x&&Vs.createElement(Lre,{prefixCls:o,arrow:x,arrowPos:w,align:k}),Vs.createElement(Ure,{cache:!f&&!g},Y))})),$)}),CR=Vre,SR=B(_()),Gre=SR.createContext(null),y5=Gre,FR=SR.createContext(null),Kre=B(_());function qN(e){return e?Array.isArray(e)?e:[e]:[]}function Xre(e,t,r){return Kre.useMemo(()=>{let n=qN(t??e),a=qN(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 a5=B(_());function Qre(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 DR(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(Qre(e[c]?.points,a,n))return`${t}-placement-${c}`}return""}function xv(e){return e.ownerDocument.defaultView}function _S(e){let t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];for(;r;){let{overflowX:a,overflowY:o,overflow:l}=xv(r).getComputedStyle(r);[a,o,l].some(c=>n.includes(c))&&t.push(r),r=r.parentElement}return t}function cv(e,t=1){return Number.isNaN(e)?t:e}function Zg(e){return cv(parseFloat(e),0)}function WN(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:f}=xv(n).getComputedStyle(n),h=n.getBoundingClientRect(),{offsetHeight:g,clientHeight:v,offsetWidth:y,clientWidth:x}=n,w=Zg(l),k=Zg(c),F=Zg(d),C=Zg(f),D=cv(Math.round(h.width/y*1e3)/1e3),S=cv(Math.round(h.height/g*1e3)/1e3),A=(y-x-F-C)*D,I=(g-v-w-k)*S,j=w*S,$=k*S,N=F*D,P=C*D,O=0,V=0;if(a==="clip"){let W=Zg(o);O=W*D,V=W*S}let H=h.x+N-O,q=h.y+j-V,L=H+h.width+2*O-N-P-A,R=q+h.height+2*V-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,R)}),r}function UN(e,t=0){let r=`${t}`,n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function VN(e,t){let[r,n]=t||[];return[UN(e.width,r),UN(e.height,n)]}function GN(e=""){return[e[0],e[1]]}function Mm(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 KN(e){return e.join("")}function AR(e,t,r,n,a,o,l,c){let[d,f]=a5.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[n]||{}}),h=a5.useRef(0),g=a5.useMemo(()=>!t||c?[]:_S(t),[t]),v=a5.useRef({});e||(v.current={});let y=xt(()=>{if(t&&r&&e&&!c){let k=function(mt,Wn,Un=ke){let Vn=R.x+mt,Cd=R.y+Wn,is=Vn+re,zs=Cd+Y,yi=Math.max(Vn,Un.left),va=Math.max(Cd,Un.top),Up=Math.min(is,Un.right),ig=Math.min(zs,Un.bottom);return Math.max(0,(Up-yi)*(ig-va))},F=function(){Re=R.y+rt,Ye=Re+Y,it=R.x+je,ze=it+re},C=t,D=C.ownerDocument,S=xv(C),{position:A}=S.getComputedStyle(C),I=C.style.left,j=C.style.top,$=C.style.right,N=C.style.bottom,P=C.style.overflow,O=C.style.overflowX,V=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 R=C.getBoundingClientRect(),{height:W,width:z}=S.getComputedStyle(C);R.x=R.x??R.left,R.y=R.y??R.top;let{clientWidth:Q,clientHeight:K,scrollWidth:Z,scrollHeight:T,scrollTop:U,scrollLeft:X}=D.documentElement,Y=R.height,re=R.width,J=L.height,se=L.width,me={left:0,top:0,right:Q,bottom:K},le={left:-X,top:-U,right:Z-X,bottom:T-U},{htmlRegion:he}=H,ae="visible",ce="visibleFirst";he!=="scroll"&&he!==ce&&(he=ae);let ye=he===ce,Te=WN(le,g),De=WN(me,g),ke=he===ae?De:Te,Ce=ye?De:ke;C.style.left="auto",C.style.top="auto",C.style.right="0",C.style.bottom="0";let Le=C.getBoundingClientRect();C.style.left=I,C.style.top=j,C.style.right=$,C.style.bottom=N,C.style.overflow=P,C.style.overflowX=O,C.style.overflowY=V,C.parentElement?.removeChild(q);let $e=cv(Math.round(re/parseFloat(z)*1e3)/1e3),Be=cv(Math.round(Y/parseFloat(W)*1e3)/1e3);if($e===0||Be===0||Nm(r)&&!dv(r))return;let{offset:Me,targetOffset:Ve}=H,[qe,Ie]=VN(R,Me),[Pe,Je]=VN(L,Ve);L.x-=Pe,L.y-=Je;let[gt,et]=H.points||[],Ue=GN(et),Fe=GN(gt),_e=Mm(L,Ue),dt=Mm(R,Fe),at={...H},Ge=[Fe,Ue],je=_e.x-dt.x+qe,rt=_e.y-dt.y+Ie,Bt=k(je,rt),It=k(je,rt,De),Gr=Mm(L,["t","l"]),Ht=Mm(R,["t","l"]),$r=Mm(L,["b","r"]),Kt=Mm(R,["b","r"]),Ft=H.overflow||{},{adjustX:ar,adjustY:Cr,shiftX:Ot,shiftY:ot}=Ft,vt=mt=>typeof mt=="boolean"?mt:mt>=0,Re,Ye,it,ze;F();let Ze=vt(Cr),ft=Fe[0]===Ue[0];if(Ze&&Fe[0]==="t"&&(Ye>Ce.bottom||v.current.bt)){let mt=rt;ft?mt-=Y-J:mt=Gr.y-Kt.y-Ie;let Wn=k(je,mt),Un=k(je,mt,De);Wn>Bt||Wn===Bt&&(!ye||Un>=It)?(v.current.bt=!0,rt=mt,Ie=-Ie,Ge=[cc(Ge[0],0),cc(Ge[1],0)]):v.current.bt=!1}if(Ze&&Fe[0]==="b"&&(Re<Ce.top||v.current.tb)){let mt=rt;ft?mt+=Y-J:mt=$r.y-Ht.y-Ie;let Wn=k(je,mt),Un=k(je,mt,De);Wn>Bt||Wn===Bt&&(!ye||Un>=It)?(v.current.tb=!0,rt=mt,Ie=-Ie,Ge=[cc(Ge[0],0),cc(Ge[1],0)]):v.current.tb=!1}let qt=vt(ar),Wt=Fe[1]===Ue[1];if(qt&&Fe[1]==="l"&&(ze>Ce.right||v.current.rl)){let mt=je;Wt?mt-=re-se:mt=Gr.x-Kt.x-qe;let Wn=k(mt,rt),Un=k(mt,rt,De);Wn>Bt||Wn===Bt&&(!ye||Un>=It)?(v.current.rl=!0,je=mt,qe=-qe,Ge=[cc(Ge[0],1),cc(Ge[1],1)]):v.current.rl=!1}if(qt&&Fe[1]==="r"&&(it<Ce.left||v.current.lr)){let mt=je;Wt?mt+=re-se:mt=$r.x-Ht.x-qe;let Wn=k(mt,rt),Un=k(mt,rt,De);Wn>Bt||Wn===Bt&&(!ye||Un>=It)?(v.current.lr=!0,je=mt,qe=-qe,Ge=[cc(Ge[0],1),cc(Ge[1],1)]):v.current.lr=!1}at.points=[KN(Ge[0]),KN(Ge[1])],F();let Jr=Ot===!0?0:Ot;typeof Jr=="number"&&(it<De.left&&(je-=it-De.left-qe,L.x+se<De.left+Jr&&(je+=L.x-De.left+se-Jr)),ze>De.right&&(je-=ze-De.right-qe,L.x>De.right-Jr&&(je+=L.x-De.right+Jr)));let Tr=ot===!0?0:ot;typeof Tr=="number"&&(Re<De.top&&(rt-=Re-De.top-Ie,L.y+J<De.top+Tr&&(rt+=L.y-De.top+J-Tr)),Ye>De.bottom&&(rt-=Ye-De.bottom-Ie,L.y>De.bottom-Tr&&(rt+=L.y-De.bottom+Tr)));let Xt=R.x+je,zr=Xt+re,pt=R.y+rt,Mt=pt+Y,dr=L.x,Cn=dr+se,_a=L.y,lr=_a+J,ri=Math.max(Xt,dr),Na=Math.min(zr,Cn),Sr=(ri+Na)/2-Xt,Mn=Math.max(pt,_a),ha=Math.min(Mt,lr),ur=(Mn+ha)/2-pt;l?.(t,at);let bi=Le.right-R.x-(je+R.width),Gi=Le.bottom-R.y-(rt+R.height);$e===1&&(je=Math.floor(je),bi=Math.floor(bi)),Be===1&&(rt=Math.floor(rt),Gi=Math.floor(Gi));let ga={ready:!0,offsetX:je/$e,offsetY:rt/Be,offsetR:bi/$e,offsetB:Gi/Be,arrowX:Sr/$e,arrowY:ur/Be,scaleX:$e,scaleY:Be,align:at};f(ga)}}),x=()=>{h.current+=1;let k=h.current;Promise.resolve().then(()=>{h.current===k&&y()})},w=()=>{f(k=>({...k,ready:!1}))};return er(w,[n]),er(()=>{e||w()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,x]}var XN=B(_());function $R(){let e=XN.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 XN.useEffect(()=>()=>{t()},[]),r}function Yre(e,t,r,n,a){er(()=>{if(e&&t&&r){let o=function(){n(),a()},l=t,c=r,d=_S(l),f=_S(c),h=xv(c),g=new Set([h,...d,...f]);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 V8=B(_());function Zre(e,t,r,n,a,o,l,c){let d=V8.useRef(e);d.current=e;let f=V8.useRef(!1);V8.useEffect(()=>{if(t&&n&&(!a||o)){let g=()=>{f.current=!1},v=w=>{d.current&&!l(w.composedPath?.()?.[0]||w.target)&&!f.current&&c(!1)},y=xv(n);y.addEventListener("pointerdown",g,!0),y.addEventListener("mousedown",v,!0),y.addEventListener("contextmenu",v,!0);let x=J8(r);return x&&(x.addEventListener("mousedown",v,!0),x.addEventListener("contextmenu",v,!0)),()=>{y.removeEventListener("pointerdown",g,!0),y.removeEventListener("mousedown",v,!0),y.removeEventListener("contextmenu",v,!0),x&&(x.removeEventListener("mousedown",v,!0),x.removeEventListener("contextmenu",v,!0))}}},[t,r,n,a,o]);function h(){f.current=!0}return h}var ii=B(_()),i5=B(_());function Jre(){let[e,t]=i5.default.useState(null),[r,n]=i5.default.useState(!1),[a,o]=i5.default.useState(!1),l=i5.default.useRef(null),c=xt(f=>{f===!1?(l.current=null,n(!1)):a&&r?l.current=f:(n(!0),t(f),l.current=null,r||o(!0))}),d=xt(f=>{f?(o(!1),l.current&&(t(l.current),l.current=null)):(o(!1),l.current=null)});return[c,r,e,d]}var o5=B(_());function NS(){return NS=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},NS.apply(this,arguments)}var ene=e=>{let{prefixCls:t,isMobile:r,ready:n,open:a,align:o,offsetR:l,offsetB:c,offsetX:d,offsetY:f,arrowPos:h,popupSize:g,motion:v,uniqueContainerClassName:y,uniqueContainerStyle:x}=e,w=`${t}-unique-container`,[k,F]=o5.default.useState(!1),C=kR(r,n,a,o,l,c,d,f),D=o5.default.useRef(C);n&&(D.current=C);let S={};return g&&(S.width=g.width,S.height=g.height),o5.default.createElement(Qn,NS({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${w}-hidden`},v,{visible:a,onVisibleChanged:A=>{F(A)}}),({className:A,style:I})=>{let j=te(w,A,y,{[`${w}-visible`]:k});return o5.default.createElement("div",{className:j,style:{"--arrow-x":`${h?.x||0}px`,"--arrow-y":`${h?.y||0}px`,...D.current,...S,...I,...x}})})},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),[f,h]=ii.useState(null),g=ii.useRef(null),v=xt(z=>{g.current=z,Nm(z)&&c!==z&&d(z)}),y=ii.useRef(null),x=$R(),w=xt((z,Q)=>{y.current=Q,x(()=>{r(z)},z.delay)}),k=z=>{x(()=>{y.current?.()||r(!1)},z)},F=xt(z=>{o(z)}),[C,D,S,A,I,j,$,,,N,P]=AR(n,c,l?.target,l?.popupPlacement,l?.builtinPlacements||{},l?.popupAlign,void 0,!1),O=ii.useMemo(()=>{if(!l)return"";let z=DR(l.builtinPlacements||{},l.prefixCls||"",N,!1);return te(z,l.getPopupClassNameFromAlign?.(N))},[N,l?.getPopupClassNameFromAlign,l?.builtinPlacements,l?.prefixCls]),V=ii.useMemo(()=>({show:w,hide:k}),[]);ii.useEffect(()=>{P()},[l?.target]);let H=xt(()=>(P(),Promise.resolve())),q=ii.useRef({}),L=ii.useContext(y5),R=ii.useMemo(()=>({registerSubPopup:(z,Q)=>{q.current[z]=Q,L?.registerSubPopup(z,Q)}}),[L]),W=l?.prefixCls;return ii.createElement(FR.Provider,{value:V},e,l&&ii.createElement(y5.Provider,{value:R},ii.createElement(CR,{ref:v,portal:q5,onEsc:l.onEsc,prefixCls:W,popup:l.popup,className:te(l.popupClassName,O,`${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:P,onPrepare:H,onResize:z=>h({width:z.offsetWidth,height:z.offsetHeight}),arrowPos:{x:j,y:$},align:N,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:N,offsetR:A,offsetB:I,offsetX:D,offsetY:S,arrowPos:{x:j,y:$},popupSize:f,motion:l.popupMotion,uniqueContainerClassName:te(l.uniqueContainerClassName,O),uniqueContainerStyle:l.uniqueContainerStyle}))))},nne=rne,ane=B(tr());function ine(e=q5){return Kr.forwardRef((t,r)=>{let{prefixCls:n="rc-trigger-popup",children:a,action:o="hover",showAction:l,hideAction:c,disabled:d=!1,popupVisible:f,defaultPopupVisible:h,onOpenChange:g,afterOpenChange:v,onPopupVisibleChange:y,afterPopupVisibleChange:x,mouseEnterDelay:w,mouseLeaveDelay:k=.1,focusDelay:F,blurDelay:C,mask:D,maskClosable:S=!0,getPopupContainer:A,forceRender:I,autoDestroy:j,popup:$,popupClassName:N,uniqueContainerClassName:P,uniqueContainerStyle:O,popupStyle:V,popupPlacement:H,builtinPlacements:q={},popupAlign:L,zIndex:R,stretch:W,getPopupClassNameFromAlign:z,fresh:Q,unique:K,alignPoint:Z,onPopupClick:T,onPopupAlign:U,arrow:X,popupMotion:Y,maskMotion:re,mobile:J,...se}=t,me=j||!1,le=f===void 0,he=!!J,ae=Kr.useRef({}),ce=Kr.useContext(y5),ye=Kr.useMemo(()=>({registerSubPopup:(We,Qt)=>{ae.current[We]=Qt,ce?.registerSubPopup(We,Qt)}}),[ce]),Te=Kr.useContext(FR),De=Xs(),[ke,Ce]=Kr.useState(null),Le=Kr.useRef(null),$e=xt(We=>{Le.current=We,Nm(We)&&ke!==We&&Ce(We),ce?.registerSubPopup(De,We)}),[Be,Me]=Kr.useState(null),Ve=Kr.useRef(null),qe=xt(We=>{let Qt=C5(We);Nm(Qt)&&Be!==Qt&&(Me(Qt),Ve.current=Qt)}),Ie={},Pe=xt(We=>{let Qt=Be;return Qt?.contains(We)||J8(Qt)?.host===We||We===Qt||ke?.contains(We)||J8(ke)?.host===We||We===ke||Object.values(ae.current).some(Vp=>Vp?.contains(We)||We===Vp)}),Je=X?{...X!==!0?X:{}}:null,[gt,et]=wr(h||!1,f),Ue=gt||!1,Fe=Ue&&!d,_e=Kr.useMemo(()=>{let We=typeof a=="function"?a({open:Fe}):a;return Kr.Children.only(We)},[a,Fe]),dt=_e?.props||{},at=xt(()=>Fe),Ge=xt((We=0)=>({popup:$,target:Be,delay:We,prefixCls:n,popupClassName:N,uniqueContainerClassName:P,uniqueContainerStyle:O,popupStyle:V,popupPlacement:H,builtinPlacements:q,popupAlign:L,zIndex:R,mask:D,maskClosable:S,popupMotion:Y,maskMotion:re,arrow:Je,getPopupContainer:A,getPopupClassNameFromAlign:z,id:De,onEsc:Gr}));er(()=>{Te&&K&&Be&&!le&&!ce&&(Fe?Te.show(Ge(w),at):Te.hide(k))},[Fe,Be]);let je=Kr.useRef(Fe);je.current=Fe;let rt=xt(We=>{(0,ane.flushSync)(()=>{Ue!==We&&(et(We),g?.(We),y?.(We))})}),Bt=$R(),It=(We,Qt=0)=>{if(f!==void 0){Bt(()=>{rt(We)},Qt);return}if(Te&&K&&le&&!ce){We?Te.show(Ge(Qt),at):Te.hide(Qt);return}Bt(()=>{rt(We)},Qt)};function Gr({top:We}){We&&It(!1)}let[Ht,$r]=Kr.useState(!1);er(We=>{(!We||Fe)&&$r(!0)},[Fe]);let[Kt,Ft]=Kr.useState(null),[ar,Cr]=Kr.useState(null),Ot=We=>{Cr([We.clientX,We.clientY])},[ot,vt,Re,Ye,it,ze,Ze,ft,qt,Wt,Jr]=AR(Fe,ke,Z&&ar!==null?ar:Be,H,q,L,U,he),[Tr,Xt]=Xre(o,l,c),zr=Tr.has("click"),pt=Xt.has("click")||Xt.has("contextMenu"),Mt=xt(()=>{Ht||Jr()});Yre(Fe,Be,ke,Mt,()=>{je.current&&Z&&pt&&It(!1)}),er(()=>{Mt()},[ar,H]),er(()=>{Fe&&!q?.[H]&&Mt()},[JSON.stringify(L)]);let dr=Kr.useMemo(()=>{let We=DR(q,n,Wt,Z);return te(We,z?.(Wt))},[Wt,z,q,n,Z]);Kr.useImperativeHandle(r,()=>({nativeElement:Ve.current,popupElement:Le.current,forceAlign:Mt}));let[Cn,_a]=Kr.useState(0),[lr,ri]=Kr.useState(0),Na=()=>{if(W&&Be){let We=Be.getBoundingClientRect();_a(We.width),ri(We.height)}},Sr=()=>{Na(),Mt()},Mn=We=>{$r(!1),Jr(),v?.(We),x?.(We)},ha=()=>new Promise(We=>{Na(),Ft(()=>We)});er(()=>{Kt&&(Jr(),Kt(),Ft(null))},[Kt]);function ur(We,Qt,Vp,Ki,Gp){Ie[We]=(sg,...lg)=>{(!Gp||!Gp())&&(Ki?.(sg),It(Qt,Vp)),dt[We]?.(sg,...lg)}}let bi=Tr.has("touch"),Gi=Xt.has("touch"),ga=Kr.useRef(!1);(bi||Gi)&&(Ie.onTouchStart=(...We)=>{ga.current=!0,je.current&&Gi?It(!1):!je.current&&bi&&It(!0),dt.onTouchStart?.(...We)}),(zr||pt)&&(Ie.onClick=(We,...Qt)=>{je.current&&pt?It(!1):!je.current&&zr&&(Ot(We),It(!0)),dt.onClick?.(We,...Qt),ga.current=!1});let mt=Zre(Fe,pt||Gi,Be,ke,D,S,Pe,It),Wn=Tr.has("hover"),Un=Xt.has("hover"),Vn,Cd,is=()=>ga.current;if(Wn){let We=Qt=>{Ot(Qt)};ur("onMouseEnter",!0,w,We,is),ur("onPointerEnter",!0,w,We,is),Vn=Qt=>{(Fe||Ht)&&ke?.contains(Qt.target)&&It(!0,w)},Z&&(Ie.onMouseMove=Qt=>{dt.onMouseMove?.(Qt)})}Un&&(ur("onMouseLeave",!1,k,void 0,is),ur("onPointerLeave",!1,k,void 0,is),Cd=()=>{It(!1,k)}),Tr.has("focus")&&ur("onFocus",!0,F),Xt.has("focus")&&ur("onBlur",!1,C),Tr.has("contextMenu")&&(Ie.onContextMenu=(We,...Qt)=>{je.current&&Xt.has("contextMenu")?It(!1):(Ot(We),It(!0)),We.preventDefault(),dt.onContextMenu?.(We,...Qt)});let zs=Kr.useRef(!1);zs.current||(zs.current=I||Fe||Ht);let yi={...dt,...Ie},va={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(We=>{se[We]&&(va[We]=(...Qt)=>{yi[We]?.(...Qt),se[We](...Qt)})});let Up={x:ze,y:Ze};uR(Fe,Be,Sr);let ig=jo(qe,Qs(_e)),og=Kr.cloneElement(_e,{...yi,...va,ref:ig});return Kr.createElement(Kr.Fragment,null,og,zs.current&&(!Te||!K)&&Kr.createElement(y5.Provider,{value:ye},Kr.createElement(CR,{portal:e,ref:$e,prefixCls:n,popup:$,className:te(N,!he&&dr),style:V,target:Be,onMouseEnter:Vn,onMouseLeave:Cd,onPointerEnter:Vn,zIndex:R,open:Fe,keepDom:Ht,fresh:Q,onClick:T,onPointerDownCapture:mt,mask:D,motion:Y,maskMotion:re,onVisibleChanged:Mn,onPrepare:ha,forceRender:I,autoDestroy:me,getPopupContainer:A,onEsc:Gr,align:Wt,arrow:Je,arrowPos:Up,ready:ot,offsetX:vt,offsetY:Re,offsetR:Ye,offsetB:it,onAlign:Mt,stretch:W,targetWidth:Cn/ft,targetHeight:lr/qt,mobile:J})))})}var Gm=ine(q5),G8=B(_()),one=({children:e})=>{let{getPrefixCls:t}=G8.default.useContext(wt),r=t();return G8.default.isValidElement(e)?G8.default.createElement(Qn,{visible:!0,motionName:`${r}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:a})=>mn(e,o=>({className:te(o.className,a),style:{...o.style,...n}}))):e},sne=one,s5=[null,null];function lne(e){if(s5[0]!==e){let t={};Object.keys(e).forEach(r=>{t[r]={...e[r],dynamicInset:!1}}),s5[0]=e,s5[1]=t}return s5[1]}var une=({children:e})=>{let t=r=>{let{id:n,builtinPlacements:a,popup:o}=r,l=Er(o)?o():o,c=lne(a);return{...r,getPopupContainer:null,arrow:!1,popup:AN.default.createElement(sne,{key:n},l),builtinPlacements:c}};return AN.default.createElement(nne,{postTriggerProps:t},e)},W5=une,PS=B(_()),RS=PS.createContext(!1),BR=({children:e,disabled:t})=>{let r=PS.useContext(RS);return PS.createElement(RS.Provider,{value:t??r},e)},ci=RS,fn=B(_()),cne=B(_()),dne=(0,cne.createContext)({}),Km=dne,fne=B(_()),IR=(0,fne.createContext)(void 0),QN=B(_()),OS=B(_()),zS=OS.createContext(void 0),pne=({children:e,size:t})=>{let r=OS.useContext(zS);return OS.createElement(zS.Provider,{value:t||r},e)},Xm=zS;function mne(){let e=(0,QN.useContext)(ci),t=(0,QN.useContext)(Xm);return{componentDisabled:e,componentSize:t}}var hne=mne,gne=B(_());function vne(e,t,r){let n=$5("ConfigProvider"),a=e||{},o=a.inherit===!1||!t?{...Yd,hashed:t?.hashed??Yd.hashed,cssVar:t?.cssVar,zeroRuntime:t?.zeroRuntime}:t,l=(0,gne.useId)();return Lm(()=>{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,"")}`,f={prefix:r?.prefixCls,...o.cssVar,...a.cssVar,key:a.cssVar?.key||d};return{...o,...a,token:{...o.token,...a.token},components:c,cssVar:f}},[a,o,r?.prefixCls,l],(c,d)=>c.some((f,h)=>{let g=d[h];return!yc(f,g,!0)}))}var tv=B(_()),YN=tv.createContext(!0);function bne(e){let t=tv.useContext(YN),{children:r}=e,[,n]=ui(),{motion:a}=n,o=tv.useRef(!1);return o.current||(o.current=t!==a),o.current?tv.createElement(YN.Provider,{value:a},tv.createElement(xre,{motion:a},r)):r}var V4e=B(_()),yne=()=>null,wne=({iconPrefixCls:e,csp:t})=>(Tte(e,t),null),xne=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],c4,MR,TR,jR;function K8(){return c4||gc}function Ene(){return MR||B5}var kne=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:a}=e;t!==void 0&&(c4=t),r!==void 0&&(MR=r),"holderRender"in e&&(jR=a),n&&(TR=n)},Cne=()=>({getPrefixCls:(e,t)=>t||(e?`${K8()}-${e}`:K8()),getIconPrefixCls:Ene,getRootPrefixCls:()=>c4||K8(),getTheme:()=>TR,holderRender:jR}),Sne=e=>{let{children:t,csp:r,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:c,form:d,locale:f,componentSize:h,direction:g,space:v,splitter:y,virtual:x,dropdownMatchSelectWidth:w,popupMatchSelectWidth:k,popupOverflow:F,legacyLocale:C,parentContext:D,iconPrefixCls:S,theme:A,componentDisabled:I,segmented:j,statistic:$,spin:N,calendar:P,carousel:O,cascader:V,collapse:H,typography:q,checkbox:L,descriptions:R,divider:W,drawer:z,skeleton:Q,steps:K,image:Z,layout:T,list:U,listy:X,mentions:Y,modal:re,progress:J,result:se,slider:me,breadcrumb:le,masonry:he,menu:ae,pagination:ce,input:ye,inputPassword:Te,inputSearch:De,textArea:ke,otp:Ce,empty:Le,badge:$e,borderBeam:Be,radio:Me,rate:Ve,ribbon:qe,switch:Ie,transfer:Pe,avatar:Je,message:gt,tag:et,table:Ue,card:Fe,cardMeta:_e,tabs:dt,timeline:at,timePicker:Ge,upload:je,notification:rt,tree:Bt,colorPicker:It,datePicker:Gr,rangePicker:Ht,flex:$r,wave:Kt,dropdown:Ft,warning:ar,tour:Cr,tooltip:Ot,popover:ot,popconfirm:vt,qrcode:Re,floatButton:Ye,floatButtonGroup:it,variant:ze,inputNumber:Ze,treeSelect:ft,watermark:qt}=e,Wt=fn.useMemo(()=>Ct(f)&&Object.prototype.hasOwnProperty.call(f,"default")&&f.default?.locale?f.default:f,[f]),Jr=fn.useCallback((Sr,Mn)=>{let{prefixCls:ha}=e;if(Mn)return Mn;let ur=ha||D.getPrefixCls("");return Sr?`${ur}-${Sr}`:ur},[D.getPrefixCls,e.prefixCls]),Tr=S||D.iconPrefixCls||B5,Xt=r||D.csp,zr=vne(A,D.theme,{prefixCls:Jr("")}),pt={csp:Xt,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:c,locale:Wt||C,direction:g,space:v,splitter:y,virtual:x,popupMatchSelectWidth:k??w,popupOverflow:F,getPrefixCls:Jr,iconPrefixCls:Tr,theme:zr,segmented:j,statistic:$,spin:N,calendar:P,carousel:O,cascader:V,collapse:H,typography:q,checkbox:L,descriptions:R,divider:W,drawer:z,skeleton:Q,steps:K,image:Z,input:ye,inputPassword:Te,inputSearch:De,textArea:ke,otp:Ce,layout:T,list:U,listy:X,mentions:Y,modal:re,progress:J,result:se,slider:me,breadcrumb:le,masonry:he,menu:ae,pagination:ce,empty:Le,badge:$e,borderBeam:Be,radio:Me,rate:Ve,ribbon:qe,switch:Ie,transfer:Pe,avatar:Je,message:gt,tag:et,table:Ue,card:Fe,cardMeta:_e,tabs:dt,timeline:at,timePicker:Ge,upload:je,notification:rt,tree:Bt,colorPicker:It,datePicker:Gr,rangePicker:Ht,flex:$r,wave:Kt,dropdown:Ft,warning:ar,tour:Cr,tooltip:Ot,popover:ot,popconfirm:vt,qrcode:Re,floatButton:Ye,floatButtonGroup:it,variant:ze,inputNumber:Ze,treeSelect:ft,watermark:qt},Mt={...D};Object.keys(pt).forEach(Sr=>{pt[Sr]!==void 0&&(Mt[Sr]=pt[Sr])}),xne.forEach(Sr=>{let Mn=e[Sr];Mn&&(Mt[Sr]=Mn)}),typeof n<"u"&&(Mt.button={autoInsertSpace:n,...Mt.button});let dr=Lm(()=>Mt,Mt,(Sr,Mn)=>{let ha=Object.keys(Sr),ur=Object.keys(Mn);return ha.length!==ur.length||ha.some(bi=>Sr[bi]!==Mn[bi])}),{layer:Cn}=fn.useContext(xc),_a=fn.useMemo(()=>({prefixCls:Tr,csp:Xt,layer:Cn?"antd":void 0,zeroRuntime:!!Cn||zr?.zeroRuntime}),[Tr,Xt,Cn,zr?.zeroRuntime]),lr=fn.createElement(fn.Fragment,null,fn.createElement(wne,{iconPrefixCls:Tr,csp:Xt}),fn.createElement(yne,{dropdownMatchSelectWidth:w}),t),ri=fn.useMemo(()=>wc(tu.Form?.defaultValidateMessages||{},dr.locale?.Form?.defaultValidateMessages||{},dr.form?.validateMessages||{},d?.validateMessages||{}),[dr,d?.validateMessages]);Object.keys(ri).length>0&&(lr=fn.createElement(IR.Provider,{value:ri},lr)),Wt&&(lr=fn.createElement(Kte,{locale:Wt,_ANT_MARK__:Vte},lr)),(Tr||Xt)&&(lr=fn.createElement(Km.Provider,{value:_a},lr)),h&&(lr=fn.createElement(pne,{size:h},lr)),lr=fn.createElement(bne,null,lr),Ot?.unique&&(lr=fn.createElement(W5,null,lr));let Na=fn.useMemo(()=>{let{algorithm:Sr,token:Mn,components:ha,cssVar:ur,...bi}=zr||{},Gi=Sr&&(!Array.isArray(Sr)||Sr.length>0)?Pm(Sr):hv,ga={};Object.entries(ha||{}).forEach(([Wn,Un])=>{let Vn={...Un};"algorithm"in Vn&&(Vn.algorithm===!0?Vn.theme=Gi:(Array.isArray(Vn.algorithm)||Er(Vn.algorithm))&&(Vn.theme=Pm(Vn.algorithm)),delete Vn.algorithm),ga[Wn]=Vn});let mt={...vc,...Mn};return{...bi,theme:Gi,token:mt,components:ga,override:{override:mt,...ga},cssVar:ur}},[zr]);return A&&(lr=fn.createElement(gv.Provider,{value:Na},lr)),dr.warning&&(lr=fn.createElement($J.Provider,{value:dr.warning},lr)),I!==void 0&&(lr=fn.createElement(BR,{disabled:I},lr)),fn.createElement(wt.Provider,{value:dr},lr)},Qm=e=>{let t=fn.useContext(wt),r=fn.useContext(l4);return fn.createElement(Sne,{parentContext:t,legacyLocale:r,...e})};Qm.ConfigContext=wt;Qm.SizeContext=Xm;Qm.config=kne;Qm.useConfig=hne;Object.defineProperty(Qm,"SizeContext",{get:()=>Xm});var Ym=Qm,Fne=e=>`${e}-css-var`,Yn=Fne,l5=B(_()),Dne=B(_()),w5=B(_()),ZN="data-rc-order",JN="data-rc-priority",Ane="rc-util-key",LS=new Map;function _R(){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 NR({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Ane}function d4(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Bne(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function f4(e){return Array.from((LS.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function PR(e,t={}){if(!_R())return null;let{csp:r,prepend:n,priority:a=0}=t,o=Bne(n),l=o==="prependQueue",c=document.createElement("style");c.setAttribute(ZN,o),l&&a&&c.setAttribute(JN,`${a}`),r?.nonce&&(c.nonce=r.nonce),c.innerHTML=e;let d=d4(t),{firstChild:f}=d;if(n){if(l){let h=(t.styles||f4(d)).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(ZN)))return!1;let v=Number(g.getAttribute(JN)||0);return a>=v});if(h.length)return d.insertBefore(c,h[h.length-1].nextSibling),c}d.insertBefore(c,f)}else d.appendChild(c);return c}function Ine(e,t={}){let{styles:r}=t;return r||(r=f4(d4(t))),r.find(n=>n.getAttribute(NR(t))===e)}function Mne(e,t){let r=LS.get(e);if(!r||!$ne(document,r)){let n=PR("",t);if(!n)return;let{parentNode:a}=n;LS.set(e,a),e.removeChild(n)}}function Tne(e,t,r={}){if(!_R())return null;let n=d4(r),a=f4(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=PR(e,o);return c?.setAttribute(NR(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 eP={};function Nne(e,t){e||eP[t]||(eP[t]=!0)}function Pne(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function p4(e,t){Nne(e,`[@ant-design/icons] ${t}`)}function x5(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function tP(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[Pne(r)]=n),t},{})}function HS(e,t,r){return r?w5.default.createElement(e.tag,{key:t,...tP(e.attrs),...r},(e.children||[]).map((n,a)=>HS(n,`${t}-${e.tag}-${a}`))):w5.default.createElement(e.tag,{key:t,...tP(e.attrs)},(e.children||[]).map((n,a)=>HS(n,`${t}-${e.tag}-${a}`)))}var Rne={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},One=`
|
|
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
|
+
`,RR=e=>{let{csp:t,prefixCls:r,layer:n,zeroRuntime:a}=(0,w5.useContext)(Km),o=One;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} {
|
|
134
|
+
${o}
|
|
135
|
+
}`),(0,w5.useEffect)(()=>{if(a)return;let l=e.current,c=_ne(l);Tne(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:c})},[])},OR=e=>{let{icon:t,className:r,onClick:n,style:a,primaryColor:o,secondaryColor:l,...c}=e,d=Dne.useRef(null);if(RR(d),p4(x5(t),`icon should be icon definiton, but got ${typeof t}`),!x5(t))return null;let f=t;return HS(f.icon,`svg-${f.name}`,{className:r,onClick:n,style:a,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...c,ref:d})};OR.displayName="IconReact";var zne=OR;function qS(){return qS=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},qS.apply(this,arguments)}var Lne=l5.forwardRef((e,t)=>{let{className:r,icon:n,spin:a,rotate:o,tabIndex:l,onClick:c,twoToneColor:d,...f}=e,{prefixCls:h="anticon",rootClassName:g}=l5.useContext(Km);if(p4(x5(n),`icon should be icon definiton, but got ${typeof n}`),!x5(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 x=o?{msTransform:`rotate(${o}deg)`,transform:`rotate(${o}deg)`}:void 0;return l5.createElement("span",qS({role:"img","aria-label":n.name},f,{ref:t,tabIndex:y,onClick:c,className:v}),l5.createElement(zne,{icon:n,style:x}))}),Gt=Lne;var zR=B(_(),1),Ev=B(Ee(),1);function LR(e){let t=e.trim();return t?(t=t.replace(/\/{2,}/g,"/"),t=t.replace(/\/+$/,""),t||"/"):""}function Hne(e){let t=LR(e);return t==="/"||!t?"/":t.slice(0,t.lastIndexOf("/"))||"/"}function m4({explorerRef:e,suspended:t=!1}={}){let r=ai(),n=Fi(),a=r.layout.filePanelOpen&&!t,[o,l]=zR.useState(null);return zR.useEffect(()=>{if(!a||o)return;let c=!0;return globalThis.__wandImportBrowserModule("5f0e00d267a0d1e3").then(d=>{c&&l(()=>d.ShellFilePanelDrawer)}),()=>{c=!1}},[a,o]),(0,Ev.jsxs)(Ev.Fragment,{children:[(0,Ev.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,Ev.jsx)("div",{className:"file-explorer legacy-file-explorer-host",id:"file-explorer",ref:e,hidden:!0,"aria-hidden":"true"}),o?(0,Ev.jsx)(o,{explorerRef:e,suspended:t}):null]})}var ef=globalThis.__wandBrowserRuntime??{configPath:"${wandConfigPath}",aiTeamsChunkSrc:"${aiTeamsChunkSrc}",plushAvatarChunkSrc:"${plushAvatarChunkSrc}"},U5="wand-decision-expert",V5="\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"],Une=`^(?:${Wne.join("|")}):[a-z0-9][a-z0-9_-]{0,31}$`;function G5(e){return typeof e=="string"&&Vne.test(e)}var Vne=new RegExp(Une),Gne=new Set(Zs);function g4(e){return typeof e=="string"&&Gne.has(e)}function K5(e){return e==="qoder"?"qodercli":e}var Ys={claude:"Claude",codex:"Codex",opencode:"OpenCode",grok:"Grok",qoder:"Qoder",pi:"Pi"},kv="Wand Agent",Kne={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?Kne[t]??null:null}var Xne=new Set(["npx","pnpx","bunx","yarn","pnpm","corepack"]),Qne=new Set(["dlx","exec","x"]);function h4(e){let t=e.match(/^(?:"([^"]+)"|'([^']+)'|(\S+))/);return(t?.[1]??t?.[2]??t?.[3]??"").split(/[\\/]/).pop()?.replace(/\.(?:cmd|exe)$/i,"")??""}function Yne(e){if(typeof e!="string")return;let t=e.trim();if(!t)return;let r=t.match(/"[^"]*"|'[^']*'|\S+/g)??[],n=0;if(Xne.has(h4(r[0]??"").toLowerCase()))for(n=1;n<r.length;){let a=r[n];if(a.startsWith("-")){n+=1;continue}if(Qne.has(h4(a).toLowerCase())){n+=1;continue}break}return _o(h4(r[n]??""))??void 0}function Cv(e){if(typeof e=="string"&&e.trim().toLowerCase()==="terminal")return"\u7EC8\u7AEF";let t=_o(e);return t?Ys[t]:typeof e=="string"&&e.trim()?e.trim():"AI"}var iu=Yne,Zm="wand-agent",Jm=[{id:"claude",provider:"claude",label:Ys.claude,description:"Claude Code"},{id:"codex",provider:"codex",label:Ys.codex,description:"OpenAI Codex CLI"},{id:"opencode",provider:"opencode",label:Ys.opencode,description:"OpenCode CLI"},{id:"grok",provider:"grok",label:Ys.grok,description:"Grok Build CLI"},{id:"qoder",provider:"qoder",label:Ys.qoder,description:"Qoder CLI"},{id:"pi",provider:"pi",engine:"cli",label:Ys.pi,description:"Pi CLI\uFF1A\u7ED3\u6784\u5316 JSON \u6216 PTY \u7EC8\u7AEF"},{id:Zm,provider:"pi",engine:"sdk",label:kv,description:"Wand \u81EA\u5E26 Agent\uFF1A\u8FDB\u7A0B\u5185 SDK \u6267\u884C\uFF0C\u53EA\u652F\u6301\u7ED3\u6784\u5316\u4F1A\u8BDD"}];function Sv(e){return e?Jm.find(t=>t.id===e)??null:null}function v4(e,t){return e==="pi"&&t==="sdk"?Zm:e}function ou(e,t){return _o(e)==="pi"&&(t==="sdk"||t==="core")?kv:Cv(e)}var aFe=new Set(Zs),X5="#D97757",Q5="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",Y5="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",Z5=[{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}],J5=["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">${J5.map(n=>`<path d="${n}"/>`).join("")}</svg>`:t==="pi"?`<svg ${r} viewBox="0 0 800 800">${Z5.map(({d:n,fill:a})=>`<path d="${n}" fill="${a}"/>`).join("")}</svg>`:t==="claude"?`<svg ${r} viewBox="0 0 24 24" fill="${X5}"><path d="${Q5}"/></svg>`:t==="codex"?`<svg ${r} viewBox="0 0 24 24" fill="currentColor"><path d="${Y5}"/></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 dFe=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:J5.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:Z5.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:X5,"aria-hidden":"true",focusable:"false","data-provider-logo":"claude",children:(0,Zn.jsx)("path",{d:Q5})}):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:Y5})}):(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(_()),tf=["xxxl","xxl","xl","lg","md","sm","xs"],tae=[].concat(tf).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(tf).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 f=`screen${r[a+1].toUpperCase()}Min`;if(!(t[d]<=t[f]))throw new Error(`${d}<=${f} fails : !(${t[d]}<=${t[f]})`)}}),e},aae=(e,t)=>{if(t){for(let r of tf)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:f})=>{this.dispatch({...a,[o]:f})},d=window.matchMedia(l);Er(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];Er(l?.mql.removeEventListener)&&l.mql.removeEventListener("change",l?.listener)}),r.clear()}}},[t])},oae=iae,sae=B(_()),lae=B(_()),HR=()=>lae.default.useReducer(e=>e+1,0);function uae(e=!0,t={}){let r=(0,sae.useRef)(t),[,n]=HR(),a=oae();return er(()=>{let o=a.subscribe(l=>{r.current=l,e&&n()});return()=>a.unsubscribe(o)},[e]),r.current}var b4=uae;var rf=(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}),eh=(e,t)=>t||e;var qR=B(_()),cae=e=>{let t=qR.default.useContext(Xm);return qR.default.useMemo(()=>e?$i(e)?e??t:Er(e)?e(t):t:t,[e,t])},On=cae,y4=()=>({height:0,opacity:0}),WR=e=>({height:e?.scrollHeight??0,opacity:e?1:0}),dae=e=>({height:e?.offsetHeight??0}),w4=(e,t)=>t?.deadline===!0||pv(t)&&t.propertyName==="height",fae=(e=gc)=>({motionName:`${e}-motion-collapse`,onAppearStart:y4,onEnterStart:y4,onAppearActive:WR,onEnterActive:WR,onLeaveStart:dae,onLeaveActive:y4,onAppearEnd:w4,onEnterEnd:w4,onLeaveEnd:w4,motionDeadline:500}),nf=(e,t,r)=>r!==void 0?r:`${e}-${t}`,x4=fae,UR=e=>({animationDuration:e,animationFillMode:"both"}),ex=(e,t,r,n,a=!1)=>{let o=a?"&":"";return{[`
|
|
136
|
+
${o}${e}-enter,
|
|
137
|
+
${o}${e}-appear
|
|
138
|
+
`]:{...UR(n),animationPlayState:"paused"},[`${o}${e}-leave`]:{...UR(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"}}},pae=new St("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),mae=new St("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),E4=(e,t=!1)=>{let{antCls:r}=e,n=`${r}-fade`,a=t?"&":"";return[ex(n,pae,mae,e.motionDurationMid,t),{[`
|
|
142
|
+
${a}${n}-enter,
|
|
143
|
+
${a}${n}-appear
|
|
144
|
+
`]:{opacity:0,animationTimingFunction:"linear"},[`${a}${n}-leave`]:{animationTimingFunction:"linear"}}]},tx=new St("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),rx=new St("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),nx=new St("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),ax=new St("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),KR=new St("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),XR=new St("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),QR=new St("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),YR=new St("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),hae={"slide-up":{inKeyframes:tx,outKeyframes:rx},"slide-down":{inKeyframes:nx,outKeyframes:ax},"slide-left":{inKeyframes:KR,outKeyframes:XR},"slide-right":{inKeyframes:QR,outKeyframes:YR}},ix=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=hae[t];return[ex(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}}]},af=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),ox=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}}),ZR=new St("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),gae=new St("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),VR=new St("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),GR=new St("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),vae=new St("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),bae=new St("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),yae=new St("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),wae=new St("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),xae=new St("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Eae=new St("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),kae=new St("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),Cae=new St("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Sae={zoom:{inKeyframes:ZR,outKeyframes:gae},"zoom-big":{inKeyframes:VR,outKeyframes:GR},"zoom-big-fast":{inKeyframes:VR,outKeyframes:GR},"zoom-left":{inKeyframes:yae,outKeyframes:wae},"zoom-right":{inKeyframes:xae,outKeyframes:Eae},"zoom-up":{inKeyframes:vae,outKeyframes:bae},"zoom-down":{inKeyframes:kae,outKeyframes:Cae}},Fv=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=Sae[t];return[ex(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`}}}},k4=Fae,Dae=new St("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 St("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 St("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 St("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 St("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 St("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 St("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 St("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}},Nae=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=_ae[t];return[ex(n,a,o,e.motionDurationMid),{[`
|
|
151
|
+
${n}-enter,
|
|
152
|
+
${n}-appear
|
|
153
|
+
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var Pae=B(_()),JR=e=>e==="horizontal"||e==="vertical",el=(e,t,r)=>(0,Pae.useMemo)(()=>{let n=JR(e),a;return n?a=e:typeof t=="boolean"?a=t?"vertical":"horizontal":a=JR(r)?r:"horizontal",[a,a==="vertical"]},[r,e,t]),Ii=B(_()),Rae=e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},Oae=kt(["Space","Compact"],Rae,()=>({}),{resetStyle:!1}),sx=Ii.createContext(null),tl=(e,t)=>{let r=Ii.useContext(sx),n=Ii.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}},S4=e=>{let{children:t}=e;return Ii.createElement(sx.Provider,{value:null},t)},zae=e=>{let{children:t,...r}=e;return Ii.createElement(sx.Provider,{value:Ii.useMemo(()=>r,[r])},t)},Lae=Ii.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=Ii.useContext(wt),{size:a,direction:o,orientation:l,block:c,prefixCls:d,className:f,rootClassName:h,children:g,vertical:v,...y}=e,[x,w]=el(l,v,o),k=On($=>a??$),F=r("space-compact",d),[C]=Oae(F),D=te(F,C,{[`${F}-rtl`]:n==="rtl",[`${F}-block`]:c,[`${F}-vertical`]:w},f,h),S=Ii.useContext(sx),A=Ii.useRef(null);Ii.useImperativeHandle(t,()=>({nativeElement:A.current}));let I=Hr(g),j=Ii.useMemo(()=>I.map(($,N)=>{let P=$?.key||`${F}-item-${N}`;return Ii.createElement(zae,{key:P,compactSize:k,compactDirection:x,isFirstItem:N===0&&(!S||S?.isFirstItem),isLastItem:N===I.length-1&&(!S||S?.isLastItem)},$)}),[I,S,x,k,F]);return I.length===0?null:Ii.createElement("div",{ref:A,className:D,...y},j)}),Dv=Lae,DFe=B(_()),C4=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},of=class extends nn{constructor(e){super(Hae(e))}toHsbString(){let e=this.toHsb(),t=C4(e.s*100),r=C4(e.b*100),n=C4(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 of?e:new of(e),AFe=qae("#1677ff"),$Fe=B(_()),BFe=B(_()),IFe=B(_()),MFe=B(_()),TFe=B(_()),jFe=B(_()),_Fe=B(_()),NFe=B(_()),PFe=B(_()),RFe=B(_()),Wae=(e,t)=>e?.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6)||"",Uae=(e,t)=>e?Wae(e,t):"",sf=(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 of(this.colors[0].color.metaColor)):this.metaColor=new of(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 Uae(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()}}])})(),F4=e=>e instanceof sf?e:new sf(e);var eO=B(_()),Vae={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"},Gae=Vae;function D4(){return D4=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},D4.apply(this,arguments)}var Kae=(e,t)=>eO.createElement(Gt,D4({},e,{ref:t,icon:Gae})),Xae=eO.forwardRef(Kae),Av=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 th=B(_()),uO=B(_()),Qae={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"},Yae=Qae;function j4(){return j4=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},j4.apply(this,arguments)}var Zae=(e,t)=>uO.createElement(Gt,j4({},e,{ref:t,icon:Yae})),Jae=uO.forwardRef(Zae),lf=Jae,tO=B(_()),cO=B(_()),su=B(_()),$v=B(_()),eie=$v.default.forwardRef((e,t)=>{let{prefixCls:r,forceRender:n,className:a,style:o,children:l,isActive:c,role:d,classNames:f,styles:h}=e,[g,v]=$v.default.useState(c||n);return $v.default.useEffect(()=>{(n||c)&&v(!0)},[n,c]),g?$v.default.createElement("div",{ref:t,className:te(`${r}-panel`,{[`${r}-panel-active`]:c,[`${r}-panel-inactive`]:!c},a),style:o,role:d},$v.default.createElement("div",{className:te(`${r}-body`,f?.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:f={},prefixCls:h,collapsible:g,accordion:v,panelKey:y,extra:x,header:w,expandIcon:k,openMotion:F,destroyOnHidden:C,children:D,...S}=e,A=g==="disabled",I=x!=null&&typeof x!="boolean",j={onClick:()=>{o?.(y)},onKeyDown:V=>{(V.key==="Enter"||V.keyCode===Rn.ENTER||V.which===Rn.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"}),N=$&&su.default.createElement("div",Dn({className:te(`${h}-expand-icon`,d?.icon),style:f?.icon},["header","icon"].includes(g)?j:{}),$),P=te(`${h}-item`,{[`${h}-item-active`]:a,[`${h}-item-disabled`]:A},c),O={className:te(n,`${h}-header`,{[`${h}-collapsible-${g}`]:!!g},d?.header),style:f?.header,...["header","icon"].includes(g)?{}:j};return su.default.createElement("div",Dn({},S,{ref:t,className:P}),su.default.createElement("div",O,r&&N,su.default.createElement("span",Dn({className:te(`${h}-title`,d?.title),style:f?.title},g==="header"?j:{}),w),I&&su.default.createElement("div",{className:`${h}-extra`},x)),su.default.createElement(Qn,Dn({visible:a,leavedClassName:`${h}-panel-hidden`},F,{forceRender:l,removeOnLeave:C}),({className:V,style:H},q)=>su.default.createElement(tie,{ref:q,prefixCls:h,className:V,classNames:d,style:H,styles:f,isActive:a,forceRender:l,role:v?"tabpanel":void 0},D)))}),dO=rie;function fO(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 fO(e,t,(r,n)=>WS(r,n))}function aie(e,t){return fO(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:f,classNames:h,styles:g}=t;return e.map((v,y)=>{let{children:x,label:w,key:k,collapsible:F,onItemClick:C,destroyOnHidden:D,classNames:S,styles:A,...I}=v,j=String(k??y),$=F??a,N=D??o,P=V=>{$!=="disabled"&&(l(V),C?.(V))},O=!1;return n?O=c[0]===j:O=c.indexOf(j)>-1,cO.default.createElement(dO,Dn({},I,{classNames:nie(h,S),styles:aie(g,A),prefixCls:r,key:j,panelKey:j,isActive:O,accordion:n,openMotion:d,expandIcon:f,header:w,collapsible:$,onItemClick:P,destroyOnHidden:N}),x)})},oie=(e,t,r)=>{if(!e)return null;let{prefixCls:n,accordion:a,collapsible:o,destroyOnHidden:l,onItemClick:c,activeKey:d,openMotion:f,expandIcon:h,classNames:g,styles:v}=r,y=e.key||String(t),{header:x,headerClass:w,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:x,headerClass:w,classNames:g,styles:v,isActive:D,prefixCls:n,destroyOnHidden:k??l,openMotion:f,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]}),cO.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 rO(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=tO.default.forwardRef((e,t)=>{let{prefixCls:r="rc-collapse",destroyOnHidden:n=!1,style:a,accordion:o,className:l,children:c,collapsible:d,openMotion:f,expandIcon:h,activeKey:g,defaultActiveKey:v,onChange:y,items:x,classNames:w,styles:k}=e,F=te(r,l),[C,D]=wr(v,g),S=rO(C),A=xt($=>{let N=rO($);D(N),y?.(N)}),I=$=>{A(o?S[0]===$?[]:[$]:S.includes($)?S.filter(N=>N!==$):[...S,$])};Ea(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let j=lie(x,c,{prefixCls:r,accordion:o,openMotion:f,expandIcon:h,collapsible:d,destroyOnHidden:n,onItemClick:I,activeKey:S,classNames:w,styles:k});return tO.default.createElement("div",Dn({ref:t,className:F,style:a,role:o?"tablist":void 0},no(e,{aria:!0,data:!0})),j)}),pO=Object.assign(uie,{Panel:dO}),mO=pO,{Panel:JFe}=pO,A4=B(_()),cie=A4.forwardRef((e,t)=>{let{getPrefixCls:r}=A4.useContext(wt),{prefixCls:n,className:a,showArrow:o=!0}=e,l=r("collapse",n),c=te({[`${l}-no-arrow`]:!o},a);return A4.createElement(mO.Panel,{ref:t,...e,prefixCls:l,className:c})}),die=cie,fie=e=>{let{componentCls:t,contentBg:r,padding:n,headerBg:a,headerPadding:o,headerPaddingSM:l,headerPaddingLG:c,collapsePanelBorderRadius:d,lineWidth:f,lineType:h,colorBorder:g,colorText:v,colorTextHeading:y,colorTextDisabled:x,fontSizeLG:w,lineHeight:k,lineHeightLG:F,marginSM:C,paddingSM:D,paddingLG:S,paddingXS:A,motionDurationSlow:I,fontSizeIcon:j,contentPadding:$,contentPaddingSM:N,contentPaddingLG:P,fontHeight:O,fontHeightLG:V}=e,H=`${ve(f)} ${h} ${g}`;return{[t]:{...pr(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`,...Bi(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:O,display:"flex",alignItems:"center",marginInlineEnd:C},[`${t}-arrow`]:{...yv(),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:N}}},"&-large":{[`> ${t}-item`]:{fontSize:w,lineHeight:F,[`> ${t}-header`]:{padding:c,[`> ${t}-expand-icon`]:{height:V,marginInlineStart:e.calc(S).sub(n).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:P}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${ve(d)} ${ve(d)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:x,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:C}}}}}}},pie=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=kt("Collapse",e=>{let t=Nt(e,{collapsePanelBorderRadius:e.borderRadiusLG});return[fie(t),mie(t),hie(t),pie(t),k4(t)]},gie),bie=th.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,expandIcon:a,className:o,style:l,classNames:c,styles:d}=_t("collapse"),{prefixCls:f,className:h,rootClassName:g,style:v,bordered:y=!0,ghost:x,size:w,expandIconPlacement:k,expandIconPosition:F,children:C,destroyInactivePanel:D,destroyOnHidden:S,expandIcon:A,classNames:I,styles:j}=e,$=On(X=>w??X??"middle"),N=r("collapse",f),P=r(),[O,V]=vie(N),H=k??F??"start",q={...e,size:$,bordered:y,expandIconPlacement:H},L=lt(l),R=lt(v),[W,z]=jt([c,I],[d,L,j,R],{props:q}),Q=A??a,K=th.useCallback((X={})=>{let Y=X.collapsible==="header"||X.collapsible==="icon",re=Er(Q)?Q(X):th.createElement(lf,{rotate:X.isActive?n==="rtl"?-90:90:void 0,...Y?{"aria-label":X.isActive?"expanded":"collapsed"}:{"aria-hidden":!0}});return mn(re,J=>({className:te(J.className,`${N}-arrow`)}))},[Q,N,n]),Z=te(`${N}-icon-placement-${H}`,{[`${N}-borderless`]:!y,[`${N}-rtl`]:n==="rtl",[`${N}-ghost`]:!!x,[`${N}-large`]:$==="large",[`${N}-small`]:$==="small"},o,h,g,O,V,W.root),T=th.useMemo(()=>({...x4(P),motionAppear:!1,leavedClassName:`${N}-panel-hidden`}),[P,N]),U=th.useMemo(()=>C?Hr(C).map(X=>X):null,[C]);return th.createElement(mO,{ref:t,openMotion:T,...xr(e,["rootClassName"]),expandIcon:K,prefixCls:N,className:Z,style:z.root,classNames:W,styles:z,destroyOnHidden:S??D},U)}),yie=Object.assign(bie,{Panel:die}),N4=yie,lx=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=s4("Wave",wie),$4=B(_()),Iv=`${gc}-wave-target`,io=B(_()),nO=e=>e?$i(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&&nO(r[t])?r[t]:[n,a,o].find(nO)??null}function B4(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"),[f,h]=io.useState(null),[g,v]=io.useState([]),[y,x]=io.useState(0),[w,k]=io.useState(0),[F,C]=io.useState(0),[D,S]=io.useState(0),[A,I]=io.useState(!1),j={left:y,top:w,width:F,height:D,borderRadius:g.map(P=>`${P}px`).join(" ")};f&&(j[d("color")]=f);function $(){let P=getComputedStyle(r);h(Eie(r,a));let O=P.position==="static",{borderLeftWidth:V,borderTopWidth:H}=P;x(O?r.offsetLeft:B4(-Number.parseFloat(V))),k(O?r.offsetTop:B4(-Number.parseFloat(H))),C(r.offsetWidth),S(r.offsetHeight);let{borderTopLeftRadius:q,borderTopRightRadius:L,borderBottomLeftRadius:R,borderBottomRightRadius:W}=P;v([q,L,W,R].map(z=>B4(Number.parseFloat(z))))}if(io.useEffect(()=>{if(r){let P=fr(()=>{$(),I(!0)}),O;return typeof ResizeObserver<"u"&&(O=new ResizeObserver($),O.observe(r)),()=>{fr.cancel(P),O?.disconnect()}}},[r]),!A)return null;let N=(n==="Checkbox"||n==="Radio")&&r?.classList.contains(Iv);return io.createElement(Qn,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(P,O)=>{if(O.deadline||pv(O)&&O.propertyName==="opacity"){let V=o.current?.parentElement;GS(V).then(()=>{V?.remove()})}return!1}},({className:P},O)=>io.createElement("div",{ref:ln(o,O),className:te(t,P,{"wave-quick":N}),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),VS(io.createElement(kie,{...t,target:e}),n)},Sie=Cie,Fie=(e,t,r,n)=>{let{wave:a}=$4.useContext(wt),[,o,l]=ui(),c=xt(f=>{let h=e.current;if(a?.disabled||!h)return;let g=h.querySelector(`.${Iv}`)||h,{showEffect:v}=a||{};(v||Sie)(g,{className:t,token:o,component:r,event:f,hashId:l,colorSource:n})}),d=$4.useRef(null);return $4.useEffect(()=>()=>{fr.cancel(d.current)},[]),f=>{fr.cancel(d.current),d.current=fr(()=>{c(f)})}},Die=Fie,aO={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,lx.useContext)(wt),c=(0,lx.useRef)(null),d=o("wave"),f=xie(d),h=Die(c,te(d,f),n,a);if(lx.default.useEffect(()=>{let v=c.current;if(!v||v.nodeType!==window.Node.ELEMENT_NODE||r)return;let y=k=>{!dv(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)},x=l?.triggerType,w=x&&x in aO?aO[x]:"click";return v.addEventListener(w,y,!0),()=>{v.removeEventListener(w,y,!0)}},[r,l?.triggerType]),!lx.default.isValidElement(t))return t??null;let g=ru(t)?ln(Qs(t),c):c;return mn(t,{ref:g})},nh=Aie,ux=B(_()),iO=/^[\u4E00-\u9FA5]{2}$/,_4=iO.test.bind(iO);function $ie(e){return e==="danger"?{danger:!0}:{type:e}}function I4(e){return e==="text"||e==="link"}function Bie(e,t,r,n){if(!or(e))return;let a=t?" ":"";return!$i(e)&&!Ra(e)&&$i(e.type)&&_4(e.props.children)?mn(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}}):$i(e)?ux.default.createElement("span",{className:n,style:r},_4(e)?e.split("").join(a):e):wv(e)?ux.default.createElement("span",{className:n,style:r},e):mn(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 ux.default.Children.forEach(e,l=>{let c=$i(l)||Ra(l);if(a&&c){let d=o.length-1,f=o[d];o[d]=`${f}${l}`}else o.push(l);a=c}),ux.default.Children.map(o,l=>Bie(l,t,r,n))}var e3e=["default","primary","danger"].concat(Xr(li)),Jn=B(_()),Bv=B(_()),hO=Bv.createContext(void 0),Mie=e=>{let{getPrefixCls:t,direction:r}=Bv.useContext(wt),{prefixCls:n,size:a,className:o,...l}=e,c=t("btn-group",n),[,,d]=ui(),f=Bv.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),h=te(c,{[`${c}-${f}`]:f,[`${c}-rtl`]:r==="rtl"},o,d);return Bv.createElement(hO.Provider,{value:a},Bv.createElement("div",{...l,className:h}))},Tie=Mie,rh=B(_()),oO=B(_()),jie=(0,oO.forwardRef)((e,t)=>{let{className:r,style:n,children:a,prefixCls:o}=e,l=te(`${o}-icon`,r);return oO.default.createElement("span",{ref:t,className:l,style:n},a)}),gO=jie,sO=(0,rh.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:a,iconClassName:o}=e,l=te(`${r}-loading-icon`,n);return rh.default.createElement(gO,{prefixCls:r,className:l,style:a,ref:t},rh.default.createElement(Av,{className:o}))}),M4=()=>({width:0,opacity:0,transform:"scale(0)"}),T4=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?rh.default.createElement(sO,{prefixCls:t,className:a,style:o}):rh.default.createElement(Qn,{visible:c,motionName:`${t}-loading-icon-motion`,motionAppear:!l,motionEnter:!l,motionLeave:!l,removeOnLeave:!0,onAppearStart:M4,onAppearActive:T4,onEnterStart:M4,onEnterActive:T4,onLeaveStart:T4,onLeaveActive:M4},({className:d,style:f},h)=>{let g={...o,...f};return rh.default.createElement(sO,{prefixCls:t,className:te(a,d),style:g,ref:h})})},Nie=_ie,lO=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),Pie=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}},lO(`${t}-primary`,a),lO(`${t}-danger`,o)]}},Rie=Pie,t3e=B(_()),cx=(e,t)=>{let{r,g:n,b:a,a:o}=e.toRgb(),l=new of(e.toRgbString()).onBackground(t).toHsv();return o<=.5?l.v>.5:r*.299+n*.587+a*.114>192},vO=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return Nt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},bO=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,a=e.contentLineHeight??Wm(t),o=e.contentLineHeightSM??Wm(r),l=e.contentLineHeightLG??Wm(n),c=cx(new sf(e.colorBgSolid),"#fff")?"#000":"#fff",d=li.reduce((g,v)=>({...g,[`${v}ShadowColor`]:`0 ${ve(e.controlOutlineWidth)} 0 ${Vd(e[`${v}1`],e.colorBgContainer)}`}),{}),f=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:f,dashedBgDisabled:h}},Oie=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`],f=e[`${c}1`],h=e[`${c}Hover`],g=e[`${c}2`],v=e[`${c}3`],y=e[`${c}Active`],x=e[`${c}ShadowColor`];return{[`&${t}-color-${c}`]:{[o("color-base")]:d,[o("color-hover")]:h,[o("color-active")]:y,[o("color-light")]:f,[o("color-light-hover")]:g,[o("color-light-active")]:v,[o("shadow")]:x}}}),{[`&: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}}}]}},zie=Oie,Lie=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",...af(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:yv(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[r]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Bi(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(f=>`${f} ${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%"}),P4=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:a,borderRadius:o,buttonPaddingHorizontal:l,iconCls:c,buttonPaddingVertical:d,buttonIconOnlyFontSize:f}=e;return[{[t]:{fontSize:a,height:n,padding:`${ve(d)} ${ve(l)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[c]:{fontSize:f}}}},{[`${r}${r}-circle${t}`]:Hie(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},qie=e=>{let t=Nt(e,{fontSize:e.contentFontSize});return P4(t,e.componentCls)},Wie=e=>{let t=Nt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return P4(t,`${e.componentCls}-sm`)},Uie=e=>{let t=Nt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return P4(t,`${e.componentCls}-lg`)},Vie=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},Gie=kt("Button",e=>{let t=vO(e);return[Lie(t),qie(t),Wie(t),Uie(t),Vie(t),zie(t),Rie(t)]},bO,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Kie(e,t,r,n){let{focusElCls:a,focus:o,borderElCls:l}=r,c=l?"> *":"",d=c?` ${c}`:"",f=v=>v.filter(Boolean).map(y=>`&:${y}${d}`).join(","),h=f(["hover",a?`hover${a}`:null]),g=f([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 ah(e,t={focus:!0}){let{componentCls:r}=e,{componentCls:n}=t,a=n||r,o=`${a}-compact`;return{[o]:{...Kie(e,o,t,a),...Xie(a,o,t)}}}function Qie(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 Yie(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]:{...Qie(e,t,e.componentCls),...Yie(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,f]=pn(t,"btn"),h=g=>({[`${r}-compact${g?"-vertical":""}-item`]:{[d("compact-connect-border-color")]:f("bg-color-hover"),[`&${l}`]:{transition:"none",[`& + ${l}:before`]:[{position:"absolute",backgroundColor:f("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, ${f("bg-color-hover")} 75%, ${o})`}}]},eoe=Vm(["Button","compact"],e=>{let t=vO(e);return[ah(t),Zie(t),Jie(t)]},bO);function toe(e){if(Ct(e)){let t=e?.delay;return t=Ra(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:f,size:h,disabled:g,className:v,rootClassName:y,children:x,icon:w,iconPosition:k,iconPlacement:F,ghost:C=!1,block:D=!1,htmlType:S="button",classNames:A,styles:I,style:j,autoInsertSpace:$,autoFocus:N,...P}=e,O=Hr(x),V=c||"default",{getPrefixCls:H,direction:q,autoInsertSpace:L,className:R,style:W,classNames:z,styles:Q,loadingIcon:K,shape:Z,color:T,variant:U}=_t("button"),X=f||Z||"default",[Y,re]=(0,Jn.useMemo)(()=>{if(o&&l)return[o,l];if(c||d){let Ot=roe[V]||[];return d?["danger",Ot[1]]:Ot}return l==="solid"?["primary",l]:T&&U?[T,U]:U==="solid"?["primary",U]:["default","outlined"]},[o,l,c,d,T,U,V]),[J,se]=(0,Jn.useMemo)(()=>C&&re==="solid"?[Y,"outlined"]:[Y,re],[Y,re,C]),me=J==="danger",le=me?"dangerous":J,he=$??L??!0,ae=H("btn",a),[ce,ye]=Gie(ae),Te=(0,Jn.useContext)(ci),De=g??Te,ke=(0,Jn.useContext)(hO),Ce=(0,Jn.useMemo)(()=>toe(n),[n]),[Le,$e]=zm(Ce.loading),[Be,Me]=(0,Jn.useState)(!1),Ve=(0,Jn.useRef)(null),qe=jo(t,Ve),Ie=O.length===1&&!w&&!I4(se),Pe=(0,Jn.useRef)(!0);Jn.default.useEffect(()=>(Pe.current=!1,()=>{Pe.current=!0}),[]),er(()=>{Ce.delay>0?$e(!0,{ms:Ce.delay}):$e(Ce.loading,!0)},[Ce.delay,Ce.loading]),(0,Jn.useEffect)(()=>{if(!Ve.current||!he)return;let Ot=Ve.current.textContent||"";Ie&&_4(Ot)?Be||Me(!0):Be&&Me(!1)}),(0,Jn.useEffect)(()=>{N&&Ve.current?.focus()},[]);let Je=Jn.default.useCallback(Ot=>{if(Le||De){Ot.preventDefault();return}e.onClick?.(("href"in e,Ot))},[e.onClick,Le,De]),{compactSize:gt,compactItemClassnames:et}=tl(ae,q),Ue=On(Ot=>h??gt??ke??Ot),Fe=Le?"loading":w,_e=F??k??"start",dt=xr(P,["navigate"]),at={...e,type:V,color:J,variant:se,danger:me,shape:X,size:Ue,disabled:De,loading:Le,iconPlacement:_e},Ge=lt(W),je=lt(j),[rt,Bt]=jt([r?void 0:z,A],[r?void 0:Q,Ge,I,je],{props:at}),It=te(ae,ce,ye,{[`${ae}-${X}`]:X!=="default"&&X!=="square"&&X,[`${ae}-${V}`]:V,[`${ae}-dangerous`]:d,[`${ae}-color-${le}`]:le,[`${ae}-variant-${se}`]:se,[`${ae}-lg`]:Ue==="large",[`${ae}-sm`]:Ue==="small",[`${ae}-icon-only`]:!x&&x!==0&&!!Fe,[`${ae}-background-ghost`]:C&&!I4(se),[`${ae}-loading`]:Le,[`${ae}-two-chinese-chars`]:Be&&he&&!Le,[`${ae}-block`]:D,[`${ae}-rtl`]:q==="rtl",[`${ae}-icon-end`]:_e==="end"},et,v,y,R,rt.root),Gr={className:rt.icon,style:Bt.icon},Ht=Ot=>Jn.default.createElement(gO,{prefixCls:ae,...Gr},Ot),$r=Jn.default.createElement(Nie,{existIcon:!!w,prefixCls:ae,loading:Le,mount:Pe.current,...Gr}),Kt=Ct(n)&&n.icon||K,Ft;w&&!Le?Ft=Ht(w):n&&Kt?Ft=Ht(Kt):Ft=$r;let ar=or(x)?Iie(x,Ie&&he,Bt.content,rt.content):null;if(dt.href!==void 0)return Jn.default.createElement("a",{...dt,className:te(It,{[`${ae}-disabled`]:De}),href:De?void 0:dt.href,style:Bt.root,onClick:Je,ref:qe,tabIndex:De?-1:0,"aria-disabled":De},Ft,ar);let Cr=Jn.default.createElement("button",{...P,type:S,className:It,style:Bt.root,onClick:Je,disabled:De,ref:qe},Ft,ar,et&&Jn.default.createElement(eoe,{prefixCls:ae}));return I4(se)||(Cr=Jn.default.createElement(nh,{component:"Button",disabled:Le},Cr)),Cr}),R4=noe;R4.Group=Tie;R4.__ANT_BUTTON=!0;var Mv=R4;var rl=Mv;function uf(e){return["small","middle","medium","large"].includes(e)}function dx(e){return e?Ra(e):!1}var Tv=B(_()),O4=B(_()),aoe=e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:o,fontSizeLG:l,fontSizeSM:c,borderRadiusLG:d,borderRadiusSM:f,colorBgContainerDisabled:h,lineWidth:g,lineType:v,antCls:y}=e,[x,w]=pn(y,"space-addon");return{[t]:[{...pr(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:f,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}},{[x("addon-border-color")]:a,[x("addon-background")]:h,[x("addon-border-color-outlined")]:a,[x("addon-background-filled")]:h,borderColor:w("addon-border-color"),background:w("addon-background"),"&-variant-outlined":{[x("addon-border-color")]:w("addon-border-color-outlined")},"&-variant-filled":{[x("addon-border-color")]:"transparent",[x("addon-background")]:w("addon-background-filled"),[`&${t}-disabled`]:{[x("addon-border-color")]:a,[x("addon-background")]:h}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[x("addon-border-color-outlined")]:e.colorError,[x("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[x("addon-border-color-outlined")]:e.colorWarning,[x("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},ioe=kt("Addon",e=>[aoe(e),ah(e,{focus:!1})]),ooe=O4.default.forwardRef((e,t)=>{let{className:r,children:n,style:a,prefixCls:o,variant:l="outlined",disabled:c,status:d,...f}=e,{getPrefixCls:h,direction:g}=O4.default.useContext(wt),v=h("space-addon",o),[y,x]=ioe(v),{compactItemClassnames:w,compactSize:k}=tl(v,g),F=rf(v,d),C=te(v,y,w,x,`${v}-variant-${l}`,F,{[`${v}-${k}`]:k,[`${v}-disabled`]:c},r);return O4.default.createElement("div",{ref:t,className:C,style:a,...f},n)}),yO=ooe,soe=B(_()),wO=soe.default.createContext({latestIndex:0}),loe=wO.Provider,jv=B(_()),uoe=e=>{let{className:t,prefix:r,index:n,children:a,separator:o,style:l,classNames:c,styles:d}=e,{latestIndex:f}=jv.useContext(wO);return or(a)?jv.createElement(jv.Fragment,null,jv.createElement("div",{className:t,style:l},a),n<f&&o&&jv.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"}}}},foe=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}}}},poe=kt("Space",e=>{let t=Nt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[doe(t),foe(t)]},()=>({}),{resetStyle:!1}),moe=Tv.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,size:a,className:o,style:l,classNames:c,styles:d}=_t("space"),{size:f=a??"small",align:h,className:g,rootClassName:v,children:y,direction:x,orientation:w,prefixCls:k,split:F,separator:C,style:D,vertical:S,wrap:A=!1,classNames:I,styles:j,...$}=e,[N,P]=Array.isArray(f)?f:[f,f],O=uf(P),V=uf(N),H=dx(P),q=dx(N),L=Hr(y,{keepEmpty:!0}),[R,W]=el(w,S,x),z=h===void 0&&!W?"center":h,Q=C??F,K=r("space",k),[Z,T]=poe(K),U={...e,size:f,orientation:R,align:z},X=lt(l),Y=lt(D),[re,J]=jt([c,I],[d,X,j,Y],{props:U}),se=te(K,o,Z,`${K}-${R}`,{[`${K}-rtl`]:n==="rtl",[`${K}-align-${z}`]:z,[`${K}-gap-row-${P}`]:O,[`${K}-gap-col-${N}`]:V},g,v,T,re.root),me=te(`${K}-item`,re.item),le=L.map((ce,ye)=>{let Te=ce?.key||`${me}-${ye}`;return Tv.createElement(coe,{prefix:K,classNames:re,styles:J,className:me,key:Te,index:ye,separator:Q,style:J.item},ce)}),he=Tv.useMemo(()=>({latestIndex:L.reduce((ce,ye,Te)=>or(ye)?Te:ce,0)}),[L]);if(L.length===0)return null;let ae={};return A&&(ae.flexWrap="wrap"),!V&&q&&(ae.columnGap=N),!O&&H&&(ae.rowGap=P),Tv.createElement("div",{ref:t,className:se,style:{...ae,...J.root},...$},Tv.createElement(loe,{value:he},le))}),z4=moe;z4.Compact=Dv;z4.Addon=yO;var L4=z4;var ih=B(_()),hoe=B(_()),df="RC_FORM_INTERNAL_HOOKS",Pr=()=>{Ea(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},goe=hoe.createContext({getFieldValue:Pr,getFieldsValue:Pr,getFieldError:Pr,getFieldWarning:Pr,getFieldsError:Pr,isFieldsTouched:Pr,isFieldTouched:Pr,isFieldValidating:Pr,isFieldsValidating:Pr,resetFields:Pr,setFields:Pr,setFieldValue:Pr,setFieldsValue:Pr,validateFields:Pr,submit:Pr,getInternalHooks:()=>(Pr(),{dispatch:Pr,initEntityValue:Pr,registerField:Pr,useSubscribe:Pr,setInitialValues:Pr,destroyForm:Pr,setCallbacks:Pr,registerWatch:Pr,getFields:Pr,setValidateMessages:Pr,setPreserve:Pr,getInitialValue:Pr})}),ff=goe;function U4(e){return e==null?[]:Array.isArray(e)?e:[e]}function voe(e){return e&&!!e._init}function wn(e){return U4(e)}function xO(e,t){let r={};return t.forEach(n=>{let a=Ai(e,n);r=oi(r,n,a)}),r}function lh(e,t,r=!1){return e&&e.some(n=>gx(t,n,r))}function gx(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 EO(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 H4(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,ih.useState)(()=>typeof t=="function"?t({}):void 0),c=(0,ih.useMemo)(()=>H4(o),[o]),d=(0,ih.useRef)(c);d.current=c;let f=(0,ih.useContext)(ff),h=a||f,g=h&&h._init,{getFieldsValue:v,getInternalHooks:y}=h,{registerWatch:x}=y(df),w=xt((F,C)=>{let D=n.preserve?C??v(!0):F??v(),S=typeof t=="function"?t(D):Ai(D,wn(t));H4(o)!==H4(S)&&l(S)}),k=typeof t=="function"?t:JSON.stringify(t);return(0,ih.useEffect)(()=>{g&&w()},[g,k]),(0,ih.useEffect)(()=>g?x((F,C)=>{w(F,C)}):void 0,[g]),o}var IO=woe,xoe=B(_()),uu=B(_()),Eoe=B(_()),koe=Eoe.createContext(null),Ov=koe;function V4(){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 G4=V4(),Coe=/%[sdj%]/g,Soe=()=>{};typeof process<"u"&&process.env;function K4(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 kO(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 CO=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 x=k=>(n(k),k.length?y(new CO(k,K4(k))):v(a)),w=Aoe(e);kO(w,r,x)});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,f=[],h=new Promise((g,v)=>{let y=x=>{if(f.push.apply(f,x),d++,d===c)return n(f),f.length?v(new CO(f,K4(f))):g(a)};l.length||(n(f),g(a)),l.forEach(x=>{let w=e[x];o.indexOf(x)!==-1?kO(w,r,y):Doe(w,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 SO(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 FO(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 oh="enum",Moe=(e,t,r,n,a)=>{e[oh]=Array.isArray(e[oh])?e[oh]:[],e[oh].indexOf(t)===-1&&n.push(oo(a.messages[oh],e.fullField,e[oh].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,Noe=(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,f=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&&(f=t.length),v&&(f=t.replace(d,"_").length),o?f!==e.len&&n.push(oo(a.messages[h].len,e.fullField,e.len)):l&&!c&&f<e.min?n.push(oo(a.messages[h].min,e.fullField,e.min)):c&&!l&&f>e.max?n.push(oo(a.messages[h].max,e.fullField,e.max)):l&&c&&(f<e.min||f>e.max)&&n.push(oo(a.messages[h].range,e.fullField,e.min,e.max))},Poe=Noe,Roe=(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))},MO=Roe,fx,Ooe=(()=>{if(fx)return fx;let e="[a-fA-F\\d:]",t=x=>x&&x.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=x=>x&&x.exact?o:new RegExp(`(?:${t(x)}${r}${t(x)})|(?:${t(x)}${a}${t(x)})`,"g");d.v4=x=>x&&x.exact?l:new RegExp(`${t(x)}${r}${t(x)}`,"g"),d.v6=x=>x&&x.exact?c:new RegExp(`${t(x)}${a}${t(x)}`,"g");let f="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",g=d.v4().source,v=d.v6().source,y=`(?:${f}|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 fx=new RegExp(`(?:^${y}$)`,"i"),fx}),q4={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},Nv={integer(e){return Nv.number(e)&&parseInt(e,10)===e},float(e){return Nv.number(e)&&!Nv.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"&&!Nv.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(q4.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(q4.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Ooe())},hex(e){return typeof e=="string"&&!!e.match(q4.hex)}},zoe=(e,t,r,n,a)=>{if(e.required&&t===void 0){MO(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?Nv[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))},Loe=zoe,Hoe=(e,t,r,n,a)=>{(/^\s+$/.test(t)||t==="")&&n.push(oo(a.messages.whitespace,e.fullField))},qoe=Hoe,rr={required:MO,whitespace:qoe,type:Loe,range:Poe,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();rr.required(e,t,n,o,a)}r(o)},Uoe=Woe,Voe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t==null&&!e.required)return r();rr.required(e,t,n,o,a,"array"),t!=null&&(rr.type(e,t,n,o,a),rr.range(e,t,n,o,a))}r(o)},Goe=Voe,Koe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();rr.required(e,t,n,o,a),t!==void 0&&rr.type(e,t,n,o,a)}r(o)},Xoe=Koe,Qoe=(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(rr.required(e,t,n,o,a),!ea(t,"date")){let l;t instanceof Date?l=t:l=new Date(t),rr.type(e,l,n,o,a),l&&rr.range(e,l.getTime(),n,o,a)}}r(o)},Yoe=Qoe,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();rr.required(e,t,n,o,a),t!==void 0&&rr[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();rr.required(e,t,n,o,a),t!==void 0&&(rr.type(e,t,n,o,a),rr.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();rr.required(e,t,n,o,a),t!==void 0&&(rr.type(e,t,n,o,a),rr.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();rr.required(e,t,n,o,a),t!==void 0&&rr.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();rr.required(e,t,n,o,a),t!==void 0&&(rr.type(e,t,n,o,a),rr.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();rr.required(e,t,n,o,a),t!==void 0&&rr.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();rr.required(e,t,n,o,a),ea(t,"string")||rr.pattern(e,t,n,o,a)}r(o)},fse=dse,pse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();rr.required(e,t,n,o,a),ea(t)||rr.type(e,t,n,o,a)}r(o)},mse=pse,hse=(e,t,r,n,a)=>{let o=[],l=Array.isArray(t)?"array":typeof t;rr.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();rr.required(e,t,n,o,a,"string"),ea(t,"string")||(rr.type(e,t,n,o,a),rr.range(e,t,n,o,a),rr.pattern(e,t,n,o,a),e.whitespace===!0&&rr.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();rr.required(e,t,n,l,a,o),ea(t,o)||rr.type(e,t,n,l,a)}r(l)},px=yse,Rv={string:bse,method:ose,number:lse,boolean:Xoe,regexp:mse,integer:ase,float:rse,array:Goe,object:cse,enum:ese,pattern:fse,date:Yoe,url:px,hex:px,email:px,tel:px,required:gse,any:Uoe},Pv=class X4{constructor(t){oe(this,"rules",null),oe(this,"_messages",G4),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=FO(V4(),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(x){Array.isArray(x)?g=g.concat(...x):g.push(x)}for(let x=0;x<h.length;x++)y(h[x]);g.length?(v=K4(g),l(g,v)):l(null,a)}if(o.messages){let h=this.messages();h===G4&&(h=V4()),FO(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 x=y;typeof x.transform=="function"&&(a===t&&(a={...a}),v=a[h]=x.transform(v),v!=null&&(x.type=x.type||(Array.isArray(v)?"array":typeof v))),typeof x=="function"?x={validator:x}:x={...x},x.validator=this.getValidationMethod(x),x.validator&&(x.field=h,x.fullField=x.fullField||h,x.type=this.getType(x),d[h]=d[h]||[],d[h].push({rule:x,value:v,source:a,field:h}))})});let f={};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 x(F,C){return{...C,fullField:`${v.fullField}.${F}`,fullFields:v.fullFields?[...v.fullFields,F]:[F]}}function w(F=[]){let C=Array.isArray(F)?F:[F];!o.suppressWarning&&C.length&&X4.warning("async-validator:",C),C.length&&v.message!==void 0&&v.message!==null&&(C=[].concat(v.message));let D=C.map(SO(v,a));if(o.first&&D.length)return f[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(SO(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],N=Array.isArray($)?$:[$];A[j]=N.map(x.bind(null,j))});let I=new X4(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,w,h.source,o);else if(v.validator){try{k=v.validator(v,h.value,w,h.source,o)}catch(F){console.error?.(F),o.suppressValidatorError||setTimeout(()=>{throw F},0),w(F.message)}k===!0?w():k===!1?w(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||`${v.fullField||v.field} fails`):k instanceof Array?w(k):k instanceof Error&&w(k.message)}k&&k.then&&k.then(()=>w(),F=>w(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&&!Rv.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"?Rv.required:Rv[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");Rv[e]=t}),oe(Pv,"warning",Soe),oe(Pv,"messages",G4),oe(Pv,"validators",Rv);var wse=Pv,xse=wse,DO=B(_()),Mi="'${name}' is not a valid ${type}",TO={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:Mi,method:Mi,array:Mi,object:Mi,number:Mi,date:Mi,boolean:Mi,integer:Mi,float:Mi,regexp:Mi,email:Mi,tel:Mi,url:Mi,hex:Mi},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}"}},AO=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 $O="CODE_LOGIC_ERROR";async function Q4(e,t,r,n,a){let o={...r};if(delete o.ruleIndex,AO.warning=()=>{},o.validator){let g=o.validator;o.validator=(...v)=>{try{return g(...v)}catch(y){return console.error(y),Promise.reject($O)}}}let l=null;o&&o.type==="array"&&o.defaultField&&(l=o.defaultField,delete o.defaultField);let c=new AO({[e]:[o]}),d=wc(TO,n.validateMessages);c.messages(d);let f=[];try{await Promise.resolve(c.validate({[e]:t},{...n}))}catch(g){g.errors&&(f=g.errors.map(({message:v},y)=>{let x=v===$O?d.default:v;return DO.isValidElement(x)?DO.cloneElement(x,{key:`error_${y}`}):x}))}if(!f.length&&l&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((g,v)=>Q4(`${e}.${v}`,g,l,n,a)))).reduce((g,v)=>[...g,...v],[]);let h={...r,name:e,enum:(r.enum||[]).join(", "),...a};return f.map(g=>typeof g=="string"?Ese(g,h):g)}function kse(e,t,r,n,a,o){let l=e.join("."),c=r.map((f,h)=>{let g=f.validator,v={...f,ruleIndex:h};return g&&(v.validator=(y,x,w)=>{let k=!1,F=g(y,x,(...C)=>{Promise.resolve().then(()=>{Ea(!k,"Your validator function has already return a promise. `callback` will be ignored."),k||w(...C)})});k=F&&typeof F.then=="function"&&typeof F.catch=="function",Ea(k,"`callback` is deprecated. Please return a promise instead."),k&&F.then(()=>{w()}).catch(C=>{w(C||" ")})}),v}).sort(({warningOnly:f,ruleIndex:h},{warningOnly:g,ruleIndex:v})=>!!f==!!g?h-v:f?1:-1),d;if(a===!0)d=new Promise(async(f,h)=>{for(let g=0;g<c.length;g+=1){let v=c[g],y=await Q4(l,t,v,n,o);if(y.length){h([{errors:y,rule:v}]);return}}f([])});else{let f=c.map(h=>Q4(l,t,h,n,o).then(g=>({errors:g,rule:h})));d=(a?Sse(f):Cse(f)).then(h=>Promise.reject(h))}return d.catch(f=>f),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 jO=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=>!gx(r,t))&&this.namePathList.push(t)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;jO(()=>{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=>{jO(()=>{fr(()=>{e()})})})}function Y4(){return Y4=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},Y4.apply(this,arguments)}var cf=[],_v=[];function W4(e,t,r,n,a,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==a}var _O=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",cf),oe(this,"warnings",_v),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(),f=this.getValue(t),h=this.getValue(c),g=r&&lh(r,d);switch(n.type==="valueUpdate"&&n.source==="external"&&!yc(f,h)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=cf,this.warnings=_v,this.triggerMetaEvent()),n.type){case"reset":if(!r||g){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=cf,this.warnings=_v,this.triggerMetaEvent(),l?.(),this.refresh();return}break;case"remove":{if(a&&W4(a,t,c,f,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||cf),"warnings"in v&&(this.warnings=v.warnings||_v),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in v&&lh(r,d,!0)){this.reRender();return}if(a&&!d.length&&W4(a,t,c,f,h,n)){this.reRender();return}break}case"dependenciesUpdate":{if(o.map(wn).some(v=>lh(n.relatedFields,v))){this.reRender();return}break}default:if(g||(!o.length||d.length||a)&&W4(a,t,c,f,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:f,validateDebounce:h}=this.props;l&&await Dse();let g=this.getRules();if(a&&(g=g.filter(y=>y).filter(y=>{let{validateTrigger:x}=y;return x?U4(x).includes(a):!0})),h&&a&&(await new Promise(y=>{setTimeout(y,h)}),this.validatePromise!==c))return[];let v=kse(r,n,g,t,d,f);return v.catch(y=>y).then((y=cf)=>{if(this.validatePromise===c){this.validatePromise=null;let x=[],w=[];y.forEach?.(({rule:{warningOnly:k},errors:F=cf})=>{k?w.push(...F):x.push(...F)}),this.errors=x,this.warnings=w,this.triggerMetaEvent(),this.reRender()}}),v});return o||(this.validatePromise=c,this.dirty=!0,this.errors=cf,this.warnings=_v,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(df);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 Ai(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:f}=this.props,h=a!==void 0?a:f.validateTrigger,g=this.getNamePath(),{getInternalHooks:v,getFieldsValue:y}=f,{dispatch:x}=v(df),w=this.getValue(),k=d||(S=>({[c]:S})),F=t[n],C=r!==void 0?k(w):{},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&&x({type:"updateValue",namePath:g,value:I}),F&&F(...S)},U4(h||[]).forEach(S=>{let A=D[S];D[S]=(...I)=>{A&&A(...I);let{rules:j}=this.props;j&&j.length&&x({type:"validateField",namePath:g,triggerName:S})}}),D}),e.fieldContext){let{getInternalHooks:t}=e.fieldContext,{initEntityValue:r}=t(df);r(this)}}componentDidMount(){let{shouldUpdate:e,fieldContext:t}=this.props;if(this.mounted=!0,t){let{getInternalHooks:r}=t,{registerField:n}=r(df);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)):(Ea(!r,"`children` of Field is not validate ReactElement."),a=r),uu.createElement(uu.Fragment,{key:e},a)}};oe(_O,"contextType",ff);function Ase({name:e,...t}){let r=uu.useContext(ff),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(_O,Y4({key:l,name:a,isListField:o},t,{fieldContext:r}))}var tF=Ase,lu=B(_());function $se({name:e,initialValue:t,children:r,rules:n,validateTrigger:a,isListField:o}){let l=lu.useContext(ff),c=lu.useContext(Ov),d=lu.useRef({keys:[],id:0}).current,f=lu.useMemo(()=>[...wn(l.prefixName)||[],...wn(e)],[l.prefixName,e]),h=lu.useMemo(()=>({...l,prefixName:f}),[l,f]),g=lu.useMemo(()=>({getKey:y=>{let x=f.length,w=y[x];return[d.keys[w],y.slice(x+1)]}}),[d,f]);if(typeof r!="function")return Ea(!1,"Form.List only accepts function as children."),null;let v=(y,x,{source:w})=>w==="internal"?!1:y!==x;return lu.createElement(Ov.Provider,{value:g},lu.createElement(ff.Provider,{value:h},lu.createElement(tF,{name:[],shouldUpdate:v,rules:n,validateTrigger:a,initialValue:t,isList:!0,isListField:o??!!c},({value:y=[],onChange:x},w)=>{let{getFieldValue:k}=l,F=()=>k(f||[])||[],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)],x([...I.slice(0,A),S,...I.slice(A)])):(d.keys=[...d.keys,d.id],x([...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($)),x(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=EO(d.keys,S,A),x(EO(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,w)})))}var NO=$se,BO=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 Z4="__@field_split__";function mx(e){return e.map(t=>`${typeof t}:${t}`).join(Z4)}var Ise=class{constructor(){oe(this,"kvs",new Map)}set(e,t){this.kvs.set(mx(e),t)}get(e){return this.kvs.get(mx(e))}getAsPrefix(e){let t=mx(e),r=t+Z4,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(mx(e))}map(e){return[...this.kvs.entries()].map(([t,r])=>{let n=t.split(Z4);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}},sh=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===df?(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}):(Ea(!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,Ai(t,a))}),this.prevWithoutPreserves=null,this.updateStore(n)}}),oe(this,"destroyForm",t=>{if(t)this.updateStore({});else{let r=new sh;this.getFieldEntities(!0).forEach(n=>{this.isMergedPreserve(n.isPreserve())||r.set(n.getNamePath(),!0)}),this.prevWithoutPreserves=r}}),oe(this,"getInitialValue",t=>{let r=Ai(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 sh;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(f=>{let h=f.INVALIDATE_NAME_PATH||f.getNamePath();if(f.isList?.()){c.push(h);return}if(!a)l.push(h);else{let g="getMeta"in f?f.getMeta():null;a(g)&&l.push(h)}});let d=xO(this.store,l.map(wn));return c.forEach(f=>{Ai(d,f)||(d=oi(d,f,[]))}),d}),oe(this,"getFieldValue",t=>{this.warningUnhooked();let r=wn(t);return Ai(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 sh;a.forEach(g=>{d.set(g,[])}),l.forEach(g=>{let v=g.getNamePath();a.forEach(y=>{y.every((x,w)=>v[w]===x)&&d.update(y,x=>[...x,g])})});let f=g=>g.some(c),h=d.map(({value:g})=>g);return o?h.every(f):h.some(f)}),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 lh(n,o)&&a.isFieldValidating()})}),oe(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t]))),oe(this,"resetWithFieldInitialValue",(t={})=>{let r=new sh,n=this.getFieldEntities(!0);n.forEach(l=>{let{initialValue:c}=l.props,d=l.getNamePath();if(c!==void 0){let f=r.get(d)||new Set;f.add({entity:l,value:c}),r.set(d,f)}});let a=l=>{l.forEach(c=>{let{initialValue:d}=c.props;if(d!==void 0){let f=c.getNamePath();if(this.getInitialValue(f)!==void 0)Ea(!1,`Form already set 'initialValues' with path '${f.join(".")}'. Field can not overwrite it.`);else{let h=r.get(f);if(h&&h.size>1)Ea(!1,`Multiple Field with path '${f.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(h){let g=this.getFieldValue(f);!c.isListField()&&(!t.skipExist||g===void 0)&&this.updateStore(oi(this.store,f,[...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();Ai(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=>!gx(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=xO(this.store,[n]),d=this.getFieldsValue(),f=oi(d,n,Ai(c,n));l(c,f)}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 sh;this.getFieldEntities().forEach(l=>{let{dependencies:c}=l.props;(c||[]).forEach(d=>{let f=wn(d);a.update(f,(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 sh;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})=>lh(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=[],f=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=>gx(C,F,!0)))&&c.push(F),l.push(F)),!(!k.props.rules||!k.props.rules.length)&&!(v&&!k.isFieldDirty())&&(h.add(F.join(f)),!o||lh(l,F,g))){let C=k.validateRules({validateMessages:{...TO,...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 x=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})});x.catch(k=>k);let w=l.filter(k=>h.has(k.join(f)));return this.triggerOnFieldsChange(w),x}),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=BO.useRef(null),[,r]=BO.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 rF=Tse,No=B(_()),hx=B(_()),J4=hx.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),PO=({validateMessages:e,onFormChange:t,onFormFinish:r,children:n})=>{let a=hx.useContext(J4),o=hx.useRef({});return hx.createElement(J4.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=J4;function eF(){return eF=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},eF.apply(this,arguments)}var _se=(e,t)=>{let{name:r,initialValues:n,fields:a,form:o,preserve:l,children:c,component:d="form",validateMessages:f,validateTrigger:h="onChange",onValuesChange:g,onFieldsChange:v,onFinish:y,onFinishFailed:x,clearOnDestroy:w,...k}=e,F=No.useRef(null),C=No.useContext(jse),[D]=rF(o),{useSubscribe:S,setInitialValues:A,setCallbacks:I,setValidateMessages:j,setPreserve:$,destroyForm:N}=D.getInternalHooks(df);No.useImperativeHandle(t,()=>({...D,nativeElement:F.current})),No.useEffect(()=>(C.registerForm(r,D),()=>{C.unregisterForm(r)}),[C,D,r]),j({...C.validateMessages,...f}),I({onValuesChange:g,onFieldsChange:(R,...W)=>{C.triggerFormChange(r,R),v&&v(R,...W)},onFinish:R=>{C.triggerFormFinish(r,R),y&&y(R)},onFinishFailed:x}),$(l);let P=No.useRef(null);A(n,!P.current),P.current||(P.current=!0),No.useEffect(()=>()=>N(w),[]);let O,V=typeof c=="function";if(V){let R=D.getFieldsValue(!0);O=c(R,D)}else O=c;S(!V);let H=No.useRef(null);No.useEffect(()=>{boe(H.current||[],a||[])||D.setFields(a||[]),H.current=a},[a,D]);let q=No.useMemo(()=>({...D,validateTrigger:h}),[D,h]),L=No.createElement(Ov.Provider,{value:null},No.createElement(ff.Provider,{value:q},O));return d===!1?L:No.createElement(d,eF({},k,{ref:F,onSubmit:R=>{R.preventDefault(),R.stopPropagation(),D.submit()},onReset:R=>{R.preventDefault(),D.resetFields(),k.onReset?.(R)}}),L)},Nse=_se,Pse=xoe.forwardRef(Nse),uh=Pse;uh.FormProvider=PO;uh.Field=tF;uh.List=NO;uh.useForm=rF;uh.useWatch=IO;var Rse=uh,cu=B(_()),Ose=cu.createContext({labelAlign:"right",layout:"horizontal",itemRef:()=>{}}),zse=cu.createContext(null),Lse=e=>{let t=xr(e,["prefixCls"]);return cu.createElement(PO,{...t})},Hse=cu.createContext({prefixCls:""}),so=cu.createContext({}),nF=({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)},aF=cu.createContext(void 0);var RO=B(_()),qse=(e,t,r,n)=>{let a=RO.useContext(wt),{variant:o,[e]:l}=a,c=RO.useContext(aF),d=n?a[n]:void 0,f=l?.variant??d?.variant,h=typeof t<"u"||r===!1||typeof c<"u"||typeof f<"u"||typeof o<"u",g;typeof t<"u"?g=t:r===!1?g="borderless":g=c??f??o??"outlined";let v=e4.includes(g);return[g,v,h]},du=qse;function zv(...e){return e.find(t=>t!==void 0)}var OO=B(_()),Wse=e=>{let{space:t,form:r,children:n}=e;if(!or(n))return null;let a=n;return r&&(a=OO.default.createElement(nF,{override:!0,status:!0},a)),t&&(a=OO.default.createElement(S4,null,a)),a},ch=Wse;var zO=B(_()),Use={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"},Vse=Use;function iF(){return iF=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},iF.apply(this,arguments)}var Gse=(e,t)=>zO.createElement(Gt,iF({},e,{ref:t,icon:Vse})),Kse=zO.forwardRef(Gse),Lv=Kse;var nl=B(_()),Ti=B(_());function Xse(e){return!!(e.addonBefore||e.addonAfter)}function Qse(e){return!!(e.prefix||e.suffix||e.allowClear)}function LO(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 vx(e,t,r,n){if(!r)return;let a=t;if(t.type==="click"){a=LO(t,e,""),r(a);return}if(e.type!=="file"&&n!==void 0){a=LO(t,e,n),r(a);return}r(a)}function cF(){return cF=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},cF.apply(this,arguments)}var Yse=Ti.default.forwardRef((e,t)=>{let{inputElement:r,children:n,prefixCls:a,prefix:o,suffix:l,addonBefore:c,addonAfter:d,className:f,style:h,disabled:g,readOnly:v,focused:y,triggerFocus:x,allowClear:w,value:k,handleReset:F,hidden:C,classes:D,classNames:S,dataAttrs:A,styles:I,components:j,onClear:$}=e,N=n??r,P=j?.affixWrapper||"span",O=j?.groupWrapper||"span",V=j?.wrapper||"span",H=j?.groupAddon||"span",q=(0,Ti.useRef)(null),L=Q=>{q.current?.contains(Q.target)&&x?.()},R=Qse(e),W=(0,Ti.cloneElement)(N,{value:k,className:te(N.props?.className,!R&&S?.variant)||null}),z=(0,Ti.useRef)(null);if(Ti.default.useImperativeHandle(t,()=>({nativeElement:z.current||q.current})),R){let Q=null;if(w){let U=!g&&!v&&k&&!(typeof w=="object"&&w.disabled),X=`${a}-clear-icon`,Y=typeof w=="object"&&w?.clearIcon?w.clearIcon:"\u2716";Q=Ti.default.createElement("button",{type:"button",onClick:re=>{F?.(re),$?.()},onMouseDown:re=>re.preventDefault(),className:te(X,{[`${X}-hidden`]:!U,[`${X}-has-suffix`]:!!l},S?.clear),style:I?.clear},Y)}let K=`${a}-affix-wrapper`,Z=te(K,{[`${a}-disabled`]:g,[`${K}-disabled`]:g,[`${K}-focused`]:y,[`${K}-readonly`]:v,[`${K}-input-with-clear-btn`]:l&&w&&k},D?.affixWrapper,S?.affixWrapper,S?.variant),T=(l||w)&&Ti.default.createElement("span",{className:te(`${a}-suffix`,S?.suffix),style:I?.suffix},Q,l);W=Ti.default.createElement(P,cF({className:Z,style:I?.affixWrapper,onClick:L},A?.affixWrapper,{ref:q}),o&&Ti.default.createElement("span",{className:te(`${a}-prefix`,S?.prefix),style:I?.prefix},o),W,T)}if(Xse(e)){let Q=`${a}-group`,K=`${Q}-addon`,Z=`${Q}-wrapper`,T=te(`${a}-wrapper`,Q,D?.wrapper,S?.wrapper),U=te(Z,{[`${Z}-disabled`]:g},D?.group,S?.groupWrapper);W=Ti.default.createElement(O,{className:U,ref:z},Ti.default.createElement(V,{className:T},c&&Ti.default.createElement(H,{className:K},c),W,d&&Ti.default.createElement(H,{className:K},d)))}return Ti.default.cloneElement(W,{className:te(W.props?.className,f)||null,style:{...W.props?.style,...h},hidden:C})}),QO=Yse,lo=B(_()),Zse=B(_());function YO(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 ZO({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 Hv=B(_());function JO({countConfig:e,getTarget:t}){let[r,n]=Hv.useState(null),a=Hv.useRef(t);return Hv.useEffect(()=>{a.current=t},[t]),Hv.useEffect(()=>{r&&(a.current()?.setSelectionRange(...r),n(null))},[r]),Hv.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 ez(e,t){let[r,n]=wr(e,t),a=r==null?"":String(r);return{value:r,setValue:n,formatValue:a}}function bx(){return bx=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},bx.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:f="rc-input",disabled:h,htmlSize:g,className:v,maxLength:y,suffix:x,showCount:w,count:k,type:F="text",classes:C,classNames:D,styles:S,onCompositionStart:A,onCompositionEnd:I,...j}=e,[$,N]=(0,lo.useState)(!1),P=(0,lo.useRef)(!1),O=(0,lo.useRef)(!1),V=(0,lo.useRef)(null),H=(0,lo.useRef)(null),q=ae=>{V.current&&S5(V.current,ae)},{setValue:L,formatValue:R}=ez(e.defaultValue,e.value),W=YO(k,w),{isOutOfRange:z,dataCount:Q}=ZO({countConfig:W,value:R,maxLength:y}),K=JO({countConfig:W,getTarget:()=>V.current});(0,lo.useImperativeHandle)(t,()=>({focus:q,blur:()=>{V.current?.blur()},setSelectionRange:(ae,ce,ye)=>{V.current?.setSelectionRange(ae,ce,ye)},select:()=>{V.current?.select()},input:V.current,nativeElement:H.current?.nativeElement||V.current})),(0,lo.useEffect)(()=>{O.current&&(O.current=!1),N(ae=>ae&&h?!1:ae)},[h]);let Z=(ae,ce,ye)=>{let Te=K(ce,P.current);ye.source==="compositionEnd"&&ce===Te||(L(Te),V.current&&vx(V.current,ae,n,Te))},T=ae=>{Z(ae,ae.target.value,{source:"change"})},U=ae=>{P.current=!1,Z(ae,ae.currentTarget.value,{source:"compositionEnd"}),I?.(ae)},X=ae=>{l&&ae.key==="Enter"&&!O.current&&!ae.nativeEvent.isComposing&&(O.current=!0,l(ae)),c?.(ae)},Y=ae=>{ae.key==="Enter"&&(O.current=!1),d?.(ae)},re=ae=>{N(!0),a?.(ae)},J=ae=>{O.current&&(O.current=!1),N(!1),o?.(ae)},se=ae=>{L(""),q(),V.current&&vx(V.current,ae,n)},me=z&&`${f}-out-of-range`,le=()=>{let ae=xr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return lo.default.createElement("input",bx({autoComplete:r},ae,{onChange:T,onFocus:re,onBlur:J,onKeyDown:X,onKeyUp:Y,className:te(f,{[`${f}-disabled`]:h},D?.input),style:S?.input,ref:V,size:g,type:F,onCompositionStart:ce=>{P.current=!0,A?.(ce)},onCompositionEnd:U}))},he=()=>x||W.show?lo.default.createElement(lo.default.Fragment,null,W.show&&lo.default.createElement("span",{className:te(`${f}-show-count-suffix`,{[`${f}-show-count-has-suffix`]:!!x},D?.count),style:{...S?.count}},Q),x):null;return lo.default.createElement(QO,bx({},j,{prefixCls:f,className:te(v,me),handleReset:se,value:R,focused:$,triggerFocus:q,suffix:he(),disabled:h,classes:C,classNames:D,styles:S,ref:H}),le())}),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"],oF={},co;function ale(e,t=!1){let r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&oF[r])return oF[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&&(oF[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,f,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&&(f=y*n,l==="border-box"&&(f=f+a+o),h=g>f?void 0:"hidden",g=Math.min(f,g))}let v={height:g,overflowY:h,resize:"none"};return d&&(v.minHeight=d),f&&(v.maxHeight=f),v}function dF(){return dF=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},dF.apply(this,arguments)}var sF=0,lF=1,uF=2,ole=al.forwardRef((e,t)=>{let{prefixCls:r,defaultValue:n,value:a,autoSize:o,onResize:l,className:c,style:d,disabled:f,onChange:h,onInternalAutoSize:g,...v}=e,[y,x]=wr(n,a),w=y??"",k=q=>{x(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(uF),[j,$]=al.useState(),N=()=>{I(sF)};er(()=>{S&&N()},[a,C,D,S]),er(()=>{if(A===sF)I(lF);else if(A===lF){let q=ile(F.current,!1,C,D);I(uF),$(q)}},[A]);let P=al.useRef(void 0),O=()=>{P.current!==void 0&&fr.cancel(P.current)},V=q=>{A===uF&&(l?.(q),o&&(O(),P.current=fr(()=>{N()})))};al.useEffect(()=>O,[]);let H={...d,...S?j:null};return(A===sF||A===lF)&&(H.overflowY="hidden",H.overflowX="hidden"),al.createElement(ka,{onResize:V,disabled:!(o||l)},al.createElement("textarea",dF({},v,{ref:F,style:H,className:te(r,c,{[`${r}-disabled`]:f}),disabled:f,value:w,onChange:k})))}),sle=ole;function fF(){return fF=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},fF.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:f,prefixCls:h="rc-textarea",showCount:g,count:v,className:y,style:x,disabled:w,hidden:k,classNames:F,styles:C,onResize:D,onClear:S,onPressEnter:A,readOnly:I,autoSize:j,onKeyDown:$,...N},P)=>{let[O,V]=uo.default.useState(!1),H=uo.default.useRef(!1),[q,L]=uo.default.useState(null),R=(0,uo.useRef)(null),W=(0,uo.useRef)(null),z=()=>W.current?.textArea||null,{setValue:Q,formatValue:K}=ez(e,t),Z=YO(v,g),{isOutOfRange:T,dataCount:U}=ZO({countConfig:Z,value:K,maxLength:l}),X=JO({countConfig:Z,getTarget:()=>W.current?.textArea||null}),Y=()=>{z()?.focus()};(0,uo.useImperativeHandle)(P,()=>({resizableTextArea:W.current,focus:Y,blur:()=>{z()?.blur()},nativeElement:R.current?.nativeElement||z()})),(0,uo.useEffect)(()=>{V(ke=>!w&&ke)},[w]);let re=(ke,Ce)=>{let Le=X(Ce,H.current);Q(Le),vx(ke.currentTarget,ke,a,Le)},J=ke=>{H.current=!0,c?.(ke)},se=ke=>{H.current=!1,re(ke,ke.currentTarget.value),d?.(ke)},me=ke=>{re(ke,ke.target.value)},le=ke=>{ke.key==="Enter"&&A&&!ke.nativeEvent.isComposing&&A(ke),$?.(ke)},he=ke=>{V(!0),r?.(ke)},ae=ke=>{V(!1),n?.(ke)},ce=ke=>{Q(""),Y();let Ce=z();Ce&&vx(Ce,ke,a)},ye=f;Z.show&&(ye=uo.default.createElement(uo.default.Fragment,null,ye,uo.default.createElement("span",{className:te(`${h}-data-count`,F?.count),style:C?.count},U)));let Te=ke=>{D?.(ke),z()?.style.height&&L(!0)},De=!j&&!g&&!o;return uo.default.createElement(QO,{ref:R,value:K,allowClear:o,handleReset:ce,suffix:ye,prefixCls:h,classNames:{...F,affixWrapper:te(F?.affixWrapper,{[`${h}-show-count`]:g,[`${h}-textarea-allow-clear`]:o})},disabled:w,focused:O,className:te(y,T&&`${h}-out-of-range`),style:{...x,...q&&!De?{height:"auto"}:{}},dataAttrs:typeof U=="string"?{affixWrapper:{"data-count":U}}:void 0,styles:C,hidden:k,readOnly:I,onClear:S},uo.default.createElement(sle,fF({},N,{autoSize:j,maxLength:l,onKeyDown:le,onChange:me,onFocus:he,onBlur:ae,onCompositionStart:J,onCompositionEnd:se,className:te(F?.textarea),style:{resize:x?.resize,...C?.textarea},disabled:w,prefixCls:h,onResize:Te,ref:W,readOnly:I})))}),ule=lle,cle=tle,HO=B(_()),pF=e=>{let{allowClear:t,clearIcon:r,contextAllowClear:n,contextClearIcon:a,defaultAllowClear:o,componentName:l}=e;return(0,HO.useMemo)(()=>t??n??o?{clearIcon:zv(Ct(t)?t?.clearIcon:r,Ct(n)?n?.clearIcon:a,HO.default.createElement(Lv,null)),disabled:(Ct(t)?t?.disabled:void 0)??(Ct(n)?n?.disabled:void 0)}:!1,[t,r,n,a,o])},qO=B(_());function yx(e,t){let r=(0,qO.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,qO.useEffect)(()=>(t&&n(),()=>r.current.forEach(a=>{a&&clearTimeout(a)})),[t]),n}function pf(e){return Nt(e,{inputAffixPadding:e.paddingXXS})}var mf=e=>{let{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:a,lineWidthFocus:o,controlHeightSM:l,controlHeightLG:c,fontSizeLG:d,lineHeightLG:f,paddingSM:h,controlPaddingHorizontalSM:g,controlPaddingHorizontal:v,colorFillAlter:y,colorPrimaryHover:x,colorPrimary:w,controlOutlineWidth:k,controlOutline:F,colorErrorOutline:C,colorWarningOutline:D,colorBgContainer:S,inputFontSize:A,inputFontSizeLG:I,inputFontSizeSM:j}=e,$=A||r,N=j||$,P=I||d,O=Math.round((t-$*n)/2*10)/10-a,V=Math.round((l-N*n)/2*10)/10-a,H=Math.ceil((c-P*f)/2*10)/10-a;return{lineWidthFocus:o===0?0:a,paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(V,0),paddingBlockLG:Math.max(H,0),paddingInline:h-a,paddingInlineSM:g-a,paddingInlineLG:v-a,addonBg:y,activeBorderColor:w,hoverBorderColor:x,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:P,inputFontSizeSM:N}},dle=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),wx=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(Nt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),mF=(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}}),WO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...mF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),tz=(e,t)=>({"&-outlined":{...mF(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...wx(e)},...WO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...WO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),UO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),fle=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}},...UO(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...UO(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...wx(e)}}}}),rz="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",nz=(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(", ")}),VO=(e,t)=>({"&, & input, & textarea":{color:t.color},[rz]:nz(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),az=(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"},[rz]:nz(e,e.activeBorderColor),[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:VO(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${r}-status-warning`]:VO(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},iz=(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}}),GO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...iz(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),oz=(e,t)=>({"&-filled":{...iz(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...wx(e)},...GO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...GO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),KO=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),ple=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...KO(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...KO(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}`}}}}}),sz=(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}}),XO=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...sz(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`}}),lz=(e,t)=>({"&-underlined":{...sz(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"},...XO(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...XO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),uz=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),hF=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:a}=e;return{padding:`${ve(t)} ${ve(a)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},gF=e=>({padding:`${ve(e.paddingBlockSM)} ${ve(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vF=(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}`,...uz(e.colorTextPlaceholder),"&-lg":{...hF(e),...t.largeStyle},"&-sm":{...gF(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`]:{...hF(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...gF(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",...o4(),[`${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]:{...pr(e),...vF(e),...tz(e),...oz(e),...az(e),...lz(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]:{...vF(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`]:{...pr(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}},...fle(e),...ple(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}}}},cz=kt(["Input","Shared"],e=>{let t=Nt(e,pf(e));return[hle(t),vle(t)]},mf,{resetFont:!1}),xx=kt(["Input","Component"],e=>{let t=Nt(e,pf(e));return[ble(t),yle(t),ah(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},mf,{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:f,allowClear:h,addonAfter:g,addonBefore:v,className:y,style:x,styles:w,rootClassName:k,onChange:F,classNames:C,variant:D,...S}=e,{getPrefixCls:A,direction:I,allowClear:j,autoComplete:$,className:N,style:P,classNames:O,styles:V}=_t("input"),H=A("input",r),q=(0,nl.useRef)(null),L=Yn(H),[R,W]=cz(H,k);xx(H,L);let{compactSize:z,compactItemClassnames:Q}=tl(H,I),K=On(Me=>o??z??Me),Z=nl.default.useContext(ci),T=l??Z,U={...e,size:K,disabled:T},X=lt(P),Y=lt(x),[re,J]=jt([O,C],[V,X,w,Y],{props:U}),{status:se,hasFeedback:me,feedbackIcon:le}=(0,nl.useContext)(so),he=eh(se,a),ae=wle(e)||!!me,ce=(0,nl.useRef)(ae),ye=yx(q,!0),Te=Me=>{ye(),c?.(Me)},De=Me=>{ye(),d?.(Me)},ke=Me=>{ye(),F?.(Me)},Ce=(me||f)&&nl.default.createElement(nl.default.Fragment,null,f,me&&le),Le=pF({allowClear:h,contextAllowClear:j,componentName:"Input"}),[$e,Be]=du("input",D,n);return nl.default.createElement(cle,{ref:ln(t,q),prefixCls:H,autoComplete:$,...S,disabled:T,onBlur:Te,onFocus:De,style:J.root,styles:J,suffix:Ce,allowClear:Le,className:te(y,k,W,L,Q,N,re.root),onChange:ke,addonBefore:v&&nl.default.createElement(ch,{form:!0,space:!0},v),addonAfter:g&&nl.default.createElement(ch,{form:!0,space:!0},g),classNames:{...re,input:te({[`${H}-sm`]:K==="small",[`${H}-lg`]:K==="large",[`${H}-rtl`]:I==="rtl"},re.input,R),variant:te({[`${H}-${$e}`]:Be},rf(H,he)),affixWrapper:te({[`${H}-affix-wrapper-sm`]:K==="small",[`${H}-affix-wrapper-lg`]:K==="large",[`${H}-affix-wrapper-rtl`]:I==="rtl"},R),wrapper:te({[`${H}-group-rtl`]:I==="rtl"},R),groupWrapper:te({[`${H}-group-wrapper-sm`]:K==="small",[`${H}-group-wrapper-lg`]:K==="large",[`${H}-group-wrapper-rtl`]:I==="rtl",[`${H}-group-wrapper-${$e}`]:Be},rf(`${H}-group-wrapper`,he,me),R)}})}),dh=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=kt(["Input","TextArea"],e=>{let t=Nt(e,pf(e));return kle(t)},mf,{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:f,className:h,style:g,styles:v,variant:y,showCount:x,onMouseDown:w,onResize:k,...F}=e,{getPrefixCls:C,direction:D,allowClear:S,autoComplete:A,className:I,style:j,classNames:$,styles:N}=_t("textArea"),P=kc.useContext(ci),O=o??P,{status:V,hasFeedback:H,feedbackIcon:q}=kc.useContext(so),L=eh(V,l),R=lt(j),W=lt(g),[z,Q]=jt([$,d],[N,R,v,W],{props:e}),K=kc.useRef(null);kc.useImperativeHandle(t,()=>({resizableTextArea:K.current?.resizableTextArea,focus:ke=>{S5(K.current?.resizableTextArea?.textArea,ke)},blur:()=>K.current?.blur(),nativeElement:K.current?.nativeElement||null}));let Z=C("input",r),T=Yn(Z),[U,X]=cz(Z,f);Cle(Z,T);let{compactSize:Y,compactItemClassnames:re}=tl(Z,D),J=On(ke=>a??Y??ke),[se,me]=du("textArea",y,n),le=pF({allowClear:c,contextAllowClear:S,componentName:"TextArea"}),[he,ae]=kc.useState(!1),[ce,ye]=kc.useState(!1),Te=ke=>{ae(!0),w?.(ke);let Ce=()=>{ae(!1),document.removeEventListener("mouseup",Ce)};document.addEventListener("mouseup",Ce)},De=ke=>{if(k?.(ke),he&&Er(getComputedStyle)){let Ce=K.current?.nativeElement?.querySelector("textarea");Ce&&getComputedStyle(Ce).resize==="both"&&ye(!0)}};return kc.createElement(ule,{autoComplete:A,...F,style:Q.root,styles:Q,disabled:O,allowClear:le,className:te(X,T,h,f,re,I,z.root,{[`${Z}-textarea-affix-wrapper-resize-dirty`]:ce}),classNames:{...z,textarea:te({[`${Z}-sm`]:J==="small",[`${Z}-lg`]:J==="large"},U,z.textarea,he&&`${Z}-mouse-active`),variant:te({[`${Z}-${se}`]:me},rf(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`]:x||e.count?.show},U)},prefixCls:Z,suffix:H&&kc.createElement("span",{className:`${Z}-textarea-suffix`},q),showCount:x,ref:K,onResize:De,onMouseDown:Te})}),qv=Sle;var dz=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 bF(){return bF=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},bF.apply(this,arguments)}var Ale=(e,t)=>dz.createElement(Gt,bF({},e,{ref:t,icon:Dle})),$le=dz.forwardRef(Ale),xF=$le,fz=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 yF(){return yF=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},yF.apply(this,arguments)}var Mle=(e,t)=>fz.createElement(Gt,yF({},e,{ref:t,icon:Ile})),Tle=fz.forwardRef(Mle),EF=Tle,pz=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 wF(){return wF=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},wF.apply(this,arguments)}var Nle=(e,t)=>pz.createElement(Gt,wF({},e,{ref:t,icon:_le})),Ple=pz.forwardRef(Nle),kF=Ple;var mz=B(_()),CF=B(_()),Rle=e=>{let{getPrefixCls:t,direction:r}=(0,CF.useContext)(wt),{prefixCls:n,className:a}=e,o=t("input-group",n),l=t("input"),[c,d]=xx(l),f=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,CF.useContext)(so),g=(0,CF.useMemo)(()=>({...h,isFormItemInput:!1}),[h]);return mz.createElement(so.Provider,{value:g},mz.createElement(L4.Compact,{className:f,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},Ole=Rle,di=B(_()),zle=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}}}},Lle=kt(["Input","OTP"],e=>{let t=Nt(e,pf(e));return zle(t)},mf),hf=B(_()),Hle="\u2022",qle=hf.forwardRef((e,t)=>{let{className:r,value:n,onChange:a,onActiveChange:o,index:l,mask:c,onFocus:d,type:f,...h}=e,{getPrefixCls:g}=hf.useContext(wt),v=g("otp"),y=typeof c=="string"?c:Hle,x=hf.useRef(null);hf.useImperativeHandle(t,()=>x.current);let w=D=>{a(l,D.target.value)},k=()=>{fr(()=>{let D=x.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 hf.createElement("span",{className:`${v}-input-wrapper`,role:"presentation"},c&&n!==""&&n!==void 0&&hf.createElement("span",{className:`${v}-mask-icon`,"aria-hidden":"true"},y),hf.createElement(dh,{"aria-label":`OTP Input ${l+1}`,...h,type:f??(c?"password":"text"),ref:x,value:n,onInput:w,onFocus:F,onKeyDown:C,onMouseDown:k,onMouseUp:k,className:te(r,{[`${v}-mask-input`]:c})}))}),Wle=qle;function Ex(e){return(e||"").split("")}var Ule=e=>{let{index:t,prefixCls:r,separator:n,className:a,style:o}=e,l=Er(n)?n(t):n;return l?di.createElement("span",{className:te(`${r}-separator`,a),style:o},l):null},Vle=di.forwardRef((e,t)=>{let{prefixCls:r,length:n=6,size:a,defaultValue:o,value:l,onChange:c,formatter:d,separator:f,variant:h,disabled:g,status:v,autoFocus:y,mask:x,type:w,autoComplete:k,onInput:F,onFocus:C,inputMode:D,classNames:S,styles:A,className:I,style:j,...$}=e,{classNames:N,styles:P,getPrefixCls:O,direction:V,style:H,className:q}=_t("otp"),L=O("otp",r),[R]=du("otp",h,void 0,"input"),W={...e,length:n,variant:R},z=lt(H),Q=lt(j),[K,Z]=jt([N,S],[P,z,A,Q],{props:W}),T=no($,{aria:!0,data:!0,attr:!0}),[U,X]=Lle(L),Y=On($e=>a??$e),re=di.useContext(so),J=eh(re.status,v),se=di.useMemo(()=>({...re,status:J,hasFeedback:!1,feedbackIcon:null}),[re,J]),me=di.useRef(null),le=di.useRef({});di.useImperativeHandle(t,()=>({focus:()=>{le.current[0]?.focus()},blur:()=>{for(let $e=0;$e<n;$e+=1)le.current[$e]?.blur()},nativeElement:me.current}));let he=$e=>d?d($e):$e,[ae,ce]=di.useState(()=>Ex(he(o||"")));di.useEffect(()=>{l!==void 0&&ce(Ex(l))},[l]);let ye=xt($e=>{ce($e),F&&F($e),c&&$e.length===n&&$e.every(Be=>Be)&&$e.some((Be,Me)=>ae[Me]!==Be)&&c($e.join(""))}),Te=xt(($e,Be)=>{let Me=Xr(ae);for(let qe=0;qe<$e;qe+=1)Me[qe]||(Me[qe]="");Be.length<=1?Me[$e]=Be:Me=Me.slice(0,$e).concat(Ex(Be)),Me=Me.slice(0,n);for(let qe=Me.length-1;qe>=0&&!Me[qe];qe-=1)Me.pop();let Ve=he(Me.map(qe=>qe||" ").join(""));return Me=Ex(Ve).map((qe,Ie)=>qe===" "&&!Me[Ie]?Me[Ie]:qe),Me}),De=($e,Be)=>{let Me=Te($e,Be),Ve=Math.min($e+Be.length,n-1);Ve!==$e&&Me[$e]!==void 0&&le.current[Ve]?.focus(),ye(Me)},ke=$e=>{le.current[$e]?.focus()},Ce=($e,Be)=>{for(let Me=0;Me<Be;Me+=1)if(!le.current[Me]?.input?.value){le.current[Me]?.focus();break}C?.($e)},Le={variant:R,disabled:g,status:J,mask:x,type:w,inputMode:D,autoComplete:k};return di.createElement("div",{...T,ref:me,className:te(I,L,{[`${L}-sm`]:Y==="small",[`${L}-lg`]:Y==="large",[`${L}-rtl`]:V==="rtl"},X,U,q,K.root),style:Z.root,role:"group"},di.createElement(so.Provider,{value:se},Array.from({length:n}).map(($e,Be)=>{let Me=`otp-${Be}`,Ve=ae[Be]||"";return di.createElement(di.Fragment,{key:Me},di.createElement(Wle,{ref:qe=>{le.current[Be]=qe},index:Be,size:Y,htmlSize:1,className:te(K.input,`${L}-input`),style:Z.input,onChange:De,value:Ve,onActiveChange:ke,autoFocus:Be===0&&y,onFocus:qe=>Ce(qe,Be),...Le}),Be<n-1&&di.createElement(Ule,{separator:f,index:Be,prefixCls:L,className:te(K.separator),style:Z.separator}))})))}),Gle=Vle,fu=B(_()),hz=B(_()),Kle=e=>e?fu.createElement(EF,null):fu.createElement(xF,null),Xle={click:"onClick",hover:"onMouseOver"},Qle=fu.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:a=!0,iconRender:o,prefixCls:l,inputPrefixCls:c,suffix:d,className:f,style:h,classNames:g,styles:v,variant:y,...x}=e,{getPrefixCls:w,className:k,style:F,classNames:C,styles:D,iconRender:S}=_t("inputPassword"),[A]=du("inputPassword",y,e.bordered,"input"),[I]=Jd("global"),j=fu.useContext(ci),$=r??j,N={...e,disabled:$,variant:A},P=lt(F),O=lt(h),[V,H]=jt([C,g],[D,P,v,O],{props:N}),q=Ct(a)&&a.visible!==void 0,[L,R]=(0,hz.useState)(()=>q?a.visible:!1),W=(0,hz.useRef)(null);fu.useEffect(()=>{q&&R(a.visible)},[q,a]);let z=yx(W),Q=()=>{if($)return;L&&z();let re=!L;q||R(re),Ct(a)&&a.onVisibleChange?.(re)},K=re=>{let J=Xle[n]||"",se=(o||S||Kle)(L),me=Ct(a)?a.tabIndex:void 0;return fu.createElement("span",{key:"passwordIcon",role:"button",tabIndex:$?-1:me??0,className:`${re}-icon`,"aria-disabled":$,"aria-pressed":L,"aria-label":L?I.hide:I.show,onMouseDown:le=>{le.preventDefault()},onMouseUp:le=>{le.preventDefault()},onKeyDown:le=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),le.repeat||Q())},[J]:Q},se)},Z=w("input",c),T=w("input-password",l),U=a&&K(T),X=te(T,k,f,{[`${T}-${e.size}`]:!!e.size}),Y={...x,type:L?"text":"password",prefixCls:Z,suffix:fu.createElement(fu.Fragment,null,U,d),disabled:$,className:X,classNames:V,styles:H,variant:A};return fu.createElement(dh,{ref:ln(t,W),...Y})}),Yle=Qle,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,f=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:f,[`&${e.antCls}-btn-icon-only`]:{minWidth:f}}}}},Jle=kt(["Input","Search"],e=>{let t=Nt(e,pf(e));return Zle(t)},mf),eue=Cc.forwardRef((e,t)=>{let{prefixCls:r,inputPrefixCls:n,className:a,size:o,style:l,enterButton:c=!1,searchIcon:d,addonAfter:f,loading:h,disabled:g,onSearch:v,onChange:y,onCompositionStart:x,onCompositionEnd:w,variant:k,onPressEnter:F,classNames:C,styles:D,hidden:S,...A}=e,{direction:I,getPrefixCls:j,className:$,style:N,classNames:P,styles:O,searchIcon:V}=_t("inputSearch"),H=Cc.useContext(ci),q=g??H,[L,,R]=du("inputSearch",k,e.bordered),W=R?L:void 0,[z]=du("inputSearch",k,e.bordered,"input"),Q={...e,enterButton:c,variant:W},K=lt(N),Z=lt(l),[T,U]=jt([P,C],[O,K,D,Z],{props:Q},{button:{_default:"root"}}),X=Cc.useRef(!1),Y=j("input-search",r),re=j("input",n),[J,se]=Jle(Y),{compactSize:me}=tl(Y,I),le=On(Je=>o??me??Je),he=Cc.useRef(null),ae=Je=>{Je?.target&&Je.type==="click"&&v&&v(Je.target.value,Je,{source:"clear"}),y?.(Je)},ce=Je=>{document.activeElement===he.current?.input&&Je.preventDefault()},ye=Je=>{v&&v(he.current?.input?.value,Je,{source:"input"})},Te=Je=>{X.current||h||(F?.(Je),ye(Je))},De=typeof c=="boolean"?zv(d,V,Cc.createElement(kF,null)):null,ke=`${Y}-btn`,Ce=te(ke,{[`${ke}-${W}`]:W}),Le,$e=c||{},Be=$e.type&&$e.type.__ANT_BUTTON===!0;if(Be||$e.type==="button"){let Je=$e.props;Le=mn($e,{disabled:q||Je.disabled||!Be&&h,onMouseDown:gt=>{Je.onMouseDown?.(gt),ce(gt)},onClick:gt=>{$e?.props?.onClick?.(gt),ye(gt)},key:"enterButton",...Be?{className:te(Ce,Je.className),loading:h||Je.loading,size:le}:{}})}else Le=Cc.createElement(Mv,{classNames:T.button,styles:U.button,className:Ce,color:c?"primary":"default",size:le,disabled:g,key:"enterButton",onMouseDown:ce,onClick:ye,loading:h,icon:De,variant:W==="borderless"||W==="filled"||W==="underlined"?"text":c?"solid":void 0},c);f&&(Le=[Le,mn(f,{key:"addonAfter"})]);let Me=te(Y,se,{[`${Y}-rtl`]:I==="rtl",[`${Y}-${le}`]:!!le,[`${Y}-with-button`]:!!c},a,$,J,T.root),Ve=Je=>{X.current=!0,x?.(Je)},qe=Je=>{X.current=!1,w?.(Je)},Ie=no(A,{data:!0}),Pe=xr({...A,classNames:xr(T,["button","root"]),styles:xr(U,["button","root"]),prefixCls:re,type:"search",size:le,variant:z,onPressEnter:Te,onCompositionStart:Ve,onCompositionEnd:qe,onChange:ae,disabled:g},Object.keys(Ie));return Cc.createElement(Dv,{className:Me,style:U.root,...Ie,hidden:S},Cc.createElement(dh,{ref:ln(he,t),...Pe}),Le)}),tue=eue,fh=dh;fh.Group=Ole;fh.Search=tue;fh.TextArea=qv;fh.Password=Yle;fh.OTP=Gle;var SF=fh;var gz=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),vz=gz.createContext("default"),FF=vz.Provider;function iue(e){return e?"branch":"task"}function Ae({name:e,size:t=14,className:r,strokeWidth:n=1.8,slot:a}){let o=gz.useContext(vz)==="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?Pm(e.algorithm):hv,r={...vc,...e?.token};return M5(r,{override:e?.token},t,O5)},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??Um(e),n=r.fontSizeSM,a=r.controlHeight-4;return{...r,...lue(t??e),...R5(n),controlHeight:a,...P5({...r,controlHeight:a})}},cue=uue,Po=(e,t)=>new nn(e).setA(t).toRgbString(),gf=(e,t)=>new nn(e).lighten(t).toHexString(),bz=e=>{let t=qm(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:Po(a,.85),colorTextSecondary:Po(a,.65),colorTextTertiary:Po(a,.45),colorTextQuaternary:Po(a,.25),colorFill:Po(a,.18),colorFillSecondary:Po(a,.12),colorFillTertiary:Po(a,.08),colorFillQuaternary:Po(a,.04),colorBgSolid:Po(a,.95),colorBgSolidHover:Po(a,1),colorBgSolidActive:Po(a,.9),colorBgElevated:gf(n,12),colorBgContainer:gf(n,8),colorBgLayout:gf(n,0),colorBgSpotlight:gf(n,26),colorBgBlur:Po(a,.04),colorBorder:gf(n,26),colorBorderDisabled:gf(n,26),colorBorderSecondary:gf(n,19)}},fue=(e,t)=>{let r=Object.keys(mv).map(l=>{let c=qm(e[l],{theme:"dark"});return Array.from({length:10},()=>1).reduce((d,f,h)=>(d[`${l}-${h+1}`]=c[h],d[`${l}${h+1}`]=c[h],d),{})}).reduce((l,c)=>(l={...l,...c},l),{}),n=t??Um(e),a=N5(e,{generateColorPalettes:bz,generateNeutralColorPalettes:due}),o=li.reduce((l,c)=>{let d=e[c];if(d){let f=bz(d);l[`${c}Hover`]=f[7],l[`${c}Active`]=f[5]}return l},{});return{...n,...r,...a,...o,colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover}},pue=fue;function mue(){let[e,t,r,n]=ui();return{theme:e,token:t,hashId:r,cssVar:n}}var hue={defaultSeed:Yd.token,useToken:mue,defaultAlgorithm:Um,darkAlgorithm:pue,compactAlgorithm:cue,getDesignToken:sue,defaultConfig:Yd,_internalContext:gv},kx=hue;var MF=Jt((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",f="day",h="week",g="month",v="quarter",y="year",x="date",w="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"],R=q%100;return"["+q+(L[(R-20)%10]||L[R]||L[0])+"]"}},D=function(q,L,R){var W=String(q);return!W||W.length>=L?q:""+Array(L+1-W.length).join(R)+q},S={s:D,z:function(q){var L=-q.utcOffset(),R=Math.abs(L),W=Math.floor(R/60),z=R%60;return(L<=0?"+":"-")+D(W,2,"0")+":"+D(z,2,"0")},m:function q(L,R){if(L.date()<R.date())return-q(R,L);var W=12*(R.year()-L.year())+(R.month()-L.month()),z=L.clone().add(W,g),Q=R-z<0,K=L.clone().add(W+(Q?-1:1),g);return+(-(W+(R-z)/(Q?z-K:K-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:f,D:x,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 V||!(!q||!q[j])},N=function q(L,R,W){var z;if(!L)return A;if(typeof L=="string"){var Q=L.toLowerCase();I[Q]&&(z=Q),R&&(I[Q]=R,z=Q);var K=L.split("-");if(!z&&K.length>1)return q(K[0])}else{var Z=L.name;I[Z]=L,z=Z}return!W&&z&&(A=z),z||!W&&A},P=function(q,L){if($(q))return q.clone();var R=typeof L=="object"?L:{};return R.date=q,R.args=arguments,new V(R)},O=S;O.l=N,O.i=$,O.w=function(q,L){return P(q,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var V=(function(){function q(R){this.$L=N(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[j]=!0}var L=q.prototype;return L.parse=function(R){this.$d=(function(W){var z=W.date,Q=W.utc;if(z===null)return new Date(NaN);if(O.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var K=z.match(k);if(K){var Z=K[2]-1||0,T=(K[7]||"0").substring(0,3);return Q?new Date(Date.UTC(K[1],Z,K[3]||1,K[4]||0,K[5]||0,K[6]||0,T)):new Date(K[1],Z,K[3]||1,K[4]||0,K[5]||0,K[6]||0,T)}}return new Date(z)})(R),this.init()},L.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},L.$utils=function(){return O},L.isValid=function(){return this.$d.toString()!==w},L.isSame=function(R,W){var z=P(R);return this.startOf(W)<=z&&z<=this.endOf(W)},L.isAfter=function(R,W){return P(R)<this.startOf(W)},L.isBefore=function(R,W){return this.endOf(W)<P(R)},L.$g=function(R,W,z){return O.u(R)?this[W]:this.set(z,R)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(R,W){var z=this,Q=!!O.u(W)||W,K=O.p(R),Z=function(me,le){var he=O.w(z.$u?Date.UTC(z.$y,le,me):new Date(z.$y,le,me),z);return Q?he:he.endOf(f)},T=function(me,le){return O.w(z.toDate()[me].apply(z.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(le)),z)},U=this.$W,X=this.$M,Y=this.$D,re="set"+(this.$u?"UTC":"");switch(K){case y:return Q?Z(1,0):Z(31,11);case g:return Q?Z(1,X):Z(0,X+1);case h:var J=this.$locale().weekStart||0,se=(U<J?U+7:U)-J;return Z(Q?Y-se:Y+(6-se),X);case f:case x: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(R){return this.startOf(R,!1)},L.$set=function(R,W){var z,Q=O.p(R),K="set"+(this.$u?"UTC":""),Z=(z={},z[f]=K+"Date",z[x]=K+"Date",z[g]=K+"Month",z[y]=K+"FullYear",z[d]=K+"Hours",z[c]=K+"Minutes",z[l]=K+"Seconds",z[o]=K+"Milliseconds",z)[Q],T=Q===f?this.$D+(W-this.$W):W;if(Q===g||Q===y){var U=this.clone().set(x,1);U.$d[Z](T),U.init(),this.$d=U.set(x,Math.min(this.$D,U.daysInMonth())).$d}else Z&&this.$d[Z](T);return this.init(),this},L.set=function(R,W){return this.clone().$set(R,W)},L.get=function(R){return this[O.p(R)]()},L.add=function(R,W){var z,Q=this;R=Number(R);var K=O.p(W),Z=function(X){var Y=P(Q);return O.w(Y.date(Y.date()+Math.round(X*R)),Q)};if(K===g)return this.set(g,this.$M+R);if(K===y)return this.set(y,this.$y+R);if(K===f)return Z(1);if(K===h)return Z(7);var T=(z={},z[c]=n,z[d]=a,z[l]=r,z)[K]||1,U=this.$d.getTime()+R*T;return O.w(U,this)},L.subtract=function(R,W){return this.add(-1*R,W)},L.format=function(R){var W=this,z=this.$locale();if(!this.isValid())return z.invalidDate||w;var Q=R||"YYYY-MM-DDTHH:mm:ssZ",K=O.z(this),Z=this.$H,T=this.$m,U=this.$M,X=z.weekdays,Y=z.months,re=z.meridiem,J=function(le,he,ae,ce){return le&&(le[he]||le(W,Q))||ae[he].slice(0,ce)},se=function(le){return O.s(Z%12||12,le,"0")},me=re||function(le,he,ae){var ce=le<12?"AM":"PM";return ae?ce.toLowerCase():ce};return Q.replace(F,(function(le,he){return he||(function(ae){switch(ae){case"YY":return String(W.$y).slice(-2);case"YYYY":return O.s(W.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return J(z.monthsShort,U,Y,3);case"MMMM":return J(Y,U);case"D":return W.$D;case"DD":return O.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 O.s(Z,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return me(Z,T,!0);case"A":return me(Z,T,!1);case"m":return String(T);case"mm":return O.s(T,2,"0");case"s":return String(W.$s);case"ss":return O.s(W.$s,2,"0");case"SSS":return O.s(W.$ms,3,"0");case"Z":return K}return null})(le)||K.replace(":","")}))},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(R,W,z){var Q,K=this,Z=O.p(W),T=P(R),U=(T.utcOffset()-this.utcOffset())*n,X=this-T,Y=function(){return O.m(K,T)};switch(Z){case y:Q=Y()/12;break;case g:Q=Y();break;case v:Q=Y()/3;break;case h:Q=(X-U)/6048e5;break;case f:Q=(X-U)/864e5;break;case d:Q=X/a;break;case c:Q=X/n;break;case l:Q=X/r;break;default:Q=X}return z?Q:O.a(Q)},L.daysInMonth=function(){return this.endOf(g).$D},L.$locale=function(){return I[this.$L]},L.locale=function(R,W){if(!R)return this.$L;var z=this.clone(),Q=N(R,W,!0);return Q&&(z.$L=Q),z},L.clone=function(){return O.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=V.prototype;return P.prototype=H,[["$ms",o],["$s",l],["$m",c],["$H",d],["$W",f],["$M",g],["$y",y],["$D",x]].forEach((function(q){H[q[1]]=function(L){return this.$g(L,q[0],q[1])}})),P.extend=function(q,L){return q.$i||(q(L,V,P),q.$i=!0),P},P.locale=N,P.isDayjs=$,P.unix=function(q){return P(1e3*q)},P.en=I[A],P.Ls=I,P.p={},P}))}),gue=Jt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.call=c,e.default=void 0,e.note=o,e.noteOnce=f,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 f(g,v){c(o,g,v)}d.preMessage=n,d.resetWarned=l,d.noteOnce=f;var h=e.default=d}),mh=Jt((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=Jt(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}),xz=Jt(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=Jt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=xz(),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}),Ez=Jt(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}),kz=Jt(e=>{"use strict";var t=mh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(bue()),n=t(Ez()),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=Jt(e=>{"use strict";var t=mh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(kz()),n=e.default=r.default}),wue=Jt(e=>{"use strict";var t=mh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(vue()),n=t(yue()),a=t(kz()),o=t(Ez()),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=Jt((e,t)=>{t.exports=wue()}),Eue=Jt(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=Jt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=xz(),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}),Cz=Jt(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}),Sz=Jt(e=>{"use strict";var t=mh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(kue()),n=t(Cz()),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=Jt(e=>{"use strict";var t=mh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Sz()),n=e.default=r.default}),Sue=Jt(e=>{"use strict";var t=mh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Eue()),n=t(Cue()),a=t(Sz()),o=t(Cz()),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=Jt((e,t)=>{t.exports=Sue()}),Due=Jt((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n(MF()):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}))}),Fz={};Jl(Fz,{MOTION_DWELL_FAILED_MS:()=>gh,MOTION_DWELL_RESULT_SENTENCE_MS:()=>Dz,MOTION_DWELL_SENT_MS:()=>hh,MOTION_PROCESSING_STAGGER_MS:()=>Az,readMotionTokenMs:()=>Uv,useReducedMotion:()=>ca});var yz=B(_(),1),hh=720,gh=1500,Dz=1200,Az=150;function Uv(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 ca(){let e=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[t,r]=yz.useState(e);return yz.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 $z={};Jl($z,{PopupOwnerProvider:()=>Fx,PortalContainerProvider:()=>bh,REACT_UI_PORTALS_ID:()=>Vv,documentPortalContainer:()=>Gv,useParentPopupOwner:()=>vh,usePortalContainer:()=>Oa});var Sx=B(_(),1),Bz=B(Ee(),1),Vv="wand-react-ui-portals",Iz=(0,Sx.createContext)(null),Mz=(0,Sx.createContext)(null);function Fx({owner:e,children:t}){return(0,Bz.jsx)(Mz.Provider,{value:e,children:t})}function vh(){return(0,Sx.useContext)(Mz)}function bh({container:e,children:t}){return(0,Bz.jsx)(Iz.Provider,{value:e,children:t})}function Gv(){if(!(typeof document>"u"))return document.getElementById(Vv)??void 0}function Oa(){return(0,Sx.useContext)(Iz)??Gv()}var Tz={};Jl(Tz,{WandUiBoundary:()=>sr,WandUiMeasurementProvider:()=>Xv,WandUiProvider:()=>za,getWandTerminalTheme:()=>Sc,getWandTheme:()=>Kv,installWandThemeTokens:()=>IF,wandTheme:()=>yh});var ph=B(_(),1),vf=B(_()),wz=B(_()),D7e=B(gue()),A7e=B(_());function Aue(){}var $ue=Aue,Bue=$ue,Iue=B(_()),Mue=(0,Iue.createContext)(void 0),jz=Mue,Tue=B(xue()),DF=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"}},AF=jue,_ue=(e,t)=>{let r=DF.useContext(jz),n=DF.useMemo(()=>{let o=t||AF?.[e]||Tue.default?.[e],l=r?.[e]??{};return{...typeof o=="function"?o():o,...l||{}}},[e,t,r]),a=DF.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?AF.locale:o},[r]);return[n,a]},Nue=_ue,Pue="internalMark",Rue=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e,a=wz.useMemo(()=>({...t,exist:!0}),[t]);return wz.createElement(jz.Provider,{value:a},r)},Oue=Rue,zue=B(_()),Lue=zue.default.createContext({}),_z=Lue,Hue=B(_()),que="ant";function Wue(){let{getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n,theme:a}=Hue.default.useContext(Ym.ConfigContext);return{theme:a,getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n}}var Uue=Wue,Vue=e=>{let{actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:c,thoughtChain:d,welcome:f,fileCard:h,think:g,theme:v,locale:y,children:x,mermaid:w,codeHighlighter:k,iconPrefixCls:F,...C}=e,D=vf.default.useMemo(()=>({actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:c,thoughtChain:d,fileCard:h,think:g,mermaid:w,codeHighlighter:k,welcome:f}),[t,r,n,a,o,l,c,d,f,w,g,h,k]),S=x;y&&(S=vf.default.createElement(Oue,{locale:y,_ANT_MARK__:Pue},S));let{layer:A}=vf.default.useContext(xc),I=vf.default.useMemo(()=>({prefixCls:F,csp:C.csp,layer:A?"antdx":void 0}),[F,C.csp,A]);return(F||C.csp)&&(S=vf.default.createElement(Km.Provider,{value:I},S)),vf.default.createElement(_z.Provider,{value:D},vf.default.createElement(Ym,Dn({},C,{theme:v,locale:y}),S))},Gue=Vue;function Kue(){let e=Gue,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 Nz=Kue(),Pz=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"}},Rz=Xue,Que=B(MF(),1),$7e=B(Due(),1),TF="wand-theme",Cx=[{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 Oz(e){return Cx.find(t=>t.id===e)?.id??"warm"}function jF(e){return Cx.find(t=>t.id===e)??Cx[0]}function Yue(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 zz(){try{return Oz(window.localStorage.getItem(TF))}catch{return"warm"}}var $F=zz(),BF=new Set;function Lz(e){if(e!==$F){$F=e;for(let t of BF)t()}}var fo={subscribe(e){return BF.add(e),()=>{BF.delete(e)}},getSnapshot:()=>$F,getServerSnapshot:()=>"warm"};function ece(e){let t=Oz(e),r=!0;try{window.localStorage.setItem(TF,t)}catch{r=!1}return Lz(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===TF||e.key===null)&&Lz(zz())});var Wv=B(Ee(),1);Que.default.locale("zh-cn");var _F=ph.createContext(!1);function Kv(e){return Yue(jF(e),kx.darkAlgorithm)}var yh=Kv("warm");function Sc(e=fo.getSnapshot()){let t=jF(e);return{background:t.terminal,foreground:t.terminalText,cursor:t.terminalCursor,selectionBackground:t.dark?"#364965":"#49413d"}}function IF(e=document){let t=fo.getSnapshot(),r=jF(t),n=kx.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"&&(IF(),fo.subscribe(()=>IF()));function za({children:e}){let t=ph.useSyncExternalStore(fo.subscribe,fo.getSnapshot,fo.getServerSnapshot),r=ph.useMemo(()=>Kv(t),[t]),n=Oa(),a=ca(),o=ph.useMemo(()=>{let l=typeof document>"u"?null:getComputedStyle(document.documentElement),c=(d,f)=>l?.getPropertyValue(d).trim()||f;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,Wv.jsx)(_F.Provider,{value:!0,children:(0,Wv.jsx)(Nz,{locale:{...Pz.default,...Rz},theme:o,getPopupContainer:()=>n??document.body,children:e})})}function sr({children:e}){return ph.useContext(_F)?e:(0,Wv.jsx)(za,{children:e})}function Xv({children:e}){let t=ph.useSyncExternalStore(fo.subscribe,fo.getSnapshot,fo.getServerSnapshot),r=Kv(t);return(0,Wv.jsx)(_F.Provider,{value:!0,children:(0,Wv.jsx)(Nz,{locale:{...Pz.default,...Rz},theme:{...r,cssVar:{key:"wand-ui-measurement"},token:{...r.token,motion:!1}},children:e})})}var tce=B(_(),1),Dx=B(Ee(),1);function bf({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:f,ref:h,...g}){let v=tce.useCallback(x=>{let w=x?.input??null;if(typeof h=="function")return h(w);h&&(h.current=w)},[h]),y=a?.["aria-invalid"]??g["aria-invalid"];return(0,Dx.jsx)(sr,{children:(0,Dx.jsx)(SF,{...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,Dx.jsx)("span",{"aria-label":d,children:(0,Dx.jsx)(Ae,{name:"close",size:14})})}:!1,onClear:f,size:r==="sm"?"small":r==="lg"?"large":"middle",className:ct("wand-ui-input",e)})})}var Uz={};Jl(Uz,{hasOpenOwnedPopupSurface:()=>$x,hasOpenPopupSurface:()=>yf,isWandPopupOwnedBy:()=>wf,popupOffset:()=>Dc,popupPlacement:()=>Fc,registerPopupDismiss:()=>Qv,registerPopupOwner:()=>wh,usePopupDismiss:()=>zn});var Hz=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 Vz(){for(let e=ms.length-1;e>=0;e-=1)if(ms[e]?.priority==="blocking")return ms[e];return ms.at(-1)}function yf(){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 qz(e){e.key!=="Escape"||e.isComposing||!ms.length||(e.preventDefault(),e.stopImmediatePropagation(),Vz()?.dismiss())}function Wz(){Vz()?.dismiss()}function Qv(e,t="normal"){ms.length||(document.addEventListener("keydown",qz,!0),window.addEventListener("popstate",Wz));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",qz,!0),window.removeEventListener("popstate",Wz))}}var Ax=new Map;function wh(e,t){return!t||e===t?()=>{}:(Ax.set(e,t),()=>{Ax.get(e)===t&&Ax.delete(e)})}function wf(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=Ax.get(r)??null}return!1}function $x(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=>wf(t,r)))}function zn(e,t,r="normal"){let n=(0,Hz.useRef)(t);n.current=t,(0,Hz.useEffect)(()=>e?Qv(()=>n.current(),r):void 0,[e,r])}var rce=B(_()),nce=rce.default.createContext(void 0),Bx=nce,ace=B(_()),pu=100,ice=10,Gz=pu*ice,H7e=Gz+pu,Kz={Modal:pu,Drawer:pu,Popover:pu,Popconfirm:pu,Tooltip:pu,Tour:pu,FloatButton:pu},oce={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},sce=e=>e in Kz,NF=(e,t)=>{let[,r]=ui(),n=ace.default.useContext(Bx),a=sce(e),o;if(t!==void 0)o=[t,t];else{let l=n??0;a?l+=(n?0:r.zIndexPopupBase)+Kz[e]:l+=oce[e],o=[n===void 0?t:l,l]}return o};var Ro=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)},Zv=uce,xh=B(_()),Xz=B(_()),Eh={shiftX:64,adjustY:1},kh={adjustX:1,shiftY:!0},Oo=[0,0],cce={left:{points:["cr","cl"],overflow:kh,offset:[-4,0],targetOffset:Oo},right:{points:["cl","cr"],overflow:kh,offset:[4,0],targetOffset:Oo},top:{points:["bc","tc"],overflow:Eh,offset:[0,-4],targetOffset:Oo},bottom:{points:["tc","bc"],overflow:Eh,offset:[0,4],targetOffset:Oo},topLeft:{points:["bl","tl"],overflow:Eh,offset:[0,-4],targetOffset:Oo},leftTop:{points:["tr","tl"],overflow:kh,offset:[-4,0],targetOffset:Oo},topRight:{points:["br","tr"],overflow:Eh,offset:[0,-4],targetOffset:Oo},rightTop:{points:["tl","tr"],overflow:kh,offset:[4,0],targetOffset:Oo},bottomRight:{points:["tr","br"],overflow:Eh,offset:[0,4],targetOffset:Oo},rightBottom:{points:["bl","br"],overflow:kh,offset:[4,0],targetOffset:Oo},bottomLeft:{points:["tl","bl"],overflow:Eh,offset:[0,4],targetOffset:Oo},leftBottom:{points:["br","bl"],overflow:kh,offset:[-4,0],targetOffset:Oo}};function PF(){return PF=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},PF.apply(this,arguments)}var dce=xh.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:f,placement:h="right",align:g={},destroyOnHidden:v=!1,defaultVisible:y,getTooltipContainer:x,arrowContent:w,overlay:k,id:F,showArrow:C=!0,classNames:D,styles:S,...A}=e,I=Xs(F),j=(0,Xz.useRef)(null);(0,Xz.useImperativeHandle)(t,()=>j.current);let $={...A};"visible"in e&&($.popupVisible=e.visible);let N=xh.useMemo(()=>{if(!C)return!1;let O=C===!0?{}:C;return{...O,className:te(O.className,D?.arrow),style:{...O.style,...S?.arrow},content:O.content??w}},[C,D?.arrow,S?.arrow,w]),P=({open:O})=>{let V=xh.Children.only(l),H={"aria-describedby":[V.props["aria-describedby"],k&&O?I:void 0].filter(Boolean).join(" ")||void 0};return xh.cloneElement(V,H)};return xh.createElement(Gm,PF({popupClassName:D?.root,prefixCls:o,popup:xh.createElement(Zv,{key:"content",prefixCls:o,id:I,classNames:D,styles:S},k),action:r,builtinPlacements:cce,popupPlacement:h,ref:j,popupAlign:g,getPopupContainer:x,onOpenChange:c,afterOpenChange:d,popupMotion:f,defaultPopupVisible:y,autoDestroy:v,mouseLeaveDelay:a,popupStyle:S?.root,mouseEnterDelay:n,arrow:N,uniqueContainerClassName:D?.uniqueContainer,uniqueContainerStyle:S?.uniqueContainer},$),P)}),fce=dce,pce=fce;function Ix(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)),f=a-r*(1/Math.sqrt(2)),h=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),g=2*a-f,v=h,y=2*a-c,x=d,w=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 ${f} ${h} A ${r} ${r} 0 0 1 ${g} ${v} L ${y} ${x} A ${n} ${n} 0 0 0 ${w} ${k} Z')`;return{arrowShadowWidth:F,arrowPath:S,arrowPolygon:D}}var Zz=(e,t,r)=>{let{sizePopupArrow:n,arrowPolygon:a,arrowPath:o,arrowShadowWidth:l,borderRadiusXS:c,calc:d}=e,f={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&&(f.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":f}},Jz=8;function Jv(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?Jz:n}}var mce=(e,t,r)=>{let{componentCls:n,boxShadowPopoverArrow:a,arrowOffsetVertical:o,arrowOffsetHorizontal:l,antCls:c}=e,[d]=pn(c,"tooltip"),{arrowDistance:f=0,arrowShadow:h=!0}=r||{};return{[n]:{[`${n}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...Zz(e,t,h?a:!1),"&:before":{background:t}}],[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:f,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:f,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:f},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:f},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}}}},Mx=mce;function hce(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};let a=Ct(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 Qz={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 eL(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:a,borderRadius:o,visibleFirst:l}=e,c=t/2,d={},f=Jv({contentRadius:o,limitVerticalRadius:!0});return Object.keys(Qz).forEach(h=>{let g={...n&&gce[h]||Qz[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]=-f.arrowOffsetHorizontal-c;break;case"topRight":case"bottomRight":g.offset[0]=f.arrowOffsetHorizontal+c;break;case"leftTop":case"rightTop":g.offset[1]=-f.arrowOffsetHorizontal*2+c;break;case"leftBottom":case"rightBottom":g.offset[1]=f.arrowOffsetHorizontal*2-c;break}g.overflow=hce(h,f,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])},Tx=Ece,Yv=B(_()),Yz="50%",kce=e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:a,tooltipBg:o,tooltipBorderRadius:l,zIndexPopup:c,controlHeight:d,dropShadowPopover:f,paddingSM:h,paddingXS:g,arrowOffsetHorizontal:v,sizePopupArrow:y,antCls:x}=e,[w,k]=pn(x,"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={[w("valid-offset-x")]:k("arrow-offset-x","var(--arrow-x)"),transformOrigin:[k("valid-offset-x",Yz),`var(--arrow-y, ${Yz})`].join(" ")};return[{[r]:{...pr(e),position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:f,...D,"&-hidden":{display:"none"},[w("arrow-background-color")]:o,[`${r}-container`]:[C,E4(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,Jz)}},[`${r}-content`]:{position:"relative"},...Ec(e,(S,{darkColor:A})=>({[`&${r}-${S}`]:{[`${r}-container`]:{backgroundColor:A},[`${r}-arrow`]:{[w("arrow-background-color")]:A}}})),"&-rtl":{direction:"rtl"}}},Mx(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:f,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Cce=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Jv({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...Ix(Nt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),tL=(e,t,r=!0)=>kt("Tooltip",n=>{let{borderRadius:a,colorTextLightSolid:o,colorBgSpotlight:l,maxWidth:c}=n,d=Nt(n,{tooltipMaxWidth:c,tooltipColor:o,tooltipBorderRadius:a,tooltipBg:l});return[kce(d),Fv(n,"zoom-big-fast")]},Cce,{resetStyle:!1,injectStyle:r})(e,t),Sce=li.map(e=>`${e}-inverse`),Fce=["success","processing","error","default","warning"];function xf(e,t=!0){return t?[].concat(Xr(Sce),Xr(li)).includes(e):li.includes(e)}function RF(e){return Fce.includes(e)}var rL=(e,t,r)=>{let n=xf(r),[a]=pn(e,"tooltip"),o=te({[`${t}-${r}`]:r&&n}),l={},c={},d=F4(r).toRgb(),f=(.299*d.r+.587*d.g+.114*d.b)/255<.5?"#FFF":"#000";return r&&!n&&(l.background=r,l[a("overlay-color")]=f,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:f}=Yv.useContext(wt),h=f("tooltip",t),g=f(),v=Yn(h),[y,x]=tL(h,v),w=rL(g,h,o),k=w.arrowStyle,F=Yv.useMemo(()=>({container:{...l,...w.overlayStyle}}),[l,w.overlayStyle]),C={...e,placement:n},[D,S]=jt([c],[F,d],{props:C}),A=te(v,y,x,h,`${h}-pure`,`${h}-placement-${n}`,r,w.className);return Yv.createElement("div",{className:A,style:k},Yv.createElement("div",{className:`${h}-arrow`}),Yv.createElement(Zv,{...e,className:y,prefixCls:h,classNames:D,styles:S},a))},Ace=Dce,$ce=Ro.forwardRef((e,t)=>{let{prefixCls:r,openClassName:n,getTooltipContainer:a,color:o,children:l,afterOpenChange:c,arrow:d,destroyTooltipOnHide:f,destroyOnHidden:h,title:g,overlay:v,trigger:y,builtinPlacements:x,autoAdjustOverflow:w=!0,motion:k,getPopupContainer:F,placement:C="top",mouseEnterDelay:D,mouseLeaveDelay:S,rootClassName:A,styles:I,classNames:j,onOpenChange:$,overlayInnerStyle:N,overlayStyle:P,overlayClassName:O,...V}=e,[,H]=ui(),q=e["data-popover-inject"],{getPopupContainer:L,getPrefixCls:R,direction:W,...z}=_t("tooltip"),{className:Q,style:K,classNames:Z,styles:T,arrow:U,trigger:X,mouseEnterDelay:Y,mouseLeaveDelay:re}=q?{}:z,J=D??Y??.1,se=S??re??.1,me=Tx(d,U),le=me.show,he=y||X||"hover",ae=F||a||L,ce=h??!!f,ye=Ro.useContext(wce),Te=$5("Tooltip"),De=Ro.useRef(null),ke=()=>{De.current?.forceAlign()};Ro.useImperativeHandle(t,()=>({forceAlign:ke,nativeElement:De.current?.nativeElement,popupElement:De.current?.popupElement}));let[Ce,Le]=wr(e.defaultOpen??!1,e.open),$e=!g&&!v&&g!==0,Be=Ot=>{Le($e?!1:Ot),!$e&&$&&$(Ot)},Me=Ro.useMemo(()=>x||eL({arrowPointAtCenter:me?.pointAtCenter??!1,autoAdjustOverflow:w,arrowWidth:le?H.sizePopupArrow:0,borderRadius:H.borderRadius,offset:H.marginXXS,visibleFirst:!0}),[me,x,H,le,w]),Ve=Ro.useMemo(()=>g===0?g:v||g||"",[v,g]),qe=Ro.createElement(ch,{space:!0,form:!0},Er(Ve)?Ve():Ve),Ie={...e,trigger:he,builtinPlacements:Me,getPopupContainer:ae,destroyOnHidden:ce,mouseEnterDelay:J,mouseLeaveDelay:se},Pe=lt(K),Je=lt(P),[gt,et]=jt([Z,j],[T,Pe,I,Je],{props:Ie}),Ue=R("tooltip",r),Fe=R(),_e=Ce;(!("open"in e)&&$e||ye)&&(_e=!1);let dt=Ro.isValidElement(l)&&!wv(l)?l:Ro.createElement("span",null,l),at=dt.props,Ge=!at.className||typeof at.className=="string"?te(at.className,n||`${Ue}-open`):at.className,je=Yn(Ue),[rt,Bt]=tL(Ue,je,!q),It=rL(Fe,Ue,o),Gr=It.arrowStyle,Ht=te(je,rt,Bt),$r=te(O,{[`${Ue}-rtl`]:W==="rtl"},It.className,A,Ht,Q,gt.root),[Kt,Ft]=NF("Tooltip",V.zIndex),ar={...et.container,...N,...It.overlayStyle},Cr=Ro.createElement(pce,{unique:!0,...V,zIndex:Kt,showArrow:le,placement:C,mouseEnterDelay:J,mouseLeaveDelay:se,prefixCls:Ue,classNames:{root:$r,container:gt.container,arrow:gt.arrow,uniqueContainer:te(Ht,gt.container)},styles:{root:{...Gr,...et.root},container:ar,uniqueContainer:ar,arrow:et.arrow},ref:De,overlay:qe,visible:_e,onVisibleChange:Be,afterVisibleChange:c,arrowContent:Ro.createElement("span",{className:`${Ue}-arrow-content`}),motion:{motionName:nf(Fe,"zoom-big-fast",typeof k?.motionName=="string"?k?.motionName:void 0),motionDeadline:1e3},trigger:he,builtinPlacements:Me,getTooltipContainer:ae,destroyOnHidden:ce},_e&&!V.disabled?mn(dt,{className:Ge}):dt);return Ro.createElement(Bx.Provider,{value:Ft},Cr)}),OF=$ce;OF._InternalPanelDoNotUseOrYouWillBeFired=Ace;OF.UniqueProvider=W5;var zo=OF;var zF=B(_()),jx=e=>or(e)?Er(e)?e():e:null,il=B(_()),nL="50%",Bce=e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:a,innerPadding:o,dropShadowPopover:l,colorTextHeading:c,borderRadiusLG:d,zIndexPopup:f,titleMarginBottom:h,colorBgElevated:g,popoverBg:v,titleBorderBottom:y,innerContentPadding:x,titlePadding:w,antCls:k}=e,[F,C]=pn(k,"tooltip");return[{[t]:{...pr(e),position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:f,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",nL),`var(--arrow-y, ${nL})`].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:w},[`${t}-content`]:{color:r,padding:x}}},Mx(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:f,colorSplit:h,paddingSM:g}=e,v=r-n,y=v/2,x=v/2-t,w=a;return{titleMinWidth:177,zIndexPopup:l+30,...Ix(e),...Jv({contentRadius:c,limitVerticalRadius:!0}),innerPadding:o?0:12,titleMarginBottom:o?0:d,titlePadding:o?`${y}px ${w}px ${x}px`:0,titleBorderBottom:o?`${t}px ${f} ${h}`:"none",innerContentPadding:o?`${g}px ${w}px`:0}},cL=kt("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=Nt(e,{popoverBg:t,popoverColor:r});return[Bce(n),Ice(n),Fv(n,"zoom-big")]},Mce,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),dL=e=>{let{title:t,content:r,prefixCls:n,classNames:a,styles:o}=e;return!or(t)&&!or(r)?null:il.createElement(il.Fragment,null,or(t)&&il.createElement("div",{className:te(`${n}-title`,a?.title),style:o?.title},t),or(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:f,styles:h}=e,g=jx(l),v=jx(c),y={...e,placement:o},[x,w]=jt([f],[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(Zv,{...e,className:t,prefixCls:r,classNames:x,styles:w},d||il.createElement(dL,{prefixCls:r,title:g,content:v,classNames:x,styles:w})))},jce=e=>{let{prefixCls:t,className:r,...n}=e,{getPrefixCls:a}=il.useContext(wt),o=a("popover",t),[l,c]=cL(o);return il.createElement(Tce,{...n,prefixCls:o,hashId:l,className:te(r,c)})},_ce=jce,Nce=zF.forwardRef((e,t)=>{let{prefixCls:r,title:n,content:a,overlayClassName:o,placement:l="top",trigger:c,children:d,mouseEnterDelay:f,mouseLeaveDelay:h,onOpenChange:g,overlayStyle:v={},styles:y,classNames:x,motion:w,arrow:k,...F}=e,{getPrefixCls:C,className:D,style:S,classNames:A,styles:I,arrow:j,trigger:$,mouseEnterDelay:N,mouseLeaveDelay:P}=_t("popover"),O=f??N??.1,V=h??P??.1,H=C("popover",r),[q,L]=cL(H),R=C(),W=Tx(k,j),z=c||$||"hover",Q={...e,placement:l,trigger:z,mouseEnterDelay:O,mouseLeaveDelay:V,overlayStyle:v,styles:y,classNames:x},K=lt(S),Z=lt(v),[T,U]=jt([A,x],[I,K,y,Z],{props:Q}),X=te(o,q,L,D,T.root),[Y,re]=wr(e.defaultOpen??!1,e.open),J=le=>{re(le),g?.(le)},se=jx(n),me=jx(a);return zF.createElement(zo,{unique:!1,arrow:W,placement:l,trigger:z,mouseEnterDelay:O,mouseLeaveDelay:V,...F,prefixCls:H,classNames:{root:X,container:T.container,arrow:T.arrow},styles:{root:U.root,container:U.container,arrow:U.arrow},ref:t,open:Y,onOpenChange:J,overlay:or(se)||or(me)?zF.createElement(dL,{prefixCls:H,title:se,content:me,classNames:T,styles:U}):null,motion:{motionName:nf(R,"zoom-big",typeof w?.motionName=="string"?w?.motionName:void 0)},"data-popover-inject":!0},d)}),fL=Nce;fL._InternalPanelDoNotUseOrYouWillBeFired=_ce;var Sh=fL,aL=B(_(),1),LF=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:f,contentRole:h,popupOwner:g=f??n,onOpenChange:v}){let y=Oa(),x=aL.useRef(null),[w,k]=aL.useState(!1),F=d??w,C=D=>{k(D),v?.(D)};return zn(F,()=>{C(!1),x.current?.nativeElement?.focus({preventScroll:!0})}),(0,LF.jsx)(sr,{children:(0,LF.jsx)(Sh,{ref:x,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,LF.jsx)("div",{id:f,role:h,"aria-label":n,"data-wand-popup-owner":g,children:r}),children:e})})}var Ac=B(_()),ji=B(_()),$c=B(_()),iL=(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}},Ch=e=>e!==void 0?`${e}px`:void 0;function Pce(e){let{prefixCls:t,containerRef:r,value:n,getValueIndex:a,motionName:o,onMotionStart:l,onMotionEnd:c,direction:d,vertical:f=!1}=e,h=$c.useRef(null),[g,v]=$c.useState(n),y=j=>{let $=a(j),N=r.current?.querySelectorAll(`.${t}-item`)[$];return N?.offsetParent&&N},[x,w]=$c.useState(null),[k,F]=$c.useState(null);er(()=>{if(g!==n){let j=y(g),$=y(n),N=iL(j,f),P=iL($,f);v(n),w(N),F(P),j&&$?l():c()}},[n]);let C=$c.useMemo(()=>Ch(f?x?.top??0:d==="rtl"?-x?.right:x?.left),[f,d,x]),D=$c.useMemo(()=>Ch(f?k?.top??0:d==="rtl"?-k?.right:k?.left),[f,d,k]),S=()=>f?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},A=()=>f?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},I=()=>{w(null),F(null),c()};return!x||!k?null:$c.createElement(Qn,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:S,onAppearActive:A,onVisibleChanged:I},({className:j,style:$},N)=>{let P={...$,"--thumb-start-left":C,"--thumb-start-width":Ch(x?.width),"--thumb-active-left":D,"--thumb-active-width":Ch(k?.width),"--thumb-start-top":C,"--thumb-start-height":Ch(x?.height),"--thumb-active-top":D,"--thumb-active-height":Ch(k?.height)},O={ref:ln(h,N),style:P,className:te(`${t}-thumb`,j)};return $c.createElement("div",O)})}function _x(){return _x=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},_x.apply(this,arguments)}function Rce(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function Oce(e){return e.map(t=>{if(typeof t=="object"&&t!==null){let r=Rce(t);return{...t,value:t.value,title:r}}return{label:t?.toString(),title:t?.toString(),value:t}})}var zce=({prefixCls:e,className:t,style:r,styles:n,classNames:a,data:o,disabled:l,checked:c,label:d,title:f,value:h,name:g,onChange:v,onFocus:y,onBlur:x,onKeyDown:w,onKeyUp:k,onMouseDown:F,itemRender:C=D=>D})=>{let D=A=>{l||v(A,h)},S=ji.createElement("label",{className:te(t,{[`${e}-item-disabled`]:l}),style:r,onMouseDown:F},ji.createElement("input",{name:g,className:`${e}-item-input`,type:"radio",disabled:l,checked:c,onChange:D,onFocus:y,onBlur:x,onKeyDown:w,onKeyUp:k}),ji.createElement("div",{className:te(`${e}-item-label`,a?.label),title:f,style:n?.label},d));return C(S,{item:o})},Lce=ji.forwardRef((e,t)=>{let{prefixCls:r="rc-segmented",direction:n,vertical:a,options:o=[],disabled:l,defaultValue:c,value:d,name:f,onChange:h,className:g="",style:v,styles:y,classNames:x,motionName:w="thumb-motion",itemRender:k,...F}=e,C=ji.useRef(null),D=ji.useMemo(()=>ln(C,t),[C,t]),S=ji.useMemo(()=>Oce(o),[o]),[A,I]=wr(c??S[0]?.value,d),[j,$]=ji.useState(!1),N=(T,U)=>{I(U),h?.(U)},P=xr(F,["children"]),[O,V]=ji.useState(!1),[H,q]=ji.useState(!1),L=()=>{q(!0)},R=()=>{q(!1)},W=()=>{V(!1)},z=T=>{T.key==="Tab"&&V(!0)},Q=T=>{let U=S.filter(se=>se.value===A||!se.disabled),X=U.findIndex(se=>se.value===A),Y=U.length,re=(X+T+Y)%Y,J=U[re];J&&J.value!==A&&(I(J.value),h?.(J.value))},K=T=>{switch(T.key){case"ArrowLeft":case"ArrowUp":Q(-1);break;case"ArrowRight":case"ArrowDown":Q(1);break}},Z=T=>{let{value:U,disabled:X}=T;return ji.createElement(zce,_x({},T,{name:f,data:T,itemRender:k,key:U,prefixCls:r,className:te(T.className,`${r}-item`,x?.item,{[`${r}-item-selected`]:U===A&&!j,[`${r}-item-selected-text`]:U===A,[`${r}-item-focused`]:H&&O&&U===A}),style:y?.item,classNames:x,styles:y,checked:U===A,onChange:N,onFocus:L,onBlur:R,onKeyDown:K,onKeyUp:z,onMouseDown:W,disabled:!!l||!!X}))};return ji.createElement("div",_x({role:"radiogroup","aria-label":"segmented control",tabIndex:l?void 0:0,"aria-orientation":a?"vertical":"horizontal",style:v},P,{className:te(r,{[`${r}-rtl`]:n==="rtl",[`${r}-disabled`]:l,[`${r}-vertical`]:a},g),ref:D}),ji.createElement("div",{className:`${r}-group`},ji.createElement(Pce,{vertical:a,prefixCls:r,value:A,containerRef:C,motionName:`${r}-${w}`,direction:n,getValueIndex:T=>S.findIndex(U=>U.value===T),onMotionStart:()=>{$(!0)},onMotionEnd:()=>{$(!1)}}),S.map(Z)))}),Hce=Lce,qce=Hce;function oL(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}var sL=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),Wce={overflow:"hidden",...Zd},Uce=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]:{...pr(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${a}`,...Bi(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":{...sL(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`]:{...sL(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}},...oL(`&-disabled ${t}-item`,e),...oL(`${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}}}}},Vce=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}},Gce=kt("Segmented",e=>{let{lineWidth:t,calc:r}=e,n=Nt(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()});return Uce(n)},Vce);function Kce(e){return Ct(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:f,vertical:h,orientation:g,shape:v="default",name:y=r,styles:x,classNames:w,...k}=e,{getPrefixCls:F,direction:C,className:D,style:S,classNames:A,styles:I}=_t("segmented"),j={...e,options:c,size:d,shape:v},$=lt(S),N=lt(f),[P,O]=jt([A,w],[I,$,x,N],{props:j}),V=F("segmented",n),[H,q]=Gce(V),L=On(d),R=Ac.useMemo(()=>c.map(K=>{if(Kce(K)){let{icon:Z,label:T,...U}=K;return{...U,label:Ac.createElement(Ac.Fragment,null,Ac.createElement("span",{className:te(`${V}-item-icon`,P.icon),style:O.icon},Z),or(T)&&Ac.createElement("span",null,T))}}return K}),[c,V,P.icon,O.icon]),[,W]=el(g,h),z=te(a,o,D,P.root,{[`${V}-block`]:l,[`${V}-sm`]:L==="small",[`${V}-lg`]:L==="large",[`${V}-vertical`]:W,[`${V}-shape-${v}`]:v==="round"},H,q),Q=(K,{item:Z})=>{if(!Z.tooltip)return K;let T=Ct(Z.tooltip)?Z.tooltip:{title:Z.tooltip};return Ac.createElement(zo,{...T},K)};return Ac.createElement(qce,{...k,name:y,className:z,style:O.root,classNames:P,styles:O,itemRender:Q,options:R,ref:t,prefixCls:V,direction:C,vertical:W})}),Qce=Xce,pL=Qce,Ef=B(_(),1);function Yce(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 eb=B(Ee(),1);function lL(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 uL(e,t){return Math.abs(e.left-t.left)<1&&Math.abs(e.width-t.width)<1}function HF({tabs:e,value:t,ariaLabel:r,className:n,onValueChange:a}){let o=Ef.useRef(null),l=Ef.useRef(null),c=Ef.useRef(null),d=Ef.useRef(null),f=ca(),[h,g]=Ef.useState(null),v=e.map(y=>y.value).join("\0");return Ef.useLayoutEffect(()=>{let y=o.current;if(!y)return;let x=lL(y,t);if(!x)return;let w=c.current,k=w&&l.current?{left:w.offsetLeft,width:w.offsetWidth}:l.current,F=Yce(k,x,f);l.current=x,d.current=F[1]??null,g(F[0]??x),w&&F[1]&&uL({left:w.offsetLeft,width:w.offsetWidth},F[0])&&(d.current=null,g(x))},[f,v,t]),Ef.useEffect(()=>{let y=o.current;if(!y||typeof ResizeObserver>"u")return;let x=new ResizeObserver(()=>{if(d.current)return;let w=lL(y,t);w&&(l.current=w,g(w))});return x.observe(y),()=>x.disconnect()},[v,t]),(0,eb.jsx)(sr,{children:(0,eb.jsxs)("div",{ref:o,className:ct("wand-ui-stretch-tabs",n),onKeyDown:y=>{if(y.key!=="Home"&&y.key!=="End")return;y.preventDefault();let x=e[y.key==="Home"?0:e.length-1];x&&(a(x.value),o.current?.querySelector(`[data-stretch-value="${CSS.escape(x.value)}"]`)?.closest(".ant-segmented-item")?.querySelector("input")?.focus({preventScroll:!0}))},children:[h?(0,eb.jsx)("span",{ref:c,className:"wand-ui-stretch-indicator",onTransitionEnd:y=>{if(y.target!==y.currentTarget||!h||f||y.propertyName!=="left"&&y.propertyName!=="width")return;let x=y.currentTarget;if(!uL({left:x.offsetLeft,width:x.offsetWidth},h))return;let w=d.current;w&&(d.current=null,g(w))},style:{left:h.left,width:h.width},"aria-hidden":"true"}):null,(0,eb.jsx)(pL,{value:t,onChange:a,"aria-label":r,options:e.map(y=>({value:y.value,label:(0,eb.jsx)("span",{"data-stretch-value":y.value,children:y.label})}))})]})})}var Ca=B(_()),Zce=B(_()),Jce=Zce.createContext({}),qF=Jce,ede=e=>{let{antCls:t,componentCls:r,iconCls:n,avatarBg:a,avatarColor:o,containerSize:l,containerSizeLG:c,containerSizeSM:d,textFontSize:f,textFontSizeLG:h,textFontSizeSM:g,iconFontSize:v,iconFontSizeLG:y,iconFontSizeSM:x,borderRadius:w,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]:{...pr(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,f,v,w),"&-lg":{...S(c,h,y,k)},"&-sm":{...S(d,g,x,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:f,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:f,groupOverlapping:-d,groupBorderColor:h}},hL=kt("Avatar",e=>{let{colorTextLightSolid:t,colorTextPlaceholder:r}=e,n=Nt(e,{avatarBg:r,avatarColor:t});return[ede(n),tde(n)]},rde),nde=Ca.forwardRef((e,t)=>{let{prefixCls:r,shape:n,size:a,src:o,srcSet:l,icon:c,className:d,rootClassName:f,style:h,alt:g,draggable:v,children:y,crossOrigin:x,gap:w=4,onError:k,...F}=e,[C,D]=Ca.useState(1),[S,A]=Ca.useState(!1),[I,j]=Ca.useState(!0),$=Ca.useRef(null),N=Ca.useRef(null),P=ln(t,$),{getPrefixCls:O,className:V,style:H}=_t("avatar"),q=Ca.useContext(qF),L=()=>{if(!N.current||!$.current)return;let ae=N.current.offsetWidth,ce=$.current.offsetWidth;ae!==0&&ce!==0&&w*2<ce&&D(ce-w*2<ae?(ce-w*2)/ae:1)};Ca.useEffect(()=>{A(!0)},[]),Ca.useEffect(()=>{j(!0),D(1)},[o,l]),Ca.useEffect(L,[w]);let R=()=>{k?.()!==!1&&j(!1)},W=On(ae=>a??q?.size??ae??"medium"),z=Object.keys(Ct(W)?W||{}:{}).some(ae=>tf.includes(ae)),Q=or(c),K=b4(z),Z=Ca.useMemo(()=>{if(!Ct(W))return{};let ae=tf.find(ye=>K[ye]),ce=W[ae];return ce?{width:ce,height:ce,fontSize:ce&&(Q||or(y))?ce/2:18}:{}},[K,W,Q,y]),T=O("avatar",r),U=Yn(T),[X,Y]=hL(T,U),re=te({[`${T}-lg`]:W==="large",[`${T}-sm`]:W==="small"}),J=Ca.isValidElement(o),se=n||q?.shape||"circle",me=te(T,re,V,`${T}-${se}`,{[`${T}-image`]:J||o&&I,[`${T}-icon`]:Q},Y,U,d,f,X),le=Ra(W)?{width:W,height:W,fontSize:Q?W/2:18}:{},he;if(typeof o=="string"&&I)he=Ca.createElement("img",{src:o,draggable:v,srcSet:l,onError:R,alt:g,crossOrigin:x});else if(J)he=o;else if(Q)he=c;else if(S||C!==1){let ae=`scale(${C})`,ce={msTransform:ae,WebkitTransform:ae,transform:ae};he=Ca.createElement(ka,{onResize:L},Ca.createElement("span",{className:`${T}-string`,ref:N,style:ce},y))}else he=Ca.createElement("span",{className:`${T}-string`,style:{opacity:0},ref:N},y);return Ca.createElement("span",{...F,style:{...le,...Z,...H,...h},className:me,ref:P},he)}),gL=nde,po=B(_()),mL=e=>{let{size:t,shape:r}=po.useContext(qF),n=po.useMemo(()=>({size:e.size||t,shape:e.shape||r}),[e.size,e.shape,t,r]);return po.createElement(qF.Provider,{value:n},e.children)},ade=po.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=po.useContext(wt),{prefixCls:a,className:o,rootClassName:l,style:c,maxCount:d,maxStyle:f,size:h,shape:g,maxPopoverPlacement:v,maxPopoverTrigger:y,children:x,max:w}=e,k=r("avatar",a),F=`${k}-group`,C=Yn(k),[D,S]=hL(k,C),A=te(F,{[`${F}-rtl`]:n==="rtl"},S,C,o,l,D),I=Hr(x).map((P,O)=>mn(P,{key:`avatar-key-${O}`})),j=po.useRef(null);po.useImperativeHandle(t,()=>({nativeElement:j.current}));let $=w?.count||d,N=I.length;if($&&$<N){let P=I.slice(0,$),O=I.slice($,N),V=w?.style||f,H=w?.popover?.trigger||y||"hover",q=w?.popover?.placement||v||"top",L={content:O,...w?.popover,placement:q,trigger:H,rootClassName:te(`${F}-popover`,w?.popover?.rootClassName)};return P.push(po.createElement(Sh,{key:"avatar-popover-key",destroyOnHidden:!0,...L},po.createElement(gL,{style:V},`+${N-$}`))),po.createElement(mL,{shape:g,size:h},po.createElement("div",{ref:j,className:A,style:c},P))}return po.createElement(mL,{shape:g,size:h},po.createElement("div",{ref:j,className:A,style:c},I))}),ide=ade,vL=gL;vL.Group=ide;var fi=vL;var Bc=B(_()),Fh=B(_()),tb=B(_()),Cf=B(_()),bL=e=>{let{prefixCls:t,value:r,current:n,offset:a=0}=e,o;return a&&(o={position:"absolute",top:`${a}00%`,left:0}),Cf.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]=Cf.useState(a),[d,f]=Cf.useState(o),h=()=>{c(a),f(o)};Cf.useEffect(()=>{let y=setTimeout(h,1e3);return()=>clearTimeout(y)},[a]);let g,v;if(l===a||Number.isNaN(a)||Number.isNaN(l))g=[Cf.createElement(bL,{...e,key:a,current:!0})],v={transition:"none"};else{g=[];let y=a+10,x=[];for(let F=a;F<=y;F+=1)x.push(F);let w=d<o?1:-1,k=x.findIndex(F=>F%10===l);g=(w<0?x.slice(0,k+1):x.slice(k)).map((F,C)=>{let D=F%10;return Cf.createElement(bL,{...e,key:F,value:D,offset:w<0?C-k:C,current:C===k})}),v={transform:`translateY(${-ode(l,a,w)}00%)`}}return Cf.createElement("span",{className:`${t}-only`,style:v,onTransitionEnd:h},g)},lde=sde,ude=tb.forwardRef((e,t)=>{let{prefixCls:r,count:n,className:a,motionClassName:o,style:l,title:c,show:d,component:f="sup",children:h,...g}=e,{getPrefixCls:v}=tb.useContext(wt),y=v("scroll-number",r),x={...g,"data-show":d,style:l,className:te(y,a,o),title:c},w=n;if(n&&Number(n)%1===0){let k=String(n).split("");w=tb.createElement("bdi",null,k.map((F,C)=>tb.createElement(lde,{prefixCls:y,count:Number(n),value:F,key:k.length-C})))}return l?.borderColor&&(x.style={...l,boxShadow:`0 0 0 1px ${l.borderColor} inset`}),h?mn(h,k=>({className:te(`${y}-custom-component`,k?.className,o)})):tb.createElement(f,{...x,ref:t},w)}),cde=ude,dde=new St("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),fde=new St("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),pde=new St("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),mde=new St("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),hde=new St("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),gde=new St("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:f,indicatorHeight:h,indicatorHeightSM:g,marginXS:v,calc:y}=e,x=`${n}-scroll-number`,w=Ec(e,(k,{darkColor:F})=>({[`&${t} ${t}-color-${k}`]:{background:F,[`&:not(${t}-count)`]:{color:F},"a:hover &":{background:F}}}));return{[t]:{...pr(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:f,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, ${x}-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}},...w,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:fde,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:pde,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"},[`${x}-custom-component, ${t}-count`]:{transform:"none"},[`${x}-custom-component, ${x}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[x]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${x}-only`]:{position:"relative",display:"inline-block",height:h,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${x}-only-unit`]:{height:h,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${x}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${x}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},yL=e=>{let{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:a}=e,o=t,l=r,c=e.colorTextLightSolid,d=e.colorError,f=e.colorErrorHover;return Nt(e,{badgeFontHeight:o,badgeShadowSize:l,badgeTextColor:c,badgeColor:d,badgeColorHover:f,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},wL=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=kt("Badge",e=>{let t=yL(e);return vde(t)},wL),yde=Bc.forwardRef((e,t)=>{let{prefixCls:r,scrollNumberPrefixCls:n,children:a,status:o,text:l,color:c,count:d=null,overflowCount:f=99,dot:h=!1,size:g="medium",title:v,offset:y,style:x,className:w,rootClassName:k,classNames:F,styles:C,showZero:D=!1,...S}=e,{getPrefixCls:A,direction:I,className:j,style:$,classNames:N,styles:P}=_t("badge"),O=A("badge",r),[V,H]=bde(O),q={...e,overflowCount:f,size:g,dot:h,showZero:D},L=d>f?`${f}+`:d,R=L==="0"||L===0||l==="0"||l===0,W=d===null||R&&!D,z=(Qr(o)||Qr(c))&&W,Q=Qr(o)||!R,K=!!(!a&&z&&(l||Q||!W)),Z=(0,Fh.useMemo)(()=>{if(!y)return;let Ie=Number.parseInt(y[0],10);return{marginTop:y[1],insetInlineEnd:-Ie}},[y]),T=(0,Fh.useMemo)(()=>({...Z,...$,...x}),[Z,x,$]),U=K?"root":"indicator",X=lt($,U),Y=lt(x,U),[re,J]=jt([N,F],[P,X,C,Y],{props:q}),se=h&&!R,me=se?"":L,le=(0,Fh.useMemo)(()=>(!or(me)&&!or(l)||R&&!D)&&!se,[me,R,D,se,l]),he=(0,Fh.useRef)(d);le||(he.current=d);let ae=he.current,ce=(0,Fh.useRef)(me);le||(ce.current=me);let ye=ce.current,Te=(0,Fh.useRef)(se);le||(Te.current=se);let De=$i(ae)||Ra(ae)?ae:void 0,ke=v===null||v===!1?void 0:v??De,Ce=!le&&(l===0?D:!!l&&l!==!0),Le=Ce?Bc.createElement("span",{className:`${O}-status-text`},l):null,$e=Ct(ae)?mn(ae,Ie=>({style:{...T,...Ie.style}})):void 0,Be=xf(c,!1),Me=te(re.indicator,{[`${O}-status-dot`]:z,[`${O}-status-${o}`]:!!o,[`${O}-color-${c}`]:Be}),Ve={};c&&!Be&&(Ve.color=c,Ve.background=c);let qe=te(O,{[`${O}-status`]:z,[`${O}-not-a-wrapper`]:!a,[`${O}-rtl`]:I==="rtl"},w,k,j,re.root,V,H);if(K){let Ie=J.root?.color;return Bc.createElement("span",{ref:t,...S,className:qe,style:{...Z,...J.root}},Bc.createElement("span",{className:Me,style:{...J.indicator,...Ve}}),Ce&&Bc.createElement("span",{style:{color:Ie},className:`${O}-status-text`},l))}return Bc.createElement("span",{ref:t,...S,className:qe,style:J.root},a,Bc.createElement(Qn,{visible:!le,motionName:`${O}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Ie})=>{let Pe=A("scroll-number",n),Je=Te.current,gt=te(re.indicator,{[`${O}-dot`]:Je,[`${O}-count`]:!Je,[`${O}-count-sm`]:g==="small",[`${O}-multiple-words`]:!Je&&ye&&ye.toString().length>1,[`${O}-status-${o}`]:!!o,[`${O}-color-${c}`]:Be}),et={...Z,...J.indicator};return c&&!Be&&(et=et||{},et.background=c),Bc.createElement(cde,{prefixCls:Pe,show:!le,motionClassName:Ie,className:gt,count:ye,title:ke,style:et,key:"scrollNumber"},$e)}),Le)}),wde=yde,kf=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,(f,{darkColor:h})=>({[`&${l}-color-${f}`]:{background:h,color:h}}));return{[c]:{position:"relative"},[l]:{...pr(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=kt(["Badge","Ribbon"],e=>{let t=yL(e);return xde(t)},wL),kde=kf.forwardRef((e,t)=>{let{className:r,prefixCls:n,style:a,color:o,children:l,text:c,placement:d="end",rootClassName:f,styles:h,classNames:g}=e,{getPrefixCls:v,direction:y,className:x,style:w,classNames:k,styles:F}=_t("ribbon"),C=v("ribbon",n),D=`${C}-wrapper`,[S,A]=Ede(C,D),I={...e,placement:d},j=lt(w,"indicator"),$=lt(a,"indicator"),[N,P]=jt([k,g],[F,j,h,$],{props:I}),O=xf(o,!1),V=te(C,`${C}-placement-${d}`,{[`${C}-rtl`]:y==="rtl",[`${C}-color-${o}`]:O},r,x,N.indicator),H={},q={};o&&!O&&(H.background=o,q.color=o);let L=kf.useRef(null);return kf.useImperativeHandle(t,()=>({nativeElement:L.current})),kf.createElement("div",{ref:L,className:te(D,f,S,A,N.root),style:P.root},l,kf.createElement("div",{className:te(V,S),style:{...H,...P.indicator}},kf.createElement("span",{className:te(`${C}-content`,N.content),style:P.content},c),kf.createElement("div",{className:`${C}-corner`,style:q})))}),Cde=kde,xL=wde;xL.Ribbon=Cde;var pi=xL;var Lo=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,f=d===void 0?void 0:d,h,g=!1,v=0;function y(){h&&clearTimeout(h)}function x(k){var F=k||{},C=F.upcomingOnly,D=C===void 0?!1:C;y(),g=!D}function w(){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&&f&&!h&&A(),y(),f===void 0&&S>e?c?(v=Date.now(),o||(h=setTimeout(f?I:A,e))):A():o!==!0&&(h=setTimeout(f?I:A,f===void 0?e-S:e))}return w.cancel=x,w}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 EL=B(_()),Dh=B(_()),Ah=B(_()),Nx=100,FL=Nx/5,DL=Nx/2-FL/2,WF=DL*2*Math.PI,kL=50,CL=e=>{let{dotClassName:t,style:r,hasCircleCls:n}=e;return Ah.createElement("circle",{className:te(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:DL,cx:kL,cy:kL,strokeWidth:FL,style:r})},Dde=({percent:e,prefixCls:t})=>{let r=`${t}-dot`,n=`${r}-holder`,a=`${n}-hidden`,[o,l]=Ah.useState(!1);er(()=>{e!==0&&l(!0)},[e]);let c=Math.max(Math.min(e,100),0);if(!o)return null;let d={strokeDashoffset:`${WF/4}`,strokeDasharray:`${WF*c/100} ${WF*(100-c)/100}`};return Ah.createElement("span",{className:te(n,`${r}-progress`,{[a]:c<=0})},Ah.createElement("svg",{viewBox:`0 0 ${Nx} ${Nx}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},Ah.createElement(CL,{dotClassName:r,hasCircleCls:!0}),Ah.createElement(CL,{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 Dh.createElement(Dh.Fragment,null,Dh.createElement("span",{className:te(l,n,r>0&&c),style:a},Dh.createElement("span",{className:te(o,`${t}-dot-spin`)},[1,2,3,4].map(d=>Dh.createElement("i",{className:`${t}-dot-item`,key:d})))),Dh.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&&EL.isValidElement(r)?mn(r,c=>({className:te(c.className,l,a),style:{...c.style,...o},percent:n})):EL.createElement($de,{prefixCls:t,percent:n,className:a,style:o})}var Ide=new St("antSpinMove",{to:{opacity:1}}),Mde=new St("antRotate",{to:{transform:"rotate(405deg)"}}),Tde=e=>{let{componentCls:t}=e,r=`${t}-section`;return{[t]:{...pr(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}}}},Nde=e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},Pde=kt("Spin",e=>{let t=Nt(e,{spinDotDefault:e.colorTextDescription});return[Tde(t),jde(t),_de(t)]},Nde),UF=B(_()),Rde=200,SL=[[30,.05],[70,.03],[96,.01]];function Ode(e,t){let[r,n]=UF.useState(0),a=UF.useRef(null),o=t==="auto";return UF.useEffect(()=>(o&&e&&(n(0),a.current=setInterval(()=>{n(l=>{let c=100-l;for(let d=0;d<SL.length;d+=1){let[f,h]=SL[d];if(l<=f)return l+c*h}return l})},Rde)),()=>{a.current&&(clearInterval(a.current),a.current=null)}),[o,e]),o?r:t}var AL;function zde(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var $L=Lo.forwardRef((e,t)=>{let{prefixCls:r,spinning:n=!0,delay:a=0,className:o,rootClassName:l,size:c,tip:d,description:f,wrapperClassName:h,style:g,children:v,fullscreen:y=!1,indicator:x,percent:w,classNames:k,styles:F,...C}=e,{getPrefixCls:D,direction:S,indicator:A,className:I,style:j,classNames:$,styles:N}=_t("spin"),P=D("spin",r),[O,V]=Pde(P),[H,q]=Lo.useState(()=>n&&!zde(n,a)),L=Ode(H,w);Lo.useEffect(()=>{if(n){let J=Fde(a,()=>{q(!0)});return J(),()=>{J?.cancel?.()}}q(!1)},[a,n]);let R=On(J=>c??J),W=f??d,z={...e,size:R,spinning:H,tip:W,description:W,fullscreen:y,children:v,percent:L},Q=lt(j),[K,Z]=jt([$,k],[N,Q,F],{props:z}),T=x??A??AL,U=typeof v<"u",X=U||y,Y=Lo.createElement(Lo.Fragment,null,Lo.createElement(Bde,{className:te(K.indicator),style:Z.indicator,prefixCls:P,indicator:T,percent:L}),W&&Lo.createElement("div",{className:te(`${P}-description`,K.tip,K.description),style:{...Z.tip,...Z.description}},W)),re=Lo.useRef(null);return Lo.useImperativeHandle(t,()=>({nativeElement:re.current})),Lo.createElement("div",{ref:re,className:te(P,{[`${P}-sm`]:R==="small",[`${P}-lg`]:R==="large",[`${P}-spinning`]:H,[`${P}-rtl`]:S==="rtl",[`${P}-fullscreen`]:y},l,K.root,y&&K.mask,X?h:[`${P}-section`,K.section],I,o,O,V),style:{...Z.root,...X?{}:Z.section,...y?Z.mask:{},...g},"aria-live":"polite","aria-busy":H,...C},H&&(X?Lo.createElement("div",{className:te(`${P}-section`,K.section),style:Z.section},Y):Y),U&&Lo.createElement("div",{className:te(`${P}-container`,K.container),style:Z.container},v))});$L.setDefaultIndicator=e=>{AL=e};var _i=$L;var IL={};Jl(IL,{installReactUiStyles:()=>$h,installStyleSheet:()=>Sa});var Lde=__wandCssTextPool[0],Hde=__wandCssTextPool[1],qde=__wandCssTextPool[2],Wde=__wandCssTextPool[3],Ude=__wandCssTextPool[4],Vde=__wandCssTextPool[5],Gde=__wandCssTextPool[6],Kde=__wandCssTextPool[7],Xde=__wandCssTextPool[8],BL="wand-react-ui-styles",Qde=[Lde,Wde,Hde,Ude,Vde,Kde,Xde,"",Gde,qde].join("");function $h(e=document){if(e.getElementById(BL))return;let t=e.createElement("style");t.id=BL,t.textContent=Qde,e.head.appendChild(t)}function Sa(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 NL="wand-hr",ab=2,e3="wand-ops",PL="e_wand_ops",Yde="\u52E4\u52B3\u7684\u521D\u4E8C",t3="\u7CFB\u7EDF\u7528\u6237";function RL(e){return e?.systemKey===e3}var r3="wand-default",OL="e_wand_default",zL="\u9ED8\u8BA4\u7528\u6237";function LL(e){return e?.systemKey===r3}function Zde(e){return e?.systemKey===U5}function n3(e){let t=e?.systemKey;return t===e3||t===r3||t===U5||t===NL}var GF=8,KF=20;function Jde(e){return RL(e)||Zde(e)||e.systemKey===NL?[t3]:LL(e)?[zL]:e.tags??[]}function efe(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>KF)throw new Error(`\u6BCF\u4E2A\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u8D85\u8FC7 ${KF} \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===t3||n===zL)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>GF)throw new Error(`\u6700\u591A ${GF} \u4E2A\u5458\u5DE5\u6807\u7B7E\u3002`);return t}function tfe(e){return efe(e.split(/[,,、\n]+/))}var rfe=[{id:OL,systemKey:r3,avatar:"plush-cat:v1:silver"},{id:PL,systemKey:e3,avatar:"plush-cat:v1:orange"}];function a3(e){return rfe.find(t=>t.id===e.id&&t.systemKey===e.systemKey)?.avatar??null}function nfe(e){return a3(e)??e.avatar??""}function i3(e){return a3(e)!==null}var Fa=B(Ee(),1);function HL({activity:e,pawColor:t}){return e==="idle"?null:(0,Fa.jsx)("svg",{className:"wand-avatar-file-fallback",viewBox:"0 0 100 100","aria-hidden":"true","data-file-prop":e,children:e==="reading"?(0,Fa.jsxs)(Fa.Fragment,{children:[(0,Fa.jsx)("path",{d:"M25 70Q38 67 50 73Q62 67 75 70V90Q62 87 50 93Q38 87 25 90Z",fill:"#426a70"}),(0,Fa.jsx)("path",{d:"M25 71Q38 69 50 74Q62 69 75 71L74 74Q61 71 50 77Q39 71 26 74Z",fill:"#fff3d5"}),(0,Fa.jsx)("circle",{cx:"25",cy:"84",r:"4.2",fill:t}),(0,Fa.jsx)("circle",{cx:"75",cy:"84",r:"4.2",fill:t}),(0,Fa.jsx)("path",{d:"M50 77v15m-20-14 1 9m38-9-1 9",stroke:"#dba758",strokeWidth:"1"})]}):(0,Fa.jsxs)(Fa.Fragment,{children:[(0,Fa.jsx)("path",{d:"M28 75L70 72L74 92L31 95Z",fill:"#426a70"}),(0,Fa.jsx)("path",{d:"M31 76L68 74L70 76L32 78Z",fill:"#fff3d5"}),(0,Fa.jsx)("path",{d:"M34 78l2 12",stroke:"#626c78",strokeWidth:"1"}),(0,Fa.jsx)("path",{d:"M53 77L59 66",stroke:"#dba758",strokeWidth:"3",strokeLinecap:"round"}),(0,Fa.jsx)("path",{d:"M53 77L51 79L55 78Z",fill:"#626c78"}),(0,Fa.jsx)("circle",{cx:"30",cy:"86",r:"4.2",fill:t}),(0,Fa.jsx)("circle",{cx:"56",cy:"72",r:"4",fill:t})]})})}var afe=B(_(),1),Px=B(Ee(),1);function Mh(){let e=ca();return afe.useLayoutEffect(()=>Sa("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,Px.jsx)("span",{className:"wand-avatar-thinking","data-reduced-motion":e,"aria-hidden":"true",children:(0,Px.jsx)(_i,{size:"small",indicator:(0,Px.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,Px.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),ife=[[[.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 ofe(e,t){let r=ife[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 sfe(e,t,r){let n=ofe(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],f=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]-f[0])/6,c[1]+(d[1]-f[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 lfe={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}},ufe={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 XF(e){return lfe[e.coat]}function cfe(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 ib=[{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"}],ob=[{id:"none",label:"\u65E0\u773C\u955C"},{id:"gold",label:"\u91D1\u6846\u773C\u955C"},{id:"ink",label:"\u9ED1\u6846\u773C\u955C"}],sb=[{id:"none",label:"\u65E0\u5E3D\u5B50"},{id:"beanie",label:"\u9488\u7EC7\u5E3D"},{id:"beret",label:"\u8D1D\u96F7\u5E3D"}];function qL(e){return"kind"in e&&e.kind==="dog"}function lb(e){return e==="plush-dog:v1:shiba:red-scarf"?{version:1,kind:"dog",breed:"shiba",scarf:"red"}:null}function QF(e){return"kind"in e&&e.kind==="cat"}function ub(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 Hx(e){let t=nfe(e);return lb(t)??ub(t)??db({...e,avatar:t})}function Rx(e,t){return e.some(r=>r.id===t)}function Th(e){let t=e.split(":");if(t.length!==6||t[0]!=="plush"||t[1]!=="v1")return null;let[,,r,n,a,o]=t;return!Rx(ib,r)||!Rx(Ic,n)||!Rx(ob,a)||!Rx(sb,o)?null:{version:1,shape:r,color:n,glasses:a,hat:o}}function o3(e){let t=`plush:v${e.version}:${e.shape}:${e.color}:${e.glasses}:${e.hat}`;if(!Th(t))throw new Error("\u6BDB\u7ED2\u5934\u50CF\u914D\u7F6E\u65E0\u6548\u3002");return t}function dfe(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 cb({id:e,name:t}){let r=(e??"").trim()||(t??"").trim()||"member",n=(a,o)=>o[dfe(`plush:v1:${r}:${a}`)%o.length].id;return{version:1,shape:n("shape",ib),color:n("color",Ic),glasses:n("glasses",ob),hat:n("hat",sb)}}function db(e){let t=e.avatar??"";return t.startsWith("data:image/")||/^cat:\d+$/.test(t)?null:Th(t)??cb(e)}var ut=B(Ee(),1),Ox=ef.plushAvatarChunkSrc,WL=3,UL=1,ffe=[750,2e3],rb=null,YF=!1,ML=0,Bh=new Set,un={status:"idle",assetPath:Ox.split("?")[0],attempts:0,cycleAttempts:0,maxCycleAttempts:WL,onlineRecoveries:0,maxOnlineRecoveries:UL,startedAt:0,finishedAt:0};globalThis.__wandPlushLoaderDiagnostics=()=>({...un});function pfe(){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?Ox:`${Ox}${Ox.includes("?")?"&":"?"}wandPlushRetry=${un.attempts}`;try{r.src=l,document.head.append(r)}catch{a("download")}})}function mfe(){let e=globalThis;return e.__wandPlushRuntime?(un.status="ready",un.failure=void 0,Promise.resolve(e.__wandPlushRuntime)):rb||(YF?Promise.reject(un.failure):(un.status="loading",un.startedAt=Date.now(),un.finishedAt=0,un.cycleAttempts=0,rb=(async()=>{for(let t=0;t<WL;t++){if(t&&await new Promise(r=>window.setTimeout(r,ffe[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 pfe();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 YF=!0,un.status="failed",un.finishedAt=Date.now(),un.failure})().finally(()=>{rb=null}),rb))}function VL(e){if(rb||un.status!=="failed"||!Bh.size||e&&ML>=UL)return!1;e&&(un.onlineRecoveries=++ML),YF=!1;for(let t of Bh)t();return!0}var TL=()=>{VL(!0)};function hfe(){return VL(!1)}var gfe=2500,GL=650,vfe=1e3,zx=!1,Ih=!1,Lx=!1,ZF=0,KL=0,VF=!1,Sf=new Set;function jL(){document.hidden||s3()}function s3(){if(Ih)return;if(!Sf.size){Lx=!1;return}if(document.hidden){document.addEventListener("visibilitychange",jL,{once:!0});return}if(VF)return;VF=!0;let e=()=>{if(VF=!1,Ih)return;if(!Sf.size){Lx=!1;return}if(document.hidden){document.addEventListener("visibilitychange",jL,{once:!0});return}Ih=!0;let t=[...Sf];Sf.clear();for(let r of t)r()};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e,{timeout:vfe}):window.setTimeout(e,0)}function JF(){zx||(zx=!0,window.clearTimeout(ZF),ZF=0,window.removeEventListener("load",JF),KL=window.setTimeout(s3,GL))}function bfe(){if(!(Ih||Lx||!Sf.size)){if(Lx=!0,zx||document.readyState==="complete"){zx=!0,KL=window.setTimeout(s3,GL);return}window.addEventListener("load",JF,{once:!0}),ZF=window.setTimeout(JF,Math.max(0,gfe-performance.now()))}}function yfe(e){return Ih?(e(),()=>{}):(Sf.add(e),bfe(),()=>{Sf.delete(e)})}var XL=__wandCssTextPool[9],wfe={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 QL({config:e}){let t=hs.useId();if(qL(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(QF(e)){let n=e.coat==="silver",a=XF(e),{coat:o,dark:l,pale:c,iris:d,innerEar:f,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)*cfe(a,D)+S)),v(D)])}let x=y.map(([k,F],C)=>`${C?"L":"M"}${k} ${F}`).join(" ")+"Z",w=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:x})}),(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:f})]},k)),(0,ut.jsx)("path",{d:x,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)`}),ufe[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:w(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)}`:sfe(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:wfe[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 l3({config:e,size:t=32,className:r=""}){return hs.useEffect(()=>{Sa("wand-plush-avatar-styles",XL)},[]),(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)(QL,{config:e})})}function jh({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 f=hs.useRef(null),h=hs.useRef(null),g=ca(),[v,y]=hs.useState("deferred"),[x,w]=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(()=>{Sa("wand-plush-avatar-styles",XL);let A=f.current;if(!A)return;let I=!0,j=!1,$=!1,N="",P=null,O=null,V=null,H=(W,z)=>{let Q=`${W}:${z??""}`;N!==Q&&(N=Q,S.current?.(W,z))},q=()=>{!I||j||h.current||(j=!0,$=!1,V?.disconnect(),y("loading"),w("static"),F(void 0),H("loading"),mfe().then(W=>{j=!1,I&&(h.current=W.attach(A,D.current,(z,Q,K)=>{I&&(y(z),w(Q),F(K),H(z,K))}))},()=>{j=!1,$=!0,I&&(y("fallback"),w("fallback"),F("runtime-load"),H("fallback","runtime-load"))}))},L=()=>{if(!(!I||j||h.current)){if(O?.(),O=null,document.hidden){let W=()=>{document.hidden||(document.removeEventListener("visibilitychange",W),O=null,L())};document.addEventListener("visibilitychange",W),O=()=>document.removeEventListener("visibilitychange",W);return}if(c||Ih){q();return}P||(P=yfe(()=>{P=null,q()}))}};V=new IntersectionObserver(W=>{if(W.some(z=>z.isIntersecting)){L();return}P?.(),P=null},{rootMargin:"48px"}),V.observe(A);let R=()=>{$&&q()};return Bh.size||window.addEventListener("online",TL),Bh.add(R),()=>{Bh.delete(R),Bh.size||window.removeEventListener("online",TL),I=!1,V?.disconnect(),P?.(),P=null,O?.(),O=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":QF(e)?XF(e).breed:void 0,"data-file-activity":l,"data-renderer":v,"data-render-state":x,"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)(QL,{config:e}),(0,ut.jsx)("canvas",{ref:f,width:t,height:t}),l!=="idle"?(0,ut.jsx)(HL,{activity:l,pawColor:QF(e)?XF(e).coat:qL(e)?"#cb803f":Ic.find(A=>A.id===e.color)?.color??"#ecb6a3"}):o||a||v==="loading"?(0,ut.jsx)(Mh,{}):null]})}var nb=[{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"}],Yr="";function xfe(e){let t=nb[e%nb.length],r=t.base,n=t.dark,a=t.light??t.base,o="#FFFFFF",l=t.eye??"#2D2D2D",c="#F28B9A";return[[Yr,n,Yr,Yr,Yr,Yr,Yr,Yr,n,Yr],[n,r,n,Yr,Yr,Yr,Yr,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],[Yr,r,r,r,r,r,r,r,r,Yr],[Yr,Yr,r,n,r,r,n,r,Yr,Yr],[Yr,Yr,Yr,r,Yr,Yr,r,Yr,Yr,Yr]]}function YL(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 ZL(e){let t=/^cat:(\d+)$/.exec(e.avatar??"");return t?Number(t[1])%nb.length:YL(e.id||e.name||"member",nb.length)}var Efe="#FFFFFF",_L=[{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"}],kfe=/^cat:(\d+)$/;function Cfe({id:e,name:t}){return(e??"").trim()||(t??"").trim()||"member"}function Sfe({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 fb(e){let t=_L[YL(Cfe(e),_L.length)];return{from:t.from,to:t.to,text:Efe,glyph:Sfe(e)}}function qx(e){return{background:`linear-gradient(135deg, ${e.from}, ${e.to})`,color:e.text}}function JL(e){let t=e.avatar??"";return t.startsWith("data:image/")?{kind:"upload",src:t}:!e.id&&!e.name?null:kfe.test(t)?{kind:"cat",coat:ZL({id:e.id??"",name:e.name??"",avatar:t})}:{kind:"generated",face:fb(e)}}var ta=B(Ee(),1);function eH({coat:e}){let t=xfe(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 Wx({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 Ux(e,t){let r=lb(e.avatar??"")??ub(e.avatar??"")??Th(e.avatar??"");if(r)return{style:{background:"transparent"},icon:(0,ta.jsx)(jh,{config:r,size:t})};let n=JL(e)??{kind:"generated",face:fb(e)};return n.kind==="upload"?{src:n.src}:n.kind==="cat"?{icon:(0,ta.jsx)(eH,{coat:n.coat})}:{style:qx(n.face),icon:(0,ta.jsx)(Wx,{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?Hx({...e,id:e.employeeId}):null,d=c?{style:{background:"transparent"},icon:(0,ta.jsx)(jh,{config:c,size:o})}:Ux(e,o);return(0,ta.jsx)(sr,{children:(0,ta.jsx)(pi,{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)(pi,{offset:[0,o],count:r==="done"?(0,ta.jsx)(fi,{size:16,style:{background:l},icon:(0,ta.jsx)("span",{children:"\u2713"})}):n?(0,ta.jsx)(fi,{size:18,shape:"square",icon:(0,ta.jsx)(Js,{provider:e.agent.provider})}):void 0,children:(0,ta.jsx)(fi,{shape:"square",size:o,src:d.src,style:{...d.style,outline:l?`2px solid ${l}`:void 0,outlineOffset:1},icon:d.icon})})})})}function Ffe({members:e,max:t=5,size:r="sm"}){let n=[...e].sort((a,o)=>Number(o.isLeader)-Number(a.isLeader));return(0,ta.jsx)(sr,{children:(0,ta.jsx)(fi.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 u3(e,t){let r=URL.createObjectURL(e);try{let n=await new Promise((d,f)=>{let h=new Image;h.onload=()=>d(h),h.onerror=()=>f(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},c3=new Set;function _h(e){ra={...e,revision:ra.revision+1};for(let t of c3)t()}var mo={open(e){_h({open:!0,tab:e??"profile",nested:null,detail:e!==void 0})},close(){!ra.open&&ra.nested===null||_h({...ra,open:!1,nested:null,detail:!1})},closeTopmost(){return ra.nested!==null?(_h({...ra,nested:null}),!0):ra.open&&ra.detail?(Da.showDirectory(),!0):this.closeIfOpen()},closeIfOpen(){return ra.open?(this.close(),!0):!1},isOpen(){return ra.open}},Da={subscribe(e){return c3.add(e),()=>c3.delete(e)},getSnapshot(){return ra},setTab(e){ra.tab===e&&ra.detail||_h({...ra,tab:e,detail:!0})},showDirectory(){ra.detail&&_h({...ra,detail:!1,nested:null})},setNested(e){ra.nested!==e&&_h({...ra,nested:e})}},d3="\u6211",Dfe=6e4,Afe=/^data:image\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$/,$fe=/^cat:(\d{1,2})$/,rH=24;function nH(e){return typeof e=="string"?e.trim():""}function Bfe(e){return $fe.test(e)||Afe.test(e)||!!(Th(e)??ub(e)??lb(e))}function Ife(e){let t=nH(e);return!t||t.length<=Dfe&&Bfe(t)?t:""}function f3(e){if(!e||typeof e!="object")return;let t=e,r=nH(t.name).slice(0,rH),n=Ife(t.avatar);if(!(!r&&!n))return{...r?{name:r}:{},...n?{avatar:n}:{}}}function da(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Nh(e){return da(e)?e:{}}function Ke(e,t=""){return typeof e=="string"?e:t}function Aa(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}async function gs(e){try{let t=await e.json();return da(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 Mfe(e){let t=e.split("?")[0].split("/")[2]??"";return Object.prototype.hasOwnProperty.call(aH,t)?aH[t]:"api"}function p3(e){let t;try{t=new URL(e,"https://wand.invalid").pathname}catch{return"api"}return Mfe(t)}var iH=null,pb=new Map,m3=0;function g3(e){iH=e}function Tfe(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 h3(e,t){return Tfe(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()||m3>=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(),f={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:h3(a,128),message:h3(t instanceof Error?t.message:t,8192),stack:h3(t instanceof Error?t.stack??"":"",16384)}};if(new TextEncoder().encode(JSON.stringify(f)).length>32768)return;m3++,Promise.resolve().then(()=>n.fetch("/api/feedback/client",{method:"POST",credentials:"same-origin",redirect:"error",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),signal:AbortSignal.timeout(3e3)})).then(h=>h.body?.cancel()).catch(()=>{}).finally(()=>{m3--})}catch{}}function v3(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 $a=class extends Error{constructor(e,t,r){super(e),oe(this,"status",t),this.name="HttpResponseError",t>=500&&mu("http_5xx",this,r)}};function b3(){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 At(e){let t;try{t=await e.json()}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new $a(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,p3(e.url))}let r=da(t)&&typeof t.error=="string"?t.error:"";if(!e.ok||r)throw new $a(r||`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,p3(e.url));if(t===null||typeof t!="object")throw new $a("\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002",e.status,p3(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 $a("\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 At(r)}function hn(e,t="POST"){return{method:t,headers:{"content-type":"application/json"},body:JSON.stringify(e)}}var Vx=B(Ee(),1);function Ff({className:e,style:t}){return(0,Vx.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,Vx.jsx)("rect",{width:Bo.viewport,height:Bo.viewport,rx:"24",fill:Bo.background}),(0,Vx.jsx)("g",{transform:`translate(${Bo.inset} ${Bo.inset})`,children:Bo.paths.map(({fill:r,d:n})=>(0,Vx.jsx)("path",{fill:r,d:n},r))})]})}var y3=B(Ee(),1);function Ne({className:e,kind:t="secondary",size:r="medium",type:n="button",ref:a,...o}){return(0,y3.jsx)(sr,{children:(0,y3.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 Mr({className:e,kind:t="ghost",size:r="small",children:n,...a}){return(0,y3.jsx)(Ne,{...a,kind:t,size:r,className:ct("wand-ui-icon-button",e),children:n})}var oH=B(_()),jfe={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"},_fe=jfe;function w3(){return w3=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},w3.apply(this,arguments)}var Nfe=(e,t)=>oH.createElement(Gt,w3({},e,{ref:t,icon:_fe})),Pfe=oH.forwardRef(Nfe),x3=Pfe;var sH=B(_()),Rfe={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"},Ofe=Rfe;function E3(){return E3=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},E3.apply(this,arguments)}var zfe=(e,t)=>sH.createElement(Gt,E3({},e,{ref:t,icon:Ofe})),Lfe=sH.forwardRef(zfe),k3=Lfe;var lH=B(_()),Hfe={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"},qfe=Hfe;function C3(){return C3=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},C3.apply(this,arguments)}var Wfe=(e,t)=>lH.createElement(Gt,C3({},e,{ref:t,icon:qfe})),Ufe=lH.forwardRef(Wfe),S3=Ufe;var uH=B(_()),Vfe={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"},Gfe=Vfe;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 Kfe=(e,t)=>uH.createElement(Gt,F3({},e,{ref:t,icon:Gfe})),Xfe=uH.forwardRef(Kfe),Mc=Xfe;var gn=B(_()),Gx=(e,t,r)=>({background:e,[`${r}-icon`]:{color:t}}),Qfe=e=>{let{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:a,fontSize:o,fontSizeLG:l,lineHeight:c,motionEaseInOutCirc:d,borderRadius:f,withDescriptionIconSize:h,colorText:g,colorTextHeading:v,withDescriptionPadding:y,defaultPadding:x,lineWidth:w,lineType:k,colorSuccessBorder:F,colorWarningBorder:C,colorErrorBorder:D,colorInfoBorder:S}=e;return{[t]:{...pr(e),position:"relative",display:"flex",alignItems:"center",padding:x,wordWrap:"break-word",borderRadius:f,borderWidth:ve(w),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}}}},Yfe=e=>{let{componentCls:t,colorSuccess:r,colorSuccessBg:n,colorWarning:a,colorWarningBg:o,colorError:l,colorErrorBg:c,colorInfo:d,colorInfoBg:f}=e;return{[t]:{"&-success":Gx(n,r,t),"&-info":Gx(f,d,t),"&-warning":Gx(o,a,t),"&-error":{...Gx(c,l,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},Zfe=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",...Bi(e),[`${r}-close`]:{color:l,transition:`color ${n}`,"&:hover":{color:c}}},"&-close-text":{color:l,transition:`color ${n}`,"&:hover":{color:c}}}}},Jfe=e=>({borderRadius:e.borderRadiusLG,withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),epe=kt("Alert",e=>[Qfe(e),Yfe(e),Zfe(e)],Jfe),tpe=e=>{let{icon:t,type:r,className:n,style:a,successIcon:o,infoIcon:l,warningIcon:c,errorIcon:d}=e;return gn.createElement("span",{className:n,style:a},t??{success:o??gn.createElement(S3,null),info:l??gn.createElement(x3,null),error:d??gn.createElement(Lv,null),warning:c??gn.createElement(k3,null)}[r])},rpe=e=>{let{isClosable:t,prefixCls:r,closeIcon:n,handleClose:a,ariaProps:o,className:l,style:c}=e,d=n===!0||n===void 0?gn.createElement(Mc,null):n;return t?gn.createElement("button",{type:"button",onClick:a,className:te(`${r}-close-icon`,l),tabIndex:0,style:c,...o},d):null},npe=gn.forwardRef((e,t)=>{let{description:r,prefixCls:n,message:a,title:o,banner:l,className:c,rootClassName:d,style:f,onMouseEnter:h,onMouseLeave:g,onClick:v,afterClose:y,showIcon:x,closable:w,closeText:k,closeIcon:F,action:C,id:D,styles:S,classNames:A,...I}=e,j=o??a,[$,N]=gn.useState(!1),P=gn.useRef(null);gn.useImperativeHandle(t,()=>({nativeElement:P.current}));let{getPrefixCls:O,direction:V,variant:H,closable:q,closeIcon:L,className:R,style:W,classNames:z,styles:Q,successIcon:K,infoIcon:Z,warningIcon:T,errorIcon:U}=_t("alert"),X=O("alert",n),[Y,re]=epe(X),{onClose:J,afterClose:se}=Ct(w)?w:{},me=Ve=>{N(!0),(J??e.onClose)?.(Ve)},le=gn.useMemo(()=>e.type!==void 0?e.type:l?"warning":"info",[e.type,l]),he=e.variant??H??"outlined",ae=gn.useMemo(()=>Ct(w)||k?!0:typeof w=="boolean"?w:F!==!1&&Qr(F)?!0:!!q,[k,F,w,q]),ce=l&&x===void 0?!0:x,ye={...e,prefixCls:X,variant:he,type:le,showIcon:ce,closable:ae},Te=lt(W),De=lt(f),[ke,Ce]=jt([z,A],[Q,Te,S,De],{props:ye}),Le=te(X,`${X}-${le}`,`${X}-${he}`,{[`${X}-with-description`]:or(r),[`${X}-no-icon`]:!ce,[`${X}-banner`]:!!l,[`${X}-rtl`]:V==="rtl"},R,c,d,ke.root,re,Y),$e=no(I,{aria:!0,data:!0}),Be=gn.useMemo(()=>Ct(w)&&w.closeIcon?w.closeIcon:k||(F!==void 0?F:Ct(q)&&q.closeIcon?q.closeIcon:L),[F,w,q,k,L]),Me=gn.useMemo(()=>{let Ve=w??q;return Ct(Ve)?no(Ve,{data:!0,aria:!0}):{}},[w,q]);return gn.createElement(Qn,{visible:!$,motionName:`${X}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:Ve=>({maxHeight:Ve.offsetHeight}),onLeaveEnd:se??y},({className:Ve,style:qe},Ie)=>gn.createElement("div",{id:D,ref:ln(P,Ie),"data-show":!$,className:te(Le,Ve),style:{...Ce.root,...qe},onMouseEnter:h,onMouseLeave:g,onClick:v,role:"alert",...$e},ce?gn.createElement(tpe,{className:te(`${X}-icon`,ke.icon),style:Ce.icon,description:r,icon:e.icon,prefixCls:X,type:le,successIcon:K,infoIcon:Z,warningIcon:T,errorIcon:U}):null,gn.createElement("div",{className:te(`${X}-section`,ke.section),style:Ce.section},or(j)?gn.createElement("div",{className:te(`${X}-title`,ke.title),style:Ce.title},j):null,or(r)?gn.createElement("div",{className:te(`${X}-description`,ke.description),style:Ce.description},r):null),or(C)?gn.createElement("div",{className:te(`${X}-actions`,ke.actions),style:Ce.actions},C):null,gn.createElement(rpe,{className:ke.close,style:Ce.close,isClosable:ae,prefixCls:X,closeIcon:Be,handleClose:me,ariaProps:Me})))}),cH=npe;function ape(e,t,r){return t=bc(t),z5(e,bv()?Reflect.construct(t,r||[],bc(e).constructor):t.apply(e,r))}var D3=B(_()),ipe=(function(e){function t(){var r;return nu(this,t),r=ape(this,t,arguments),r.state={error:void 0,info:{}},r}return vv(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,f=n??r,h=d?.componentStack||null,g=Qr(f)?f:c?.toString(),v=Qr(a)?a:h;return c?D3.createElement(cH,{id:o,type:"error",title:g,description:D3.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},v)}):l}}])})(D3.PureComponent),ope=ipe,dH=cH;dH.ErrorBoundary=ope;var La=dH;var A3=B(_()),fH=["wrap","nowrap","wrap-reverse"],pH=["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"],spe=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&fH.includes(r)}},lpe=(e,t)=>{let r={};return mH.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},upe=(e,t)=>{let r={};return pH.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r},cpe=(e,t)=>te({...spe(e,t),...lpe(e,t),...upe(e,t)}),dpe=cpe,fpe=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},ppe=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},mpe=e=>{let{componentCls:t}=e,r={};return fH.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},hpe=e=>{let{componentCls:t}=e,r={};return mH.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},gpe=e=>{let{componentCls:t}=e,r={};return pH.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},vpe=()=>({}),bpe=kt("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,a=Nt(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[fpe(a),ppe(a),mpe(a),hpe(a),gpe(a)]},vpe,{resetStyle:!1}),ype=A3.default.forwardRef((e,t)=>{let{prefixCls:r,rootClassName:n,className:a,style:o,flex:l,gap:c,vertical:d,orientation:f,component:h="div",children:g,...v}=e,{flex:y,direction:x,getPrefixCls:w}=A3.default.useContext(wt),k=w("flex",r),[F,C]=bpe(k),[,D]=el(f,d??y?.vertical),S=te(a,n,y?.className,k,F,C,dpe(k,{...e,vertical:D}),{[`${k}-rtl`]:x==="rtl",[`${k}-gap-${c}`]:uf(c),[`${k}-vertical`]:D}),A={...y?.style,...o};return Qr(l)&&(A.flex=l),Qr(c)&&!uf(c)&&(A.gap=c),A3.default.createElement(h,{ref:t,className:S,style:A,...xr(v,["justify","wrap","align"])},g)}),Xe=ype,hH=B(_()),wpe={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"},xpe=wpe;function $3(){return $3=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},$3.apply(this,arguments)}var Epe=(e,t)=>hH.createElement(Gt,$3({},e,{ref:t,icon:xpe})),kpe=hH.forwardRef(Epe),M3=kpe,gH=B(_()),Cpe={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"},Spe=Cpe;function B3(){return B3=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},B3.apply(this,arguments)}var Fpe=(e,t)=>gH.createElement(Gt,B3({},e,{ref:t,icon:Spe})),Dpe=gH.forwardRef(Fpe),T3=Dpe,vH=B(_()),Ape={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"},$pe=Ape;function I3(){return I3=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},I3.apply(this,arguments)}var Bpe=(e,t)=>vH.createElement(Gt,I3({},e,{ref:t,icon:$pe})),Ipe=vH.forwardRef(Bpe),j3=Ipe;var bH=B(_()),Mpe={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"},Tpe=Mpe;function _3(){return _3=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},_3.apply(this,arguments)}var jpe=(e,t)=>bH.createElement(Gt,_3({},e,{ref:t,icon:Tpe})),_pe=bH.forwardRef(jpe),N3=_pe;var yH=B(_()),mr=B(_()),hu=B(_()),Npe=(e,t,r,n)=>{let{titleMarginBottom:a,fontWeightStrong:o}=n;return{marginBottom:a,color:r,fontWeight:o,fontSize:e,lineHeight:t}},Ppe=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
|
+
`]=Npe(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},Rpe=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...L5(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none",[`${t}-actions`]:{pointerEvents:"auto"}}}}}},Ope=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:Om[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}}}}),zpe=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"}}}},Lpe=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Hpe=()=>({"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"}}),qpe=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"},...Ppe(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}},...Ope(e),...Rpe(e),[`${t}-actions`]:{display:"inline"},[`
|
|
200
|
+
${t}-expand,
|
|
201
|
+
${t}-collapse,
|
|
202
|
+
${t}-edit,
|
|
203
|
+
${t}-copy
|
|
204
|
+
`]:{...L5(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}},...zpe(e),...Lpe(e),...Hpe(),"&-rtl":{direction:"rtl"}}}},Wpe=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),AH=kt("Typography",qpe,Wpe),Upe=e=>{let{prefixCls:t,"aria-label":r,className:n,style:a,classNames:o,styles:l,direction:c,maxLength:d,autoSize:f=!0,value:h,onSave:g,onCancel:v,onEnd:y,component:x,enterIcon:w=hu.createElement(T3,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:R}=L.value;L.setSelectionRange(R,R)}},[]);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)},N=()=>{g(D.trim())},P=({keyCode:L,ctrlKey:R,altKey:W,metaKey:z,shiftKey:Q})=>{C.current!==L||F.current||R||W||z||Q||(L===Rn.ENTER?(N(),y?.()):L===Rn.ESC&&v())},O=()=>{N()},[V,H]=AH(t),q=te(t,`${t}-edit-content`,{[`${t}-rtl`]:c==="rtl",[`${t}-${x}`]:!!x},n,o.root,V,H);return hu.createElement("div",{className:q,style:{...l.root,...a}},hu.createElement(qv,{ref:k,maxLength:d,value:D,onChange:A,onKeyDown:$,onKeyUp:P,onCompositionStart:I,onCompositionEnd:j,onBlur:O,"aria-label":r,rows:1,autoSize:f,className:o.textarea,style:l.textarea}),w!==null?mn(w,{className:`${t}-edit-content-confirm`}):null)},Vpe=Upe,Gpe=B(_()),Kpe=(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})}},Xpe=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 Qpe(e,t){if(typeof e!="string")return!1;let r=t?.format==="text/html";return!!(await Xpe(e,r)||Kpe(e,r))}var Ype=Qpe,Zpe=(e,t={})=>!Qr(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],$H=Zpe,Jpe=({copyConfig:e,children:t})=>{let[r,n]=zm(!1),[a,o]=Gpe.useState(!1),l={};e.format&&(l.format=e.format);let c=xt(async d=>{d?.preventDefault(),d?.stopPropagation(),o(!0);try{let f=Er(e.text)?await e.text():e.text;await Ype(f||$H(t,{skipEmpty:!0}).join("")||"",l),o(!1),n(!0,!0),n(!1,{ms:3e3}),e.onCopy?.(d)}catch(f){throw o(!1),f}});return{copied:r,copyLoading:a,onClick:c}},eme=Jpe,tme=B(_()),rme=(e,t)=>{let r=!!e;return tme.useMemo(()=>{let n={...t,...r&&Ct(e)?e:null};return[r,n]},[r,e,t])},P3=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}:Ct(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:f,styles:h}=_t("typography"),g=n??l,v=o("typography",e),y={...a,prefixCls:v,direction:g},x=(0,sme.useMemo)(()=>({root:c}),[c]),w=lt(d),[k,F]=jt([x,f,t],[h,w,r],{props:y});return[k,F,v,g]},Qx=B(_()),IH=Qx.forwardRef((e,t)=>{let{component:r="article",className:n,rootClassName:a,children:o,direction:l,style:c,classNames:d,styles:f,prefixCls:h,...g}=e,[v,y]=AH(h),x=te(h,{[`${h}-rtl`]:l==="rtl"},n,a,v,y,d?.root),w={...f?.root,...c};return Qx.createElement(r,{...g,className:x,style:w,ref:t},o)}),lme=Qx.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,direction:o,classNames:l,styles:c,...d}=e,[f,h,g,v]=BH(r,l,c,o,e);return Qx.createElement(IH,{ref:t,className:te(n,a),direction:v,classNames:f,styles:h,prefixCls:g,...d})}),ume=lme,mb=B(_()),EH=e=>e===!1?[!1,!1]:$H(e);function R3(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 W3=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:f,className:h,style:g}=e,v=EH(o),y=EH(l),{copied:x,copy:w}=n??{},k=r?x:w,F=R3(v[r?1:0],k),C=typeof F=="string"?F:k;return mb.createElement(zo,{title:F},mb.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?R3(y[1],mb.createElement(N3,null),!0):R3(y[0],f?mb.createElement(Av,null):mb.createElement(j3,null),!0)))},fme=dme,Rr=B(_()),Kx=Rr.forwardRef(({style:e,children:t},r)=>{let n=Rr.useRef(null);return Rr.useImperativeHandle(r,()=>({isExceed:()=>{let a=n.current;return a.scrollHeight>a.clientHeight},getHeight:()=>n.current.clientHeight})),Rr.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)}),pme=e=>e.reduce((t,r)=>t+(W3(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=W3(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 O3=0,z3=1,L3=2,H3=3,CH=4,Xx={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:f}=e,h=Rr.useMemo(()=>Hr(n),[n]),g=Rr.useMemo(()=>pme(h),[n]),v=Rr.useMemo(()=>a(h,!1),[n].concat(Xr(c))),[y,x]=Rr.useState(null),w=Rr.useRef(null),k=Rr.useRef(null),F=Rr.useRef(null),C=Rr.useRef(null),D=Rr.useRef(null),[S,A]=Rr.useState(!1),[I,j]=Rr.useState(O3),[$,N]=Rr.useState(0),[P,O]=Rr.useState(null);er(()=>{j(t&&r&&g?z3:O3)},[r,n,o,t,h].concat(Xr(c))),er(()=>{if(I===z3){j(L3);let L=k.current&&getComputedStyle(k.current).whiteSpace;O(L)}else if(I===L3){let L=!!F.current?.isExceed();j(L?H3:CH),x(L?[0,g]:null),A(L);let R=F.current?.getHeight()||0,W=o===1?0:C.current?.getHeight()||0,z=D.current?.getHeight()||0,Q=Math.max(R,W+z);N(Q+1),f(L)}},[I]);let V=y?Math.ceil((y[0]+y[1])/2):0;er(()=>{let[L,R]=y||[0,0];if(L!==R){let W=(w.current?.getHeight()||0)>$,z=V;R-L===1&&(z=W?L:R),x(W?[L,z]:[z,R])}},[y,V]);let H=Rr.useMemo(()=>{if(!t)return a(h,!1);if(I!==H3||!y||y[0]!==y[1]){let L=a(h,!1);return[CH,O3].includes(I)?L:Rr.createElement("span",{style:{...Xx,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:P==="nowrap"?"normal":"inherit"};return Rr.createElement(Rr.Fragment,null,H,I===L3&&Rr.createElement(Rr.Fragment,null,Rr.createElement(Kx,{style:{...q,...Xx,WebkitLineClamp:o},ref:F},v),Rr.createElement(Kx,{style:{...q,...Xx,WebkitLineClamp:o-1},ref:C},v),Rr.createElement(Kx,{style:{...q,...Xx,WebkitLineClamp:1},ref:D},a([],!0))),I===H3&&y&&y[0]!==y[1]&&Rr.createElement(Kx,{style:{...q,top:400},ref:w},a(kH(h,V),!0)),I===z3&&Rr.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(zo,{...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 f(h,g){g&&(d=mr.createElement(h,{},d))}return f("strong",a),f("u",r),f("del",n),f("code",t),f("mark",e),f("kbd",o),f("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:f,children:h,ellipsis:g,editable:v,copyable:y,actions:x,component:w,title:k,onMouseEnter:F,onMouseLeave:C,...D}=e,[S]=Jd("Text"),A=mr.useRef(null),I=mr.useRef(null),[j,$,N,P]=BH(r,o,l,c,e),O=xr(D,SH),[V,H]=P3(v),[q,L]=wr(!1,H.editing),{triggerType:R=["icon"]}=H,W=ot=>{ot&&H.onStart?.(),L(ot)},z=ame(q);er(()=>{!q&&z&&I.current?.focus()},[q]);let Q=ot=>{ot?.preventDefault(),W(!0)},K=ot=>{H.onChange?.(ot),W(!1)},Z=()=>{H.onCancel?.(),W(!1)},[T,U]=P3(y),{placement:X="end"}=x??{},{copied:Y,copyLoading:re,onClick:J}=eme({copyConfig:U,children:h}),[se,me]=mr.useState(!1),[le,he]=mr.useState(!1),[ae,ce]=mr.useState(!1),[ye,Te]=mr.useState(!1),[De,ke]=mr.useState(!0),[Ce,Le]=P3(g,{expandable:!1,symbol:ot=>ot?S?.collapse:S?.expand}),[$e,Be]=wr(Le.defaultExpanded||!1,Le.expanded),Me=Ce&&(!$e||Le.expandable==="collapsible"),{rows:Ve=1}=Le,qe=mr.useMemo(()=>Me&&(Le.suffix!==void 0||Le.onEllipsis||Le.expandable||V||T),[Me,Le,V,T]);er(()=>{Ce&&!qe&&(me(F5("webkitLineClamp")),he(F5("textOverflow")))},[qe,Ce]);let[Ie,Pe]=mr.useState(Me),Je=mr.useMemo(()=>qe?!1:Ve===1?le:se,[qe,Ve,se,le]);er(()=>{Pe(Je&&Me)},[Je,Me]);let gt=ome(Le.tooltip,H.text,h),et=Ie&&!!gt.title,Ue=Me&&(Ie?et&&ye:ae),Fe=Me&&Ve===1&&Ie,_e=Me&&Ve>1&&Ie,dt=(ot,vt)=>{Be(vt.expanded),Le.onExpand?.(ot,vt)},[at,Ge]=mr.useState(0),[je,rt]=zm(!1),Bt=mr.useRef(!1),It=({offsetWidth:ot})=>{Ge(ot)},Gr=ot=>{ce(ot),ae!==ot&&Le.onEllipsis?.(ot)},Ht=mr.useCallback(()=>{let ot=A.current;if(Ce&&et&&ot){let vt=cme(ot);Te(Re=>Re===vt?Re:vt)}},[Ce,et]);mr.useEffect(()=>{Bt.current&&Ht()},[Ht,h,_e,De,at]),mr.useEffect(()=>{let ot=A.current;if(typeof IntersectionObserver>"u"||!ot||!et||!Me)return;let vt=new IntersectionObserver(()=>{ke(!!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(W3)},[Ce,Ie,k,gt.title,Ue,H.text]);if(q)return mr.createElement(Vpe,{value:H.text??(typeof h=="string"?h:""),onSave:K,onCancel:Z,onEnd:H.onEnd,prefixCls:N,className:n,style:a,direction:P,component:w,maxLength:H.maxLength,autoSize:H.autoSize,enterIcon:H.enterIcon,classNames:j,styles:$});let Kt=()=>{let{expandable:ot,symbol:vt}=Le;return ot?mr.createElement("button",{type:"button",key:"expand",className:te(`${N}-${$e?"collapse":"expand"}`,j.action),style:$.action,onClick:Re=>dt(Re,{expanded:!$e}),"aria-label":$e?S.collapse:S?.expand},Er(vt)?vt($e):vt):null},Ft=()=>{if(!V)return;let{icon:ot,tooltip:vt,tabIndex:Re}=H,Ye=Hr(vt)[0]||S?.edit,it=typeof Ye=="string"?Ye:"";return R.includes("icon")?mr.createElement(zo,{key:"edit",title:vt===!1?"":Ye},mr.createElement("button",{type:"button",ref:I,className:te(`${N}-edit`,j.action),style:$.action,onClick:Q,"aria-label":it,tabIndex:Re},ot||mr.createElement(M3,{role:"button"}))):null},ar=()=>T?mr.createElement(fme,{key:"copy",...U,prefixCls:N,copied:Y,locale:S,onCopy:J,loading:re,iconOnly:!or(h),className:j.action,style:$.action}):null,Cr=ot=>{let vt=ot&&Kt(),Re=Ft(),Ye=ar();return!vt&&!Re&&!Ye?null:mr.createElement("span",{key:"operations",className:te(`${N}-actions`,j.actions,{[`${N}-actions-start`]:X==="start"}),style:$.actions,onMouseEnter:()=>rt(!0,!0),onMouseLeave:()=>rt(!1,{ms:500})},vt,Re,Ye)},Ot=ot=>[ot&&!$e&&mr.createElement("span",{"aria-hidden":!0,key:"ellipsis"},yme),Le.suffix];return mr.createElement(ka,{onResize:It,disabled:!Me},ot=>mr.createElement(vme,{tooltipProps:gt,enableEllipsis:Me,isEllipsis:Ue,disabled:je},mr.createElement(IH,{onMouseEnter:vt=>{Bt.current=!0,Ht(),F?.(vt)},onMouseLeave:vt=>{Bt.current=!1,C?.(vt)},className:te({[`${N}-${d}`]:d,[`${N}-disabled`]:f,[`${N}-ellipsis`]:Ce,[`${N}-ellipsis-single-line`]:Fe,[`${N}-ellipsis-multiple-line`]:_e,[`${N}-link`]:w==="a"},n),classNames:j,styles:$,prefixCls:N,style:{...a,WebkitLineClamp:_e?Ve:void 0},component:w,ref:ln(ot,A,t),direction:P,onClick:R.includes("text")?Q:void 0,"aria-label":$r?.toString(),title:k,...O},mr.createElement(mme,{enableMeasure:Me&&!Ie,text:h,rows:Ve,width:at,onEllipsis:Gr,expanded:$e,measureDeps:[X],miscDeps:[Y,$e,re,V,T,X,S].concat(Xr(SH.map(vt=>e[vt])))},(vt,Re)=>bme(e,mr.createElement(mr.Fragment,null,X==="start"?Cr(Re):null,vt.length>0&&Re&&!$e&&$r?mr.createElement("span",{key:"show-content","aria-hidden":!0},vt):vt,Ot(Re),X==="start"?null:Cr(Re)))))))}),Yx=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(Yx,{...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(Yx,{ref:t,...n,component:"div"},r)}),Cme=kme,q3=B(_()),Sme=q3.forwardRef((e,t)=>{let{ellipsis:r,children:n,...a}=e,o=q3.useMemo(()=>Ct(r)?xr(r,["expandable","rows"]):r,[r]);return q3.createElement(Yx,{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(Yx,{ref:t,...a,component:o},n)}),$me=Ame,hb=ume;hb.Text=Fme;hb.Link=Eme;hb.Title=$me;hb.Paragraph=Cme;var zt=hb;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 NH(e,t){let r=ou(e,t);return e==="pi"&&(t==="sdk"||t==="core")?r:`${r} CLI`}var _me=__wandCssTextPool[10];function PH(){Sa("wand-avatar-editor-styles",_me)}var Ba=B(_(),1),He=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:f="idle"}){let h=_H(e,t),g=t===void 0?e.agents?.[0]?.engine:r,v=h?NH(h,g):"",y={sm:36,md:48,lg:56,xl:88,chat:48,composer:72}[n],x=y<=36?14:y>=56?20:18,w=Hx(e),k=w?null:Ux(e,y);return(0,He.jsx)(sr,{children:(0,He.jsx)(pi,{className:`wand-team-avatar wand-employee-avatar ${a}`.trim(),"data-size":n,title:e.name,offset:[0,y-x/2],count:h?(0,He.jsx)("span",{role:"img","aria-label":v,title:v,className:"wand-employee-avatar-provider",children:(0,He.jsx)(fi,{size:x,shape:"square",icon:h==="pi"&&(g==="sdk"||g==="core")?(0,He.jsx)(Ff,{style:{width:14,height:14}}):(0,He.jsx)(Js,{provider:h})})}):void 0,children:w?o==="static"?(0,He.jsx)("span",{style:{position:"relative",display:"inline-flex"},children:(0,He.jsx)(l3,{config:w,size:y})}):(0,He.jsx)(jh,{config:w,size:y,speaking:l,thinking:c,loading:d,fileActivity:f}):(0,He.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,He.jsx)(fi,{shape:"square",size:y,src:k?.src,style:k?.style,icon:k?.icon}),o==="static"?null:d||c?(0,He.jsx)(Mh,{}):null]})})})}var Nme={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 Pme({field:e,id:t}){return e==="color"?(0,He.jsx)("span",{className:"wand-avatar-color",style:{background:Ic.find(r=>r.id===t)?.color}}):e==="shape"?(0,He.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:(0,He.jsx)("path",{d:Nme[t]})}):t==="none"?(0,He.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,He.jsx)("circle",{cx:"12",cy:"12",r:"8",fill:"none"}),(0,He.jsx)("path",{d:"M6 18L18 6",fill:"none"})]}):e==="glasses"?(0,He.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",style:{color:t==="gold"?"#9b7135":"currentColor"},children:[(0,He.jsx)("circle",{cx:"6.5",cy:"12",r:"4.5",fill:"none"}),(0,He.jsx)("circle",{cx:"17.5",cy:"12",r:"4.5",fill:"none"}),(0,He.jsx)("path",{d:"M11 12h2M2 10H0M22 10h2",fill:"none"})]}):(0,He.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:t==="beanie"?(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)("path",{d:"M5 15C5 3 19 3 19 15Z"}),(0,He.jsx)("rect",{x:"4",y:"15",width:"16",height:"4",rx:"1"}),(0,He.jsx)("circle",{cx:"12",cy:"3",r:"2"})]}):(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)("path",{d:"M3 13C0 4 21 3 22 11C22 16 6 18 3 13Z"}),(0,He.jsx)("path",{d:"M7 17h11M14 5l1-3",fill:"none"})]})})}function Zx({field:e,label:t,options:r,config:n,onChange:a,disabled:o}){let l=Ba.useId();return(0,He.jsxs)("fieldset",{className:"wand-avatar-options",disabled:o,children:[(0,He.jsxs)("legend",{children:[t,(0,He.jsx)("span",{children:r.find(c=>c.id===n[e])?.label})]}),(0,He.jsx)("div",{className:"wand-avatar-option-row",children:r.map(c=>(0,He.jsxs)("label",{className:"wand-avatar-option","data-selected":n[e]===c.id,children:[(0,He.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,He.jsx)("span",{className:"wand-avatar-option-mark",children:(0,He.jsx)(Pme,{field:e,id:c.id})}),(0,He.jsx)("span",{className:"wand-avatar-option-name",children:c.label})]},c.id))})]})}function Rme({avatar:e,name:t,employeeId:r="",disabled:n,onChange:a,onBusyChange:o}){let l={id:r||"employee-draft",name:t,avatar:e},c=Ba.useRef(null),d=Ba.useRef(null),f=Ba.useRef(null),[h,g]=Ba.useState(!1),[v,y]=Ba.useState(!1),[x,w]=Ba.useState(()=>db(l)??cb(l)),[k,F]=Ba.useState(""),[C,D]=Ba.useState(!1),[S,A]=Ba.useState(!1),I=Ba.useRef(0),j=Ba.useRef(e),$=n||C;Ba.useEffect(()=>{PH()},[]),Ba.useEffect(()=>()=>{++I.current},[]),Ba.useEffect(()=>{o?.(C)},[C,o]),Ba.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]),Ba.useEffect(()=>{if(v){let q=requestAnimationFrame(()=>f.current?.querySelector("input:checked")?.focus());return()=>cancelAnimationFrame(q)}},[v]);let N=()=>{y(!1),A(!1),c.current?.focus({preventScroll:!0})};zn(v,N);let P=()=>{g(!1),F(""),j.current=e,w(db(l)??cb(l)),y(!0)},O=()=>{g(!1),F(""),d.current?.click()},V=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 R=++I.current;u3(L,jH).then(W=>{R===I.current&&(y(!1),A(!1),a(W))}).catch(W=>{R===I.current&&F(W instanceof Error?W.message:"\u56FE\u7247\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(()=>{R===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,He.jsxs)("section",{className:"wand-avatar-editor","aria-label":"\u5458\u5DE5\u5934\u50CF",children:[(0,He.jsxs)(Xe,{align:"center",gap:10,className:"wand-avatar-editor-summary",children:[(0,He.jsx)(ol,{open:h&&!$,onOpenChange:g,align:"start",ariaLabel:"\u5934\u50CF\u64CD\u4F5C",trigger:(0,He.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,He.jsx)(jc,{employee:l,provider:"",size:"lg"}),(0,He.jsx)("span",{className:"wand-avatar-edit-mark",children:(0,He.jsx)(Ae,{name:"edit",size:10})})]}),children:(0,He.jsxs)(Xe,{vertical:!0,gap:2,children:[(0,He.jsxs)(Ne,{kind:"ghost",onClick:O,children:[(0,He.jsx)(Ae,{name:"image",size:14}),"\u4E0A\u4F20\u56FE\u7247"]}),(0,He.jsx)(Ne,{kind:"ghost",onClick:P,children:"\u634F\u8138"})]})}),(0,He.jsxs)(Xe,{vertical:!0,gap:2,style:{flex:1,minWidth:0},children:[(0,He.jsx)(zt.Text,{children:"\u5934\u50CF"}),(0,He.jsx)(zt.Text,{type:"secondary",className:"wand-avatar-editor-caption",children:C?"\u6B63\u5728\u5904\u7406\u56FE\u7247\u2026":H})]}),(0,He.jsx)(Ne,{kind:"ghost",size:"small",disabled:$,onClick:P,children:"\u634F\u8138"}),(0,He.jsx)(Ne,{kind:"ghost",size:"small",disabled:$,onClick:O,children:"\u4E0A\u4F20"}),e?(0,He.jsx)(Ne,{kind:"ghost",size:"small",disabled:$,onClick:()=>{N(),F(""),a("")},children:"\u6062\u590D\u9ED8\u8BA4"}):null]}),(0,He.jsx)(zt.Text,{type:"secondary",className:"wand-avatar-upload-hint",children:"PNG\u3001JPEG \u6216 WebP \xB7 \u6700\u5927 10 MB"}),(0,He.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:V}),v?(0,He.jsxs)("div",{ref:f,className:"wand-avatar-sculpt",role:"region","aria-label":"\u634F\u8138",onKeyDown:q=>{q.key==="Escape"&&(q.preventDefault(),q.stopPropagation(),N())},children:[(0,He.jsxs)("div",{className:"wand-avatar-sculpt-preview",children:[(0,He.jsx)(jh,{config:x,size:156,interactive:!0,speaking:S}),(0,He.jsx)(zt.Text,{type:"secondary",children:"\u5B9E\u65F6\u9884\u89C8"}),(0,He.jsx)(Ne,{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,He.jsxs)("div",{className:"wand-avatar-sculpt-controls",children:[(0,He.jsx)(Zx,{field:"shape",label:"\u9020\u578B",options:ib,config:x,disabled:$,onChange:w}),(0,He.jsx)(Zx,{field:"color",label:"\u989C\u8272",options:Ic,config:x,disabled:$,onChange:w}),(0,He.jsx)(Zx,{field:"glasses",label:"\u773C\u955C",options:ob,config:x,disabled:$,onChange:w}),(0,He.jsx)(Zx,{field:"hat",label:"\u5E3D\u5B50",options:sb,config:x,disabled:$,onChange:w})]}),(0,He.jsxs)(Xe,{className:"wand-avatar-sculpt-footer",align:"center",wrap:!0,gap:8,justify:"space-between",children:[(0,He.jsx)(zt.Text,{type:"secondary",children:"\u4FDD\u5B58\u5458\u5DE5\u540E\u751F\u6548"}),(0,He.jsxs)(Xe,{gap:6,children:[(0,He.jsx)(Ne,{kind:"ghost",disabled:$,onClick:N,children:"\u53D6\u6D88"}),(0,He.jsx)(Ne,{kind:"primary",disabled:$,onClick:()=>{a(o3(x)),N()},children:"\u4F7F\u7528\u8FD9\u4E2A\u5934\u50CF"})]})]})]}):null,k?(0,He.jsx)(La,{type:"error",showIcon:!0,role:"alert",title:k}):null]})}var Tc=B(_(),1);function Ph(e,t={}){let r=null,n=null,a=0,o=0,l=!1,c=new Set,d=()=>{for(let h of[...c])h()},f=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 x=h?.maxAgeMs;if(x===void 0||Date.now()-o<=x)return Promise.resolve(r)}if(n)return n;let g=a,v;try{v=e()}catch(x){v=Promise.reject(x)}let y;return y=v.then(x=>(n===y&&(n=null),g!==a?r??x:(o=Date.now(),l=!1,f(x),x)),x=>{throw n===y&&(n=null),x}),n=y,y},publish(h){a++,n=null,f(h)},invalidate(){a++,n=null,r=null,o=0,l=!1},stale(){l=!0},subscribe(h){return c.add(h),()=>{c.delete(h)}}}}function Ome(e,t){if(i3(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??ab:t[l]});return o}if(n3(e))return{agents:t.agents??e.agents,...t.systemSessionLimit!==void 0?{systemSessionLimit:t.systemSessionLimit}:{},...t.maxConcurrentTasks!==void 0?{maxConcurrentTasks:t.maxConcurrentTasks??ab}:{}};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??ab),r}var U3=new Set,zme=new Set,MH=new Map;function gb(e){let t=MH.get(e);if(!t){let r=e?"?includeArchived=1":"";t=Ph(async()=>(await yt(`/api/silicon-employees${r}`,{cache:"no-store"})).employees??[]),MH.set(e,t)}return t}function Lme(){gb(!1).invalidate(),gb(!0).invalidate();for(let e of zme)e()}function TH(e=!1){return gb(e).peek()}function V3(e){return gb(!1).peek()?.find(t=>t.id===e)??null}function gu(e){Lme();for(let t of U3)t(e)}function Jx(e){return U3.add(e),()=>{U3.delete(e)}}var RH={list(e){return gb(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",hn({expectation:e}))).draft},async create(e){let t=await yt("/api/silicon-employees",hn(e));return gu(t.id),t},async update(e,t){let r=await yt(`/api/silicon-employees/${encodeURIComponent(e)}`,hn(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 G3(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),f=Tc.useRef(!1),h=Tc.useRef(a),g=Tc.useRef(0);h.current=a;let v=Tc.useCallback(()=>{if(!f.current||!h.current)return;let y=++g.current,x=()=>f.current&&h.current&&g.current===y;l(!0),RH.list({includeArchived:t}).then(w=>{x()&&(n(w),d(null))}).catch(w=>{x()&&d(w instanceof Error?w.message:String(w))}).finally(()=>{x()&&l(!1)})},[t]);return Tc.useEffect(()=>{if(!a){l(!1);return}f.current=!0,v();let y=Jx(v);return()=>{f.current=!1,g.current++,y()}},[v,a]),{employees:r,loading:o,error:c,reload:v}}var Df=Ph(async()=>yt("/api/config",{credentials:"same-origin"}));function vb(){return Df.peek()}function bb(){return Df.load()}function K3(e){return Df.subscribe(e)}function Hme(e){let t=Df.peek();if(!t){Df.invalidate();return}Df.publish({...t,...e})}function X3(){Df.invalidate()}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&typeof t=="object"&&Hme(t)});function J3(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 Ume(e,t){return e.messageId??`${e.requestId??""}:${e.role}:${e.createdAt??""}:${e.author?.id??""}:${t}`}function Q3(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleDateString([],{year:"numeric",month:"long",day:"numeric"}):""}function Vme(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):""}function Gme(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&&Q3(e.createdAt)===Q3(t.createdAt)}function Kme(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 e7(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 Y3=new Set;function t7(e){for(let t of Y3)t(e)}function Xme(e){return Y3.add(e),()=>{Y3.delete(e)}}function Qme(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 UH(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,f=new Set,h=null;for(let v=a+1;v<t.length;v++){let y=t[v];if(c(y))for(let x of y.content??[])x.__subagent||(x.type==="tool_result"&&(f.add(x.tool_use_id),h=null),y.role==="assistant"&&(x.type==="tool_use"?(d.set(x.id,x),h=null):!y.completedAt&&x.type==="text"&&x.text.trim()?h={kind:"output",label:"\u6B63\u5728\u8F93\u51FA"}:!y.completedAt&&x.type==="thinking"&&(h={kind:"thinking",label:"\u6B63\u5728\u601D\u8003"})))}let g=[...d.values()].reverse().find(v=>!f.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:Qme(g)}:h}var VH=6e4,r7=new Set(["failed","stopped","exited","done"]),Yme=new Set(["waiting-input","waiting_input","waiting_user","awaiting_approval"]),Zme=new Set(["running","thinking","waiting-input","waiting_input","awaiting_approval","waiting_user"]);function Af(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}function t2(e){return e?Af(e.structuredState?.turnStartedAt)??Af(e.turnStartedAt):null}function Jme(e){if(!e)return null;let t=e.structuredState?.lastActivityAt;return Af(t)??Af(e.lastActivityAt)??Af(e.lastActivityAt)}function GH(e){if(!e||e.archived)return!1;let t=e;if(t.archived||r7.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 KH(e){return!e||e.archived||r7.has(e.status??"")?!1:!!e.structuredState?.inFlight||e.ptyRunning===!0}function $f(e,t=!1){return!e||e.archived||r7.has(e.status??"")?"idle":e.permissionBlocked||e.pendingEscalation||Yme.has(e.status??"")?"waiting":(t?GH(e):KH(e))?!t&&UH(e)?.kind==="waiting"?"waiting":"executing":(e.queuedMessages?.length??0)>0||t&&e.status==="starting"?"received":"idle"}function XH(e,t,r=!1){if(!(r?GH(e):KH(e)))return 0;let n=Jme(e);return n===null?0:Math.max(0,t-n)}function wb(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 OH={received:"\u5DF2\u63A5\u6536",executing:"\u6B63\u5728\u6267\u884C",waiting:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165",idle:""};function xb(e,t=!1){let r=$f(e,t),n={phase:r,stage:r,label:OH[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":OH.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=UH(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=xb(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?Af(e?.turnStartedAt)??Af(e?.startedAt):t2(e);o!==null&&a.push(`\u5DF2\u8FD0\u884C ${wb(Math.max(0,t-o))}`);let l=XH(e,t,r);return l>=VH&&a.push(`\u5DF2 ${wb(l)}\u65E0\u65B0\u6D88\u606F`),a.join(" \xB7 ")}var zH=B(_(),1);function the(e){let[t,r]=zH.useState(()=>Date.now());return zH.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 e2=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 Eb(e){let t=e.activity,r=e.runMode===!0,n=xb(t,r),a=the(n.active&&n.phase!=="received"),o=ca(),l=ehe(t,a,r);if(!l)return null;let c=n.phase==="waiting",d=n.active&&n.phase!=="received"&&XH(t,a,r)>=VH;return(0,e2.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,e2.jsx)("span",{className:`chat-running-pulse${o||!n.active?" is-instant":""}`,"data-phase":n.stage,"aria-hidden":"true",children:(0,e2.jsx)(Ae,{name:rhe[n.stage],size:13})}),(0,e2.jsx)("span",{className:"chat-running-text",children:l})]})}var LH=B(_(),1),Z3=new Set,sl={name:"",avatar:"",loaded:!1};function QH(e){if(!(e.name===sl.name&&e.avatar===sl.avatar&&e.loaded===sl.loaded)){sl=e;for(let t of Z3)t()}}function n7(e){let t=f3(e);return{name:t?.name??"",avatar:t?.avatar??"",loaded:!0}}function YH(){let e=vb();e&&QH(n7(e.userProfile))}var HH=vb();HH&&(sl=n7(HH.userProfile));K3(YH);function nhe(){return bb().then(YH,()=>{})}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{vb()||QH(n7(e.detail?.userProfile))});var yb={subscribe(e){return Z3.add(e),()=>{Z3.delete(e)}},getSnapshot(){return sl},refresh(){nhe()}};function Rh(){let e=LH.useSyncExternalStore(yb.subscribe,yb.getSnapshot,yb.getSnapshot);return LH.useEffect(()=>{yb.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 Bf=B(Ee(),1);function a7({title:e,members:t,size:r=48}){let n=Rh(),a=Math.ceil(Math.sqrt(t.length+1)),o=(r-4-(a-1))/a;return(0,Bf.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,Bf.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",children:(0,Bf.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,Bf.jsx)(jc,{employee:{id:"user",name:n.name||"\u6211",avatar:n.avatar},provider:"",size:"sm"})})}),t.map(l=>(0,Bf.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",title:l.name,children:(0,Bf.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,Bf.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 i7(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":wb(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 r2=null;function che(){return r2||(r2=lhe(uhe())),r2}function dhe(){return r2}var Ho=B(Ee(),1);function o7({usage:e,activity:t,employeeName:r,legacyStatus:n=!1,showName:a=!0}){let o=ohe(e);return!r&&!o.length&&$f(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)(Eb,{activity:t}),o.length?(0,Ho.jsx)(ol,{side:"top",ariaLabel:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF\u8BE6\u60C5",trigger:(0,Ho.jsx)(Ne,{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 fhe(){let[e,t]=JH.useState(()=>dhe()??"pending");return JH.useEffect(()=>{e==="pending"&&t(che())},[e]),e}function s7({employee:e,thinking:t=!1,fileActivity:r="idle"}){let n=fhe(),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)(Mh,{}):null]})}var vu=B(_(),1),phe=B(tr(),1),mhe=B(Ee(),1);function l7({owner:e,input:t,surface:r,phase:n,pending:a,locked:o,forceExpanded:l,onDismiss:c,popupOwners:d=[]}){let[f,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 x=f||g||!!o||!!l||n==="sending",w=vu.useRef(x);w.current=x,vu.useEffect(()=>{let F=t(),C=r();if(!F||!C)return;let D=new Set,S=V=>{if(!(V.target instanceof Node)||!C.contains(V.target))return;let{owner:H,active:q}=V.detail;q?D.add(H):D.delete(H)},A=()=>{h(!0)},I=()=>{v(!1),h(!0)},j=V=>{let H=y.current;D.size||H.locked||["sending","failed","unknown"].includes(H.phase)||(h(!1),F.blur(),H.onDismiss?.(V))},$=V=>V instanceof Node&&(C.contains(V)||y.current.popupOwners.some(H=>wf(V,H))),N=V=>{$(V.target)||j("outside")},P=V=>{V.key!=="Escape"||!w.current||V.defaultPrevented||V.isComposing||yf()||!C.contains(document.activeElement)||$x(y.current.popupOwners)||(V.preventDefault(),V.stopPropagation(),j("escape"))},O=()=>{yf()||j("back")};return document.addEventListener("wand-composer-focus-borrow",S),F.addEventListener("focus",A),F.addEventListener("input",I),document.addEventListener("pointerdown",N),document.addEventListener("keydown",P,!0),window.addEventListener("popstate",O),()=>{document.removeEventListener("wand-composer-focus-borrow",S),F.removeEventListener("focus",A),F.removeEventListener("input",I),document.removeEventListener("pointerdown",N),document.removeEventListener("keydown",P,!0),window.removeEventListener("popstate",O)}},[e]);let k=vu.useRef(e);return k.current=e,vu.useLayoutEffect(()=>{let F=t();F&&(F.tabIndex=x?0:-1)},[x,e]),{expanded:x,open:()=>{(0,phe.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 u7({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)(Ne,{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 c7(e,t=[]){if($f(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 d7=null,n2=new Set,kb={open(e,t){d7={...e,trigger:t},n2.forEach(r=>r())},close(){d7=null,n2.forEach(e=>e())}},f7={subscribe(e){return n2.add(e),()=>{n2.delete(e)}},getSnapshot(){return d7},getServerSnapshot(){return null}};function Cb(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 p7=new Set;function ho(){for(let e of p7)e()}function vs(e){return p7.add(e),()=>{p7.delete(e)}}function a2(e){return ho(),e}function _c(e){return At(e).then(a2)}function m7(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=Nh(e),r=Ke(t.taskId).trim(),n=Ke(t.branch).trim(),a=Ke(t.path).trim();if(!r||!n||!a)return null;let o=Array.isArray(t.commits)?t.commits.flatMap(l=>{let c=Nh(l),d=Ke(c.hash).trim();return d?[{hash:d,shortHash:Ke(c.shortHash,d.slice(0,7)),subject:Ke(c.subject)}]:[]}):[];return{taskId:r,taskName:Ke(t.taskName,n),taskStatus:t.taskStatus==="done"?"done":"active",branch:n,path:a,baseRef:Ke(t.baseRef),state:hhe(t.state),actionable:t.actionable===!0,reason:Ke(t.reason),aheadCount:m7(t.aheadCount),hasUncommittedChanges:t.hasUncommittedChanges===!0,hasConflicts:t.hasConflicts===!0,commits:o}}function vhe(e){let t=Nh(e);return{workspaceId:Ke(t.workspaceId),repoRoot:Ke(t.repoRoot),targetBranch:Ke(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",Cb(()=>this.readTaskGroups()))}preloadTaskGroups(){this.startupGroups.preload()}clearPreload(){this.startupGroups.clear()}async list(){let e=await At(await this.fetchImpl("/api/workspaces",{credentials:"same-origin"})),t=Array.isArray(e)?e:e.workspaces;return Array.isArray(t)?t.map(r=>{let n=Nh(r);return{...r,sessionCount:m7(n.sessionCount),worktreeCount:m7(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 At(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 At(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 At(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 At(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async renameDirectory(e,t){await At(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 At(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 At(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 At(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 At(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 At(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 At(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}catch{throw r}}}async conversationOrganizationJobByToken(e){return(await At(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async conversationOrganizationJob(e){return(await At(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,a2(n.result)),n.status!=="running")return n;await new Promise(l=>setTimeout(l,800)),n=(await At(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(n.id)}`,{credentials:"same-origin",signal:r}))).job}}async cancelConversationOrganization(e){await At(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 At(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 At(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 At(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 At(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 At(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 h7(){return h7=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},h7.apply(this,arguments)}var xhe=(e,t)=>tq.createElement(Gt,h7({},e,{ref:t,icon:whe})),Ehe=tq.forwardRef(xhe),g7=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 v7(){return v7=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},v7.apply(this,arguments)}var She=(e,t)=>rq.createElement(Gt,v7({},e,{ref:t,icon:Che})),Fhe=rq.forwardRef(She),b7=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 y7(){return y7=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},y7.apply(this,arguments)}var $he=(e,t)=>nq.createElement(Gt,y7({},e,{ref:t,icon:Ahe})),Bhe=nq.forwardRef($he),Oh=Bhe;var w7=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 C7(e){let t=(0,w7.useCallback)(n=>bs.subscribe(e,n),[e]),r=(0,w7.useCallback)(()=>bs.getSnapshot(e),[e]);return(0,w7.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,f=l===0||typeof l=="string"&&Number.parseFloat(l)===0,h=te(`${r}-panel`,{[`${r}-panel-hidden`]:f,[`${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&&f)&&a)}),The=()=>null,jhe=The,qo=B(_()),iq=B(_());function _he(e){if(Ct(e))return{...e,showCollapsibleIcon:e.showCollapsibleIcon===void 0?"auto":e.showCollapsibleIcon};let t=!!e;return{start:t,end:t,showCollapsibleIcon:"auto"}}function Nhe(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 Phe=Nhe,Rhe=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 Ohe(e,t,r){return Rhe.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:f=!0,min:h,collapsible:g}=o,{resizable:v=!0,min:y,collapsible:x}=l,w=f&&v&&(c!==0||!h)&&(d!==0||!y),k=!!g.end&&c>0,F=!!x.start&&d===0&&c>0,C=k||F,D=!!x.start&&d>0,S=!!g.end&&c===0&&d>0,A=D||S,I=oq({collapsible:k,showCollapsibleIcon:g.showCollapsibleIcon},{collapsible:F,showCollapsibleIcon:x.showCollapsibleIcon}),j=oq({collapsible:D,showCollapsibleIcon:x.showCollapsibleIcon},{collapsible:S,showCollapsibleIcon:g.showCollapsibleIcon});n[a]={resizable:w,startCollapsible:!!(r?A:C),endCollapsible:!!(r?C:A),showStartCollapsibleIcon:r?j:I,showEndCollapsibleIcon:r?I:j}}return n},[t,e,r])}var x7=B(_()),If=B(_());function zhe(e,t,r){let n=e.map((x,w)=>x===0?0:t[w]??0),a=e.map((x,w)=>x===0?0:r[w]??1),o=n.some((x,w)=>x>a[w]),l=n.reduce((x,w)=>x+w,0),c=a.reduce((x,w)=>x+w,0);if(o||l>1||c<1)return e;let d=e.map((x,w)=>Math.min(a[w],Math.max(n[w],x))),f=d.reduce((x,w)=>x+w,0);if(f===1)return d;let h=f<1,g=d.map((x,w)=>h?a[w]-x:x-n[w]),v=g.reduce((x,w)=>x+w,0),y=1-f;return d.map((x,w)=>x+y*(g[w]/v))}function Lhe(e,t,r){let n=0,a=[];e.forEach((x,w)=>{x===void 0?a.push(w):n+=x});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 x=1/n,w=e.map(k=>k*x);return zhe(w,t,r)}if(o<0){let x=1/n;return e.map(w=>w===void 0?0:w*x)}let c=0,d=0,f=0,h=1;for(let x of a){let w=t[x]||0,k=r[x]||1;c+=w,d+=k,f=Math.max(f,w),h=Math.min(h,k)}if(c>1&&d<1){let x=1/l;return e.map(w=>w===void 0?x:w)}let g=o/l;if(f<=g&&g<=h)return e.map(x=>x===void 0?g:x);let v=Xr(e),y=o-c;for(let x=0;x<l;x+=1){let w=a[x],k=t[w]||0,F=r[w]||1;v[w]=k;let C=F-k,D=Math.min(C,y);v[w]+=D,y-=D}return v}function i2(e){return Number(e.slice(0,-1))/100}function E7(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]=If.default.useState(()=>e.map(y=>y.defaultSize)),d=If.default.useMemo(()=>r.some(Qr)?r:l,[n,l,r]),f=If.default.useMemo(()=>e.map(y=>E7(y.min)?i2(y.min):(y.min||0)/a),[e,a]),h=If.default.useMemo(()=>e.map(y=>E7(y.max)?i2(y.max):(y.max||a)/a),[e,a]),g=If.default.useMemo(()=>{let y=[];for(let x=0;x<n;x+=1){let w=d[x];if(E7(w))y[x]=i2(w);else if(w||w===0){let k=Number(w);Number.isNaN(k)||(y[x]=k/a)}else y[x]=void 0}return Lhe(y,f,h)},[n,d,a,f,h]),v=If.default.useMemo(()=>g.map(o),[g,a]);return[If.default.useMemo(()=>t?v:d,[v,d,t]),v,g,f,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 f(k,F){return typeof k=="string"?d(i2(k)):k??F}let[h,g]=x7.useState([]),v=x7.useRef([]),[y,x]=x7.useState(null),w=()=>r.map(d);return[k=>{g(w()),x({index:k,confirmed:!1})},(k,F)=>{let C=null;if((!y||!y.confirmed)&&F!==0){if(F>0)C=k,x({index:k,confirmed:!0});else for(let O=k;O>=0;O-=1)if(h[O]>0&&t[O].resizable){C=O,x({index:O,confirmed:!0});break}}let D=C??y?.index??k,S=Xr(h),A=D+1,I=f(l[D][0],0),j=f(l[A][0],0),$=f(l[D][1],c),N=f(l[A][1],c),P=F;return S[D]+P<I&&(P=I-S[D]),S[A]-P<j&&(P=S[A]-j),S[D]+P>$&&(P=$-S[D]),S[A]-P>N&&(P=S[A]-N),S[D]+=P,S[A]-=P,a(S),S},()=>{x(null)},(k,F)=>{let C=w(),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,N=f(l[S][0],0),P=f(l[S][1],c),O=f(l[A][0],0),V=f(l[A][1],c),H=Math.max(N,$-V),q=Math.min(P,$-O),L=O||(q-H)/2,R=v.current[k],W=$-R;R&&R<=V&&R>=O&&W<=P&&W>=N?(C[A]=R,C[S]=W):(C[S]-=L,C[A]+=L)}return a(C),C},y?.index]}var Ha=B(_()),k7=e=>Ra(e)&&Number.isFinite(e)?Math.round(e):0,Whe=300,Uhe=e=>{let{prefixCls:t,rootPrefixCls:r,vertical:n,index:a,active:o,ariaNow:l,ariaMin:c,ariaMax:d,resizable:f,draggerIcon:h,draggerStyle:g,draggerClassName:v,collapsibleIcon:y,startCollapsible:x,endCollapsible:w,onDraggerDoubleClick:k,onOffsetStart:F,onOffsetUpdate:C,onOffsetEnd:D,onCollapse:S,lazy:A,containerSize:I,showStartCollapsibleIcon:j,showEndCollapsibleIcon:$}=e,N=`${t}-bar`,P=(0,Ha.useRef)(0),[O]=pn(r,"splitter"),[V,H]=(0,Ha.useState)(null),[q,L]=(0,Ha.useState)(0),R=n?0:q,W=n?q:0,z=le=>{le.stopPropagation();let he=Date.now(),ae=he-P.current;ae>0&&ae<Whe||(P.current=he,f&&le.currentTarget&&(H([le.pageX,le.pageY]),F(a)))},Q=le=>{if(f&&le.touches.length===1){let he=le.touches[0];H([he.pageX,he.pageY]),F(a)}},K=le=>{let he=I*l/100,ae=he+le,ce=Math.max(0,I*c/100),ye=Math.min(I,I*d/100);return Math.max(ce,Math.min(ye,ae))-he},Z=xt((le,he)=>{let ae=K(n?he:le);L(ae)}),T=xt(()=>{C(a,R,W,!0),L(0),D(!0)}),U=(le,he)=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),S(a,he))},X=le=>{switch(le){case!0:return`${N}-collapse-bar-always-visible`;case!1:return`${N}-collapse-bar-always-hidden`;case"auto":return`${N}-collapse-bar-hover-only`}};er(()=>{if(!V)return;let le={mousemove:he=>{let{pageX:ae,pageY:ce}=he,ye=ae-V[0],Te=ce-V[1];A?Z(ye,Te):C(a,ye,Te)},mouseup:()=>{A?T():D(),H(null)},touchmove:he=>{if(he.touches.length===1){let ae=he.touches[0],ce=ae.pageX-V[0],ye=ae.pageY-V[1];A?Z(ce,ye):C(a,ce,ye)}},touchend:()=>{A?T():D(),H(null)}};for(let[he,ae]of Object.entries(le))window.addEventListener(he,ae);return()=>{for(let[he,ae]of Object.entries(le))window.removeEventListener(he,ae)}},[V,a,A]);let Y={[O("bar-preview-offset")]:`${q}px`},[re,J,se,me]=Ha.default.useMemo(()=>{let le=null,he=null,ae=y?.start!==void 0,ce=y?.end!==void 0;return n?(le=ae?y.start:Ha.default.createElement(g7,null),he=ce?y.end:Ha.default.createElement(b7,null)):(le=ae?y.start:Ha.default.createElement(Oh,null),he=ce?y.end:Ha.default.createElement(lf,null)),[le,he,ae,ce]},[y,n]);return Ha.default.createElement("div",{className:N},A&&Ha.default.createElement("div",{className:te(`${N}-preview`,{[`${N}-preview-active`]:!!q}),style:Y}),Ha.default.createElement("div",{style:g?.default,className:te(`${N}-dragger`,{[`${N}-dragger-disabled`]:!f,[`${N}-dragger-active`]:o,[`${N}-dragger-customize`]:h!==void 0},v?.default,o&&v?.active),onMouseDown:z,onTouchStart:Q,onDoubleClick:()=>k?.(a),role:"separator","aria-disabled":!f,"aria-orientation":n?"horizontal":"vertical","aria-valuenow":k7(l),"aria-valuemin":k7(c),"aria-valuemax":k7(d)},h!==void 0?Ha.default.createElement("div",{className:te(`${N}-dragger-icon`)},h):null),x&&Ha.default.createElement("div",{className:te(`${N}-collapse-bar`,`${N}-collapse-bar-start`,{[`${N}-collapse-bar-customize`]:se},X(j)),role:"button",tabIndex:0,"aria-label":"Toggle start panel",onClick:()=>S(a,"start"),onKeyDown:le=>U(le,"start")},Ha.default.createElement("span",{className:te(`${N}-collapse-icon`,`${N}-collapse-start`)},re)),w&&Ha.default.createElement("div",{className:te(`${N}-collapse-bar`,`${N}-collapse-bar-end`,{[`${N}-collapse-bar-customize`]:me},X($)),role:"button",tabIndex:0,"aria-label":"Toggle end panel",onClick:()=>S(a,"end"),onKeyDown:le=>U(le,"end")},Ha.default.createElement("span",{className:te(`${N}-collapse-icon`,`${N}-collapse-end`)},J)))},Vhe=Uhe,Sb={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},Ghe=e=>{let{componentCls:t,colorFill:r,splitBarDraggableSize:n,splitBarSize:a,splitTriggerSize:o,controlItemBgHover:l,controlItemBgActive:c,controlItemBgActiveHover:d,colorPrimary:f,antCls:h,calc:g}=e,[,v]=pn(h,"splitter"),y=`${t}-bar`,x=`${t}-mask`,w=`${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]:{...pr(e),display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${y}`]:{flex:"none",position:"relative",userSelect:"none",[`${y}-dragger`]:{...Sb,zIndex:1,"&::before":{content:'""',background:l,...Sb},"&::after":{content:'""',background:r,...Sb},[`&:hover:not(${y}-dragger-active)`]:{"&::before":{background:c}},"&-active":{zIndex:2,"&::before":{background:d}},[`&-active${y}-dragger-customize`]:{[`${y}-dragger-icon`]:{color:f}},[`&-disabled${y}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:l}},"&::after":{display:"none"},[`${y}-dragger-icon`]:{display:"none"}},"&-customize":{[`${y}-dragger-icon`]:{...Sb,display:"flex",alignItems:"center",color:r},"&::after":{display:"none"}}},[`${y}-collapse-bar`]:{...Sb,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}},[x]:{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%)"}}}},[w]:{overflow:"auto",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"},"&-transition":{transition:`flex-basis ${e.motionDurationSlow} ${e.motionEaseInOut}`,...af()}}}}},Khe=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=kt("Splitter",Ghe,Khe),Qhe=(e,t)=>{let{prefixCls:r,className:n,classNames:a,collapsible:o,style:l,styles:c,layout:d,orientation:f,vertical:h,children:g,destroyOnHidden:v,draggerIcon:y,collapsibleIcon:x,rootClassName:w,onDraggerDoubleClick:k,onResizeStart:F,onResize:C,onResizeEnd:D,lazy:S}=e,{getPrefixCls:A,direction:I,className:j,style:$,classNames:N,styles:P}=_t("splitter"),O=A("splitter",r),V=A(),H=Yn(O),[q,L]=Xhe(O,H),[R,W]=el(f,h,d),z=I==="rtl",Q=!W&&z,K=Phe(g),[Z,T]=(0,qo.useState)(),U=et=>{let{offsetWidth:Ue,offsetHeight:Fe}=et,_e=W?Fe:Ue;_e!==0&&T(_e)},[X,Y,re,J,se,me]=Hhe(K,Z),le=Ohe(K,Y,Q),[he,ae,ce,ye,Te]=qhe(K,le,re,Z,me,Q),De=xt(et=>{he(et),F?.(Y)}),ke=xt((et,Ue,Fe)=>{let _e=ae(et,Ue);Fe?D?.(_e):C?.(_e)}),Ce=xt(et=>{ce(),et||D?.(Y)}),Le=xt((et,Ue)=>{let Fe=ye(et,Ue);C?.(Fe),D?.(Fe);let _e=Fe.map(dt=>Math.abs(dt)<Number.EPSILON);e.onCollapse?.(_e,Fe)}),$e={...e,vertical:W,orientation:R},Be=lt($),Me=lt(l),[Ve,qe]=jt([N,a],[P,Be,c,Me],{props:$e},{dragger:{_default:"default"}}),Ie=te(O,n,`${O}-${R}`,{[`${O}-rtl`]:z},w,Ve.root,j,L,H,q),Pe=qo.default.useRef(null);qo.default.useImperativeHandle(t,()=>({nativeElement:Pe.current}));let Je=`${O}-mask`,gt=qo.default.useMemo(()=>{let et=[],Ue=0,Fe=K.length;for(let _e=0;_e<Fe;_e+=1)Ue+=re[_e],et.push(Ue);return et},[re,K.length]);return qo.default.createElement(ka,{onResize:U},qo.default.createElement("div",{ref:Pe,style:qe.root,className:Ie},K.map((et,Ue)=>{let Fe={...et,className:te(Ve.panel,et.className),style:{...qe.panel,...et.style}},_e=qo.default.createElement(Mhe,{...Fe,prefixCls:O,size:X[Ue],supportMotion:o?.motion&&Te===void 0,destroyOnHidden:et.destroyOnHidden??v}),dt=null,at=le[Ue];if(at){let Ge=Number.isFinite(gt[Ue-1])?gt[Ue-1]:0,je=Number.isFinite(gt[Ue+1])?gt[Ue+1]:1,rt=Ge+J[Ue],Bt=je-se[Ue+1],It=Ge+se[Ue],Gr=je-J[Ue+1];dt=qo.default.createElement(Vhe,{lazy:S,index:Ue,active:Te===Ue,prefixCls:O,rootPrefixCls:V,vertical:W,resizable:at.resizable,draggerStyle:qe.dragger,draggerClassName:Ve.dragger,draggerIcon:y,collapsibleIcon:o?.icon||x,ariaNow:gt[Ue]*100,ariaMin:Math.max(rt,Bt)*100,ariaMax:Math.min(It,Gr)*100,startCollapsible:at.startCollapsible,endCollapsible:at.endCollapsible,showStartCollapsibleIcon:at.showStartCollapsibleIcon,showEndCollapsibleIcon:at.showEndCollapsibleIcon,onDraggerDoubleClick:k,onOffsetStart:De,onOffsetUpdate:(Ht,$r,Kt,Ft)=>{let ar=W?Kt:$r;Q&&(ar=-ar),ke(Ht,ar,Ft)},onOffsetEnd:Ce,onCollapse:Le,containerSize:Z||0})}return qo.default.createElement(qo.default.Fragment,{key:`split-panel-${Ue}`},_e,dt)}),Ra(Te)&&qo.default.createElement("div",{"aria-hidden":!0,className:te(Je,`${Je}-${R}`)})))},Yhe=qo.default.forwardRef(Qhe),Zhe=Yhe,sq=Zhe;sq.Panel=jhe;var Fb=sq;var Mf=null,An={open:!1,dismissable:!0,context:null,revision:0},o2=new Set;function lq(e,t){An={open:e,dismissable:!0,context:t,revision:An.revision+1};for(let r of o2)r()}function Jhe(e){if(!(!An.open||An.dismissable===e)){An={...An,dismissable:e};for(let t of o2)t()}}var Nc={open(e){let t=e.sessionId.trim();if(!Mf||!t)return!1;if(An.open&&An.context?.sessionId===t)return!0;let r={sessionId:t};return Mf.onOpen(r),lq(!0,r),!0},close(){if(!An.open||!An.context)return;let e=An.context;lq(!1,null),Mf?.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)}},S7={subscribe(e){return o2.add(e),()=>o2.delete(e)},getSnapshot(){return An},getRuntime(){return Mf}};function F7(e){return Mf=e,()=>{Mf===e&&(An.open&&Nc.close(),Mf=null)}}var zh=null,na={open:!1,dismissable:!0,context:null,revision:0},s2=new Set;function uq(e,t){na={open:e,dismissable:!0,context:t,revision:na.revision+1};for(let r of s2)r()}function e0e(e){if(!(!na.open||na.dismissable===e)){na={...na,dismissable:e};for(let t of s2)t()}}var Pc={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||(zh?.onOpen(r),uq(!0,r)),!0},close(){if(!na.open||!na.context)return;let e=na.context;uq(!1,null),zh?.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)}},D7={subscribe(e){return s2.add(e),()=>s2.delete(e)},getSnapshot(){return na},getRuntime(){return zh}};function A7(e){return zh=e,()=>{zh===e&&(na.open&&Pc.close(),zh=null)}}var ys={open:!1,dismissable:!0,revision:0},Lh=null,l2=new Set;function cq(e){ys={open:e,dismissable:!0,revision:ys.revision+1};for(let t of l2)t()}var Tf={open(){return Lh?.onOpen(),cq(!0),!0},close(){ys.open&&(cq(!1),Lh?.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 l2)t()}}},$7={subscribe(e){return l2.add(e),()=>l2.delete(e)},getSnapshot(){return ys},getRuntime(){return Lh}};function B7(e){return Lh=e,()=>{Lh===e&&(Lh=null)}}var Db={open:!1,sessionId:"",revision:0},I7=new Set;function dq(e){Db={...Db,...e,revision:Db.revision+1},I7.forEach(t=>t())}var Ab={open(e=""){return dq({open:!0,sessionId:e}),!0},close(){Db.open&&dq({open:!1})}},M7={subscribe(e){return I7.add(e),()=>I7.delete(e)},getSnapshot(){return Db}};async function jf(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 $b(e){let t=e.trim().replace(/[\\/]+$/,"");return t.split(/[\\/]/).pop()||t||"file"}function Bb(e){let t=e.lastIndexOf(".");return t>0?e.slice(t).toLowerCase():""}function T7(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()||$b(l),type:"file"}))}return{path:r,siblings:a}}function j7(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 Ib(e){return Number.isFinite(e)?Math.max(10,Math.min(22,Math.round(e))):13}function Hh(){return 13}function t0e(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 r0e(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 n0e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"file"}}function _7(e){return e.lang==="markdown"||/\.(md|markdown|mdx)$/i.test(e.name)}function N7(e){return`'${e.replace(/'/g,"'\\''")}'`}var a0e=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"]),i0e=/\/\/[^\n]*|#[^\n]*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\]|\\.)*`|\b(?:0x[\da-fA-F]+|0b[01]+|\d+(?:\.\d+)?)\b|\b[A-Za-z_$][\w$]*\b|[+\-*/%=<>!&|^~?:]+/g;function o0e(e){let t=[],r=0;for(let n of e.matchAll(i0e)){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":a0e.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 s0e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"text"}}function P7(e,t=!1){return`/api/file-raw?${t?"download=1&":""}path=${encodeURIComponent(e)}`}function fq(e,t,r,n){let a=$b(r),o=Aa(t.size,-1),l={message:Ke(t.error,`${n} (HTTP ${e.status})`),status:e.status,size:o>=0?o:void 0,maxSize:Aa(t.maxSize,-1)>=0?Aa(t.maxSize):void 0};return e.status===413&&(l.download={path:r,name:a,url:P7(r,!0),size:l.size}),l}function u2(e,t){let r=da(e)?e:{},n=Ke(r.path,t).trim()||t,a=Ke(r.name,$b(n)),o=s0e(r.kind),l=o==="text"?Ke(r.content):void 0;return{kind:o,path:n,name:a,ext:Ke(r.ext,Bb(a)),size:Math.max(0,Aa(r.size)),mime:Ke(r.mime)||void 0,lang:Ke(r.lang)||void 0,content:l,rawUrl:P7(n),url:P7(n,!0)}}var l0e=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:fq(r,n,e,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")}:{ok:!0,file:u2(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:fq(r,n,e,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ke(n.path,e),size:Math.max(0,Aa(n.size,new TextEncoder().encode(t).byteLength)),mtime:Ke(n.mtime)||void 0}}}},R7=new l0e;var bu=new Map,O7=new Set,u0e=0,z7=()=>{for(let e of O7)e()};function L7(e){return O7.add(e),()=>{O7.delete(e)}}function H7(){return[...bu.values()]}function c0e(e){bu.delete(e)&&z7()}function q7(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-${++u0e}`,n=t.duration??3200;return bu.set(r,{id:r,message:e,options:t,expiresAt:n>0?Date.now()+n:null}),z7(),{id:r,dismiss(){bu.delete(r),z7()}}}var d0e=0,Rc=[],pq={activeDialog:null},W7=new Set;function mq(){pq={activeDialog:Rc[0]??null};for(let e of W7)e()}var vn={dialog(e){let t=++d0e;return new Promise(r=>{Rc=[...Rc,{id:t,options:e,resolve:r}],mq()})},toast(e,t={}){return q7(e,t)},closeTopmost(){let e=Rc[0];return!e||e.options.dismissable===!1?!1:(ws.completeDialog(e.id,{dismissed:!0}),!0)}},ws={subscribe(e){return W7.add(e),()=>W7.delete(e)},getSnapshot(){return pq},cancelDialogRequest(e){let t=Rc.find(r=>r.options===e);t&&this.completeDialog(t.id,{dismissed:!0})},completeDialog(e,t){let r=Rc.find(n=>n.id===e);r&&(Rc=Rc.filter(n=>n.id!==e),mq(),r.resolve(t))}};var f0e="Failed to fetch";function xs(e,t){return!(e instanceof Error)||!e.message||e.message===f0e?t:e.message}function _f(e,t){return xs(e,t)}function Oc(e){return e instanceof DOMException&&e.name==="AbortError"}function qa(e,t){return{message:_f(e,t)}}function hq(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:Hh(),imageZoomed:!1}}function p0e(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 m0e={async confirmDiscard(e){let t=p0e(e),r=await vn.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 jf(e)},appendToComposer(){return!1},notify(e,t){vn.toast(e,{tone:t})},onSaved(){}};function h0e(e){let t=new Set,r=hq(),n=e.runtime??m0e,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=hq(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 f(v){o?.abort();let y=new AbortController;o=y;let x=++a;l({open:!0,request:v,status:"loading",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:Hh(),imageZoomed:!1});try{let w=await e.repository.load(v.path,{signal:y.signal});if(x!==a||y.signal.aborted||!r.open)return!1;if(o=null,w.ok===!1)return l({status:"error",failure:w.failure}),!1;let k=w.file.kind==="text"?w.file.content??"":"";return l({status:"ready",file:w.file,failure:null,draft:k,baseline:k}),!0}catch(w){return x!==a||y.signal.aborted||Oc(w)||!r.open||(o=null,l({status:"error",failure:qa(w,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")})),!1}}async function h(v,y){try{return await n.copyText(v),n.notify(y,"success"),!0}catch(x){return n.notify(qa(x,"\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=j7(r.request,v.direction);return!y||!r.request?!1:f({...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,x=r.draft;l({saving:!0,failure:null});try{let w=await e.repository.save(y,x);if(!r.open||r.request?.path!==y)return!1;if(w.ok===!1)return l({saving:!1,failure:w.failure}),n.notify(w.failure.message,"error"),!1;let k=r.file;l({saving:!1,file:k&&{...k,content:x,size:w.result.size},baseline:x,draft:x,dirty:!1,failure:null}),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved(y)}catch{}return!0}catch(w){if(!r.open||r.request?.path!==y)return!1;let k=qa(w,"\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 -- ${N7(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:Ib(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=T7(v);return y?r.open&&r.request?.path===y.path&&!r.dirty?(l({request:y}),!0):r.open&&r.dirty&&!await d("replace")?!1:f(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 U7=h0e({repository:R7}),Es=U7.controller,Nf=U7.store,V7=U7.configureRuntime;var G7=B(_(),1),zc=B(_(),1);function K7(e,t){return e?Array.from(e.querySelectorAll(t)).find(r=>!r.matches(":disabled, [aria-disabled='true']")&&r.getClientRects().length>0)??null:null}function g0e(e,t){let r=e.ownerDocument,n=r.defaultView?.MutationObserver;if(!n)return()=>{};let a=!0,o=new n(()=>{if(!a)return;let c=K7(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 v0e(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 Lc({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:f="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)(Ae,{name:"close",size:18}),testId:x,showClose:w=!0,dismissable:k=!0,onOpenChange:F,onEscape:C,dismissalPriority:D="normal",focusTriggerAfterClose:S,onAfterClose:A}){let I=Oa(),j=G7.useId(),$=(0,zc.useRef)(null),N=(0,zc.useRef)(0),P=(0,zc.useRef)(null);zn(e,()=>{C?C():k&&F(!1)},D),(0,zc.useEffect)(()=>(e&&(N.current=performance.now()),()=>{P.current?.(),P.current=null}),[e]);let O=()=>{P.current?.();let q=$.current,L=K7(q,"[data-wand-autofocus]"),R=K7(q,"input, textarea, select, button, [tabindex='0']");(L??R)?.focus({preventScroll:!0}),q&&!L&&(P.current=g0e(q,R))},[V,H]=G7.useState(null);return G7.useEffect(()=>{if(!e||V)return;let q=!0;return globalThis.__wandImportBrowserModule("0f5fdbfe56fd9050").then(L=>{q&&H(()=>L.WandDialogModal)}),()=>{q=!1}},[e,V]),V?(0,Wa.jsx)(sr,{children:(0,Wa.jsx)(V,{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";v0e(!1,{reason:L,cancel(){}},k,N.current,performance.now(),F)},afterOpenChange:q=>{q&&O()},modalRender:q=>(0,Wa.jsx)("div",{ref:$,"data-testid":x,"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)(zt.Text,{className:f,style:{fontSize:"inherit",fontWeight:"inherit"},children:t}),r&&(0,Wa.jsx)(zt.Paragraph,{id:j,className:h,style:{margin:0,whiteSpace:"pre-wrap",fontWeight:"normal"},children:r})]}),w&&(0,Wa.jsx)(Ne,{kind:"ghost",style:{flexShrink:0},"aria-label":v,disabled:!k,onClick:()=>F(!1),children:y})]}),children:n})}):(0,Wa.jsx)(sr,{children:null})}function Mb({open:e,title:t,description:r,tone:n="info",icon:a,actions:o,input:l,dismissable:c=!0,focusTriggerAfterClose:d,onAction:f,onDismiss:h}){let g=(0,zc.useRef)(null),v=(0,zc.useRef)(!1),[y,x]=(0,zc.useState)(l?.value??"");(0,zc.useEffect)(()=>{if(!e||!l)return;let C=requestAnimationFrame(()=>{g.current?.focus(),g.current?.select()});return()=>cancelAnimationFrame(C)},[e,!!l]);let w=o.find(C=>C.kind==="primary"||C.kind==="danger")??o.at(-1),k=C=>{C.key!=="Enter"||!w||v.current||C.nativeEvent.isComposing||C.nativeEvent.keyCode===229||(C.preventDefault(),f(w.value,y))},F=a==null||["","i","!","\u2713","?"].includes(String(a))?(0,Wa.jsx)(Ae,{name:b0e[n],size:18}):a;return(0,Wa.jsxs)(Lc,{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)(bf,{ref:g,"data-wand-autofocus":"true","aria-label":l.label??t,autoComplete:"off",spellCheck:!1,placeholder:l.placeholder,value:y,onChange:C=>x(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)(Ne,{kind:C.kind,"data-wand-autofocus":C.autoFocus?"true":void 0,onClick:()=>f(C.value,l?y:void 0),children:C.label},`${C.label}:${D}`))})]})}var Pf=B(_(),1),Ua=B(Ee(),1);function Ln(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=Pf.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot),f=r(d,c),h=n.dismissable?.(c)!==!1,[g,v]=Pf.useState(()=>a),[y,x]=Pf.useState(""),[w,k]=Pf.useState(0),F=Pf.useRef(!1);if(f&&(F.current=!0),Pf.useEffect(()=>{if(!f||g)return;let D=!0;return l().then(S=>{D&&v(()=>S)},()=>{D&&x("\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}},[f,g,w]),Pf.useEffect(()=>{if(!f||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)},[f,g,h]),g&&F.current)return(0,Ua.jsx)(g,{...c});if(!f)return null;let C=(0,Ua.jsx)(Xe,{vertical:!0,gap:"small","aria-busy":!y,children:y?(0,Ua.jsxs)(Ua.Fragment,{children:[(0,Ua.jsx)(La,{type:"error",showIcon:!0,title:y}),(0,Ua.jsxs)(Xe,{gap:"small",children:[(0,Ua.jsx)(Ne,{onClick:()=>{x(""),k(D=>D+1)},children:"\u91CD\u8BD5"}),(0,Ua.jsx)(Ne,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,Ua.jsxs)(Xe,{align:"center",gap:"small",role:"status",children:[(0,Ua.jsx)(_i,{}),"\u6B63\u5728\u52A0\u8F7D",n.title,"\u2026"]})});return n.renderPending?n.renderPending(C,c,{failed:!!y}):n.inline?C:n.page?(0,Ua.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,Ua.jsxs)(Xe,{align:"center",gap:"small",children:[h?(0,Ua.jsx)(Ne,{kind:"soft",onClick:n.close,children:"\u8FD4\u56DE"}):null,(0,Ua.jsx)("h1",{children:n.title})]}),C]}):(0,Ua.jsx)(Lc,{open:!0,title:n.title,onOpenChange:D=>{D||n.close()},children:C})}}var y0e={subscribe:()=>()=>{},getSnapshot:()=>null};function qh(e,t){return Ln(()=>e().then(r=>function({enabled:n,...a}){return(0,Ua.jsx)(r,{...a})}),y0e,(r,n)=>n.enabled!==!1,{...t,inline:!0,close:()=>{}})}var c2=Cb(()=>yt("/api/wand-tasks"));vs(()=>c2.clear());function X7(){c2.preload()}function Q7(){c2.clear()}function w0e(e){return e?yt(`/api/wand-tasks?workspaceId=${encodeURIComponent(e)}`):c2.load()}var Y7="wand:page-route",Z7=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"]),gq=["sidebarMode","display","zoom","hideCompleted","queue","expandedTask","boardCollapsed","scheduleExpanded"],x0e=[{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"]}],E0e=new Set([...gq,"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(Y7,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Y7,e)})}var k0e=256,C0e=300,d2=null,Wh=null;function S0e(e,t){let r=new URLSearchParams(e);for(let o of gq)r.delete(o);let n=t.view;if(n&&n!==r.get("view")){for(let o of x0e)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>k0e?r.delete(o):r.set(o,l);let a=r.toString();return a?`?${a}`:""}function vq(e,t){let r=new URL(window.location.href);r.search=S0e(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(Y7)))}function J7(){Wh&&(clearTimeout(Wh),Wh=null);let e=d2;d2=null,e&&typeof window<"u"&&vq(e,"replace")}function eD(e){typeof window>"u"||(d2={...d2,...e},Wh&&clearTimeout(Wh),Wh=setTimeout(J7,C0e))}typeof window<"u"&&window.addEventListener("pagehide",J7);function Va(e,t="push"){typeof window>"u"||(J7(),vq(e,t))}function tD(e,t){let r=new URLSearchParams(e),n=r.get("session");return r.get("view")==="workspace"&&n&&t&&t!==n?"replace":"push"}function Rf(e){let t=e.trim();t&&Va({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=>Z7.has(t))}function rD(e){let t=new URL(e),r=new URL(t.pathname,t.origin);for(let[n,a]of t.searchParams)Z7.has(n)&&r.searchParams.append(n,a);return r.href}function nD(e){return[...new Set(new URLSearchParams(e).keys())].filter(t=>!Z7.has(t)&&!E0e.has(t))}var Wo=B(_(),1);function Tb(){return Wo.useSyncExternalStore(go,Hn,()=>"")}function aD(e,t,r=l=>l,n=String,a="replace",o=0){let l=Wo.useSyncExternalStore(go,()=>new URLSearchParams(Hn()).get(e),()=>null),c=Wo.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}},f=Wo.useMemo(()=>d(l),[e,l]),[h,g]=Wo.useState(null),v=Wo.useRef(null),y=Wo.useRef(null),x=Wo.useCallback(F=>{let C=c.current.serialize(F),D=c.current.serialize(c.current.fallback);Va({[e]:C===D?null:C},a)},[e,a]),w=Wo.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null);let F=y.current;y.current=null,F&&x(F.value),g(null)},[x]);Wo.useEffect(()=>{y.current&&(v.current&&(clearTimeout(v.current),v.current=null),y.current=null,g(null))},[l]),Wo.useEffect(()=>()=>{v.current&&clearTimeout(v.current),y.current=null},[]);let k=Wo.useCallback(F=>{let C=y.current?y.current.value:d(new URLSearchParams(Hn()).get(e)),D=typeof F=="function"?F(C):F;if(!o){x(D);return}y.current={value:D},g({value:D}),v.current&&clearTimeout(v.current),v.current=setTimeout(w,o)},[e,x,w,o]);return[h?h.value:f,k]}var F0e=JSON.stringify;function D0e(e,t){return r=>e.includes(r)?r:t}var jb=B(_(),1),A0e=B(tr(),1),xn=B(Ee(),1);function Of({active:e,from:t,to:r,size:n=18}){let a=ca();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)(Ae,{name:o,size:n})},l))})}function $0e({phase:e,disabled:t,onClick:r}){let n=ca(),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)(Ne,{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 iD=["\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 B0e(e){return iD.includes(e)?iD:[...iD,e]}function I0e({phase:e,stops:t,disabled:r,label:n,onClick:a,showLabel:o=!1,disabledReason:l,descriptionId:c}){return(0,xn.jsxs)(Mr,{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)(Of,{active:t,from:"up",to:"stop"})}),(0,xn.jsx)("span",{"data-slot":"sending",children:(0,xn.jsx)(Ae,{name:"refresh"})}),(0,xn.jsx)("span",{"data-slot":"sent",children:(0,xn.jsx)(Ae,{name:"check"})}),(0,xn.jsx)("span",{"data-slot":"failed",children:(0,xn.jsx)(Ae,{name:"warning"})}),(0,xn.jsx)("span",{"data-slot":"unknown",children:(0,xn.jsx)(Ae,{name:"question"})})]}),o?(0,xn.jsx)("span",{className:"conversation-submit-labels","aria-hidden":"true",children:B0e(n).map(d=>(0,xn.jsx)("span",{className:"conversation-submit-label","data-active":d===n||void 0,children:d},d))}):null]})}function oD({open:e,owner:t,anchorRef:r,triggerRef:n,onClose:a,direction:o="down",focusKey:l,children:c}){let d=ca(),f=jb.useRef(null),h=jb.useRef(a);h.current=a;let g=vh(),v=Oa();jb.useLayoutEffect(()=>e?wh(t,g):void 0,[e,t,g]),zn(e,()=>{h.current(),n.current?.focus({preventScroll:!0})}),jb.useEffect(()=>{if(!e)return;let x=w=>{r.current?.contains(w.target)||wf(w.target,t)||h.current()};return document.addEventListener("pointerdown",x,!0),()=>{document.removeEventListener("pointerdown",x,!0)}},[e,r,n,t]),jb.useLayoutEffect(()=>{let x=r.current,w=f.current;if(!e||!x||!w)return;let k=o==="up"?x.closest(".conversation-composer")??x:x,F=()=>{let N=x.closest(".sidebar,.conversation-root")?.getBoundingClientRect(),P=k.getBoundingClientRect(),O=N?.left??0,V=N?.right??window.innerWidth,H=Math.min(o==="up"?P.width:360,V-O-24,window.innerWidth-24),q=o==="up"?P.left:Math.max(O+12,Math.min(P.right-H,V-H-12));w.style.width=`${H}px`,w.style.left=`${Math.max(12,Math.min(q,window.innerWidth-H-12))}px`,w.style.right="auto";let L=o==="up"||window.innerHeight-P.bottom<Math.min(w.scrollHeight,280)&&P.top>window.innerHeight-P.bottom;w.style.top=L?"auto":`${P.bottom+4}px`,w.style.bottom=L?`${window.innerHeight-P.top+4}px`:"auto",w.style.maxHeight=`${Math.max(80,Math.min(window.innerHeight*.66,(L?P.top:window.innerHeight-P.bottom)-16))}px`};F();let C=!1,D=!1,S=0,A=()=>{if(C||D)return D;let N=Array.from(w.querySelectorAll("input,button,[tabindex='0']")).find(P=>!P.matches(":disabled")&&!P.closest("[hidden],[inert]")&&P.getClientRects().length&&getComputedStyle(P).visibility==="visible");return N?.focus({preventScroll:!0}),D=!!N&&document.activeElement===N,D};S=requestAnimationFrame(()=>{if(A()||C)return;let N=w.getAnimations();N.length&&Promise.allSettled(N.map(P=>P.finished)).then(()=>{C||(S=requestAnimationFrame(A))})});let I=()=>{C=!0,cancelAnimationFrame(S)},j=new MutationObserver(()=>{C||D||(cancelAnimationFrame(S),S=requestAnimationFrame(A))});j.observe(w,{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(x),$.observe(w),k!==x&&$.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:f,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)(Fx,{owner:t,children:c})});return typeof document>"u"?y:(0,A0e.createPortal)(y,v??document.body)}var Uh=B(_()),f2=e=>{if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}},yq={},bq=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(!Qr(e)&&!Qr(t))return null;let r={closeIcon:typeof t!="boolean"&&Qr(t)?t:void 0};return Ct(e)&&(r={...r,...e}),r},M0e=(e,t,r)=>e===!1?!1:e?E5(r,t,e):t===!1?!1:t?E5(r,t):r.closable?r:!1,T0e=(e,t,r)=>{let{closeIconRender:n}=t,{closeIcon:a,...o}=e,l=a,c=no(o,!0);return Qr(l)&&(n&&(l=n(l)),l=Uh.default.isValidElement(l)?Uh.default.cloneElement(l,{"aria-label":r,...l.props,...c}):Uh.default.createElement("span",{"aria-label":r,...c},l)),[l,{"aria-label":r,...c}]},wq=(e,t,r=yq,n="Close")=>{let a=bq(e?.closable,e?.closeIcon),o=bq(t?.closable,t?.closeIcon),l={closeIcon:Uh.default.createElement(Mc,null),...r},c=M0e(a,o,l),d=typeof c!="boolean"?!!c?.disabled:!1;if(c===!1)return[!1,null,d,{}];let[f,h]=T0e(c,l,n);return[!0,f,d,h]},sD=(e,t,r=yq)=>{let[n]=Jd("global",tu.global);return Uh.default.useMemo(()=>wq(e,t,{closeIcon:Uh.default.createElement(Mc,null),...r},n.close),[e,t,r,n.close])};var Ni=B(_()),_b=B(_()),j0e=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]:{...pr(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}}}}},lD=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return Nt(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})},uD=e=>{let t=cx(new sf(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new nn(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},cD=kt("Tag",e=>{let t=lD(e);return j0e(t)},uD),_0e=_b.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:a,checked:o,children:l,icon:c,onChange:d,onClick:f,onKeyDown:h,disabled:g,...v}=e,{getPrefixCls:y,tag:x}=_b.useContext(wt),w=_b.useContext(ci),k=g??w,F=j=>{k||(d?.(!o),f?.(j))},C=j=>{h?.(j),!(j.defaultPrevented||k)&&j.key===" "&&(j.preventDefault(),j.repeat||d?.(!o))},D=y("tag",r),[S,A]=cD(D),I=te(D,`${D}-checkable`,{[`${D}-checkable-checked`]:o,[`${D}-checkable-disabled`]:k},x?.className,a,S,A);return _b.createElement("span",{...v,ref:t,role:"checkbox","aria-checked":o,"aria-disabled":k||void 0,tabIndex:k?-1:0,style:{...x?.style,...n},className:I,onClick:F,onKeyDown:C},c,_b.createElement("span",null,l))}),xq=_0e,Vh=B(_()),N0e=Vh.default.forwardRef((e,t)=>{let{id:r,prefixCls:n,rootClassName:a,className:o,style:l,classNames:c,styles:d,disabled:f,options:h,value:g,defaultValue:v,onChange:y,multiple:x,...w}=e,{getPrefixCls:k,direction:F,className:C,style:D,classNames:S,styles:A}=_t("tag"),I=k("tag",n),j=`${I}-checkable-group`,$=Yn(I),[N,P]=cD(I,$),O=lt(D),V=lt(l),[H,q]=jt([S,c],[A,O,d,V],{props:e}),L=(0,Vh.useMemo)(()=>Array.isArray(h)?h.map(Z=>Ct(Z)?Z:{value:Z,label:Z}):[],[h]),[R,W]=wr(v,g),z=(Z,T)=>{let U=null;if(x){let X=R||[];U=Z?[].concat(Xr(X),[T.value]):X.filter(Y=>Y!==T.value)}else U=Z?T.value:null;W(U),y?.(U)},Q=Vh.default.useRef(null);(0,Vh.useImperativeHandle)(t,()=>({nativeElement:Q.current}));let K=no(w,{aria:!0,data:!0});return Vh.default.createElement("div",{...K,className:te(j,C,a,{[`${j}-disabled`]:f,[`${j}-rtl`]:F==="rtl"},N,P,o,H.root),style:q.root,id:r,ref:Q},L.map(Z=>Vh.default.createElement(xq,{key:Z.value,className:te(`${j}-item`,H.item,Z.className),style:{...q.item,...Z.style},checked:x?(R||[]).includes(Z.value):R===Z.value,onChange:T=>z(T,Z),disabled:f},Z.label)))}),P0e=N0e,R0e=B(_());function O0e(e,t){let{color:r,variant:n,bordered:a}=e;return R0e.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=xf(c),f=RF(c),h={};if(!d&&!f&&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,f,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}}})),L0e=Vm(["Tag","preset"],e=>{let t=lD(e);return z0e(t)},uD);function H0e(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}var p2=(e,t,r)=>{let n=H0e(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}`]}}}},q0e=Vm(["Tag","status"],e=>{let t=lD(e);return[p2(t,"success","Success"),p2(t,"processing","Info"),p2(t,"error","Error"),p2(t,"warning","Warning")]},uD),W0e=Ni.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,style:o,children:l,icon:c,color:d,variant:f,onClose:h,bordered:g,disabled:v,href:y,target:x,styles:w,classNames:k,...F}=e,{getPrefixCls:C,direction:D,className:S,variant:A,style:I,classNames:j,styles:$}=_t("tag"),[N,P,O,V,H]=O0e(e,A),q=O||V,L=Ni.useContext(ci),R=v??L,{tag:W}=Ni.useContext(wt),[z,Q]=Ni.useState(!0),K=xr(F,["closeIcon","closable"]),Z={...e,color:P,variant:N,disabled:R},T=lt(I),U=lt(o),[X,Y]=jt([j,k],[$,T,w,U],{props:Z}),re=Ni.useMemo(()=>{let Ce=Y.root;return R||(Ce={...H,...Ce}),Ce},[Y.root,H,R]),J=C("tag",r),[se,me]=cD(J),le=te(J,S,X.root,`${J}-${N}`,{[`${J}-${P}`]:q,[`${J}-hidden`]:!z,[`${J}-rtl`]:D==="rtl",[`${J}-disabled`]:R},n,a,se,me),he=Ce=>{R||(Ce.stopPropagation(),h?.(Ce),!Ce.defaultPrevented&&(y&&Ce.preventDefault(),Q(!1)))},ae=Ce=>{(Ce.key==="Enter"||Ce.key===" ")&&(Ce.preventDefault(),Ce.repeat||Ce.currentTarget.click())},[,ce]=sD(f2(e),f2(W),{closable:!1,closeIconRender:Ce=>{let Le=Ni.createElement("span",{role:"button",tabIndex:R?-1:0,"aria-disabled":R||void 0,className:te(`${J}-close-icon`,X.close),onClick:he,onKeyDown:ae,style:Y.close},Ce);return H5(Ce,Le,$e=>({onClick:Be=>{$e?.onClick?.(Be),he(Be)},onKeyDown:Be=>{$e?.onKeyDown?.(Be),Be.defaultPrevented||ae(Be)},role:"button",tabIndex:R?-1:0,"aria-disabled":R||void 0,className:te($e?.className,`${J}-close-icon`,X.close),style:{...Y.close,...$e?.style}}))}}),ye=Er(F.onClick)||l&&l.type==="a",Te=mn(c,{className:te(Ni.isValidElement(c)?c.props?.className:void 0,X.icon),style:Y.icon}),De=Te?Ni.createElement(Ni.Fragment,null,Te,or(l)&&Ni.createElement("span",{className:X.content,style:Y.content},l)):l,ke=Ni.createElement(y?"a":"span",{...K,ref:t,className:le,style:re,href:R?void 0:y,target:x,onClick:R?void 0:K.onClick,...y&&R?{"aria-disabled":!0}:{}},De,ce,O&&Ni.createElement(L0e,{key:"preset",prefixCls:J}),V&&Ni.createElement(q0e,{key:"status",prefixCls:J}));return ye?Ni.createElement(nh,{component:"Tag"},ke):ke}),dD=W0e;dD.CheckableTag=xq;dD.CheckableTagGroup=P0e;var Gh=dD;var qr=B(_(),1),ks=B(Ee(),1),pD=qr.createContext(null);function Kh({children:e,contextTrigger:t,triggers:r=["click"],open:n,defaultOpen:a=!1,onOpenChange:o,closeOnSelect:l=!0}){let c=Oa(),d=qr.useRef(null),f=qr.useRef(null),h=qr.useRef(null),g=qr.useCallback(U=>{let X=f.current;if(f.current=U,U||!X)return;let Y=h.current;h.current=null;let re=document.activeElement;Y?.isConnected&&(re===document.body||re&&X.contains(re))&&Y.focus({preventScroll:!0})},[]),[v,y]=qr.useState(a),[x,w]=qr.useState(()=>new Map),k=qr.useCallback((U,X,Y)=>(w(re=>new Map(re).set(U,{item:X,marker:Y})),()=>w(re=>{let J=new Map(re);return J.delete(U),J})),[]),F=n??v,C=U=>{U&&(h.current=null),y(U),o?.(U)},[D,S]=qr.useState(null),A=qr.useRef(null),I=qr.useCallback(()=>D?Promise.resolve():(A.current||(A.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(U=>{S(()=>U.DropdownSurface)})),A.current),[D]);qr.useEffect(()=>{F&&I()},[F,I]);let j=qr.Children.toArray(e).filter(qr.isValidElement),$=j.find(U=>U.type===zf),N=j.find(U=>U.type===Lf);if(zn(F,()=>{C(!1),d.current?.focus({preventScroll:!0})}),!$&&!t||!N)return null;let{align:P="start",side:O="bottom",sideOffset:V=6,container:H,collisionPadding:q=12,popupOwner:L,className:R,children:W,...z}=N.props,Q={items:[...x.values()].sort((U,X)=>{if(!U.marker||!X.marker)return 0;let Y=U.marker.compareDocumentPosition(X.marker);return Y&Node.DOCUMENT_POSITION_FOLLOWING?-1:Y&Node.DOCUMENT_POSITION_PRECEDING?1:0}).map(U=>U.item),selectable:!1,onClick:()=>{l&&(h.current=d.current,C(!1))}},K=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:U=>{Z?.onClick?.(U),r.includes("click")&&C(!0)},onMouseEnter:U=>{Z?.onMouseEnter?.(U),r.includes("hover")&&C(!0)},onContextMenu:U=>{Z?.onContextMenu?.(U),r.includes("contextMenu")&&C(!0)}});return(0,ks.jsxs)(sr,{children:[(0,ks.jsx)(pD.Provider,{value:k,children:W}),D?(0,ks.jsx)(D,{trigger:K,triggerRef:d,open:F,onOpenChange:(U,X)=>{X.source==="menu"&&!l||C(U)},triggers:r,getPopupContainer:()=>H??c??document.body,placement:Fc(O,P),destroyOnHidden:!0,autoFocus:!0,align:{offset:Dc(O,V),overflow:{adjustX:!0,adjustY:!0,shiftX:q,shiftY:q}},classNames:{root:ct("wand-ui-dropdown-content",R)},menu:Q,popupRender:U=>(0,ks.jsx)("div",{...z,ref:g,"data-wand-popup-owner":L??z.id,children:U})}):T]})}function zf({render:e,className:t,...r}){return e?qr.cloneElement(e,{...r,className:ct("wand-ui-dropdown-trigger",e.props.className,t)}):(0,ks.jsx)(Ne,{...r,type:r.type??"button",className:ct("wand-ui-dropdown-trigger",t)})}function Lf(e){return null}function cn({className:e,icon:t,iconSlot:r="start",hint:n,tone:a,children:o,onSelect:l,onClick:c,...d}){let f=qr.useContext(pD),h=qr.useId(),g=qr.useRef(null),{type:v,...y}=d,x=qr.useRef({onSelect:l,onClick:c});x.current={onSelect:l,onClick:c};let w=qr.useMemo(()=>({...y,key:h,danger:a==="danger",className:ct("wand-ui-dropdown-item",e),icon:t?(0,ks.jsx)(Ae,{name:t,slot:r,size:15}):void 0,label:(0,ks.jsxs)(ks.Fragment,{children:[o,n!=null?(0,ks.jsx)("span",{className:"wand-ui-dropdown-item-hint",children:n}):null]}),onClick:({domEvent:k})=>{x.current.onClick?.(k),x.current.onSelect?.()}}),[h,d.id,d.disabled,d.title,e,a,t,r,n,o]);return qr.useLayoutEffect(()=>f?.(h,w,g.current),[f,h,w]),(0,ks.jsx)("span",{hidden:!0,ref:g})}function wu({className:e}){let t=qr.useContext(pD),r=qr.useId(),n=qr.useRef(null);return qr.useLayoutEffect(()=>t?.(r,{key:r,type:"divider",className:e},n.current),[t,r,e]),(0,ks.jsx)("span",{hidden:!0,ref:n})}var fD=B(_(),1),m2=B(Ee(),1);function Hf({className:e,size:t="md",variant:r="soft",dismissible:n=!1,open:a,onOpenChange:o,onDismiss:l,closeLabel:c="Dismiss",onClick:d,children:f,...h}){let[g,v]=fD.useState(!0),y=a??g,x=fD.useRef(y);fD.useEffect(()=>{x.current&&!y&&l?.(),x.current=y},[y,l]);let w=h.kind??(r==="destructive"?"danger":r);if(!n)return(0,m2.jsx)(Ne,{...h,onClick:d,kind:w,size:t==="sm"?"small":t==="lg"?"large":"medium",className:ct("wand-ui-chip",e),children:f});if(!y)return null;let k=()=>{v(!1),o?.(!1)};return(0,m2.jsx)(sr,{children:(0,m2.jsx)(Gh,{className:ct("wand-ui-chip",e),closeIcon:(0,m2.jsx)("span",{"aria-label":c,children:"\xD7"}),closable:!h.disabled,color:w==="primary"?"var(--accent-solid)":w==="danger"?"error":void 0,onClick:F=>{d?.(F),h.disabled||k()},onClose:k,children:f})})}var Eq=B(Ee(),1);function Nb({open:e,size:t=18}){return(0,Eq.jsx)("span",{className:"sidebar-toggle-morph","data-open":e?"true":"false","aria-hidden":"true",children:(0,Eq.jsx)(Of,{active:e,from:"rail",to:"close",size:t})})}var kq=B(_(),1),h2=B(Ee(),1);function mD({label:e="\u590D\u5236\u5F53\u524D\u9875\u9762\u94FE\u63A5",menuItem:t=!1}){let r=Tb(),[n,a]=kq.useState("idle");kq.useEffect(()=>a("idle"),[r]);let o=()=>{a("pending"),Promise.resolve().then(()=>navigator.clipboard.writeText(rD(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,h2.jsx)(cn,{icon:"copy","aria-label":e,disabled:n==="pending",onSelect:o,children:l}):(0,h2.jsxs)(Ne,{kind:"ghost",size:"small","aria-label":e,title:e,disabled:n==="pending",style:{minWidth:144},onClick:o,children:[(0,h2.jsx)(Ae,{name:"copy",slot:"start"}),(0,h2.jsx)("span",{"aria-live":"polite",children:l})]})}function hD(){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 g2(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 Pi(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 v2(e,t){if(e.type==="pane")return t(e);let[r,n]=e.children;return{...e,children:[v2(r,t),v2(n,t)]}}function U0e(e,t,r){return Fq(e,t,0,r)}function Fq(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=Fq(a===0?o:l,t,r+1,n);return{...e,children:a===0?[c,l]:[o,c]}}function V0e(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 Dq(e){if(e.type==="pane")return e;let[t,r]=e.children.map(Dq),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 bD(e,t){let r=v2(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 Dq(v2(r,n=>V0e(n)))}function ll(e,t){return e.type==="pane"?e.tabs.find(r=>r.id===t):ll(e.children[0],t)??ll(e.children[1],t)}function G0e(e){return{id:`tab-${e}`,kind:"session",sessionId:e}}function Xh(e){return{type:"pane",tabs:[e],active:0}}function Uo(e){return e.type==="pane"?e.tabs:[...Uo(e.children[0]),...Uo(e.children[1])]}function vo(e){return Uo(e).filter(t=>t.kind==="session").map(t=>t.sessionId)}function Ri(e,t){if(t){let r=ll(e,t);if(r)return r}return e.type==="pane"?e.tabs[e.active]??e.tabs[0]:Ri(e.children[0])??Ri(e.children[1])}function Wf(e){return!e||e.windows.length===0?null:e.windows.find(t=>t.id===e.activeWindowId)??e.windows[0]??null}function Cs(e){let t=Wf(e);return t?Ri(t.layout,t.activeTabId):void 0}function Cq(e){return!!(e&&e.type==="windows"&&Array.isArray(e.windows))}function Pb(e,t){let r=e||"window",n=2;for(;t.has(r);)r=`${e||"window"}-${n++}`;return t.add(r),r}function b2(e){return e.kind==="session"?`window-${e.sessionId}`:`window-${e.id}`}function gD(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 f=e.tabs[e.active],h=f&&d.some(g=>g.id===f.id)?f:d[0];return{node:Xh(h),extras:d.filter(g=>g.id!==h.id)}}let n=gD(e.children[0],t,r),a=gD(e.children[1],t,r),o=Uo(n.node).length===0,l=Uo(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 xu(e,t,r){let n=new Set(t),a=Cq(e)?e.windows:e?[{id:"window-legacy",layout:e}]:[],o=new Set,l=new Set,c=[];for(let h of a){let g=gD(h.layout,n,o);if(Uo(g.node).length>0){let v=Pb(h.id,l),y=Ri(g.node,h.activeTabId);c.push({id:v,layout:g.node,activeTabId:y?.id})}for(let v of g.extras){let y=Pb(b2(v),l);c.push({id:y,layout:Xh(v),activeTabId:v.id})}}for(let h of t){let g=G0e(h);if(o.has(g.id))continue;o.add(g.id);let v=Pb(b2(g),l);c.push({id:v,layout:Xh(g),activeTabId:g.id})}let d=Cq(e)?e.activeWindowId:null,f=(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:f}}function y2(e,t){return!e.windows.some(r=>r.id===t)||e.activeWindowId===t?e:{...e,activeWindowId:t}}function K0e(e,t,r){let n=e.activeWindowId!==t,a=e.windows.map(o=>o.id!==t||!ll(o.layout,r)||o.activeTabId===r?o:(n=!0,{...o,activeTabId:r}));return n?{...e,activeWindowId:t,windows:a}:e}function X0e(e,t,r,n){let a=e.windows.map(o=>o.id===t?{...o,layout:r,activeTabId:Ri(r,n??o.activeTabId)?.id}:o);return{...e,windows:a}}function Aq(e,t){for(let r of e.windows){let n=Uo(r.layout).find(a=>a.kind==="session"&&a.sessionId===t);if(n)return n}}function vD(e,t,r,n){return e.type==="pane"?e.tabs.some(a=>a.id===t)?{type:"split",dir:n,ratio:.5,children:[e,Xh(r)]}:e:ll(e.children[0],t)?{...e,children:[vD(e.children[0],t,r,n),e.children[1]]}:ll(e.children[1],t)?{...e,children:[e.children[0],vD(e.children[1],t,r,n)]}:e}function yD(e,t,r,n,a){let o=Aq(e,t),l=e.windows.find(v=>v.id===r),c=l&&Ri(l.layout,n??l.activeTabId);if(!o||!c||o.id===c.id)return e;let d=e.windows.map(v=>ll(v.layout,o.id)?{...v,layout:bD(v.layout,o.id)}:v).filter(v=>Uo(v.layout).length>0),f=d.findIndex(v=>v.id===r);if(f<0)return e;let h=d[f],g={...h,layout:vD(h.layout,c.id,o,a),activeTabId:o.id};return d=d.map((v,y)=>y===f?g:v),{...e,windows:d,activeWindowId:r}}function Q0e(e,t){let r=e.windows.findIndex(f=>vo(f.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=Aq(e,t);if(!a)return e;if(Uo(n.layout).length<=1)return y2(e,n.id);let o=bD(n.layout,a.id),l=new Set(e.windows.map(f=>f.id)),c={id:Pb(b2(a),l),layout:Xh(a),activeTabId:a.id},d=[...e.windows];return d.splice(r,1,{...n,layout:o,activeTabId:Ri(o)?.id},c),{...e,windows:d,activeWindowId:c.id}}function Y0e(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 w2(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:Y0e(e,r,t,n)}}function wD(e,t){let r=e.windows.findIndex(c=>vo(c.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=Uo(n.layout).find(c=>c.kind==="session"&&c.sessionId===t);if(!a)return e;let o=bD(n.layout,a.id);if(Uo(o).length===0)return w2(e,n.id);let l=e.windows.map((c,d)=>d===r?{...n,layout:o,activeTabId:Ri(o,n.activeTabId)?.id}:c);return{...e,windows:l}}function Z0e(e,t){let r=e.windows.findIndex(h=>h.id===t);if(r<0)return e;let n=e.windows[r],a=Uo(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:Pb(b2(h),o),layout:Xh(h),activeTabId:h.id})),c=Ri(n.layout,n.activeTabId)??a[0],d=l[a.findIndex(h=>h.id===c.id)]??l[0],f=[...e.windows];return f.splice(r,1,...l),{...e,windows:f,activeWindowId:d?.id??null}}function J0e(e){let t=[],r=[];for(let n of e)n.teamStep&&(n.teamStep.runFinished&&!Pi(n)?r:t).push(n);return{live:t,history:r}}function ege(e){return e.filter(t=>!t.teamStep)}var Sq=26;function tge(e){let t=(e.title||"").replace(/\s+/g," ").trim();return t?Array.from(t).length<=Sq?t:`${Array.from(t).slice(0,Sq-1).join("")}\u2026`:e.kind==="leader"?"\u8D1F\u8D23\u4EBA\u56DE\u5408":e.memberName||"\u56E2\u961F\u4F1A\u8BDD"}function rge(e){return e.teamChat?.chatTitle?.trim()||e.title?.trim()||"\u4EFB\u52A1\u5904\u7406\u7FA4"}function x2(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 Eu(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 Bq(e){let t=(e.title||"").trim().toLowerCase(),r=(e.cwd||"").replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean).at(-1)?.toLowerCase()??"";return!!r&&t===r}function Uf(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 Vf(e,t){let r=(e.title||"").trim();return!$q(r)&&!Bq(e)?r:`${x2(Eu(e))} ${t+1}`}function Rb(e,t,r){return e.teamStep?tge(e.teamStep):e.teamChat?rge(e):Vf(Ob(e,r),t)}function Ob(e,t){let r=(t||"").trim();return $q(r)||Bq({...e,title:r})?e:{...e,title:r}}var qf=B(Ee(),1);function Qh({session:e,className:t,size:r}){let n=Eu(e);return n?r===void 0?(0,qf.jsx)(Js,{provider:n,className:t}):(0,qf.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,qf.jsx)(Js,{provider:n})}):(0,qf.jsx)(Ae,{name:"terminal",size:r??13,className:t})}function nge({teamChat:e}){let t=Array.from({length:Math.min(Math.max(e.memberCount,1),2)},(r,n)=>fb({id:`${e.runId}#${n}`,name:e.teamName}));return(0,qf.jsx)(fi.Group,{className:"workspace-session-team-cats",size:18,children:t.map((r,n)=>(0,qf.jsx)(fi,{shape:"square",size:18,style:qx(r),icon:(0,qf.jsx)(Wx,{face:r,size:18})},n))})}var age=new Set(["claude","codex","opencode","grok","qoder","pi"]);function Iq(e){return e.sessionKind==="structured"||e.runner==="claude-cli-print"}function E2(e){return!e||e.status!=="running"||Iq(e)?!1:e.provider&&age.has(e.provider)?e.ptyBusy===!0:e.ptyCommandRunning===!0}function Yh(e){if(!e||e.archived)return{active:!1,inFlight:!1,ptyRunning:!1,permissionBlocked:!1};let t=!!e.permissionBlocked,r=Iq(e)&&!!e.structuredState?.inFlight,n=E2(e)&&(!e.provider||e.providerCliActive!==!1);return{active:r||n||t,inFlight:r,ptyRunning:n,permissionBlocked:t}}var ul=B(_(),1),Mq="wand.sidebar.displayMode",k2=["full","folded","active"],ige=new Set(["failed","waiting-input","waiting_input","permission-blocked","reconnecting"]);function oge(e){return k2.includes(e)?e:"full"}function sge(e){let t=k2.indexOf(e);return k2[(t+1)%k2.length]}function Zh(e){return ige.has(String(e.status??""))}function Hc(e){return e.archived?!1:e.ptyBusy===!0||e.inFlight===!0||e.status==="thinking"||E2(e)}function Gf(e){return!e.archived&&!Hc(e)&&!Zh(e)&&(e.executionStatus==="queued"||e.status==="queued")}function qc(e){return!e.archived&&(Zh(e)||Hc(e)||Gf(e)||Pi(e))}function lge(e,t){return e.map(r=>{let n=c=>qc(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,f=new Set;for(;d&&!f.has(d);)f.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 uge(){let[e,t]=ul.useState(()=>{try{return oge(window.localStorage.getItem(Mq))}catch{return"full"}}),r=ul.useCallback(a=>{t(a);try{window.localStorage.setItem(Mq,a)}catch{return}},[]),n=ul.useCallback(()=>r(sge(e)),[e,r]);return[e,n,r]}var Ss=ul.createContext(null);function cge(e,t,r){return e===t?r:{}}function xD(e,t,r,n,a,o=!0){return a?!0:e==="full"?t:r??(e==="active"?o:n)}function ED(){let[e,,t]=uge(),[r,n]=aD("sidebarQuery","",void 0,void 0,"replace",250),[a,o]=ul.useState({}),[l,c]=ul.useState({}),d=ul.useCallback(g=>{c(v=>cge(e,g,v)),t(g)},[e,t]),f=ul.useCallback((g,v)=>{o(y=>({...y,[g]:v}))},[]),h=ul.useCallback((g,v)=>{c(y=>({...y,[g]:v}))},[]);return ul.useMemo(()=>({mode:e,query:r,setMode:d,setQuery:n,normal:a,setNormal:f,overrides:l,setOverride:h}),[e,r,d,a,f,l,h])}var C2={workspaceId:null,workspaceName:"",taskId:null,taskName:"",cwd:"",layout:null,layoutRevision:void 0},zb=C2,S2=new Set,Wr={subscribe(e){return S2.add(e),()=>{S2.delete(e)}},getSnapshot(){return zb},getServerSnapshot(){return C2}};function cl(e){zb={...zb,...e};for(let t of S2)t()}function kD(){if(zb!==C2){zb=C2;for(let e of S2)e()}}var Kf=null,Ga={open:!1,dismissable:!0,initialCwd:"",initialEmployeeId:"",initialKind:"",workspaceId:"",workspaceTaskId:"",taskName:"",newTask:!1,revision:0},F2=new Set,Tq=new Map;function jq(e,t="",r="",n="",a="",o="",l="",c=!1){Ga={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:Ga.revision+1};for(let d of F2)d()}function dge(e){if(!(!Ga.open||Ga.dismissable===e)){Ga={...Ga,dismissable:e};for(let t of F2)t()}}var Ia={open(e={}){return!Kf||Ga.open&&!Ga.dismissable?!1:(Kf.onOpen(),jq(!0,e.initialCwd,e.initialEmployeeId,e.initialKind??"",e.workspaceId,e.workspaceTaskId,e.taskName,e.newTask),!0)},close(){Ga.open&&(jq(!1),Kf?.onClose())},closeIfOpen(){return!Ga.open||!Ga.dismissable?!1:(this.close(),!0)},closeTopmost(){return Ga.open?(Ga.dismissable&&this.close(),!0):!1},isOpen(){return Ga.open},setDismissable(e){dge(e)},getUnknownCreation(e){return Tq.get(e)},markUnknownCreation(e){Tq.set(e.scope,e)}},dl={subscribe(e){return F2.add(e),()=>F2.delete(e)},getSnapshot(){return Ga},getRuntime(){return Kf}};function SD(e){return Kf=e,()=>{Kf===e&&(Ga.open&&Ia.close(),Kf=null)}}var Jh=null,Oi={open:!1,dismissable:!0,initialCwd:"",initialKind:"task",revision:0},D2=new Set;function CD(e){Oi={...Oi,...e,revision:Oi.revision+1};for(let t of D2)t()}function fge(e){if(!(!Oi.open||Oi.dismissable===e)){Oi={...Oi,dismissable:e};for(let t of D2)t()}}var Xf={open(e,t="task"){return Ia.open({initialCwd:e,newTask:t==="task"}),Jh?.onOpen(),CD({open:!0,dismissable:!0,initialCwd:e??"",initialKind:t}),!0},close(){Ia.close(),Oi.open&&(CD({open:!1}),Jh?.onClose())},closeIfOpen(){return Ia.closeIfOpen(),!Oi.open||!Oi.dismissable?!1:(this.close(),!0)},isOpen(){return Oi.open||Ia.isOpen()},setDismissable(e){Ia.setDismissable(e),fge(e)}},Ka={subscribe(e){return D2.add(e),()=>D2.delete(e)},getSnapshot(){return Oi},getRuntime(){return Jh},consumeOpen(){Oi.open&&CD({open:!1})}};function FD(e){return Jh=e,()=>{Jh===e&&(Oi.open&&Xf.close(),Jh=null)}}var Qf=B(_(),1),_q=Qf.createContext(void 0),e0=Qf.createContext(!0);function DD(){let e=Qf.useContext(e0),t=Qf.useContext(Ss),[r,n]=Qf.useState(!1);return Qf.useEffect(()=>{n(!1)},[e,t?.mode,t?.query]),[e&&r,n]}function AD(){return Qf.useContext(_q)}var Wc=B(_(),1);function $D({sessionId:e,taskId:t,intoNewTask:r,open:n,onMoved:a}){let[o,l]=Wc.useState([]),[c,d]=Wc.useState(!1),[f,h]=Wc.useState(!1),[g,v]=Wc.useState(""),[y,x]=Wc.useState(0),w=Wc.useRef(!1),k=Wc.useRef(null);Wc.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(xs(D,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u3002"))}).finally(()=>{C||d(!1)}),()=>{C=!0}},[n,t,y]);let F=async(C,D,S)=>{if(w.current)return;w.current=!0,h(!0),v("");try{await C()}catch(I){v(xs(I,S)),w.current=!1,h(!1);return}a?.();let A=Ka.getRuntime();A?.toast(D,"success");try{await A?.refreshSessions()}catch(I){A?.toast(xs(I,"\u5F52\u5C5E\u5DF2\u66F4\u65B0\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u3002"),"danger")}finally{w.current=!1,h(!1)}};return{targets:o,loading:c,busy:f,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:()=>x(C=>C+1)}}function pge(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 BD(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 A2(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 ID(e,t){let r=Ka.getRuntime(),n=e.trim();if(!r||!n){t(e);return}try{let a=await an.listTaskGroups(),o=pge(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(A2(o,n)),r.selectSession(n)}catch{t(e)}}var mge="system-ai:",MD="\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 Fs(e){return typeof e?.automationId=="string"&&e.automationId.startsWith(mge)}var Nq={"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"},EIe=Object.keys(Nq).filter(e=>Nq[e]==="auxiliary");function zq(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),hge=B(tr(),1),Uc=B(Ee(),1),gge=500;function M2({row:e,menu:t,open:r,onOpenChange:n,label:a,title:o,description:l,error:c,className:d,disabled:f=!1,rowRef:h}){let g=AD(),v=Oa(),y=qn.useContext(e0),x=f||!y,w=r&&!x,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),[N,P]=qn.useState([]),O=()=>{I.current!==null&&clearTimeout(I.current),I.current=null,j.current=null},V=T=>{let U=C.current;T.length&&U?.parentElement&&U.parentElement.appendChild(U),P(T),t.onOpenChange?.(T)},H=()=>{let T=S.current;T?.isConnected?T.focus({preventScroll:!0}):D.current?.querySelector("button,a[href]")?.focus({preventScroll:!0})};zn(w,()=>{n(!1),H()}),zn(w&&N.length>0,()=>{V([]),F.current?.querySelector(".ant-dropdown-menu-submenu-title")?.focus({preventScroll:!0})}),qn.useEffect(()=>(w||(O(),P([])),x&&r&&n(!1),O),[w,x]),qn.useEffect(()=>(document.addEventListener("scroll",O,!0),()=>{O(),document.removeEventListener("scroll",O,!0)}),[]),qn.useEffect(()=>{if(!w)return;let T=!1,U=()=>{T||F.current?.querySelector('[role="menuitem"]:not([aria-disabled="true"])')?.focus({preventScroll:!0})},X=requestAnimationFrame(()=>{U();let re=F.current?.closest(".ant-dropdown");Promise.allSettled(re?.getAnimations({subtree:!0}).map(J=>J.finished)??[]).then(U)}),Y=()=>{T=!0,cancelAnimationFrame(X)};return document.addEventListener("pointerdown",Y,!0),document.addEventListener("keydown",Y,!0),()=>{Y(),document.removeEventListener("pointerdown",Y,!0),document.removeEventListener("keydown",Y,!0)}},[w]);let q=(T,U,X)=>{S.current=X,A.current=!0,D.current?.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:T,clientY:U,button:2})),A.current=!1},[L,R]=qn.useState(null),W=qn.useRef(null),z=qn.useRef(null),Q=qn.useCallback(()=>L?Promise.resolve():(W.current||(W.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(T=>{R(()=>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 K=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":x?void 0:"menu","aria-expanded":x?void 0:w,"aria-controls":w?k:void 0,"aria-description":x?void 0:"\u53F3\u952E\u3001\u957F\u6309\u6216\u6309 Shift+F10 \u6253\u5F00\u64CD\u4F5C\u83DC\u5355","data-sidebar-menu-open":w||void 0,onContextMenu:T=>{T.preventDefault(),T.stopPropagation(),O(),!A.current&&!$.current&&(S.current=T.target.closest("button,a[href],[tabindex]")??D.current),!x&&$.current&&!A.current&&n(!0),e.props.onContextMenu?.(T),!x&&!L&&(z.current={x:T.clientX,y:T.clientY,target:T.target},Q())},onKeyDown:T=>{if(e.props.onKeyDown?.(T),!(x||T.defaultPrevented||T.nativeEvent.isComposing)&&(T.key==="ContextMenu"||T.shiftKey&&T.key==="F10")){T.preventDefault(),T.stopPropagation(),O();let U=T.target,X=U.getBoundingClientRect();q(X.left+12,X.bottom,U)}},onPointerDown:T=>{if(e.props.onPointerDown?.(T),O(),$.current=!1,x||T.pointerType!=="touch")return;let U={x:T.clientX,y:T.clientY};j.current=U;let X=T.target.closest("button,a[href],[tabindex]")??D.current;I.current=setTimeout(()=>{I.current=null,$.current=!0,q(U.x,U.y,X)},gge)},onPointerMove:T=>{e.props.onPointerMove?.(T),j.current&&Math.hypot(T.clientX-j.current.x,T.clientY-j.current.y)>8&&O()},onPointerUp:T=>{O(),$.current&&(T.preventDefault(),T.stopPropagation()),e.props.onPointerUp?.(T)},onTouchEnd:T=>{$.current&&(T.preventDefault(),T.stopPropagation()),e.props.onTouchEnd?.(T)},onPointerCancel:T=>{O(),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,Uc.jsxs)("div",{className:"sidebar-menu-heading",children:[(0,Uc.jsx)("strong",{title:o,children:o}),l?(0,Uc.jsx)("span",{title:l,children:l}):null]}),children:[]}]:[],...t.items??[],...c?[{key:"action-error",disabled:!0,label:(0,Uc.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:c})}]:[]];return(0,Uc.jsxs)(sr,{children:[L?(0,Uc.jsx)(L,{trigger:K,open:w,disabled:x,triggers:["contextMenu"],onOpenChange:(T,U)=>{U.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:N,onOpenChange:V,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,Uc.jsx)("div",{ref:F,"data-wand-popup-owner":g,onKeyDown:U=>{U.key==="Tab"&&!U.nativeEvent.isComposing&&(n(!1),H(),U.stopPropagation())},children:T})}):K,w&&(0,hge.createPortal)((0,Uc.jsx)("div",{ref:C,className:"sidebar-menu-submenus","data-wand-popup-owner":g}),v??document.body)]})}var TD=B(_(),1),vge=B(Ee(),1);function qb({title:e,selector:t,children:r}){let n=TD.useRef(null),a=Oa(),[o,l]=TD.useState(!1);return zn(o,()=>l(!1)),(0,vge.jsx)(zo,{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:TD.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 Yf=B(_(),1);async function bge(e){let t=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,r=await vn.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 _D({row:e,session:t,label:r,disabled:n,intoNewTask:a,onOpen:o,onArchive:l,onDelete:c}){let[d,f]=DD(),[h,g]=Yf.useState(!1),[v,y]=Yf.useState(null),[x,w]=Yf.useState(""),k=Yf.useRef(!1),F=Yf.useRef(null),C=t.archived===!0,D=Fs(t),S=C||t.canArchive!==!1&&!zq(t),A=$D({sessionId:t.id,taskId:t.workspaceTaskId,intoNewTask:a,open:d&&h,onMoved:()=>f(!1)}),I=v!==null||A.busy;Yf.useEffect(()=>{d||g(!1)},[d]);let j=async $=>{if(!(k.current||I||$==="archive"&&!S)){k.current=!0,w("");try{if($==="delete"&&(f(!1),F.current?.querySelector("button,a[href]")?.focus({preventScroll:!0}),!await bge(r)))return;y($),$==="archive"?await l?.(!C):await c?.(),f(!1)}catch(N){w(xs(N,$==="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)&&f(!0)}finally{k.current=!1,y(null)}}};return(0,Ds.jsx)(M2,{row:Yf.cloneElement(e,{"aria-busy":I||void 0,draggable:I?!1:e.props.draggable}),rowRef:F,disabled:n,open:d,onOpenChange:$=>{(!$||!I)&&f($)},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:x,menu:{multiple:!0,onOpenChange:$=>{g($.includes("move")),$.includes("move")&&w("")},items:[{key:"open",disabled:I,icon:(0,Ds.jsx)(Ae,{name:"chat"}),label:"\u6253\u5F00\u4F1A\u8BDD"},...t.cwd?.trim()?[{key:"copy-cwd",disabled:I,icon:(0,Ds.jsx)(Ae,{name:"copy"}),label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55"}]:[],...!C&&!D?[{key:"move",disabled:I,icon:(0,Ds.jsx)(Ae,{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)(Ae,{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)(Ae,{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)(Ae,{name:"refresh"}),label:"\u91CD\u65B0\u52A0\u8F7D\u4EFB\u52A1"}]:[]]}]:[],...l&&S?[{key:"archive",disabled:I,icon:(0,Ds.jsx)(Ae,{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)(Ae,{name:"trash"}),label:"\u5220\u9664\u4F1A\u8BDD\u2026"}]:[]],onClick:({key:$,domEvent:N})=>{N.stopPropagation(),!I&&(w(""),$==="open"?(f(!1),o()):$==="copy-cwd"&&t.cwd?.trim()?jf(t.cwd).then(()=>f(!1)).catch(P=>w(xs(P,"\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 yge=B(Ee(),1);function ND({active:e,onChange:t,label:r="\u53EA\u770B\u6D3B\u52A8\u4F1A\u8BDD"}){return(0,yge.jsx)(Ne,{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 PD(e,t){let r=[...new Set(e.filter(a=>a.trim().length>0))];if(!r.length)return;await an.deleteSessions(r);let n=Ka.getRuntime();try{let a=Wr.getSnapshot();if(n&&t&&a.taskId===t.id&&a.layout){let o=r.reduce((l,c)=>wD(l,c),a.layout);await n.saveTaskLayout(o)}}finally{await n?.refreshSessions()}}async function RD(e,t){await an.batchArchiveSessions([e],t),await Ka.getRuntime()?.refreshSessions()}var r0=B(_(),1),Lb=B(Ee(),1);function OD({open:e,size:t=16,className:r=""}){return(0,Lb.jsx)("span",{className:"sidebar-disclosure-chevron","data-open":e,"aria-hidden":"true",children:(0,Lb.jsx)(Ae,{name:"chevronDown",size:t,className:r})})}function wge(e,t=!1){let r=r0.useContext(Ss),n=`wand.sidebar.${e}`,a=()=>{try{let f=window.localStorage.getItem(n);return f===null?t:f==="true"}catch{return t}},[o,l]=r0.useState(a),c=r?.normal[e]??o,d=f=>{l(f),r?.setNormal(e,f);try{window.localStorage.setItem(n,String(f))}catch{return}};return[c,()=>d(!c),d]}function xge(e,t=!1,r=!1,n,a=!0){let o=r0.useContext(Ss),[l,,c]=wge(e,t),[d,f]=r0.useState(()=>{try{return window.localStorage.getItem(`wand.sidebar.${e}`)!==null}catch{return!1}}),h=d||o?.normal[e]!==void 0;return[xD(o?.mode??"full",h?!l:n??!l,o?.overrides[e],r,!!o?.query.trim(),a),g=>{o?.query.trim()||(!o||o.mode==="full"?(f(!0),c(!g)):o.setOverride(e,g))}]}function Hb(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,x=Math.max(0,y-(r.scrollHeight-r.clientHeight));x&&(c.style.height=`${c.offsetHeight+x}px`),r.scrollTop=y},f=typeof ResizeObserver>"u"?null:new ResizeObserver(d),h=r.firstElementChild;h&&f?.observe(h);let g=()=>{f?.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 zD(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&&Hb(e.currentTarget,()=>r(n))}function Wb({id:e,open:t,children:r}){let n=r0.useRef(null);return r0.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)}"]`)],f=a.parentElement?.closest(".wand-sidebar-disclosure");for(;f;)d.push(c?.querySelector(`[aria-controls="${CSS.escape(f.id)}"]`)),f=f.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,Lb.jsx)("div",{ref:n,id:e,className:"wand-sidebar-disclosure","data-open":t,inert:!t,"aria-hidden":!t,children:(0,Lb.jsx)(sr,{children:(0,Lb.jsx)(N4,{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 YIe=B(Ee(),1);function LD(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 T2(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":Hc(e)?e.status==="thinking"?"thinking":"running":Gf(e)?"queued":Pi(e)?"just-completed":"none"}function Ub(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(Hc(e))return e.status==="thinking"?{label:"\u601D\u8003\u4E2D",icon:"brain",tone:"accent"}:{label:"\u8FD0\u884C\u4E2D",icon:"refresh",tone:"accent",spinning:!0};if(Gf(e))return{label:"\u6392\u961F\u4E2D",icon:"history",tone:"muted"};if(Pi(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 Ege(e,t){let r=e.filter(Zh).length,n=e.filter(Hc).length,a=t?.queuedExecutionCount??e.filter(Gf).length,o=n>0||t?.executionStatus==="running",l=t?.executionStatus==="queued"||e.some(Gf),c=e.filter(d=>!Zh(d)&&!Hc(d)&&Pi(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 Lq(e,t){return t.standaloneSessions.length>0&&t.standaloneSessions.every(r=>e.sessionIds.includes(r.id))}function kge(e,t){let r=new Set(t.standaloneSessions.map(n=>n.id));return{...e,sessionIds:Lq(e,t)?e.sessionIds.filter(n=>!r.has(n)):[...new Set([...e.sessionIds,...r])]}}function Hq(e){return`${e.workspaceName} - \u672A\u5206\u7EC4\u4EFB\u52A1`}function Cge(e){return{id:`ungrouped:${e.workspaceId}`,workspaceId:e.workspaceId,name:Hq(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 ku(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 Sge(e,t,r,n={}){return t.archived||t.status==="done"?[]:e.tasks.some(a=>a.id===t.parentWorkspaceTaskId&&ku(r,a.name))||ku(r,e.workspaceName,e.workspaceCwd,t.name,t.cwd)?t.sessions:t.sessions.filter(a=>ku(r,a.title,n[a.id],a.cwd,a.provider,a.employeeName,a.teamStep?.title,a.teamStep?.memberName,a.teamChat?.chatTitle))}function Fge(e,t,r={}){let n=new Map(e.flatMap(f=>f.tasks.map(h=>[h.id,f.workspaceId]))),a=new Map(e.flatMap(f=>f.tasks.map(h=>[h.id,h]))),o=f=>{let h=f,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(f=>({...f,tasks:e.flatMap(h=>h.tasks.filter(g=>g.parentWorkspaceTaskId?o(g)===f.workspaceId:h.workspaceId===f.workspaceId))})).map(f=>{let h=f.tasks,g=new Set(h.filter(y=>!y.archived&&y.status!=="done"&&(y.sessions.length>0||y.executionStatus==="queued"||y.executionStatus==="running"||t.trim()&&ku(t,y.name,y.cwd))).map(y=>y.id)),v=new Map(h.map(y=>[y.id,y]));for(let y of[...g]){let x=v.get(y)?.parentWorkspaceTaskId,w=new Set;for(;x&&!w.has(x);)w.add(x),g.add(x),x=v.get(x)?.parentWorkspaceTaskId}return{...f,workspaceName:f.global?"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A":f.workspaceName,tasks:h.filter(y=>g.has(y.id))}}).filter(f=>f.tasks.length>0||f.standaloneSessions.length>0||!!(t.trim()&&f.archivedSessions?.length)).sort((f,h)=>+!!f.global-+!!h.global);if(!t.trim())return l;let c=(...f)=>ku(t,...f),d=f=>[f.title,f.cwd,f.provider,r[f.id]].filter(Boolean).join(" ");return l.flatMap(f=>{let h=f.workspaceName;if(c(h,f.workspaceCwd))return[f];let g=f.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 f.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=f.tasks.find(S=>S.id===C)?.parentWorkspaceTaskId}let y=f.tasks.filter(F=>v.has(F.id)),x=Hq(f),w=f.standaloneSessions.filter(F=>c(x,d(F))),k=f.archivedSessions?.filter(F=>c(x,d(F)));return y.length||w.length||k?.length||c(x)?[{...f,tasks:y,standaloneSessions:w,archivedSessions:k}]:[]})}var fl=B(_(),1);function Dge(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,f)=>d+f,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 f=a(o-d);if(!Number.isFinite(f)||f<=0||d*(r+l)+f>e)break;c=d}return{titles:!1,count:c}}var $n=B(Ee(),1),Age=__wandCssTextPool[11];function $ge({session:e}){let t=T2(e),r=LD(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)(Ae,{name:"check",size:8}):(0,$n.jsx)(pi,{color:r})})}function HD({sessions:e,expanded:t,selectedSessionId:r,liveTitles:n,label:a,className:o="",disabled:l=!1,expansionRef:c,onActivate:d,onExpand:f}){let h=fl.useRef(null),g=fl.useRef(null),v=fl.useRef(null),y=fl.useRef(null),x=fl.useRef(null),[w,k]=fl.useState({titles:!1,count:0}),[F,C]=fl.useState(!1),[D,S]=fl.useState(null),A=e.map((H,q)=>Rb(H,q,n?.[H.id])),I=JSON.stringify(e.map((H,q)=>[H.id,A[q]]));if(fl.useLayoutEffect(()=>{Sa("wand-sidebar-session-preview",Age)},[]),fl.useLayoutEffect(()=>{let H=h.current,q=g.current;if(!H||!q||!v.current||!y.current||!x.current)return;let L=!0,R=()=>{if(!L)return;let z=getComputedStyle(H),Q=Number.parseFloat(z.columnGap)||0,K=(Number.parseFloat(z.paddingInlineStart)||0)+(Number.parseFloat(z.paddingInlineEnd)||0),Z=H.clientWidth-K,T=v.current.getBoundingClientRect().width,U=T>0&&T*e.length+Q*(e.length-1)<=Z;C(re=>re===U?re:U);let X=U&&q.children.length===e.length?Array.from(q.children).map(re=>re.getBoundingClientRect().width):Array(e.length).fill(0),Y=Dge(Z,X,T,Q,re=>(x.current.textContent=`+${re}`,y.current.getBoundingClientRect().width));k(re=>re.titles===Y.titles&&re.count===Y.count?re:Y)};R();let W=typeof ResizeObserver>"u"?null:new ResizeObserver(R);return W?.observe(H),W?.observe(q),window.addEventListener("resize",R),document.fonts?.ready.then(R),document.fonts?.addEventListener("loadingdone",R),()=>{L=!1,W?.disconnect(),window.removeEventListener("resize",R),document.fonts?.removeEventListener("loadingdone",R)}},[I,F]),!e.length)return null;let j=e.slice(0,w.count),$=e.length-j.length,N=e.slice(j.length).some(H=>H.id===r),P=(H,q,L)=>(0,$n.jsxs)("span",{className:"sidebar-session-tag-content",children:[(0,$n.jsx)($ge,{session:H}),(0,$n.jsx)(Qh,{session:H,size:14}),L?(0,$n.jsx)("span",{className:"sidebar-session-tag-title",children:A[q]}):null]}),O=()=>{c?.current?.focus({preventScroll:!0})},V=`\u8FD8\u6709 ${$} \u4E2A\u5339\u914D\u4F1A\u8BDD${N?"\uFF0C\u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}\uFF0C\u5C55\u5F00\u5B8C\u6574\u5217\u8868`;return(0,$n.jsx)(sr,{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":w.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=Ub(H),R=Eu(H),W=R?ou(R,H.engine):"\u7EC8\u7AEF",z=`${A[q]} \xB7 ${W} \xB7 ${L.label}`;return(0,$n.jsx)(zo,{title:z,open:t||D===H.id?!1:void 0,children:(0,$n.jsx)(Hf,{size:"sm",kind:"ghost",className:"sidebar-session-tag","data-preview-session-id":H.id,"data-titles":w.titles,"aria-label":z,"aria-pressed":H.id===r,disabled:l,onMouseEnter:()=>S(Q=>Q===H.id?null:Q),onFocus:()=>S(Q=>Q===H.id?null:Q),onClick:Q=>{S(H.id),Q.stopPropagation(),d(H)},children:P(H,q,w.titles)})},H.id)}),$>0?(0,$n.jsx)(zo,{title:V,open:t?!1:void 0,children:(0,$n.jsxs)(Hf,{size:"sm",kind:"ghost",className:"sidebar-session-more","data-hidden-count":$,"data-contains-current":N,"aria-label":V,"aria-expanded":t,"aria-controls":c?.current?.getAttribute("aria-controls")??void 0,disabled:l||!f,onClick:H=>{H.stopPropagation(),O(),f?.()},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)(Hf,{size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag","data-titles":"true",children:P(H,q,!0)},H.id)):null}),(0,$n.jsx)(Hf,{ref:v,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag",children:P(e[0],0,!1)}),(0,$n.jsx)(Hf,{ref:y,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-more",children:(0,$n.jsxs)("span",{ref:x,children:["+",e.length]})})]})]})})})})}var Bge=B(_(),1),$2=B(Ee(),1),Ige=__wandCssTextPool[12];function j2({id:e,open:t,label:r,toggleRef:n,toggleClassName:a="",disabled:o=!1,hasSessions:l=!0,reserve:c=!1,inlineToggle:d=!1,onOpenChange:f,children:h}){return Bge.useLayoutEffect(()=>{Sa("wand-sidebar-session-area",Ige)},[]),!l&&!c?null:(0,$2.jsxs)("div",{className:"sidebar-session-area","data-empty":!l||void 0,"data-inline-toggle":d||void 0,children:[l&&!d?(0,$2.jsx)(Mr,{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(),Hb(g.currentTarget,()=>f(!t))},onKeyDown:g=>zD(g,t,f),children:(0,$2.jsx)(OD,{open:t,size:14})}):null,(0,$2.jsx)("div",{className:"sidebar-session-area-content",children:h})]})}var Mge=8,Pq=["terminal","blank-terminal"];function I2(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 qq(e){return e.startedAt??""}function Rq(e){let t=Date.parse(qq(e));return Number.isFinite(t)?t:0}function n0(e,t){return Rq(t.session)-Rq(e.session)||e.session.id.localeCompare(t.session.id)}function Tge(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(n0)}function jge(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 x2(a.provider)}}function _ge(e,t={}){let r=t.employees??[],n=Math.max(0,t.limit??Mge),a=[...e].sort(n0),o=new Map,l=C=>{let{key:D,kind:S}=I2(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=>!B2(C)),d=a.filter(B2),f=c.slice(0,n),h=Wq(a,t),g=[...h.filter(C=>!B2(C)).slice(0,n),...h.filter(B2)],v=h.find(C=>C.session.id===t.selectedSessionId);v&&!g.includes(v)&&g.push(v);let y=new Set([...f,...d,...g].map(C=>I2(C.session).key)),x=new Map;for(let C of g){let{key:D}=I2(C.session),S=x.get(D);S?S.push(C):x.set(D,[C])}let w=[...o.entries()].filter(([C])=>y.has(C)).map(([C,D])=>{let S=D.entries,A=(x.get(C)??[]).sort(n0);return{key:C,kind:D.kind,title:jge(D.kind,S,r),employeeId:D.kind==="employee"?S[0].session.employeeId??null:null,entries:A,latestSession:S[0].session,totalCount:S.length,latestStartedAt:qq(S[0].session),activeCount:A.filter(I=>qc(I.session)).length,showsHeader:!0}}),k=w.filter(C=>C.entries.length>0&&!Pq.includes(C.kind)).sort((C,D)=>Date.parse(D.latestStartedAt||"")-Date.parse(C.latestStartedAt||"")||C.key.localeCompare(D.key)),F=Pq.map(C=>w.find(D=>D.kind===C&&D.entries.length>0)).filter(C=>!!C);return[...k,...F]}function B2(e){let t=I2(e.session).kind;return t==="terminal"||t==="blank-terminal"}function Nge(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 Wq(e,t={}){let r=t.query?.trim().toLowerCase()??"",n=t.employees??[];return e.filter(a=>r&&!Nge(a,n).includes(r)?!1:t.activeOnly?qc(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 t0=null,jD=new Set;function Pge(e){t0&&e&&t0.kind===e.kind&&t0.message===e.message||t0===null&&e===null||(t0=e?{...e}:null,jD.forEach(t=>t()))}function _2(){return t0}function WD(e){return jD.add(e),()=>jD.delete(e)}var Oq=B(_(),1),Xa=B(Ee(),1);function UD({label:e,count:t,totalCount:r=t,description:n,activity:a,containsCurrent:o=!1,avatarNode:l,action:c,expanded:d=!0,onToggle:f,onSetOpen:h,onActivate:g,toggleRef:v,collapsedPreview:y,children:x}){let w=Oq.useId(),k=Oq.useId(),F=y!==void 0,C=S=>{h?h(S):S!==d&&f?.()},D=(0,Xa.jsx)(Wb,{id:w,open:d,children:(0,Xa.jsx)("div",{className:"im-sidebar-group-inner",style:{paddingInlineStart:4},children:x})});return(0,Xa.jsxs)("div",{className:`im-sidebar-group${d?" is-expanded":""}`,onKeyDown:S=>{if(S.key!=="Escape"||S.defaultPrevented||!d||!h&&!f||!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&&Hb(A,()=>C(!1))},children:[(0,Xa.jsxs)(Xe,{align:"center",gap:4,className:"im-sidebar-group-header",children:[(0,Xa.jsx)(qb,{title:`${e} \xB7 ${n??`${r} \u4E2A\u4F1A\u8BDD`}`,selector:".im-sidebar-group-title",children:(0,Xa.jsxs)(Ne,{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:w,"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():Hb(S.currentTarget,()=>C(!d)),onKeyDown:g?void 0:S=>zD(S,d,C),children:[F?null:(0,Xa.jsx)(OD,{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)(zt.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)(zt.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)(pi,{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)(j2,{id:w,open:d,label:e,toggleRef:v,hasSessions:t>0,onOpenChange:C,children:[y,D]}):D]})}var Rge=B(_(),1),Zf=B(Ee(),1);function VD({id:e,avatarNode:t,title:r,titleGenerating:n=!1,state:a,glow:o,summary:l,active:c=!1,onClick:d}){let f=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=Rge.useId();return(0,Zf.jsx)(qb,{title:`${r} \xB7 ${l}`,selector:".im-sidebar-item-name",children:(0,Zf.jsxs)(Ne,{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,Zf.jsx)("span",{className:ct("im-sidebar-item-avatar-wrap",f!=="none"&&`wand-logo-glow glow-${f}`),style:{width:28,height:28,display:"inline-flex",flexShrink:0},"data-glow":f,"aria-hidden":"true",children:(0,Zf.jsx)(pi,{dot:f!=="none",color:LD(f),children:t})}),(0,Zf.jsxs)(Xe,{vertical:!0,className:"im-sidebar-item-body",style:{minWidth:0,textAlign:"start",flex:1},children:[(0,Zf.jsx)(zt.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,Zf.jsx)(zt.Text,{ellipsis:!0,type:"secondary",id:h,className:"im-sidebar-item-summary",style:{fontSize:12},children:l})]})]})})}var Jf=B(_(),1);function P2(){Sa("wand-sidebar-layout",__wandCssTextPool[13])}var N2=B(Ee(),1);function R2({value:e,children:t,animate:r=!0}){Jf.useLayoutEffect(()=>{P2()},[]);let n=Jf.useContext(Ss),a=ca(),o=Jf.useRef({value:e,children:t,scope:n}),[l,c]=Jf.useState(null),[d,f]=Jf.useState(!1);return Jf.useLayoutEffect(()=>{let h=0;return a||!r?(c(null),f(!1)):o.current.value!==e&&(c(o.current),f(!0),h=requestAnimationFrame(()=>f(!1))),()=>cancelAnimationFrame(h)},[e,a,r]),Jf.useLayoutEffect(()=>{o.current={value:e,children:t,scope:n}}),(0,N2.jsxs)("div",{className:"sidebar-projection-swap","data-entering":d,children:[(0,N2.jsx)("div",{className:"sidebar-projection-current",children:t}),l?(0,N2.jsx)("div",{className:"sidebar-projection-old","aria-hidden":"true",inert:!0,onTransitionEnd:h=>{h.target===h.currentTarget&&h.propertyName==="opacity"&&c(null)},children:(0,N2.jsx)(Ss.Provider,{value:l.scope,children:l.children})}):null]})}var ep=null,GD=new Set;function Uq(e){ep=e;for(let t of GD)t()}var Vc={subscribe(e){return GD.add(e),()=>GD.delete(e)},getSnapshot(){return ep},open(e,t,r=null){if(ep?.sessionId===e&&ep.toolId===t){this.close();return}Uq({sessionId:e,toolId:t,trigger:r})},isOpen(){return ep!==null},close(){let e=ep?.trigger;Uq(null),e?.isConnected&&e.focus({preventScroll:!0})},closeIfOpen(){return ep?(this.close(),!0):!1}};var XD="wand-chat-width",Oge="data-chat-width";function Vq(e){return e==="column"?"column":"full"}function Gq(){try{return Vq(window.localStorage.getItem(XD))}catch{return"full"}}function Kq(e){typeof document>"u"||document.documentElement.setAttribute(Oge,e)}var O2=Gq(),KD=new Set;Kq(O2);var zge={subscribe(e){return KD.add(e),()=>{KD.delete(e)}},getSnapshot(){return O2},getServerSnapshot(){return"full"}};function Xq(e){if(e!==O2){O2=e,Kq(e);for(let t of KD)t()}}function Lge(e){let t=Vq(e),r=!0;try{window.localStorage.setItem(XD,t)}catch{r=!1}return Xq(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===XD||e.key===null)&&Xq(Gq())});function Gc(){return typeof document<"u"&&document.documentElement?.dataset.wandPage==="settings"}function Hge(){return Gc()&&document.documentElement.dataset.wandSettingsAuth==="client"}var pl=B(_(),1);function qge(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 Cu=B(Ee(),1);function QD({compact:e=!1,visible:t=!0}){let[r,n]=pl.useState({pending:!1,phase:"idle"}),[a,o]=pl.useState(!1),[l,c]=pl.useState(!1),[d,f]=pl.useState(""),h=pl.useRef(0),g=pl.useRef(!0),v=pl.useRef(!1),y=pl.useRef(null);zn(a,()=>{o(!1),y.current?.focus()}),pl.useEffect(()=>{t||o(!1)},[t]),pl.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,N=setTimeout(()=>j.abort(),1e4);try{let P=await yt("/api/daemon-maintenance",{signal:j.signal,cache:"no-store"});!C&&$===h.current&&!v.current&&typeof P.pending=="boolean"&&["idle","waiting","updating","retrying"].includes(P.phase)&&n(P)}catch{}finally{clearTimeout(N),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 x=async()=>{if(!v.current){v.current=!0,o(!1);try{let C=await vn.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),f("");let D=await yt("/api/daemon-maintenance/force-update",{...hn({confirmInterrupt:!0}),signal:AbortSignal.timeout(6e4)});g.current&&n(D)}catch(C){g.current&&(f(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 w=l||r.phase==="updating",k=w?"\u7EC4\u4EF6\u66F4\u65B0\u4E2D":r.phase==="retrying"?"\u7EC4\u4EF6\u66F4\u65B0\u5F85\u91CD\u8BD5":"\u7EC4\u4EF6\u5F85\u66F4\u65B0",F=(0,Cu.jsx)(Ne,{kind:"ghost",size:"small",loading:l,disabled:w||r.canForceUpdate===!1,"data-daemon-update-action":!0,title:r.canForceUpdate===!1?"\u9700\u8981\u7BA1\u7406\u5458\u6743\u9650":void 0,onClick:()=>{x()},children:"\u5F3A\u5236\u66F4\u65B0"});return(0,Cu.jsxs)(Xe,{className:"daemon-update-notice",align:"center",gap:4,children:[(0,Cu.jsx)(Sh,{open:a,onOpenChange:o,trigger:"click",placement:"bottomLeft",content:(0,Cu.jsxs)(Xe,{vertical:!0,gap:"small",style:{maxWidth:"min(280px, calc(100vw - 48px))"},children:[(0,Cu.jsx)(zt.Text,{children:l?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":qge(r)}),d&&(0,Cu.jsx)(zt.Text,{type:"danger",role:"alert",children:d}),e&&F]}),children:(0,Cu.jsxs)(Ne,{ref:y,kind:"ghost",size:"small","data-daemon-update-status":!0,"aria-label":k,"aria-expanded":a,title:k,children:[(0,Cu.jsx)(Ae,{name:"info",size:12}),(0,Cu.jsx)("span",{hidden:e,role:"status","aria-live":"polite",children:k})]})}),!e&&F]})}var z2=new Map;function Qq(e,t){if(t())return Promise.resolve();let r=z2.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,f=g=>{d||(d=!0,clearTimeout(h),c.onload=null,c.onerror=null,g?(c.remove(),l(g)):o())},h=setTimeout(()=>f(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5\u3002")),2e4);c.onload=()=>f(t()?void 0:new Error("\u7EC4\u4EF6\u52A0\u8F7D\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u3002")),c.onerror=()=>f(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")),document.head.appendChild(c)}).finally(()=>{z2.get(e)===a&&z2.delete(e)});return z2.set(e,a),a}async function Wge(){let e=globalThis;return await Qq("qrcode",()=>typeof e.QRCodeLib?.toCanvas=="function"),e.QRCodeLib}async function tp(){await Qq("xterm",()=>{let e=globalThis.XTermLib;return typeof e?.Terminal=="function"&&typeof e.FitAddon=="function"})}async function YD(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 a0=null,L2=new Set;function ZD(e){return a0=e,L2.forEach(t=>t()),()=>{a0===e&&(a0=null,L2.forEach(t=>t()))}}function rp(){if(!a0)throw new Error("\u7FA4\u804A\u8F93\u5165\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002");return a0}var i0={discardScope:e=>rp().discardScope?.(e),ready:()=>a0!==null,subscribeReady:e=>(L2.add(e),()=>{L2.delete(e)}),read:e=>rp().read(e),edit:(e,t)=>rp().edit(e,t),submit:(e,t,r)=>rp().submit(e,t,r),subscribe:e=>rp().subscribe(e),revision:e=>rp().read(e).revision,transfer:(e,t,r)=>rp().transfer?.(e,t,r)??!1};var Vo=B(_(),1),JD=new Set;function H2(e){for(let t of JD)t(e)}function s0(e){return JD.add(e),()=>{JD.delete(e)}}var eA=new Set;function Vb(e){Jq();for(let t of eA)t(e)}function Yq(e){return eA.add(e),()=>{eA.delete(e)}}var tA=new Set;function aA(e){for(let t of tA)t(e)}function Zq(e){return tA.add(e),()=>{tA.delete(e)}}function Uge(e){return yt(Kc(e,"/live"))}var Kc=(e,t="")=>`/api/ai-team-runs/${encodeURIComponent(e)}${t}`,Xc=null,o0=null,rA=0,nA=new Set;function Jq(){rA++,Xc=null,o0=null}var Vge=e=>new Promise(t=>{window.setTimeout(t,e)}),Gb={list(){if(Xc)return Promise.resolve(Xc);if(!o0){let e=rA,t=yt("/api/ai-teams").then(r=>{if(e===rA){Xc=r;for(let n of nA)n()}return r}).finally(()=>{o0===t&&(o0=null)});o0=t}return o0},async create(e){let t=await yt("/api/ai-teams",hn(e));return Jq(),t},async update(e,t){let r=await yt(`/api/ai-teams/${encodeURIComponent(e)}`,hn(t,"PUT"));return Vb(r.id),r},async remove(e){await yt(`/api/ai-teams/${encodeURIComponent(e)}`,{method:"DELETE"}),Vb(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 Gb.runsForTask(e).then(r=>r.filter(n=>n.chatSessionId===t))},start(e,t,r){return yt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`,hn({teamId:t,note:r}))},startDirect(e,t){return yt(`/api/ai-teams/${encodeURIComponent(e)}/runs`,hn({note:t.note,workspaceId:t.workspaceId}))},dispatchPlan(e){return yt("/api/team-dispatch/plan",hn({note:e.note,...e.maxMembers===void 0?{}:{maxMembers:e.maxMembers}}))},dispatchStart(e){return yt("/api/team-dispatch/start",hn({workspaceId:e.workspaceId,note:e.note,members:e.members}))},settle(e){return Vge(e==="error"?gh:hh)},detail(e){return yt(Kc(e))},live:Uge,subscribeAiTeamStepLive:Zq,approve(e){return yt(Kc(e,"/approve"),hn({}))},reject(e,t){return yt(Kc(e,"/reject"),hn({feedback:t}))},reply(e,t){return yt(Kc(e,"/reply"),hn({text:t}))},continueRun(e,t){return yt(Kc(e,"/continue"),hn({extraSteps:t}))},completeStep(e,t,r){return yt(Kc(e,`/steps/${encodeURIComponent(t)}/complete`),hn({report:r}))},stop(e){return yt(Kc(e,"/stop"),hn({}))}};function Gge(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 Kge(e){let[t,r]=Vo.useState(null);return Vo.useEffect(()=>{if(!e)return;let n=!0;return Gb.list().then(a=>{n&&r(a)},()=>{n&&r([])}),()=>{n=!1}},[e]),t}function Xge(e){let[t,r]=Vo.useState(()=>Xc??[]),[n,a]=Vo.useState(e&&!Xc),[o,l]=Vo.useState(null),c=Vo.useRef(!1),d=Vo.useRef(e),f=Vo.useRef(0);d.current=e;let h=Vo.useCallback(()=>{if(!c.current||!d.current)return;let g=++f.current,v=()=>c.current&&d.current&&f.current===g;a(!0),Gb.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 Vo.useEffect(()=>{if(!e){a(!1);return}c.current=!0;let g=()=>{!c.current||!d.current||!Xc||(r(Xc),l(null))};nA.add(g),h();let v=Yq(h);return()=>{c.current=!1,f.current++,nA.delete(g),v()}},[e,h]),{teams:t,loading:n,error:o,reload:h}}function iA(){let[e,t]=Vo.useState(0);return Vo.useEffect(()=>{let r=!0,n=()=>{Gb.runs({activeOnly:!0}).then(o=>{r&&t(o.filter(l=>l.status!=="running").length)}).catch(()=>{})};n();let a=s0(n);return()=>{r=!1,a()}},[]),e}function Qge(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 Go=B(_(),1),l0=Ph(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 Yge(){return l0.peek()}function Xb(e){return l0.load(e)}function U2(e){l0.publish(e)}var Zge=["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 V2(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 Zge)n[o]!==void 0&&(a[o]=n[o]);t.push(a)}return t}function Jge(e){return l0.subscribe(e)}function Qb(){l0.invalidate()}function eve(){l0.stale()}var W2=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 eW(e,t){let r=await fetch(e,t),n=await r.json();if(!r.ok)throw new $a(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 tW="wand-conversation-requests-v1",ml=new Map;try{let e=JSON.parse(localStorage.getItem(tW)??"{}");Object.entries(e).slice(0,200).forEach(([t,r])=>{typeof r=="string"&&ml.set(t,r)})}catch{}function q2(){try{localStorage.setItem(tW,JSON.stringify(Object.fromEntries(ml)))}catch{}}var Kb=new Set;function np(){for(let e of Kb)e()}function tve(e){return Kb.add(e),()=>{Kb.delete(e)}}var ap={list:()=>yt("/api/conversations").then(e=>e.conversations),systemSessions:e=>Xb({force:e?.fresh,maxAgeMs:e?.maxAgeMs}).then(t=>t.filter(r=>Fs(r)&&!!r.employeeId)),peekSystemSessions:()=>{let e=Yge();return e?e.filter(t=>Fs(t)&&!!t.employeeId):[]},async updateListState(e,t){let r=await yt(`/api/conversations/${encodeURIComponent(e)}/list-state`,hn(t,"PATCH"));return np(),r},async remove(e){await yt(`/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"}),i0.ready()&&i0.discardScope(`conversation-draft:${location.origin}:local-owner:${e}:`),np()},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 Qge(t,a)}catch(a){if(a instanceof $a&&a.status===404)return yt(`/api/conversations/${encodeURIComponent(e)}`);throw a}},receipt:e=>eW(`/api/conversations/requests/${encodeURIComponent(e)}`),async post(e,t){let r=await YD(e+"\0"+JSON.stringify(t)),n=ml.get(r);if(n)throw new W2(n);if(ml.size>=200)throw new $a("\u8BF7\u5148\u6838\u5BF9\u672A\u786E\u8BA4\u8BF7\u6C42\uFF0C\u518D\u7EE7\u7EED\u63D0\u4EA4\u3002",400);let a=b3();ml.set(r,a),q2();try{let o=await eW(e,hn({...t,requestId:a}));if(o.requestId!==a||o.state==="pending")throw new W2(a);if(o.state==="rejected")throw new $a(o.error||"\u8BF7\u6C42\u672A\u63A5\u53D7\u3002",400);return ml.delete(r),q2(),np(),o}catch(o){throw o instanceof $a&&o.status>=400&&o.status<500&&o.status!==408&&o.status!==409?(ml.delete(r),q2(),Object.assign(o,{httpStatus:o.status})):new W2(a)}},pending:()=>[...ml.values()],async reconcile(e){let t=await this.receipt(e);if(t.state!=="pending"){for(let[r,n]of ml)n===e&&ml.delete(r);q2(),np()}return t}},rve=6e4;function oA(e=!1,t=!0){let[r,n]=Go.useState([]),[a,o]=Go.useState([]),[l,c]=Go.useState(""),[d,f]=Go.useState(!1),h=Go.useRef(0),g=Go.useRef(0),v=Go.useCallback(async(k=!1,F)=>{let C=++h.current,D=g.current;try{let[S,A]=await Promise.all([ap.list(),e?ap.systemSessions({fresh:k,maxAgeMs:F}):Promise.resolve([])]);C===h.current&&(n(S),f(!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=Go.useCallback(()=>{v(!0)},[v]),x=Go.useCallback(()=>{v(!1,rve)},[v]),w=Go.useCallback(()=>{eve(),v(!1)},[v]);return Go.useEffect(()=>{if(e)return Jge(()=>{g.current++,o(ap.peekSystemSessions())})},[e]),Go.useEffect(()=>{if(!t)return;v(),Kb.add(x);let k=[s0(x),vs(x),Jx(w)],F=window.setInterval(()=>{document.hidden||x()},3e4);return()=>{++h.current,Kb.delete(x),k.forEach(C=>C()),clearInterval(F)}},[v,x,w,t]),{items:r,systemSessions:a,error:l,loaded:d,refresh:y}}var u0=B(_(),1),$t=B(Ee(),1),c0=null,Yb=null,nve=ef.aiTeamsChunkSrc;function rW(){if(c0)return Promise.resolve(c0);if(Yb)return Yb;let e=globalThis;return e.__wandAiTeamsChunk?(c0=e.__wandAiTeamsChunk,Promise.resolve(c0)):(Yb=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=nve,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=>(c0=t,t),t=>{throw Yb=null,t}),Yb)}function d0(e=!0){let[t,r]=u0.useState(c0),[n,a]=u0.useState(""),[o,l]=u0.useState(0);u0.useEffect(()=>{if(t||!e)return;let d=!0;return rW().then(f=>{d&&r(f)},f=>{d&&a(_f(f,"AI \u56E2\u961F\u52A0\u8F7D\u5931\u8D25"))}),()=>{d=!1}},[t,o,e]);let c=u0.useCallback(()=>{a(""),l(d=>d+1)},[]);return{chunk:t,error:n,retry:c}}function ave({admin:e}){let[t,r]=u0.useState(!1),{chunk:n,error:a,retry:o}=d0(t);return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(Ne,{kind:"secondary",onClick:()=>r(!0),children:`\u914D\u7F6E\u300C${V5}\u300D\u8C03\u7528\u94FE`}),n?(0,$t.jsx)(n.DecisionChainEditor,{admin:e,open:t,onOpenChange:r,providerOptions:Jm.filter(l=>l.engine!=="sdk").map(l=>({value:l.provider,label:l.label}))}):(0,$t.jsx)(Lc,{open:t,onOpenChange:r,title:`${V5} \xB7 \u8C03\u7528\u94FE`,children:a?(0,$t.jsx)(La,{type:"error",showIcon:!0,title:(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)("span",{children:"\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u52A0\u8F7D\u5931\u8D25\u3002"}),(0,$t.jsx)(Ne,{kind:"soft",onClick:o,children:"\u91CD\u8BD5"})]})}):(0,$t.jsxs)("div",{role:"status","aria-busy":"true",children:[(0,$t.jsx)(_i,{}),"\u6B63\u5728\u52A0\u8F7D\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u2026"]})})]})}function sA(e){let{chunk:t,error:r,retry:n}=d0();return t?(0,$t.jsx)(t.AiTeamsPage,{...e}):(0,$t.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,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(La,{type:"error",showIcon:!0,title:r}),(0,$t.jsx)(Ne,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(_i,{}),(0,$t.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D AI \u56E2\u961F\u2026"})]})})}function ive(e){let{chunk:t,error:r,retry:n}=d0();return t?(0,$t.jsx)(t.EmployeeListPage,{...e}):(0,$t.jsxs)("div",{role:"status",children:[r||"\u6B63\u5728\u8BFB\u53D6\u5458\u5DE5\u8D44\u6599\u2026",r?(0,$t.jsx)(Ne,{onClick:n,children:"\u91CD\u8BD5"}):(0,$t.jsx)(_i,{size:"small"})]})}function ove(e){let{chunk:t}=d0();return t?(0,$t.jsx)(t.TaskTeamRunPanel,{...e}):null}async function sve(e,t){return(await rW()).chatAttachmentPrompt(e,t)}function lve(e){let{chunk:t,error:r,retry:n}=d0(e.active!==!1);if(t)return(0,$t.jsx)(t.ConversationMessages,{...e});let a=e.active===!1;return(0,$t.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,$t.jsxs)($t.Fragment,{children:[r||"\u6B63\u5728\u8BFB\u53D6\u6D88\u606F\u7EC4\u4EF6\u2026",r?(0,$t.jsx)(Ne,{onClick:n,children:"\u91CD\u8BD5"}):null]})})}function lA(e){let{chunk:t,error:r,retry:n}=d0();return t?(0,$t.jsx)(t.TeamChatPage,{...e}):(0,$t.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,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(La,{type:"error",showIcon:!0,title:r}),(0,$t.jsx)(Ne,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)(_i,{}),(0,$t.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u7FA4\u804A\u2026"})]})})}var uve=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 cve(e,t);let o=n?t:t.toLowerCase(),l=[],c=1,d=0,f=a.indexOf(o);for(;f!==-1;)c+=iW(e,d,f),d=f,l.push({start:f,end:f+o.length,line:c}),f=a.indexOf(o,f+o.length);return l}function cve(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 dve(e,t,r){return t<=0?0:(((e%t+t)%t+r)%t+t)%t}function nW(e,t,r){return{message:Ke(t.error,`${r} (HTTP ${e.status})`),status:e.status,size:Aa(t.size,-1)>=0?Aa(t.size):void 0,maxSize:Aa(t.maxSize,-1)>=0?Aa(t.maxSize):void 0}}function fve(e,t,r){return{message:Ke(e.error,r),path:Ke(e.path,t)||t,size:Aa(e.size,-1)>=0?Aa(e.size):void 0,mtime:Ke(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=u2(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||Bb(a.name),lang:a.lang,size:a.size??0,mime:a.mime,mtime:Ke(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:fve(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:Ke(o.path,e),size:Math.max(0,Aa(o.size,new TextEncoder().encode(t).byteLength)),mtime:Ke(o.mtime)||void 0}}}},mve=new pve;function uA(e=0){return{open:!1,revision:e,activePath:null,tabs:[],file:null,status:"idle",failure:null,saving:!1,fontSize:Hh(),wrap:!1,preview:!1,findOpen:!1,findQuery:"",findCaseSensitive:!1,findIndex:0}}function hve(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 gve(e){return`\u300C${e}\u300D`}var vve={async confirmDiscard(e,t){let r=hve(e,gve(t.split("/").pop()||t)),n=await vn.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 vn.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){vn.toast(e,{tone:t})},onSaved(){}};function bve(e){let t=new Set,r=uA(),n=e.runtime??vve,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?_7(S):!1}function f(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:f(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(uA(r.revision+1)))}async function x(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:f(S)}),!0))}catch(j){return I!==a||A.signal.aborted||Oc(j)||!r.open||(o=null,c({status:"error",failure:qa(j,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")})),!1}}async function w(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 N={...$,baseline:A,draft:$.draft,dirty:$.draft!==A,size:I,mtime:j};l.set(S,N);let P=r.activePath?l.get(r.activePath)??null:null;c({saving:!1,file:P,failure:null,tabs:f(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 w(S.path);if($==="reload"){let N=await x(S.path);return N&&n.notify("\u5DF2\u91CD\u65B0\u52A0\u8F7D\u78C1\u76D8\u6587\u4EF6","info"),N}if($==="overwrite"){let N=l.get(S.path);return N?F(N,{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=f(null).filter(N=>N.path!==A);if(j.length===0)return c(uA(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:x(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:Ib(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:dve(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}):x(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=bve({repository:mve}),Zb=oW.controller,Qc=oW.store;var sW=B(_(),1),Jb=B(_(),1),yve=B(tr(),1),e1=B(Ee(),1),t1=Jb.createContext(null);function f0({children:e}){let t=Jb.useContext(t1),r=Jb.useId(),n=t?.registerChrome;Jb.useLayoutEffect(()=>n?.(r),[n,r]);let a=(0,e1.jsx)(FF,{value:"lucide",children:(0,e1.jsx)("div",{className:"wand-workbar-host",children:e})});return t?(0,yve.createPortal)(a,t.chromeHost):a}function p0(){let e=Jb.useContext(t1);return e?(0,e1.jsx)(Mr,{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,e1.jsx)(Ae,{name:"terminal",size:18})}):null}function cA({visible:e}){return e?(0,e1.jsx)(p0,{}):null}var Yc=B(Ee(),1),dA=sW.createContext(!1);function fA(){let e=sW.useSyncExternalStore(dl.subscribe,dl.getSnapshot,dl.getSnapshot);return e.open?(0,Yc.jsx)(f0,{children:(0,Yc.jsxs)(Xe,{align:"center",gap:12,className:"new-work-heading unified-new-work-heading",children:[(0,Yc.jsxs)(Ne,{kind:"ghost","aria-label":"\u8FD4\u56DE\u539F\u9875\u9762",disabled:!e.dismissable,onClick:()=>Ia.close(),children:[(0,Yc.jsx)(Ae,{name:"chevronLeft",size:18}),(0,Yc.jsx)("span",{children:"\u8FD4\u56DE"})]}),(0,Yc.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,Yc.jsx)("div",{className:"workbar-spacer"}),(0,Yc.jsx)(p0,{})]})}):null}function r1(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 Zc=B(_(),1);function wve(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}=wve([...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 xve(e){let{active:t,archived:r}=lW(e.sessions,e.archivedSessions);return{...e,sessions:t,archivedSessions:r}}function Eve(e){return e.map(t=>{let r=lW(t.standaloneSessions,t.archivedSessions);return{...t,tasks:t.tasks.map(xve),standaloneSessions:r.active,archivedSessions:r.archived}})}var pA={groups:[],loading:!0,error:""};function kve(e,t={}){let r=new Set,n=t.subscribeChanges??vs,a=t.setInterval??setInterval,o=t.clearInterval??clearInterval,l=pA,c,d=0,f,h=!1,g,v;function y(w){if(!(l.groups===w.groups&&l.loading===w.loading&&l.error===w.error)){l=w;for(let k of r)k()}}function x(w){if(f)return w&&(h=!0),f;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:Eve(C.groups),loading:!0,error:""})}catch(C){if(k!==d)return;y({...l,error:r1(xs(C,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u5217\u8868\u3002"))})}}while(h&&k===d)}).finally(()=>{k!==d||f!==F||(f=void 0,y({...l,loading:!1}))});return f=F,y({...l,loading:!0}),F}return{getSnapshot:()=>l,getServerSnapshot:()=>pA,reload:()=>x(!0),subscribe(w){return r.add(w),r.size===1&&(v=n(()=>{x(!0)}),g=a(()=>{x(!1)},6e3),x(!1)),()=>{r.delete(w),!(r.size>0)&&(v?.(),v=void 0,g!==void 0&&o(g),g=void 0,d+=1,f=void 0,h=!1,c=void 0,l=pA)}}}}var hl=kve(an),Cve=Object.freeze({groups:[],loading:!0,error:""});function mA(e=0){let t=(0,Zc.useSyncExternalStore)(hl.subscribe,hl.getSnapshot,hl.getServerSnapshot),r=(0,Zc.useRef)(e);return(0,Zc.useEffect)(()=>{r.current!==e&&(r.current=e,hl.reload())},[e]),{...t,reload:hl.reload}}function hA(){let[e,t]=(0,Zc.useState)(!1);(0,Zc.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,Zc.useCallback)(a=>e?hl.subscribe(a):()=>{},[e]),n=(0,Zc.useCallback)(()=>e?hl.getSnapshot():Cve,[e]);return(0,Zc.useSyncExternalStore)(r,n,n)}var Sve="taskboard",Fve="teams",Dve="teamchat",Ave="schedules",$ve="calendar",K2={board:Sve,teams:Fve,teamchat:Dve,schedules:Ave,calendar:$ve},Ko={open:!1,page:"board",workspaceId:"",sessionId:"",runId:"",teamId:"",calendarRange:"month",revision:0},gA=new Set,uW=!1;function G2(e){Ko={...Ko,...e,revision:Ko.revision+1},gA.forEach(t=>t())}function Bve(e){let t=new URLSearchParams(e).get("view");return t==="issues"||Object.values(K2).includes(t??"")}function Ive(e){let t=new URLSearchParams(e).get("view");return Object.keys(K2).find(r=>K2[r]===t)??"board"}function Mve(e){return new URLSearchParams(e).get("run")??""}function cW(){let e=Hn(),t=Bve(e),r=Ive(e),n=new URLSearchParams(e),a=r==="teamchat"?Mve(e):"",o=r==="teams"?n.get("team")??"":"",l=n.get("range")==="week"?"week":"month";t===Ko.open&&r===Ko.page&&a===Ko.runId&&o===Ko.teamId&&l===Ko.calendarRange||G2({open:t,page:r,runId:a,teamId:o,calendarRange:l})}function n1(){uW||typeof window>"u"||(uW=!0,go(cW),cW())}var En={open(e="",t="",r="board",n="",a=""){n1();let o=new URLSearchParams(Hn());Va({view:K2[r],run:r==="teamchat"?n:null,...r==="teams"&&a?{team:a}:{},...r==="board"&&!o.has("directory")&&e?{directory:e}:{}}),G2({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){Va({range:e}),Ko.calendarRange!==e&&G2({calendarRange:e})},close(){n1(),Ko.open&&(Va({view:"workspace"}),Ko.open&&G2({open:!1}))}},gl={subscribe(e){return gA.add(e),()=>{gA.delete(e)}},getSnapshot(){return Ko}};var Tve="wand-model-group/",jve="wand-auto-assign/auto",a1="wand-openrouter-free",Jc=`${a1}/auto`,dW="wand-decision/laya";function ed(e){return e?.startsWith(Tve)===!0}function Su(e){return e?.trim()===jve}function vA(e){return e?.startsWith(`${a1}/`)===!0}function _ve(e){return e===dW}var td="\u514D\u8D39\u5206\u7EC4",vW="opencode-free",Nve="\u514D\u8D39\u5206\u7EC4";function Pve(e){return/^opencode\/[a-z0-9][a-z0-9._-]*$/.test(e)&&e!=="opencode/default"&&e!=="opencode/auto"}function Rve(e){return e.id===vW&&e.provider==="opencode"}var m0="\u667A\u80FD\u5206\u914D",wA="openrouter-free";function Ove(e){return e.id===wA&&e.provider==="pi"||Rve(e)}var X2=32,bA=32,zve=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/;function Lve(e){if(!Array.isArray(e)||e.length>X2*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(!zve.test(l)||!g4(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 f=l===wA,h=l===vW,g=f||h;if(f&&(d!=="pi"||c!==td)||h&&(d!=="opencode"||c!==Nve))throw new Error("\u514D\u8D39\u5206\u7EC4\u7684\u5DE5\u5177\u4E0E\u540D\u79F0\u4E0D\u53EF\u4FEE\u6539\u3002");if(!g&&d==="pi"&&c===td)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 x=(n.get(d)??0)+(g?0:1);if(x>X2)throw new Error(`\u6BCF\u4E2A\u5DE5\u5177\u6700\u591A ${X2} \u4E2A\u5206\u7EC4\u3002`);if(n.set(d,x),!Array.isArray(o.models)||!g&&!o.models.length||o.models.length>(g?128:bA))throw new Error(`\u5206\u7EC4\u9700\u5305\u542B 1\u2013${bA} \u4E2A\u6A21\u578B\uFF1B\u514D\u8D39\u5206\u7EC4\u53EF\u7559\u7A7A\u4F7F\u7528\u81EA\u52A8\u987A\u5E8F\u3002`);let w=o.models.map(k=>{let F=typeof k=="string"?k.trim():"";if(!F||F==="default"||F.length>256||/[\s\x00-\x1f\x7f]/.test(F)||ed(F)||Su(F)||F===Jc||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(vA(F)&&d!=="pi")throw new Error("\u514D\u8D39\u6A21\u578B\u4EC5\u5C5E\u4E8E Pi\u3002");if(f&&!F.startsWith(`${a1}/`)||h&&!Pve(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(w).size!==w.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:w}})}function Hve(e,t){let r=new Set(e);return[...new Set([...t.filter(n=>r.has(n)),...e])]}var ip="default";function fW(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 qve(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 pW=[["claude","models","defaultModel"],["codex","codexModels","defaultCodexModel"],["opencode","opencodeModels","defaultOpenCodeModel"],["grok","grokModels","defaultGrokModel"],["qoder","qoderModels","defaultQoderModel"],["pi","piModels","defaultPiModel"]];function bW(e){let t=e&&typeof e=="object"?e:{},r=t.defaultModels&&typeof t.defaultModels=="object"?t.defaultModels:{},n={},a={},o={};for(let[d,f,h]of pW){let g=Array.isArray(t[f])?t[f]:[],v=g.map(qve).filter(w=>w!==null),y=(typeof r[d]=="string"?r[d]:typeof t[h]=="string"?t[h]:"").trim();y&&(a[d]=y),v.some(w=>w.value===ip)||v.unshift({value:ip,label:y?`\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4\uFF08${y===Jc?td:ed(y)?v.find(w=>w.value===y)?.label||"\u6A21\u578B\u5206\u7EC4":Su(y)?v.find(w=>w.value===y)?.label||m0:y}\uFF09`:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}),n[d]=v;let x={};for(let w of g){let k=typeof w.id=="string"?w.id.trim():"",F=fW(w.reasoningEfforts);if(!k||!F.length)continue;let C=typeof w.defaultReasoningEffort=="string"?w.defaultReasoningEffort.trim():"";x[k]=C?{efforts:F,defaultEffort:C}:{efforts:F}}Object.keys(x).length&&(o[d]=x)}let l=t.thinkingEfforts&&typeof t.thinkingEfforts=="object"?t.thinkingEfforts:{},c={};for(let[d]of pW){let f=fW(l[d]);f.length&&(c[d]=f)}return{byProvider:n,defaultModels:a,effortsByProvider:c,modelEfforts:o,refreshedAt:typeof t.refreshedAt=="string"?t.refreshedAt:""}}function mW(e,t){return!e||!t?[]:e.byProvider[t]??[]}var Wve=/^跟随.*默认$/,Uve=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function Vve(e,t,r){let n=(r??"").trim(),a=c=>c===Jc?td:ed(c)||Su(c)?mW(e,t).find(d=>d.value===c)?.label||(Su(c)?m0:"\u6A21\u578B\u5206\u7EC4"):c;if(n&&n!==ip)return a(n);let o=e?.defaultModels?.[t??""]?.trim();if(o)return a(o);let l=(mW(e,t).find(c=>c.value===ip)?.label.trim()??"").replace(Uve,"").trim();return Wve.test(l)?"":l}function Gve(e,t,r){if(!e)return{efforts:[]};let n=e.modelEfforts[t],a=r?n?.[r]:void 0,o=n?.[ip],l=a?.efforts.length?a:o;return l?.efforts.length?l:{efforts:e.effortsByProvider[t]??[]}}function Kve(e,t){let r=e?.byProvider[t];return r&&r.length>0?r:[{value:ip,label:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}]}var Xve=6e4,Qve=6e4,i1=null,yW=0,hW=0,yA=new Set;function Yve(e){return yA.add(e),()=>{yA.delete(e)}}function gW(e){return JSON.stringify({refreshedAt:e.refreshedAt,byProvider:e.byProvider,defaultModels:e.defaultModels,effortsByProvider:e.effortsByProvider,modelEfforts:e.modelEfforts})}function h0(e){let t=bW(e),r=i1!==null&&gW(i1)===gW(t);if(i1=t,yW=Date.now(),r)return t;for(let n of yA)n(t);return typeof window<"u"&&window.dispatchEvent(new CustomEvent("wand-model-catalog",{detail:e})),t}function xA(){typeof window>"u"||hW||(hW=window.setInterval(()=>{yt("/api/models",{credentials:"same-origin"}).then(e=>{h0(e)}).catch(()=>{})},Xve))}function wW(){return i1&&Date.now()-yW<Qve?i1:null}async function Zve(e){return wW()||h0(await yt("/api/models",{signal:e,credentials:"same-origin"}))}var Jve={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"}},ebe={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 tbe(e,t){let r=Jve[e];return r?.standard===t?"standard":r?.deep===t?"deep":r?.max===t?"max":`${e}:${t}`}function EA(e){return ebe[e]??e}function kA(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=tbe(e,l.effort);o.has(c)||(o.add(c),a.push({id:c,label:l.effort,hint:l.description||l.effort}))}return a}var rbe=B(_(),1),xW="wand-conversations-local-owner-v1";function CA(e){return e==="active"||e==="archived"?e:"all"}function nbe(){let e={};try{let t=JSON.parse(localStorage.getItem(xW)??"{}");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:CA(e.listFilter),activityOnly:e.activityOnly===!0,targets:e.targets??{},filters:e.filters??{},scrolls:e.scrolls??{},focusRequest:null}}function EW(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:CA(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 Fr=EW(nbe()),op=0,Q2=new Set;function Xo(e){Fr={...Fr,...e};try{localStorage.setItem(xW,JSON.stringify({...Fr,directory:!1,focusRequest:null}))}catch{}let t={};"mode"in e&&(t.sidebar=Fr.mode),("active"in e||"directory"in e||"selectedId"in e)&&(t.view=Fr.directory?"contacts":Fr.active?"chats":"workspace",t.sidebar=Fr.mode,t.conversation=Fr.selectedId),"listFilter"in e&&(t.chatFilter=Fr.listFilter==="all"?null:Fr.listFilter),"activityOnly"in e&&(t.chatActivity=Fr.activityOnly?"true":null),"filters"in e&&(t.chatQuery=Fr.filters["list-query"]??"",t.conversationTask=Fr.filters[Fr.selectedId]??""),"targets"in e&&(t.conversationTask=Fr.targets[Fr.selectedId]?.taskId??"",t.conversationRun=Fr.targets[Fr.selectedId]?.runId??"");let r="selectedId"in e||"active"in e||"directory"in e;!r&&Object.keys(e).every(n=>n==="filters")?eD(t):Va(t,r?"push":"replace");for(let n of Q2)n()}go(()=>{let e=EW(Fr);(e.selectedId!==Fr.selectedId||e.active!==Fr.active)&&++op,Fr=e;for(let t of Q2)t()});var Dr={subscribe:e=>(Q2.add(e),()=>{Q2.delete(e)}),getSnapshot:()=>Fr,selectionRevision:()=>op,select:(e,t=!1)=>{let r=++op;Xo({selectedId:e,active:!0,directory:!1,focusRequest:t?{id:e,revision:r}:null})},openTask:(e,t,r)=>{++op,Xo({selectedId:e,active:!0,directory:!1,focusRequest:null,filters:{...Fr.filters,[e]:t},targets:{...Fr.targets,[e]:r?{taskId:t,runId:r}:null}})},consumeFocus:e=>{Fr.focusRequest?.revision===e&&Xo({focusRequest:null})},show:()=>{++op,Xo({active:!0,directory:!1,focusRequest:null})},suspend:()=>{++op,Xo({active:!1,directory:!1,focusRequest:null})},directory:e=>{++op,Xo({directory:e,active:e?!0:Fr.active,focusRequest:null})},mode:e=>Xo({mode:e,active:e==="chats",directory:!1,focusRequest:null}),listFilter:e=>Xo({listFilter:CA(e)}),activityOnly:e=>Xo({activityOnly:e}),target:(e,t)=>Xo({targets:{...Fr.targets,[e]:t}}),filter:(e,t)=>Xo({filters:{...Fr.filters,[e]:t}}),scroll:(e,t)=>Xo({scrolls:{...Fr.scrolls,[e]:t}})};function g0(){return rbe.useSyncExternalStore(Dr.subscribe,Dr.getSnapshot,Dr.getSnapshot)}function abe(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 rd=null,Qa={open:!1,dismissable:!0,initialPath:"",revision:0},Y2=new Set;function kW(e,t=Qa.initialPath){Qa={open:e,dismissable:!0,initialPath:t,revision:Qa.revision+1};for(let r of Y2)r()}function ibe(e){if(!(!Qa.open||Qa.dismissable===e)){Qa={...Qa,dismissable:e};for(let t of Y2)t()}}var nd={open(e){if(!rd)return!1;let t=(e??rd.getInitialPath()).trim();return t?(rd.onOpen?.(),kW(!0,t),!0):!1},close(){Qa.open&&(kW(!1),rd?.onClose?.())},closeIfOpen(){return!Qa.open||!Qa.dismissable?!1:(this.close(),!0)},closeTopmost(){return Qa.open?(Qa.dismissable&&this.close(),!0):!1},isOpen(){return Qa.open},setDismissable(e){ibe(e)},async choose(e){let t=e.trim(),r=rd;return!Qa.open||!r||!t?!1:(await r.applySelection(t),this.close(),!0)}},SA={subscribe(e){return Y2.add(e),()=>Y2.delete(e)},getSnapshot(){return Qa}};function FA(e){return rd=e,()=>{rd===e&&(Qa.open&&nd.close(),rd=null)}}var CW=B(_()),Z2=B(_());function DA(){return DA=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},DA.apply(this,arguments)}var obe=(0,Z2.forwardRef)((e,t)=>{let{prefixCls:r="rc-checkbox",className:n,style:a,checked:o,disabled:l,defaultChecked:c=!1,type:d="checkbox",title:f,onChange:h,...g}=e,v=(0,Z2.useRef)(null),y=(0,Z2.useRef)(null),[x,w]=wr(c,o);(0,Z2.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`]:x,[`${r}-disabled`]:l}),F=C=>{l||("checked"in e||w(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:f,style:a,ref:y},CW.createElement("input",DA({},g,{className:`${r}-input`,ref:v,onChange:F,disabled:l,checked:!!x,type:d})))}),AA=obe,sbe=B(_());function $A(e){let t=sbe.default.useRef(null),r=()=>{fr.cancel(t.current),t.current=null};return[()=>{r(),t.current=fr(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e?.(n)}]}var As=B(_()),lbe=B(_()),ube=lbe.default.createContext(null),SW=ube,cbe=e=>{let{checkboxCls:t,checkboxSize:r,lineWidth:n}=e,a=`${t}-wrapper`,o="@media (hover: hover) and (pointer: fine)";return[{[`${t}-group`]:{...pr(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[a]:{...pr(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0}},[t]:{...pr(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",...af(),"&: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}`,...ox()},[`${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}`,...ox()},[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 dbe(e,t){let r=Nt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return cbe(r)}var FW=kt("Checkbox",(e,{prefixCls:t})=>[dbe(t,e)]),fbe=(e,t)=>{let{prefixCls:r,children:n,indeterminate:a=!1,onMouseEnter:o,onMouseLeave:l,skipGroup:c=!1,disabled:d,rootClassName:f,className:h,style:g,classNames:v,styles:y,name:x,value:w,checked:k,defaultChecked:F,onChange:C,...D}=e,{getPrefixCls:S,direction:A,className:I,style:j,classNames:$,styles:N}=_t("checkbox"),P=As.useContext(SW),{isFormItemInput:O}=As.useContext(so),V=As.useContext(ci),H=d??P?.disabled??V,[q,L]=wr(F,k),R=q,W=xt(ye=>{L(ye.target.checked),C?.(ye),!c&&P?.toggleOption&&P.toggleOption({label:n,value:w})});P&&!c&&(R=P.value.includes(w));let z=As.useRef(null),Q=jo(t,z);As.useEffect(()=>{if(!(c||!P))return P.registerValue(w),()=>{P.cancelValue(w)}},[w,c]),As.useEffect(()=>{z.current?.input&&(z.current.input.indeterminate=a)},[a]);let K=S("checkbox",r),Z=Yn(K),[T,U]=FW(K,Z),X={...D},Y={...e,indeterminate:a,disabled:H,checked:R},re=lt(j),J=lt(g),[se,me]=jt([$,v],[N,re,y,J],{props:Y}),le=te(`${K}-wrapper`,{[`${K}-rtl`]:A==="rtl",[`${K}-wrapper-checked`]:R,[`${K}-wrapper-disabled`]:H,[`${K}-wrapper-in-form-item`]:O},I,h,se.root,f,U,Z,T),he=te(se.icon,{[`${K}-indeterminate`]:a},Iv,T),[ae,ce]=$A(X.onClick);return As.createElement(nh,{component:"Checkbox",disabled:H},As.createElement("label",{className:le,style:me.root,onMouseEnter:o,onMouseLeave:l,onClick:ae},As.createElement(AA,{...X,name:!c&&P?P.name:x,checked:R,onClick:ce,onChange:W,prefixCls:K,className:he,style:me.icon,disabled:H,ref:Q,value:w}),or(n)&&As.createElement("span",{className:te(`${K}-label`,se.label),style:me.label},n)))},pbe=As.forwardRef(fbe),DW=pbe,ad=B(_()),mbe=ad.forwardRef((e,t)=>{let{defaultValue:r,children:n,options:a=[],prefixCls:o,className:l,rootClassName:c,style:d,onChange:f,role:h="group",...g}=e,{getPrefixCls:v,direction:y}=ad.useContext(wt),[x,w]=wr(r||[],g.value),k=x||[],[F,C]=ad.useState([]),D=ad.useMemo(()=>a.map(R=>$i(R)||Ra(R)?{label:R,value:R}:R).filter(R=>Qr(R)&&Qr(R.value)),[a]),S=R=>{C(W=>W.filter(z=>z!==R))},A=R=>{C(W=>[].concat(Xr(W),[R]))},I=R=>{let W=k.indexOf(R.value),z=Xr(k);W===-1?z.push(R.value):z.splice(W,1),w(z),f?.(z.filter(Q=>F.includes(Q)).sort((Q,K)=>{let Z=D.findIndex(U=>U.value===Q),T=D.findIndex(U=>U.value===K);return Z-T}))},j=v("checkbox",o),$=`${j}-group`,N=Yn(j),[P,O]=FW(j,N),V=xr(g,["value","disabled"]),H=Array.isArray(D)&&D.length>0?D.map(R=>ad.createElement(DW,{prefixCls:j,key:R.value.toString(),disabled:"disabled"in R?R.disabled:g.disabled,value:R.value,checked:k.includes(R.value),onChange:R.onChange,className:te(`${$}-item`,R.className),style:R.style,title:R.title,id:R.id,required:R.required},R.label)):n,q=ad.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,O,N,P);return ad.createElement("div",{className:L,style:d,role:h,...V,ref:t},ad.createElement(SW.Provider,{value:q},H))}),hbe=mbe,BA=DW;BA.Group=hbe;BA.__ANT_CHECKBOX=!0;var IA=BA;var AW=B(_(),1),$W=B(Ee(),1);function MA({value:e,onValueChange:t,onSearch:r,label:n,placeholder:a=n,disabled:o,className:l,inputRef:c,listId:d,activeOptionId:f}){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)(bf,{className:ct("wand-ui-search",l),startSlot:(0,$W.jsx)(Ae,{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":f,onCompositionStart:()=>{v.current=!0},onCompositionEnd:x=>{v.current=!1,r?.(x.currentTarget.value)},onChange:x=>{let w=x.currentTarget.value;t(w),v.current||r?.(w)},onKeyDown:x=>{v.current||x.nativeEvent.isComposing||x.key==="Escape"&&e&&(x.preventDefault(),x.stopPropagation(),y())}})}var vl=B(_()),sp=B(_()),J2=B(_()),v0=void 0;function gbe(e,t){let{prefixCls:r,invalidate:n,item:a,renderItem:o,responsive:l,responsiveDisabled:c,registerSize:d,itemKey:f,className:h,style:g,children:v,display:y,order:x,component:w="div",...k}=e,F=l&&!y;function C(j){d(f,j)}J2.useEffect(()=>()=>{C(null)},[]);let D=o&&a!==v0?o(a,{index:x}):v,S;n||(S={opacity:F?0:1,height:F?0:v0,overflowY:F?"hidden":v0,order:l?x:v0,pointerEvents:F?"none":v0,position:F?"absolute":v0});let A={};F&&(A["aria-hidden"]=!0);let I=J2.createElement(w,Dn({className:te(!n&&r,h),style:{...S,...g}},A,k,{ref:t}),D);return l&&(I=J2.createElement(ka,{onResize:({offsetWidth:j})=>{C(j)},disabled:c},I)),I}var vbe=J2.forwardRef(gbe),o1=vbe,BW=B(_()),bbe=B(tr());function ybe(e){if(typeof MessageChannel>"u")fr(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function wbe(){let e=BW.useRef(null);return t=>{e.current||(e.current=[],ybe(()=>{(0,bbe.unstable_batchedUpdates)(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(t)}}function b0(e,t){let[r,n]=BW.useState(t),a=xt(o=>{e(()=>{n(o)})});return[r,a]}var s1=B(_()),xbe=B(_()),e6=xbe.default.createContext(null),Ebe=(e,t)=>{let r=s1.useContext(e6);if(!r){let{component:c="div",...d}=e;return s1.createElement(c,Dn({},d,{ref:t}))}let{className:n,...a}=r,{className:o,...l}=e;return s1.createElement(e6.Provider,{value:null},s1.createElement(o1,Dn({ref:t,className:te(n,o)},a,l)))},kbe=s1.forwardRef(Ebe),Cbe=kbe,IW="responsive",MW="invalidate";function Sbe(e){return`+ ${e.length} ...`}function Fbe(e,t){let{prefixCls:r="rc-overflow",data:n=[],renderItem:a,renderRawItem:o,itemKey:l,itemWidth:c=10,ssr:d,style:f,className:h,maxCount:g,renderRest:v,renderRawRest:y,prefix:x,suffix:w,component:k="div",itemComponent:F,onVisibleChange:C,...D}=e,S=d==="full",A=wbe(),[I,j]=b0(A,null),$=I||0,[N,P]=b0(A,new Map),[O,V]=b0(A,0),[H,q]=b0(A,0),[L,R]=b0(A,0),[W,z]=b0(A,0),[Q,K]=(0,sp.useState)(null),[Z,T]=(0,sp.useState)(null),U=vl.useMemo(()=>Z===null&&S?Number.MAX_SAFE_INTEGER:Z||0,[Z,I]),[X,Y]=(0,sp.useState)(!1),re=`${r}-item`,J=Math.max(O,H),se=g===IW,me=n.length&&se,le=g===MW,he=me||typeof g=="number"&&n.length>g,ae=(0,sp.useMemo)(()=>{let Fe=n;return me?I===null&&S?Fe=n:Fe=n.slice(0,Math.min(n.length,$/c)):typeof g=="number"&&(Fe=n.slice(0,g)),Fe},[n,c,I,g,me]),ce=(0,sp.useMemo)(()=>me?n.slice(U+1):n.slice(ae.length),[n,ae,me,U]),ye=(0,sp.useCallback)((Fe,_e)=>typeof l=="function"?l(Fe):(l&&Fe?.[l])??_e,[l]),Te=(0,sp.useCallback)(a||(Fe=>Fe),[a]);function De(Fe,_e,dt){Z===Fe&&(_e===void 0||_e===Q)||(T(Fe),dt||(Y(Fe<n.length-1),C?.(Fe)),_e!==void 0&&K(_e))}function ke(Fe,_e){j(_e.clientWidth)}function Ce(Fe,_e){P(dt=>{let at=new Map(dt);return _e===null?at.delete(Fe):at.set(Fe,_e),at})}function Le(Fe,_e){q(_e),V(H)}function $e(Fe,_e){R(_e)}function Be(Fe,_e){z(_e)}function Me(Fe){return N.get(ye(ae[Fe],Fe))}er(()=>{if($&&typeof J=="number"&&ae){let Fe=L+W,_e=ae.length,dt=_e-1;if(!_e){De(0,null);return}for(let at=0;at<_e;at+=1){let Ge=Me(at);if(S&&(Ge=Ge||0),Ge===void 0){De(at-1,void 0,!0);break}if(Fe+=Ge,dt===0&&Fe<=$||at===dt-1&&Fe+Me(dt)<=$){De(dt,null);break}else if(Fe+J>$){De(at-1,Fe-Ge-W+H);break}}w&&Me(0)+W>$&&K(null)}},[$,N,H,L,W,ye,ae]);let Ve=X&&!!ce.length,qe={};Q!==null&&me&&(qe={position:"absolute",top:0,insetInlineStart:Q});let Ie={prefixCls:re,responsive:me,component:F,invalidate:le},Pe=o?(Fe,_e)=>{let dt=ye(Fe,_e);return vl.createElement(e6.Provider,{key:dt,value:{...Ie,order:_e,item:Fe,itemKey:dt,registerSize:Ce,display:_e<=U}},o(Fe,_e))}:(Fe,_e)=>{let dt=ye(Fe,_e);return vl.createElement(o1,Dn({},Ie,{order:_e,key:dt,item:Fe,renderItem:Te,itemKey:dt,registerSize:Ce,display:_e<=U}))},Je={order:Ve?U:Number.MAX_SAFE_INTEGER,className:`${re}-rest`,registerSize:Le,display:Ve},gt=v||Sbe,et=y?vl.createElement(e6.Provider,{value:{...Ie,...Je}},y(ce)):vl.createElement(o1,Dn({},Ie,Je),typeof gt=="function"?gt(ce):gt),Ue=vl.createElement(k,Dn({className:te(!le&&r,h),style:f,ref:t},D),x&&vl.createElement(o1,Dn({},Ie,{responsive:se,responsiveDisabled:!me,order:-1,className:`${re}-prefix`,registerSize:$e,display:!0}),x),ae.map(Pe),he?et:null,w&&vl.createElement(o1,Dn({},Ie,{responsive:se,responsiveDisabled:!me,order:U,className:`${re}-suffix`,registerSize:Be,display:!0,style:qe}),w));return se?vl.createElement(ka,{onResize:ke,disabled:!me},Ue):Ue}var t6=vl.forwardRef(Fbe);t6.Item=Cbe;t6.RESPONSIVE=IW;t6.INVALIDATE=MW;var Dbe=t6,lp=Dbe;var dp=B(_()),_A=B(_()),Bs=_A.createContext(null);function Abe(e,t){let r={...e};return Object.keys(t).forEach(n=>{let a=t[n];a!==void 0&&(r[n]=a)}),r}function d1({children:e,locked:t,...r}){let n=_A.useContext(Bs),a=Lm(()=>Abe(n,r),[n,r],(o,l)=>!t&&(o[0]!==l[0]||!yc(o[1],l[1],!0)));return _A.createElement(Bs.Provider,{value:a},e)}var C0=B(_()),$be=[],LW=C0.createContext(null);function s6(){return C0.useContext(LW)}var HW=C0.createContext($be);function S0(e){let t=C0.useContext(HW);return C0.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}var qW=C0.createContext(null),TW=B(_());function VA(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 a6(){return a6=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},a6.apply(this,arguments)}var Bbe=dp.forwardRef((e,t)=>{let{className:r,title:n,eventKey:a,children:o,...l}=e,{prefixCls:c,classNames:d,styles:f}=dp.useContext(Bs),h=`${c}-item-group`;return dp.createElement("li",a6({ref:t,role:"presentation"},l,{onClick:g=>g.stopPropagation(),className:te(h,r)}),dp.createElement("div",{role:"presentation",className:te(`${h}-title`,d?.listTitle),style:f?.listTitle,title:typeof n=="string"?n:void 0},n),dp.createElement("ul",{role:"group",className:te(`${h}-list`,d?.list),style:f?.list},o))}),Ibe=dp.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=S0(r),o=VA(n,a);return s6()?o:dp.createElement(Bbe,a6({ref:t},xr(e,["warnKey"])),o)}),GA=Ibe,Or=B(_()),Mbe=B(_()),Tbe=B(tr()),WW=B(_()),UW=WW.createContext(null);function VW(e,t){return`${e}-${t}`}function GW(e){let t=WW.useContext(UW);return VW(t,e)}var jbe=B(_()),_be=jbe.createContext({}),KA=_be,TA=B(_()),{LEFT:NA,RIGHT:PA,UP:RA,DOWN:r6,ENTER:n6,ESC:KW,HOME:l1,END:u1}=Rn,jW=[RA,r6,NA,PA];function Nbe(e,t,r,n){let a="prev",o="next",l="children",c="parent";if(e==="inline"&&n===n6)return{inlineTrigger:!0};let d={[RA]:a,[r6]:o},f={[NA]:r?o:a,[PA]:r?a:o,[r6]:l,[n6]:l},h={[RA]:a,[r6]:o,[n6]:l,[KW]:c,[NA]:r?l:c,[PA]:r?c:l};switch({inline:d,horizontal:f,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 Rbe(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function XA(e,t){return fv(e,!0).filter(r=>t.has(r))}function _W(e,t,r,n=1){if(!e)return null;let a=XA(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 i6=(e,t)=>{let r=new Set,n=new Map,a=new Map;return e.forEach(o=>{let l=document.querySelector(`[data-menu-id='${VW(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,f){let h=TA.useRef(void 0),g=TA.useRef(void 0);g.current=t;let v=()=>{fr.cancel(h.current)};return TA.useEffect(()=>()=>{v()},[]),y=>{let{which:x}=y;if([...jW,n6,KW,l1,u1].includes(x)){let w=o(),k=i6(w,n),{elements:F,key2element:C,element2key:D}=k,S=C.get(t),A=Rbe(S,F),I=D.get(A),j=Nbe(e,l(I,!0).length===1,r,x);if(!j&&x!==l1&&x!==u1)return;(jW.includes(x)||[l1,u1].includes(x))&&y.preventDefault();let $=N=>{if(N){let P=N,O=N.querySelector("a");O?.getAttribute("href")&&(P=O);let V=D.get(N);c(V),v(),h.current=fr(()=>{g.current===V&&P.focus()})}};if([l1,u1].includes(x)||j.sibling||!A){let N;!A||e==="inline"?N=a.current:N=Pbe(A);let P,O=XA(N,F);x===l1?P=O[0]:x===u1?P=O[O.length-1]:P=_W(N,F,A,j.offset),$(P)}else if(j.inlineTrigger)d(I);else if(j.offset>0)d(I,!0),v(),h.current=fr(()=>{k=i6(w,n);let N=A.getAttribute("aria-controls"),P=document.getElementById(N),O=_W(P,k.elements);$(O)},5);else if(j.offset<0){let N=l(I,!0),P=N[N.length-2],O=C.get(P);d(P,!1),$(O)}}f?.(y)}}var jA=B(_()),bl=B(_());function zbe(e){Promise.resolve().then(e)}var QA="__RC_UTIL_PATH_SPLIT__",NW=e=>e.join(QA),Lbe=e=>e.split(QA),OA="rc-menu-more";function Hbe(){let[,e]=jA.useState({}),t=(0,bl.useRef)(new Map),r=(0,bl.useRef)(new Map),[n,a]=jA.useState([]),o=(0,bl.useRef)(0),l=(0,bl.useRef)(!1),c=()=>{l.current||e({})},d=(0,bl.useCallback)((w,k)=>{let F=NW(k);r.current.set(F,w),t.current.set(w,F),o.current+=1;let C=o.current;zbe(()=>{C===o.current&&c()})},[]),f=(0,bl.useCallback)((w,k)=>{let F=NW(k);r.current.delete(F),t.current.delete(w)},[]),h=(0,bl.useCallback)(w=>{a(w)},[]),g=(0,bl.useCallback)((w,k)=>{let F=t.current.get(w)||"",C=Lbe(F);return k&&n.includes(C[0])&&C.unshift(OA),C},[n]),v=(0,bl.useCallback)((w,k)=>w.filter(F=>F!==void 0).some(F=>g(F,!0).includes(k)),[g]),y=()=>{let w=[...t.current.keys()];return n.length&&w.push(OA),w},x=(0,bl.useCallback)(w=>{let k=`${t.current.get(w)}${QA}`,F=new Set;return[...r.current.keys()].forEach(C=>{C.startsWith(k)&&F.add(r.current.get(C))}),F},[]);return jA.useEffect(()=>()=>{l.current=!0},[]),{registerPath:d,unregisterPath:f,refreshOverflowKeys:h,isSubPathKey:v,getKeyPath:g,getKeys:y,getSubPathKeys:x}}var PW=B(_());function c1(e){let t=PW.useRef(e);t.current=e;let r=PW.useCallback((...n)=>t.current?.(...n),[]);return e?r:void 0}var Qo=B(_()),qbe=B(_());function XW(e,t,r,n){let{activeKey:a,onActive:o,onInactive:l}=qbe.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 Wbe=B(_());function QW(e){let{mode:t,rtl:r,inlineIndent:n}=Wbe.useContext(Bs);if(t!=="inline")return null;let a=e;return r?{paddingRight:a*n}:{paddingLeft:a*n}}var Ube=B(_());function YW({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=Ube.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function o6({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Ea(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function f1(){return f1=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},f1.apply(this,arguments)}var Vbe=class extends Qo.Component{render(){let{title:e,attribute:t,elementRef:r,...n}=this.props,a=xr(n,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ea(!t,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),Qo.createElement(lp.Item,f1({},t,{title:typeof e=="string"?e:void 0},a,{ref:r}))}},Gbe=Qo.forwardRef((e,t)=>{let{style:r,className:n,eventKey:a,warnKey:o,disabled:l,itemIcon:c,children:d,itemData:f,role:h,onMouseEnter:g,onMouseLeave:v,onClick:y,onKeyDown:x,onFocus:w,...k}=e,F=GW(a),{prefixCls:C,onItemClick:D,disabled:S,overflowDisabled:A,itemIcon:I,selectedKeys:j,onActive:$}=Qo.useContext(Bs),{_internalRenderMenuItem:N}=Qo.useContext(KA),P=`${C}-item`,O=Qo.useRef(null),V=Qo.useRef(null),H=S||l,q=jo(t,V),L=S0(a),R=J=>{let se=f||{key:a||"",label:d,itemIcon:c,extra:e.extra,title:e.title};return{key:a,keyPath:[...L].reverse(),item:O.current,domEvent:J,itemData:f||se}},W=c||I,{active:z,...Q}=XW(a,H,g,v),K=j.includes(a),Z=QW(L.length),T=J=>{if(H)return;let se=R(J);y?.(o6(se)),D(se)},U=J=>{if(x?.(J),J.which===Rn.ENTER){let se=R(J);y?.(o6(se)),D(se)}},X=J=>{$(a),w?.(J)},Y={};e.role==="option"&&(Y["aria-selected"]=K);let re=Qo.createElement(Vbe,f1({ref:O,elementRef:q,role:h===null?"none":h||"menuitem",tabIndex:l?null:-1,"data-menu-id":A&&F?null:F},xr(k,["extra"]),Q,Y,{component:"li","aria-disabled":l,style:{...Z,...r},className:te(P,{[`${P}-active`]:z,[`${P}-selected`]:K,[`${P}-disabled`]:H},n),onClick:T,onKeyDown:U,onFocus:X}),d,Qo.createElement(YW,{props:{...e,isSelected:K},icon:W}));return N&&(re=N(re,e,{selected:K})),re});function Kbe(e,t){let{eventKey:r}=e,n=s6(),a=S0(r);return Qo.useEffect(()=>{if(n)return n.registerPath(r,a),()=>{n.unregisterPath(r,a)}},[a]),n?null:Qo.createElement(Gbe,f1({},e,{ref:t}))}var F0=Qo.forwardRef(Kbe),dn=B(_()),zA=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)}var Xbe=({className:e,children:t,...r},n)=>{let{prefixCls:a,mode:o,rtl:l}=zA.useContext(Bs);return zA.createElement("ul",LA({className:te(a,l&&`${a}-rtl`,`${a}-sub`,`${a}-${o==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},Qbe=zA.forwardRef(Xbe),ZW=Qbe,y0=B(_()),Ya={adjustX:1,adjustY:1},Ybe={topLeft:{points:["bl","tl"],overflow:Ya},topRight:{points:["br","tr"],overflow:Ya},bottomLeft:{points:["tl","bl"],overflow:Ya},bottomRight:{points:["tr","br"],overflow:Ya},leftTop:{points:["tr","tl"],overflow:Ya},leftBottom:{points:["br","bl"],overflow:Ya},rightTop:{points:["tl","tr"],overflow:Ya},rightBottom:{points:["bl","br"],overflow:Ya}},Zbe={topLeft:{points:["bl","tl"],overflow:Ya},topRight:{points:["br","tr"],overflow:Ya},bottomLeft:{points:["tl","bl"],overflow:Ya},bottomRight:{points:["tr","br"],overflow:Ya},rightTop:{points:["tr","tl"],overflow:Ya},rightBottom:{points:["br","bl"],overflow:Ya},leftTop:{points:["tl","tr"],overflow:Ya},leftBottom:{points:["bl","br"],overflow:Ya}};function JW(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Jbe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function e1e({prefixCls:e,visible:t,children:r,popup:n,popupStyle:a,popupClassName:o,popupOffset:l,disabled:c,mode:d,onVisibleChange:f}){let{getPopupContainer:h,rtl:g,subMenuOpenDelay:v,subMenuCloseDelay:y,builtinPlacements:x,triggerSubMenuAction:w,forceSubMenuRender:k,rootClassName:F,motion:C,defaultMotions:D}=y0.useContext(Bs),[S,A]=y0.useState(!1),I=g?{...Zbe,...x}:{...Ybe,...x},j=Jbe[d],$=JW(d,C,D),N=y0.useRef($);d!=="inline"&&(N.current=$);let P={...N.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},O=y0.useRef(void 0);return y0.useEffect(()=>(O.current=fr(()=>{A(t)}),()=>{fr.cancel(O.current)}),[t]),y0.createElement(Gm,{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?[]:[w],mouseEnterDelay:v,mouseLeaveDelay:y,onPopupVisibleChange:f,forceRender:k,popupMotion:P,fresh:!0},r)}var up=B(_());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)}function t1e({id:e,open:t,keyPath:r,children:n}){let a="inline",{prefixCls:o,forceSubMenuRender:l,motion:c,defaultMotions:d,mode:f}=up.useContext(Bs),h=up.useRef(!1);h.current=f===a;let[g,v]=up.useState(!h.current),y=h.current?t:!1;up.useEffect(()=>{h.current&&v(!1)},[f]);let x={...JW(a,c,d)};r.length>1&&(x.motionAppear=!1);let w=x.onVisibleChanged;return x.onVisibleChanged=k=>(!h.current&&!k&&v(!0),w?.(k)),g?null:up.createElement(d1,{mode:a,locked:!h.current},up.createElement(Qn,HA({visible:y},x,{forceRender:l,removeOnLeave:!1,leavedClassName:`${o}-hidden`}),({className:k,style:F})=>up.createElement(ZW,{id:e,className:k,style:F},n)))}function p1(){return p1=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},p1.apply(this,arguments)}var r1e=dn.forwardRef((e,t)=>{let{style:r,className:n,styles:a,classNames:o,title:l,itemTitle:c,eventKey:d,warnKey:f,disabled:h,internalPopupClose:g,children:v,itemIcon:y,expandIcon:x,popupClassName:w,popupOffset:k,popupStyle:F,onClick:C,onMouseEnter:D,onMouseLeave:S,onTitleClick:A,onTitleMouseEnter:I,onTitleMouseLeave:j,popupRender:$,...N}=e,P=GW(d),{prefixCls:O,mode:V,openKeys:H,disabled:q,overflowDisabled:L,activeKey:R,selectedKeys:W,itemIcon:z,expandIcon:Q,onItemClick:K,onOpenChange:Z,onActive:T,popupRender:U}=dn.useContext(Bs),{_internalRenderSubMenuItem:X}=dn.useContext(KA),{isSubPathKey:Y}=dn.useContext(qW),re=S0(),J=`${O}-submenu`,se=q||h,me=dn.useRef(null),le=dn.useRef(null),he=y??z,ae=x??Q,ce=H.includes(d),ye=!L&&ce,Te=Y(W,d),{active:De,...ke}=XW(d,se,I,j),[Ce,Le]=dn.useState(!1),$e=je=>{se||Le(je)},Be=je=>{$e(!0),D?.({key:d,domEvent:je})},Me=je=>{$e(!1),S?.({key:d,domEvent:je})},Ve=dn.useMemo(()=>De||(V!=="inline"?Ce||Y([R],d):!1),[V,De,R,Ce,d,Y]),qe=QW(re.length),Ie=je=>{se||(A?.({key:d,domEvent:je}),V==="inline"&&Z(d,!ce))},Pe=c1(je=>{C?.(o6(je)),K(je)}),Je=je=>{V!=="inline"&&Z(d,je)},gt=()=>{T(d)},et=P&&`${P}-popup`,Ue=dn.useMemo(()=>dn.createElement(YW,{icon:V!=="horizontal"?ae:void 0,props:{...e,isOpen:ye,isSubMenu:!0}},dn.createElement("i",{className:`${J}-arrow`})),[V,ae,e,ye,J]),Fe=dn.createElement("div",p1({role:"menuitem",style:qe,className:`${J}-title`,tabIndex:se?null:-1,ref:me,title:c??(typeof l=="string"?l:null),"data-menu-id":L&&P?null:P,"aria-expanded":ye,"aria-haspopup":!0,"aria-controls":et,"aria-disabled":se,onClick:Ie,onFocus:gt},ke),l,Ue),_e=dn.useRef(V);V!=="inline"&&re.length>1?_e.current="vertical":_e.current=V;let dt=_e.current,at=dn.useMemo(()=>{let je=dn.createElement(d1,{classNames:o,styles:a,mode:dt==="horizontal"?"vertical":dt},dn.createElement(ZW,{id:et,ref:le},v)),rt=$||U;return rt?rt(je,{item:e,keys:re}):je},[$,U,re,et,v,e,dt]);if(!L){let je=_e.current;Fe=dn.createElement(e1e,{mode:je,prefixCls:J,visible:!g&&ye&&V!=="inline",popupClassName:w,popupOffset:k,popupStyle:F,popup:at,disabled:se,onVisibleChange:Je},Fe)}let Ge=dn.createElement(lp.Item,p1({ref:t,role:"none"},N,{component:"li",style:r,className:te(J,`${J}-${V}`,n,{[`${J}-open`]:ye,[`${J}-active`]:Ve,[`${J}-selected`]:Te,[`${J}-disabled`]:se}),onMouseEnter:Be,onMouseLeave:Me}),Fe,!L&&dn.createElement(t1e,{id:et,open:ye,keyPath:re},v));return X&&(Ge=X(Ge,e,{selected:Te,active:Ve,open:ye,disabled:se})),dn.createElement(d1,{classNames:o,styles:a,onItemClick:Pe,mode:V==="horizontal"?"vertical":V,itemIcon:he,expandIcon:ae},Ge)}),n1e=dn.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=S0(r),o=VA(n,a),l=s6();dn.useEffect(()=>{if(l)return l.registerPath(r,a),()=>{l.unregisterPath(r,a)}},[a]);let c;return l?c=o:c=dn.createElement(r1e,p1({ref:t},e),o),dn.createElement(HW.Provider,{value:a},c)}),l6=n1e,id=B(_()),RW=B(_());function YA({className:e,style:t}){let{prefixCls:r}=RW.useContext(Bs);return s6()?null:RW.createElement("li",{role:"separator",className:te(`${r}-item-divider`,e),style:t})}function k0(){return k0=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},k0.apply(this,arguments)}function qA(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:f,children:h,key:g,type:v,extra:y,...x}=c,w=g??`tmp-${d}`;if(h||v==="group"){if(v==="group")return id.createElement(a,k0({key:w},x,{title:f}),qA(h,t,r));let{title:F,...C}=x;return id.createElement(o,k0({key:w},C,{title:f,itemTitle:typeof F=="string"?F:void 0}),qA(h,t,r))}if(v==="divider")return id.createElement(l,k0({key:w},x));let k=!!y||y===0;return id.createElement(n,k0({key:w},x,{extra:y,itemData:{...c,key:w}}),k?id.createElement(id.Fragment,null,id.createElement("span",{className:`${r}-item-label`},f),id.createElement("span",{className:`${r}-item-extra`},y)):f)}return null}).filter(c=>c)}function OW(e,t,r,n,a){let o=e,l={divider:YA,item:F0,group:GA,submenu:l6,...n};return t&&(o=qA(t,l,a)),VA(o,r)}function WA(){return WA=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},WA.apply(this,arguments)}var cp=[],a1e=Or.forwardRef((e,t)=>{let{prefixCls:r="rc-menu",rootClassName:n,style:a,className:o,styles:l,classNames:c,tabIndex:d=0,items:f,children:h,direction:g,id:v,mode:y="vertical",inlineCollapsed:x,disabled:w,disabledOverflow:k,subMenuOpenDelay:F=.1,subMenuCloseDelay:C=.1,forceSubMenuRender:D,defaultOpenKeys:S,openKeys:A,activeKey:I,defaultActiveFirst:j,selectable:$=!0,multiple:N=!1,defaultSelectedKeys:P,selectedKeys:O,onSelect:V,onDeselect:H,inlineIndent:q=24,motion:L,defaultMotions:R,triggerSubMenuAction:W="hover",builtinPlacements:z,itemIcon:Q,expandIcon:K,overflowedIndicator:Z="...",overflowedIndicatorPopupClassName:T,getPopupContainer:U,onClick:X,onOpenChange:Y,onKeyDown:re,openAnimation:J,openTransitionName:se,_internalRenderMenuItem:me,_internalRenderSubMenuItem:le,_internalComponents:he,popupRender:ae,...ce}=e,[ye,Te]=Or.useMemo(()=>[OW(h,f,cp,he,r),OW(h,f,cp,{},r)],[h,f,he]),[De,ke]=Or.useState(!1),Ce=Or.useRef(null),Le=Xs(),$e=v??`rc-menu-uuid-${Le}`,Be=g==="rtl",[Me,Ve]=wr(S,A),qe=Me||cp,Ie=(pt,Mt=!1)=>{function dr(){Ve(pt),Y?.(pt)}Mt?(0,Tbe.flushSync)(dr):dr()},[Pe,Je]=Or.useState(qe),gt=Or.useRef(!1),[et,Ue]=Or.useMemo(()=>(y==="inline"||y==="vertical")&&x?["vertical",x]:[y,!1],[y,x]),Fe=et==="inline",[_e,dt]=Or.useState(et),[at,Ge]=Or.useState(Ue);Or.useEffect(()=>{dt(et),Ge(Ue),gt.current&&(Fe?Ve(Pe):Ie(cp))},[et,Ue]);let[je,rt]=Or.useState(0),Bt=je>=ye.length-1||_e!=="horizontal"||k;Or.useEffect(()=>{Fe&&Je(qe)},[qe]),Or.useEffect(()=>(gt.current=!0,()=>{gt.current=!1}),[]);let{registerPath:It,unregisterPath:Gr,refreshOverflowKeys:Ht,isSubPathKey:$r,getKeyPath:Kt,getKeys:Ft,getSubPathKeys:ar}=Hbe(),Cr=Or.useMemo(()=>({registerPath:It,unregisterPath:Gr}),[It,Gr]),Ot=Or.useMemo(()=>({isSubPathKey:$r}),[$r]);Or.useEffect(()=>{Ht(Bt?cp:ye.slice(je+1).map(pt=>pt.key))},[je,Bt]);let[ot,vt]=wr(I||j&&ye[0]?.key,I),Re=c1(pt=>{vt(pt)}),Ye=c1(()=>{vt(void 0)});(0,Mbe.useImperativeHandle)(t,()=>({list:Ce.current,focus:pt=>{let Mt=Ft(),{elements:dr,key2element:Cn,element2key:_a}=i6(Mt,$e),lr=XA(Ce.current,dr),ri;ot&&Mt.includes(ot)?ri=ot:ri=lr[0]?_a.get(lr[0]):ye.find(Sr=>!Sr.props.disabled)?.key;let Na=Cn.get(ri);ri&&Na&&Na?.focus?.(pt)},findItem:({key:pt})=>{let Mt=Ft(),{key2element:dr}=i6(Mt,$e);return dr.get(pt)||null}}));let[it,ze]=wr(P||[],O),Ze=Or.useMemo(()=>Array.isArray(it)?it:it==null?cp:[it],[it]),ft=pt=>{if($){let{key:Mt}=pt,dr=Ze.includes(Mt),Cn;N?dr?Cn=Ze.filter(lr=>lr!==Mt):Cn=[...Ze,Mt]:Cn=[Mt],ze(Cn);let _a={...pt,selectedKeys:Cn};dr?H?.(_a):V?.(_a)}!N&&qe.length&&_e!=="inline"&&Ie(cp)},qt=c1(pt=>{X?.(o6(pt)),ft(pt)}),Wt=c1((pt,Mt)=>{let dr=qe.filter(Cn=>Cn!==pt);if(Mt)dr.push(pt);else if(_e!=="inline"){let Cn=ar(pt);dr=dr.filter(_a=>!Cn.has(_a))}yc(qe,dr,!0)||Ie(dr,!0)}),Jr=Obe(_e,ot,Be,$e,Ce,Ft,Kt,vt,(pt,Mt)=>{let dr=Mt??!qe.includes(pt);Wt(pt,dr)},re);Or.useEffect(()=>{ke(!0)},[]);let Tr=Or.useMemo(()=>({_internalRenderMenuItem:me,_internalRenderSubMenuItem:le}),[me,le]),Xt=_e!=="horizontal"||k?ye:ye.map((pt,Mt)=>Or.createElement(d1,{key:pt.key,overflowDisabled:Mt>je,classNames:c,styles:l},pt)),zr=Or.createElement(lp,WA({id:v,ref:Ce,prefixCls:`${r}-overflow`,component:"ul",itemComponent:F0,className:te(r,`${r}-root`,`${r}-${_e}`,o,{[`${r}-inline-collapsed`]:at,[`${r}-rtl`]:Be},n),dir:g,style:a,role:"menu",tabIndex:d,data:Xt,renderRawItem:pt=>pt,renderRawRest:pt=>{let Mt=pt.length,dr=Mt?ye.slice(-Mt):null;return Or.createElement(l6,{eventKey:OA,title:Z,disabled:Bt,internalPopupClose:Mt===0,popupClassName:T},dr)},maxCount:_e!=="horizontal"||k?lp.INVALIDATE:lp.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:pt=>{rt(pt)},onKeyDown:Jr},ce));return Or.createElement(KA.Provider,{value:Tr},Or.createElement(UW.Provider,{value:$e},Or.createElement(d1,{prefixCls:r,rootClassName:n,classNames:c,styles:l,mode:_e,openKeys:qe,rtl:Be,disabled:w,motion:De?L:null,defaultMotions:De?R:null,activeKey:ot,onActive:Re,onInactive:Ye,selectedKeys:Ze,inlineIndent:q,subMenuOpenDelay:F,subMenuCloseDelay:C,forceSubMenuRender:D,builtinPlacements:z,triggerSubMenuAction:W,getPopupContainer:U,itemIcon:Q,expandIcon:K,onItemClick:qt,onOpenChange:Wt,popupRender:ae},Or.createElement(qW.Provider,{value:Ot},zr),Or.createElement("div",{style:{display:"none"},"aria-hidden":!0},Or.createElement(LW.Provider,{value:Cr},Te)))))}),i1e=a1e,m1=i1e;m1.Item=F0;m1.SubMenu=l6;m1.ItemGroup=GA;m1.Divider=YA;var ZA=m1,$s=B(_()),zW=B(_()),{ESC:o1e,TAB:s1e}=Rn;function l1e({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:a}){let o=zW.useRef(!1),l=()=>{e&&(t.current?.focus?.(),r?.(!1))},c=()=>a.current?.focus?(a.current.focus(),o.current=!0,!0):!1,d=f=>{switch(f.keyCode){case o1e:l();break;case s1e:{let h=!1;o.current||(h=c()),h?f.preventDefault():l();break}}};zW.useEffect(()=>e?(window.addEventListener("keydown",d),n&&fr(c,3),()=>{window.removeEventListener("keydown",d),o.current=!1}):()=>{o.current=!1},[e])}var w0=B(_()),u1e=(0,w0.forwardRef)((e,t)=>{let{overlay:r,arrow:n,prefixCls:a}=e,o=(0,w0.useMemo)(()=>{let c;return typeof r=="function"?c=r():c=r,c},[r]),l=ln(t,Qs(o));return w0.default.createElement(w0.default.Fragment,null,n&&w0.default.createElement("div",{className:`${a}-arrow`}),w0.default.cloneElement(o,{ref:ru(o)?l:void 0}))}),c1e=u1e,x0={adjustX:1,adjustY:1},E0=[0,0],d1e={topLeft:{points:["bl","tl"],overflow:x0,offset:[0,-4],targetOffset:E0},top:{points:["bc","tc"],overflow:x0,offset:[0,-4],targetOffset:E0},topRight:{points:["br","tr"],overflow:x0,offset:[0,-4],targetOffset:E0},bottomLeft:{points:["tl","bl"],overflow:x0,offset:[0,4],targetOffset:E0},bottom:{points:["tc","bc"],overflow:x0,offset:[0,4],targetOffset:E0},bottomRight:{points:["tr","br"],overflow:x0,offset:[0,4],targetOffset:E0}},f1e=d1e;function UA(){return UA=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},UA.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=f1e,getPopupContainer:f,showAction:h,hideAction:g,overlayClassName:v,overlayStyle:y,visible:x,trigger:w=["hover"],autoFocus:k,overlay:F,children:C,onVisibleChange:D,disabled:S,...A}=e,[I,j]=$s.default.useState(),$="visible"in e?x:I,N=o?`${n}-${o}`:a,P=$s.default.useRef(null),O=$s.default.useRef(null),V=$s.default.useRef(null);$s.default.useImperativeHandle(t,()=>P.current);let H=X=>{j(X),D?.(X)};l1e({visible:$,triggerRef:V,onVisibleChange:H,autoFocus:k,overlayRef:O});let q=X=>{let{onOverlayClick:Y}=e;j(!1),Y&&Y(X)},L=()=>$s.default.createElement(c1e,{ref:O,overlay:F,prefixCls:n,arrow:r}),R=()=>typeof F=="function"?L:L(),W=()=>{let{minOverlayWidthMatchTrigger:X,alignPoint:Y}=e;return"minOverlayWidthMatchTrigger"in e?X:!Y},z=()=>{let{openClassName:X}=e;return X!==void 0?X:`${n}-open`},Q=C,K=te(Q.props?.className,$&&z()),Z={className:K,ref:ln(V,Qs(Q))},T=ru(Q)?$s.default.cloneElement(Q,Z):$s.default.createElement("span",{className:K,ref:V},$s.default.cloneElement(Q,{className:K})),U=g;return!U&&w.indexOf("contextMenu")!==-1&&(U=["click"]),$s.default.createElement(Gm,UA({builtinPlacements:d},A,{prefixCls:n,ref:P,popupClassName:te(v,{[`${n}-show-arrow`]:r}),popupStyle:y,action:w,showAction:h,hideAction:U,popupPlacement:c,popupAlign:l,popupMotion:{motionName:N},popupVisible:$,stretch:W()?"minWidth":"",popup:R(),onOpenChange:H,onPopupClick:q,getPopupContainer:f}),T)}),m1e=p1e,JA=m1e;var eU=B(_()),h1e={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"},g1e=h1e;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 v1e=(e,t)=>eU.createElement(Gt,e9({},e,{ref:t,icon:g1e})),b1e=eU.forwardRef(v1e),t9=b1e;var tU=B(_()),y1e={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"},w1e=y1e;function r9(){return r9=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},r9.apply(this,arguments)}var x1e=(e,t)=>tU.createElement(Gt,r9({},e,{ref:t,icon:w1e})),E1e=tU.forwardRef(x1e),n9=E1e;var Fu=B(_()),fp=B(_()),h1=B(_()),k1e=B(_()),l9=(0,k1e.createContext)(null),C1e=B(_()),zi=B(_()),aa=B(_()),u6=B(_()),S1e=e=>{let{activeTabOffset:t,horizontal:r,rtl:n,indicator:a={}}=e,{size:o,align:l="center"}=a,[c,d]=(0,u6.useState)(),f=(0,u6.useRef)(void 0),h=u6.default.useCallback(v=>typeof o=="function"?o(v):typeof o=="number"?o:v,[o]);function g(){fr.cancel(f.current)}return(0,u6.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(),f.current=fr(()=>{c&&v&&Object.keys(v).every(y=>{let x=v[y],w=c[y];return typeof x=="number"&&typeof w=="number"?Math.round(x)===Math.round(w):x===w})||d(v)}),g},[JSON.stringify(t),r,n,l,h]),{style:c}},F1e=S1e,D1e=B(_()),rU={width:0,height:0,left:0,top:0};function A1e(e,t,r){return(0,D1e.useMemo)(()=>{let n=new Map,a=t.get(e[0]?.key)||rU,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)||rU);let f=n.get(c)||{...d};f.right=o-f.left-f.width,n.set(c,f)}return n},[e.map(n=>n.key).join("_"),t,r])}var nU=B(_());function aU(e,t){let r=nU.useRef(e),[,n]=nU.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 $1e=B(_()),pp=B(_()),B1e=.1,iU=.01,f6=20,oU=.995**f6;function I1e(e,t){let[r,n]=(0,pp.useState)(),[a,o]=(0,pp.useState)(0),[l,c]=(0,pp.useState)(0),[d,f]=(0,pp.useState)(),h=(0,pp.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),f({x:S,y:A})}function y(){if(r&&(n(null),f(null),d)){let F=d.x/l,C=d.y/l,D=Math.abs(F),S=Math.abs(C);if(Math.max(D,S)<B1e)return;let A=F,I=C;h.current=window.setInterval(()=>{if(Math.abs(A)<iU&&Math.abs(I)<iU){window.clearInterval(h.current);return}A*=oU,I*=oU,t(A*f6,I*f6)},f6)}}let x=(0,pp.useRef)(void 0);function w(F){let{deltaX:C,deltaY:D}=F,S,A=Math.abs(C),I=Math.abs(D);A===I?S=x.current==="x"?C:D:A>I?(S=C,x.current="x"):(S=D,x.current="y"),t(-S,-S)&&F.preventDefault()}let k=(0,pp.useRef)(null);k.current={onTouchStart:g,onTouchMove:v,onTouchEnd:y,onWheel:w},$1e.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 A0=B(_());function pU(e){let[t,r]=(0,A0.useState)(0),n=(0,A0.useRef)(0),a=(0,A0.useRef)(void 0);return a.current=e,US(()=>{a.current?.()},[t]),()=>{n.current===t&&(n.current+=1,r(n.current))}}function M1e(e){let t=(0,A0.useRef)([]),[,r]=(0,A0.useState)({}),n=(0,A0.useRef)(typeof e=="function"?e():e),a=pU(()=>{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 T1e=B(_()),sU={width:0,height:0,left:0,top:0,right:0};function j1e(e,t,r,n,a,o,{tabs:l,tabPosition:c,rtl:d}){let f,h,g;return["top","bottom"].includes(c)?(f="width",h=d?"right":"left",g=Math.abs(r)):(f="height",h="top",g=-r),(0,T1e.useMemo)(()=>{if(!l.length)return[0,0];let v=l.length,y=v;for(let w=0;w<v;w+=1){let k=e.get(l[w].key)||sU;if(Math.floor(k[h]+k[f])>Math.floor(g+t)){y=w-1;break}}let x=0;for(let w=v-1;w>=0;w-=1)if((e.get(l[w].key)||sU)[h]<g){x=w+1;break}return x>y?[0,-1]:[x,y]},[e,t,n,a,o,g,c,l.map(v=>v.key).join("_"),d])}function lU(e){let t;return e instanceof Map?(t={},e.forEach((r,n)=>{t[n]=r})):t=e,JSON.stringify(t)}var _1e="TABS_DQ";function mU(e){return String(e).replace(/"/g,_1e)}function u9(e,t,r,n){return!(!r||n||e===!1||e===void 0&&(t===!1||t===null))}var uU=B(_()),N1e=uU.forwardRef((e,t)=>{let{prefixCls:r,editable:n,locale:a,style:o}=e;return!n||n.showAdd===!1?null:uU.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||"+")}),hU=N1e,a9=B(_()),P1e=a9.forwardRef((e,t)=>{let{position:r,prefixCls:n,extra:a}=e;if(!a)return null;let o,l={};return typeof a=="object"&&!a9.isValidElement(a)?l=a:l.right=a,r==="right"&&(o=l.right),r==="left"&&(o=l.left),o?a9.createElement("div",{className:`${n}-extra-content`,ref:t},o):null}),cU=P1e,yl=B(_()),c6=B(_());function o9(){return o9=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},o9.apply(this,arguments)}var R1e=yl.forwardRef((e,t)=>{let{prefixCls:r,id:n,tabs:a,locale:o,mobile:l,more:c={},style:d,className:f,editable:h,tabBarGutter:g,rtl:v,removeAriaLabel:y,onTabClick:x,getPopupContainer:w,popupClassName:k,popupStyle:F,classNames:C,styles:D}=e,[S,A]=(0,c6.useState)(!1),[I,j]=(0,c6.useState)(null),{icon:$="More",popupRender:N}=c,P=`${n}-more-popup`,O=`${r}-dropdown`,V=I!==null?`${P}-${I}`:null,H=o?.dropdownAriaLabel;function q(T,U){T.preventDefault(),T.stopPropagation(),h.onEdit("remove",{key:U,event:T})}let L=yl.createElement(ZA,{onClick:({key:T,domEvent:U})=>{x(T,U),A(!1)},prefixCls:`${O}-menu`,id:P,tabIndex:-1,role:"listbox","aria-activedescendant":V,selectedKeys:[I],"aria-label":H!==void 0?H:"expanded dropdown"},a.map(T=>{let{closable:U,disabled:X,closeIcon:Y,key:re,label:J}=T,se=u9(U,Y,h,X);return yl.createElement(F0,{key:re,id:`${P}-${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(`${O}-menu-item-remove`,C?.remove),style:D?.remove,onClick:me=>{me.stopPropagation(),q(me,re)}},Y||h.removeIcon||"\xD7"))})),R=N?N(L,{restTabs:a,onClose:()=>A(!1)}):L;function W(T){let U=a.filter(re=>!re.disabled),X=U.findIndex(re=>re.key===I)||0,Y=U.length;for(let re=0;re<Y;re+=1){X=(X+T+Y)%Y;let J=U[X];if(!J.disabled){j(J.key);return}}}function z(T){let{which:U}=T;if(!S){[Rn.DOWN,Rn.SPACE,Rn.ENTER].includes(U)&&(A(!0),T.preventDefault());return}switch(U){case Rn.UP:W(-1),T.preventDefault();break;case Rn.DOWN:W(1),T.preventDefault();break;case Rn.ESC:A(!1);break;case Rn.SPACE:case Rn.ENTER:I!==null&&x(I,T);break}}(0,c6.useEffect)(()=>{let T=document.getElementById(V);T?.scrollIntoView&&T.scrollIntoView(!1)},[V,I]),(0,c6.useEffect)(()=>{S||j(null)},[S]);let Q={marginInlineStart:g};a.length||(Q.visibility="hidden",Q.order=1);let K=te(k,{[`${O}-rtl`]:v}),Z=l?null:yl.createElement(JA,o9({prefixCls:O,overlay:R,visible:a.length?S:!1,onVisibleChange:A,overlayClassName:K,overlayStyle:F,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:w},c),yl.createElement("button",{type:"button",className:`${r}-nav-more`,style:Q,"aria-haspopup":"listbox","aria-controls":P,id:`${n}-more`,"aria-expanded":S,onKeyDown:z},$));return yl.createElement("div",{className:te(`${r}-nav-operations`,f),style:d,ref:t},Z,yl.createElement(hU,{prefixCls:r,locale:o,editable:h}))}),O1e=yl.memo(R1e,(e,t)=>t.tabMoving),Du=B(_()),z1e=e=>{let{prefixCls:t,id:r,active:n,focus:a,tab:{key:o,label:l,disabled:c,closeIcon:d,icon:f},closable:h,renderWrapper:g,removeAriaLabel:v,editable:y,onClick:x,onFocus:w,onBlur:k,onKeyDown:F,onMouseDown:C,onMouseUp:D,styles:S,classNames:A,tabCount:I,currentPosition:j}=e,$=`${t}-tab`,N=u9(h,d,y,c);function P(L){c||x(L)}function O(L){L.preventDefault(),L.stopPropagation(),y.onEdit("remove",{key:o,event:L})}let V=Du.useMemo(()=>f&&typeof l=="string"?Du.createElement("span",null,l):l,[l,f]),H=Du.useRef(null);Du.useEffect(()=>{a&&H.current&&H.current.focus()},[a]);let q=Du.createElement("div",{key:o,"data-node-key":mU(o),className:te($,A?.item,{[`${$}-with-remove`]:N,[`${$}-active`]:n,[`${$}-disabled`]:c,[`${$}-focus`]:a}),style:S?.item,onClick:P},Du.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(),P(L)},onKeyDown:F,onMouseDown:C,onMouseUp:D,onFocus:w,onBlur:k},a&&Du.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${j} of ${I}`),f&&Du.createElement("span",{className:`${$}-icon`},f),l&&V),N&&Du.createElement("button",{type:"button","aria-label":v||"remove",tabIndex:n?0:-1,className:te(`${$}-remove`,A?.remove),style:S?.remove,onClick:L=>{L.stopPropagation(),O(L)}},d||y.removeIcon||"\xD7"));return g?g(q):q},L1e=z1e;function s9(){return s9=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},s9.apply(this,arguments)}var H1e=(e,t)=>{let{offsetWidth:r,offsetHeight:n,offsetTop:a,offsetLeft:o}=e,{width:l,height:c,left:d,top:f}=e.getBoundingClientRect();return Math.abs(l-r)<1?[l,c,d-t.left,f-t.top]:[r,n,o,a]},D0=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]},d6=(e,t)=>e[t?0:1],q1e=zi.forwardRef((e,t)=>{let{className:r,style:n,id:a,animated:o,activeKey:l,rtl:c,extra:d,editable:f,locale:h,tabPosition:g,tabBarGutter:v,children:y,onTabClick:x,onTabScroll:w,indicator:k,classNames:F,styles:C}=e,{prefixCls:D,tabs:S}=zi.useContext(l9),A=(0,aa.useRef)(null),I=(0,aa.useRef)(null),j=(0,aa.useRef)(null),$=(0,aa.useRef)(null),N=(0,aa.useRef)(null),P=(0,aa.useRef)(null),O=(0,aa.useRef)(null),V=g==="top"||g==="bottom",[H,q]=aU(0,(Re,Ye)=>{V&&w&&w({direction:Re>Ye?"left":"right"})}),[L,R]=aU(0,(Re,Ye)=>{!V&&w&&w({direction:Re>Ye?"top":"bottom"})}),[W,z]=(0,aa.useState)([0,0]),[Q,K]=(0,aa.useState)([0,0]),[Z,T]=(0,aa.useState)([0,0]),[U,X]=(0,aa.useState)([0,0]),[Y,re]=M1e(new Map),J=A1e(S,Y,Q[0]),se=d6(W,V),me=d6(Q,V),le=d6(Z,V),he=d6(U,V),ae=Math.floor(se)<Math.floor(me+le),ce=ae?se-he:se-le,ye=`${D}-nav-operations-hidden`,Te=0,De=0;V&&c?(Te=0,De=Math.max(0,me-ce)):(Te=Math.min(0,ce-me),De=0);function ke(Re){return Re<Te?Te:Re>De?De:Re}let Ce=(0,aa.useRef)(null),[Le,$e]=(0,aa.useState)();function Be(){$e(Date.now())}function Me(){Ce.current&&clearTimeout(Ce.current)}I1e($,(Re,Ye)=>{function it(ze,Ze){ze(ft=>ke(ft+Ze))}return ae?(V?it(q,Re):it(R,Ye),Me(),Be(),!0):!1}),(0,aa.useEffect)(()=>(Me(),Le&&(Ce.current=setTimeout(()=>{$e(0)},100)),Me),[Le]);let[Ve,qe]=j1e(J,ce,V?H:L,me,le,he,{...e,tabs:S}),Ie=xt((Re=l)=>{let Ye=J.get(Re)||{width:0,height:0,left:0,right:0,top:0};if(V){let it=H;c?Ye.right<H?it=Ye.right:Ye.right+Ye.width>H+ce&&(it=Ye.right+Ye.width-ce):Ye.left<-H?it=-Ye.left:Ye.left+Ye.width>-H+ce&&(it=-(Ye.left+Ye.width-ce)),R(0),q(ke(it))}else{let it=L;Ye.top<-L?it=-Ye.top:Ye.top+Ye.height>-L+ce&&(it=-(Ye.top+Ye.height-ce)),q(0),R(ke(it))}}),[Pe,Je]=(0,aa.useState)(),[gt,et]=(0,aa.useState)(!1),Ue=S.filter(Re=>!Re.disabled).map(Re=>Re.key),Fe=Re=>{let Ye=Ue.indexOf(Pe||l),it=Ue.length,ze=(Ye+Re+it)%it,Ze=Ue[ze];Je(Ze)},_e=(Re,Ye)=>{let it=Ue.indexOf(Re),ze=S.find(Ze=>Ze.key===Re);u9(ze?.closable,ze?.closeIcon,f,ze?.disabled)&&(Ye.preventDefault(),Ye.stopPropagation(),f.onEdit("remove",{key:Re,event:Ye}),it===Ue.length-1?Fe(-1):Fe(1))},dt=(Re,Ye)=>{et(!0),Ye.button===1&&_e(Re,Ye)},at=Re=>{let{code:Ye}=Re,it=c&&V,ze=Ue[0],Ze=Ue[Ue.length-1];switch(Ye){case"ArrowLeft":{V&&Fe(it?1:-1);break}case"ArrowRight":{V&&Fe(it?-1:1);break}case"ArrowUp":{Re.preventDefault(),V||Fe(-1);break}case"ArrowDown":{Re.preventDefault(),V||Fe(1);break}case"Home":{Re.preventDefault(),Je(ze);break}case"End":{Re.preventDefault(),Je(Ze);break}case"Enter":case"Space":{Re.preventDefault(),x(Pe??l,Re);break}case"Backspace":case"Delete":{_e(Pe,Re);break}}},Ge={};V?Ge.marginInlineStart=v:Ge.marginTop=v;let je=S.map((Re,Ye)=>{let{key:it}=Re;return zi.createElement(L1e,{id:a,prefixCls:D,key:it,tab:Re,classNames:{item:F?.item,remove:F?.remove},styles:{item:Ye===0?C?.item:{...Ge,...C?.item},remove:C?.remove},closable:Re.closable,editable:f,active:it===l,focus:it===Pe,renderWrapper:y,removeAriaLabel:h?.removeAriaLabel,tabCount:Ue.length,currentPosition:Ye+1,onClick:ze=>{x(it,ze)},onKeyDown:at,onFocus:()=>{gt||Je(it),Ie(it),Be(),$.current&&(c||($.current.scrollLeft=0),$.current.scrollTop=0)},onBlur:()=>{Je(void 0)},onMouseDown:ze=>dt(it,ze),onMouseUp:()=>{et(!1)}})}),rt=()=>re(()=>{let Re=new Map,Ye=N.current?.getBoundingClientRect();return S.forEach(({key:it})=>{let ze=N.current?.querySelector(`[data-node-key="${mU(it)}"]`);if(ze){let[Ze,ft,qt,Wt]=H1e(ze,Ye);Re.set(it,{width:Ze,height:ft,left:qt,top:Wt})}}),Re});(0,aa.useEffect)(()=>{rt()},[S.map(Re=>Re.key).join("_")]);let Bt=pU(()=>{let Re=D0(A),Ye=D0(I),it=D0(j);z([Re[0]-Ye[0]-it[0],Re[1]-Ye[1]-it[1]]);let ze=D0(O);T(ze);let Ze=D0(P);X(Ze);let ft=D0(N);K([ft[0]-ze[0],ft[1]-ze[1]]),rt()}),It=S.slice(0,Ve),Gr=S.slice(qe+1),Ht=[...It,...Gr],$r=J.get(l),{style:Kt}=F1e({activeTabOffset:$r,horizontal:V,indicator:k,rtl:c});(0,aa.useEffect)(()=>{Ie()},[l,Te,De,lU($r),lU(J),V]),(0,aa.useEffect)(()=>{Bt()},[c]);let Ft=!!Ht.length,ar=`${D}-nav-wrap`,Cr,Ot,ot,vt;return V?c?(Ot=H>0,Cr=H!==De):(Cr=H<0,Ot=H!==Te):(ot=L<0,vt=L!==Te),zi.createElement(ka,{onResize:Bt},zi.createElement("div",{ref:jo(t,A),role:"tablist","aria-orientation":V?"horizontal":"vertical",className:te(`${D}-nav`,r,F?.header),style:{...C?.header,...n},onKeyDown:()=>{Be()}},zi.createElement(cU,{ref:I,position:"left",extra:d,prefixCls:D}),zi.createElement(ka,{onResize:Bt},zi.createElement("div",{className:te(ar,{[`${ar}-ping-left`]:Cr,[`${ar}-ping-right`]:Ot,[`${ar}-ping-top`]:ot,[`${ar}-ping-bottom`]:vt}),ref:$},zi.createElement(ka,{onResize:Bt},zi.createElement("div",{ref:N,className:`${D}-nav-list`,style:{transform:`translate(${H}px, ${L}px)`,transition:Le?"none":void 0}},je,zi.createElement(hU,{ref:O,prefixCls:D,locale:h,editable:f,style:{...je.length===0?void 0:Ge,visibility:Ft?"hidden":null}}),zi.createElement("div",{className:te(`${D}-ink-bar`,F?.indicator,{[`${D}-ink-bar-animated`]:o.inkBar}),style:{...Kt,...C?.indicator}}))))),zi.createElement(O1e,s9({},e,{removeAriaLabel:h?.removeAriaLabel,ref:P,prefixCls:D,tabs:Ht,className:!Ft&&ye,popupStyle:C?.popup,tabMoving:!!Le})),zi.createElement(cU,{ref:j,position:"right",extra:d,prefixCls:D})))}),dU=q1e,W1e=({renderTabBar:e,...t})=>e?e(t,dU):C1e.createElement(dU,t),U1e=W1e,g1=B(_()),i9=B(_()),V1e=i9.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,id:o,active:l,tabKey:c,children:d}=e,f=i9.Children.count(d)>0;return i9.createElement("div",{id:o&&`${o}-panel-${c}`,role:"tabpanel",tabIndex:l&&f?0:-1,"aria-labelledby":o&&`${o}-tab-${c}`,"aria-hidden":!l,style:a,className:te(r,l&&`${r}-active`,n),ref:t},d)}),G1e=V1e;function p6(){return p6=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},p6.apply(this,arguments)}var K1e=e=>{let{id:t,activeKey:r,animated:n,tabPosition:a,destroyOnHidden:o,bodyStyle:l,bodyClassName:c,contentStyle:d,contentClassName:f}=e,{prefixCls:h,tabs:g}=g1.useContext(l9),v=n.tabPane,y=`${h}-body`,x=`${h}-content`;return g1.createElement("div",{className:te(`${y}-holder`)},g1.createElement("div",{className:te(y,`${y}-${a}`,{[`${y}-animated`]:v},c),style:l},g.map(w=>{let{key:k,forceRender:F,style:C,className:D,destroyOnHidden:S,...A}=w,I=k===r;return g1.createElement(Qn,p6({key:k,visible:I,forceRender:F,removeOnLeave:!!(o??S),leavedClassName:`${x}-hidden`},n.tabPaneMotion),({style:j,className:$},N)=>g1.createElement(G1e,p6({},A,{prefixCls:x,id:t,tabKey:k,animated:v,active:I,style:{...d,...C,...j},className:te(f,D,$),ref:N})))})))},X1e=K1e;function Q1e(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 v1(){return v1=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},v1.apply(this,arguments)}var fU=0,Y1e=fp.forwardRef((e,t)=>{let{id:r,prefixCls:n="rc-tabs",className:a,items:o,direction:l,activeKey:c,defaultActiveKey:d,editable:f,animated:h,tabPosition:g="top",tabBarGutter:v,tabBarStyle:y,tabBarExtraContent:x,locale:w,more:k,destroyOnHidden:F,renderTabBar:C,onChange:D,onTabClick:S,onTabScroll:A,getPopupContainer:I,popupClassName:j,indicator:$,classNames:N,styles:P,...O}=e,V=fp.useMemo(()=>(o||[]).filter(J=>J&&typeof J=="object"&&"key"in J),[o]),H=l==="rtl",q=Q1e(h),[L,R]=(0,h1.useState)(!1);(0,h1.useEffect)(()=>{R(JS())},[]);let[W,z]=wr(d??V[0]?.key,c),[Q,K]=(0,h1.useState)(()=>V.findIndex(J=>J.key===W));(0,h1.useEffect)(()=>{let J=V.findIndex(se=>se.key===W);J===-1&&(J=Math.max(0,Math.min(Q,V.length-1)),z(V[J]?.key)),K(J)},[V.map(J=>J.key).join("_"),W,Q]);let[Z,T]=wr(null,r);(0,h1.useEffect)(()=>{r||(T(`rc-tabs-${fU}`),fU+=1)},[]);function U(J,se){S?.(J,se);let me=J!==W;z(J),me&&D?.(J)}let X={id:Z,activeKey:W,animated:q,tabPosition:g,rtl:H,mobile:L},Y={...X,editable:f,locale:w,more:k,tabBarGutter:v,onTabClick:U,onTabScroll:A,extra:x,style:y,getPopupContainer:I,popupClassName:te(j,N?.popup),indicator:$,styles:P,classNames:N},re=fp.useMemo(()=>({tabs:V,prefixCls:n}),[V,n]);return fp.createElement(l9.Provider,{value:re},fp.createElement("div",v1({ref:t,id:r,className:te(n,`${n}-${g}`,{[`${n}-mobile`]:L,[`${n}-editable`]:f,[`${n}-rtl`]:H},a)},O),fp.createElement(U1e,v1({},Y,{renderTabBar:C})),fp.createElement(X1e,v1({destroyOnHidden:F},X,{bodyStyle:P?.body,bodyClassName:N?.body,contentStyle:P?.content,contentClassName:N?.content,animated:q}))))}),Z1e=Y1e,J1e=Z1e,eye={motionAppear:!1,motionEnter:!0,motionLeave:!0};function tye(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,...Ct(t)?t:{}},r.tabPane&&(r.tabPaneMotion={...eye,motionName:nf(e,"switch")}),r}var rye=B(_());function nye(e){return e.filter(t=>t)}function aye(e,t){if(e)return e.map(n=>({...n,destroyOnHidden:n.destroyOnHidden??n.destroyInactiveTabPane}));let r=Hr(t).map(n=>{if(rye.isValidElement(n)){let{key:a,props:o}=n,{tab:l,...c}=o||{};return{key:String(a),...c,label:l}}return null});return nye(r)}var iye=aye,oye=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}`}}}}},[ix(e,"slide-up"),ix(e,"slide-down")]]},sye=oye,lye=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}}}}}}},uye=e=>{let{antCls:t,componentCls:r,itemHoverColor:n,dropdownEdgeChildVerticalPadding:a}=e;return{[`${r}-dropdown`]:{...pr(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:tx},[`&${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:nx},[`&${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:rx},[`&${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:ax},[`${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"}}}}}}},cye=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(f=>`${f} ${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(f=>`${f} ${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}}}}}},dye=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}}}}}},fye=e=>{let{componentCls:t,itemActiveColor:r,itemHoverColor:n,iconCls:a,tabsHorizontalItemMargin:o,horizontalItemPadding:l,itemSelectedColor:c,itemColor:d}=e,f=`${t}-tab`;return{[f]:{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}`,[`${f}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM},[`${f}-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},...Bi(e)},"&:hover":{color:n},[`&${f}-active ${f}-btn`]:{color:c},[`&${f}-focus ${f}-btn:focus-visible`]:ao(e),[`&${f}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${f}-disabled ${f}-btn, &${f}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${f}-remove ${a}`]:{margin:0,verticalAlign:"middle"},[`${a}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${f} + ${f}`]:{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"}}}}},mye=e=>{let{componentCls:t,tabsCardPadding:r,cardHeight:n,cardGutter:a,itemHoverColor:o,itemActiveColor:l,colorBorderSecondary:c}=e;return{[t]:{...pr(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},...Bi(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...fye(e),[`${t}-body`]:{position:"relative",width:"100%"},[`${t}-body-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-content`]:{...Bi(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"}}}}}},hye=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}},gye=kt("Tabs",e=>{let t=Nt(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[dye(t),pye(t),cye(t),uye(t),lye(t),mye(t),sye(t)]},hye),vye=()=>null,bye=vye,yye=Fu.forwardRef((e,t)=>{let{type:r,className:n,rootClassName:a,size:o,onEdit:l,hideAdd:c,centered:d,addIcon:f,removeIcon:h,moreIcon:g,more:v,popupClassName:y,children:x,items:w,animated:k,style:F,indicatorSize:C,indicator:D,classNames:S,styles:A,destroyInactiveTabPane:I,destroyOnHidden:j,tabPlacement:$,tabPosition:N,...P}=e,{prefixCls:O}=P,{getPrefixCls:V,direction:H,getPopupContainer:q,className:L,style:R,classNames:W,styles:z}=_t("tabs"),{tabs:Q}=Fu.useContext(wt),K=V("tabs",O),Z=Yn(K),[T,U]=gye(K,Z),X=Fu.useRef(null);Fu.useImperativeHandle(t,()=>({nativeElement:X.current}));let Y;r==="editable-card"&&(Y={onEdit:(ke,{key:Ce,event:Le})=>{l?.(ke==="add"?Le:Ce,ke)},removeIcon:h??Q?.removeIcon??Fu.createElement(Mc,null),addIcon:(f??Q?.addIcon)||Fu.createElement(t9,null),showAdd:c!==!0});let re=V(),J=On(o),se=iye(w,x),me=tye(K,k),le={align:D?.align??Q?.indicator?.align,size:D?.size??C??Q?.indicator?.size??Q?.indicatorSize},he=Fu.useMemo(()=>{let ke=$??N??void 0,Ce=H==="rtl";switch(ke){case"start":return Ce?"right":"left";case"end":return Ce?"left":"right";default:return ke}},[$,N,H]),ae={...e,size:J,tabPlacement:he,items:se},ce=lt(R),ye=lt(F),[Te,De]=jt([W,S],[z,ce,A,ye],{props:ae},{popup:{_default:"root"}});return Fu.createElement(J1e,{ref:X,direction:H,getPopupContainer:q,...P,items:se,className:te({[`${K}-large`]:J==="large",[`${K}-small`]:J==="small",[`${K}-card`]:["card","editable-card"].includes(r),[`${K}-editable-card`]:r==="editable-card",[`${K}-centered`]:d},L,n,a,Te.root,T,U,Z),classNames:{...Te,popup:te(y,T,U,Z,Te.popup?.root)},styles:{...De,popup:De.popup?.root},style:De.root,editable:Y,more:{icon:Q?.more?.icon??Q?.moreIcon??g??Fu.createElement(n9,null),transitionName:`${re}-slide-up`,...v},prefixCls:K,animated:me,indicator:le,destroyOnHidden:j??I,tabPosition:he})}),gU=yye;gU.TabPane=bye;var c9=gU;var vU=B(_()),wye={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"},xye=wye;function d9(){return d9=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},d9.apply(this,arguments)}var Eye=(e,t)=>vU.createElement(Gt,d9({},e,{ref:t,icon:xye})),kye=vU.forwardRef(Eye),f9=kye;var bo=B(_()),$0=B(_()),Cye=B(_()),m6=Cye.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),Sye=e=>{let{antCls:t,componentCls:r,colorText:n,footerBg:a,headerHeight:o,headerPadding:l,headerColor:c,footerPadding:d,fontSize:f,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:f,background:a},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},yU=e=>{let{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:a,controlHeightSM:o,marginXXS:l,colorTextLightSolid:c,colorBgContainer:d}=e,f=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${f}px`,headerColor:a,footerPadding:`${o}px ${f}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+l*2,triggerBg:"#002140",triggerColor:c,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:d,lightTriggerBg:d,lightTriggerColor:a}},wU=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],h6=kt("Layout",Sye,yU,{deprecatedTokens:wU}),Fye=e=>{let{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:a,antCls:o,triggerHeight:l,triggerColor:c,triggerBg:d,headerHeight:f,zeroTriggerWidth:h,zeroTriggerHeight:g,borderRadiusLG:v,lightSiderBg:y,lightTriggerColor:x,lightTriggerBg:w,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:f,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:x,background:w},[`${t}-zero-width-trigger`]:{color:x,background:w,border:`${ve(e.lineWidth)} ${e.lineType} ${k}`,borderInlineStart:0}}}}},Dye=kt(["Layout","Sider"],Fye,yU,{deprecatedTokens:wU}),bU={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},Aye=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),g6=bo.createContext({}),$ye=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),Bye=bo.forwardRef((e,t)=>{let{prefixCls:r,className:n,trigger:a,children:o,defaultCollapsed:l=!1,theme:c="dark",style:d={},collapsible:f=!1,reverseArrow:h=!1,width:g=200,collapsedWidth:v=80,zeroWidthTriggerStyle:y,breakpoint:x,onCollapse:w,onBreakpoint:k,classNames:F,styles:C,...D}=e,{siderHook:S}=(0,$0.useContext)(m6),[A,I]=wr(l,e.collapsed),[j,$]=(0,$0.useState)(!1),N=(le,he)=>{I(le),w?.(le,he)},P={...e,collapsed:A,defaultCollapsed:l,theme:c,style:d,collapsible:f,reverseArrow:h,width:g,collapsedWidth:v,zeroWidthTriggerStyle:y,breakpoint:x,onCollapse:w,onBreakpoint:k},[O,V]=jt([F],[C],{props:P}),{getPrefixCls:H,direction:q}=(0,$0.useContext)(wt),L=H("layout-sider",r),[R,W]=Dye(L),z=(0,$0.useRef)(null);z.current=le=>{$(le.matches),k?.(le.matches),A!==le.matches&&N(le.matches,"responsive")},(0,$0.useEffect)(()=>{function le(ae){return z.current?.(ae)}let he;return typeof window?.matchMedia<"u"&&x&&x in bU&&(he=window.matchMedia(`screen and (max-width: ${bU[x]})`),Er(he?.addEventListener)&&he.addEventListener("change",le),le(he)),()=>{Er(he?.removeEventListener)&&he.removeEventListener("change",le)}},[x]),(0,$0.useEffect)(()=>{let le=$ye("ant-sider-");return S.addSider(le),()=>S.removeSider(le)},[]);let Q=()=>{N(!A,"clickTrigger")},K=xr(D,["collapsed"]),Z=A?v:g,T=Aye(Z)?`${Z}px`:String(Z),U=Number.parseFloat(String(v||0))===0?bo.createElement("span",{onClick:Q,className:te(`${L}-zero-width-trigger`,`${L}-zero-width-trigger-${h?"right":"left"}`),style:y},a||bo.createElement(f9,null)):null,X=q==="rtl"==!h,Y={expanded:X?bo.createElement(lf,null):bo.createElement(Oh,null),collapsed:X?bo.createElement(Oh,null):bo.createElement(lf,null)}[A?"collapsed":"expanded"],re=a!==null?U||bo.createElement("div",{className:`${L}-trigger`,onClick:Q,style:{width:T}},a||Y):null,J={...d,flex:`0 0 ${T}`,maxWidth:T,minWidth:T,width:T},se=te(L,`${L}-${c}`,{[`${L}-collapsed`]:!!A,[`${L}-has-trigger`]:f&&a!==null&&!U,[`${L}-below`]:!!j,[`${L}-zero-width`]:Number.parseFloat(T)===0},n,O.root,R,W),me=bo.useMemo(()=>({siderCollapsed:A}),[A]);return bo.createElement(g6.Provider,{value:me},bo.createElement("aside",{className:se,...K,style:{...V.root,...J},ref:t},bo.createElement("div",{className:te(`${L}-children`,O.body),style:V.body},o),f||j&&U?re:null))}),v6=Bye;var od={open:!1,src:"",label:"",items:[],current:0},g9=new Set,p9;function m9(e){od={...od,...e};for(let t of g9)t()}function h9(e){return e.startsWith("data:image/")||e.startsWith("blob:")||e.startsWith("/")||/^https?:\/\//i.test(e)}var wl={afterClosed(){if(od.open)return;let e=p9;p9=void 0,e?.()},subscribe(e){return g9.add(e),()=>g9.delete(e)},getSnapshot(){return od},isOpen(){return od.open},close(){m9({open:!1,src:"",label:"",items:[],current:0})},closeIfOpen(){return od.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||!h9(n.src.trim()))return!1;let a=e.map(l=>({src:l.src.trim(),label:l.label?.trim()||"\u56FE\u7247"})).filter(l=>h9(l.src)),o=e.slice(0,t).filter(l=>h9(l.src.trim())).length;return p9=r,m9({open:!0,items:a,current:o,src:a[o].src,label:a[o].label}),!0},select(e){let t=od.items[e];!od.open||!Number.isInteger(e)||!t||m9({current:e,src:t.src,label:t.label||"\u56FE\u7247"})}};var Iye=".markdown-content img, .wand-markdown-preview img, .inline-tool-image-thumb, .user-attachment-thumb";function v9(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(Iye)).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},b9=new Set;function Is(e={}){xl={...xl,...e};for(let t of b9)t()}function Mye(e){return["localhost","127.0.0.1","[::1]","::1"].includes(e.toLowerCase())}function xU(e){try{let t=new URL(e.trim());return t.protocol!=="http:"||!Mye(t.hostname)?null:`/api/local-preview/127.0.0.1/${t.port||"80"}${t.pathname==="/"?"/":t.pathname}${t.search}`}catch{return null}}function EU(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=xU(r);if(!n)throw new Error("\u53EA\u5141\u8BB8\u9884\u89C8\u672C\u673A\uFF08localhost\uFF09HTTP \u670D\u52A1\u3002");return n}function Tye(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 kU(e){let t=e.trim();return t.startsWith("/")?`/api/local-file/${Tye(t)}/`:null}function CU(e){let t=e.trim();if(b1(t))return t;if(!t)throw new Error("\u8BF7\u8F93\u5165\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84\u3002");return kU(t)??(()=>{throw new Error("\u8BF7\u8F93\u5165\u670D\u52A1\u7AEF\u6587\u4EF6\u8DEF\u5F84\u3002")})()}function jye(e){try{return Is({open:!0,mode:"file",value:e,previewUrl:CU(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 _ye(e){try{return Is({open:!0,mode:"url",value:e,previewUrl:EU(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 b1(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 b1(e)?(Is({open:!0,mode:"file",value:e,previewUrl:e,sourceLabel:t,error:null}),!0):!1},subscribe(e){return b9.add(e),()=>b9.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:_ye,openFile:jye,submit(){try{let e=xl.mode==="url"?EU(xl.value):CU(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 Nye(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(!Nye(e.items[r],t.items[r]))return!1;return!0}var Rye=class extends Us{constructor(){super(Pye)}},b6=new Rye;function G6(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,f)=>d===t.keys[f]),c=a.map((d,f)=>G6(e[d],l?t.children[f]:void 0,r));return l&&c.every((d,f)=>d===t.children[f])?t:{revision:r(),kind:n,keys:a,length:o,children:c}}var TV=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)=>G6(h,a?this.messages[g]:void 0,o)),c=r(l.map(h=>h.revision)),d=l.map((h,g)=>G6({message:h.revision,dependencies:c[g]},a?this.rows[g]:void 0,o)),f=G6(n,a?this.structure:void 0,o);return{generation:this.generation,sessionId:e,messages:l,rows:d,structure:f,changedIndices:d.flatMap((h,g)=>!a||h!==this.rows[g]?[g]:[]),structureChanged:!a||f!==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 zye(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 z9(e){return!e}function SU(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(SU(t))??null:null}submit(e,t,r){let n=this.session(e),a={text:t,attachments:n.attachments.slice()},o=SU(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 f=!zye(d);e.startsWith("conversation-draft:")&&(n.text||n.attachments.length)?(n.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),n.recovery={payload:a,persist:f},n.revision=++this.revision,this.notify()):this.edit(e,{restore:a,persist:f})}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{}}}},Hye=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}},FU=8,O1=12,N$=96*1024;function qye(e){return Math.max(0,e.scrollHeight-e.clientHeight-Math.abs(e.scrollTop))}function Wye(e){return e.clientHeight>0&&qye(e)<e.clientHeight*2}var Uye=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 Hye,P$=ef.configPath,L9="wand-chat-expand-state-v1",y6=[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<y6.length;r++)try{y6[r]()}catch{}t<y6.length&&localStorage.setItem("wand-ls-schema",String(y6.length))}catch{}})();function z1(e,t){try{var r=localStorage.getItem(e);return r==="true"?!0:r==="false"?!1:t}catch{return t}}function Ur(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:z1("wand-sidebar-open",!1),sidebarPinned:z1("wand-sidebar-pinned",!0),sidebarCollapsed:z1("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"||G5(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 TV,chatRenderEpoch:0,chatRenderPendingToken:null,lastRenderedMsgCount:0,lastRenderedEmpty:null,renderPending:!1,chatPageSize:FU,chatRenderedCount:FU,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 H9="\u4E2D\u6587",K6={\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 jV(){var e=m.config&&typeof m.config.language=="string"?m.config.language.trim():"";if(!e)return H9;if(K6[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 M1(e,t){var r=jV(),n=K6[r]||K6[H9],a=n&&e in n?n[e]:null;if(a==null){var o=K6[H9];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 q9(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 R$(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 _V=null;function Gye(e){_V=e}function Kye(){return _V}var y9=B(_(),1),Xye=B(si(),1),W9=B(tr(),1),Ts=B(Ee(),1),Cp=new Map;function Qye({attrs:e,source:t}){let r=y9.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]=y9.useState(()=>n(t));return y9.useLayoutEffect(()=>{let l=r.current;if(!l)return;let c=()=>o(f=>{let h=n(l);return f.phase===h.phase&&f.queued===h.queued&&f.disabled===h.disabled&&f.label===h.label&&f.title===h.title?f:h}),d=new MutationObserver(()=>(0,W9.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)(Ae,{name:a.phase==="running"?"stop":a.phase==="sent"?"check":"up",size:15})})}function NV(e){let t=Cp.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 Cp.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,W9.flushSync)(()=>r.root.render((0,Ts.jsx)(za,{children:(0,Ts.jsx)(Qye,{attrs:a,source:t})})));return}(0,W9.flushSync)(()=>r.root.render((0,Ts.jsx)(za,{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)(zt.Text,{strong:!0,children:t.dataset.optionLabel||t.querySelector(".ask-user-option-label")?.textContent}),t.querySelector(".ask-user-option-desc")&&(0,Ts.jsx)(zt.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 PV(e,t,r){let n=e.parentElement,a=n&&Cp.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 Zye(e,t){let r=Cp.get(e);return!r||!t.matches("button[data-antd-control]")?!1:(O$(e,t,r),!0)}function L1(e){Sa("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 Cp)t.isConnected||(r.root.unmount(),Cp.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,Xye.createRoot)(r),key:NV(t)};t.replaceWith(r),Cp.set(r,n),O$(r,t,n)})}var zE=null;function Jye(e){zE=e}var ewe=e=>{zE?.presentChat(e)},RV=e=>{zE?.refreshChatPresentation(e)},twe=(e,t,r)=>zE?.patchChatPresentation(e,t,r)??!1,Bu=null,H1=0,q1=0,sE=new Map,lE=new WeakMap,W1=null;function Sp(){Bu=null,sE.clear(),lE=new WeakMap,H1++}function rwe(){sE.clear(),lE=new WeakMap}function OV(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 zV(){W1&&OV(W1.takeRecords())&&Sp()}function z$(e){if(typeof HTMLElement>"u")return null;zV();let t=e||document.querySelector("#chat-output > .chat-messages"),r=m.currentView||"chat";return!t?.isConnected||r!=="chat"?(Sp(),null):((!Bu||Bu.root!==t||Bu.sessionId!==m.selectedId||Bu.view!==r)&&(Sp(),Bu={id:++H1,sessionId:m.selectedId,view:r,root:t},W1||(W1=new MutationObserver(n=>{OV(n)&&Sp()}),W1.observe(document,{childList:!0,subtree:!0}))),Bu)}function L$(e){return zV(),!!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,()=>{q1++},{capture:!0,passive:!0});document.addEventListener("keydown",e=>{e.key==="Tab"&&q1++},!0),window.addEventListener("blur",()=>{q1++}),window.addEventListener("pagehide",Sp),window.addEventListener("beforeunload",Sp)}function DU(e){return!Array.isArray(e?.content)||!e.content.some(t=>t?.__processing||t?.__queued)}function nwe(e){return JSON.stringify([e?.role,e?.author?.id||null,!!e?.notice])}function awe(e,t,r){let n=z$(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)DU(g)&&(o.set(g,c++),l.set(g,(l.get(g)||0)+1));let d=new Map;function f(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=f(g);v&&d.set(v,(d.get(v)||0)+1)}let h=new Map;return{messages:t.map(g=>{if(!DU(g))return null;let v=f(g),y=o.get(g),x=null;!v&&y!==void 0&&e.sessionKind!=="structured"&&l.get(g)===1&&(x=lE.get(g)||"reference:"+ ++H1,lE.set(g,x));let w=v&&d.get(v)===1?"id:"+v:!v&&e.sessionKind==="structured"&&y!==void 0?"structured:"+((e.messageOffset||0)+y):x;if(!w)return null;let k=nwe(g),F=sE.get(w),C=F?.guard===k?F:{key:"view:"+n.id+":turn:"+ ++H1,displayKey:"source:"+w+":"+ ++H1,guard:k,blockOffset:0},D=y===0&&Number.isInteger(e.leadingBlockOffset)?e.leadingBlockOffset:0,S={...C,blockOffset:D};return h.set(w,S),S}),commit(){L$(n)&&(sE=h)}}}function iwe(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 w6(e){let t=NV(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:"+U9(e)+":"+(e.getAttribute("onclick")||""):null}function AU(e){return e instanceof Element&&e.matches(".assistant-reply-disclosure, .assistant-reply-host, .msg-copy-btn")}function U9(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 owe(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 H$(e,t){if(e.isEqualNode(t))return;if(!(e instanceof Element)||!(t instanceof Element)){e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue);return}if(Zye(e,t)||(owe(e,t),e.matches(".code-copy.copied, .msg-copy-btn.copied")))return;let r=e.scrollLeft,n=e.scrollTop,a=swe(e);twe(e,t,H$)||LV(e,t),e instanceof HTMLElement&&e.matches(".chat-activity-timeline")&&ewe(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 swe(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 LV(e,t){let r=Array.from(e.childNodes).filter(f=>!AU(f)),n=Array.from(t.childNodes),a=new Map,o=new Set;for(let f of r){let h=f instanceof Element?w6(f):null;h&&(a.has(h)?o.add(h):a.set(h,f))}let l=new Set;for(let f of n){let h=f instanceof Element?w6(f):null;h&&(l.has(h)&&o.add(h),l.add(h))}let c=new Set,d=e.firstChild;for(;d&&AU(d);)d=d.nextSibling;n.forEach((f,h)=>{let g=f instanceof Element?w6(f):null,v=g&&!o.has(g)?a.get(g):void 0;if(!g){let y=w=>!(w instanceof Element&&w6(w))&&U9(w)===U9(f),x=r.filter(y);x.length===1&&n.filter(y).length===1?v=x[0]:r.length===n.length&&r[h]&&y(r[h])&&(v=r[h])}if(v&&(c.has(v)||v.nodeType!==f.nodeType||v instanceof Element&&f instanceof Element&&v.tagName!==f.tagName&&!Yye(v,f))&&(v=void 0),v){if(c.add(v),H$(v,f),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(f,d),c.add(f)});for(let f of r)!c.has(f)&&f.parentNode===e&&e.removeChild(f)}function HV(e,t){return H$(e,t),e}function lwe(e,t){let r=document.createElement(e.tagName);r.innerHTML=t,LV(e,r)}function uwe(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 f=d.getAttribute("data-chat-owner");f&&a.set(f,d)}let o=Array.from(r.content.children),l=new Set,c=e.firstElementChild;for(let d of o){let f=d.getAttribute("data-chat-owner"),h=f?a.get(f):null;if(h&&!l.has(h)){if(HV(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 $U(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 cwe(e){let t=z$(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=q1,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 x=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");x&&x!==o&&d.push(x)}let f=e.getBoundingClientRect(),h=o?.getBoundingClientRect(),g=o&&h&&h.bottom>f.top&&h.top<f.bottom?{node:o,top:h.top-f.top}:null,v=()=>L$(t)&&l===q1;return{anchor:g,current:v,finish(){if(!o||!v()||$U(o)||!document.hasFocus())return;let y=document.activeElement;if(y!==o&&y!==document.body)return;let x=d.find($U);x?x.focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}}}var qV=B(si(),1),WV=B(tr(),1);function dwe(){Xb().catch(()=>{});let e=new URLSearchParams(Hn()),t=e.get("view");(t==="taskboard"||t==="issues")&&(X7(),globalThis.__wandImportBrowserModule("91408c351070d6d7").catch(()=>{})),(e.get("sidebar")==="tasks"||!e.has("sidebar")&&Dr.getSnapshot().mode==="tasks")&&(an.preloadTaskGroups(),globalThis.__wandImportBrowserModule("5f635cbcab701433").catch(()=>{}))}function uE(){Q7(),an.clearPreload()}go(uE);async function fwe(e,t={}){let r=Kw(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&&Kw(t)&&F8(e)}function UV(e,t,r,n){return e==="pty"&&!!r&&t==="running"&&!n}function V9(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(V9(o,t));return a}let n={};t.set(e,n);for(let[a,o]of Object.entries(e))n[a]=V9(o,t);return n}function VV(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))VV(r,t);return Object.freeze(e)}function BU(e,t,r){let n=V9({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?VV(n):n}function mwe(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 hwe(e){let t=globalThis.reportError;if(typeof t=="function"){t(e);return}console.error("[wand-ui-store] subscriber failed",e)}function gwe(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var vwe=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=mwe(e.batchMs),this.freezeSnapshots=e.freezeSnapshots!==!1,this.snapshot=BU(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}`}),!!gwe(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=BU(this.readSnapshot(),this.snapshot.revision+1,this.freezeSnapshots);for(let e of[...this.listeners])try{e()}catch(t){hwe(t)}}}},bwe=class{constructor(e){oe(this,"store"),oe(this,"unsubscribeLegacy"),this.store=new vwe({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 GV(e){return e.width>=640?e.coarsePointer&&e.height<480:!0}var ywe={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 IU(e,t=0){if(!e)return t;let r=new Date(e).getTime();return Number.isFinite(r)?r:t}function wwe(e){return e?Object.values(e).filter(Boolean).length:0}function xwe(e){return e.config?"authenticated":e.loginChecked?"anonymous":"booting"}function KV(e){let t=Ke(e.sessionSource).toLowerCase();return t==="automation"||t==="startup"}function Ewe(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(Pi(e))return"\u521A\u5B8C\u6210";let r=Ke(e.status,"idle");return UV(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"\u7A7A\u95F2":ywe[r]??r}function kwe(e){if(e.permissionBlocked)return"permission-blocked";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return"running";if(Pi(e))return"just-completed";let r=Ke(e.status);return UV(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"idle":r}function XV(e){return Ke(e.workingDir)||Ke(e.config?.defaultCwd)||Ke(e.config?.cwd)||"/tmp"}function Cwe(e){return Ke(e.title)||Ke(e.description)||Ke(e.summary)||Ke(e.command)||"Wand \u4F1A\u8BDD"}function Swe(e,t,r){let n=Ke(e.id),a=Ke(e.provider),o=_o(a)??(a||iu(e.command)||"terminal"),l=Ke(e.status,"idle"),c=e.sessionKind==="structured"?"structured":"pty",d=!!(e.worktree?.enabled??e.worktreeEnabled),f=KV(e)?"automation":"wand",h=Yh(e),g=a==="pi"&&c==="structured"?e.structuredState?.engine==="core"?"sdk":"cli":void 0;return{id:n,source:f,provider:o,...g?{engine:g}:{},kind:c,title:Cwe(e),description:Ke(e.description),cwd:Ke(e.cwd,XV(t)),status:l,statusLabel:Ewe(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=Ke(e.structuredState?.turnStartedAt)||Ke(e.turnStartedAt),y=Ke(e.structuredState?.lastActivityAt)||Ke(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:Ke(e.worktree?.branch??e.worktreeBranch)||void 0,path:Ke(e.worktree?.path??e.worktreePath)||void 0,mergeStatus:Ke(e.worktree?.mergeStatus??e.worktreeMergeStatus)||void 0}}:{}}}function MU(e,t){let r=new Map;return t.forEach((n,a)=>{n.id&&r.set(n.id,a)}),e.sort((n,a)=>{let o=IU(n.startedAt),l=IU(a.startedAt);return o!==l?l-o:(r.get(a.id)??0)-(r.get(n.id)??0)})}function QV(e,t){let r=e.sessions??[],n=e.selectedSessionIds??{},a=r.map(S=>Swe(S,e,n)),o=a.find(S=>S.id===e.selectedId)??null,l=r.find(S=>S.id===e.selectedId)??null,c=MU(a.filter(S=>S.source==="wand"),r),d=MU(a.filter(S=>S.source==="automation"),r),f=t.width<=768,h=GV({width:t.width,height:t.height??Number.POSITIVE_INFINITY,coarsePointer:t.coarsePointer??!1}),g=!!e.sessionsDrawerOpen,v=!!e.sidebarPinned,y=!h&&v&&!!e.sidebarCollapsed,x=!!e.filePanelOpen,w=o?.kind==="structured"||e.currentView==="chat"?"chat":"terminal",k=!!e.sessionsManageMode,F=wwe(n),C=o?.cwd??XV(e),D=o&&e.gitStatusSessionId===o.id&&e.gitStatus?.isGit?{branch:Ke(e.gitStatus.branch,"?"),modifiedCount:Number(e.gitStatus.modifiedCount)||0,clean:(Number(e.gitStatus.modifiedCount)||0)===0}:null;return{auth:{phase:xwe(e)},viewport:{mobile:f,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:x,filePanelBackdropVisible:x&&f,topbarMoreOpen:!!e.topbarMoreOpen,currentView:w},selected:o,sidebar:{interactiveCount:r.filter(S=>!KV(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?kwe(l):"",cwd:C,currentTask:Ke(e.currentTask?.title)||Ke(l?.currentTaskTitle),titleGenerating:!!l?.titleGenerating,git:D},legacyVisibility:{terminal:!!o&&w==="terminal",chat:!!o&&w==="chat",blank:!o,composer:!!o&&!Fs(l)}}}var Fwe=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 Dwe(e,t){switch(t.type){case"nav.home":return e.goHome();case"nav.refresh":return e.refreshPage();case"terminal.display":return e.terminalDisplay?.(t.command);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 Awe(t)}}function Awe(e){throw new Error(`Unsupported UI action: ${JSON.stringify(e)}`)}var $we=B(_(),1),Bwe=B(_(),1),w9=B(Ee(),1),YV="",G9=new Set;function my(e){YV=e,G9.forEach(t=>t())}var Iwe=e=>(G9.add(e),()=>{G9.delete(e)}),TU=()=>YV,Mwe=["taskboard","issues","teams","teamchat","schedules","calendar","workspace","chats","contacts"];function Twe(){let e=Tb(),t=Bwe.useSyncExternalStore(Iwe,TU,TU),r=nD(e),n=new URLSearchParams(e),a=n.has("view")&&!Mwe.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,w9.jsx)("div",{style:{flexShrink:0,padding:8,zIndex:30},children:(0,w9.jsx)(La,{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,w9.jsx)(Ne,{size:"small",onClick:()=>{my(""),Va(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 jwe(e,t,r){return typeof r=="boolean"?r:e.length?!0:Hr(t).some(n=>n.type===v6)}var LE=({suffixCls:e,tagName:t,displayName:r})=>n=>js.forwardRef((a,o)=>js.createElement(n,{ref:o,suffixCls:e,tagName:t,...a})),q$=js.forwardRef((e,t)=>{let{prefixCls:r,suffixCls:n,className:a,tagName:o,...l}=e,{getPrefixCls:c}=js.useContext(wt),d=c("layout",r),[f,h]=h6(d),g=n?`${d}-${n}`:d;return js.createElement(o,{className:te(r||g,a,f,h),ref:t,...l})}),_we=js.forwardRef((e,t)=>{let{direction:r}=js.useContext(wt),[n,a]=js.useState([]),{prefixCls:o,className:l,rootClassName:c,children:d,hasSider:f,tagName:h,style:g,...v}=e,y=xr(v,["suffixCls"]),{getPrefixCls:x,className:w,style:k}=_t("layout"),F=x("layout",o),C=jwe(n,d,f),[D,S]=h6(F),A=te(F,{[`${F}-has-sider`]:C,[`${F}-rtl`]:r==="rtl"},w,l,c,D,S),I=js.useMemo(()=>({siderHook:{addSider:j=>{a($=>[].concat(Xr($),[j]))},removeSider:j=>{a($=>$.filter(N=>N!==j))}}}),[]);return js.createElement(m6.Provider,{value:I},js.createElement(h,{ref:t,className:A,style:{...k,...g},...y},d))}),Nwe=LE({tagName:"div",displayName:"Layout"})(_we),Pwe=LE({suffixCls:"header",tagName:"header",displayName:"Header"})(q$),Rwe=LE({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(q$),Owe=LE({suffixCls:"content",tagName:"main",displayName:"Content"})(q$),zwe=Nwe,q0=zwe;q0.Header=Pwe;q0.Footer=Rwe;q0.Content=Owe;q0.Sider=v6;q0._InternalSiderContext=g6;var cE=q0,y1=B(_(),1),K9=B(Ee(),1),W$=Ln(()=>globalThis.__wandImportBrowserModule("8bc3bf586a2b73fe").then(e=>e.ComposerAttachmentsHost),b6,e=>e.mounts.length>0,{title:"\u9644\u4EF6",close:()=>{},renderPending:()=>(0,K9.jsx)(K9.Fragment,{})}),U$=Ln(()=>globalThis.__wandImportBrowserModule("4a6ed04ec80dea3c").then(e=>e.PiExecutionHost),Vc,e=>e!==null,{title:"\u6267\u884C\u8BE6\u60C5",close:()=>Vc.close()}),HE=Ln(()=>globalThis.__wandImportBrowserModule("70e00ced5ceba32d").then(e=>e.SettingsHost),Da,(e,t)=>e.open||t.presentation==="page",{title:"\u8BBE\u7F6E",page:!0,close:()=>mo.close(),dismissable:e=>e.presentation!=="page"}),Lwe=Ln(()=>globalThis.__wandImportBrowserModule("e280bc3e8ac49e67").then(e=>e.CodeEditorHost),Qc,e=>e.open,{title:"\u6587\u4EF6\u7F16\u8F91\u5668",page:!0,close:()=>{Zb.execute({type:"close"})}}),Hwe=Ln(()=>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()}),qwe=Ln(()=>globalThis.__wandImportBrowserModule("4bd2adb3495d6dd4").then(e=>e.NewSessionHost),dl,e=>e.open,{title:"\u65B0\u5EFA\u4F1A\u8BDD",page:!0,close:()=>Ia.close(),renderPending:e=>(0,K9.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$=Ln(()=>globalThis.__wandImportBrowserModule("349206312bb65200").then(e=>e.FolderPickerHost),SA,e=>e.open,{title:"\u9009\u62E9\u76EE\u5F55",close:()=>nd.close()}),G$=Ln(()=>globalThis.__wandImportBrowserModule("608565cf9381774c").then(e=>e.QuickCommitHost),S7,e=>e.open,{title:"\u5FEB\u901F\u63D0\u4EA4",close:()=>Nc.close()}),K$=Ln(()=>globalThis.__wandImportBrowserModule("4574de49797344ae").then(e=>e.WorktreeMergeHost),D7,e=>e.open,{title:"\u5408\u5E76\u5DE5\u4F5C\u6811",close:()=>Pc.close()}),X$=Ln(()=>globalThis.__wandImportBrowserModule("20b70b89cf3b3846").then(e=>e.FilePreviewHost),Nf,e=>e.open,{title:"\u6587\u4EF6\u9884\u89C8",close:()=>{Es.execute({type:"close"})}}),Q$=Ln(()=>globalThis.__wandImportBrowserModule("5a62d8f81561e955").then(e=>e.LocalPreviewHost),El,e=>e.open,{title:"\u672C\u5730\u9884\u89C8",close:()=>El.close()}),Y$=Ln(()=>globalThis.__wandImportBrowserModule("ddc5d213cdc1ffeb").then(e=>e.ImageViewerHost),wl,e=>e.open,{title:"\u56FE\u7247",close:()=>wl.close()}),Z$=Ln(()=>globalThis.__wandImportBrowserModule("79f6d648c25a1c7b").then(e=>e.MissionsHost),$7,e=>e.open,{title:"\u4EFB\u52A1",close:()=>Tf.close()}),J$=Ln(()=>globalThis.__wandImportBrowserModule("b14b581260fe30bf").then(e=>e.WorkspacesHost),Ka,e=>e.open,{title:"\u5DE5\u4F5C\u533A",close:()=>Xf.close()}),eB=Ln(()=>globalThis.__wandImportBrowserModule("90c5a1669e510ab4").then(e=>e.GithubIssuesHost),M7,e=>e.open,{title:"GitHub Issues",close:()=>Ab.close()}),x6=B(_(),1),Bn=B(_(),1),fa=B(_(),1);function Wwe(e){return e.flatMap(t=>[...t.tasks.flatMap(r=>[...r.sessions,...r.archivedSessions??[]]),...t.standaloneSessions,...t.archivedSessions??[]])}function Uwe(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))&&qc(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 f=r.get(l.employeeId)??[];f.push({group:o,session:l,taskName:c,archived:d||l.archived===!0}),r.set(l.employeeId,f)};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)Fs(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(n0);return r}function ZV(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(Eu(r),r.engine)]}function JV(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&&!qc(c.session)?!1:ku(n,e.title,e.name,...ZV(c,a)))}function Gwe(e,t,r,n={}){return JV(e,t,r,"",n).flatMap(a=>ZV(a,n))}var Oe=B(Ee(),1),Kwe=qh(()=>globalThis.__wandImportBrowserModule("03a539f59a10f2c6").then(e=>e.GroupEditor),{title:"\u7FA4\u804A",renderPending:()=>(0,Oe.jsx)(Oe.Fragment,{})});function Xwe({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,Oe.jsx)(Xe,{component:"nav",vertical:!0,gap:4,className:"conversation-navigation","aria-label":"\u529F\u80FD\u5BFC\u822A",children:n.map(o=>(0,Oe.jsxs)(Mr,{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,Oe.jsx)("span",{className:"sidebar-nav-icon","aria-hidden":"true",children:o.value==="teams"?(0,Oe.jsx)(pi,{count:t,size:"small",children:(0,Oe.jsx)(Ae,{name:o.icon,size:18})}):(0,Oe.jsx)(Ae,{name:o.icon,size:18})}),(0,Oe.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:o.value==="board"?"\u4EFB\u52A1":o.label})]},o.value))})}function Qwe({enabled:e,onNavigate:t,onCreateSession:r}){let n=g0(),[a,o]=fa.useState("closed"),l=fa.useRef(null),c=fa.useRef(null);return fa.useEffect(()=>{o("closed")},[e,n.mode]),(0,Oe.jsxs)(Xe,{ref:l,align:"center",className:"conversation-sidebar-tools",style:{position:"relative"},children:[(0,Oe.jsxs)(Mr,{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,Oe.jsx)(Of,{active:a!=="closed",from:"plus",to:"close"}),(0,Oe.jsx)("span",{className:"conversation-create-label",children:a==="closed"?"\u53D1\u8D77\u7FA4\u804A":"\u5173\u95ED"})]}),(0,Oe.jsx)(oD,{open:e&&a!=="closed",owner:"conversation-create-panel",focusKey:a,anchorRef:l,triggerRef:c,onClose:()=>o("closed"),children:(0,Oe.jsx)("div",{hidden:a!=="group",children:(0,Oe.jsx)(Kwe,{open:e&&a==="group",enabled:e&&a==="group",owner:"conversation-create-panel",onCancel:()=>o("closed"),onCreated:d=>{o("closed"),Dr.select(d,!0),t()}})})})]})}function jU(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 tB(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 X9(e,t,r,n,a){let o=r.trim().toLowerCase();return e.filter(l=>{let c=tB(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 Zwe(e,t,r,n,a){let o=e.filter(tB).length,l=e.length-o;return{total:e.length,active:l,archived:o,scope:X9(e,t,"",n,a).length,matches:X9(e,t,r,n,a).length}}function Jwe({compact:e,enabled:t=!0,onNavigate:r,onOpenSession:n,selectedSessionId:a=null,sessionTitles:o={}}){let{items:l,systemSessions:c,error:d,loaded:f,refresh:h}=oA(!0,t),{groups:g}=hA(),v=fa.useMemo(()=>Vwe(g,c),[g,c]),y=fa.useMemo(()=>[...Wwe(g),...c],[g,c]),{employees:x}=G3({enabled:t}),w=g0(),k=(w.filters["list-query"]??"").trim().toLowerCase(),F=w.listFilter,[C,D]=fa.useState(""),S=fa.useRef(null),[A,I]=fa.useState(!1),j=fa.useRef([]);A||(j.current=l.map(z=>z.id));let $=new Map(j.current.map((z,Q)=>[z,Q])),N=l.slice().sort((z,Q)=>{let K=$.get(z.id)??-1,Z=$.get(Q.id)??-1;return+!!Q.pinnedAt-+!!z.pinnedAt||(Q.pinnedAt??"").localeCompare(z.pinnedAt??"")||(K<0?l.length:K)-(Z<0?l.length:Z)}),P=z=>Gwe(z,v,F,o),O=w.activityOnly?z=>Uwe(z,y,w.active===!0?w.selectedId:null,a):void 0,V=X9(N,F,k,P,O),H=Zwe(l,F,k,P,O),q=f?`${w.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=>{Dr.select(z),r()},R=async(z,Q)=>{D("");try{await ap.updateListState(z.id,Q)}catch(K){D(K instanceof Error?K.message:"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}},W=async z=>{let Q=await vn.dialog({title:`\u5220\u9664\u5BF9\u8BDD\u300C${z.title}\u300D\uFF1F`,description:z.external?"\u4EC5\u5220\u9664 Wand \u4E2D\u7684\u7FA4\u955C\u50CF\u3001\u672C\u5730\u6D88\u606F\u548C\u5173\u8054\u6267\u884C\uFF1B\u4E0D\u4F1A\u9000\u51FA\u6216\u89E3\u6563\u9489\u9489\u7FA4\uFF0C\u4E5F\u4E0D\u4F1A\u5220\u9664\u5176\u4ED6\u7FA4\u5171\u7528\u7684\u673A\u5668\u4EBA\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002":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(Q.dismissed!==!0&&Q.action)try{await ap.remove(z.id),Dr.getSnapshot().selectedId===z.id&&Dr.select("")}catch(K){D(K instanceof Error?K.message:"\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}};return(0,Oe.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,Oe.jsxs)("div",{className:"conversation-list-tools",children:[(0,Oe.jsx)("div",{className:"conversation-search-host",children:(0,Oe.jsx)(MA,{inputRef:S,className:"conversation-search-input",label:"\u641C\u7D22\u5BF9\u8BDD\u6216\u4EFB\u52A1",value:w.filters["list-query"]??"",onValueChange:z=>Dr.filter("list-query",z)})}),(0,Oe.jsxs)(Xe,{vertical:!0,align:"stretch",gap:4,className:"conversation-list-section",children:[(0,Oe.jsxs)(Xe,{align:"center",gap:6,className:"conversation-filter-row",children:[(0,Oe.jsx)(HF,{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:Dr.listFilter}),(0,Oe.jsx)(ND,{active:w.activityOnly,label:"\u53EA\u770B\u6D3B\u52A8\u5BF9\u8BDD",onChange:Dr.activityOnly})]}),(0,Oe.jsx)(zt.Text,{type:"secondary",className:"conversation-list-count",title:q,"aria-label":q,children:f?k?`\u5339\u914D ${H.matches} / ${H.scope}`:`${H.scope} \u4E2A\u5BF9\u8BDD`:d?"\u6570\u91CF\u672A\u52A0\u8F7D":"\u8BFB\u53D6\u4E2D\u2026"})]})]}),d?(0,Oe.jsxs)(zt.Text,{type:"danger",role:"status",children:[d,(0,Oe.jsx)(Ne,{size:"small",onClick:h,children:"\u91CD\u65B0\u8BFB\u53D6"})]}):null,C?(0,Oe.jsx)(zt.Paragraph,{type:"danger",role:"alert",children:C}):null,(0,Oe.jsxs)(R2,{value:`${F}:${w.activityOnly}`,children:[V.map(z=>(0,Oe.jsx)(e5e,{item:z,employee:x.find(Q=>Q.id===z.peerEmployeeId)??null,compact:e,query:k,enabled:t,filter:F,selected:w.selectedId===z.id&&w.active!==!1,onSelect:()=>L(z.id),sessionEntries:JV(z,v,F,k,o,w.activityOnly,a),sessionTitles:o,selectedSessionId:a,onOpenSession:n,onUpdate:Q=>R(z,Q),onRemove:()=>W(z)},z.id)),f&&!V.length?(0,Oe.jsxs)("div",{className:"conversation-list-empty",role:"status",children:[(0,Oe.jsx)(Ae,{name:k?"search":"chat",size:20}),(0,Oe.jsx)(zt.Paragraph,{type:"secondary",children:k?"\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8BDD\u6216\u4EFB\u52A1":w.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,Oe.jsx)(Ne,{kind:"ghost",size:"small",onClick:()=>{Dr.filter("list-query",""),S.current?.focus({preventScroll:!0})},children:"\u6E05\u7A7A\u641C\u7D22"}):null]}):null]})]})}function e5e({item:e,employee:t,compact:r,query:n,enabled:a,filter:o,selected:l,onSelect:c,onUpdate:d,onRemove:f,sessionEntries:h,sessionTitles:g,selectedSessionId:v,onOpenSession:y}){let x=t??(e.peerEmployeeId?V3(e.peerEmployeeId):null)??(e.peerEmployeeId?{id:e.peerEmployeeId,name:e.title}:null),w=Rh().name||"\u6211",[k,F]=fa.useState(!1),[C,D]=fa.useState(!1),[S,A]=fa.useState(!1),I=fa.useRef(null),j=fa.useRef(null),$=fa.useId(),[N,P]=fa.useState(!1);fa.useEffect(()=>{F(!1),P(!1)},[a,r,n,o]);let O=async K=>{if(!S){A(!0),F(!1),(I.current?.querySelector(".conversation-row-open")??I.current?.querySelector("button"))?.focus({preventScroll:!0});try{await K()}finally{A(!1)}}},V=n?e.tasks.filter(K=>K.task.title.toLowerCase().includes(n)):e.tasks,H=!r&&!e.dissolvedAt&&(e.kind!=="dm"||C)&&(C||!!n&&V.length>0),q=!r&&e.kind==="dm"&&N,L=h.map(K=>K.session),R=()=>{D(!1),P(!N)},W=async()=>{await hl.reload(),np()},z=tB(e),Q=(0,Oe.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,Oe.jsx)(Mr,{className:"conversation-row-avatar conversation-avatar-button","aria-label":x&&!r?`\u67E5\u770B${e.title}\u7684\u8D44\u6599`:`\u6253\u5F00${e.title}`,onClick:K=>x&&!r?kb.open(x,K.currentTarget):c(),children:x?(0,Oe.jsx)(jc,{employee:x,size:"sm"}):e.external?(0,Oe.jsx)(fi,{size:36,icon:(0,Oe.jsx)(Ae,{name:"users",size:18})}):e.kind==="group"?(0,Oe.jsx)(a7,{title:e.title,members:e.team?.members??[],size:36}):(0,Oe.jsx)(fi,{size:36,icon:(0,Oe.jsx)(Ae,{name:"chat",size:16})})}),r?null:(0,Oe.jsx)(qb,{title:e.title,selector:".conversation-row-title",children:(0,Oe.jsx)(Ne,{kind:"ghost",className:"conversation-row-open",title:e.title,onClick:c,children:(0,Oe.jsxs)("span",{className:"conversation-row-copy",children:[(0,Oe.jsxs)("span",{className:"conversation-row-topline",children:[(0,Oe.jsx)("span",{className:"conversation-row-title",children:e.title}),jU(e.messageAt)?(0,Oe.jsx)("time",{className:"conversation-row-time",dateTime:e.messageAt,children:jU(e.messageAt)}):null]}),(0,Oe.jsxs)("span",{className:"conversation-row-bottomline",children:[e.external?(0,Oe.jsx)("span",{className:"conversation-archived-tag",children:"\u9489\u9489"}):null,z?(0,Oe.jsx)("span",{className:"conversation-archived-tag",children:"\u5DF2\u5F52\u6863"}):null,(0,Oe.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"?`${w} + ${e.team?.members.length??0} \u4F4D\u5458\u5DE5`:"\u79C1\u804A")}),e.pinnedAt?(0,Oe.jsx)("span",{className:"conversation-pin",title:"\u5DF2\u7F6E\u9876","aria-label":"\u5DF2\u7F6E\u9876",children:(0,Oe.jsx)(Ae,{name:"pin",size:13})}):null]})]})})}),r?null:(0,Oe.jsx)(Mr,{className:"conversation-row-more","aria-label":`${e.title}\u7684\u83DC\u5355`,"aria-haspopup":"menu","aria-expanded":k,onClick:K=>{if(K.stopPropagation(),k){F(!1);return}let Z=K.currentTarget.getBoundingClientRect();K.currentTarget.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:Z.right,clientY:Z.bottom,button:2}))},children:(0,Oe.jsx)(Ae,{name:"more",size:16})})]});return(0,Oe.jsxs)("div",{className:"conversation-list-item",onKeyDown:K=>{K.key!=="Escape"||K.defaultPrevented||!q||k||!K.currentTarget.contains(K.target)||(K.preventDefault(),K.stopPropagation(),j.current?.focus({preventScroll:!0}),P(!1))},children:[(0,Oe.jsx)(M2,{row:Q,rowRef:I,open:k,disabled:!a,onOpenChange:K=>{(!K||!S)&&F(K)},label:"\u5BF9\u8BDD\u83DC\u5355",title:e.title,className:"conversation-row-menu",menu:{items:[{key:"open",disabled:S,icon:(0,Oe.jsx)(Ae,{name:"chat"}),label:"\u6253\u5F00\u5BF9\u8BDD"},...x?[{key:"profile",disabled:S,icon:(0,Oe.jsx)(Ae,{name:"info"}),label:"\u67E5\u770B\u5458\u5DE5\u8D44\u6599"}]:[],{key:"pin",disabled:S,icon:(0,Oe.jsx)(Ae,{name:"pin"}),label:e.pinnedAt?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},...e.kind==="dm"?[{key:"sessions",disabled:S,icon:(0,Oe.jsx)(Ae,{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,Oe.jsx)(Ae,{name:"task"}),label:C?"\u6536\u8D77\u4EFB\u52A1":`\u67E5\u770B ${e.tasks.length} \u4E2A\u4EFB\u52A1`}]:[],{key:"danger-divider",type:"divider"},...e.kind==="group"&&!e.external?[{key:"dissolve",disabled:S,icon:(0,Oe.jsx)(Ae,{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,Oe.jsx)(Ae,{name:"trash"}),label:e.external?"\u5220\u9664\u672C\u5730\u7FA4\u955C\u50CF\u2026":e.kind==="group"?"\u5220\u9664\u7FA4\u804A\u2026":"\u5220\u9664\u5BF9\u8BDD\u2026"}],onClick:({key:K})=>{S||(F(!1),K==="open"?c():K==="profile"&&x?kb.open(x,I.current?.querySelector("button")??null):K==="tasks"?(P(!1),D(!C)):K==="sessions"?R():K==="pin"?O(()=>d({pinned:!e.pinnedAt})):K==="delete"?O(f):K==="dissolve"&&O(async()=>{if(e.dissolvedAt){await d({dissolved:!1});return}let Z=await vn.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,Oe.jsxs)(j2,{id:$,open:q,label:e.title,toggleRef:j,toggleClassName:"conversation-session-toggle",disabled:!a||S,hasSessions:L.length>0,reserve:!0,onOpenChange:K=>{D(!1),P(K)},children:[(0,Oe.jsx)(HD,{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),P(!0)},onActivate:K=>{D(!1),P(!1),y?.(K.id)}}),(0,Oe.jsx)(Wb,{id:$,open:q,children:(0,Oe.jsx)(e0.Provider,{value:a&&!r&&q,children:(0,Oe.jsxs)("div",{className:"conversation-person-sessions",role:"group","aria-label":`${e.title}\u7684\u4F1A\u8BDD\u5217\u8868`,children:[h.map((K,Z)=>{let T=K.session,U=Rb(T,Z,g[T.id]);return(0,Oe.jsx)(_D,{session:{...T,archived:K.archived},label:U,disabled:!a||S,intoNewTask:T.workspaceTaskId?void 0:K.group,onOpen:()=>y?.(T.id),onArchive:async X=>{await RD(T.id,X),await W()},onDelete:async()=>{await PD([T.id],qD(K.group,T)??null),await W()},row:(0,Oe.jsx)("div",{className:"conversation-person-session",children:(0,Oe.jsx)(VD,{id:T.id,title:U,titleGenerating:T.titleGenerating,avatarNode:(0,Oe.jsx)(Qh,{session:T,size:14}),state:Ub(T),glow:T2(T),summary:`${ou(Eu(T),T.engine)} \xB7 ${Ub(T).label}`,active:T.id===v,onClick:()=>y?.(T.id)})})},T.id)}),L.length?null:(0,Oe.jsx)(zt.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,Oe.jsxs)(Ne,{kind:"ghost",className:"conversation-task-toggle","aria-expanded":H,onClick:()=>D(!C),children:[(0,Oe.jsx)(Ae,{name:"chevronDown",size:12}),e.tasks.length," \u4E2A\u4EFB\u52A1",H?" \xB7 \u6536\u8D77":""]}):null,H?V.map(K=>(0,Oe.jsxs)(Ne,{kind:"ghost",className:"conversation-task-row",onClick:()=>{c(),Dr.filter(e.id,K.task.id)},children:[(0,Oe.jsx)(Ae,{name:"task"}),(0,Oe.jsx)("span",{className:"conversation-row-title",children:K.task.title}),(0,Oe.jsx)("span",{className:"conversation-row-status","data-archived":K.task.status==="archived"||void 0,children:e7(K)})]},K.task.id)):null]})}var bp=B(_(),1),t5e=B(_(),1),eG={items:[]},tG=eG,Q9=new Set,E6=0,x9=null,E9=null;function r5e(e){tG=e;for(let t of Q9)t()}function Y9(){E9||(E9=yt("/api/attention").then(e=>{r5e({items:Array.isArray(e.items)?e.items:[]})}).catch(()=>{}).finally(()=>{E9=null}))}function n5e(e){return Q9.add(e),E6+=1,E6===1&&(x9=s0(()=>Y9()),Y9()),()=>{Q9.delete(e),E6-=1,E6===0&&(x9?.(),x9=null)}}function a5e(){return(0,t5e.useSyncExternalStore)(n5e,()=>tG.items,()=>eG.items)}var Zr=B(Ee(),1);function i5e(e){return e.map(t=>t.entries.map(r=>`${r.id}:${r.status}`).join(",")).join("|")}function rG(){let e=a5e(),t=ai(),r=i5e(t.sidebar.groups);return bp.useEffect(()=>{Y9()},[r]),e}function nG(e,t,r){if(r(),e.sessionId){En.close(),t({type:"session.select",id:e.sessionId});return}En.open("","","teams")}function aG({items:e,onOpen:t}){return(0,Zr.jsx)(sr,{children:(0,Zr.jsx)("ul",{className:"wand-attention-list",children:e.map(r=>(0,Zr.jsx)("li",{children:(0,Zr.jsx)(Ne,{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 o5e({open:e,onToggle:t,compact:r=!1}){let n=rG(),a=Fi(),o=bp.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)(Mr,{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)(pi,{count:n.length,size:"small",children:(0,Zr.jsx)(Ae,{name:"bell",size:20})})}),children:(0,Zr.jsxs)("div",{className:"sidebar-notification-content",children:[(0,Zr.jsx)(zt.Text,{strong:!0,children:"\u901A\u77E5"}),n.length?(0,Zr.jsx)(aG,{items:n,onOpen:d=>nG(d,a,t)}):(0,Zr.jsx)(zt.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)(Ne,{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)(Ae,{name:"info",size:12,className:"sidebar-attention-badge-icon"}),(0,Zr.jsx)("span",{className:"sidebar-attention-badge-label",children:l}),(0,Zr.jsx)(Ae,{name:"chevronDown",size:11,className:"sidebar-attention-badge-chevron"})]})}function s5e(){let e=rG(),t=Fi(),[r,n]=bp.useState(!1),a=bp.useCallback(()=>n(!1),[]),o=bp.useId(),l=bp.useRef(null);if(bp.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:f=>{f.key!=="Escape"||f.defaultPrevented||f.nativeEvent.isComposing||!r||(f.preventDefault(),f.stopPropagation(),n(!1),l.current?.focus({preventScroll:!0}))},children:[(0,Zr.jsxs)(Ne,{kind:"ghost",type:"button",className:"home-attention-trigger",ref:l,"aria-controls":o,"aria-expanded":r,"aria-label":d,title:d,onClick:()=>n(f=>!f),children:[(0,Zr.jsx)(Ae,{name:"info",size:13,className:"home-attention-trigger-icon"}),(0,Zr.jsx)("span",{children:c}),(0,Zr.jsx)(Ae,{name:"chevronDown",size:13,className:"home-attention-trigger-chevron"})]}),(0,Zr.jsx)(Wb,{id:o,open:r,children:(0,Zr.jsx)(aG,{items:e,onOpen:f=>nG(f,t,a)})})]})}var kn=B(_(),1);function l5e(){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 u5e(e,t,r,n){let[a,o]=kn.useState(!1),[l,c]=kn.useState(!1),d=kn.useRef(0),f=kn.useRef(0),h=kn.useRef(null),g=kn.useRef(null),v=kn.useRef(!1),y=ca(),x=kn.useCallback(()=>{window.clearTimeout(d.current),window.clearTimeout(f.current)},[]),w=kn.useCallback(()=>{x(),v.current=!1,o(!1)},[x]),k=kn.useCallback($=>{window.clearTimeout(f.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(f.current),v.current=!1,y){o(!1);return}f.current=window.setTimeout(()=>o(!1),Uv("--motion-normal"))},[y]),C=kn.useCallback($=>{e&&k($)},[e,k]),D=kn.useCallback($=>$ instanceof Node&&r.current?.contains($)===!0,[r]);kn.useEffect(()=>{e||(x(),v.current=!1,o(!1),c(!1))},[e,x]),kn.useEffect(()=>x,[x]),kn.useEffect(()=>{y&&(x(),e&&v.current&&c(!0),o(e&&v.current))},[y,e,x]);let S=kn.useCallback($=>{if(!($ instanceof Element))return!1;let N=$.closest("[data-wand-popup-owner]")?.dataset.wandPopupOwner;return N?Array.from(r.current?.querySelectorAll("[data-sidebar-popup-owner]")??[]).some(P=>P.dataset.sidebarPopupOwner===N):!1},[r]),A=kn.useCallback($=>$ instanceof Node&&(r.current?.contains($)===!0||t.current?.contains($)===!0),[r,t]);kn.useEffect(()=>{if(!a)return;let $=P=>{if(P.key!=="Escape"||P.defaultPrevented)return;let O=document.activeElement;A(O)&&(S(P.target)||(P.preventDefault(),P.stopPropagation(),g.current=h.current,w(),h.current?.focus({preventScroll:!0})))},N=P=>{let O=P.target;O instanceof Node&&(r.current?.contains(O)||t.current?.contains(O)||S(O)||w())};return document.addEventListener("keydown",$),document.addEventListener("pointerdown",N,!0),()=>{document.removeEventListener("keydown",$),document.removeEventListener("pointerdown",N,!0)}},[a,w,A,S,r,t]);let I=kn.useCallback($=>{S($.relatedTarget)||(g.current=null,F())},[F,S]),j=($,N)=>{if(!e||D($)||S($))return;let P=$ instanceof Element?$.closest("[data-sidebar-directory-id]"):null,O=P?.dataset.sidebarDirectoryId;if(!P||!O||!t.current?.contains(P)){F();return}g.current!==P&&(h.current=P,n(O,P),C(y?0:N))};return{mounted:l,open:a,close:w,triggerBindings:{onKeyDown:$=>{if($.key!=="Tab"||$.shiftKey||!a||$.defaultPrevented||document.activeElement!==h.current)return;let N=r.current?.querySelector("button, [tabindex='0']");N&&($.preventDefault(),N.focus({preventScroll:!0}))},onPointerOver:$=>j($.target,Uv("--motion-fast")),onClick:$=>{let N=$.target instanceof Element?$.target.closest("[data-sidebar-directory-id]"):null;if(g.current=null,a&&N===h.current){w();return}j($.target,0)},onPointerLeave:I,onFocusCapture:$=>j($.target,0),onBlurCapture:$=>{A($.relatedTarget)||S($.relatedTarget)||F()}},surfaceBindings:{onKeyDown:$=>{if($.key!=="Tab"||!$.shiftKey)return;let N=r.current?.querySelector("button, [tabindex='0']");document.activeElement===N&&($.preventDefault(),h.current?.focus({preventScroll:!0}))},onPointerEnter:()=>{v.current=!0,window.clearTimeout(f.current)},onPointerLeave:I,onFocusCapture:()=>{v.current=!0,window.clearTimeout(f.current)},onBlurCapture:$=>{A($.relatedTarget)||S($.relatedTarget)||w()}}}}var k9=B(_(),1);function c5e(e,t){let r=k9.useRef(null),n=k9.useRef(t);return n.current=t,k9.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=[],f=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT);for(;f.nextNode();){let v=f.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 k6=B(_(),1),_U=8,C6=.28,d5e=50,NU=.35,f5e=56;function p5e({drawerRef:e,backdropRef:t,enabled:r,isOpen:n,onOpen:a,onClose:o}){let l=k6.useRef(a),c=k6.useRef(o);l.current=a,c.current=o;let d=k6.useRef({phase:"idle",startX:0,startY:0,startTime:0,currentX:0,currentY:0,initialOpen:!1,samples:[],drawerWidth:320,cleanups:[]});k6.useEffect(()=>{if(!r||typeof window>"u")return;let f=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||f.phase==="animating")return;let C=F.touches[0];if(!C||g(F.target))return;let D=Math.max(f5e,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||(f.phase="tracking",f.startX=C.clientX,f.startY=C.clientY,f.startTime=Date.now(),f.currentX=C.clientX,f.currentY=C.clientY,f.initialOpen=n,f.drawerWidth=h(),f.samples=[{x:C.clientX,y:C.clientY,time:f.startTime}])},x=F=>{if(f.phase==="idle"||f.phase==="animating")return;let C=F.touches[0];if(!C)return;let D=Date.now(),S=C.clientX-f.startX,A=C.clientY-f.startY;if(f.phase==="tracking"){let V=Math.abs(S),H=Math.abs(A);if(V<_U&&H<_U)return;if(H>=V){f.phase="idle";return}if(!f.initialOpen&&S<=0){f.phase="idle";return}if(f.initialOpen&&S>=0){f.phase="idle";return}f.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(f.phase!=="dragging")return;F.cancelable&&F.preventDefault(),f.currentX=C.clientX,f.currentY=C.clientY,f.samples.push({x:C.clientX,y:C.clientY,time:D});let I=D-140;for(;f.samples.length>2&&(f.samples[0]?.time??0)<I;)f.samples.shift();let j=f.drawerWidth,$=0,N=0;f.initialOpen?($=Math.min(1,Math.max(0,1+S/j)),N=Math.min(0,Math.max(-j,S))):($=Math.min(1,Math.max(0,S/j)),N=-j+S,N=Math.min(0,N));let P=e.current,O=t.current;P&&(P.style.transform=`translate3d(${N}px, 0, 0)`),O&&(O.style.opacity=String($*.98))},w=()=>{if(f.phase!=="dragging"){f.phase="idle";return}f.phase="animating";let F=Date.now(),C=f.samples,D=0,S=0;if(C.length>=2){let K=C[0],Z=C[C.length-1],T=Math.max(1,Z.time-K.time);if(D=(Z.x-K.x)/T,C.length>=3){let U=C[Math.floor(C.length/2)],X=Math.max(1,U.time-K.time),Y=Math.max(1,Z.time-U.time),re=(U.x-K.x)/X;S=((Z.x-U.x)/Y-re)/Y}}let A=D+S*d5e,I=f.drawerWidth,j=f.currentX-f.startX,$=f.initialOpen?Math.max(0,1+j/I):Math.max(0,j/I);$=Math.min(1,$);let N=!1;f.initialOpen?A<=-C6?N=!1:A>=C6?N=!0:N=$>=1-NU:A>=C6?N=!0:A<=-C6?N=!1:N=$>=NU;let P=window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=e.current,V=t.current,H=()=>{v(),f.phase="idle",N?l.current():c.current()};if(P||!O){H();return}let q=N?0:-I,L=N?1:0,R=Math.abs((N?0:-I)-(f.initialOpen?j:-I+j)),W=Math.round(Math.min(260,Math.max(140,R/Math.max(.8,Math.abs(A)*1.5))));O.style.transition=`transform ${W}ms cubic-bezier(0.16, 1, 0.3, 1)`,O.style.transform=`translate3d(${q}px, 0, 0)`,V&&(V.style.transition=`opacity ${W}ms cubic-bezier(0.16, 1, 0.3, 1)`,V.style.opacity=String(L));let z=null,Q=K=>{K.target!==O||K.propertyName!=="transform"||(O.removeEventListener("transitionend",Q),z&&clearTimeout(z),H())};O.addEventListener("transitionend",Q),z=setTimeout(()=>{O.removeEventListener("transitionend",Q),H()},W+40)},k=()=>{f.phase==="dragging"&&v(),f.phase="idle"};return document.addEventListener("touchstart",y,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",w,{passive:!0}),document.addEventListener("touchcancel",k,{passive:!0}),()=>{document.removeEventListener("touchstart",y),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",w),document.removeEventListener("touchcancel",k),v()}},[r,n,e,t])}var Se=B(Ee(),1),iG="\u5408\u5E76\u5230\u4E3B\u5206\u652F\u2026",oG="\u91CD\u8BD5 worktree \u6E05\u7406",sG="\u5220\u9664\u4F1A\u8BDD",m5e=qh(()=>globalThis.__wandImportBrowserModule("5f635cbcab701433").then(e=>e.WorkspacesPanel),{title:"\u5DE5\u4F5C\u533A",renderPending:()=>(0,Se.jsx)("div",{role:"status",style:{padding:12,fontSize:12,color:"var(--text-secondary)"},children:"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026"})}),h5e=Bn.lazy(()=>globalThis.__wandImportBrowserModule("6cd6c4f4aa02b1ec").then(e=>({default:e.SidebarPeek})));function lG(e){return e.source.endsWith("-history")?e.source:"session"}function uG(e){return e.source.endsWith("-history")}function cG(e){if(!uG(e))return null;let t=e.source.slice(0,-8);return t==="codex"||t==="opencode"||t==="qoder"?t:"claude"}function rB(e,t){let r=lG(e);if(t)return{primary:{type:"session.manage.select",target:r,id:e.id},resume:null,delete:null,merge:null,cleanup:null};let n=cG(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 S6({action:e,dispatch:t,actionName:r,label:n,icon:a,className:o,disabled:l,data:c}){return(0,Se.jsx)(Mr,{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,Se.jsx)(Ae,{name:a})})}function g5e({entry:e,dispatch:t}){let r=lG(e);return(0,Se.jsx)("span",{className:"wand-session-manage-check",onClick:n=>n.stopPropagation(),children:(0,Se.jsx)(sr,{children:(0,Se.jsx)(IA,{"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 v5e({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,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(Gh,{className:"session-kind-badge worktree",title:r||void 0,children:"Worktree"}),e.worktree.mergeStatus&&(0,Se.jsx)(Gh,{className:ct("session-kind-badge worktree-merge",e.worktree.mergeStatus),children:t[e.worktree.mergeStatus]??e.worktree.mergeStatus})]})}function b5e(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),f=l%60;return c>0?`${c}:${String(d).padStart(2,"0")}:${String(f).padStart(2,"0")}`:`${String(d).padStart(2,"0")}:${String(f).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 y5e({entry:e}){let t=e.engine==="sdk"?kv:Cv(e.provider),r=_o(e.provider);return(0,Se.jsx)("span",{className:ct("session-provider-mark",`provider-${r??"generic"}`,e.engine==="sdk"&&"provider-engine-sdk"),"aria-hidden":"true",title:t,children:(0,Se.jsx)(Js,{provider:r})})}function PU({path:e}){return e?(0,Se.jsx)(zt.Text,{ellipsis:!0,type:"secondary",className:"session-path",style:{maxWidth:160,fontSize:12},title:e,"aria-label":e,children:e}):null}function w5e({entry:e,manageMode:t,dispatch:r}){let n=rB(e,t),a=uG(e),o=cG(e)??"claude",l=a?{historyId:e.id,cwd:e.cwd}:{sessionId:e.id},c=()=>{r(n.primary)},d=b5e(e),f=!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":Pi(e)?"just-completed":"none";return(0,Se.jsx)("div",{className:ct("session-item",a&&"non-wand-session",e.active&&"active",t&&e.selected&&"selected",t&&"session-managing",f&&"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,Se.jsx)("div",{className:"session-item-content",children:(0,Se.jsxs)(Xe,{align:"center",gap:4,className:"session-item-row",children:[t&&(0,Se.jsx)(g5e,{entry:e,dispatch:r}),(0,Se.jsxs)(Ne,{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,Se.jsxs)(Xe,{align:"center",gap:"small",className:"session-title-row",children:[(0,Se.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,Se.jsx)(y5e,{entry:e})}),(0,Se.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,Se.jsx)("div",{className:"session-description",children:e.description}),(0,Se.jsxs)(Xe,{gap:"small",wrap:!0,className:"session-meta",style:{fontSize:12},children:[(0,Se.jsx)("span",{className:"session-leading-slot session-time",children:d}),a?(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)("span",{className:"session-context session-context-recoverable",children:[(0,Se.jsx)(Ae,{name:"history",size:11}),"\u53EF\u6062\u590D"]}),(0,Se.jsx)(PU,{path:e.cwd})]}):(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(PU,{path:e.cwd}),(0,Se.jsx)(v5e,{entry:e})]})]})]}),!t&&(0,Se.jsxs)(Xe,{align:"center",gap:2,className:"session-actions",children:[n.resume&&(0,Se.jsx)(S6,{action:n.resume,dispatch:r,actionName:a?o==="claude"?"resume-history":`resume-${o}-history`:"resume",label:a?`\u6062\u590D\u6B64 ${Cv(o)} \u4F1A\u8BDD`:"\u6062\u590D\u4F1A\u8BDD",icon:"resume",data:l}),n.merge&&(0,Se.jsx)(S6,{action:n.merge,dispatch:r,actionName:"worktree-merge",label:iG,icon:"merge",className:"merge-btn",disabled:e.status==="running"||e.worktree?.mergeStatus==="merging",data:l}),n.cleanup&&(0,Se.jsx)(S6,{action:n.cleanup,dispatch:r,actionName:"worktree-cleanup",label:oG,icon:"trash",className:"merge-btn",data:l}),n.delete&&(0,Se.jsx)(S6,{action:n.delete,dispatch:r,actionName:a?o==="claude"?"delete-history":`delete-${o}-history`:"delete-session",label:sG,icon:"trash",className:"delete-btn",data:l})]})]})})})}var x5e={load:"\u52A0\u8F7D\u5931\u8D25",sync:"\u672A\u540C\u6B65"};function E5e(){let e=Bn.useSyncExternalStore(WD,_2,_2),[t,r]=Bn.useState(!1);if(Bn.useEffect(()=>{e||r(!1)},[e]),!e)return null;let n=x5e[e.kind];return(0,Se.jsx)(Ne,{kind:"ghost",type:"button",className:ct("sidebar-list-error",t&&"is-retrying"),title:`${r1(e.message)}\uFF5C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,"aria-label":`${n}\uFF1A${r1(e.message)}\uFF0C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,disabled:t,onClick:()=>{r(!0),e.retry().finally(()=>r(!1))},children:(0,Se.jsx)(Ae,{name:"refresh",size:18,className:"sidebar-list-error-icon"})})}function k5e(){return{action:{type:"workspace.new"},label:"\u65B0\u5EFA\u4F1A\u8BDD",ariaLabel:"\u65B0\u5EFA\u4F1A\u8BDD"}}function C5e(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 S5e(e,t){let r=await vn.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 F5e({active:e,onToggle:t}){let r=e?"\u5C55\u5F00\u5B8C\u6574\u4FA7\u8FB9\u680F":"\u6536\u8D77\u4E3A\u7A84\u680F";return(0,Se.jsxs)(Mr,{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,Se.jsx)(Ae,{name:"chevronLeft",className:"sidebar-collapse-direction"}),(0,Se.jsx)("span",{className:"sidebar-compact-toggle-label",children:e?"\u5C55\u5F00":"\u6536\u8D77"})]})}function D5e({group:e,manageMode:t,dispatch:r}){if(e.entries.length===0)return null;let n=(0,Se.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,Se.jsx)(w5e,{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,Se.jsx)("div",{className:ct(a?"automation-session-group":"non-wand-session-group",t&&"manage-mode"),children:(0,Se.jsx)(UD,{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,Se.jsx)(Ae,{name:a?"zap":"history"}),expanded:t||e.expanded,onToggle:()=>o(!e.expanded),onSetOpen:o,children:n})})}function A5e(){let e=ai(),t=g0(),[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=Fi(),l=Bn.useSyncExternalStore(gl.subscribe,gl.getSnapshot,gl.getSnapshot),c=Bn.useSyncExternalStore(Da.subscribe,Da.getSnapshot,Da.getSnapshot),d=iA(),f=Rh().name||d3,[h,g]=Bn.useState(!1),v=Bn.useRef(null),y=ED(),{query:x,setQuery:w}=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=k5e(),I=e.layout.sessionsDrawerOpen||!e.layout.sidebarDrawer&&e.layout.sidebarAnchored,j=I&&(e.layout.sidebarDrawer||!e.layout.sidebarPinned),$=c5e(j,()=>{o({type:"layout.drawer.close"})}),N=Bn.useRef(null);p5e({drawerRef:$,backdropRef:N,enabled:e.layout.sidebarDrawer||j,isOpen:e.layout.sessionsDrawerOpen,onOpen:()=>{o({type:"layout.drawer.open"})},onClose:()=>{o({type:"layout.drawer.close"})}});let P=Bn.useRef(null),O=Bn.useRef(null),V=l5e(),[H,q]=Bn.useState(null),L=Bn.useCallback((X,Y)=>{let re=$.current?.getBoundingClientRect().top??0,J=Math.max(8,Math.min(Y.getBoundingClientRect().top-re,window.innerHeight-re-300)),se=Y.dataset.sidebarDirectoryName??"\u76EE\u5F55";q(me=>me?.id===X&&me.name===se&&me.top===J?me:{id:X,name:se,top:J})},[$]),R=u5e(I&&!C&&D&&V&&!h,$,O,L),W=Bn.useRef({...t.scrolls});Bn.useLayoutEffect(()=>{let X=P.current;if(!X)return;let Y=`sidebar:${t.mode}:${D?"compact":"full"}`;return X.scrollTop=W.current[Y]??0,()=>{W.current[Y]=X.scrollTop,Dr.scroll(Y,X.scrollTop)}},[D,t.mode]);let z=()=>{R.close(),j&&o({type:"layout.drawer.close"})},Q=X=>{C5e(X)&&(mo.close(),En.close(),Dr.suspend()),X.type==="nav.home"&&Dr.show(),z(),o(X)},K=()=>{mo.close(),En.close(),Dr.suspend(),z()},Z=X=>{if(X.type==="session.select"||X.type==="session.resume"||X.type==="session.resumeHistory"){Q(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:x.trim()?X.entries.filter(Y=>ku(x,Y.title,Y.description,Y.cwd,Y.provider)):X.entries})).map(X=>(0,Se.jsx)(D5e,{group:X,manageMode:!1,dispatch:Z},X.kind)),U=(X,Y)=>(0,Se.jsx)(m5e,{compact:X,directoryId:Y,peekDirectoryId:R.open?H?.id:void 0,onExpand:()=>{R.close(),o({type:"layout.drawer.collapse"})},onNavigate:K,onOpenDialog:z,searchQuery:x,surfacesEnabled:Y?I&&R.open:I&&!D&&!C&&t.mode==="tasks",onSearchChange:w,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},Y??"sidebar-tree");return(0,Se.jsxs)(Ss.Provider,{value:y,children:[(0,Se.jsx)("div",{id:"sessions-drawer-backdrop",ref:N,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,Se.jsxs)(cE.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,...R.triggerBindings,children:[(0,Se.jsxs)(Xe,{vertical:!0,align:"center",className:"sidebar-navigation-rail",children:[(0,Se.jsxs)("div",{className:"sidebar-rail-scroll",children:[(0,Se.jsx)(Ff,{className:"sidebar-brand-mark",style:{width:"var(--conversation-brand-size, 24px)",height:"var(--conversation-brand-size, 24px)"}}),(0,Se.jsx)(Xwe,{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(),R.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"?Dr.directory(!0):(Dr.mode(X),X==="chats"?Dr.show():Dr.suspend())),X!=="chats"&&X!=="tasks"&&z()}}),(0,Se.jsxs)(Xe,{vertical:!0,align:"center",gap:4,className:"sidebar-rail-notices",children:[(0,Se.jsx)(o5e,{compact:!0,open:k,onToggle:()=>F(X=>!X)}),(0,Se.jsx)(E5e,{}),(0,Se.jsx)(QD,{compact:!0,visible:I})]})]}),(0,Se.jsxs)(Kh,{open:h,onOpenChange:g,modal:!1,children:[(0,Se.jsx)(zf,{ref:v,render:(0,Se.jsxs)(Mr,{kind:c.open?"soft":"ghost","aria-current":c.open?"page":void 0,id:"settings-button",className:"sidebar-profile-button",title:`${f} \xB7 \u8BBE\u7F6E`,"aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",children:[(0,Se.jsx)(Ae,{name:"gear",size:18}),(0,Se.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:"\u8BBE\u7F6E"})]})}),(0,Se.jsxs)(Lf,{id:"sidebar-account-menu",className:"sidebar-tools-menu","aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",side:"right",align:"end",sideOffset:6,children:[(0,Se.jsx)(cn,{icon:"user",onClick:()=>{g(!1),mo.close(),En.close(),Dr.directory(!0),z()},children:"\u5458\u5DE5\u4E0E\u901A\u8BAF\u5F55"}),(0,Se.jsx)(cn,{id:"sidebar-settings-entry",icon:"gear",onClick:()=>{g(!1),F(!1),Q({type:"settings.open"})},children:"\u8BBE\u7F6E"}),(0,Se.jsx)(wu,{}),(0,Se.jsx)(mD,{menuItem:!0}),(0,Se.jsx)(cn,{id:"logout-button",icon:"logout",tone:"danger",onClick:()=>{g(!1),S5e(()=>Q({type:"auth.logout"}),()=>{requestAnimationFrame(()=>v.current?.focus({preventScroll:!0}))})},children:"\u9000\u51FA\u767B\u5F55"})]})]})]}),(0,Se.jsxs)(Xe,{vertical:!0,className:"sidebar-list-panel",hidden:C,inert:C,children:[(0,Se.jsx)(Xe,{vertical:!0,gap:"small",className:"sidebar-header",style:{padding:D?"8px 4px":"10px 12px",flexShrink:0},children:(0,Se.jsxs)(Xe,{vertical:D,align:"center",justify:"space-between",gap:"small",className:"sidebar-header-primary",children:[(0,Se.jsx)(Xe,{align:"center",gap:"small",className:"sidebar-header-main",children:(0,Se.jsx)(zt.Text,{strong:!0,className:"sidebar-title",hidden:D,style:{whiteSpace:"nowrap"},children:t.mode==="tasks"?"\u5DE5\u4F5C\u533A":"\u5BF9\u8BDD"})}),(0,Se.jsxs)(Xe,{align:"center",gap:4,vertical:D,className:"sidebar-header-actions",children:[(0,Se.jsx)("div",{hidden:t.mode!=="chats",children:(0,Se.jsx)(Qwe,{enabled:I&&!C&&t.mode==="chats",onCreateSession:()=>Q(A.action),onNavigate:()=>{En.close(),z()}})}),!e.layout.sidebarDrawer&&(0,Se.jsx)(F5e,{active:D,onToggle:()=>{R.close(),o({type:"layout.drawer.collapse"})}}),e.layout.sidebarDrawer&&(0,Se.jsx)(Mr,{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,Se.jsx)(Nb,{open:!0})})]})]})}),(0,Se.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,Se.jsxs)(Ne,{id:"drawer-new-session-button",className:"sidebar-new-task",kind:"primary",title:A.label,"aria-label":A.ariaLabel,onClick:()=>Q(A.action),children:[(0,Se.jsx)(Ae,{name:"plus",size:18}),(0,Se.jsx)("span",{hidden:D,children:A.label})]})}),(0,Se.jsx)("div",{className:"sidebar-body",ref:P,style:{flex:1,minHeight:0,overflow:"auto",padding:D?4:"0 8px"},children:(0,Se.jsx)("div",{id:"sessions-panel",children:(0,Se.jsx)("div",{className:"sessions-list",id:"sessions-list",children:(0,Se.jsxs)(R2,{value:t.mode,children:[r.has("chats")?(0,Se.jsx)("div",{hidden:t.mode!=="chats",inert:t.mode!=="chats",children:(0,Se.jsx)(Jwe,{compact:D,enabled:I&&!C&&t.mode==="chats",selectedSessionId:e.selected?.id??null,sessionTitles:Object.fromEntries(e.sidebar.groups.flatMap(X=>X.entries.map(Y=>[Y.id,Y.title]))),onNavigate:()=>{En.close(),z()},onOpenSession:X=>{En.close(),Dr.suspend(),z(),ID(X,Y=>{o({type:"session.select",id:Y})})}})}):null,r.has("tasks")?(0,Se.jsx)("div",{hidden:t.mode!=="tasks",inert:t.mode!=="tasks",children:U(D)}):null]})})})}),D&&V&&R.mounted&&H?(0,Se.jsx)(Bn.Suspense,{fallback:null,children:(0,Se.jsx)(h5e,{title:H.name,top:H.top,open:R.open,surfaceRef:O,onExpand:()=>{R.close(),o({type:"layout.drawer.collapse"})},...R.surfaceBindings,children:(0,Se.jsx)("div",{className:"sessions-list",children:U(!1,H.id)})})}):null,(e.layout.sidebarDrawer||e.capabilities.backToNative||e.capabilities.switchServer)&&(0,Se.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,Se.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,Se.jsxs)(Mr,{id:"file-panel-toggle-btn",title:"\u67E5\u770B\u6587\u4EF6","aria-label":"\u6587\u4EF6","aria-pressed":e.layout.filePanelOpen,onClick:()=>Q({type:"layout.files.toggle"}),children:[(0,Se.jsx)(Ae,{name:"explorer",size:16}),(0,Se.jsx)("span",{children:"\u6587\u4EF6"})]}),e.capabilities.backToNative&&(0,Se.jsxs)(Mr,{id:"back-to-native-button",title:"\u8FD4\u56DE App \u539F\u751F\u754C\u9762","aria-label":"\u8FD4\u56DE App",onClick:()=>Q({type:"native.back"}),children:[(0,Se.jsx)(Ae,{name:"back",size:16}),(0,Se.jsx)("span",{hidden:D,children:"\u8FD4\u56DEApp"})]}),e.capabilities.switchServer&&(0,Se.jsxs)(Mr,{id:"switch-server-button",title:"\u5207\u6362\u670D\u52A1\u5668","aria-label":"\u5207\u6362\u670D\u52A1\u5668",onClick:()=>Q({type:"native.switchServer"}),children:[(0,Se.jsx)(Ae,{name:"server",size:16}),(0,Se.jsx)("span",{hidden:D,children:"\u5207\u6362"})]})]})})]})]})]})}var dE=B(_(),1),$5e=B(Ee(),1);function dG({id:e="topbar-git-badge",className:t}={}){let r=ai(),n=Fi(),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,$5e.jsxs)(cn,{id:e,className:t,icon:"git",title:o,"aria-label":"\u5FEB\u6377\u63D0\u4EA4",onSelect:()=>{n({type:"topbar.gitCommit"})},hint:a.clean?"\u65E0\u6539\u52A8":`${a.modifiedCount} \u4E2A\u6539\u52A8`,children:["\u5FEB\u6377\u63D0\u4EA4 \xB7 ",a.branch]})}var Et=B(Ee(),1);function B5e(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:iG,icon:"merge",dividerBefore:!0,disabled:e.status==="running"||e.worktree?.mergeStatus==="merging"}),t?.cleanup&&r.push({action:t.cleanup,actionName:"worktree-cleanup",label:oG,icon:"trash"}),t?.delete&&r.push({action:t.delete,actionName:"delete-session",label:sG,icon:"trash",tone:"danger"}),r}function fG({selected:e,actions:t,onAction:r,terminalControls:n=!0}){return(0,Et.jsxs)(Et.Fragment,{children:[n&&e.kind==="pty"&&(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(cn,{onSelect:()=>r({type:"terminal.display",command:"zoom-in"}),children:"\u653E\u5927\u7EC8\u7AEF\u5B57\u53F7"}),(0,Et.jsx)(cn,{onSelect:()=>r({type:"terminal.display",command:"zoom-out"}),children:"\u7F29\u5C0F\u7EC8\u7AEF\u5B57\u53F7"}),(0,Et.jsx)(cn,{onSelect:()=>r({type:"terminal.display",command:"reset"}),children:"\u6062\u590D\u9ED8\u8BA4\u5B57\u53F7"}),(0,Et.jsx)(cn,{icon:"refresh",onSelect:()=>r({type:"terminal.display",command:"refresh"}),children:"\u5237\u65B0\u7EC8\u7AEF\u663E\u793A"}),(0,Et.jsx)(wu,{})]}),B5e(e,t).map(a=>(0,Et.jsxs)(dE.Fragment,{children:[a.dividerBefore?(0,Et.jsx)(wu,{}):null,(0,Et.jsx)(cn,{"data-action":a.actionName,icon:a.icon,tone:a.tone??"default",disabled:a.disabled,onClick:()=>r(a.action),children:a.label})]},a.actionName))]})}function I5e({terminalActionVisible:e=!0}={}){let t=ai(),r=Fi(),n=t.layout.topbarMoreOpen,a=dE.useRef(n);dE.useEffect(()=>{a.current=n},[n]);let o=(0,Et.jsx)(pG,{snapshot:t,onAction:r,terminalActionVisible:e,onMoreOpenChange:l=>{l!==a.current&&(a.current=l,r({type:"topbar.menu.toggle"}))}});return e?(0,Et.jsx)(f0,{children:o}):o}function pG({snapshot:e,onAction:t,onMoreOpenChange:r,measurement:n=!1,terminalActionVisible:a=!0}){let o=e.selected,l=e.layout.topbarMoreOpen,c=o?rB(o,!1):null,d=g=>n?void 0:g,f=dE.useRef(null),h=g=>{f.current?.focus({preventScroll:!0}),t?.(g)};return(0,Et.jsxs)(Xe,{align:"center",gap:"small",wrap:!0,className:ct("main-header-row",(o?.turnActive||o?.permissionBlocked)&&"is-running",o?.permissionBlocked&&"is-permission-blocked"),style:{flexShrink:0,padding:"8px var(--wand-page-inset, 20px)",borderBottom:"1px solid var(--border-subtle)"},children:[(0,Et.jsxs)(Xe,{align:"center",gap:"small",className:"topbar-left",children:[(e.layout.sidebarDrawer||!e.layout.sidebarAnchored)&&(0,Et.jsx)(Mr,{id:d("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":n?void 0:"sessions-drawer","data-pressed":e.layout.sessionsDrawerOpen||void 0,onClick:()=>{t?.({type:"layout.drawer.toggle"})},children:(0,Et.jsx)(Nb,{open:e.layout.sessionsDrawerOpen,size:18})}),!e.layout.sidebarAnchored&&(0,Et.jsx)(Ff,{className:"topbar-brand",style:{width:24,height:24}})]}),(0,Et.jsx)(Xe,{vertical:!0,gap:2,className:"topbar-center",style:{flex:"1 1 0",minWidth:0},children:o?(0,Et.jsx)(Et.Fragment,{children:(0,Et.jsxs)(Xe,{align:"center",gap:8,className:"topbar-title-row",children:[(0,Et.jsx)(zt.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,Et.jsx)(zt.Text,{className:ct("current-task",!e.topbar.currentTask&&"hidden"),id:d("current-task"),title:e.topbar.currentTask||void 0,hidden:!e.topbar.currentTask,children:e.topbar.currentTask})]})}):(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)("span",{className:"topbar-tagline",children:e.topbar.title||"Wand \u63A7\u5236\u53F0"}),(0,Et.jsx)("span",{className:"current-task hidden",id:d("current-task")})]})}),(0,Et.jsxs)(Xe,{align:"center",gap:4,className:"topbar-right",children:[!n&&(0,Et.jsx)(cA,{visible:a}),(0,Et.jsx)("div",{className:"topbar-more-wrap",children:n?(0,Et.jsx)(Mr,{kind:"ghost",size:"medium",children:(0,Et.jsx)(Ae,{name:"more",size:18})}):(0,Et.jsxs)(Kh,{open:l,onOpenChange:r,children:[(0,Et.jsx)(zf,{ref:f,render:(0,Et.jsx)(Mr,{id:d("topbar-more-button"),kind:"ghost",size:"medium","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C",title:"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C","data-pressed":l||void 0,children:(0,Et.jsx)(Ae,{name:"more",size:18})})}),(0,Et.jsxs)(Lf,{id:d("topbar-more-menu"),"aria-label":"\u5F53\u524D\u4F1A\u8BDD",align:"end",sideOffset:6,children:[(0,Et.jsx)(cn,{id:"topbar-file-button",icon:"explorer",onSelect:()=>h({type:"layout.files.toggle"}),children:e.layout.filePanelOpen?"\u5173\u95ED\u6587\u4EF6\u9762\u677F":"\u6587\u4EF6"}),(0,Et.jsx)(cn,{id:"topbar-local-preview-button",icon:"eye",onSelect:()=>El.show(),children:"\u672C\u5730\u9884\u89C8"}),(0,Et.jsx)(dG,{}),o&&(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(wu,{}),(0,Et.jsx)(fG,{selected:o,actions:c,onAction:h})]})]})]})})]})]})}var ia=B(Ee(),1);function mG({windowActions:e}){let t=ai(),r=Fi(),n=x6.useSyncExternalStore(Wr.subscribe,Wr.getSnapshot,Wr.getServerSnapshot),[a,o]=x6.useState(!1),l=x6.useRef(null),c=n.layout?.windows.find(h=>h.id===n.layout?.activeWindowId)?.layout.type==="split";x6.useEffect(()=>o(!1),[t.selected?.id,n.taskId,n.layout?.activeWindowId]);let d=()=>o(!1),f=h=>{d(),l.current?.focus({preventScroll:!0}),r(h)};return(0,ia.jsxs)("div",{className:"workbar-actions",children:[(0,ia.jsx)(p0,{}),(0,ia.jsxs)(Kh,{open:a,onOpenChange:o,children:[(0,ia.jsx)(zf,{ref:l,render:(0,ia.jsx)(Mr,{"aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",title:"\u66F4\u591A\u64CD\u4F5C",children:(0,ia.jsx)(Ae,{name:"more",size:18})})}),(0,ia.jsxs)(Lf,{align:"end","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",children:[(0,ia.jsx)(cn,{icon:"explorer",onSelect:()=>f({type:"layout.files.toggle"}),children:t.layout.filePanelOpen?"\u5173\u95ED\u6587\u4EF6\u9762\u677F":"\u6587\u4EF6"}),(0,ia.jsx)(cn,{icon:"eye",onSelect:()=>{d(),El.show()},children:"\u672C\u5730\u9884\u89C8"}),(0,ia.jsx)(dG,{id:"workspace-tab-git-badge"}),t.selected&&(0,ia.jsxs)(ia.Fragment,{children:[(0,ia.jsx)(wu,{}),(0,ia.jsx)(fG,{selected:t.selected,actions:rB(t.selected,!1),onAction:f,terminalControls:!c})]}),e&&(0,ia.jsxs)(ia.Fragment,{children:[(0,ia.jsx)(wu,{}),e(d)]})]})]})]})}function hG(){let e=ai(),t=Fi();return e.layout.sidebarDrawer||!e.layout.sidebarAnchored?(0,ia.jsx)(Mr,{"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,ia.jsx)(Nb,{open:e.layout.sessionsDrawerOpen,size:18})}):null}var B0=B(_(),1),Ar=B(Ee(),1);function M5e({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!t&&e!=="failed"&&e!=="waiting-input"?(0,Ar.jsx)("span",{className:"workbar-accessible-title",children:r}):(0,Ar.jsx)("span",{"aria-label":r,title:r,children:(0,Ar.jsx)(pi,{status:e==="failed"?"error":t?"processing":"warning",className:ct("workspace-tab-dot",t?"running":"idle"),"aria-hidden":!0})})}function T5e({className:e,...t}={}){return(0,Ar.jsx)(Ne,{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,Ar.jsx)(Ae,{name:"more",size:18})})}function j5e({children:e,onClose:t}){return(0,Ar.jsxs)("div",{className:"workbar-actions",children:[e,(0,Ar.jsx)(Ne,{kind:"ghost","aria-label":"\u6253\u5F00\u7EC8\u7AEF",children:(0,Ar.jsx)(Ae,{name:"terminal",size:18})}),(0,Ar.jsx)(T5e,{onClick:t})]})}function qE({mobile:e,taskName:t,variant:r="task",activeWindowId:n,windows:a,movingDir:o,closingWindowId:l,onSelectWindow:c,onCloseWindow:d,onNewSession:f,onCancelMove:h,leading:g,actions:v}){let y=r==="standalone",x=a.find(w=>w.id===n);return(0,Ar.jsxs)(Xe,{align:"center",gap:8,className:"workspace-tab-bar","data-session-tabs":r,children:[(0,Ar.jsx)("h1",{className:"workbar-accessible-title",children:x?.label||t||"\u5DE5\u4F5C\u7A97\u53E3"}),g,(0,Ar.jsxs)(Xe,{align:"center",gap:8,className:"workspace-tab-bar-list",children:[(0,Ar.jsx)(sr,{children:(0,Ar.jsx)(Ym,{theme:{components:{Tabs:{cardBg:"transparent",cardPadding:"6px 10px",itemSelectedColor:"var(--text-link)",itemActiveColor:"var(--text-link)",itemHoverColor:"var(--text-link)"}}},children:(0,Ar.jsx)(c9,{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(w=>({key:w.id,closable:y||!e,label:(0,Ar.jsxs)("span",{className:ct("wand-workspace-tab-label",o&&!w.containsMoving&&"move-target",w.containsMoving&&"moving-source"),title:o&&!w.containsMoving?`\u628A\u5F53\u524D\u7EC8\u7AEF\u79FB\u5165\u300C${w.label}\u300D`:`${w.label}${w.count>1?"\uFF08\u5206\u5C4F\u5DE5\u4F5C\u7A97\u53E3\uFF09":""}${w.titleGenerating?" \xB7 AI \u6B63\u5728\u751F\u6210\u6807\u9898":""}`,children:[(0,Ar.jsx)(M5e,{status:w.status}),w.session?(0,Ar.jsx)(Qh,{session:w.session,className:"workspace-tab-logo"}):null,(0,Ar.jsx)("span",{className:w.titleGenerating?"title-generating":void 0,"aria-busy":w.titleGenerating||void 0,children:w.label})]}),closeIcon:(0,Ar.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"} ${w.label}`,"aria-busy":l===w.id,"aria-disabled":l!=null,children:(0,Ar.jsx)(Ae,{name:"close",size:12})})})),onChange:o?void 0:w=>c?.(w),onTabClick:o?w=>c?.(w):void 0,onEdit:(w,k)=>{k==="remove"&&typeof w=="string"&&!l&&d?.(w)}})})}),(0,Ar.jsx)(Ne,{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:f,children:(0,Ar.jsx)(Ae,{name:"plus",size:18})})]}),(0,Ar.jsx)("div",{className:"workbar-spacer"}),o?(0,Ar.jsxs)(Ne,{kind:"ghost",className:"workspace-tab-move-hint",title:"\u9009\u62E9\u76EE\u6807\u7A97\u53E3 \xB7 Esc \u53D6\u6D88",onClick:h,children:[(0,Ar.jsx)(Ae,{name:"close",size:14}),(0,Ar.jsx)("span",{children:"\u9009\u62E9\u76EE\u6807 \xB7 Esc \u53D6\u6D88"})]}):null,v??(0,Ar.jsx)(j5e,{})]})}function _5e({mobile:e,taskName:t,session:r}){return(0,Ar.jsx)(qE,{mobile:e,taskName:t,activeWindowId:r.id,windows:[{id:r.id,label:Vf(r,0),status:r.status,count:1,session:r}]})}function N5e({mobile:e,session:t}){return(0,Ar.jsx)(qE,{mobile:e,variant:"standalone",taskName:"",activeWindowId:t.id,windows:[{id:t.id,label:Vf(t,0),status:t.status,count:1,session:t}]})}var w1=B(_(),1);function P5e(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=Uf(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:Eu(t),sessionKind:t.kind,startedAt:t.startedAt}]}}var F6=B(Ee(),1);function R5e({fallback:e=null}={}){let t=ai(),r=Fi(),{groups:n,loading:a,reload:o}=mA(),l=t.selected,[c,d]=w1.useState(null),f=w1.useRef(!1),h=w1.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=w1.useRef(t);v.current=t,w1.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]))),x=P5e(n,l,y);if(!x||!l)return e;let w=x.sessions.map(F=>{let C=y.get(F.id);return{...Ob(F,C?.title),status:C?.status??F.status}}),k=x.group;return(0,F6.jsx)(f0,{children:(0,F6.jsx)(qE,{mobile:t.viewport.mobile,variant:"standalone",taskName:"",leading:(0,F6.jsx)(hG,{}),actions:(0,F6.jsx)(mG,{}),activeWindowId:l.id,closingWindowId:c,windows:w.map((F,C)=>({id:F.id,label:Vf(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=Ka.getRuntime(),D=w.findIndex(A=>A.id===F);if(!C||f.current||D<0)return;f.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(N=>[N.id,N]))),j=[...w.slice(D+1),...w.slice(0,D).reverse()].find($=>{let N=I.get($.id);return N&&!N.archived&&!N.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,f.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 D6(){return Ka.getRuntime()}function O5e(e,t){return e!==null&&JSON.stringify(e)===JSON.stringify(t)}function z5e(e,t){let r=vo(e.layout),n=Ri(e.layout,e.activeTabId),a=n?.kind==="session"?n.sessionId:r[0],o=a?t.get(a):void 0,l=o?Vf(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 L5e({fallback:e=null}={}){let t=B0.useSyncExternalStore(Wr.subscribe,Wr.getSnapshot,Wr.getServerSnapshot),r=ai(),n=Fi(),a=r.viewport.mobile,[o,l]=B0.useState(null),[c,d]=B0.useState(null),f=r.selected?.id??null,h=C7(t.taskId);B0.useEffect(()=>{l(null)},[t.taskId]),B0.useEffect(()=>{if(!o)return;let $=N=>{N.key==="Escape"&&l(null)};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[o]);let g=new Map(r.sidebar.groups.flatMap($=>$.entries.map(N=>[N.id,N.title]))),v=Uf(h?.sessions??[]).map($=>Ob($,g.get($.id))),y=h?.cwd??t.cwd,x=v.map($=>$.id),w=t.layout??h?.layout??null,k=xu(w,x,f),F=new Map(v.map(($,N)=>[$.id,{session:$,index:N}]));if(B0.useEffect(()=>{!t.taskId||!h||O5e(w,k)||D6()?.saveTaskLayout(k,{automatic:!0})},[w,t.taskId,h,k]),a)return e;if(!t.taskId)return(0,yo.jsx)(R5e,{fallback:e});if(k.windows.length===0)return e;let C=$=>{let N=D6();if(!N)return;if(o){let V=Ri($.layout,$.activeTabId),H=yD(k,o.sessionId,$.id,V?.id,o.dir);if(H!==k){N.saveTaskLayout(H);let q=Cs(H);q?.kind==="session"&&n({type:"session.select",id:q.sessionId})}l(null);return}let P=y2(k,$.id);N.saveTaskLayout(P);let O=Ri($.layout,$.activeTabId);O?.kind==="session"&&n({type:"session.select",id:O.sessionId,focusInput:!1})},D=$=>{let N=Cs(k);N?.kind!=="session"||k.windows.length<2||l({sessionId:N.sessionId,dir:$})},S=async $=>{let N=D6();if(!N||c)return;let P=vo($.layout);d($.id);try{if(!await N.closeTaskSessions(P,"window")||Wr.getSnapshot().taskId!==t.taskId)return;let O=w2(k,$.id);N.saveTaskLayout(O);let V=Cs(O);V?.kind==="session"&&n({type:"session.select",id:V.sessionId}),l(null),t.taskId&&bs.load(t.taskId).catch(()=>{}),N.toast(P.length>1?`\u5DF2\u5173\u95ED ${P.length} \u4E2A\u7EC8\u7AEF`:"\u5DF2\u5173\u95ED\u7EC8\u7AEF","success")}finally{d(null)}},A=()=>{D6()?.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)(f0,{children:(0,yo.jsx)(qE,{mobile:a,taskName:t.taskName,activeWindowId:k.activeWindowId,windows:k.windows.map($=>({id:$.id,...z5e($,F),titleGenerating:vo($.layout).includes(f??"")&&r.topbar.titleGenerating,containsMoving:!!(o&&vo($.layout).includes(o.sessionId))})),movingDir:o?.dir,closingWindowId:c,onSelectWindow:$=>{let N=k.windows.find(P=>P.id===$);N&&C(N)},onCloseWindow:$=>{let N=k.windows.find(P=>P.id===$);N&&S(N)},onNewSession:I,onCancelMove:()=>l(null),leading:(0,yo.jsx)(hG,{}),actions:(0,yo.jsx)(mG,{windowActions:$=>(0,yo.jsxs)(yo.Fragment,{children:[k.windows.length>1&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(cn,{icon:"splitHorizontal",onSelect:()=>{$(),D("h")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u5DE6\u53F3\u5206\u5C4F"}),(0,yo.jsx)(cn,{icon:"splitVertical",onSelect:()=>{$(),D("v")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u4E0A\u4E0B\u5206\u5C4F"})]}),j&&(0,yo.jsx)(cn,{icon:"close",disabled:c!==null,onSelect:()=>{$(),S(j)},children:"\u5173\u95ED\u5F53\u524D\u5DE5\u4F5C\u7A97\u53E3"}),(0,yo.jsx)(cn,{icon:"back",onSelect:()=>{$(),A()},children:"\u9000\u51FA\u4EFB\u52A1\u6807\u7B7E\u7EC4"})]})})})})}function Z9(e){return typeof e=="string"?e.trim().replace(/^v/,"").split("+")[0]:""}function H5e(e,t){let r=e.previousInstanceId.trim(),n=Z9(e.expectedVersion),a=t.serverInstanceId.trim(),o=Z9(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 q5e(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 nB(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=q5e(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 W5e(e){let t=da(e)?e:{};return{serverInstanceId:Ke(t.serverInstanceId),packageVersion:Ke(t.packageVersion),currentVersion:Ke(t.currentVersion)}}var RU=class extends Error{constructor(e,t=0){super(e),oe(this,"status",t),this.name="RestartOverlayRepositoryError"}},U5e=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 RU(`\u670D\u52A1\u72B6\u6001\u54CD\u5E94\u65E0\u6548\uFF08HTTP ${t.status}\uFF09\u3002`,t.status)}let n=da(r)?r:{};if(!t.ok||typeof n.error=="string")throw new RU(Ke(n.error)||`\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF08HTTP ${t.status}\uFF09\u3002`,t.status);let a=W5e(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();da(l)&&l.version===e.expectedVersion&&da(l.status)&&l.status.phase==="failed"&&(a.updateFailure=Ke(l.status.message)||"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002",mu("update_failed",new Error(a.updateFailure)))}}return a}},V5e=new U5e,aB=2e3,fE=180,G5e=aB,K5e=aB*fE;function OU(e=0){return{open:!1,mode:"restart",phase:"idle",currentVersion:"",latestVersion:"",target:{previousInstanceId:"",expectedVersion:""},attempts:0,maxAttempts:fE,readiness:{ready:!1,instanceReady:!1,versionReady:!1,currentInstanceId:"",currentVersion:""},lastError:"",revision:e}}function A6(e){return typeof e=="string"?e.trim():""}function X5e(e){let t=OU(),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 f(){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(){f(),h()}function x(){y(),v()}function w(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:_f(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((P,O)=>{let V=()=>{j(),O(A.signal.reason instanceof Error?A.signal.reason:new DOMException("Restart probe cancelled.","AbortError"))};j=()=>A.signal.removeEventListener("abort",V),A.signal.addEventListener("abort",V,{once:!0})});a=e.clock.setTimeout(()=>{S!==l||o!==A||A.abort(new DOMException("Restart probe timed out.","TimeoutError"))},G5e);let N=!1;try{let P=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(P.updateFailure){y(),d({phase:"timed-out",lastError:P.updateFailure});return}let O=H5e(t.target,P);N=O.ready,d({phase:O.ready?"ready":"waiting",readiness:O,lastError:""}),O.ready&&(y(),F())}catch(P){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:_f(P,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}finally{j(),o===A&&(g(),o=null)}!N&&S===l&&t.open&&I>=fE&&w(S)}function D(S,A,I,j,$){l+=1,x();let N={previousInstanceId:A6(j),expectedVersion:Z9($)};t={open:!0,mode:S,phase:"waiting",currentVersion:A6(A),latestVersion:A6(I),target:N,attempts:0,maxAttempts:fE,readiness:{ready:!1,instanceReady:!N.previousInstanceId,versionReady:!N.expectedVersion,currentInstanceId:"",currentVersion:""},lastError:"",revision:t.revision+1};for(let O of c)O();let P=l;r=e.clock.setInterval(()=>{C(P)},aB),n=e.clock.setTimeout(()=>w(P),K5e)}return{showRestart(S,A){D("restart","",A6(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,x(),!(!t.open&&t.phase==="idle")){t=OU(t.revision+1);for(let S of c)S()}}}}var Q5e={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=X5e({repository:V5e,clock:Q5e,reloadPage:()=>globalThis.location.reload()});function Y5e(e,t){Il.showRestart(e,t)}function Z5e(e,t,r){Il.showAutoUpdate(e,t,r)}var kr=B(Ee(),1),J5e=qh(()=>globalThis.__wandImportBrowserModule("5efc2e6b76e3291b").then(e=>e.ConversationHome),{title:"\u804A\u5929"}),exe=qh(()=>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})}),txe=Ln(()=>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 rxe(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 nxe({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)(s5e,{})}),(0,kr.jsxs)(Xe,{vertical:!0,align:"center",justify:"center",gap:"middle",style:{flex:1},children:[(0,kr.jsx)(Ff,{style:{width:48,height:48}}),(0,kr.jsx)(zt.Title,{level:2,children:r?.taskName||n?.workspaceName||"\u5F00\u59CB\u65B0\u7684\u5DE5\u4F5C"}),(0,kr.jsx)(Ne,{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 axe({legacyRefs:e}={}){let t=y1.useSyncExternalStore(Qc.subscribe,Qc.getSnapshot,Qc.getSnapshot),r=y1.useSyncExternalStore(Da.subscribe,Da.getSnapshot,Da.getSnapshot),n=ai(),a=g0(),o=Fi(),l=y1.useSyncExternalStore(gl.subscribe,gl.getSnapshot,gl.getSnapshot),c=rxe(n.legacyVisibility),d=y1.useSyncExternalStore(Wr.subscribe,Wr.getSnapshot,Wr.getServerSnapshot),f=!!d.taskId&&Wf(d.layout)?.layout.type==="split",h=y1.useSyncExternalStore(dl.subscribe,dl.getSnapshot,dl.getSnapshot),g=!h.open&&!r.open&&!l.open&&!t.open&&(a.active===!0||a.active===null&&!f&&!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":""}${f?" 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)(L5e,{fallback:(0,kr.jsx)(I5e,{})}),h.open&&!r.open&&(0,kr.jsx)(fA,{}),(0,kr.jsx)(m4,{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&&!f?"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&&!f?"flex":"none",flexDirection:"column"}}),(0,kr.jsx)(nxe,{className:`${c.blank}${f||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&&!f?void 0:"none"}}),f?(0,kr.jsx)("div",{style:{display:"contents"},inert:h.open||g||r.open,"aria-hidden":h.open||g||r.open,children:(0,kr.jsx)(exe,{})}):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)(J5e,{enabled:g,visible:g,sidebarOpen:n.layout.sessionsDrawerOpen,onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Rf}),(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)(lA,{runId:l.runId,sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Rf}):l.open&&l.page==="teams"?(0,kr.jsx)(sA,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Rf}):l.open&&l.page==="board"?(0,kr.jsx)(Hwe,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Rf}):null,(0,kr.jsx)(txe,{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:Rf})]}),(0,kr.jsx)(dA.Provider,{value:!0,children:(0,kr.jsx)(qwe,{})}),(0,kr.jsx)(HE,{showRestart:Il.showRestart})]})}var vr=B(_(),1),zU=B(tr(),1);function gG(e,t){if(!e||t.sessionId&&t.sessionId!==e)return;if(t.type==="disconnected")return"\u5DF2\u65AD\u5F00 \xB7 \u81EA\u52A8\u91CD\u8FDE\u4E2D";if(t.type==="connected")return"\u8FDE\u63A5\u4E2D";if(t.sessionId!==e)return;let r=["stopped","exited","failed"].includes(t.data?.status||"");if(t.type==="init")return r?"\u8FDB\u7A0B\u5DF2\u7ED3\u675F":"\u5DF2\u8FDE\u63A5";if(t.type==="ended"||t.type==="status"&&r)return"\u8FDB\u7A0B\u5DF2\u7ED3\u675F";if(t.type==="resync_required")return"\u8FDE\u63A5\u4E2D";if(t.type==="pty_error"||t.type==="error")return"\u8FDE\u63A5\u5F02\u5E38"}var J9=null;function ixe(e){J9=e}function mp(){if(!J9)throw new Error("\u7EC8\u7AEF\u8FD0\u884C\u65F6\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002");return J9}function oxe(){Sa("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 { display:flex; flex-direction:column; height:100%; min-height:0; min-width:0; overflow:hidden; background:var(--bg-terminal); 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-header { flex:none; min-width:0; min-height:40px; padding:4px 8px; box-sizing:border-box; background:var(--bg-primary); }
|
|
244
|
+
.quick-terminal-title, .quick-terminal-status, .quick-terminal-header .wand-ui-icon-button { flex:none; }
|
|
245
|
+
.quick-terminal-status { font-size:var(--font-size-xs); }
|
|
246
|
+
.quick-terminal-header .quick-terminal-directory { flex:1; min-width:0; font-size:var(--font-size-xs); color:var(--text-secondary); }
|
|
247
|
+
.quick-terminal-surface .pooled-terminal-wrap { width:100%; height:100%; overflow:hidden; }
|
|
248
|
+
@media(prefers-reduced-motion:reduce) { .quick-terminal-split > .ant-splitter-panel,.quick-terminal-panel { transition:none !important; } }
|
|
249
|
+
`)}var iB="wand.quick-terminal.v1";function sxe(e){return e==="bottom"?"bottom":"right"}function LU(e){try{let t=JSON.parse(e.getItem(iB)||"{}");return{dock:sxe(t?.dock),sessionId:typeof t?.sessionId=="string"?t.sessionId:"",...t?.creationPending===!0?{creationPending:!0}:{}}}catch{return{dock:"right",sessionId:""}}}function lxe(e,t){try{return e.setItem(iB,JSON.stringify(t)),!0}catch{return!1}}async function uxe(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request(iB,e):e()}async function cxe(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 Pt=B(Ee(),1);function C9({host:e}){let t=vr.useCallback(r=>{r&&r.appendChild(e)},[e]);return(0,Pt.jsx)("div",{ref:t,style:{width:"100%",height:"100%",minWidth:0,minHeight:0,overflow:"hidden"}})}function dxe({children:e}){return typeof document>"u"?(0,Pt.jsx)(Pt.Fragment,{children:e}):(0,Pt.jsx)(fxe,{children:e})}function fxe({children:e}){let t=ai(),[r,n]=vr.useState(()=>{try{return LU(localStorage)}catch{return{dock:"right",sessionId:""}}}),a=vr.useRef(r),[o,l]=vr.useState(!1),[c,d]=vr.useState(!1),[f,h]=vr.useState(!1),[g,v]=vr.useState(""),[y,x]=vr.useState("\u672A\u8FDE\u63A5"),[w,k]=vr.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]=vr.useState(!1),[D,S]=vr.useState(!1),[A,I]=vr.useState(null),[j,$]=vr.useState(!1),[N,P]=vr.useState(()=>new Set),O=vr.useCallback(ae=>(P(ce=>new Set(ce).add(ae)),()=>P(ce=>{let ye=new Set(ce);return ye.delete(ae),ye})),[]),V=N.size>0,H=vr.useRef(null),q=vr.useRef(null),L=vr.useRef(""),R=vr.useRef(!1),W=vr.useRef(!1),z=vr.useRef(0),Q=vr.useRef(!1),K=vr.useRef(!1),[Z]=vr.useState(()=>document.createElement("div")),[T]=vr.useState(()=>document.createElement("div")),[U]=vr.useState(()=>document.createElement("div")),X=vr.useRef(null),Y=ae=>{a.current=ae,n(ae);let ce=!1;try{ce=lxe(localStorage,ae)}catch{}C(!ce)};vr.useLayoutEffect(()=>{oxe(),Z.style.width="100%";for(let ce of[T,U])Object.assign(ce.style,{width:"100%",height:"100%",minWidth:"0",minHeight:"0",display:"flex",flexDirection:"column"});let ae=new ResizeObserver(ce=>S(ce[0].contentRect.width<680));return H.current&&ae.observe(H.current),()=>ae.disconnect()},[Z,T,U]);let re=vr.useCallback(()=>{if(!K.current||!W.current||!R.current||!L.current)return;let ae=document.activeElement;(ae===q.current||ae===document.body||U.contains(ae))&&mp().focus(L.current),K.current=!1},[U]);vr.useLayoutEffect(()=>{o&&re()},[o,re]),vr.useEffect(()=>mp().observe(ae=>{let ce=gG(L.current,ae);ce&&(x(ce),ae.type==="init"?(k(""),ae.data?.cwd&&v(ae.data.cwd),ce==="\u5DF2\u8FDE\u63A5"&&re()):ce==="\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"))}),[re]),vr.useEffect(()=>()=>{z.current++,R.current=!1,K.current=!1,Q.current=!1,L.current&&(mp().retain(L.current,!1),mp().dispose(L.current))},[]);let J=async(ae=!1)=>{if(W.current=!0,l(!0),d(!1),K.current=!0,L.current&&R.current&&!ae){o&&re();return}if(Q.current)return;let ce=z.current;Q.current=!0,h(!0),x("\u8FDE\u63A5\u4E2D"),k("");try{let ye=Wr.getSnapshot(),Te=t.selected?.worktree?.path||ye.cwd||t.selected?.cwd||"~",De=L.current?{id:L.current,cwd:g}:await uxe(async()=>{let ke=a.current;try{let Le=LU(localStorage);(Le.sessionId||Le.creationPending)&&(ke=Le)}catch{}if(!ke.sessionId&&ke.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");ke.sessionId||Y({...ke,creationPending:!0});let Ce=await cxe(ke.sessionId,Te);return Y({dock:a.current.dock,sessionId:Ce.id}),Ce});if(ce!==z.current||(L.current=De.id,v(De.cwd),await tp(),ce!==z.current))return;if(!X.current)throw new Error("\u7EC8\u7AEF\u5BB9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");if(mp().retain(De.id,!0),!mp().mount(De.id,X.current))throw new Error("\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");R.current=!0,ae&&mp().reconnect(De.id)}catch(ye){if(ce!==z.current)return;x("\u8FDE\u63A5\u5931\u8D25"),k(ye instanceof Error?ye.message:"\u7EC8\u7AEF\u8FDE\u63A5\u5931\u8D25")}finally{ce===z.current&&(Q.current=!1,h(!1))}},se=()=>{W.current=!1,K.current=!1,d(!1),l(!1),q.current?.focus({preventScroll:!0})},me=D?"bottom":r.dock,le=ae=>{Y({...a.current,dock:ae}),I(null)},he=!!(L.current||r.sessionId);return(0,Pt.jsx)(t1.Provider,{value:{open:o,show:()=>{J()},trigger:q,chromeHost:Z,registerChrome:O},children:(0,Pt.jsxs)(Xe,{vertical:!0,ref:H,className:"quick-terminal-workspace",style:{flex:1,minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,Pt.jsxs)(Xe,{align:"center",justify:"end",className:"quick-terminal-toolbar",style:{padding:V?0:"2px var(--wand-page-inset, 20px)",borderBottom:V?void 0:"1px solid var(--border-subtle)",flexShrink:0},children:[(0,Pt.jsx)("div",{style:{width:"100%",display:V?void 0:"none"},children:(0,Pt.jsx)(C9,{host:Z})}),!V&&(0,Pt.jsx)(p0,{})]}),(0,Pt.jsxs)(Fb,{orientation:me==="right"?"horizontal":"vertical",className:"quick-terminal-split","data-dragging":j,onResizeStart:()=>$(!0),onResizeEnd:()=>$(!1),style:{flex:1,minHeight:0,minWidth:0},onResize:ae=>{let ce=ae[0]+ae[1];o&&ce&&I(ae[1]/ce*100)},children:[(0,Pt.jsx)(Fb.Panel,{min:o?"20%":0,size:o?`${100-(A??(me==="right"?40:35))}%`:"100%",children:(0,Pt.jsx)(C9,{host:T})}),(0,Pt.jsx)(Fb.Panel,{min:o?"25%":0,max:"70%",size:o?`${A??(me==="right"?40:35)}%`:0,resizable:o,children:(0,Pt.jsx)(C9,{host:U})})]},me),(0,zU.createPortal)(e,T),(0,zU.createPortal)((0,Pt.jsxs)("section",{id:"quick-terminal-panel","aria-label":"\u5FEB\u6377\u7EC8\u7AEF","aria-describedby":"quick-terminal-description","aria-hidden":!o,inert:!o,className:"quick-terminal-panel","data-open":o,"data-dock":me,children:[(0,Pt.jsxs)(Xe,{align:"center",gap:8,className:"quick-terminal-header",children:[(0,Pt.jsx)(zt.Text,{strong:!0,className:"quick-terminal-title",children:"\u7EC8\u7AEF"}),(0,Pt.jsx)("span",{role:"status",className:"quick-terminal-status",title:f?"\u8FDE\u63A5\u4E2D":y,children:!f&&y==="\u5DF2\u8FDE\u63A5"?(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(pi,{status:"success","aria-hidden":!0}),(0,Pt.jsx)("span",{className:"workbar-accessible-title",children:"\u5DF2\u8FDE\u63A5"})]}):f?"\u8FDE\u63A5\u4E2D":y}),(0,Pt.jsx)(zt.Text,{ellipsis:{tooltip:g||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"},title:g||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55",className:"quick-terminal-directory",children:g.replace(/[\\/]+$/,"").split(/[\\/]/).pop()||g||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"}),(0,Pt.jsxs)(Kh,{open:c&&o,onOpenChange:d,children:[(0,Pt.jsx)(zf,{render:(0,Pt.jsx)(Mr,{"aria-label":"\u7EC8\u7AEF\u9009\u9879",title:`\u7EC8\u7AEF\u9009\u9879 \xB7 ${me==="right"?"\u53F3\u4FA7":"\u5E95\u90E8"}\u505C\u9760`,children:(0,Pt.jsx)(Ae,{name:"more",size:16})})}),(0,Pt.jsxs)(Lf,{"aria-label":"\u7EC8\u7AEF\u9009\u9879",align:"end",children:[(0,Pt.jsx)(cn,{onSelect:()=>le("right"),hint:r.dock==="right"?"\u5DF2\u9009":void 0,children:"\u505C\u9760\u5230\u53F3\u4FA7"}),(0,Pt.jsx)(cn,{onSelect:()=>le("bottom"),hint:r.dock==="bottom"?"\u5DF2\u9009":void 0,children:"\u505C\u9760\u5230\u5E95\u90E8"}),(0,Pt.jsx)(wu,{}),(0,Pt.jsx)(cn,{icon:"refresh",disabled:f||!he,onSelect:()=>{J(!0)},children:"\u91CD\u65B0\u8FDE\u63A5"})]})]}),(0,Pt.jsx)(Mr,{"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:se,children:(0,Pt.jsx)(Ae,{name:"close",size:16})})]}),(0,Pt.jsxs)("span",{id:"quick-terminal-description",className:"workbar-accessible-title",children:["\u8FD0\u884C\u5728 Wand \u4E3B\u673A\uFF1B\u5173\u95ED\u4EC5\u9690\u85CF\uFF0C\u547D\u4EE4\u7EE7\u7EED\u8FD0\u884C\u3002\u7ED3\u675F shell \u8BF7\u5728\u7EC8\u7AEF\u8F93\u5165 exit\u3002",D&&r.dock==="right"?"\u7A84\u7A97\u4E34\u65F6\u5728\u5E95\u90E8\u663E\u793A\u3002":""]}),F&&(0,Pt.jsx)(La,{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"}),w&&(0,Pt.jsx)(La,{type:"error",title:w,action:he?(0,Pt.jsx)(Ne,{disabled:f,onClick:()=>{J(!0)},children:"\u91CD\u65B0\u8FDE\u63A5"}):void 0}),(0,Pt.jsx)("div",{ref:X,className:"quick-terminal-surface",style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"}})]}),U)]})})}var Zo=B(Ee(),1),pxe=Ln(()=>globalThis.__wandImportBrowserModule("6ed5e5176549288a").then(e=>e.EmployeeProfileHost),f7,e=>e!==null,{title:"\u5458\u5DE5\u8D44\u6599",close:()=>kb.close(),renderPending:()=>(0,Zo.jsx)(Zo.Fragment,{})});function mxe(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 hxe({legacyRefs:e}={}){let t=ai();return(0,Zo.jsxs)(cE,{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)(Twe,{}),(0,Zo.jsxs)(cE,{hasSider:!0,className:mxe(t.layout.sidebarDrawer?{...t.layout,sidebarAnchored:!1,sidebarCollapsed:!1}:t.layout),style:{flex:1,minHeight:0},children:[(0,Zo.jsx)(A5e,{}),(0,Zo.jsx)(dxe,{children:(0,Zo.jsx)(axe,{legacyRefs:e})}),(0,Zo.jsx)(pxe,{mobile:t.viewport.mobile})]})]})}function gxe({store:e,legacyRefs:t}){return $we.useLayoutEffect(()=>P2(),[]),(0,Zo.jsx)(za,{children:(0,Zo.jsx)(A8,{store:e,children:(0,Zo.jsx)(hxe,{legacyRefs:t})})})}var vxe="wand-automation-sessions-expanded",bxe="wand-non-wand-sessions-expanded",e$=new Set;function ja(e){for(let t of[...e$])t(e)}function vG(){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:z1(vxe,!1),historyExpanded:z1(bxe,!1)}}function yxe(e){e$.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),()=>{e$.delete(e),window.removeEventListener("resize",t),window.removeEventListener("online",r),window.removeEventListener("offline",n)}}function wxe(e,t={}){return new bwe({readSnapshot:()=>QV(m,vG()),applyAction:r=>Dwe(e,r),subscribeLegacy:yxe,batchMs:t.batchMs,freezeSnapshots:t.freezeSnapshots})}function bG(e){return e?.sessionKind==="structured"&&e.provider==="pi"}function oB(){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||!bG(e)||m.terminalInteractive){Kn.clear();return}let a=n.value,o=Kn.isExpanded(e.id)||Qg(a)&&!m.composerComposing&&!Kn.isDismissed(e.id,a);Kn.sync([{key:"pi-settings",target:t,toggleTarget:r,sessionId:e.id,draft:a,open:o,onSaved:(l,c)=>{let d=m.sessions.find(f=>f.id===l);d&&(d.piSettings=c,ja("pi-settings"))},returnFocus:()=>{if(m.selectedId===e.id){if(Kn.openedBy()==="toggle"){r.querySelector("button")?.focus();return}n.focus()}}}])}function xxe(e,t){return!bG(t)||m.terminalInteractive?!1:Qg(e)?(oB(),Kn.reopen(),Kn.focusControl(),!0):(Kn.dismiss(),!1)}function Exe(e){let t=Kn.getSnapshot().mounts[0];return!t||!t.open||e.isComposing||e.keyCode===229?!1:e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),Kn.dismiss(),t.returnFocus(),!0):Kn.openedBy()==="toggle"&&!Qg(t.draft)?!1:(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="Enter")&&!e.shiftKey?(e.preventDefault(),e.stopPropagation(),Kn.focusControl(e.key==="ArrowUp"),!0):!1}var HU=Object.freeze({mode:"shortcuts",ctrl:!1,shift:!1,open:!1}),I0=new Map,S9=new Set,Za={read(e){return e?I0.get(e)??HU:HU},subscribe(e){return S9.add(e),()=>{S9.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)){I0.delete(e),I0.set(e,Object.freeze(n)),I0.size>128&&I0.delete(I0.keys().next().value);for(let a of S9)a()}},toggle(e,t){this.update(e,{[t]:!this.read(e)[t]})}};function ry(e,t){let r=Za.read(e);return{ctrl:t.ctrl||r.ctrl,shift:t.shift||r.shift,alt:t.alt}}function WE(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 f=d.toLowerCase();if(f>="a"&&f<="z")return String.fromCharCode(f.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 kxe(e,t,r){return t?.inputType!=="insertText"||t.data!==e||e.length!==1||e.charCodeAt(0)>127?null:WE(e,r)}function Cxe(){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 X6=new Map;function Sxe(e){for(let t of X6.get(e)??[])t()}function Fxe(e,t=400){return new Promise(r=>{let n=X6.get(e)??new Set;X6.set(e,n);let a=c=>{clearTimeout(l),n.delete(o),n.size||X6.delete(e),r(c)},o=()=>a(!0),l=setTimeout(()=>a(!1),t);n.add(o)})}function qU(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 yG(e,t,r="unknown"){return e?t?r==="latest"||qU(t)>=qU(e)?t:Object.assign({},e,{usage:t.usage||e.usage}):e:t}function Dxe(e,t,r,n,a="unknown"){return r>0&&e?.role===t?.role&&Array.isArray(t?.content)&&t.content.length>=n?t:yG(e,t,a)}function Axe(e,t,r){return e?.role==="assistant"&&t?.role==="assistant"?yG(e,t,r):t||e}function $xe(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,f=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:f};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 x=l==="latest"?v.content.slice(0,o):v.content.slice();if(y.content.forEach(function(O,V){x[a+V]=O}),x.length>=o&&Array.from(x).every(function(O){return O!==void 0})){var w=t.slice();w[0]=Object.assign({},y,{content:x});var k=t$(e,w,r,n,l);return k.messages[r-k.messageOffset]=w[0],{...k,leadingBlockOffset:d,leadingBlockTotal:f}}}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),N=new Array($-j);A.content.forEach(function(O,V){d+V<$&&(N[d+V-j]=O)}),I.content.forEach(function(O,V){N[a+V-j]=O}),Array.from(N).every(function(O){return O!==void 0})&&(F=t.slice(),F[0]=Object.assign({},I,{content:N}),C=!0,D=j,S=l==="latest"?Math.max(o,$):Math.max(f,o,$))}}var P=t$(e,F,r,n,l);return C&&P.messageOffset===r&&(P.messages[0]=F[0]),P.messageOffset<r&&(D=d,S=f),{...P,leadingBlockOffset:D,leadingBlockTotal:S}}function t$(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,f=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:f};if(a!=="latest"&&c.length>0&&l<f)return{messages:c,messageOffset:d,messageTotal:f};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),x=[],w=v;w<y;w++){var k=w>=d&&w<h?c[w-d]:void 0,F=w>=o&&w<g?t[w-o]:void 0;x.push(Axe(k,F,a))}return{messages:x,messageOffset:v,messageTotal:a==="latest"?l:Math.max(f,l,v+x.length)}}var Bxe=B(si(),1),kl=B(Ee(),1);function Ixe(e,t,r){let n=document.createElement("div");n.dataset.chatLoadState=t?"failed":"loading",e.replaceChildren(n);let a=(0,Bxe.createRoot)(n);return a.render((0,kl.jsx)(sr,{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)(La,{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)(Ne,{onClick:r,children:"\u91CD\u8BD5"}),(0,kl.jsx)(Ne,{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 sB(){return r$??(r$=Kye())}var r$=null,$6=null,cd=null,ud=null,pE=0,U1=null;function mE(e){return pE===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 hE(){U1?.dispose(),U1=null}function wG(e,t){mE(e)&&(U1?.root===e.root&&U1.failed===t||(hE(),U1={root:e.root,failed:t,dispose:Ixe(e.root,t,()=>{!cd||!mE(cd)||(ud=null,sa(!0))})}))}function Mxe(){$6||($6=globalThis.__wandImportBrowserModule("f11e12767426d28a").then(e=>{r$=e;let t=cd;return cd=null,ud=null,e.clearActivityDetailState(),hE(),t&&mE(t)&&e.renderChat(t.force),e}).catch(e=>{let t=cd;return t&&mE(t)?(ud=t,wG(t,!0)):hE(),console.warn("[wand] chat component download failed"),Promise.reject(e)}).finally(()=>{$6=null}),$6.catch(()=>{}))}function sa(e=!1){let t=sB();if(t){t.renderChat(e);return}if(!m.selectedId||(m.currentView||"chat")!=="chat")return;let r=R$(document.getElementById("chat-output"));if(!r)return;let n={sessionId:m.selectedId,epoch:m.chatRenderEpoch||0,generation:pE,root:r,force:!!e||!!cd?.force};cd=n,!(ud&&ud.generation===pE&&ud.sessionId===m.selectedId&&ud.root===r)&&(wG(n,!1),Mxe())}function dd(e=!1){let t=sB();t?t.scheduleChatRender(e):sa()}function UE(){pE++,cd=null,ud=null,hE(),sB()?.clearActivityDetailState()}typeof window<"u"&&(window.__scheduleChatRender=()=>dd(!0));function V1(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 V1(JSON.parse(r),t+1)}catch{return null}}if(Array.isArray(e))return e.some(r=>gE(r)||V1(r?.text,t+1))?e:null;if(typeof e=="object"){let r=e;return gE(r)?[r]:V1(r.content,t+1)}return null}function gE(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 lB(e){let t=V1(e);return t?t.flatMap(r=>{let n=gE(r);return n?[{src:n}]:r?.type==="text"?lB(r.text):[]}):[]}function ny(e){if(!e)return"";let t=V1(e);return t?t.map(r=>r?.type==="text"?ny(r.text):gE(r)?"":JSON.stringify(r)).filter(Boolean).join(`
|
|
250
|
+
`):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 ny(r.text);if(r.type==="image"||r.type==="image_url")return"";try{return JSON.stringify(r)}catch{return""}}).filter(Boolean).join(`
|
|
251
|
+
`):""}function Txe(e){if(!e)return"";let t=e.preview||"";return lB(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 T1=/\bgpt-\d+(?:\.\d+)?(?:\s+[a-z0-9.-]+)?\s+·\s+\d+%\s+left\s+·\s+(?:\/|~\/).+/i,WU=/^(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i;function jxe(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 _xe(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 M0(e){var t=String(e||"").trim();return!!(!t||jxe(t)||T1.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 Nxe(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 Pxe(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,`
|
|
252
|
+
`).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,`
|
|
253
|
+
`).replace(/\x1bM/g,`
|
|
254
|
+
`).replace(/\x1b\[[0-9;?]*[ST]/g,`
|
|
255
|
+
`).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,`
|
|
256
|
+
`).replace(/[ \t]+\n/g,`
|
|
257
|
+
`).replace(/\n{3,}/g,`
|
|
258
|
+
|
|
259
|
+
`)}function xG(e,t){var r=[];if(!e)return r;var n=String(e||""),a=`
|
|
260
|
+
`,o="\r",l="\x1B";if(/^codex\b/.test(String(t||"").trim())){let Kt=function(ze){return String(ze||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(Ze,ft){return" ".repeat(Number(ft)||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)},Ft=function(ze){return String(ze||"").replace(/\s+/g," ").replace(/[M]+$/g,"").trim()},ar=function(ze){return String(ze||"").replace(/^›\s*/,"").replace(/^>\s*/,"").trim()},Cr=function(ze){var Ze=String(ze||"").trim();if(!/^›(?:\s|$)/.test(Ze)||T1.test(Ze))return null;var ft=Ft(ar(Ze));return!ft||M0(ft)?null:ft},Ot=function(ze){var Ze=String(ze||"").trim();if(!/^[•◦·⏺]/.test(Ze))return null;var ft=Ze.replace(/^[•◦·]\s*/,"").replace(/^⏺\s+/,"").replace(/^│\s*/,"").trim();return!ft||/^[•◦·⏺]$/.test(ft)||(ft=ft.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,""),ft=Ft(ft),!ft||ft.length<2||WU.test(ft)||M0(ft))?null:ft},ot=function(ze){var Ze=Ft(ze);return!Ze||M0(Ze)||/^[•◦·⏺›]/.test(Ze)||/^[\[\]<>0-9;?]+u?$/i.test(Ze)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(Ze)||Ze.length>500?null:Ze},vt=function(ze,Ze){if(ze.indexOf(Ze)!==0)return!1;var ft=ze.slice(Ze.length);return/^[a-z]{1,4}$/i.test(ft)},Re=function(ze){for(var Ze=[],ft=0;ft<ze.length;ft++){var qt=Ft(ze[ft]);if(!(!qt||qt.length<2||M0(qt))){var Wt=Ze[Ze.length-1];if(!Wt){Ze.push(qt);continue}if(qt!==Wt){if(qt.indexOf(Wt)===0){Ze[Ze.length-1]=qt;continue}if(Wt.indexOf(qt)===0){vt(Wt,qt)&&(Ze[Ze.length-1]=qt);continue}Ze.push(qt)}}}return Ze.join(a).trim()},Ye=function(ze){for(var Ze=0;Ze<ze.length;Ze++){var ft=String(ze[Ze]||"").trim();if(ft){var qt=Cr(ft);if(qt)return qt;if(ft==="\u203A")for(var Wt=Ze+1;Wt<ze.length;Wt++){var Jr=Ft(ze[Wt]);if(!(!Jr||T1.test(Jr)||M0(Jr)))return Jr}}}return null},it=function(ze){for(var Ze=[],ft=!1,qt=0;qt<ze.length;qt++){var Wt=String(ze[qt]||"").trim();if(!Wt){if(ft)break;continue}var Jr=Ot(Wt);if(Jr){Ze.push(Jr),ft=!0;continue}if(ft){if(Wt==="\u203A"||/^›(?:\s|$)/.test(Wt)||T1.test(Wt)||M0(Wt))break;Ze.push(Ft(Wt))}}return Ze};for(var c=Kt,d=Ft,f=ar,h=Cr,g=Ot,v=ot,y=vt,x=Re,w=Ye,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 N=Cr($);if(N){F.push({kind:"user",order:C++,text:N});continue}var P=Ot($);if(P){F.push({kind:"assistant",order:C++,text:P});continue}var O=ot($);O&&F.push({kind:"echo",order:C++,text:O})}}for(var V=F.filter(function(ze,Ze,ft){var qt=ft[Ze-1];return!qt||qt.kind!==ze.kind||qt.text!==ze.text}),H=V.filter(function(ze){return ze.kind==="user"}),q=V.filter(function(ze){return ze.kind==="assistant"}),L=V.filter(function(ze){return ze.kind==="echo"}),R=Pxe(n),W=R.split(a).map(function(ze){return String(ze||"").trimEnd()}),z=Ye(W),Q=H.length?H[H.length-1]:null,K=L.map(function(ze){return ze.text}).filter(function(ze){return ze.length>=3}),Z=null,T=K.length-1;T>=0;T--)if(K[T]!==z){Z=K[T];break}!Z&&K.length&&(Z=K[K.length-1]);for(var U=Q?Q.text:Z,X=q.filter(function(ze){return!Q||ze.order>Q.order}).map(function(ze){return ze.text}),Y=[],re=R.match(/^[ \t]*[•◦·⏺][ \t]*(.+)$/gm)||[],J=0;J<re.length;J++){var se=Ft(re[J].replace(/^[ \t]*[•◦·⏺][ \t]*/,""));se&&(WU.test(se)||T1.test(se)||/\b(?:OpenAI Codex|model:|directory:|Tip:|esc to interrupt)\b/i.test(se)||Y.push(se))}var me=Re(X)||Re(it(W))||(Y.length?Y[Y.length-1]:null);return U&&r.push({role:"user",content:U}),me&&r.push({role:"assistant",content:me}),!r.length&&Q?r.push({role:"user",content:Q.text}):!r.length&&Z&&r.push({role:"user",content:Z}),r}for(var le="\0",he="\b",ae="\v",ce="\f",ye="",Te="",De="\xA0",ke="\x07",Ce=new RegExp(l+"\\[[0-9;?]*[a-zA-Z]|"+l+"\\][^"+ke+"]*("+ke+"|"+l+"\\\\\\\\)|"+l+"[><=eP_X^]|["+le+"-"+he+ae+ce+ye+"-"+Te+"]|"+De+"|"+o,"g"),Le=n.replace(Ce,function(Kt){return Kt===De?" ":Kt===o?a:""}).split(o).join(a),$e=Le.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=[],Ve=[],qe=[],Ie=0;Ie<$e.length;Ie++){var Pe=$e[Ie],Je=Pe.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(Pe)){gt=!0,qe.push(Pe);break}if(!gt&&!Nxe(Pe)){if(Pe.indexOf("\u25CF")===0){if(Pe=Pe.slice(1).trim(),!Pe)continue;Ve.push(Pe);continue}Pe.length<3&&!/^[a-zA-Z]{3}$/.test(Pe)||Ve.push(Pe)}}if(qe.length>0){var Ue=qe[qe.length-1],Fe=Ue.match(new RegExp("for ([0-9]+[ms]+| [0-9]+m [0-9]+s)","i")),_e=Fe?"\u6DF1\u5EA6\u601D\u8003 "+Fe[0].replace(/for /i,""):"\u6DF1\u5EA6\u601D\u8003\u4E2D...";r.push({role:"thinking",content:_e,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(!Ve.length)return r;for(var at=[],Ge=null,je=[],Ie=0;Ie<Ve.length;Ie++)if(Pe=Ve[Ie],Pe.indexOf("\u276F")===0){var rt=Pe.replace(/^❯\s*/,"").trim();if(rt.indexOf('Try"')===0||rt.indexOf('Try "')===0)continue;Ge!==null&&je.length>0&&(at.push({user:Ge,assistantLines:je}),je=[]),rt?Ge=rt:(Ge!==null&&je.length>0&&(at.push({user:Ge,assistantLines:je}),je=[]),Ge=null)}else Ge!==null&&(Pe.indexOf("\u23FA")!==-1&&(Pe.indexOf("Hi!")!==-1||Pe.indexOf("Hello")!==-1||Pe.indexOf("What")!==-1||Pe.indexOf("working")!==-1)?je.push(Pe):Pe.indexOf("\u23FA")===0?je.push(Pe.slice(1).trim()||Pe):Pe.length>=8&&Pe.indexOf("\u2722")===-1&&Pe.indexOf("\u2733")===-1&&Pe.indexOf("\u2736")===-1&&Pe.indexOf("\u273B")===-1&&Pe.indexOf("\u273D")===-1&&Pe.indexOf("\u2590")!==0&&Pe.indexOf("\u259D")!==0&&Pe.indexOf("\u2598")!==0&&Pe.indexOf("esctointerrupt")===-1&&Pe.indexOf("?for")!==0&&Pe.indexOf("? for")!==0&&je.push(Pe));if(Ge!==null&&je.length>0&&at.push({user:Ge,assistantLines:je}),at.length===0){for(var Bt="",It=-1,Ie=0;Ie<Ve.length;Ie++)if(Pe=Ve[Ie],!(Pe.indexOf('Try"')===0||Pe.indexOf('Try "')===0)&&Pe.indexOf("Failed to install")===-1&&Pe.indexOf("ctrl+g")===-1&&Pe.indexOf("\u25CF ")!==0&&!(Pe.length<2||Pe.length>100)&&/^[a-zA-Z]/.test(Pe)){Bt=Pe.trim(),It=Ie;break}if(Bt&&It>=0){var Gr=Ve.slice(It+1).filter(function(Kt){return Kt.length>=8});Gr.length>0&&at.push({user:Bt,assistantLines:Gr})}}for(var Ht=0;Ht<at.length;Ht++)if(r.push({role:"user",content:at[Ht].user}),at[Ht].assistantLines.length>0){var $r=Rxe(at[Ht].assistantLines.join(a));r.push({role:"assistant",content:$r})}return r}function Rxe(e){if(!e)return"";for(var t=`
|
|
261
|
+
`,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=[],f={},h=0;h<n.length;h++){var g=n[h].replace(/\s+/g,"");g.length>5&&f[g]||(g.length>5&&(f[g]=!0),d.push(n[h]))}return d.join(t)}var EG=null;function uB(e){EG=e}var n$=0;function hy(e){n$++;try{return e()}finally{n$--}}var a$=0;function Oxe(){let e=a$;return()=>e===a$}function kG(){n$||(a$++,EG?.())}var CG=null;function cB(e){CG=e}function zxe(){return CG?.()??Promise.resolve(!1)}var Lxe=B(si(),1),Hxe=B(tr(),1),F9=B(Ee(),1),x1=new Map,B6=new Set;function qxe(){for(let[t,r]of x1)t.isConnected||(r.unmount(),x1.delete(t));let e=document.querySelector("[data-login-controls]");!e||x1.has(e)||B6.has(e)||(B6.add(e),Promise.all([globalThis.__wandImportBrowserModule("75fb0efeeb030780"),globalThis.__wandImportBrowserModule("fc7dd2f84cb9b470"),globalThis.__wandImportBrowserModule("d0fff09448324ac0")]).then(([{LoginForm:t},{renderLoginVisual:r},{renderWandBrandMarkup:n}])=>{if(B6.delete(e),!e.isConnected||x1.has(e))return;let a=(0,Lxe.createRoot)(e);x1.set(e,a);let o=(0,F9.jsx)("div",{dangerouslySetInnerHTML:{__html:r(n("brand-logo"))}}),l="http://"+location.host+location.pathname;(0,Hxe.flushSync)(()=>a.render((0,F9.jsx)(za,{children:(0,F9.jsx)(t,{checking:e.dataset.checking==="true",switchServer:e.dataset.switchServer==="true",visual:o,httpHref:l})})))}).catch(()=>{B6.delete(e),e.textContent="\u767B\u5F55\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}))}var Wxe={piExecution:Vc,folderPicker:nd,imageViewer:wl,localPreview:El,missions:Tf,newSession:Ia,quickCommit:Nc,settings:mo,worktreeMerge:Pc,workspaces:Xf};function Uxe(e){return!e?.isOpen()||e.closeIfOpen()}function hi(e=[]){let t=new Set(e);for(let[r,n]of Object.entries(Wxe))if(!t.has(r)&&!Uxe(n))return!1;return!0}function SG(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 FG(e){var t=String(e||"").trim();return t.length<=24?t||"\u672A\u9009\u62E9\u4F1A\u8BDD":t.slice(0,21)+"..."}function DG(e,t){e.closest(".inline-tool-image")?.setAttribute("data-image-state",t)}var Au=B(_(),1),Vxe=B(si(),1),j1=B(tr(),1),Gxe=B(_(),1),Hi=B(Ee(),1),AG=Gxe.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)(Ne,{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)(Of,{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 $G({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)(Ne,{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)(Ae,{name:"keyboard",size:16}),(0,Hi.jsxs)("span",{children:["\u6309\u952E",t?(0,Hi.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,Hi.jsx)(Ae,{name:"chevronUp",size:14})]}):(0,Hi.jsx)(Ae,{name:"chevronDown",size:16})})}var UU=B(Ee(),1);function BG({ctrl:e,shift:t,disabled:r,onToggle:n}){return(0,UU.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,UU.jsx)(Ne,{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 Li=B(Ee(),1),I6=new Map;function VU({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,f=Za.read(a),h=Au.useRef(null),g=Au.useRef(null),v=l==="failed"||l==="unknown"||!!o.recovery,y=v?"keyboard":f.mode,x=t.readOnly||!!o.recovery||m.composerComposing,w=()=>{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=l7({owner:a,input:()=>t,surface:()=>e,phase:l,pending:!!o.text||!!o.attachments.length,locked:x,forceExpanded:d&&y==="keyboard",onDismiss:S=>{d&&(w(),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&&!f.open&&y==="shortcuts"&&!f.ctrl&&!f.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(!(x||l==="sending"||v||m.composerComposing))if(pd(),y==="keyboard")w(),t.blur(),(0,j1.flushSync)(()=>Za.update(a,{mode:"shortcuts"})),h.current?.focus({preventScroll:!0});else{(0,j1.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(pd(),F){Za.update(a,{open:!0});return}y==="keyboard"&&(w(),t.blur()),Za.update(a,{open:!1,mode:"shortcuts",ctrl:!1,shift:!1})}};return(0,Li.jsxs)(Li.Fragment,{children:[(0,j1.createPortal)((0,Li.jsx)(Li.Fragment,{children:d?(0,Li.jsxs)(Li.Fragment,{children:[(0,Li.jsx)($G,{collapsed:F,hasDraft:!!o.text||!!o.attachments.length,disabled:v&&!F,onToggle:D}),(0,Li.jsx)(AG,{ref:h,mode:y,hasDraft:!!o.text||!!o.attachments.length,disabled:x||l==="sending"||v,onToggle:C}),(0,Li.jsx)(BG,{ctrl:f.ctrl,shift:f.shift,disabled:m.composerComposing,onToggle:S=>{m.composerComposing||Za.toggle(a,S)}})]}):null}),e.querySelector(".composer-main-row")),(0,j1.createPortal)((0,Li.jsx)(u7,{text:o.text,attachments:o.attachments.length,placeholder:t.placeholder,disabled:t.disabled,onOpen:k.open}),e.querySelector(".composer-actions-left"))]})}function Kxe(e){for(let[l,c]of I6)l.isConnected||(c.root.unmount(),I6.delete(l));let t=document.querySelector(".input-composer"),r=t?.querySelector("#input-box");if(!t||!r)return;let n=I6.get(t);if(n){n.root.render((0,Li.jsx)(za,{children:(0,Li.jsx)(VU,{host:t,input:r,resize:e})}));return}let a=document.createElement("span");t.appendChild(a);let o=(0,Vxe.createRoot)(a);I6.set(t,{root:o,chrome:a}),(0,j1.flushSync)(()=>o.render((0,Li.jsx)(za,{children:(0,Li.jsx)(VU,{host:t,input:r,resize:e})})))}var Q6=null,E1=null,i$=new Map;function Xxe(){return Q6?Promise.resolve(Q6):(E1||(E1=globalThis.__wandImportBrowserModule("2a86f5afb165815d").then(e=>(Q6=e,E1=null,e),e=>{throw E1=null,e})),E1)}function IG(e){let t=(i$.get(e)??0)+1;return i$.set(e,t),t}function VE(e,t){let r=IG(e);Xxe().then(n=>{i$.get(e)===r&&t(n)},()=>{e.textContent="\u901A\u77E5\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"})}function dB(e){IG(e),Q6?.clearNoticeView(e)}function Qxe(e){VE(e,t=>t.paintOfflineNotice(e))}function fB(e,t,r){VE(e,n=>n.paintBootNotice(e,t,r))}function Yxe(e,t){VE(e,r=>r.paintNotificationNotice(e,t))}function Zxe(e,t,r){VE(e,n=>n.paintUpdateNotice(e,t,r))}var o$="wand-active-task",Jxe="wand-selected-session";function W0(e){try{e?localStorage.setItem(o$,e):localStorage.removeItem(o$)}catch{}}function e2e(){try{return(localStorage.getItem(o$)||"").trim()}catch{return""}}var t2e=n2e();async function r2e(e=t2e,t=()=>!0){if(GU()||!t()||await zxe()||!t())return;let r=e2e();if(!r||GU())return;let n=Ka.getRuntime();if(n)try{let a=await an.listTaskGroups();if(!t())return;let o=BD(a.groups,r);if(!o||o.task.status==="done"){W0(null);return}await n.openTask({...A2(o,e||void 0),navigationCurrent:t}),e&&t()&&n.selectSession(e)}catch{}}function n2e(){try{return(localStorage.getItem(Jxe)||"").trim()||null}catch{return null}}function GU(){return typeof document<"u"&&document.documentElement?.classList?.contains("is-wand-embed-terminal")===!0}function a2e(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 T0(e){let t=parseInt(e||"",10);return Number.isFinite(t)?t:null}function i2e(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 MG(e){let t=e&&e.element,r=t&&t.parentElement;if(!r||typeof getComputedStyle!="function")return null;let n=a2e(e);if(!n)return null;let a=getComputedStyle(r),o=getComputedStyle(t),l=T0(a.getPropertyValue("width")),c=T0(a.getPropertyValue("height"));if(l===null||c===null)return null;let d=(T0(o.getPropertyValue("padding-left"))||0)+(T0(o.getPropertyValue("padding-right"))||0),f=(T0(o.getPropertyValue("padding-top"))||0)+(T0(o.getPropertyValue("padding-bottom"))||0),h=Math.max(0,l-d-i2e(e)),g=c-f;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=MG(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 o2e(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}var D9=0,M6=0,KU=0,k1=0,vE=[],bE=[];function pB(){return window.__wandIosNative===!0}function TG(e){KU=Math.max(KU,Date.now()+(e||1800))}function jG(e,t){setTimeout(function(){var r=document.activeElement;Y6(r)&&r!==t||TG(e)},30)}function s2e(e){return Math.max(window.innerHeight||0,e&&e.height||0,document.documentElement&&document.documentElement.clientHeight||0,document.body&&document.body.clientHeight||0)}function l2e(e){var t=document.documentElement,r=Math.max(window.innerWidth||0,e&&e.width||0,t&&t.clientWidth||0),n=s2e(e);return!D9||Math.abs(r-D9)>8?(D9=r,M6=n):n>M6&&(M6=n),Math.max(1,Math.round(M6||n||1))}function u2e(e,t,r,n){return e||!pB()?!1:t>0||n>r+1}function j0(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=l2e(t),a=Math.max(0,Math.round(t.offsetTop||0)),o=Math.max(1,Math.round(t.height));(!e&&pB()||u2e(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)&&B$()}}function Y6(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 c2e(){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),x=o();if(Math.abs(y-n)>8){n=y,a=x;return}x>a&&(a=x)}function c(y,x){var w=document.activeElement,k=w===y||Y6(w),F=a-e.height,C=a-(window.innerHeight||e.height||0),D=Date.now()<k1;return D?!!(k&&(F>120||C>120)):!!(x>80||k&&(F>120||C>120)||r&&(F>80||x>32))}function d(){vE.forEach(function(y){clearTimeout(y)}),vE=[60,180,360,620,900].map(function(y){return setTimeout(function(){j0(r)},y)})}function f(){bE.forEach(function(y){clearTimeout(y)}),bE=[0,50,120,220,360,560].map(function(y){return setTimeout(function(){h();var x=document.getElementById("input-box");x&&document.activeElement===x&&ME(x)},y)})}function h(){if(e){var y=document.getElementById("input-box"),x=window.innerHeight-e.height-e.offsetTop;l();var w=c(y,x),k=Math.abs(e.height-t)>8;if(j0(w),w&&(!r||k)&&sCe(e,y)&&ME(y),!r&&w){var F=m.terminalAutoFollow;qi("keyboard-open",{forceReplay:!0}),window.__wandImeNative||setTimeout(function(){j0(!0)},220),d(),F&&setTimeout(function(){m.terminal&&m.terminalAutoFollow&&Dl("force")},220)}if(r&&!w){var C=!!window.__wandImeNative;C||(TG(2200),k1=Date.now()+1200,j0(!1),B$()),d(),setTimeout(function(){C||(j0(!1),B$()),qi("keyboard-close",{forceReplay:!0}),Dl("keyboard")},200)}k&&r===w&&qi("viewport"),r=w,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||Y6(y.target)&&(jG(1600,y.target),pB()&&(k1=Math.max(k1,Date.now()+1200)),setTimeout(v,80),setTimeout(v,420))}),document.addEventListener("focusin",function(y){!y||!y.target||!Y6(y.target)||f()}),window.addEventListener("wand-ios-ime-state",function(y){var x=y&&y.detail&&y.detail.state;x==="hidden"&&(k1=Date.now()+900),f(),d()}),h()}function d2e(){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 f2e(){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,Ur("wand-sidebar-open",!1),Tp()):r&&m.sidebarPinned&&!m.sessionsDrawerOpen&&(m.sessionsDrawerOpen=!0,Ur("wand-sidebar-open",!0),Tp()))},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 p2e(){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 m2e(){m.terminalHealthTimer&&(clearInterval(m.terminalHealthTimer),m.terminalHealthTimer=null)}function gy(){m2e(),vE.forEach(function(a){clearTimeout(a)}),vE=[],bE.forEach(function(a){clearTimeout(a)}),bE=[],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,Ns(),m.softResyncTimer&&(clearTimeout(m.softResyncTimer),m.softResyncTimer=null),m.lastResize={cols:0,rows:0}}function vy(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})):o2e("/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 ay(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),vy(m.terminal.cols,m.terminal.rows),n&&m.terminalAutoFollow?Dl("force"):Ns())})}),!0}function ay(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(h2e)},t)}function h2e(){!m.terminal||m.terminalRestoring||(m.terminalAutoFollow&&Dl("force"),vy(m.terminal.cols,m.terminal.rows))}var yp=B(tr(),1),_G=B(si(),1),Cl=B(_(),1),g2e=B(tr(),1),Yo=B(Ee(),1),T6=[{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 v2e(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 NG({disabled:e,onKey:t,owner:r=""}){let n=Cl.useRef(null),a=Cl.useRef(null),[o,l]=Cl.useState(T6.length),[c,d]=Cl.useState(null),[f,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 x=n.current,w=a.current;if(!x||!w)return;let k=()=>{let D=x.clientWidth;if(!D)return;let S=parseFloat(getComputedStyle(x).columnGap)||0,A=Array.from(w.querySelectorAll("button"),I=>I.getBoundingClientRect().width);A.every(I=>I>0)&&l(v2e(D,A,S))};k();let F=new ResizeObserver(k);F.observe(x),F.observe(w);let C=!0;return document.fonts.ready.then(()=>{C&&k()}),d(r?x.closest(".input-composer")?.querySelector("[data-pty-extra-keys-host]")??null:null),()=>{C=!1,F.disconnect()}},[r]);let y=T6.slice(o);return(0,Yo.jsxs)(Yo.Fragment,{children:[(0,Yo.jsxs)(Xe,{ref:n,gap:4,wrap:!1,role:"group","aria-label":"PTY \u5FEB\u6377\u952E",className:"terminal-shortcuts-row",children:[T6.map(({key:x,label:w,title:k},F)=>(0,Yo.jsx)(rl,{"data-terminal-key":x,hidden:F>=o,disabled:e,title:k,"aria-label":k,onMouseDown:C=>{C.button===0&&C.preventDefault()},onClick:()=>t?.(x),children:w},x)),(0,Yo.jsx)("div",{className:"terminal-shortcuts-measure","aria-hidden":"true",inert:!0,children:(0,Yo.jsx)(Xe,{ref:a,gap:4,wrap:!1,className:"terminal-shortcuts-row terminal-shortcuts-probe",children:T6.map(({key:x,label:w})=>(0,Yo.jsx)(rl,{tabIndex:-1,children:w},x))})})]}),c?(0,g2e.createPortal)((0,Yo.jsx)(ol,{side:"top",ariaLabel:"\u5176\u4ED6\u7EC8\u7AEF\u6309\u952E",popupOwner:`pty-extra-keys-${r}`,open:f,onOpenChange:h,trigger:(0,Yo.jsx)(Ne,{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":f,style:{visibility:y.length?void 0:"hidden"},children:(0,Yo.jsx)(Ae,{name:"more",size:18})}),children:(0,Yo.jsx)("div",{className:"pty-extra-keys-grid",role:"group","aria-label":"\u672A\u663E\u793A\u7684\u7EC8\u7AEF\u6309\u952E",children:y.map(({key:x,label:w,title:k})=>(0,Yo.jsx)(Ne,{title:k,"aria-label":k,"data-extra-terminal-key":x,onClick:()=>{t?.(x),h(!1),g.current?.focus({preventScroll:!0})},children:w},x))})}),c):null]})}var b2e=B(_(),1),y2e=B(tr(),1),w2e=Object.freeze({revision:0,mounts:Object.freeze([])}),x2e=class{constructor(){oe(this,"snapshot",w2e),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([])}},G1=new x2e,Z6=B(Ee(),1),XU="\u53D1\u9001\u56DE\u8F66\u5230\u7EC8\u7AEF\uFF08\u76F8\u5F53\u4E8E Enter\uFF09";function PG({disabled:e,hint:t,onSubmit:r}){return(0,Z6.jsxs)(Ne,{className:"wand-composer-rail-submit",kind:"soft",size:"medium",disabled:e,title:t??XU,"aria-label":t??XU,onClick:r,children:[(0,Z6.jsx)(Ae,{name:"enter",slot:"start",size:14}),(0,Z6.jsx)("span",{children:"\u53D1\u9001"})]})}function mB(){return(0,b2e.useSyncExternalStore)(G1.subscribe,G1.getSnapshot,G1.getSnapshot).mounts.map(e=>(0,y2e.createPortal)((0,Z6.jsx)(PG,{disabled:e.disabled,hint:e.hint,onSubmit:e.onSubmit}),e.target,e.key))}var wo=B(Ee(),1),RG=0;function hB(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,_G.createRoot)(n,{identifierPrefix:`wand-terminal-measure-${++RG}-`}),(0,yp.flushSync)(()=>a.render((0,wo.jsx)(Xv,{children:(0,wo.jsx)(cE,{children:e})}))),n.querySelector(r)?.getBoundingClientRect().height??0}finally{try{(0,yp.flushSync)(()=>a?.unmount())}finally{n.remove()}}}function E2e(e,t){return hB((0,wo.jsx)(pG,{snapshot:e,measurement:!0}),t,".main-header-row")}function k2e(e,t){return hB((0,wo.jsx)(_5e,{...e}),t,".workspace-tab-bar")}function C2e(e,t){return hB((0,wo.jsx)(N5e,{...e}),t,'[data-session-tabs="standalone"]')}function S2e(e){let t=[],r=[],n=(l,c,d)=>{let f=l.style.getPropertyValue(c),h=l.style.getPropertyPriority(c);r.push(()=>f?l.style.setProperty(c,f,h):l.style.removeProperty(c)),l.style.setProperty(c,d,"important")},a,o=()=>{try{(0,yp.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 x=c.dataset.ptyInputMode;r.push(()=>{x===void 0?delete c.dataset.ptyInputMode:c.dataset.ptyInputMode=x}),c.dataset.ptyInputMode="shortcuts";let w=c.dataset.ptyCollapsed;r.push(()=>{w===void 0?delete c.dataset.ptyCollapsed:c.dataset.ptyCollapsed=w}),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 f=[],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),f.push((0,yp.createPortal)((0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)($G,{collapsed:!0,onToggle:()=>{}}),(0,wo.jsx)(AG,{mode:"shortcuts",onToggle:()=>{}}),(0,wo.jsx)(BG,{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),f.push((0,yp.createPortal)((0,wo.jsx)(NG,{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),f.push((0,yp.createPortal)((0,wo.jsx)(PG,{}),y))}if(f.length){let y=document.createElement("div");t.push(y),y.dataset.terminalCreationMeasure="true",y.inert=!0,document.body.appendChild(y),a=(0,_G.createRoot)(y,{identifierPrefix:`wand-terminal-measure-${++RG}-`}),(0,yp.flushSync)(()=>a.render((0,wo.jsx)(Xv,{children:f})))}return o}catch(l){throw o(),l}}function OG(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 zG(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 F2e=180,QU=80,D2e=80,A2e=180;function LG(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(qG(e,r));return o===0||((t.direction!==a||n-t.lastEventAt>A2e)&&(t.accumulatedPixels=0),t.direction=a,t.lastEventAt=n,t.accumulatedPixels+=o,t.accumulatedPixels<QU)||n-t.lastPageAt<D2e?0:(t.accumulatedPixels%=QU,t.lastPageAt=n,a)}var YU=60,$2e=80;function B2e(e,t,r=Date.now()){if(!Number.isFinite(e)||e===0||(t.accumulatedPixels+=e,Math.abs(t.accumulatedPixels)<YU)||r-t.lastPageAt<$2e)return 0;var n=t.accumulatedPixels>0?1:-1;return t.accumulatedPixels-=n*YU,t.lastPageAt=r,n}function HG(e,t,r,n,a=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var o=qG(e,n);if(!Number.isFinite(o)||o===0)return 0;a-t.lastEventAt>F2e&&(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 gB(e){return e<0?"\x1B[5~":e>0?"\x1B[6~":""}function qG(e,t){return e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*Math.max(1,t):e.deltaY}function iy(e){let t=typeof e=="string"?e.trim():"";return!t||!hi(["localPreview"])?!1:b1(t)?El.openPreview(t):t.startsWith("/")?El.openFile(t):El.openUrl(t)}var Tu=new Map;function WG(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 UG(e,t){let r=Tu.get(e);return r?.base===t&&!r.stale?WG(r):null}function VG(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 I2e(e,t){let r=Tu.get(e);!r||r.stale||(r.live+=t,r.live.length>2e5&&(r.live="",r.stale=!0))}async function GG(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 At(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
|
|
262
|
+
`)return;let l=o.data+o.separator+r.prefix;await t({...WG(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 M2e(e){Tu.delete(e)}var j6=new WeakMap,T2e=64*1024;function KG(e,t,r,n,a,o){let l=j6.get(e);if(l&&l.tail===r&&l.current()&&n()&&l.chars+t.length<=T2e)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()=>{j6.get(e)===c&&j6.delete(e);try{if(!n())return;await new Promise((d,f)=>{try{e.write(c.chunks.join(""),d)}catch(h){f(h)}}),n()&&a()}finally{for(let d of c.consumed)try{d()}catch{}}}),j6.set(e,c),c.tail}fo.subscribe(()=>{m.terminal&&(m.terminal.options.theme=Sc())});function GE(e){m.workingDir=e;try{localStorage.setItem("wand-working-dir",e)}catch{}j2e(e)}function j2e(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 At(t)}).catch(function(t){console.warn("[wand] \u8BB0\u5F55\u6700\u8FD1\u8DEF\u5F84\u5931\u8D25\uFF1A"+ei(t,"\u672A\u77E5\u9519\u8BEF"))})}function by(e,t){var r=m.sessions.find(function(a){return a.id===m.selectedId});if(r){var n=r[e];if(!n){Qe("\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9\u3002","error");return}AX(String(n),null,function(){Qe(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 Ns(){var e=document.getElementById("terminal-jump-bottom"),t=!!m.selectedId&&m.currentView==="terminal"&&!m.terminalAutoFollow&&!s$();m.showTerminalJumpToBottom=t,e&&e.classList.toggle("visible",t);var r=document.getElementById("output");r&&r.classList.toggle("has-jump-btn",t)}function s$(){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 l$(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 _1(){m.terminalAutoFollow=!1,m.terminalProgrammaticScrollUntil=0,Ns()}function Dl(e){if(m.terminal){var t=e==="force";if(t){m.terminalAutoFollow=!0,l$(!1),Ns();return}if(!m.terminalAutoFollow){Ns();return}l$(!1),Ns()}}function ZU(){if(!A9){var e=typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):function(t){return window.setTimeout(t,16)};A9=e(function(){A9=0,Dl()})}}function J6(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;GG(t,async function(r){return m.terminal!==e||m.selectedId!==t?!1:(xE(t,r,m.terminalOutput,!0),await m.terminalWriteQueue,m.terminal===e&&m.selectedId===t)})}}function _2e(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 x=getComputedStyle(e).getPropertyValue("--term-row-height").trim(),w=parseFloat(x);return w>0?w:16}function f(){try{return!!t.element&&t.element.classList.contains("enable-mouse-events")}catch{return!1}}function h(v,y){var x=t.cols||80,w=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(x,Math.max(1,Math.floor((y.clientX-D.left)/(D.width/x))+1)),F=Math.min(w,Math.max(1,Math.floor((y.clientY-D.top)/(D.height/w))+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,x=0;x<v.touches.length;x++)if(v.touches[x].identifier===r){y=v.touches[x];break}if(y){v.cancelable&&v.preventDefault();var w=y.clientY-n;if(n=y.clientY,w!==0){l+=Math.abs(w);var k=t.buffer.active.type==="alternate";if(k){var F=B2e(-w,c,Date.now());if(F!==0){var C=f()?h(F,y):gB(F);C&&N1(C)}return}o-=w;var D=Math.trunc(o/a);D!==0&&(o-=D*a,t.scrollLines(D)),l>8&&(_1(),w>0&&J6(t))}}}},{passive:!1});function g(){r=null}e.addEventListener("touchend",g,{passive:!0}),e.addEventListener("touchcancel",g,{passive:!0})}function N2e(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 w=Jo();if(w){var k=w.scrollHeight,F=w.clientHeight;if(k<=F){t.classList.remove("visible");return}var C=r.clientHeight,D=Math.max(28,F/k*C),S=k-F,A=w.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(w){if(w.target!==n){w.preventDefault();var k=Jo();if(k){var F=r.getBoundingClientRect(),C=(w.clientY-F.top)/F.height,D=k.scrollHeight-k.clientHeight;k.scrollTop=C*D}}});var f=0,h=0;n.addEventListener("mousedown",function(w){w.preventDefault(),w.stopPropagation(),m.terminalScrollbarDragging=!0,n.classList.add("dragging"),f=w.clientY;var k=Jo();h=k?k.scrollTop:0,document.addEventListener("mousemove",g),document.addEventListener("mouseup",v)});function g(w){w.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=w.clientY-f,$=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(w){if(w.touches.length===1){w.stopPropagation(),m.terminalScrollbarDragging=!0,n.classList.add("dragging"),f=w.touches[0].clientY;var k=Jo();h=k?k.scrollTop:0,document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",x),document.addEventListener("touchcancel",x)}},{passive:!1});function y(w){if(w.touches.length===1){w.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=w.touches[0].clientY-f,$=j/I*S;k.scrollTop=h+$}}}}}function x(){m.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",x),document.removeEventListener("touchcancel",x),o()}t.addEventListener("mouseenter",function(){a()}),t.addEventListener("mouseleave",function(){m.terminalScrollbarDragging||o()}),c()}var P2e=150,R2e=30,O2e=160*1024,z2e=192*1024,A9=0,L2e=120,H2e=120,q2e=800,W2e=1500,U2e=5e3,V2e=3e3;function KE(e){return m.terminal?(m.terminal.refresh(0,Math.max(0,m.terminal.rows-1)),!0):!1}function G2e(e){m.softResyncTimer&&clearTimeout(m.softResyncTimer),m.softResyncTimer=setTimeout(function(){m.softResyncTimer=null,KE()},typeof e=="number"?e:0)}function K1(e){return!e||e.length<=z2e?e:e.slice(-O2e)}function XG(e){return!m.ws||m.ws.readyState!==WebSocket.OPEN?!1:(m.ws.send(JSON.stringify(e)),!0)}function N1(e,t){return!m.selectedId||!e||m.terminalRestoring?!1:XG({type:"pty_input",sessionId:m.selectedId,data:e,shortcutKey:t,userInput:m.terminalInteractive===!0})}function JU(e,t){!e||!(t>0)||XG({type:"pty_ack",sessionId:e,bytes:t})}var vB=0;function yE(e,t){var r=typeof e=="number"?e:Date.now(),n=r+(typeof t=="number"?t:W2e);return new Promise(function(a){(function o(){var l=Date.now(),c=vB,d=c>r?Math.max(c+H2e,r+L2e):r+q2e;if(l>=d||l>=n){a(null);return}setTimeout(o,Math.max(10,Math.min(60,d-l)))})()})}function K2e(e){var t=Date.now(),r=t+V2e,n=t+(typeof e=="number"?e:U2e);return new Promise(function(a){(function o(){var l=Date.now();if(l>=n){a(null);return}if(l>=r&&vB>t){yE(l).then(function(){a(null)});return}setTimeout(o,50)})()})}function wE(e,t,r,n){if(!e||t==null||t==="")return r&&n&&JU(n,r),Promise.resolve();var a=String(t);vB=Date.now();var o=m.terminalWriteGeneration||0,l=m.terminalWriteQueue||Promise.resolve();return m.terminalWriteQueue=KG(e,a,l,function(){return e===m.terminal&&o===(m.terminalWriteGeneration||0)},function(){m.terminalAutoFollow!==!1&&l$(!1)},function(){r&&n&&JU(n,r)}),m.terminalWriteQueue}function X2e(){m.terminal&&(m.terminal.reset(),m.terminal.clear())}function u$(e,t){return new Promise(function(r){if(!t){r(null);return}e.write(t,function(){r(null)})})}function xE(e,t,r,n=!1){if(!t||t.version!==1)return!1;if(e&&!n){var a=UG(e,t);m.terminalStatesBySession[e]=t,a?t=a:VG(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,f=Jo(),h=Math.max(0,o.buffer.active.baseY-o.buffer.active.viewportY);!Number.isFinite(h)&&f&&(h=f.scrollHeight-f.clientHeight-f.scrollTop),m.terminalRestoring=!0;try{if(o.reset(),o.clear(),t.cols>0&&t.rows>0&&o.resize(t.cols,t.rows),await u$(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 u$(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()),Ns()}finally{o===m.terminal&&(m.terminalRestoring=!1)}o===m.terminal&&l===m.terminalRestoreGeneration&&vy(o.cols,o.rows)}}),!0}function oy(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||""),f=!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{X2e(),await u$(h,n)}finally{h===m.terminal&&(m.terminalRestoring=!1)}}}),f=!!n||c}else if(n.startsWith(d)){var v=n.slice(d.length);v&&(wE(m.terminal,v),f=!0)}else return!1;return m.terminalSessionId=a,m.terminalOutput=n,o.scroll!==!1&&f&&Dl("output"),c&&vy(m.terminal.cols,m.terminal.rows),f}var _6=!1,$u=null,Ms=null;function QG(e,t){let r=e.parentElement;if(!r||!t&&e.offsetWidth>0&&e.offsetHeight>0)return function(){};let n=[],a=[],o=[],l=function(f,h,g){o.push({node:f,property:h,value:f.style.getPropertyValue(h),priority:f.style.getPropertyPriority(h)}),f.style.setProperty(h,g,"important")},c=function(f){if(!(f>0))return;let h=document.createElement("div");h.dataset.terminalCreationSpace="true",Object.assign(h.style,{height:`${f}px`,flexShrink:"0",visibility:"hidden"}),n.push(h),r.insertBefore(h,e)},d=function(){try{for(let f of a)f()}finally{for(let f of n)f.remove();for(let f of o.reverse())f.value?f.node.style.setProperty(f.property,f.value,f.priority):f.node.style.removeProperty(f.property)}};try{if(l(e,"display","flex"),l(e,"visibility","hidden"),t&&!document.documentElement.classList.contains("is-wand-embed-terminal")){let f="terminal-creation-measurement",h=QV({...m,selectedId:f,currentTask:null,gitStatus:null,currentView:"terminal",sessions:[{id:f,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)}]},vG()),g={id:f,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"),x=v?.clientWidth||r.clientWidth,w=h.viewport.mobile?E2e(h,x):t.workspaceTaskId?k2e({mobile:!1,taskName:Wr.getSnapshot().taskName,session:g},x):C2e({mobile:!1,session:g},x),k=v||y;k?(l(k,"box-sizing","border-box"),l(k,"height",`${w}px`),l(k,"min-height",`${w}px`),l(k,"max-height",`${w}px`)):c(w);for(let F of r.querySelectorAll(".workspace-mobile-navigation, .workspace-window"))l(F,"display","none")}for(let f of Array.from(r.children))if(!(!(f instanceof HTMLElement)||f===e)&&((f.id==="chat-output"||f.id==="blank-chat")&&l(f,"display","none"),f.classList.contains("input-panel"))){if(document.documentElement.classList.contains("is-wand-embed-terminal")&&document.documentElement.classList.contains("is-wand-native-input"))continue;getComputedStyle(f).display==="none"&&(l(f,"display","block"),l(f,"visibility","hidden")),t&&(l(f,"visibility","hidden"),a.push(S2e(f)))}}catch(f){throw d(),f}return d}function Q2e(e){let t=document.getElementById("output");if(!t||!m.terminal)return null;let r=QG(t,e);try{return MG(m.terminal)}finally{r()}}function Ps(e){if(!e?.prepare&&Dr.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(_6||$u===m.selectedId)return;_6=!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),tp().then(()=>{_6=!1,$u=null,Ps(e)}).catch(()=>{if(_6=!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),L1(A),I.querySelector("button")?.addEventListener("click",()=>{$u=null,Ps()})}});return}m.terminalInitRetries=0,m.terminalInitializing=!0,t.querySelector("[data-terminal-load-state]")?.remove(),L1(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),f=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,x=!1;let w={wrap:c,release:function(){if(x)return;x=!0;let D=Ms===w;if(D&&(Ms=null),v&&m.terminal===v){try{gy()}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=w;let k=function(D){let S=Ms===w||v&&m.terminal===v;if(w.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),L1(t),I.querySelector("button")?.addEventListener("click",()=>{$u=null,Ps()})}}};try{v=new XTermLib.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:!1,fontFamily:f,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!==w||!c.isConnected||document.getElementById("output")!==t||!e?.prepare&&Dr.getSnapshot().active===!0){w.release();return}let D=e?.prepare?QG(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 R=v.buffer.active.getLine(q),W=R?R.translateToString(!0):"",z=[],Q=/https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?(?:\/[^\s]+)?/gi,K;(K=Q.exec(W))!==null;){var Z=K.index+1,T=K.index+K[0].length;z.push({text:K[0],range:{start:{x:Z,y:q},end:{x:T,y:q}},activate:function(J,se){iy(se)}})}for(var U=/(^|[\s(\['"])(\/[^\s]+?\.(?:html?|\/))(?=$|[\s)\]'"])/gi;(K=U.exec(W))!==null;){var X=K[2],Y=K.index+K[1].length+1,re=K.index+K[1].length+X.length;z.push({text:X,range:{start:{x:Y,y:q},end:{x:re,y:q}},activate:function(J,se){iy(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"&&dy())return!0;let R=WE(BE(q),ry(m.selectedId,{ctrl:q.ctrlKey,shift:q.shiftKey,alt:q.altKey}));return R===null?!0:(q.preventDefault(),N1(R,L.ctrl&&q.key.length===1?"ctrl_"+q.key.toLowerCase():BE(q)),!1)});var A={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},I={accumulatedPixels:0,lastEventAt:0},j={accumulatedPixels:0};zG(c,function(q){Ip(q*.25)}),c.addEventListener("wheel",function(q){if(q.ctrlKey||q.metaKey){q.preventDefault(),q.stopPropagation();var L=OG(q,j);L!==0&&Ip(L*.25);return}if(!(Math.abs(q.deltaY)<=Math.abs(q.deltaX))){if(q.preventDefault(),q.stopPropagation(),v.buffer.active.type==="alternate"){var R=Jo(),W=LG(q,A,R?R.clientHeight:v.rows*H()),z=gB(W);z&&N1(z);return}q.deltaY<0&&_1();var Q=HG(q,I,H(),v.rows*H());Q!==0&&v.scrollLines(Q)}},{capture:!0,passive:!1});var $=c.querySelector(".xterm-helper-textarea");$&&($.readOnly=vd()?!0:!m.terminalInteractive),Uke(),IE(),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){N1(q)}),v.onBinary(function(q){m.terminalInteractive&&N1(q)}),v.onResize(function(q){vy(q.cols,q.rows)}),m.terminalAutoFollow=!0;var N=Jo();if(N&&(m.terminalViewportScrollHandler=function(){if(Date.now()<m.terminalProgrammaticScrollUntil){Ns();return}s$()?m.terminalAutoFollow=!0:_1(),Ns(),J6(v)},N.addEventListener("scroll",m.terminalViewportScrollHandler,{passive:!0})),m.terminalWheelHandler=function(q){q.deltaY<0&&v.buffer.active.type==="normal"&&(_1(),J6(v))},t.addEventListener("wheel",m.terminalWheelHandler,{capture:!0,passive:!0}),v.onScroll(function(){Date.now()<m.terminalProgrammaticScrollUntil||(s$()?m.terminalAutoFollow=!0:m.terminalAutoFollow&&_1(),Ns(),J6(v))}),N2e(t),_2e(c,v),m.selectedId){var P=m.sessions.find(function(q){return q.id===m.selectedId}),O=P&&m.terminalStatesBySession[P.id],V=P&&(P.terminalState||O);P&&!xE(P.id,V,P.output||"")&&oy(P.id,P.output||"",{mode:"replace",scroll:!1})}else wE(v,`\u70B9\u51FB\u4E0A\u65B9\u300C\u65B0\u5BF9\u8BDD\u300D\u5F00\u59CB\u4F60\u7684\u7B2C\u4E00\u6B21\u5BF9\u8BDD\u3002\r
|
|
263
|
+
`);m.terminalClickHandler=function(q){if(!dy()){if(vd()){IE();return}m.terminalInteractive?v.focus():Ml(q)}},t.addEventListener("click",m.terminalClickHandler),Ns(),d2e(),f2e(),p2e(),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===w&&(Ms=null)}finally{D()}}).catch(k)}catch(D){k(D)}}function Y2e(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 Z2e(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"?Y2e(e.stats,t.stats):!1}var J2e=class extends Us{constructor(){super(Z2e)}},U0=new J2e,e6e=B(tr(),1);function yy(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,e6e.flushSync)(r):r()}function t6e(e){return!e||e.autoApproveHidden?{visible:!1,enabled:!1}:{visible:!0,enabled:e.autoApproveEnabled}}function r6e(e){return e&&e.total>0?e:null}function n6e(e){let t=e.resolve();yy({selector:"[data-composer-badge-host]",store:U0,build(r,n){let a=r.dataset.composerBadgeHost,o=a||`composer-badge-${n}`;if(a==="auto-approve"){let{visible:l,enabled:c}=t6e(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=r6e(t?.approvalStats);return r.classList.toggle("hidden",!l),{key:o,kind:"approval-stats",target:r,stats:l}}return null}})}function YG(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 a6e(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(`
|
|
264
|
+
`)[0].trim();return c.slice(0,100)}}}return""}function i6e(e,t){let r=m.sessions.find(n=>n.id===e);r&&(r.output=K1((r.output||"")+t))}function ZG(e,t){let r=m.sessions.find(n=>n.id===e);r&&(r.output=K1(t))}var on=new Map,bB=new Map,Rs=new Set,c$=new Set;function _0(e){for(let t of Rs){let r=on.get(t),n=gG(t,e);r&&n&&(r.terminal.options.disableStdin=n!=="\u5DF2\u8FDE\u63A5")}for(let t of c$)t(e)}function o6e(e){return c$.add(e),()=>{c$.delete(e)}}function s6e(e,t){t?Rs.add(e):Rs.delete(e)}function eV(e){return Rs.has(e)}function l6e(e){on.get(e)?.terminal.focus()}function u6e(e){hd({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function JG(e){return Math.round(Math.max(.5,Math.min(2,e))*4)/4}function yB(){return m.ws&&m.ws.readyState===WebSocket.OPEN?m.ws:null}function hd(e){let t=yB();t&&t.send(JSON.stringify(e))}function c6e(){return(typeof getComputedStyle=="function"?getComputedStyle(document.documentElement).getPropertyValue("--term-font-family").trim():"")||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}function d$(e=Number(m.terminalScale||1)){let t=m.terminalBaseFontSize||13;return Math.max(8,Math.round(t*e))}function $9(e,t){if(!on.get(e)?.restoring){if(Rs.has(e)&&!yB()){_0({sessionId:e,type:"pty_error"});return}hd({type:"pty_input",sessionId:e,data:t,userInput:Rs.has(e)||m.terminalInteractive===!0})}}function eK(e,t,r){let n=on.get(e);if(n?.restoring||!yB())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 X1(e){if(e.disposed||e.restoring||Rs.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&&eK(e.sessionId,t,r)}function f$(e){requestAnimationFrame(()=>{X1(e),requestAnimationFrame(()=>X1(e))}),window.setTimeout(()=>X1(e),120)}function wp(e){return bB.get(e)??JG(Number(m.terminalScale||1))}function sy(e,t){let r=JG(t);bB.set(e,r);let n=on.get(e);return!n||n.disposed||(n.terminal.options.fontSize=d$(r),f$(n)),r}fo.subscribe(()=>{for(let e of on.values())e.disposed||(e.terminal.options.theme=Sc())});function R0(e){return on.has(e)}function d6e(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 XE(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 f$(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:Rs.has(e),fontFamily:c6e(),fontSize:d$(wp(e)),lineHeight:1.25,scrollback:5e3,theme:Sc()});o=d;let f=new n.FitAddon;l=f;let h=null;try{n.Unicode11Addon&&(h=new n.Unicode11Addon,d.loadAddon(h),d.unicode.activeVersion="11")}catch{}d.loadAddon(f),d.open(a);try{md(d,f)}catch{}d.onData(S=>$9(e,S)),d.onBinary(S=>{(Rs.has(e)||m.terminalInteractive)&&$9(e,S)}),d.onResize(S=>eK(e,S.cols,S.rows));let g=new ResizeObserver(()=>{let S=on.get(e);S&&X1(S)});c=g,g.observe(t);let v={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},y={accumulatedPixels:0,lastEventAt:0},x=()=>{let S=on.get(e);!S||S.autoFollow||S.disposed||d.buffer.active.type!=="normal"||d.buffer.active.viewportY>12||GG(e,async A=>on.get(e)!==S?!1:(EE(e,A,"",!0),await S.writeQueue,on.get(e)===S))},w=()=>{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,d$(wp(e))*1.25)},k={accumulatedPixels:0};zG(a,S=>{sy(e,wp(e)+S*.25)}),a.addEventListener("wheel",S=>{if(S.ctrlKey||S.metaKey){S.preventDefault(),S.stopPropagation();let I=OG(S,k);I!==0&&sy(e,wp(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=LG(S,v,t.clientHeight||d.rows*w()),j=gB(I);j&&$9(e,j);return}if(S.deltaY<0){let I=on.get(e);I&&(I.autoFollow=!1)}let A=HG(S,y,w(),t.clientHeight||d.rows*w());if(A!==0&&d.scrollLines(A),S.deltaY<0&&x(),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:f,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 EE(e,C?.terminalState??D,C?.output||"")||eE(e,C?.output||""),hd({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}}),f$(F),!0}catch(d){if(on.has(e))tK(e);else{c?.disconnect();try{l?.dispose?.()}catch{}try{o?.dispose?.()}catch{}a.remove()}throw d}}function f6e(){for(let e of on.keys())hd({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function p6e(e,t,r){i6e(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=KG(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 eE(e,t){ZG(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 EE(e,t,r="",n=!1){if(!t||t.version!==1)return!1;if(e&&!n){let l=UG(e,t);m.terminalStatesBySession[e]=t,l?t=l:VG(e,t)}n||ZG(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 f of d){if(a.disposed||o!==a.restoreGeneration)return;if(f?.type==="resize"&&f.cols>0&&f.rows>0)try{a.terminal.resize(f.cols,f.rows)}catch{}else f?.type==="data"&&await p$(a,String(f.data||""),o)}if(a.disposed||o!==a.restoreGeneration)return;a.lastSize=`${a.terminal.cols}x${a.terminal.rows}`;try{a.container.clientWidth!==0&&a.container.clientHeight!==0&&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&&X1(a)}),!0}function V0(e){Rs.has(e)||tK(e)}function tK(e){bB.delete(e),M2e(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 wy(){for(let e of[...on.keys()])Rs.has(e)||V0(e)}ixe({mount:XE,dispose:V0,retain:s6e,focus:l6e,reconnect:u6e,observe:o6e});var m$=!1;function m6e(){m$=!1}function rK(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}function N6(e,t){if(e){m.turnActiveBySession||(m.turnActiveBySession={});var r=m.turnActiveBySession[e];m.turnActiveBySession[e]=t,r===!0&&!t&&wK()}}function h$(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 P6(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 nK(){oK(),_6e(),xEe(),g6e(),!QE()&&(m.pollTimer=setInterval(Tl,1600))}var h6e=3e4,Q1=null;function g6e(){Q1===null&&(Q1=setInterval(function(){var e=document.querySelectorAll(".session-time");e.length>0&&N0()},h6e))}function v6e(){Q1!==null&&(clearInterval(Q1),Q1=null)}function wB(){m.wsReconnectTimer&&(clearTimeout(m.wsReconnectTimer),m.wsReconnectTimer=null)}var b6e=1e4,y6e=4e4;function w6e(){aK(),m.wsHeartbeatCheckTimer=setInterval(iK,b6e)}function aK(){m.wsHeartbeatCheckTimer&&(clearInterval(m.wsHeartbeatCheckTimer),m.wsHeartbeatCheckTimer=null)}function iK(){if(!(!m.ws||m.ws.readyState!==WebSocket.OPEN)&&m.lastWsMessageAt){var e=Date.now()-m.lastWsMessageAt;e>y6e&&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,QE(e)}function tV(){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&&QE("backoff")},r)}}function QE(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,_0({type:"connected"}),m.lastWsMessageAt=Date.now(),m.wsReconnectAttempts=0,wB(),m.lastSeqBySession={},m.chatResyncPendingBySession={},m$&&(Qb(),gu(),gi({skipSelectedOutputReload:!0})),m$=!0,w6e(),pk(m.selectedId),f6e(),Zke(),ay("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"){_0(o),Qe("\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){_0(o),h$(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){h$(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],_0(o),x6e(o),o.type==="init"&&o.sessionId&&Sxe(o.sessionId)}catch{}}},n.onclose=function(){m.ws===n&&(m.ws=null,m.wsConnected=!1,_0({type:"disconnected"}),aK(),tV())},n.onerror=function(){m.ws===n&&(mu("websocket_error",new Error("WebSocket transport error")),n.close())},!0}catch(a){return mu("websocket_error",a),tV(),!1}}function x6e(e){switch(e.type){case"output":if(e.sessionId&&typeof e.data?.chunk=="string"&&I2e(e.sessionId,e.data.chunk),e.data&&e.sessionId&&Object.prototype.hasOwnProperty.call(e.data,"isResponding")&&N6(e.sessionId,!!e.data.isResponding),e.data&&e.sessionId&&e.data.structuredState&&N6(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(Q){return Q.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,f=e.data.lastMessage,h=m.chatResyncPendingBySession?.[e.sessionId];h||!Number.isInteger(l)||!(l===d&&o.length>0||l===d+1)?h$(e.sessionId):(l===d+1?o.push(f):o[o.length-1]=Dxe(o[o.length-1],f,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(f.content)?f.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(Q){return Q.id===e.sessionId});v&&!!v.permissionBlocked!=!!e.data.permissionBlocked&&(nr(r,"latest"),e.sessionId===m.selectedId&&ld())}}else if((r.output!==void 0||r.messages||t||e.data.permissionBlocked!==void 0||r.title||r.description||r.titleGenerating!==void 0)&&(nr(r,"latest"),n&&N0(),e.sessionId===m.selectedId)){var y=m.sessions.find(function(Q){return Q.id===e.sessionId})||r;P6(e.sessionId),ld(),y.sessionKind==="structured"||e.data.sessionKind==="structured"?sa():dd()}}e.sessionId===m.selectedId&&m.terminal&&e.data&&eV(e.sessionId)&&(e.data.chunk&&gV(e.sessionId)?(wE(m.terminal,String(e.data.chunk)),m.terminalOutput=K1((m.terminalOutput||"")+String(e.data.chunk)),ZU()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&oy(e.sessionId,e.data.output||"",{mode:"append"})),e.sessionId===m.selectedId&&m.terminal&&e.data&&!R0(e.sessionId)?e.data.chunk&&gV(e.sessionId)?(m.terminalLiveStreamSessions[e.sessionId]=!0,wE(m.terminal,e.data.chunk,e.ptyBytes,e.sessionId),m.terminalSessionId=e.sessionId,e.data.output?m.terminalOutput=K1(String(e.data.output)):m.terminalOutput=K1((m.terminalOutput||"")+String(e.data.chunk)),ZU()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&oy(e.sessionId,e.data.output||"",{mode:"append"}):e.data&&R0(e.sessionId)?e.data.chunk?p6e(e.sessionId,String(e.data.chunk),e.ptyBytes):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")?(eE(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?nr(e.data):nr({id:e.sessionId,status:"running"}),N0(),ho();break;case"ended":{wK();var x=e.data&&e.data.status?e.data.status:"exited",w=e.data&&Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")?!!e.data.permissionBlocked:!1,k={id:e.sessionId,status:x,permissionBlocked:w};for(let Q of["completionRevision","viewedCompletionRevision"])typeof e.data?.[Q]=="number"&&(k[Q]=e.data[Q]);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),nr(k,"latest"),typeof e.data?.completionRevision=="number"&&ho(),m.currentView==="terminal"&&_E(m.sessions.find(Q=>Q.id===e.sessionId)),e.sessionId===m.selectedId&&(P6(e.sessionId),dd(!0));var F=m.sessions.find(function(Q){return Q.id===e.sessionId}),C=e.data&&e.data.exitCode,D=C!=null&&C!==0,S=F&&F.summary||"",A=F?a6e(F):"",I=D?"\u4EFB\u52A1\u5F02\u5E38\u7ED3\u675F":"\u4EFB\u52A1\u5DF2\u5B8C\u6210",j="";S?(j=S,A&&!D&&(j+=`
|
|
265
|
+
`+A)):j=F&&F.command||e.sessionId,sEe(e.sessionId,I,j),gK(e.sessionId),x$(),(e.sessionId!==m.selectedId||document.hidden)&&y$({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(Q){return Q.id===e.sessionId}),N=e.sessionId===m.selectedId?m.sessions.find(function(Q){return Q.id===m.selectedId}):null,P=!!($&&$.sessionKind==="structured"||N&&N.sessionKind==="structured");P&&e.sessionId===m.selectedId?(mV(),jE(e.sessionId)):P||(m.structuredInputQueue=[],jE(m.selectedId),fd()),e.sessionId===m.selectedId&&(P||Bp(!1),m.currentTask=null,ld()),e.sessionId===m.selectedId&&$y(),N0(),JE(),e.sessionId===m.selectedId&&(P||Pu(e.sessionId));break}case"init":if(e.sessionId===m.selectedId&&e.data){m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null),nr(e.data,"latest"),P6(e.sessionId),sa(!0),ld(),Sl();var O=e.data.output||"";eV(e.sessionId)&&(xE(e.sessionId,e.data.terminalState,O)||rV(O,e.sessionId,"replace")),R0(e.sessionId)?EE(e.sessionId,e.data.terminalState,O)||eE(e.sessionId,O):xE(e.sessionId,e.data.terminalState,O)||(rV(O,e.sessionId,"replace"),ay("init"))}else if(e.data&&R0(e.sessionId)){nr(e.data,"latest");var V=e.data.output||"";EE(e.sessionId,e.data.terminalState,V)||eE(e.sessionId,V)}e.data&&e.data.structuredState&&e.data.structuredState.inFlight===!0&&$E(e.sessionId);break;case"usage":break;case"task":e.sessionId===m.selectedId&&(m.currentTask=e.data||null,ld()),iEe(e.sessionId,e.data||null),E$(e.sessionId),N0();break;case"status":if(e.sessionId&&e.data){var H={id:e.sessionId};for(let K of["completionRevision","viewedCompletionRevision"])typeof e.data[K]=="number"&&(H[K]=e.data[K]);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(K){return K.id===e.sessionId}),L=q&&(q.summary||q.command)||e.sessionId,R=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+=`
|
|
266
|
+
`+R+" \xB7 "+W:z+=`
|
|
267
|
+
`+R,oEe(e.sessionId,z),e.sessionId!==m.selectedId&&y$({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&&N6(e.sessionId,H.structuredState.inFlight===!0),H.structuredState&&H.structuredState.inFlight===!0&&$E(e.sessionId),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&N6(e.sessionId,!!e.data.ptyBusy),Array.isArray(e.data.messages)&&(H.messages=e.data.messages,["messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"].forEach(function(K){typeof e.data[K]=="number"&&(H[K]=e.data[K])})),nr(H,"latest"),typeof e.data.completionRevision=="number"&&(ho(),m.currentView==="terminal"&&_E(m.sessions.find(K=>K.id===e.sessionId))),n&&N0(),E$(e.sessionId),x$(),e.sessionId===m.selectedId&&(ld(),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&&mV(),P6(e.sessionId),dd()))}break;case"notification":e.data&&(e.data.kind==="models"?CX():e.data.kind==="update"?hK(e.data.current||"-",e.data.latest||"-"):e.data.kind==="auto-update-start"?pEe(e.data.current||"-",e.data.latest||"-",e.data.previousInstanceId||null):e.data.kind==="auto-update-restart"?uy(e.data.previousInstanceId||null,e.data.latest||null):e.data.kind==="restart"?uy():e.data.kind==="conversation-session-preview"&&typeof e.data.sessionId=="string"&&typeof e.data.conversationId=="string"&&typeof e.data.preview?.text=="string"?t7(e.data):e.data.kind==="conversations-changed"?H2({runId:"",taskId:""}):e.data.kind==="ai-team-run"&&typeof e.data.runId=="string"?H2({runId:e.data.runId,taskId:String(e.data.taskId||"")}):e.data.kind==="ai-team-definition"&&typeof e.data.teamId=="string"?Vb(e.data.teamId):e.data.kind==="silicon-employee-definition"&&typeof e.data.employeeId=="string"?gu(e.data.employeeId):e.data.kind==="task-retention"?(ho(),gi({skipSelectedOutputReload:!0})):e.data.kind==="ai-team-step-live"&&typeof e.data.runId=="string"&&aA({runId:e.data.runId,taskId:String(e.data.taskId||""),steps:Array.isArray(e.data.steps)?e.data.steps:[]}));break}}function ld(){ja("task:update"),Sl()}function Sl(){var e=m.sessions.find(function(t){return t.id===m.selectedId});n6e({resolve:function(){return e?{sessionId:e.id,autoApprovePending:rE.has(e.id),permissionPending:tE.has(e.id),permission:YG(e),autoApproveHidden:g8e(e),autoApproveEnabled:!!e.autoApprovePermissions,approvalStats:e.approvalStats||null}:null},onToggleAutoApprove:function(t){k6e(t)},onPermissionAction:function(t,r,n){E6e(t,r,n)}})}var tE=new Set;async function E6e(e,t,r){if(e!==m.selectedId||tE.has(e))return;let n=m.sessions.find(function(c){return c.id===e}),a=YG(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");tE.add(e),Sl();try{let c=await rK(l,{method:"POST",credentials:"same-origin",...r==="approve-turn"?{headers:{"content-type":"application/json"},body:JSON.stringify({resolution:"approve_turn"})}:{}}),d=await At(c);if(d.id!==e)throw new Error("\u6388\u6743\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");nr(d),ld()}catch(c){Qe(ei(c,"\u65E0\u6CD5\u5B8C\u6210\u6388\u6743\u64CD\u4F5C\u3002"),"error")}finally{tE.delete(e),Sl()}}var rE=new Set;async function k6e(e){if(!e||e!==m.selectedId||rE.has(e))return;let t=m.sessions.find(function(r){return r.id===e});if(t){if(t.provider==="codex"){Qe("Codex \u4F1A\u8BDD\u56FA\u5B9A\u4EE5 full-access PTY \u542F\u52A8\uFF0C\u4E0D\u652F\u6301\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002","info");return}rE.add(e),Sl();try{let r=await rK("/api/sessions/"+encodeURIComponent(e)+"/toggle-auto-approve",{method:"POST",credentials:"same-origin"}),n=await At(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");nr(n),m.selectedId===e&&Qe(n.autoApprovePermissions?"\u81EA\u52A8\u6279\u51C6\u5DF2\u5F00\u542F":"\u81EA\u52A8\u6279\u51C6\u5DF2\u5173\u95ED","info")}catch(r){Qe(ei(r,"\u65E0\u6CD5\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002"),"error")}finally{rE.delete(e),Sl()}}}function C6e(){Sl()}function rV(e,t,r){return m.terminal?oy(t||m.selectedId,e,{mode:r||"append"}):!1}function oK(){m.pollTimer&&(clearInterval(m.pollTimer),m.pollTimer=null),EEe(),v6e()}function S6e(e,t){return e.target===t.target&&e.message===t.message}var F6e=class extends Us{constructor(){super(S6e)}},G0=new F6e;function kE(e){m.actionError=e,sK()}function sK(){yy({selector:"[data-composer-action-error-host]",store:G0,flush:!0,build(e){let t=m.actionError;return t?{key:"action-error",target:e,message:t}:null}})}var D6e=B(_(),1),g$=B(tr(),1),A6e=B(si(),1),v$=null,Iu=null;function EB(e){if(Iu)throw new Error("Cannot replace browser shell commands after mount");v$=e}function YE(){return Iu!==null}function $6e(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function B6e(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 f=new Fwe(o,{mount(h){$6e(d,h)}});return n[c]=h=>{h?f.mount(h):f.unmount()},f});return{refs:n,hosts:a}}function I6e(e,t){if(!v$)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,g$.flushSync)(()=>Iu?.store.publish({sync:!0,reason:"legacy:render"})),"updated"}let r=B6e(t()),n=wxe(v$,{batchMs:0});e.replaceChildren(),e.dataset.reactShell="enabled";let a=(0,A6e.createRoot)(e);Iu={app:e,root:a,store:n,hosts:r.hosts};try{(0,g$.flushSync)(()=>a.render(D6e.createElement(gxe,{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 nV(){let e=Iu;if(e){Iu=null,(0,g$.flushSync)(()=>e.root.unmount()),e.store.dispose();for(let t of e.hosts)t.dispose();delete e.app.dataset.reactShell}}function Np(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,Sp(),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||ACe()}window.addEventListener("online",function(){m.isOnline=!0,CE()});window.addEventListener("offline",function(){m.isOnline=!1,CE()});function CE(){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),Qxe(t)}else m.isOnline&&e&&(dB(e),e.remove())}function M6e(){if(!Gc()){var e=document.getElementById("app");e&&fB(e)}}function T6e(){var e=document.getElementById("app");e&&fB(e,"\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u91CD\u8BD5")}function C1(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),j6e(e,r))}}function j6e(e,t){return!m.config||document.hidden?Promise.resolve():(t||iK(),t?xB("resume-force"):(!m.ws||m.ws.readyState!==WebSocket.OPEN&&m.ws.readyState!==WebSocket.CONNECTING)&&QE(),m.selectedId&&xy(m.selectedId,{force:!0}),gi({skipSelectedOutputReload:!0}).catch(function(r){console.error("[wand] foreground sync failed:",e,r)}))}function _6e(){window.__wandForegroundSyncBound||(window.__wandForegroundSyncBound=!0,document.addEventListener("visibilitychange",function(){document.hidden?wB():(C1("visibility"),ay("visibility"))}),window.addEventListener("focus",function(){C1("focus")}),window.addEventListener("pageshow",function(){C1("pageshow")}),window.addEventListener("resume",function(){C1("resume")}),window.addEventListener("wand-android-resume",function(){C1("android-resume",{immediate:!0}),ay("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{CE()}catch{}return}if(t==="available"||t==="changed"||t==="validated"){m.isOnline=!0;try{CE()}catch{}xB("android-network-"+t)}}))}function N6e(){if(Gc())return;let e=Oxe();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,xp(),null;let r=bb();return dwe(),r.catch(function(n){if(uE(),Qb(),n&&typeof n.status=="number"&&n.status>0)return m.loginChecked=!0,xp(),null;throw n})}).then(function(t){t&&(m.config=t,Ay(t),m.loginChecked=!0,requestAnimationFrame(function(){if(m.config===t){try{xp({skipShellChrome:!0})}catch{}nK(),gi({reuseSnapshot:!0,skipSelectedOutputReload:yu()}).then(function(){if(m.config!==t||!e())return;let r=Hn();return r2e(void 0,()=>m.config===t&&e()&&Hn()===r)}),CX(),rEe(),t.updateAvailable&&t.latestVersion&&hK(t.currentVersion||"-",t.latestVersion),pK&&F8e(),w$&&D8e()}}))}).catch(function(){if(uE(),m.loginChecked=!0,!navigator.onLine){var t=document.getElementById("app");t&&fB(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}xp()})}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")||x8e()}},!0);M6e();N6e();function xp(e){if(Gc())return;let t=document.getElementById("app");t&&dB(t);var r=e&&e.skipShellChrome,n=document.getElementById("app");if(n){var a=m.config!==null,o=YE(),l=!a||!o&&!!document.getElementById("output");l&&gy(),!a&&o&&nV(),document.documentElement.classList.add("no-transition"),m.sidebarPinned&&!m.sidebarCollapsed&&!xo()&&(m.sessionsDrawerOpen=!0,Ur("wand-sidebar-open",!0));var c,d=!1;if(a){try{c=I6e(n,R6e)}catch(f){console.error("[wand] React shell mount failed",f),nV(),document.documentElement.classList.remove("no-transition"),T6e();return}d=c==="mounted"}else n.innerHTML=P6e(),d=!0;d&&(Np(),yCe()),Tp(),bX(),mI(X0()),Sl(),sK(),gI(),r||$y(),document.body.offsetHeight,requestAnimationFrame(function(){a&&ma(document.getElementById("input-box")),document.documentElement.classList.remove("no-transition")}),a&&m.selectedId&&m.gitStatusSessionId!==m.selectedId&&xy(m.selectedId),PX()}}function P6e(){return'<div data-login-controls style="height:100%" data-checking="'+!m.loginChecked+'" data-switch-server="'+fX()+'"></div>'}function R6e(){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"><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">'+q9("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">'+q9("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 O6e=B(si(),1),B9=B(Ee(),1),aV=Promise.resolve(),SE=null;function z6e(e){let t=aV.then(()=>new Promise((r,n)=>{$h();let a=document.createElement("div");a.dataset.wandOwnedDialogRoot="",document.body.appendChild(a);let o=document.createElement("div");a.appendChild(o);let l=Gv(),c=l??document.createElement("div");l||(c.className="wand-ui-portals",c.style.zIndex=String(yh.token?.zIndexPopupBase??20010),a.appendChild(c));let d=!1,f=(0,O6e.createRoot)(o,{onUncaughtError:g=>h(void 0,g)}),h=(g,v)=>{d||(d=!0,SE=null,queueMicrotask(()=>{f.unmount(),a.remove(),v?n(v):r(g)}))};SE=()=>{e.dismissable!==!1&&h({dismissed:!0})},f.render((0,B9.jsx)(bh,{container:c,children:(0,B9.jsx)(za,{children:(0,B9.jsx)(Mb,{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 aV=t.then(()=>{},()=>{}),t}function L6e(){return SE?(SE(),!0):!1}var Fp=0,b$=null,Y1=!1;function lK(){let e=window.__wandReactUi;return!e||typeof e.dialog!="function"||typeof e.toast!="function"?null:e}function H6e(e){switch(e){case"warning":case"danger":case"success":case"question":return e;case"error":return"danger";default:return"info"}}function q6e(e){switch(e){case"success":case"warning":case"error":return e;case"danger":return"error";default:return"info"}}function iV(e){switch(e){case"primary":case"outline":case"ghost":case"danger":return e;default:return"secondary"}}function W6e(e){return Array.isArray(e.buttons)&&e.buttons.length>0?e.buttons:[{label:"\u597D",value:!0,kind:"primary",autofocus:!0}]}function U6e(e){return e.cancelValue!==void 0?e.cancelValue:e.input?null:!1}function V6e(){if(typeof document>"u")return null;let e=document.activeElement;return e&&typeof e.focus=="function"?e:null}function G6e(){Y1||(Y1=!0,(typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):e=>setTimeout(()=>e(Date.now()),0))(()=>{if(Y1=!1,Fp>0)return;let e=b$;if(b$=null,!(!e||!e.isConnected||typeof document>"u"||!document.contains(e)))try{e.focus()}catch{}}))}function K6e(){Fp=Math.max(0,Fp-1),Fp===0&&G6e()}function X6e(e){let t=lK();return t?uK(e,t):null}function oV(e){return uK(e,{dialog:z6e})}function uK(e,t){let r=Fp===0&&!Y1?V6e():null,n=W6e(e),a=H6e(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:iV(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 ws.cancelDialogRequest(l),null}return Fp===0&&!Y1&&(b$=r),Fp+=1,c.then(d=>{if(d.dismissed===!0)return U6e(e);let f=d.action.button;return o&&iV(f.kind)==="primary"?d.inputValue??"":f.value}).catch(d=>{throw ws.cancelDialogRequest(l),d}).finally(K6e)}function Q6e(e,t,r){let n=lK();if(!n)return!1;let a={tone:q6e(t),duration:r};try{return n.toast(e,a),!0}catch{return!1}}function Z1(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 cK(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 Qe(e,t){var r=t==="error"||t==="danger",n=r?4e3:2200;Q6e(e,t,n)||y$({title:e,type:r?"warning":t==="success"?"success":"info",duration:n})}function Pp(e){e=e||{};var t=X6e(e);return t?t.catch(function(){return oV(e)}):oV(e)}function Y6e(e,t){return t=t||{},Pp({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 Pp({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 Z6e(e,t,r){return r=r||{},Pp({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=Y6e;window.wandConfirm=kB;window.wandPrompt=Z6e;window.openWandDialog=Pp;window.showToast=Qe;var ju=[],dK=0,J6e=6,eEe=16;function y$(e){if((e.actionLabel||e.playSound)&&vK(),!m.notifBubble)return{dismiss:function(){}};var t=++dK,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),Yxe(a,e);var o={id:t,el:a};ju.push(o),CB();var l=a.querySelector(".notification-bubble-close");if(l&&(l.onclick=function(){P1(t)}),e.actionLabel&&e.action){var c=a.querySelector(".notification-bubble-actions button");c&&(c.onclick=function(){e.action(),P1(t)})}return n>0&&setTimeout(function(){P1(t)},n),{dismiss:function(){P1(t)}}}function P1(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(){dB(n.el),n.el.parentNode&&n.el.parentNode.removeChild(n.el)},300)}}function CB(){for(var e=eEe,t=0;t<ju.length;t++)ju[t].el.style.top=e+"px",e+=ju[t].el.offsetHeight+J6e}try{sV=navigator.userAgent.match(/WandPlatform\/macOS/),I9=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.wandNative||null,sV&&I9&&typeof window.WandNative>"u"&&(window.WandNative={downloadUpdate:function(e,t,r){try{I9.postMessage({type:"downloadUpdate",url:String(e||""),fileName:String(t||"wand-update.dmg"),source:String(r||"local")})}catch{}}})}catch{}var sV,I9,Rp=typeof WandNative<"u"&&typeof WandNative.sendNotification=="function",ly=navigator.userAgent.match(/WandApp\/([^\s]+)/),fK=/WandPlatform\/macOS/.test(navigator.userAgent),tEe=!!ly&&!fK,pK=ly&&tEe?ly[1]:null,w$=ly&&fK?ly[1]:null;function x$(){if(Rp){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 mK(){if(Rp&&typeof WandNative.getPermission=="function")try{return WandNative.getPermission()}catch{}return null}function rEe(){if(Rp){var e=mK();if(e==="default"||e==="denied")try{WandNative.requestPermission()}catch{}return}typeof Notification<"u"&&Notification.permission==="default"&&Notification.requestPermission()}function nEe(e){var t=e||{};return!(t.onlyWhenHidden&&!document.hidden||t.skipWhenSelectedSessionId&&t.skipWhenSelectedSessionId===m.selectedId&&!document.hidden)}function aEe(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 ZE(e,t,r){var n=r||{},a=n.tag||"";if(nEe(n)&&!aEe(a,n.minIntervalMs||0)){if(Rp){var o=mK();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||D8,tag:a||void 0});c.onclick=function(){window.focus(),c.close(),n.onClick&&n.onClick()},setTimeout(function(){c.close()},1e4)}catch{}}}function iEe(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;ZE("\u4EFB\u52A1\u8FDB\u884C\u4E2D",n+`
|
|
268
|
+
`+t.title,{kind:"task",tag:"wand-task-"+e+"-"+t.title,minIntervalMs:9e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==m.selectedId&&In(e)}})}}}function hK(e,t){!m.config||m.config.canManageSettings===!1||(dEe(e||"-",t||"-"),ZE("Wand \u53D1\u73B0\u65B0\u7248\u672C","\u5F53\u524D "+(e||"-")+" \u2192 \u6700\u65B0 "+(t||"-"),{kind:"update",tag:"wand-update",minIntervalMs:3e5}))}function oEe(e,t){ZE("\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 sEe(e,t,r){ZE(t,r,{kind:"task-ended",tag:"wand-ended-"+e,minIntervalMs:1e4,onClick:function(){e!==m.selectedId&&In(e)}})}var Ep={},lEe=30;function lV(e){if(!e)return"";var t=String(e).replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"").trim(),r=t.split(`
|
|
269
|
+
`)[0].trim();return r.length>100&&(r=r.slice(0,100)+"\u2026"),r}function E$(e){!Rp||typeof WandNative.updateSessionProgress!="function"||e&&(Ep[e]&&clearTimeout(Ep[e]),Ep[e]=setTimeout(function(){delete Ep[e],uEe(e)},lEe))}function uEe(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"){gK(e);return}for(var a=null,o="",l="",c=[],d=t.messages||[],f=d.length-1;f>=0;f--){var h=d[f];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=lV(v.text);break}}if(h.role==="user"){var y=h.content.some(function(A){return A&&A.__queued});if(!y)for(var x=0;x<h.content.length;x++){var w=h.content[x];if(w&&w.type==="text"&&w.text&&w.text.trim()){var k=lV(w.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 gK(e){if(!(!Rp||typeof WandNative.clearSessionProgress!="function")){Ep[e]&&(clearTimeout(Ep[e]),delete Ep[e]);try{WandNative.clearSessionProgress(e)}catch{}}}window.handleNativeBack=function(){if(Il.isOpen()||L6e())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(Vc.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&&wV()?(Q0(!1),!0):m.sessionsDrawerOpen&&xo()?(tg(),!0):wV()&&m.selectedId?(m.selectedId=null,xd(),m.sessionsDrawerOpen=!0,Ur("wand-sidebar-open",!0),xp(),!0):!1};function vK(){m.notifSound&&cEe()}function cEe(){try{let a=function(o,l,c){var d=r.createOscillator(),f=r.createGain();d.type="sine",d.frequency.value=o,f.gain.setValueAtTime(0,r.currentTime+l),f.gain.linearRampToValueAtTime(.5*n,r.currentTime+l+.04),f.gain.exponentialRampToValueAtTime(.001,r.currentTime+l+c),d.connect(f),f.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 dEe(e,t){if(m._updateBubbleShown)return;m._updateBubbleShown=!0,vK();var r=++dK,n=document.createElement("div");n.className="notification-bubble update-card",n.setAttribute("data-nid",String(r)),document.body.appendChild(n),Zxe(n,e,t);var a={id:r,el:n};ju.push(a),CB();var o=n.querySelector(".update-card-close");o&&(o.onclick=function(){P1(r),m._updateBubbleShown=!1});var l=n.querySelector("#update-bubble-action"),c=n.querySelector(".update-card-action-label"),d=n.querySelector("#update-card-subtitle"),f=n.querySelector("#update-card-status"),h=n.querySelector("#update-card-progress");function g(w,k){if(f){if(f.textContent=w||"",f.classList.remove("hidden","error","success"),!w){f.classList.add("hidden");return}k&&f.classList.add(k)}}function v(w){d&&(d.textContent=w||"")}function y(w){h&&h.classList.toggle("active",!!w)}function x(w){y(!1),n.classList.remove("is-busy","is-success"),v("\u66F4\u65B0\u672A\u5B8C\u6210"),g(w,"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(w){return At(w)}).then(function(w){if(n.classList.add("is-success"),v((w.message||"\u66F4\u65B0\u5B8C\u6210")+"\uFF0C\u6B63\u5728\u91CD\u542F\u670D\u52A1\u2026"),g(""),c&&(c.textContent="\u6B63\u5728\u91CD\u542F\u2026"),w.detachedUpdate){uy(w.previousInstanceId||null,w.version||null);return}if(w.restartRequired===!1){y(!1),n.classList.remove("is-busy"),l.disabled=!1,c&&(c.textContent="\u5DF2\u5B8C\u6210");return}fEe(x)}).catch(function(w){mu("update_failed",w),x(w instanceof $a?ei(w,"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"):"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u8BD5")})})}function fEe(e){fetch("/api/restart",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(t){return At(t)}).then(function(){uy()}).catch(function(t){if(t instanceof $a&&t.status>0){e(ei(t,"\u91CD\u542F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"));return}uy()})}function uy(e,t){Y5e(e,t)}function pEe(e,t,r){Z5e(e,t,r)}var mEe={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 hEe(e){let t=e.timers??mEe,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 M9=0;function SB(){return M9=Math.max(Date.now(),M9+1),M9}function gEe(){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 nE=null,R6=null,O6=null,aE=null;function vEe(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 bEe(){return hi()}function FB(e){R6?.(),nE=e,R6=V7({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||nE!==e||(t=!0,aE=null,Es.closeIfOpen(),R6?.(),R6=null,nE=null)}}function yEe(e){let t=nE,r=typeof e=="string"?e.trim():"";return!t||!r||Il.isOpen()||!bEe()?!1:(Es.open({path:r,siblings:vEe(t.getSiblings(r))}),!0)}function Op(e){if(!Es.isOpen())return!0;let t=Nf.getSnapshot();return t.saving?!1:t.dirty?(aE=e,O6||(O6=Es.execute({type:"close"}),O6.then(r=>{let n=aE;if(aE=null,O6=null,!(!r||!n))try{n()}catch(a){console.warn("[wand] Failed to continue overlay open intent",a)}})),!1):(Es.closeIfOpen(),!Es.isOpen())}function wEe(){ja("topbar:git")}var DB=hEe({coalesceMs:1200,pollMs:2e4,selectedSessionId:function(){return m.selectedId},hidden:function(){return document.hidden},refresh:function(e){xy(e,{force:!0})}}),AB=gEe(),S1=new Map;function $B(e,t,r){m.gitStatus=t||null,m.gitStatusSessionId=t?e:null,r&&(m.gitStatusLastFetchAt=Date.now()),wEe()}function bK(e,t,r){AB.accept(e,t,r??SB())&&e===m.selectedId&&$B(e,t,!0)}function yK(e){$B(e,e?AB.peek(e):null,!1)}function wK(){DB.schedule()}function xEe(){DB.startPolling()}function EEe(){DB.stop()}function xy(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&&S1.has(e))return S1.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 bK(e,l||{isGit:!1},a),l}).catch(function(){var l=AB.peek(e);return e===m.selectedId&&$B(e,l,!1),null}).finally(function(){S1.get(e)===o&&S1.delete(e)});return S1.set(e,o),o}F7({onOpen:function(){hi(["quickCommit"])},onClose:function(){},onArchived:function(){Tl()},nextStatusRequestTime:SB,onStatusLoaded:function(e,t,r){bK(e,t,r)},toast:function(e,t){Qe(e,t)}});function BB(){if(m.selectedId){var e=m.selectedId,t=function(){hi(["quickCommit"])&&Nc.open({sessionId:e})};Op(t)&&t()}}var kEe=B(si(),1),uV=B(Ee(),1),H0=new Map;function CEe(e){if(!e)return"";let t=e.structuredState,r=xb(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 SEe(){for(let[e,t]of H0)e.isConnected||(t.root.unmount(),H0.delete(e))}function FEe(e,t){SEe();let r=CEe(t),n=H0.get(e);n&&n.lastKey===r||(n?n.lastKey=r:(n={root:(0,kEe.createRoot)(e),lastKey:r},H0.set(e,n)),n.root.render((0,uV.jsx)(za,{children:(0,uV.jsx)(Eb,{activity:t??null})})))}function DEe(e){let t=H0.get(e);t&&(t.root.unmount(),H0.delete(e)),e.replaceChildren()}var AEe=B(si(),1),$Ee=B(tr(),1),cV=B(Ee(),1),z6=new Map;function BEe(e,t,r,n=""){for(let[l,c]of z6)l.isConnected||(c.root.unmount(),z6.delete(l));let a=z6.get(e);if(a&&a.disabled===t&&a.onKey===r&&a.owner===n)return;let o=a?.root??(0,AEe.createRoot)(e);z6.set(e,{root:o,disabled:t,onKey:r,owner:n}),(0,$Ee.flushSync)(()=>o.render((0,cV.jsx)(za,{children:(0,cV.jsx)(NG,{disabled:t,onKey:r,owner:n})})))}var IEe="\x1B[200~",MEe="\x1B[201~";function xK(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`${IEe}${n}${MEe}`}function TEe(e){return e?/^[a-zA-Z0-9_./:@%+,=-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`:""}function jEe(e,t=!0){return xK(TEe(e),t)}function _Ee(e){let t=String(e||"").trim().toLowerCase();return t==="claude"||t==="pi"}var NEe=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i;function EK(e){return e?cy(e.mimeType)||NEe.test(e.savedPath||e.originalName||""):!1}function kK(e,t={}){let r=t.bracketedPaste!==!1,n=_Ee(t.provider),a=[];for(let o of e||[]){let l=typeof o?.savedPath=="string"?o.savedPath:"";if(!l)continue;let c=EK(o);a.push({data:jEe(l,r),shortcutKey:"paste",...c?{image:!0}:{}}),(!c||n)&&a.push({data:" "})}return a}function cy(e){return typeof e=="string"&&e.toLowerCase().startsWith("image/")}function PEe(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 REe(e){if(!e.active()){G1.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()}})}),G1.sync(t)}function OEe(e,t){return e.target===t.target&&e.interactiveVisible===t.interactiveVisible&&e.interactiveOn===t.interactiveOn}var zEe=class extends Us{constructor(){super(OEe)}},K0=new zEe,LEe="[data-composer-popover-host]";function HEe(e){yy({selector:LEe,store:K0,flush:!0,build(t){return{key:"composer-popover-items",target:t,...e.resolve(),onAttach:e.onAttach,onToggleInteractive:e.onToggleInteractive}}})}function qEe(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 WEe(e,t){if(!e)return null;for(var r=0;r<t.length;r++){var n=qEe(e,t[r]);if(n)return n}return null}var gd=null,T9=!1,FE=new Map,DE=new Map;function CK(){gd||T9||(T9=!0,globalThis.__wandImportBrowserModule("843c2750657d433e").then(e=>{gd=e,FE.forEach(t=>e.paintQueueBar(...t)),DE.forEach(t=>e.paintCrossSessionQueue(...t)),FE.clear(),DE.clear()}).catch(()=>{T9=!1}))}function UEe(...e){if(CK(),gd){gd.paintQueueBar(...e);return}FE.set(e[0],e)}function VEe(...e){if(CK(),gd){gd.paintCrossSessionQueue(...e);return}DE.set(e[0],e)}function k$(e){FE.delete(e),DE.delete(e),gd?gd.clearQueueView(e):e.replaceChildren()}function Ui(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}function ma(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"),_p(e);return}var d=e.scrollTop,f=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(f)ME(e);else{var x=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.min(d,x)}else e.scrollTop=0;_p(e)}}var R1=!1;function SK(e){return!e||e.archived?!1:cr(e)?!!(e.structuredState&&e.structuredState.inFlight):e.status==="running"}function FK(){return m.sessions.some(SK)}function GEe(){var e=m.sessions.filter(SK);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 DK(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(`
|
|
270
|
+
`).trim();for(var d=0;d<l.content.length;d++){var f=l.content[d];if(f&&f.type==="tool_result"&&typeof f.content=="string")return f.content.trim()}return""}}return""}function AK(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 KEe(e,t){var r=typeof t=="string"?t.trim():"";if(r&&DK(e)===r)return Qe("\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");nr({id:e.id,queuedMessages:o}),e.id===m.selectedId&&pa();var c=e.title||FG(e.command)||"\u5F53\u524D\u4F1A\u8BDD";return Qe("\u5DF2\u52A0\u5165\u300C"+c+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u3002","info"),Ui("/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(f){throw new Error(f&&f.error||"\u65E0\u6CD5\u6392\u961F\u6D88\u606F\u3002")})}).then(function(d){d&&d.id&&(d=Ja.filter(d,e.id,l),nr(d),d.id===m.selectedId&&pa())}).catch(function(d){var f=AK(e.id,t,a.length,l);f&&nr({id:e.id,queuedMessages:f}),e.id===m.selectedId&&pa(),Qe(d&&d.message||"\u6392\u961F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","error")})}function XEe(e){var t=GEe();if(t&&cr(t)){KEe(t,e);return}if(m.crossSessionQueue.length>=10){Qe("\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()}),Nu(),Al()}function QEe(e){if(R1){m.crossSessionQueue.unshift(e),z9(!!m.pageUnloading)&&Nu(),Al();return}R1=!0,Ui("/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 At(t)}).then(function(t){return R1=!1,ky(t)}).catch(function(t){R1=!1,Qe(t&&t.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),m.crossSessionQueue.unshift(e),z9(!!m.pageUnloading)&&Nu(),Al()})}function YEe(e){var t=m.crossSessionQueue.findIndex(function(n){return n.id===e});if(!(t<0)){var r=m.crossSessionQueue.splice(t,1)[0];Nu(),Al(),Ui("/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 At(n)}).then(function(n){return ky(n)}).catch(function(n){Qe(n&&n.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),m.crossSessionQueue.splice(t,0,r),z9(!!m.pageUnloading)&&Nu(),Al()})}}function ZEe(e){var t=m.crossSessionQueue.findIndex(function(r){return r.id===e});t<0||(m.crossSessionQueue.splice(t,1),Nu(),Al())}function JE(){if(m.config&&m.crossSessionQueue.length!==0&&!FK()&&!R1){var e=m.crossSessionQueue.shift();Nu(),QEe(e),Al()}}function $K(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{JEe()}catch(e){console.error("[wand] cross-session queue render failed:",e)}finally{rke()}}function JEe(){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&&(k$(e),e.remove()),Nu();return}var o=t&&!t.classList.contains("hidden"),l=o?t:a;if(l){var c=o?WEe(l,[r,n]):null;e&&e.parentNode!==l&&(k$(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)),VEe(e,m.crossSessionQueue.map(d=>({id:d.id,text:d.text,age:$K(d.queuedAt)})))}}var eke=5e3,J1=null;function tke(){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=$K(t.queuedAt))}),JE()}function IB(){J1!==null&&(clearInterval(J1),J1=null)}function rke(){if(m.crossSessionQueue.length===0){IB();return}J1===null&&(J1=setInterval(tke,eke))}document.addEventListener("click",function(e){var t=e.target;if(t.closest("#queue-clear-all")){e.preventDefault(),m.crossSessionQueue=[],Nu(),Al();return}var r=t.closest(".queue-item-send-now");if(r){e.preventDefault(),YEe(r.dataset.queueId);return}var n=t.closest(".queue-item-cancel");if(n){e.preventDefault(),ZEe(n.dataset.queueId);return}});function nke(e){e=e||{};var t=document.getElementById("input-box"),r=t?t.value:"",n=r.trim();if(m.selectedId){bk(r,m.selectedId)&&zp(e);return}if(n&&FK()){t&&(t.value=""),_p(t),XEe(n);return}var a=m.chatMode||"managed",o=ts(),l=bd();Ui("/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 At(c)}).then(function(c){return Lp(c.id),!m.selectedId&&t&&(t.value=""),ky(c)}).catch(function(c){Qe(ei(c,l==="codex"?"\u65E0\u6CD5\u542F\u52A8 Codex \u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u542F\u52A8 Claude \u4F1A\u8BDD\u3002"),"error")})}var C$=0;function MB(e){var t=C$,r=document.activeElement;return function(){return m.selectedId===e&&C$===t&&(document.activeElement===r||document.activeElement===document.body)}}function ake(e,t){C$++;var r=m.sessions.find(function(a){return a.id===e}),n=cr(r);n?m.currentView="chat":m.currentView="terminal",n||m.terminal||Ps(),gI(),tk(),Ed(e),t?.focusInput!==!1&&m.terminalInteractive?wd()||PB():t?.focusInput!==!1&&Ml(!0),!n&&r&&Ey(r)&&ike(r,t),n||qi("view-switch",{forceReplay:!0}),ja("session:view")}var L6=null;function ike(e,t){if(!(!e||L6===e.id||!Ey(e))){var r=MB(e.id);L6=e.id,HB(e.id).then(function(n){if(!(!n||m.selectedId!==e.id))return nr(n),vi(),pk(n.id),Pu(n.id).then(function(){m.selectedId===e.id&&(tk(),t?.focusInput!==!1&&r()&&m.terminalInteractive&&!wd()&&PB())})}).finally(function(){L6===e.id&&(L6=null)})}}function oke(e,t,r,n){Lt.edit(e,{restore:{text:t,attachments:r},persist:n}),Ed(e),Ta()}function ske(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 dV(e,t,r){var n=NK(r);if(e&&t){oke(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 zp(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="",jp("",!0),ma(n),oa(a,"interactive_text",l,o).then(function(){return oa("\r","enter_text",l,o)}).catch(function(k){dV(o,a,k)})):oa("\r","enter_text",l,o).catch(function(k){dV(o,"",k)})}var c=document.getElementById("input-box"),d=X0(),f=d&&d.id||m.selectedId,h=m.currentView,g=c?c.value:TX(f),v=Iy(f);if(m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===f||xxe(g,d)||!f||!bk(g,f))return Promise.resolve();var y=Lt.pendingSubmission(f,{text:g,attachments:v});if(y)return y;c&&m.selectedId===f&&(c.value="",ma(c)),Ta(),ske(c,f);var x=MK("\u6B63\u5728\u53D1\u9001\u2026",f,"\u5DF2\u53D1\u9001"),w=Lt.submit(f,g,function(k){var F=k.attachments;return Promise.resolve().then(function(){return F.length?IX(f,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=BV(C)+(D?g:C.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":""),A=null;if(!cr(d)&&C.length){var I=C.filter(function(P){return EK({savedPath:P&&P.savedPath,mimeType:P&&(P.mimeType||P.type),originalName:P&&P.originalName})});if(I.length){var j=C.filter(function(P){return I.indexOf(P)<0}),$=BV(j)+(D?g:j.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":"");A=kK(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(f===m.selectedId&&_X(),cr(d))return uke(S,c,d,{interrupt:t,composerCaptured:!0});var N=A||$ke(d,S);if(m.selectedId!==f)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 Ake(d).then(function(P){if(!P){var O=new Error("\u4F1A\u8BDD\u5C1A\u672A\u51C6\u5907\u597D\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw O.__wandComposerReported=!0,O}if(m.selectedId!==f)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return QK(),Mke(N,"enter_text",A?0:30,h,P.id||f,!!A)})}).then(function(C){return $E(f,x),C})}).catch(function(k){Ed(f),k&&k.__wandComposerReported||Wi(NK(k),f)}).finally(function(){Ta()});return My(),w}var H6={},lke=350;function uke(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&&DK(r)===e.trim())return n.composerCaptured||(t&&r.id===m.selectedId&&(t.value="",ma(t)),RE(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=H6[r.id],f=typeof d=="number"?d:d&&d.at||0,h=typeof d=="number"?e:d&&d.input;if(c&&h===e&&l-f<lke)return Promise.resolve();var g=c?{at:l,input:e}:null;g&&(H6[r.id]=g),r.id===m.selectedId&&jB(!1);var v=o&&a,y=o&&!a,x=Ja.read(r.id),w=-1,k=ik(Array.isArray(r.messages)?r.messages.slice():[]),F;if(y){var C=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(w=C.length,C.push(e),x=Ja.advance(r.id,"local"),F={id:r.id,queuedMessages:C},nr(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)),sa(!0),fd()}r.id===m.selectedId?D$(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):Qe(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});nr({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),QK(),sa(!0),v&&D$("\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="",ma(t)),RE(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 Ui("/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(N){var P=new Error(N&&N.error||"\u65E0\u6CD5\u53D1\u9001\u7ED3\u6784\u5316\u6D88\u606F\u3002");throw P.errorCode=N&&N.errorCode,P.httpStatus=$.status,P})}).then(function($){if($&&$.error)throw new Error($.error);if($&&$.id&&($=Ja.filter($,r.id,x),nr($),$.id===m.selectedId)){var N=m.sessions.find(function(P){return P.id===$.id})||$;m.currentMessages=es(N,Fl(N,$.output,!1)),sa(!0),fd()}}).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):Qe($.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002","warning");return}if(g&&H6[r.id]===g&&delete H6[r.id],y){var N=AK(r.id,e,w,x);if(N&&nr({id:r.id,queuedMessages:N}),r.id===m.selectedId){var P=m.sessions.find(function(q){return q.id===r.id})||r;m.currentMessages=es(P,Fl(P,P.output,!1)),sa(!0),fd()}}else{var O=k.slice(0,-1);nr({id:r.id,status:r.status,messages:O,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),r.id===m.selectedId&&(m.currentMessages=es(Object.assign({},r,{messages:O,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),O),sa(!0))}var V=$&&$.message||"",H=V==="Failed to fetch"||V==="NetworkError when attempting to fetch resource."||V==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(V);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 AE=null,S$="",F1=0,Dp=null,fV=0,F$=0,BK="",iE=new Set;function TB(e){return e==="failed"?gh:hh}function cke(e,t){return!t&&Yh(e).active?"running":"idle"}function dke(){var e=document.getElementById("send-input-button");return e&&e.getAttribute("data-phase")||"idle"}function IK(e){var t=e===void 0?m.selectedId:e;return!!Dp&&Dp===t}function fke(e){return mX}function pke(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 mke(e,t,r){var n=document.getElementById("composer-status-line");if(n){var a=e==="sending"||e==="sent"||e==="failed",o=a&&t?t:fke(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 hke(){var e=document.getElementById("composer-status-line");return!!e&&e.getClientRects().length>0}function ek(e,t,r,n){F1&&(clearTimeout(F1),F1=0),AE=e,S$=t||"",Dp=n===void 0?m.selectedId||null:n||null,Ta(),e==="failed"&&(!IK()||!hke())&&Qe(t||"\u64CD\u4F5C\u672A\u5B8C\u6210\u3002","error"),!(r<=0)&&(F1=window.setTimeout(function(){F1=0,AE=null,S$="",Dp=null,Ta()},r))}function MK(e,t,r){return fV+=1,F$=fV,BK=r||"\u5DF2\u53D1\u9001",ek("sending",e,0,t),F$}function D$(e,t){ek("sent",e,TB("sent"),t)}function Wi(e,t){ek("failed",e,TB("failed"),t)}function $E(e,t){AE!=="sending"||!Dp||e&&e!==Dp||t!==void 0&&t!==F$||ek("sent",BK||"\u5DF2\u53D1\u9001",TB("sent"),Dp)}function fd(){pa()}var gke=10;function vke(){return!!m.queueBarExpanded}function jB(e){!!m.queueBarExpanded!=!!e&&(m.queueBarExpanded=!!e,pa())}var pV=null;function pa(){var e=document.getElementById("queue-bar-host");if(e){var t=m.sessions.find(function(c){return c.id===m.selectedId});pV!==(t?.id??null)&&(pV=t?.id??null,m.queueBarExpanded=!1,m.queueBarDrag&&_K(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,k$(e),m.queueBarExpanded=!1;return}if(!m.queueBarDrag){e.hidden=!1;var o=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running"),l=n.length>=gke;UEe(e,n,o,l,{expanded:!!m.queueBarExpanded,onExpandedChange:jB,busy:Ap.has(t.id)||$p.has(t.id),retrieval:a,steering:t.provider==="pi"&&t.structuredState?.engine==="core"})}}}function bke(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&&nr({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)),sa(!0),pa()}}var Ap=new Set,$p=new Set;async function yke(e){var t=m.sessions.find(function(g){return g.id===m.selectedId}),r=t&&t.queuedMessages&&t.queuedMessages[e];if(!(typeof r!="string"||Ap.has(t.id)||$p.has(t.id))){var n=t.id,a=Lt.beginQueueRetrieval(n,r);if(a){var o=Ja.advance(n,"local");Ap.add(n),pa();var l=!1;try{var c=await Ui("/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 f=await c.json();if(f.id!==n||!Array.isArray(f.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:f.queuedMessages},n,o);if(h.queuedMessages&&nr(h),!Lt.finishQueueRetrieval(n,a,"confirmed"))return;(m.selectedId!==n||!m.composerComposing)&&TK(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),Pu(n))}finally{Ap.delete(n),m.selectedId===n&&pa()}}}}function TK(e){if(!(m.selectedId===e&&m.composerComposing)&&Lt.restoreQueueRetrieval(e)&&m.selectedId===e){Ed(e);var t=document.getElementById("input-box");if(t){_p(t);try{t.focus({preventScroll:!0})}catch{t.focus()}}pa()}}function wke(e){var t=m.sessions.find(function(n){return n.id===m.selectedId}),r=t?.queuedMessages?.[e];typeof r=="string"&&jK(t.id,"/"+e,{expectedText:r})}function xke(){var e=m.sessions.find(function(t){return t.id===m.selectedId});e?.queuedMessages?.length&&jK(e.id,"",{expectedQueue:e.queuedMessages.slice()})}async function jK(e,t,r){if(!(Ap.has(e)||$p.has(e))){$p.add(e);var n=Ja.advance(e,"local");pa();try{var a=await Ui("/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})&&nr(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),Pu(e))}finally{$p.delete(e),m.selectedId===e&&pa()}}}function Eke(e){if(!m.queueBarPromoting){var t=m.sessions.find(function(f){return f.id===m.selectedId});if(!(!t||Ap.has(t.id)||$p.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");nr({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=MK(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");Ui("/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(f){return f.ok?f.json():f.json().catch(function(){return{}}).then(function(h){throw new Error(h&&h.error||"\u7ACB\u5373\u53D1\u9001\u5931\u8D25")})}).then(function(f){if(f&&f.id&&(f=Ja.filter(f,t.id,l),nr(f),f.id===m.selectedId)){var h=m.sessions.find(function(g){return g.id===f.id})||f;m.currentMessages=es(h,Fl(h,f.output,!1)),sa(!0),pa()}$E(t.id,d),m.queueBarPromoting=!1}).catch(function(f){m.queueBarPromoting=!1,m.selectedId===t.id&&Pu(t.id),Wi(f&&f.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 kke(e,t){var r=m.sessions.find(function(g){return g.id===m.selectedId});if(!(!r||Ap.has(r.id)||$p.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 f=function(g){Ske(g)},h=function(g){_K(g)};m.queueBarDrag.moveHandler=f,m.queueBarDrag.upHandler=h,t.addEventListener("pointermove",f),t.addEventListener("pointerup",h),t.addEventListener("pointercancel",h)}}}}function Cke(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 f={},h=c,g=0;g<a;g++){var v=o[g];f[v]=h,h+=r[v].height+n}return f}function Ske(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=Cke(t.origIndex,a,t.rects,t.gap);t.siblings.forEach(function(d,f){if(f!==t.origIndex){var h=c[f]-t.rects[f].top;d.style.transform=h?"translateY("+h+"px)":""}})}}}function _K(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 f=Array.isArray(d.queuedMessages)?d.queuedMessages:[];if(f.length!==a.length||f.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");nr({id:d.id,queuedMessages:c}),pa(),Ui("/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){bke(d,a,h),Wi(g&&g.message||"\u8C03\u6574\u6392\u961F\u987A\u5E8F\u5931\u8D25\u3002",d.id)})}}function Fke(){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&&yke(Number(o.getAttribute("data-index")))}else if(a==="promote-item"){var l=n.closest(".queue-bar-item");l&&Eke(Number(l.getAttribute("data-index")))}else if(a==="delete"){var c=n.closest(".queue-bar-item");c&&wke(Number(c.getAttribute("data-index")))}else a==="clear-all"?xke():a==="restore-retrieved"?TK(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&&kke(t,n)}}}),e.addEventListener("keydown",function(t){t.key==="Escape"&&vke()&&(t.stopPropagation(),jB(!1))}))}function es(e,t){var r=Array.isArray(t)?ik(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 mV(){var e=m.sessions.find(function(t){return t.id===m.selectedId});ak(e),fd()}function NK(e){var t=X0(),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 PK(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 RK(e){return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY"||e.errorCode==="SESSION_NOT_FOUND")}function Dke(e,t){e&&nr({id:e,status:t||"exited"})}function Ey(e){return!!(e&&!cr(e)&&Zs.indexOf(e.provider)!==-1&&e.status!=="running"&&e.claudeSessionId)}function Ake(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(!Ey(e)){var t=e&&Ys[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?(nr(n),vi(),pk(n.id),Pu(n.id).then(function(){return r()&&Ml(!0),cr(n)?n:K2e().then(function(){return n})})):null})}function $ke(e,t){return[t,"\r"]}function Bke(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 Ike=3e3;function _B(e){return Object.assign(new Error(ei(e,"\u8F93\u5165\u63D0\u4EA4\u7ED3\u679C\u672A\u77E5\u3002")),e,{__wandAmbiguousDelivery:!0})}function Mke(e,t,r,n,a,o){var l=(Array.isArray(e)?e:[]).map(Bke).filter(Boolean);if(l.length===0)return Promise.resolve();var c=typeof r=="number"?r:0,d=0;return l.reduce(function(f,h,g){var v=h.shortcutKey!==void 0?h.shortcutKey:t&&(g===0||g===l.length-1)?t:void 0;return f.then(function(){if(g>0){var y=l[g-1],x=o?yE(void 0,y&&y.image?Ike:void 0):c>0?new Promise(function(w){setTimeout(w,c)}):Promise.resolve();return x.then(function(){return oa(h.data,v,n,a)})}return oa(h.data,v,n,a)}).then(function(y){return d+=1,y})},Promise.resolve()).catch(function(f){throw d>0?_B(f):f})}var Tke=5e3,jke=100;function hV(e){e&&(m.pendingMessages.length>=jke&&m.pendingMessages.shift(),m.pendingMessages.push({input:e,at:Date.now()}))}function oa(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 _ke(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 _ke(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 f=new Error("\u76EE\u6807\u4F1A\u8BDD\u5DF2\u505C\u6B62\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw f.errorCode=c?"SESSION_NOT_RUNNING":"SESSION_NOT_FOUND",f}return m.wsConnected?(console.warn("[wand] postInput: session not running, skipping send",{sessionId:o}),Qe("\u4F1A\u8BDD\u672A\u8FD0\u884C\uFF0C\u6B63\u5728\u7B49\u5F85\u81EA\u52A8\u6062\u590D\u540E\u91CD\u8BD5\u3002","info"),Promise.resolve()):(hV(e),Promise.resolve())}if(!m.wsConnected){if(a)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");return hV(e),Promise.resolve()}var h=!1;return Ui("/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=PK(v);throw y.httpStatus=g.status,console.error("[wand] postInput: request failed",{status:g.status,errorCode:y.errorCode,message:y.message,sessionId:o}),RK(y)&&Dke(o,y.sessionStatus||"exited"),y})}).then(function(g){return g&&g.id&&(nr(g),g.id===m.selectedId&&(g.messages&&g.messages.length>0&&(m.currentMessages=g.messages),sa(!0))),g}).catch(function(g){throw h?_B(g):g})}function X0(){return m.sessions.find(function(e){return e.id===m.selectedId})||null}function NB(){return!!m.selectedId&&m.currentView==="terminal"}function gV(e){return!(!m.terminal||!e||e!==m.selectedId||m.terminalSessionId&&m.terminalSessionId!==e)}function OK(e){return!!e&&(!!e.isComposing||e.keyCode===229||!!m.composerComposing)}function zK(e){if(!m.terminalInteractive||!NB()||e.defaultPrevented||OK(e))return!1;var t=e.target;return t?!(t.closest&&t.closest("#input-box")||Rke(t)):!0}var Nke={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"},Pke={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~"},vV={" ":0,"[":27,"\\":28,"]":29,"^":30,_:31};function Rke(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 Oke=new Set(["ctrl","alt","shift"]);function LK(e){return Oke.has(e)}function zke(e){return Pke[e]||""}function Lke(e){var t=e.toLowerCase();return t>="a"&&t<="z"?String.fromCharCode(t.charCodeAt(0)-96):Object.prototype.hasOwnProperty.call(vV,t)?String.fromCharCode(vV[t]):""}function BE(e){return Nke[e.key]||e.key}function Hke(e,t){return{ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey&&(t.length===1||t==="tab"),meta:e.metaKey}}function A$(e,t){e&&oa(e,t).catch(function(){})}function PB(){XK()}function qke(){NB()&&Bp(!m.terminalInteractive)}function Wke(e=!1){pd(e);var t=document.getElementById("file-upload-input");t&&t.click()}function HK(e){return!!e&&!cr(e)&&e.status==="running"&&m.currentView==="terminal"}function RB(){return document.documentElement.classList.contains("is-wand-native-input")}function vd(){return RB()&&!document.documentElement.classList.contains("is-wand-terminal-passthrough")}function IE(){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 bV=!1;function Uke(){bV||!vd()||(bV=!0,document.addEventListener("focusin",function(e){var t=e.target;!t||!t.classList||!t.classList.contains("xterm-helper-textarea")||IE()},!0))}function Bp(e,t){var r=t||{},n=!!e&&NB();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?(Qke(),r.focus!==!1&&!vd()&&PB(),r.announce!==!1&&Qe("\u7EC8\u7AEF\u4EA4\u4E92\u6A21\u5F0F\u5DF2\u5F00\u542F","info")):Yke(),Ta();var o=document.getElementById("input-box");o&&ma(o)}}function tk(){var e=m.sessions.find(function(n){return n.id===m.selectedId}),t=HK(e),r=!t;if(r&&m.terminalInteractive){Bp(!1);return}if(t&&!m.terminalInteractive){Bp(!0,{announce:!1,focus:!1});return}Ta()}function Ta(e=!1){e||OE(ma);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),f=!!c,h=HK(t),g=!r&&!a&&Ey(t);if(!e){HEe({resolve:function(){return{interactiveVisible:!(r||m.currentView!=="terminal"||!t||h),interactiveOn:m.terminalInteractive}},onAttach:function(H){Wke(H)},onToggleInteractive:qke}),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)),REe({active:function(){return!!m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")},submit:function(){zp(void 0)},focusInput:function(){VB(document.getElementById("input-box"))}}),oB();var v=document.getElementById("prompt-optimize-btn");if(v){v.hidden=m.terminalInteractive,v.disabled=f,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":f?"\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":f?"\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 x=document.getElementById("send-input-button"),w=r&&a;if(x){var k=!r&&!!t&&!a&&!g,F=o?o.value:"",C=Iy(m.selectedId),D=bk(F,m.selectedId),S=!!(D&&Lt.pendingSubmission(m.selectedId,{text:F,attachments:C})),A=d||!D||S||k,I=IK(),j=I?S$:"",$=I&&AE||cke(t,D);$==="running"&&(A=!1),m.selectedId&&iE.has(m.selectedId)&&(A=!0),x.disabled!==A&&(x.disabled=A),x.getAttribute("aria-disabled")!==String(A)&&x.setAttribute("aria-disabled",String(A)),x.dataset.phase!==$&&(x.dataset.phase=$);var N=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":r?w?"\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",P=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":w?"\u52A0\u5165\u53D1\u9001\u961F\u5217":"\u53D1\u9001\u6D88\u606F",O=pke($,N,P,j);x.title!==O.title&&(x.title=O.title),x.getAttribute("aria-label")!==O.label&&x.setAttribute("aria-label",O.label),x.classList.toggle("queue-mode",w&&$!=="running"),mke($,j,n)}if(!e){var V=document.getElementById("output");V&&V.classList.toggle("interactive",!r&&m.terminalInteractive),Xke(),Kxe(ma),Vke()}}function Vke(){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){DEe(e);return}FEe(e,t?{...t,ptyRunning:Yh(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:null)}}function dy(){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 qK(e){if(zK(e)&&!e.metaKey){var t=BE(e);if(t){var r=Hke(e,t),n={...r,...ry(m.selectedId,r)};if(!LK(t)&&!(r.ctrl&&t.length===1&&t.toLowerCase()==="c"&&dy())){var a=OB(t,n);a&&(e.preventDefault(),A$(a,t))}}}}function Gke(){m.terminal&&G2e(500)}function Kke(e){var t=X0();if(!(!t||cr(t)||RB())&&t.status==="running"){if(e==="enter"){if(m.composerComposing||m.terminalComposing)return;var r=document.getElementById("input-box");m.terminalInteractive||bk(r?r.value:"",t.id)?zp(void 0):A$("\r","enter_text");return}A$(OB(e,ry(t.id,{ctrl:!1,shift:!1})),e),Gke()}}function Xke(){var e=document.getElementById("terminal-shortcuts");if(e){var t=X0();e.hidden=!t||cr(t)||RB(),!e.hidden&&BEe(e,t.status!=="running",Kke,t.id)}}function Qke(){if(m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!!vd())}}function Yke(){if(document.removeEventListener("keydown",qK,!0),m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!0)}}function OB(e,t){var r=t||{ctrl:!1,alt:!1,shift:!1};if(LK(e))return"";var n=WE(e,r);if(n!==null)return n;if(e==="tab"&&r.shift)return"\x1B[Z";var a=zke(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?Lke(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 Zke(){if(m.pendingMessages.length!==0){var e=X0();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)>Tke){n++;return}r.push(o.input)}}),m.pendingMessages=[];var a=Promise.resolve();r.forEach(function(o){a=a.then(function(){return Jke(o).catch(function(){})})})}}function Jke(e){if(!e||!m.selectedId)return Promise.resolve();var t=m.selectedId;return Ui("/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=PK(n);if(a.httpStatus=r.status,RK(a))return null;throw a})}).then(function(r){return r&&r.id&&(nr(r),r.id===m.selectedId&&(r.messages&&r.messages.length>0&&(m.currentMessages=r.messages),sa(!0))),r})}function $$(){if(!(!m.selectedId||iE.has(m.selectedId))){var e=m.selectedId;return iE.add(e),Ta(),kB(M1("stop.confirm.message"),{title:M1("stop.confirm.title"),danger:!0,okLabel:M1("stop.confirm.ok"),cancelLabel:M1("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)?Ui("/api/sessions/"+e+"/stop",{method:"POST",credentials:"same-origin"}).then(function(a){return At(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");nr(a)}):oa(O0("ctrl_c"),"ctrl_c","chat",e);return n.then(function(){m.selectedId===e&&D$("\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")):Qe(ei(t,"\u65E0\u6CD5\u505C\u6B62\u539F\u4F1A\u8BDD\u7684\u56DE\u590D\u3002"),"error")}).finally(function(){iE.delete(e),Ta()})}}function zB(e){var t=m.sessions.find(function(n){return n.id===e}),r=t&&t.claudeSessionId;setTimeout(function(){Ui("/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&&(UE(),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(){kE("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function eCe(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],vi()}).catch(function(){t&&t.classList.remove("deleting"),kE("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function LB(e,t){eCe(e,t)}var j9=!1;function HB(e){return!e||j9?Promise.resolve(null):(j9=!0,Ui("/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?(Qe(t.error,"error"),null):t}).catch(function(t){var r=t&&t.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002";return Qe(r,"error"),null}).finally(function(){j9=!1}))}function ky(e){return!e||!e.id?Promise.resolve():(nr(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})),ky(t).then(function(){return t})):null})}function WK(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?(Qe(n.error,"error"),null):n}).catch(function(n){return Qe(n&&n.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002","error"),null})}function tCe(e,t){return WK("codex",e,t)}function rCe(e,t){return WK("claude",e,t)}function WB(e,t,r){var n=e==="codex"?tCe(t,r):e==="claude"?rCe(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})),ky(a).then(function(){return mi(),a}))})}function rk(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 vi(),r})}function UB(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}),vi(),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()||VB(t))}}function UK(){var e=document.querySelector(".input-panel");e&&e.style.removeProperty("--keyboard-offset")}function VK(e){if(e){var t=e.selectionStart,r=e.selectionEnd;ME(e),typeof t=="number"&&typeof r=="number"&&e.setSelectionRange(t,r)}}function GK(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 KK(e){e&&(ma(e),VK(e))}function nCe(e){var t=e&&e.target?e.target:document.getElementById("input-box");t&&(UK(),KK(t))}function aCe(e){var t=e&&e.target?e.target:document.getElementById("input-box");UK(),t&&ma(t),jG(2200,t);var r=[80,200,380,620,900];r.forEach(function(n,a){setTimeout(function(){j0(!1),t&&t.value&&ma(t),a===1&&wd()&&(qi("keyboard-blur",{forceReplay:!0}),Dl("keyboard"))},n)})}function iCe(e){e&&(e.setSelectionRange(e.value.length,e.value.length),VK(e))}function VB(e){e&&(e.focus({preventScroll:!0}),iCe(e))}function oCe(e){GK(e),KK(e)}function D1(e){oCe(e)}function sCe(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 ME(e){if(e){var t=e.scrollHeight>e.clientHeight+1;if(!t){e.scrollTop=0;return}e.scrollTop=e.scrollHeight}}function yV(){if(m.terminalInteractive){XK();return}if(!wd()){var e=document.getElementById("input-box");!e||!m.selectedId||document.activeElement===e||VB(e)}}function XK(){if(vd()){IE();return}var e=document.getElementById("output");e&&(e.setAttribute("tabindex","0"),e.focus(),m.terminal&&m.terminal.focus&&m.terminal.focus())}function lCe(){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(){yV()}),t&&t.addEventListener("click",function(a){var o=a.target;o.tagName!=="A"&&o.tagName!=="BUTTON"&&!o.closest("button")&&!o.closest("[data-tool-toggle]")&&yV()}),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 B$(){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 uCe(){return Object.keys(m.selectedSessionIds).filter(function(e){return!!m.selectedSessionIds[e]})}function GB(){m.selectedSessionIds={},m.selectedClaudeHistoryIds={},m.selectedCodexHistoryIds={}}function KB(e){m.sessionsManageMode=typeof e=="boolean"?e:!m.sessionsManageMode,m.sessionsManageMode||GB(),vi()}function cCe(){return m.sessions.slice()}function XB(){var e={};cCe().forEach(function(t){e[t.id]=!0}),m.selectedSessionIds=e,m.selectedClaudeHistoryIds={},m.selectedCodexHistoryIds={},vi()}function QB(){GB(),vi()}function YB(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,vi()}}function Cy(e,t){return kB(e,Object.assign({type:"danger",danger:!0,okLabel:"\u5220\u9664"},t||{}))}function ZB(){var e=uCe(),t=e.length;t&&Cy("\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 At(n)}).then(function(n){var a=n&&Array.isArray(n.failed)?n.failed:[];return a.length>0&&kE("\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()),GB(),a.forEach(function(o){m.selectedSessionIds[o]=!0}),Tl()}).catch(function(n){kE(ei(n,"\u65E0\u6CD5\u6279\u91CF\u5220\u9664\u6240\u9009\u9879\u76EE\u3002"))})})}function wV(){return window.innerWidth<=768}function xo(){return GV({width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches})}function Q0(e){m.filePanelOpen=e;try{localStorage.setItem("wand-file-panel-open",String(m.filePanelOpen))}catch{}m.filePanelOpen&&xo()&&(m.sessionsDrawerOpen=!1,Ur("wand-sidebar-open",!1)),$l()}function JB(){Q0(!m.filePanelOpen)}function dCe(){ja("layout:files")}function $l(){Tp(),dCe()}function fCe(e){ja("layout:file-cwd")}function eI(){m.filePanelOpen&&Q0(!1)}function Ip(e){Sy(m.terminalScale+e)}function Sy(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{}mCe()}}function pCe(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?Sy(1):Ip(t),!0)}function mCe(){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 tI(e){var t=document.getElementById("input-box");if(!t)return!1;var r=t.value||"",n=r&&!r.endsWith(" ")&&!r.endsWith(`
|
|
271
|
+
`)?" ":"";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 hCe(e){yEe(e)}function gCe(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 At(n)}).then(function(n){m.toolContentCache[r]=n,t(null,n)}).catch(function(n){if(n instanceof $a){t(ei(n,"\u52A0\u8F7D\u5931\u8D25")+"\uFF08HTTP "+n.status+"\uFF09",null);return}t(ei(n,"\u52A0\u8F7D\u5931\u8D25"),null)})}}function vCe(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",gCe(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||!hi(["piExecution"])||Vc.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"),RV(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];xV(r,n,c);try{c.focus()}catch{}return}e&&e.stopPropagation(),xV(r,n,t)}}};function xV(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 f=c[d].getAttribute("data-agent-task-id")===n;c[d].classList.toggle("is-selected",f),f?c[d].removeAttribute("hidden"):c[d].setAttribute("hidden","")}a&&n&&TCe(a,n),RV(e)}}window.__openFilePreview=function(e){e&&hCe(e)};window.__openImageViewer=function(e,t){e instanceof HTMLImageElement?v9(e):e&&wl.open(String(e),typeof t=="string"?t:"")};window.__inlineToolImageState=function(e,t){e&&DG(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">'+SG(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(`
|
|
272
|
+
`),d="",f=0;f<c.length;f++)!c[f]&&f===c.length-1||(d+='<div class="term-line">'+_u(c[f])+"</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),f=(r[c]||[]).indexOf(d)!==-1;l.classList.toggle("selected",f)});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 f=t[d]||[];if(f.length===0){o=!1;return}var h=[];f.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(`
|
|
273
|
+
`);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+`
|
|
274
|
+
`,view:m.currentView})}).catch(function(c){console.error("[wand] Error sending answer:",c),t.submitted=!1,window.__askRender(e)})}}}};var hp=null;function bCe(){m.__globalListenersBound||(m.__globalListenersBound=!0,document.addEventListener("paste",function(e){R8e(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)||pd()}}),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(),pd(!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")&&pd(!0)}}))}function yCe(){bCe(),hp&&(hp.disconnect(),hp=null),qxe(),OE(D1),L1(document);var e=document.getElementById("login-button");if(e){e.addEventListener("click",P9);var t=document.getElementById("login-form");t&&t.addEventListener("submit",function(w){w.preventDefault(),P9()});var r=document.getElementById("login-switch-server-button");r&&r.addEventListener("click",sk);var n=document.getElementById("password");n&&(n.addEventListener("keydown",function(w){w.key==="Enter"&&P9()}),n.addEventListener("input",function(){n.dataset.error="false",n.setAttribute("aria-invalid","false");var w=document.getElementById("login-error");w&&cK(w)}),n.focus());return}var a=document.getElementById("send-input-button");a&&a.addEventListener("click",function(){if(mi(),dke()==="running"){$$();return}nke()});var o=document.getElementById("input-box");if(o){m.composerCompositionTarget!==o&&(m.composerCompositionGeneration+=1,m.composerCompositionTarget=o,m.composerComposing=!1,m.terminalComposing=!1),GK(o),o.addEventListener("keydown",A8e),o.addEventListener("paste",O8e),o.addEventListener("input",function(w){m.terminalComposing||IV(o,w)||(jp(o.value,!0),D1(o),oB())}),o.addEventListener("compositionstart",function(){m.composerCompositionGeneration+=1,m.composerCompositionTarget=o,m.composerComposing=!0,m.terminalComposing=!!m.terminalInteractive}),o.addEventListener("compositionend",function(){var w=m.composerCompositionGeneration,k=m.terminalComposing;setTimeout(function(){if(w===m.composerCompositionGeneration){if(!o.isConnected){m.composerCompositionTarget===o&&(m.composerCompositionTarget=null),m.terminalComposing=!1,m.composerComposing=!1;return}k&&(m.terminalComposing=!1,m.terminalInteractive?IV(o):(D1(o),jp(o.value,!0),_p(o))),m.composerComposing=!1}},0)}),o.addEventListener("focus",function(){mi(),nCe({target:o})}),o.addEventListener("blur",aCe),D1(o);var l=o.closest(".composer-input-wrap");if(l&&typeof ResizeObserver<"u"){var c=-1;hp=new ResizeObserver(function(w){if(!o.isConnected){hp?.disconnect(),hp=null;return}var k=w[0]?w[0].contentRect.width:l.getBoundingClientRect().width;k<=0||Math.abs(k-c)<.5||(c=k,D1(o))}),hp.observe(l)}}var d=document.getElementById("attach-btn"),f=document.getElementById("file-upload-input"),h=document.getElementById("composer-plus-popover");d&&h&&(d.addEventListener("click",function(w){w.stopPropagation(),k8e(w.detail===0)}),h.addEventListener("keydown",function(w){var k=w.target;if(!(w.target instanceof HTMLSelectElement||w.target instanceof HTMLInputElement||k.matches('[role="combobox"], .wand-ui-select-trigger, .wand-ui-select-search-input')||typeof k.closest=="function"&&k.closest(".wand-composer-select-content"))&&["ArrowDown","ArrowUp","Home","End"].includes(w.key)){var F=Array.from(h.querySelectorAll('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(S){return S.getClientRects().length>0});if(F.length){w.preventDefault();var C=F.indexOf(document.activeElement),D=w.key==="Home"?0:w.key==="End"?F.length-1:w.key==="ArrowUp"?C<=0?F.length-1:C-1:(C+1)%F.length;F[D]?.focus()}}})),f&&f.addEventListener("change",function(){var w=f.files;w&&j$(w),f.value=""});var g=document.getElementById("prompt-optimize-btn");g&&(g.addEventListener("pointerdown",function(w){w.preventDefault()}),g.addEventListener("click",function(){pd(),z8e()}));var v=document.querySelector(".input-composer");v&&(v.addEventListener("dragover",function(w){w.preventDefault(),w.stopPropagation(),v.classList.add("drag-over")}),v.addEventListener("dragleave",function(w){w.preventDefault(),w.stopPropagation(),v.classList.remove("drag-over")}),v.addEventListener("drop",function(w){w.preventDefault(),w.stopPropagation(),v.classList.remove("drag-over");var k=w.dataTransfer&&w.dataTransfer.files;k&&j$(k)}));var y=document.getElementById("terminal-jump-bottom");y&&y.addEventListener("click",function(){Dl("force")});var x=document.getElementById("chat-unread-bubble");x&&x.addEventListener("click",function(){xCe(!0)}),Ps(),lCe(),c2e(),Fke(),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 nk(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 wCe(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 xCe(e){var t=Bl();if(!(!t||!t.isConnected)){m.chatIsProgrammaticScroll=!0;var r=function(){m.chatIsProgrammaticScroll=!1,m.chatStickToBottom=!0,nk({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 QK(){var e=Bl();m.chatStickToBottom=!0,nk({removeDivider:!0}),e&&e.isConnected&&(m.chatIsProgrammaticScroll=!0,m.chatProgrammaticScrollUntil=Date.now()+180,e.scrollTop=0,requestAnimationFrame(function(){m.chatIsProgrammaticScroll=!1})),_s()}function ECe(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 YK(){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")&&sa(!0),_s()}m.chatScrollHandler=function(){if(e.isConnected){if(TE(),m.chatIsProgrammaticScroll||Date.now()<m.chatProgrammaticScrollUntil){_s();return}var r=aI(e);if(r)m.chatStickToBottom=!0,nk({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 _9=new Uye;function ZK(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);_9.canAttempt(r,a,e)&&(n?(_9.attempted(r,a),m.chatRenderedCount=Math.min(m.currentMessages.length,m.chatRenderedCount+m.chatPageSize),sa(!0)):(t.messageOffset>0||t.leadingBlockOffset>0)&&w8e()&&_9.attempted(r,a))}}function TE(){if(!(document.hidden||m.currentView!=="chat")){var e=Bl();!e?.isConnected||!document.getElementById("chat-load-more-sentinel")||Wye(e)&&ZK()}}var kp=null;function JK(){kp!==null&&cancelAnimationFrame(kp);var e=m.selectedId,t=m.chatRenderEpoch||0;kp=requestAnimationFrame(function(){kp=null,m.selectedId===e&&(m.chatRenderEpoch||0)===t&&TE()})}document.addEventListener("visibilitychange",function(){document.hidden||JK()});function EV(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,PV(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"&&JK())}}var A1=null,q6=null;function kCe(){kp!==null&&(cancelAnimationFrame(kp),kp=null),A1?.disconnect(),A1=null,q6?.disconnect(),q6=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(){ZK(!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(){A1?.disconnect(),!(!o()||t.clientHeight<=0)&&(typeof IntersectionObserver<"u"&&(A1=new IntersectionObserver(function(c){o()&&c.some(function(d){return d.isIntersecting})&&TE()},{root:t,rootMargin:J3(t.clientHeight)}),A1.observe(e)),TE())};l(),typeof ResizeObserver<"u"&&(q6=new ResizeObserver(l),q6.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 CCe(){var e=m.sessions.find(function(t){return t.id===m.selectedId});return iI(e)}function ak(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 SCe(e){return!!(e&&e.role==="user"&&eX(e,"__queued"))}function FCe(e){return!!(e&&e.role==="assistant"&&eX(e,"__processing"))}function ik(e){if(!Array.isArray(e))return[];for(var t=!1,r=[],n=0;n<e.length;n++){var a=e[n];if(SCe(a)||FCe(a)){t=!0;continue}r.push(a)}return t?r:e}function DCe(e,t){if(!e||!Array.isArray(e.messages))return e;var r=e.sessionKind||t&&t.sessionKind;if(r!=="structured")return e;var n=ik(e.messages);return n===e.messages?e:Object.assign({},e,{messages:n})}function tX(){try{if(!m.selectedId)return;var e=CCe();if(e.length===0){jE(m.selectedId);return}localStorage.setItem("wand-structured-queue",JSON.stringify({sessionId:m.selectedId,items:e}))}catch{}}function jE(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)){ak(e),tX();return}if(e&&e.status!=="running"){m.structuredInputQueue=[],jE(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 Nu(){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 ACe(){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 $Ce(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(L9);return}localStorage.setItem(L9,JSON.stringify(e))}catch{}}function BCe(){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=BCe();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,$Ce(r)}}var I$="wand-agent-run-selection-v1";function ICe(){try{var e=localStorage.getItem(I$);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function MCe(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(I$);return}localStorage.setItem(I$,JSON.stringify(e))}catch{}}function TCe(e,t){if(!(!e||!t||!m.selectedId)){var r=ICe(),n=m.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=t,r[n]=a,MCe(r)}}function jCe(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 _Ce(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 NCe(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 f=e.querySelector(".agent-run-body");f&&f.setAttribute("aria-hidden",r?"false":"true");break}}}function Y0(e,t){var r=oX(e);r&&iX(r,NCe(e,t))}function PCe(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 RCe=new Set(["ready","checking","merging","merged","failed"]),vp=null;function gp(e){return typeof e!="string"?void 0:e.trim()||void 0}function OCe(e){return typeof e=="string"&&RCe.has(e)?e:void 0}function zCe(e,t){if(!e)return null;let r=gp(e.id);if(!r)return null;let n=da(e.worktree)?e.worktree:{},a=da(e.worktreeMergeInfo)?e.worktreeMergeInfo:{},o=gp(n.branch)??gp(e.worktreeBranch),l=gp(n.path)??gp(e.worktreePath),c=gp(a.targetBranch),d=gp(e.status),f=OCe(e.worktreeMergeStatus),h=f==="merged"&&a.cleanupDone===!1;return{sessionId:r,intent:t??(h?"cleanup":"merge"),...o?{sourceBranch:o}:{},...l?{worktreePath:l}:{},...c?{targetBranch:c}:{},...d?{sessionStatus:d}:{},...f?{mergeStatus:f}:{},cleanupPending:h}}function sX(){return hi(["worktreeMerge"])}function kV(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 LCe(e,t){try{Promise.resolve(e.refreshSessions(t)).catch(r=>{kV(e,r)})}catch(r){kV(e,r)}}function HCe(e){return{onOpen(t){sX(),e.onOpen?.(t)},onClose(t){e.onClose?.(t)},onRepositoryChanged(t){LCe(e,t)},toast(t,r){e.toast(t,r)}}}function sI(e){if(vp?.dependencies===e)return vp.dispose;vp?.dispose();let t=A7(HCe(e)),r=!1,n={dependencies:e,dispose(){r||(r=!0,t(),vp===n&&(vp=null))}};return vp=n,n.dispose}function lX(e,t){let r=vp,n=e.trim();return!r||!n||!Op(()=>{CV(r,n,t)})?!1:CV(r,n,t)}function CV(e,t,r){if(!sX())return!1;let n=zCe(e.dependencies.getSession(t),r);return n?Pc.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 qCe=Object.freeze({revision:0,mounts:Object.freeze([])}),WCe=class{constructor(){oe(this,"snapshot",qCe),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([])}},Z0=new WCe;function UCe(e){return e==="mode"||e==="model"||e==="thinking"||e==="tool"}function VCe(e){return e==="mode"||e==="runtime"||e==="all"||e==="dropdown"}function GCe(e){let t=[];document.querySelectorAll("[data-composer-select-host]").forEach((r,n)=>{let a=r.dataset.modeControl,o=r.dataset.composerSelectScope;if(!UCe(a)||!VCe(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)}})}),Z0.sync(t)}function KCe(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 XCe(e,t){return e.target===t.target&&e.scope===t.scope&&KCe(e,t)}var QCe=class extends Us{constructor(){super(XCe)}},J0=new QCe;function YCe(e){return e==="mode"||e==="runtime"||e==="all"}function ZCe(e){yy({selector:"[data-composer-config-host]",store:J0,flush:!0,build(t){let r=t.dataset.composerConfigHost;return YCe(r)?{key:`composer-config-${r}`,target:t,scope:r,...e.resolve(r),onRefreshModels:e.onRefreshModels}:null}})}function JCe(e){yy({selector:"[data-composer-attachments-host]",store:b6,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 e8e(e,t,r){let n=e||r;return t.some(a=>a.value===n)?n:r}var N9="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 t8e=/^跟随.*默认$/,r8e=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function n8e(e,t,r){let n=(e??"").trim();if(n&&n!==N9)return n===Jc?td:(t.find(l=>l.id===n)?.label??"").trim()||(ed(n)?"\u6A21\u578B\u5206\u7EC4":Su(n)?m0:n);let a=(r??"").trim();if(a&&a!==N9)return a===Jc?td:(t.find(l=>l.id===a)?.label??"").trim()||(ed(a)?"\u6A21\u578B\u5206\u7EC4":Su(a)?m0:a);let o=(t.find(l=>l.id===N9)?.label??"").trim().replace(r8e,"").trim();return t8e.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 M$(e){return v4(e?.provider,e?.structuredState?.engine==="core"?"sdk":"cli")}var Mp=Cxe(),W6=new Map,ok=hD();async function _E(e){if(!e||!ok.isLoaded(e.id)||m.selectedId!==e.id||document.visibilityState!=="visible"||!Pi(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(W6.get(e.id)!==t){W6.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 At(r);nr({id:e.id,completionRevision:n.completionRevision,viewedCompletionRevision:n.viewedCompletionRevision},"latest"),vi(),ho()}catch{}finally{W6.get(e.id)===t&&W6.delete(e.id)}}}function SV(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 Ru(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}function a8e(){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 i8e(){var e=document.getElementById("login-cert-hint");e&&e.classList.add("hidden")}function T$(){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(T$(),m.loginPending||!e)return;e.disabled=!0,e.textContent="\u8BF7\u7B49\u5F85 "+r+"s",t&&Z1(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&&Z1(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){Z1(r,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+n+" \u79D2\u3002"),T$();return}if(!m.loginPending){cK(r),i8e(),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),fwe(a).then(function(o){if(!o.ok){o.retryAfterMs&&(m.loginLockUntil=Date.now()+o.retryAfterMs,T$()),o.kind==="cookie-not-stored"&&location.protocol==="https:"&&a8e(),o.credentialInvalid&&(e.dataset.error="true",e.setAttribute("aria-invalid","true")),Z1(r,o.message);return}return m.config=o.config,Ay(m.config),Tl().then(function(){nK(),xp()})}).catch(function(o){Z1(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 fX(){return typeof WandNative<"u"&&typeof WandNative.switchServer=="function"}function sk(){if(fX())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 pX(){uE(),Mp.reset(),Qb(),X3(),m6e(),P0.clear(),oK(),IB(),Bp(!1),gy(),m.config=null,m.selectedId=null,xd(),m.sessions=[],m.claudeHistory=[],m.claudeHistoryLoaded=!1,m.claudeHistoryExpanded=!1,m.claudeHistoryExpandedDirs={},m.sessionsDrawerOpen=!1,Ur("wand-sidebar-open",!1),xp()}async function uI(){var e;try{e=await fetch("/api/logout",{method:"POST",credentials:"same-origin"})}catch(t){Qe(ei(t,"\u6CE8\u9500\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"),"error");return}if(!e.ok){Qe("\u6CE8\u9500\u5931\u8D25\uFF08HTTP "+e.status+"\uFF09\uFF0C\u8BF7\u91CD\u8BD5\u3002","error");return}pX()}function o8e(){pX()}function Tl(){return gi()}function FV(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 Fs(e)?MD:t?"\u952E\u76D8\u8F93\u5165\u76F4\u901A\u7EC8\u7AEF \xB7 Enter \u63D0\u4EA4":e&&(e.status==="exited"||e.status==="failed"||e.status==="stopped")?Ey(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 s8e(e,t){if(!e||!e.is_error||!t||t.is_error)return!1;var r=ny(e.content).toLowerCase(),n=ny(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 DV=Object.create(null),U6=Object.create(null),NE=Object.create(null),L0=new Map;async function l8e(e){let t=Ma(),r=Sv(e);if(!r||!dX(t,m.currentMessages?.length)||lk(t.id)||L0.get(t.id)?.pending||M$(t)===e)return;let n={pending:!0,status:"\u6B63\u5728\u5207\u6362\u5DE5\u5177\u2026",failed:!1};L0.set(t.id,n),Eo(),Ta();try{let a=await uk(t.id,async function(){let o=await Ru("/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 At(o);if(l.id!==t.id||l.employeeId!==t.employeeId||M$(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})&&(nr(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,vi())}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 lk(e){return e&&NE[e]||null}function PE(e,t,r){if(e){var n=NE[e]||(NE[e]={});n[t]=r}}function cI(e){e&&delete NE[e]}function uk(e,t){var r=(U6[e]||0)+1;U6[e]=r;var n=DV[e]||Promise.resolve(),a=n.catch(function(){}).then(t);return DV[e]=a.catch(function(){}),a.then(function(o){return{data:o,latest:U6[e]===r}},function(o){return Promise.reject({error:o,latest:U6[e]===r})})}function fy(e,t){cI(e),Promise.resolve(gi()).catch(function(){}).finally(function(){Eo()}),Qe(t,"error")}function dI(e,t){if(!t.latest)return!1;var r=t.data;return r&&r.error?(fy(e,r.error),!1):!r||!r.id?(fy(e,"\u4F1A\u8BDD\u8BBE\u7F6E\u66F4\u65B0\u5931\u8D25"),!1):(nr(r),cI(e),Eo(),!0)}function ck(e,t){var r=h8e(e,t);return!r||r==="auto"?"\u81EA\u52A8":EA(r)}function py(e,t){var r=n8e(e,pI(t),fI(Fy(t)));return r||"\u9ED8\u8BA4"}function u8e(e,t){var r=cX(py(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 c8e(e,t){var r=dk(t);return r.map(function(n){var a=n.id==="off"?"\u81EA\u52A8\uFF08\u6A21\u578B\u9ED8\u8BA4\uFF09":ck(n.id,t);return{value:n.id,label:a}})}function Eo(){var e=Ma(),t=m.chatMode||"default",r=wX(e);d8e(e,t,yX(e)||"",r)}function d8e(e,t,r,n){var a=bd();for(let[F,C]of L0)!C.pending&&!m.sessions.some(function(D){return D.id===F})&&L0.delete(F);let o=L0.get(e?.id),l=dX(e,m.currentMessages?.length),c=!!e||l,d=!!o?.pending;var f=p8e(r,e),h=uX(r),g=c8e(n,e),v=e8e(n,g,"off"),y=FV(t),x=u8e(h,e),w=py(h,e)||x,k=ck(v,e);ZCe({resolve:function(){return{groupTitle:"\u6A21\u5F0F "+y+" \xB7 \u6A21\u578B "+w+" \xB7 \u601D\u8003 "+k,modeLabel:y,modelFullLabel:w,modelRefreshing:!!m.modelsRefreshing||d,toolVisible:c,toolStatus:o?.status,toolDisabled:d,thinkingValue:v,thinkingLabel:k}},onRefreshModels:function(){v8e()}}),GCe({resolve:function(F,C){if(F==="tool"){let D=M$(e);return{value:D,options:Jm.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":Sv(D)?.label,displayTitle:o?.status||Sv(D)?.description,disabled:!l||d||!!lk(e?.id)}}return F==="mode"?{value:t,disabled:d,options:gX(a).map(function(D){return{value:D,label:FV(D)}}),ariaLabel:"\u6A21\u5F0F",placeholder:y,displayValue:y}:F==="model"?{value:h,disabled:d,options:f,ariaLabel:"\u6A21\u578B",placeholder:x,displayValue:x,displayTitle:w}:{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"?l8e(C):F==="mode"?FX(C):F==="model"?SX(C):kX(C),D==="all"&&requestAnimationFrame(function(){pd(!0)})}})}function eg(e){return e==="codex"||e==="opencode"||e==="grok"||e==="qoder"||e==="pi"?e:"claude"}function Fy(e){return eg(e&&e.provider||m.sessionTool||"claude")}function f8e(){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 fI(e){var t=f8e(),r=eg(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 Os(e){var t=eg(e),r=m.chatModels&&typeof m.chatModels[t]=="string"?m.chatModels[t]:"";return!r&&t==="claude"&&(r=m.chatModel||""),r||""}function Dy(e,t){var r=eg(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?lk(e.id):null;if(t&&Object.prototype.hasOwnProperty.call(t,"model"))return t.model||"";if(e&&e.selectedModel)return e.selectedModel;var r=Fy(e),n=Os(r);return n||fI(r)||""}function pI(e){var t=eg(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 p8e(e,t){for(var r=pI(t),n=uX(e),a=[{value:"",label:"\u9ED8\u8BA4 \xB7 "+py("",t)}],o=0;o<r.length;o++){var l=r[o];if(l.id!=="default"){var c=cX(l.label||l.id),d=Fy(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(f){return f.id===n})&&a.push({value:n,label:n+"\uFF08\u81EA\u5B9A\u4E49\uFF09"}),a}function mI(e){Eo()}var oE=[{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 m8e(e){var t=Fy(e),r=yX(e)||"default",n=pI(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 dk(e){var t=m8e(e),r=kA(t.provider,t.efforts,t.defaultEffort);return r||oE}function h8e(e,t){for(var r=dk(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<oE.length;a++)if(oE[a].id===e)return oE[a].label;return"auto"}function wX(e){var t=e&&e.id?lk(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 Ay(e){var t=e&&typeof e=="object"?e.defaultThinkingEffort:"",r=t==="off"||t==="standard"||t==="deep"||t==="max"||G5(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 uk(e.id,function(){return n&&!n.ok?{error:n.error||"\u5207\u6362\u6A21\u578B\u5931\u8D25"}:Ru("/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 Qe=="function"&&Qe(r||"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+ck(t,Ma()),"success")}).catch(function(a){a&&a.latest&&fy(e.id,"\u5207\u6362\u601D\u8003\u6DF1\u5EA6\u5931\u8D25")})}function kX(e){var t=(e||"off").trim(),r=Ma(),n=dk(r).some(function(a){return a.id===t});n||(t="off"),xX(t),r&&PE(r.id,"thinking",t),Eo(),r&&EX(r,t,"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+ck(t,r))}function g8e(e){if(!e)return!1;var t=e.mode;return t==="managed"||t==="full-access"}function CX(){return xA(),fetch("/api/models",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){return hI(e),h0(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 v8e(){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 h0(e),Qe("\u6A21\u578B\u5217\u8868\u5DF2\u5237\u65B0\u3002","success"),e}).catch(function(e){return Qe(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=Fy(r);Dy(n,t),r&&PE(r.id,"model",t);var a=!1;if(dk(r).some(function(c){return c.id===wX(r)})||(a=!0,xX("off"),r&&PE(r.id,"thinking","off")),Eo(),!!r){var o={ok:!1,error:""};if(uk(r.id,function(){return Ru("/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 Qe=="function"){var d=py(t,Ma()||r),f=r.provider==="codex"?"\uFF08\u4E0B\u6B21\u5BF9\u8BDD\u751F\u6548\uFF09":"";Qe("\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+d+f,"success")}}).catch(function(c){o.ok=!1,!a&&c&&c.latest&&fy(r.id,"\u5207\u6362\u6A21\u578B\u5931\u8D25")}),a){var l=py(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){Qe&&Qe("\u65B0\u4F1A\u8BDD\u6A21\u5F0F\uFF1A"+t,"info");return}PE(r.id,"mode",t),uk(r.id,function(){return Ru("/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 Qe=="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":"";Qe("\u5DF2\u5207\u6362\u6A21\u5F0F \u2192 "+o+l,"success")}}).catch(function(n){n&&n.latest&&fy(r.id,"\u5207\u6362\u6A21\u5F0F\u5931\u8D25")})}function fk(e,t,r,n,a){var o=a&&a.provider||eg(m.sessionTool),l=(a&&a.model?String(a.model):"").trim(),c=l||Os(o)||fI(o),d=m.chatThinking||"off",f=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:f,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 Ru("/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 Lp(g.id,!0),nr(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&&R$(t),YK(),_s(),Ta(),ja("shell:view")}function nr(e,t="unknown"){if(!(!e||!e.id)){t==="latest"&&(Array.isArray(e.messages)||typeof e.output=="string")&&ok.loaded(e.id);var r=SV(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({},DCe(e,n),g2(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"?$xe(n,a.messages,a.messageOffset,a.messageTotal,a.leadingBlockOffset,a.leadingBlockTotal||0,t):t$(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)}Mp.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=SV(m.sessions.find(function(h){return h.id===e.id}));d!==r&&U2(V2(m.sessions));var f=m.sessions.find(function(h){return h.id===a.id})||a;f&&Array.isArray(f.queuedMessages)&&a.id===m.selectedId&&(ak(f),tX(),fd()),a.id===m.selectedId&&(tk(),ld()),a.status&&a.status!=="running"&&m.crossSessionQueue.length>0&&setTimeout(JE,0)}}function pk(e){!e||!m.ws||m.ws.readyState!==WebSocket.OPEN||m.ws.send(JSON.stringify({type:"subscribe",mode:R0(e)?"add":"replace",sessionId:e,blockBudget:O1,byteBudget:N$,omitStructuredOutput:!0,compactTools:!0,capabilities:{ptyAck:!0}}))}function b8e(e,t){if(!e)return t;var r=Object.assign({},e,t,g2(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})})()),f=Array.isArray(t.messages)?c?ik(t.messages):t.messages:[],h=f.length>0&&(function(){var v=f[f.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?xG(n,e&&e.command):[]}function y8e(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 gi(e){var t=e||{},r=Mp.begin("list");return Xb({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 Mp.record(v),b8e(g,v)}),U2(V2(m.sessions));var c=t.preserveNoSelection&&!m.selectedId?null:y8e(m.sessions);c!==void 0&&(m.selectedId=c),m.selectedId!==l&&(m.selectedId?Ed(m.selectedId):My()),rX(),fd(),xd(),$y(),m.selectedId&&m.gitStatusSessionId!==m.selectedId&&xy(m.selectedId);var d=Promise.resolve();if(!t.skipSelectedOutputReload&&m.selectedId)d=Pu(m.selectedId);else if(m.selectedId){var f=m.sessions.find(function(h){return h.id===m.selectedId});cr(f)&&(Np({preserveStickState:!0}),dd(!0))}return d.then(function(){r.isCurrent()&&(m.crossSessionQueue.length>0&&JE(),Al(),x$())})}}).catch(function(n){if(r.isCurrent()){if(n&&n.status===401){o8e();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 R9=null;function N0(){R9||(R9=setTimeout(function(){R9=null,vi()},200))}function vi(){ja("sessions:update"),$y(),m.crossSessionQueue.length>0&&Al()}function $y(){var e=m.sessions.find(function(r){return r.id===m.selectedId});e||(Bp(!1),Ta()),C6e();var t=document.getElementById("output");!m.terminal&&t&&e&&!cr(e)&&Ps(),m.terminal&&t&&e&&!cr(e)&&!t.contains(m.terminal.element)&&(gy(),Ps()),e||(m.terminalSessionId=null,m.terminalOutput=""),m.terminal&&e&&m.currentView==="terminal"&&Dl("view"),bX(),mI(Ma()),gI(),tk(),ja("shell:chrome")}function Pu(e){var t=Mp.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="+O1+"&byteBudget="+N$+"&output=omit"),Ru(n,{credentials:"same-origin"}).then(async function(a){if(!(!a||!t.isCurrent()||m.selectedId!==e))return a.status===404?{missing:!0}:At(a)}).then(function(a){if(!(!t.isCurrent()||m.selectedId!==e)&&a){if(a.missing){m.selectedId===e&&(UE(),m.selectedId=null,xd()),gi();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})),nr(a,"latest"),$y(),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"):(oy(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)),sa(!1),a.sessionKind!=="structured"&&_E(l)}}).catch(function(a){t.isCurrent()&&console.error("[wand] loadOutput failed:",a)}).finally(function(){t.finish()})}var P0=new Map;function w8e(){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),EV(e,o,"loading");var c=n>0?"/api/sessions/"+encodeURIComponent(e)+"/messages?turn="+r+"&blockOffset="+n+"&blockLimit="+O1+"&blockBudget="+O1:"/api/sessions/"+encodeURIComponent(e)+"/messages?before="+r+"&blockBudget="+O1;return c+="&byteBudget="+N$,Ru(c,{credentials:"same-origin"}).then(function(d){return At(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 f=Array.isArray(t.messages)?t.messages.slice():[];if(!f.length)return;f[0]=Object.assign({},f[0],{content:d.blocks.concat(f[0].content)}),t.messages=f,t.leadingBlockOffset=d.blockOffset,t.leadingBlockTotal=d.blockTotal,l=!0,Mp.record({id:e,messages:f,leadingBlockOffset:d.blockOffset,leadingBlockTotal:d.blockTotal}),e===m.selectedId&&(m.currentMessages=es(t,Fl(t,t.output,!1)),sa(!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,Mp.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)),sa(!0))}}}).catch(function(){}).finally(function(){if(P0.get(e)===a){P0.delete(e);var d=m.sessions.find(function(f){return f.id===e});(l||d&&(d.messageOffset||0)===r&&(d.leadingBlockOffset||0)===n)&&EV(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&&Ka.getRuntime()?.closeWorkspace(),ok.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&&(Vc.closeIfOpen(),gy()),UE(),m.selectedId=e,xd(),t?.updateRoute!==!1&&kG(),m.toolContentCache={},m.messageQueue=[],m.pendingMessages=[],ak(r),rX(),fd(),Np(),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"&&Bp(!1),vi(),ake(e,t);var d=MB(e);sa(!0),m.filePanelOpen&&fCe(c);let f=m.ws&&typeof m.ws.readyState=="number"&&vX(c)&&(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING)?Fxe(e):null;pk(e);var h=(f?f.then(function(g){if(!g&&m.selectedId===e&&d())return Pu(e)}):Pu(e)).then(function(){t?.focusInput!==!1&&d()&&Ml(!0)});return yK(e),xy(e,{force:!0}),h}function Ou(e){ok.clear(),e?.updateRoute!==!1&&kG(),m.selectedId&&(UE(),m.selectedId=null,m.currentTask=null,m.currentMessages=[],yK(null),xd(),Np(),mi(),vi())}function Tp(){ja("layout:drawer")}function vI(){var e=xo();if(!e){var t=m.sidebarPinned?!1:!m.sessionsDrawerOpen;m.sessionsDrawerOpen=t,t&&(m.sidebarCollapsed=!1,Ur("wand-sidebar-collapsed",!1)),Ur("wand-sidebar-open",m.sessionsDrawerOpen),$l(),rg();return}if(m.sessionsDrawerOpen=!m.sessionsDrawerOpen,Ur("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,Ur("wand-sidebar-collapsed",!1),Ur("wand-sidebar-open",!0),$l(),rg();return}if(!m.sessionsDrawerOpen){m.sessionsDrawerOpen=!0,Ur("wand-sidebar-open",!0),m.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}$l()}}function tg(){var e=xo();if(!e){if(!m.sidebarPinned&&!m.sessionsDrawerOpen)return;m.sidebarPinned=!1,m.sessionsDrawerOpen=!1,Ur("wand-sidebar-pinned",!1),Ur("wand-sidebar-open",!1),$l(),rg();return}m.sessionsDrawerOpen&&(m.sessionsDrawerOpen=!1,Ur("wand-sidebar-open",!1),$l())}function x8e(){if(xo()){tg();return}m.sidebarPinned||m.sidebarCollapsed||!m.sessionsDrawerOpen||(m.sessionsDrawerOpen=!1,Ur("wand-sidebar-open",!1),$l(),rg())}function E8e(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&&E8e(r)})}function k8e(e=!1){DX(!m.plusPopoverOpen,!m.plusPopoverOpen&&!!e)}function pd(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 mi(){xo()&&m.sessionsDrawerOpen&&tg()}function rg(){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 mk(){var e=xo();m.sidebarPinned||(m.sidebarPinned=!0,Ur("wand-sidebar-pinned",!0)),m.sidebarCollapsed=!m.sidebarCollapsed,Ur("wand-sidebar-collapsed",m.sidebarCollapsed),m.sidebarCollapsed?m.sessionsDrawerOpen=!1:e?(m.sidebarPinned=!1,m.sessionsDrawerOpen=!0,Ur("wand-sidebar-pinned",!1)):m.sessionsDrawerOpen=!0,Ur("wand-sidebar-open",m.sessionsDrawerOpen),$l(),vi(),C8e(),rg()}function yI(){xo()||(m.sidebarPinned=!m.sidebarPinned,m.sessionsDrawerOpen=!0,Ur("wand-sidebar-pinned",m.sidebarPinned),Ur("wand-sidebar-open",!0),$l(),rg())}function C8e(){ja("layout:collapse-button")}function S8e(e){if(hi(["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){Qe("\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"),Qe("\u6B63\u5728\u542F\u7528\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Qe("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function hk(e){var t=function(){S8e(e)};Op(t)&&t()}function wI(e){lX(e,"merge")}function xI(e){lX(e,"cleanup")}function AV(){if(hi(["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){Qe("\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"),Qe("\u6B63\u5728\u542F\u7528\u8BBE\u7F6E\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Qe("\u8BBE\u7F6E\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function EI(){Op(AV)&&AV()}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(Rp&&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 F8e(){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(pK),{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 D8e(){w$&&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(w$),{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=Q2e(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 By(){return m.terminal&&m.terminal.cols?Promise.resolve():(await tp(),new Promise(function(e){var t=!1,r=function(){t||(t=!0,e())},n=setTimeout(r,2e3);try{Ps({prepare:!0})}catch{}requestAnimationFrame(function(){requestAnimationFrame(function(){m.terminal&&m.terminal.cols&&(clearTimeout(n),r())})})}))}function kI(){var e=bd(),t=K5(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),By().then(function(){return Ru("/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){Qe(a.error,"error");return}var o=String(a.id);return Lp(o,!0),gi({skipSelectedOutputReload:!0}).then(function(){In(o)})}).then(function(){Ml(!0)}).catch(function(){Qe("\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error")})}function gk(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 fk(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:K5(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),By().then(function(){return Ru("/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(f){return f.json()}).then(function(f){if(f.error)throw new Error(String(f.error));if(!f.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u65B0\u4F1A\u8BDD ID\u3002");var h=String(f.id);return Lp(h,!0),gi({skipSelectedOutputReload:!0}).then(function(){return In(h),h})}).then(function(f){return Ml(!0),f}).catch(function(f){throw Qe(f&&f.message?f.message:"\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error"),f})}function A8e(e){if(OK(e)||Exe(e)||pCe(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 x=WE(e.key,ry(m.selectedId,{ctrl:!1,shift:e.shiftKey}));if(x!==null){e.preventDefault(),r.ctrl||m.terminalInteractive?oa(x,r.ctrl?"ctrl_"+e.key.toLowerCase():"interactive_text").catch(function(){}):_$(e.target,x);return}}if(!cr(t)&&m.terminalInteractive&&(r.ctrl||r.shift)&&!e.metaKey&&!e.target?.readOnly){let x=BE(e);if(["up","down","left","right","home","end","pageup","pagedown","delete","tab"].includes(x)){e.preventDefault(),oa(OB(x,ry(m.selectedId,{ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey})),x).catch(function(){});return}}if(zK(e)){qK(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&&_$(n,`
|
|
275
|
+
`);return}e.preventDefault();var a=!!(e.metaKey||e.ctrlKey);zp(a?{interrupt:!0}:void 0);return}if(e.key==="Backspace"){if(m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")){e.preventDefault(),oa("\x7F","backspace").catch(function(){});return}setTimeout(function(){var x=document.getElementById("input-box");x&&jp(x.value,!0)},0);return}if(e.key==="Escape"){if(e.preventDefault(),m.plusPopoverOpen||yf())return;var o=Ma();cr(o)?o&&o.structuredState&&o.structuredState.inFlight&&$$():oa(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||dy();if(c)return;var d=Ma();if(cr(d)){e.preventDefault(),d&&d.structuredState&&d.structuredState.inFlight&&$$();return}e.preventDefault(),oa(O0("ctrl_c"),"ctrl_c");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="d"){var f=document.getElementById("input-box"),h=f&&f.selectionStart!==f.selectionEnd||dy();if(h)return;var g=Ma();if(cr(g)){e.preventDefault();return}e.preventDefault(),oa(O0("ctrl_d"),"ctrl_d");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="l"){e.preventDefault();var v=Ma();if(cr(v))return;oa(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(),oa("","ctrl_x");return}e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&setTimeout(function(){var x=document.getElementById("input-box");x&&jp(x.value)},0)}}var $8e=10*1024*1024;function B8e(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function I8e(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 M8e(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 T8e(e,t){var r=typeof e.name=="string"?e.name.trim():"",n=cy(e.type),a=n?"clipboard-image-"+Date.now()+"-"+((t||0)+1)+PEe(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&&Qe("\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>$8e){Qe("\u6587\u4EF6\u8FC7\u5927\uFF08\u4E0A\u9650 10 MB\uFF09: "+(a.name||"\u526A\u8D34\u677F\u56FE\u7247"),"error");continue}t.push(T8e(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:R0(e)?d6e(e):!!(m.terminal&&m.terminal.modes&&m.terminal.modes.bracketedPasteMode)}var O9=Promise.resolve(),$V=0;function j8e(e,t){var r=O9;return O9=r.then(function(){return $V?yE():void 0}).then(function(){return e.reduce(function(n,a,o){var l=n.then(function(){return $V+=1,oa(a.data,a.shortcutKey,"terminal",t)});return o<e.length-1?l.then(yE):l},Promise.resolve())}),O9}function _8e(e,t,r,n){var a=kK(t,{bracketedPaste:r,provider:n});return a.length?j8e(a,e):Promise.resolve()}function vk(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 cy(d.file&&d.file.type)}).length,c=CI(a,o);return Qe(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 _8e(a,d,c,o).then(function(){var f=l===n.length?n.length+" \u5F20\u56FE\u7247":n.length+" \u4E2A\u9644\u4EF6",h=o==="codex"?"Codex":"CLI";Qe("\u5DF2\u5C06 "+f+"\u7C98\u8D34\u5230 "+h+" \u8F93\u5165\u533A\u3002","info")})}).catch(function(d){Qe("\u9644\u4EF6\u7C98\u8D34\u5931\u8D25: "+(d&&d.message||d),"error")}),!0}function j$(e){var t=Array.from(e||[]);if(t.length&&!(m.terminalInteractive&&vk(t)))for(var r=0;r<t.length;r++)N8e(t[r])}function N8e(e){if(e&&m.selectedId&&!(m.terminalInteractive&&vk([e]))){var t=BX([e]);if(t.length){var r=t[0];I8e(e.type)&&(r.previewUrl=URL.createObjectURL(e)),Lt.edit(m.selectedId,{addAttachment:r}),My()}}}function P8e(e){Lt.edit(m.selectedId,{removeAttachment:e}),My()}function Iy(e){var t=e===void 0?m.selectedId:e;return Lt.read(t).attachments}function My(){var e=Iy(m.selectedId);JCe({resolve:function(){return e.map(function(t,r){return{index:r,name:t.name,sizeLabel:B8e(t.size),size:t.size,previewUrl:t.previewUrl||null}})},onRemove:function(t){P8e(t)}}),Ta()}function IX(e,t){var r=t||Iy(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 BV(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:
|
|
276
|
+
`+t.join(`
|
|
277
|
+
`)+`]
|
|
278
|
+
|
|
279
|
+
`}function IV(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=kxe(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),ma(e),oa(o,"ctrl_"+a.toLowerCase()).catch(function(){}),!0}return oa(r===a&&o!==null?o:r,n.ctrl&&o!==null&&r===a?"ctrl_"+a.toLowerCase():"interactive_text").catch(function(){}),e.value="",ma(e),jp("",!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(cy(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++)cy(t.files[l].type)&&r.push(t.files[l]);return r}function R8e(e){var t=M8e(e);if(!t||!$X(t))return!1;var r=MX(e);return r.length?(e.preventDefault(),vk(r,t)):!1}function O8e(e){var t=MX(e);if(t.length){if(e.preventDefault(),m.terminalInteractive&&vk(t))return;j$(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||""));oa(xK(r,CI(m.selectedId,a)),"paste").catch(function(){});return}var o=document.getElementById("input-box");o&&_$(o,r)}}function TX(e){return Lt.read(e).text}function RE(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,ma(a))}}function Lp(e,t){if(e&&(Lt.edit(e,{clear:!0}),!t&&e===m.selectedId)){var r=document.getElementById("input-box");r&&(r.value="",ma(r),_p(r))}}function jp(e,t){RE(m.selectedId,e,t)}function _$(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 jp(e.value,!0),ma(e),_p(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,ma(t);try{t.setSelectionRange(r.length,r.length)}catch{}}My()}}function bk(e,t){var r=t===void 0?m.selectedId:t;return Fs(m.sessions.find(n=>n.id===r))||L0.get(r)?.pending?!1:!!String(e||"").trim()||Iy(r).length>0}function z8e(){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 Qe=="function"&&Qe("\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(f){var h={};if(f)try{h=JSON.parse(f)}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 f=d.data&&d.data.optimized||"";if(!f)throw new Error("Claude \u8FD4\u56DE\u4E3A\u7A7A\u3002");if(n&&!Lt.edit(n,{text:f,expectedRevision:a.revision})){Qe("\u539F\u8349\u7A3F\u5DF2\u4FEE\u6539\uFF0C\u4FDD\u7559\u6700\u65B0\u5185\u5BB9\u3002","info");return}if(n&&m.selectedId!==n){typeof Qe=="function"&&Qe("\u63D0\u793A\u8BCD\u5DF2\u5199\u56DE\u539F\u4F1A\u8BDD\u8349\u7A3F\u3002","info");return}var h=document.getElementById("input-box");h&&L8e(h,f,n)}).catch(function(d){typeof Qe=="function"&&Qe(d&&d.message||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\u3002","error");var f=document.getElementById("prompt-optimize-btn");f&&m.selectedId===n&&(f.classList.add("is-error"),setTimeout(function(){f.isConnected&&f.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 L8e(e,t,r){if(e){var n=r||m.selectedId,a=String(t||"");if(RE(n,a,!0),!(n&&m.selectedId!==n)){e.value=a,ma(e);try{e.setSelectionRange(a.length,a.length)}catch{}}}}function _p(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 MV;function jX(e,t){MV?.(),MV=e&&t?Qv(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 NX(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=t2(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 f=n.querySelector(".status-bar-dot");f&&(f.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,x=function(C){return C<10?"0"+C:String(C)},w=x(y.getHours())+":"+x(y.getMinutes())+":"+x(y.getSeconds()),k=n.querySelector(".status-bar-timer");k&&(k.hidden=!1,k.textContent=w,k.title="\u8017\u65F6 "+v+"s");var f=n.querySelector(".status-bar-dot");f&&(f.style.display="none"),m._statusBarStartTime=0,setTimeout(function(){n.classList.contains("completed")&&n.parentNode&&n.remove()},3e3)}}function H8e(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 q8e=/\.(png|jpe?g|gif|webp|svg|avif|bmp|ico|heic|heif)$/i;function W8e(e){if(typeof e!="string")return!1;var t=e.trim().split(/[?#]/)[0];return q8e.test(t)}function U8e(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 PX(e){var t=e||document;!t||typeof t.querySelectorAll!="function"||t.querySelectorAll(".tail-marquee-path").forEach(function(r){U8e(r)})}var z0=B(Ee(),1),$1=new Map,V6=new Map,ey=null,B1=null,sd=null;function V8e(){return ey?Promise.resolve(ey):(B1||(B1=globalThis.__wandImportBrowserModule("a1195decf69de8a4").then(e=>(ey=e,B1=null,e),e=>{throw B1=null,e})),B1)}var ty=null,I1=null;function G8e(){return ty?Promise.resolve(ty):(I1||(I1=globalThis.__wandImportBrowserModule("1cdc7dc11ebbb0be").then(e=>(ty=e,I1=null,e),e=>{throw I1=null,e})),I1)}var K8e={subscribe:Lt.subscribe.bind(Lt),revision:()=>Lt.read(m.selectedId).revision,text:()=>Lt.read(m.selectedId).text,isComposing:()=>m.composerComposing};function RX(){for(let[n,a]of V6)n.isConnected||(a.unmount(),V6.delete(n));let e=document.querySelector("[data-composer-avatar-host]"),t=m.sessions.find(n=>n.id===m.selectedId),r=t?{...t,ptyRunning:Yh(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:void 0;if(e){let n=V6.get(e)??(0,qV.createRoot)(e);V6.set(e,n),(0,WV.flushSync)(()=>n.render((0,z0.jsxs)(z0.Fragment,{children:[t?.employeeId?(0,z0.jsx)(s7,{fileActivity:c7(r,t.messages),thinking:$f(r)==="executing",employee:{id:t.employeeId,name:t.employeeName||"\u5458\u5DE5",avatar:t.employeeAvatar}}):null,(0,z0.jsx)(o7,{employeeName:t?.employeeId?t.employeeName||"\u5458\u5DE5":void 0,usage:i7(t?.messages??[]),activity:r,legacyStatus:t?.sessionKind==="structured"})]}))),NX(null,t)}}function OE(e){if(!ty){sd=e,G8e().then(()=>{let f=sd;sd=null,f&&OE(f)},()=>{sd=null});return}ty.mountComposerSurfaces(),RX();let t=m.sessions.find(f=>f.id===m.selectedId);Sa("wand-sender-owned-input","[data-composer-sender] .ant-sender-input { width:100%; }");for(let[f,h]of $1)f.isConnected||(h.root.unmount(),$1.delete(f));let r=document.querySelector("[data-composer-sender]");if(!r)return;let n=t?.sessionKind==="structured",a=$1.get(r);if(!n){if(a){let f=document.activeElement===a.input,h=r;h.moveBefore?h.moveBefore(a.input,null):(r.appendChild(a.input),f&&a.input.focus({preventScroll:!0})),a.root.unmount(),a.chrome.remove(),$1.delete(r),a.input.className="input-textarea"}return}if(a)return;if(!ey){sd=e,V8e().then(()=>{let f=sd;sd=null,f&&OE(f)},()=>{sd=null});return}let o=r.querySelector("#input-box");if(!o)return;let l=document.createElement("div");r.appendChild(l);let c=(0,qV.createRoot)(l);$1.set(r,{root:c,chrome:l,input:o});let{ComposerSender:d}=ey;(0,WV.flushSync)(()=>c.render((0,z0.jsx)(za,{children:(0,z0.jsx)(d,{input:o,resize:e,projection:K8e})})))}function X8e(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 Q8e(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:Ke(t.error,`${r} (HTTP ${e.status})`),status:e.status}}function OX(e){let t=Ke(e.path),r=Ke(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=da(e.gitStatus)?e.gitStatus:void 0;if(o){let l={},c=Ke(o.staged),d=Ke(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 yk(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 Y8e=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=da(l)?OX(l):null;c&&o.push(c)}return{ok:!0,entries:o,truncated:!!n.truncated,total:Aa(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 f of c){let h=da(f)?OX(f):null;h&&d.push(h)}return{ok:!0,results:d,truncated:!!l.truncated}}createFile(e){return yk(this.fetchImpl,"/api/file-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25",e)}createDir(e){return yk(this.fetchImpl,"/api/dir-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25",e)}rename(e,t){return yk(this.fetchImpl,"/api/file-rename",{from:e,to:t},"\u91CD\u547D\u540D\u5931\u8D25",t)}delete(e){return yk(this.fetchImpl,"/api/file-delete",{path:e},"\u5220\u9664\u5931\u8D25",e)}},Z8e=new Y8e,J8e={openFile(){},notify(e,t){vn.toast(e,{tone:t})},async copyText(e){try{return await jf(e),!0}catch{return!1}},async confirmDelete(e,t){let r=await vn.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 vn.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 eSe(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??J8e,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 f(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||Oc(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)||f(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||Oc(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 P=_l(I);if(P===I)break;I=P}for(let P of A)r.expanded.has(P)||await f(P);let j=_l(D),$=D===S,N=$||x(j,D);return N&&!$&&!r.expanded.has(D)&&await f(D),l({activeDir:N?D:j,revealPath:D}),!0}function x(D,S){return r.expanded.get(D)?.entries.some(A=>A.path===S&&A.type==="dir")??!1}function w(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)f(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 f(D.dir),!0)}case"expand":return await f(D.dir),!0;case"refresh":{let S=D.dir??r.root;return S?(await f(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=w(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=w(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 zX=eSe({repository:Z8e}),DI=zX.controller,AI=zX.store;var $I=B(Ee(),1);function BI({id:e,icon:t,label:r,onClick:n}){return(0,$I.jsxs)(Ne,{kind:"ghost",id:e,type:"button",onClick:n,children:[(0,$I.jsx)(Ae,{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===Zm?"pi":e}function MI(e){return e===Zm?"sdk":void 0}var Vi=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":f,triggerRef:h,disabled:g,triggerKind:v,searchable:y,searchPlaceholder:x="\u641C\u7D22",className:w,contentClassName:k,itemClassName:F,side:C="bottom",align:D="start",sideOffset:S=6,collisionPadding:A=12,popupOwner:I=l,onValueChange:j,onOpenChange:$}){let N=Oa(),P=vh();Vi.useEffect(()=>wh(I,P),[I,P]);let O=Vi.useId(),[V,H]=Vi.useState(t),q=e===void 0?V:e,[L,R]=Vi.useState(!1),W=Vi.useRef(!1),[z,Q]=Vi.useState(""),K=Vi.useRef(null),Z=Vi.useRef(null),T=Vi.useCallback(ce=>{if(!ce)return;let ye=requestAnimationFrame(()=>{W.current&&ce.isConnected&&ce.focus({preventScroll:!0})});return()=>cancelAnimationFrame(ye)},[]),U=a??r.find(ce=>ce.value===q)?.label??n,X=ce=>{W.current=ce,R(ce),ce||Q(""),$?.(ce)},Y=LX(r,z),re=[];Y.forEach((ce,ye)=>{ce.group!==Y[ye-1]?.group&&(ce.group||Y[ye-1]?.group)&&re.push({type:"group",key:`group:${ye}`,label:ce.group||"\u5176\u4ED6\u6A21\u578B",children:[]});let Te={key:ce.value,label:ce.label,title:ce.label,disabled:ce.disabled,role:"option","aria-selected":ce.value===q,className:ct("wand-ui-select-item",F)};re.push(Te)}),zn(L,()=>{X(!1),K.current?.focus({preventScroll:!0})}),Vi.useEffect(()=>{g&&L&&X(!1)},[g,L]);let[J,se]=Vi.useState(null),me=Vi.useRef(null),le=Vi.useCallback(()=>J?Promise.resolve():(me.current||(me.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(ce=>{se(()=>ce.DropdownSurface)})),me.current),[J]);Vi.useEffect(()=>{L&&le()},[L,le]);let he=(0,rs.jsxs)(Ne,{ref:ce=>{if(K.current=ce,typeof h=="function")return h(ce);h&&(h.current=ce)},kind:v,id:c,"aria-describedby":d,"aria-invalid":f,disabled:g,className:ct("wand-ui-select-trigger",w),"data-popup-open":L?"":void 0,"data-placeholder":q===void 0&&!a?"":void 0,"aria-controls":L?O:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":L,"aria-label":l,title:o??U,children:[(0,rs.jsx)("span",{className:"wand-ui-select-value",children:U}),(0,rs.jsx)(Ae,{name:"chevronDown",size:14})]}),ae=(0,rs.jsxs)(Ne,{ref:ce=>{if(K.current=ce,typeof h=="function")return h(ce);h&&(h.current=ce)},kind:v,id:c,"aria-describedby":d,"aria-invalid":f,disabled:g,className:ct("wand-ui-select-trigger",w),"data-popup-open":L?"":void 0,"data-placeholder":q===void 0&&!a?"":void 0,"aria-controls":L?O:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":L,"aria-label":l,title:o??U,onClick:()=>{g||X(!0)},children:[(0,rs.jsx)("span",{className:"wand-ui-select-value",children:U}),(0,rs.jsx)(Ae,{name:"chevronDown",size:14})]});return(0,rs.jsx)(sr,{children:J?(0,rs.jsx)(J,{trigger:he,open:L,triggers:["click"],disabled:g,onOpenChange:(ce,ye)=>{ye.source==="trigger"&&X(ce)},getPopupContainer:()=>N??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:O,items:re,role:"listbox",selectable:!0,selectedKeys:q===void 0?[]:[q],onClick:({key:ce})=>{H(ce),j?.(ce),X(!1),K.current?.focus({preventScroll:!0})}},popupRender:ce=>(0,rs.jsxs)("div",{ref:Z,"data-wand-popup-owner":I,children:[y&&(0,rs.jsx)(bf,{ref:T,type:"search","aria-label":x,placeholder:x,value:z,onChange:ye=>Q(ye.currentTarget.value),startSlot:(0,rs.jsx)(Ae,{name:"search",size:14}),onKeyDown:ye=>{if(!ye.nativeEvent.isComposing&&(ye.key==="ArrowDown"||ye.key==="ArrowUp")){ye.preventDefault();let Te=Z.current?.querySelectorAll('[role="option"]:not([aria-disabled="true"])');(ye.key==="ArrowUp"?Te?.[Te.length-1]:Te?.[0])?.focus()}}}),Y.length?ce:(0,rs.jsx)("div",{role:"status",children:"\u6CA1\u6709\u5339\u914D\u7684\u9009\u9879"})]})}):ae})}function LX(e,t){return t.trim()?e.filter(r=>tSe(rSe(r),t)):e.slice()}function tSe(e,t){return t.trim().toLowerCase().split(/\s+/).filter(Boolean).every(r=>e.toLowerCase().includes(r))}function rSe(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=L7(()=>{a()});return H7().length>0&&a(),()=>{r=!1,o()}},[e]),(0,qX.jsx)(sr,{children:e?(0,qX.jsx)(e,{}):null})}var nSe=()=>Pa()&&window.document.documentElement;var nQ="wand-legacy-pwa-cleanup-v1",aSe=["wand-static-","wand-runtime-"];function xk(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 iSe(e){return xk(e.installing)||xk(e.waiting)||xk(e.active)}function oSe(){try{return localStorage.getItem(nQ)==="done"}catch{return!1}}function sSe(){try{localStorage.setItem(nQ,"done")}catch{}}async function lSe(){if(!("serviceWorker"in navigator))return!0;try{let e=(await navigator.serviceWorker.getRegistrations()).filter(iSe);return await Promise.all(e.map(t=>t.unregister())),!0}catch{return!1}}async function uSe(){if(!("caches"in window))return!0;try{let e=(await caches.keys()).filter(t=>aSe.some(r=>t.startsWith(r)));return await Promise.all(e.map(t=>caches.delete(t))),!0}catch{return!1}}async function cSe(){if(oSe())return;let e="serviceWorker"in navigator&&xk(navigator.serviceWorker.controller),[t,r]=await Promise.all([lSe(),uSe()]);!t||!r||(sSe(),e&&location.reload())}cSe();var dSe=B(si(),1),fSe="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 pSe(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(fSe));if(r!=null)return r}catch{}return!0}var mSe=B(_(),1),ng=B(_(),1),aQ=B(_(),1),ns=B(Ee(),1),hSe=aQ.lazy(()=>globalThis.__wandImportBrowserModule("4d02d91878bb9936").then(e=>({default:e.RestartProgress})));function gSe({controller:e=Il}){let t=(0,ng.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),r=nB(t),n=(0,ng.useRef)(null),a=(0,ng.useRef)(null),o=(0,ng.useRef)(null);(0,ng.useEffect)(()=>{if(!t.open)return;let d=a.current?.ownerDocument??document,f=h=>{a.current&&(h.stopPropagation(),a.current.contains(h.target)||(n.current??o.current)?.focus({preventScroll:!0}))};return d.addEventListener("focusin",f,!0),()=>{d.removeEventListener("focusin",f,!0)}},[t.open]),(0,ng.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)(Lc,{open:t.open,onOpenChange:()=>{},title:r.title,description:r.description,className:"wand-restart-surface",width:{xs:"calc(100vw - 32px)",sm:520},zIndex:(yh.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)(zt.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)(aQ.Suspense,{fallback:null,children:(0,ns.jsx)(hSe,{percent:c})}),(0,ns.jsxs)(zt.Text,{type:"secondary",className:"wand-restart-attempts",children:["\u5DF2\u68C0\u67E5 ",t.attempts," / ",t.maxAttempts," \u6B21"]})]}):(0,ns.jsx)(Ne,{ref:n,className:"wand-restart-manual","data-wand-autofocus":"true",kind:"primary",onClick:()=>e.manualRefresh(),children:"\u624B\u52A8\u5237\u65B0"})]})})})}var vSe=B(_(),1),bSe=B(tr(),1),ySe=B(Ee(),1);function wSe(){return(0,vSe.useSyncExternalStore)(Z0.subscribe,Z0.getSnapshot,Z0.getSnapshot).mounts.map(e=>(0,bSe.createPortal)((0,ySe.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 xSe=B(_(),1),ESe=B(tr(),1),as=B(Ee(),1);function kSe(e){return e==="mode"?"\u6743\u9650\u6A21\u5F0F":e==="runtime"?"\u6A21\u578B\u4E0E\u601D\u8003\u8BBE\u7F6E":"\u4F1A\u8BDD\u8BBE\u7F6E"}function wk(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 CSe({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":kSe(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:wk(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:wk(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:wk(t,"model")}),a&&(0,as.jsx)(Mr,{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)(Ae,{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:wk(t,"thinking")})]})]})}function SSe(){return(0,xSe.useSyncExternalStore)(J0.subscribe,J0.getSnapshot,J0.getSnapshot).mounts.map(e=>(0,ESe.createPortal)((0,as.jsx)(CSe,{mount:e}),e.target,e.key))}var _I=B(_(),1),UX=B(tr(),1),kk=B(Ee(),1),FSe=e=>`wand-pi-settings-panel-${e.sessionId}`;function DSe({mount:e}){let t=e.open;return(0,kk.jsx)(Ne,{kind:"ghost",type:"button",className:"btn-circle btn-circle-action composer-pi-settings-toggle","data-open":t?"true":"false","aria-expanded":t,"aria-controls":FSe(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:()=>{Kn.toggle(e.sessionId)},children:(0,kk.jsx)(Ae,{name:t?"close":"gear",size:17,strokeWidth:1.9})})}function ASe(){let e=_I.useSyncExternalStore(Kn.subscribe,Kn.getSnapshot,Kn.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,UX.createPortal)((0,kk.jsx)(DSe,{mount:a},`${a.sessionId}-toggle`),a.toggleTarget,`${a.key}-toggle`),...t?[(0,UX.createPortal)((0,kk.jsx)(t,{mount:a},a.sessionId),a.target,a.key)]:[]])}var $Se=B(_(),1),BSe=B(tr(),1),kd=B(Ee(),1);function ISe({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)(Ne,{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)(Ae,{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 MSe(){return(0,$Se.useSyncExternalStore)(K0.subscribe,K0.getSnapshot,K0.getSnapshot).mounts.map(e=>(0,BSe.createPortal)((0,kd.jsx)(ISe,{mount:e}),e.target,e.key))}var TSe=B(_(),1),jSe=B(tr(),1),OI=B(Ee(),1);function _Se({mount:e}){return(0,OI.jsx)(sr,{children:(0,OI.jsx)(La,{id:"action-error",role:"alert",type:"error",title:e.message,showIcon:!0})})}function NSe(){return(0,TSe.useSyncExternalStore)(G0.subscribe,G0.getSnapshot,G0.getSnapshot).mounts.map(e=>(0,jSe.createPortal)((0,OI.jsx)(_Se,{mount:e}),e.target,e.key))}var PSe=B(_(),1),RSe=B(tr(),1),ti=B(Ee(),1);function OSe({enabled:e,pending:t=!1,onToggle:r}){return(0,ti.jsxs)(Ne,{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)(Ae,{name:e?"shieldCheck":"shield",size:12}),e?"\u81EA\u52A8":"\u624B\u52A8"]})}function zSe({stats:e}){return e?(0,ti.jsx)(ol,{ariaLabel:"\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",contentId:"approval-stats-popup",trigger:(0,ti.jsxs)(Ne,{id:"approval-stats-badge",kind:"ghost",size:"medium","aria-label":"\u672C\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",children:[(0,ti.jsx)(Ae,{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 LSe({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)(Ne,{id:"approve-permission-btn",size:"medium",kind:"primary",disabled:t,onClick:()=>r("approve"),children:"\u6279\u51C6"}),e.requestId&&(0,ti.jsx)(Ne,{id:"approve-turn-permission-btn",size:"medium",disabled:t,onClick:()=>r("approve-turn"),children:"\u672C\u8F6E\u5141\u8BB8"}),(0,ti.jsx)(Ne,{id:"deny-permission-btn",size:"medium",kind:"danger",disabled:t,onClick:()=>r("deny"),children:"\u62D2\u7EDD"})]})]})}function HSe(e,t){return e.kind==="permissions"?(0,ti.jsx)(LSe,{permission:e.permission,pending:e.pending,onAction:e.onAction}):e.kind==="auto-approve"?(0,ti.jsx)(OSe,{enabled:e.enabled,pending:e.pending,onToggle:e.onToggle}):(0,ti.jsx)(zSe,{stats:e.stats,revision:t})}function qSe(){let e=(0,PSe.useSyncExternalStore)(U0.subscribe,U0.getSnapshot,U0.getSnapshot);return e.mounts.map(t=>(0,RSe.createPortal)(HSe(t,e.revision),t.target,t.key))}var Vr=B(Ee(),1);function WSe({portalContainer:e,settingsPresentation:t="workspace"}){let r=(0,mSe.useSyncExternalStore)(ws.subscribe,ws.getSnapshot,ws.getSnapshot).activeDialog;return(0,Vr.jsxs)(bh,{container:e,children:[t==="workspace"?(0,Vr.jsxs)(Vr.Fragment,{children:[(0,Vr.jsx)(wSe,{}),(0,Vr.jsx)(SSe,{}),(0,Vr.jsx)(ASe,{}),(0,Vr.jsx)(U$,{}),(0,Vr.jsx)(MSe,{}),(0,Vr.jsx)(NSe,{}),(0,Vr.jsx)(W$,{}),(0,Vr.jsx)(qSe,{}),(0,Vr.jsx)(mB,{}),(0,Vr.jsx)(Z$,{}),(0,Vr.jsx)(J$,{}),(0,Vr.jsx)(eB,{})]}):null,t==="page"?(0,Vr.jsx)(HE,{presentation:"page",showRestart:Il.showRestart}):null,t==="workspace"?(0,Vr.jsxs)(Vr.Fragment,{children:[(0,Vr.jsx)(V$,{}),(0,Vr.jsx)(G$,{}),(0,Vr.jsx)(K$,{}),(0,Vr.jsx)(X$,{}),(0,Vr.jsx)(Q$,{}),(0,Vr.jsx)(Y$,{})]}):null,(0,Vr.jsx)(gSe,{}),(0,Vr.jsx)(jI,{}),r?(0,Vr.jsx)(Mb,{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)=>{ws.completeDialog(r.id,{dismissed:!1,action:n,inputValue:a})},onDismiss:()=>{ws.completeDialog(r.id,{dismissed:!0})}},r.id):null]})}var USe=["profile","notifications","display","ai","local-models","general","connectors","security","presets","about"];function VSe(e){let t=new URLSearchParams(e).get("settings");return t==="directory"||USe.includes(t)?t:null}function GSe(){let e=!1,t=Da.getSnapshot(),r=()=>{e=!0;let o=VSe(window.location.search),l=Da.getSnapshot();o?((!l.open||(o==="directory"?l.detail:l.tab!==o||!l.detail))&&mo.open(o==="directory"?void 0:o),Da.setNested(new URLSearchParams(window.location.search).get("settingsNested")==="environment"?"environment":null)):mo.close(),t=Da.getSnapshot(),e=!1};r();let n=Da.subscribe(()=>{let o=Da.getSnapshot();e||((o.open!==t.open||o.tab!==t.tab||o.detail!==t.detail||o.nested!==t.nested)&&Va({settings:o.open?o.detail?o.tab:"directory":null,settingsNested:o.open?o.nested:null}),t=o)}),a=go(r);return()=>{n(),a()}}var VX=B(Ee(),1),GX="overlay-root",KSe="wand-react-ui-mount",NI=null;function KX(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 XSe(){let e=document.getElementById(GX);if(e)return e;let t=document.createElement("div");return t.id=GX,t.dataset.wandUiRoot="",document.body.appendChild(t),t}function QSe(){window.__wandReactSettings=mo,window.__wandReactNewSession=Ia,window.__wandReactFolderPicker=nd,window.__wandReactQuickCommit=Nc,window.__wandReactWorktreeMerge=Pc,window.__wandReactRestartOverlay=Il,window.__wandReactFilePreview=Es,window.__wandReactMissions=Tf,window.__wandReactWorkspaces=Xf,window.__wandReactGithubIssues=Ab,window.__wandReactTaskBoard=En,n1()}function YSe(){let e=XSe(),t=pSe(),r=Gc();if(!NI){r||GSe(),$h();let n=KX(e,KSe,"wand-ui-mount"),a=KX(e,Vv,"wand-ui-portals");NI=(0,dSe.createRoot)(n),NI.render((0,VX.jsx)(za,{children:(0,VX.jsx)(WSe,{portalContainer:a,settingsPresentation:r?"page":"workspace"})}))}return r?window.__wandReactSettings=mo:QSe(),e.dataset.reactUi=t?"enabled":"fallback",t?(window.__wandReactUi=vn,vn):(delete window.__wandReactUi,null)}var XX=null;function ZSe(e){ja("working-dir")}var JSe={getInitialPath:ts,onOpen(){hi(["folderPicker"])},onClose(){},applySelection(e){GE(e),ZSe(e)}};function QX(){return hi(["folderPicker"])?nd.open(ts())?!0:(Qe("\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 e4e(){return Op(()=>{QX()})?QX():!1}function t4e(){XX||(XX=FA(JSe))}var YX=null;function r4e(){YX||(YX=ZD({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,n4e={onOpen(){hi(["newSession"]),m.sessionsDrawerOpen=!1,Ur("wand-sidebar-open",!1),Tp()},onClose(){},getContext(){return{effectiveCwd:ts(),selectedModels:{claude:Os("claude"),codex:Os("codex"),opencode:Os("opencode"),grok:Os("grok"),qoder:Os("qoder"),pi:Os("pi")},thinkingEffort:m.chatThinking||"off"}},rememberModel(e,t){Dy(e,t||"")},async prepareCreate(e,t){return e==="structured"?{}:(await tp(),Ps({prepare:!0}),await By(),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),Lp(t.id,!0),GE(e.cwd),await gi({skipSelectedOutputReload:!0}),e.workspaceTaskId){await bs.reload(e.workspaceTaskId).catch(()=>{});let n=Ka.getRuntime();if(Wr.getSnapshot().taskId===e.workspaceTaskId&&n){let a=Wr.getSnapshot().layout,o=a?a.windows.flatMap(c=>vo(c.layout)):[],l=xu(a,[...o,t.id],t.id);n.saveTaskLayout(l)}ho()}if(Dr.suspend(),r&&!i0.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),mi(),r&&(Ed(t.id),zp(void 0)),window.setTimeout(()=>Ml(!0),0)}};function a4e(){ZX||(ZX=SD(n4e))}function i4e(){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),Ay(t))})}function o4e(e){return e==="claude-history"?"history":e==="codex-history"?"codex":e==="opencode-history"||e==="qoder-history"?"history":"sessions"}function s4e(e,t){return Cy(`\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"?UB(t):e==="claude-history"?LB(t,null):e==="opencode-history"?rk("opencode",t):e==="qoder-history"?rk("qoder",t):zB(t)})}function iQ(e){m.sessionTool=e,m.preferredCommand=e}function PI(e){return iQ(e),kI()}function l4e(){return iQ("claude"),fk().then(e=>(Ml(!0),e))}function u4e(e){let t=m.sessions.find(n=>n.id===m.selectedId);if(e==="cwd")return by("cwd","\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u590D\u5236");if(e==="sessionId")return by("id","\u4F1A\u8BDD ID \u5DF2\u590D\u5236");let r=t?.provider;return by("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 c4e(){return{goHome:Ou,refreshPage:()=>window.location.reload(),terminalDisplay:e=>{e==="zoom-in"?Ip(.25):e==="zoom-out"?Ip(-.25):e==="reset"?Sy(1):(KE(),Np({preserveStickState:!0}),dd(!0))},openNewSession:e=>hk(e),openMissions:()=>{Tf.open()},openNewProject:e=>hk(e),quickStartClaudeTerminal:()=>PI("claude"),quickStartCodexTerminal:()=>PI("codex"),quickStartOpenCodeTerminal:()=>PI("opencode"),quickStartStructuredSession:l4e,selectSession:(e,t)=>{let r=In(e,t);return mi(),r},resumeSession:e=>qB(e).then(t=>(mi(),t)),resumeHistory:(e,t,r)=>WB(e,t,r),deleteItem:s4e,mergeSession:wI,cleanupSession:xI,toggleManageMode:KB,toggleManagedSelection:(e,t)=>YB(o4e(e),t),selectAllManaged:XB,clearManagedSelection:QB,deleteManagedSelection:ZB,toggleSessionsDrawer:vI,openSessionsDrawer:bI,closeSessionsDrawer:tg,toggleSidebarPin:yI,toggleSidebarCollapsed:mk,expandSidebarGroup:e=>{Ur(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",!0),mk()},setSidebarGroupExpanded:(e,t)=>{Ur(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",t)},toggleFilePanel:JB,closeFilePanel:eI,openFolderPicker:()=>{e4e()},toggleTopbarMenu:()=>{m.topbarMoreOpen=!m.topbarMoreOpen},copyTopbarField:u4e,openGitCommit:BB,openSettings:EI,backToNative:lI,switchServer:sk,logout:uI}}function d4e(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 f4e(){JX||(JX=B7({onOpen(){hi(["missions"]),mi()},onClose(){},effectiveCwd:ts,async openSession(e){await gi({skipSelectedOutputReload:!0}),m.sessions.some(t=>t.id===e)&&(In(e),mi())}}))}function p4e(e,t){let r=new Map;function n(d){let f=r.get(d);return f||(f={epoch:0,automaticBlocked:!1},r.set(d,f)),f}async function a(d,f){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 f.revision=h.layoutRevision??0,h}function o(d,f){d.pending?.resolve(f),d.pending=void 0}async function l(d,f){for(;f.pending;){let h=f.pending;f.pending=void 0;try{f.revision===void 0&&await a(d,f);let g=await e.saveTaskLayout(d,h.layout,f.revision);f.revision=g.layoutRevision,h.automatic||(f.automaticBlocked=!1),t.onSaved(d,g.layoutRevision),h.resolve("saved")}catch(g){let v=f.epoch,y=h.automatic&&g instanceof $a&&g.status===409;f.automaticBlocked=!y,o(f,"failed"),f.revision=void 0,y||t.onError(d,g);try{let x=await a(d,f);f.epoch===v&&t.onRestore(d,x)}catch{}h.resolve("failed")}}}function c(d,f){f.running||(f.running=l(d,f).finally(()=>{f.running=void 0,f.pending&&c(d,f)}))}return{remember(d,f){let h=n(d);h.running||(h.revision=f??0)},canSaveAutomatically(d){return!r.get(d)?.automaticBlocked},save(d,f,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:f,resolve:y,automatic:h.automatic===!0}});return c(d,g),v},isSaving(d){return!!r.get(d)?.running},async flush(d){let f=r.get(d);for(;f?.running;)await f.running}}}var eQ=null,Ty=0;function qp(){return Wr.getSnapshot().taskId}var Hp=p4e(an,{onSaved(e,t){qp()===e&&cl({layoutRevision:t})},onError(e,t){let r=t instanceof Error?t.message:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002";Qe(`\u4EFB\u52A1 ${e} \u7684\u5E03\u5C40\u672A\u4FDD\u5B58\uFF1A${r}`,"danger")},onRestore(e,t){if(qp()!==e)return;let r=Uf(t.sessions).map(c=>c.id),n=Cs(t.layout),a=n?.kind==="session"?n.sessionId:r[0],o=xu(t.layout,r,a);Wf(o)?.layout.type!=="split"&&wy();let l=Cs(o);l?.kind==="session"?In(l.sessionId):Ou(),cl({layout:o,layoutRevision:t.layoutRevision})}});function RI(e,t,r){return r?.automatic&&!Hp.canSaveAutomatically(e)?Promise.resolve("failed"):(qp()===e&&(Wf(t)?.layout.type!=="split"&&wy(),cl({layout:t})),Hp.save(e,t,r))}function m4e(){if(eQ)return;let e=vs(()=>{let r=qp();r&&Hp.flush(r).then(async()=>{let n=await bs.reload(r);qp()===r&&(Hp.remember(r,n.layoutRevision),cl({taskName:n.name,cwd:n.cwd,workspaceId:n.workspaceId,layout:n.layout,layoutRevision:n.layoutRevision}))}).catch(()=>{})}),t=FD({onOpen(){hi(["workspaces"]),mi()},onClose(){},effectiveCwd:ts,openWorkspace(r){++Ty,W0(null),cl({workspaceId:r.id,workspaceName:r.name,taskId:null,taskName:"",cwd:r.cwd,provider:r.defaultProvider,layout:null}),ja("workspace:open"),Ou(),mi()},closeWorkspace(){++Ty,W0(null),kD(),ja("workspace:close")},refreshSessions:Tl,selectSession(r){In(r),mi()},async openTask(r){let n=++Ty,a=r.preferredSessionId||m.selectedId;W0(r.taskId),cl({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"),Ou({updateRoute:!r.restoreRoute});let o=Hp.isSaving(r.taskId);if(await Hp.flush(r.taskId),!(n!==Ty||r.navigationCurrent?.()===!1))return(o?bs.reload(r.taskId):bs.load(r.taskId)).then(l=>{if(n!==Ty||r.navigationCurrent?.()===!1)return;let c=Uf(l.sessions).map(v=>v.id),d=Cs(l.layout),f=a&&c.includes(a)?a:d?.kind==="session"&&c.includes(d.sessionId)?d.sessionId:c[0],h=c.length>0?xu(l.layout,c,f):xu(l.layout,[],null),g=Cs(h);g?.kind==="session"&&In(g.sessionId,{updateRoute:!r.restoreRoute}),Hp.remember(r.taskId,l.layoutRevision),cl({layout:h,layoutRevision:l.layoutRevision}),!r.restoreRoute&&JSON.stringify(h)!==JSON.stringify(l.layout)&&RI(r.taskId,h,{automatic:!0}),mi()}).catch(()=>{})},newTaskSession(r){return Promise.resolve(gk(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(()=>{}),qp()===r.taskId){let o=Wr.getSnapshot().layout,l=o?o.windows.flatMap(d=>vo(d.layout)):[],c=xu(o,[...l,a],a);RI(r.taskId,c)}return ho(),a}})},startWorktreeMergeAgent(r){return gk(r.cwd,{workspaceId:r.workspaceId,provider:r.provider,mode:"managed",systemPrompt:r.systemPrompt,initialInput:r.prompt})},saveTaskLayout(r,n){let a=qp();if(a)return RI(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 Cy(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=>V0(l)),await gi({preserveNoSelection:!0}),!0}catch(l){return await gi({preserveNoSelection:!0}).catch(()=>{}),Qe(l instanceof Error?l.message:"\u65E0\u6CD5\u5173\u95ED\u7EC8\u7AEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger"),!1}},mountSessionTerminal(r,n){return XE(r,n)},unmountSessionTerminal(r){V0(r)},getSessionTerminalScale(r){return wp(r)},setSessionTerminalScale(r,n){return sy(r,n)},disposeAllSessionTerminals(){wy()},modelPreference(r){return Os(r)||""},rememberModelPreference(r,n){Dy(r,n||"")},toast(r,n){Qe(r,n)}});eQ=()=>{e(),t()}}var tQ=!1,Wp=!1,ag=0,zI=0,Ek=!1,LI=!1,_y="";function jy(){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){!Wp||ag&&!t||Ek||(Ek=!0,queueMicrotask(()=>{if(Ek=!1,!Wp||ag&&!t)return;let r=Wr.getSnapshot(),n=r.layout?.windows.find(l=>l.id===r.layout?.activeWindowId),a=new URLSearchParams(Hn());LI=!0;let o=e==="push"?tD(Hn(),m.selectedId||null):e;Va({...a.has("view")?{}:{view:"workspace"},session:m.selectedId||null,workspace:r.workspaceId,workspaceTask:r.taskId,window:n?.id??null,tab:n?.activeTabId??null},o),LI=!1,_y=jy()}))}async function rQ(){if(!yu()){Wp=!0;let o=Dr.getSnapshot();return o.active===!0||o.directory?(Va({view:o.directory?"contacts":"chats",sidebar:o.mode,conversation:o.selectedId,chatFilter:o.listFilter,chatActivity:String(o.activityOnly),chatQuery:o.filters["list-query"]??""},"replace"),_y=jy()):HI("replace"),!1}let e=++zI,t=jy();_y=t;let r=new URLSearchParams(Hn()),n=Ka.getRuntime();if(!n)return!0;ag++,my("");let a=()=>e===zI&&jy()===t;try{let o=r.get("session"),l=r.get("workspace"),c=r.get("window"),d=r.get("tab"),f=o?m.sessions.find(g=>g.id===o):null;if(o&&!f)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")||f?.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(f&&f.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 x=v.windows.find(w=>w.id===c);if(!x)throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u53E3\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(d&&!ll(x.layout,d))throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u683C\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(o&&!vo(x.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(w=>w.id===c&&d?{...w,activeTabId:d}:w)},cl({layout:v})}let y=Cs(v);o?await In(o,{focusInput:!1,updateRoute:!1}):y?.kind==="session"?await In(y.sessionId,{focusInput:!1,updateRoute:!1}):Ou({updateRoute:!1})}else{if(hy(()=>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(f&&f.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");hy(()=>n.openWorkspace(v))}o?await In(o,{focusInput:!1,updateRoute:!1}):Ou({updateRoute:!1})}}catch(o){a()&&(hy(()=>n.closeWorkspace()),Ou({updateRoute:!1}),my(o instanceof Error?o.message:"\u94FE\u63A5\u76EE\u6807\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u8BD5\u3002"))}finally{ag--,Wp=!0}return!0}function h4e(){tQ||(tQ=!0,uB(()=>{(ag||!Wp)&&(zI++,Wp=!0),HI("push",!0)}),cB(rQ),Wr.subscribe(()=>HI()),go(()=>{let e=jy();!Wp&&!ag||LI||e===_y||(_y=e,!Ek&&rQ())}))}g3({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)});v3(window);r4e();i4e();EB(c4e());window.__wandDesktopTools=d4e({isReady:YE,setFilePanelOpen:Q0,hasUnsavedFiles:()=>Zb.hasDirty()||Nf.getSnapshot().dirty,isSavingFile:()=>Qc.getSnapshot().saving||Nf.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{}})();YSe();a4e();f4e();m4e();h4e();t4e();sI({getSession(e){return m.sessions.find(t=>t.id===e)??null},refreshSessions(){return Tl()},toast(e,t){Qe(e,t)}});(function(){try{window.__openLocalPreview=e=>iy(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 Pp({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){Qe(e,t)},onSaved(){return DI.execute({type:"refresh"}).then(function(){})}});export{MD as shared100_a,Fs as shared100_b,P2 as shared101_a,R2 as shared101_b,Vc as shared102_a,zge as shared103_a,Lge as shared103_b,Gc as shared103_c,Hge as shared103_d,QD as shared103_e,Wge as shared104_a,tp as shared104_b,Xb as shared105_a,U2 as shared105_b,V2 as shared105_c,Qb as shared105_d,W2 as shared105_e,np as shared105_f,tve as shared105_g,ap as shared105_h,oA as shared105_i,YD as shared106_a,ZD as shared107_a,i0 as shared107_b,H2 as shared108_a,s0 as shared108_b,Vb as shared108_c,Yq as shared108_d,aA as shared108_e,Zq as shared108_f,Gb as shared108_g,Gge as shared108_h,Kge as shared108_i,Xge as shared108_j,iA as shared108_k,ave as shared109_a,sA as shared109_b,ive as shared109_c,ove as shared109_d,sve as shared109_e,lve as shared109_f,lA as shared109_g,A8 as shared10_a,ai as shared10_b,Fi as shared10_c,uve as shared110_a,aW as shared110_b,Zb as shared110_c,Qc as shared110_d,t1 as shared111_a,f0 as shared111_b,p0 as shared111_c,cA as shared111_d,dA as shared111_e,fA as shared111_f,r1 as shared112_a,hl as shared112_b,mA as shared112_c,hA as shared112_d,n1 as shared113_a,En as shared113_b,gl as shared113_c,EA as shared114_a,kA as shared114_b,td as shared114_c,m0 as shared114_d,wA as shared114_e,Ove as shared114_f,X2 as shared114_g,bA as shared114_h,Lve as shared114_i,Hve as shared114_j,ip as shared114_k,bW as shared114_l,Vve as shared114_m,Gve as shared114_n,Kve as shared114_o,Yve as shared114_p,h0 as shared114_q,xA as shared114_r,wW as shared114_s,Zve as shared114_t,a1 as shared115_a,Jc as shared115_b,dW as shared115_c,ed as shared115_d,Su as shared115_e,vA as shared115_f,_ve as shared115_g,Dr as shared116_a,g0 as shared116_b,abe as shared116_c,nd as shared117_a,SA as shared117_b,FA as shared117_c,IA as shared118_a,AA as shared119_a,$A as shared119_b,_ as shared11_a,MA as shared120_a,c9 as shared121_a,JA as shared122_a,S0 as shared122_b,F0 as shared122_c,l6 as shared122_d,YA as shared122_e,GA as shared122_f,ZA as shared122_g,lp as shared123_a,t9 as shared124_a,n9 as shared125_a,m6 as shared126_a,h6 as shared126_b,g6 as shared126_c,v6 as shared126_d,f9 as shared127_a,v9 as shared128_a,wl as shared129_a,ct as shared12_a,xU as shared130_a,kU as shared130_b,b1 as shared130_c,El as shared130_d,b6 as shared131_a,X8e as shared132_a,_l as shared132_b,Q8e 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,LX as shared135_b,jI as shared136_a,nSe as shared137_a,Ct as shared13_$,ui as shared13_$a,fv as shared13_A,i4 as shared13_Aa,S5 as shared13_B,Mo as shared13_Ba,QZ as shared13_C,nu as shared13_Ca,F5 as shared13_D,au as shared13_Da,Rn as shared13_E,vv as shared13_Ea,Ea as shared13_F,bc as shared13_Fa,yc as shared13_G,bv as shared13_Ga,Qr as shared13_H,z5 as shared13_Ha,or as shared13_I,Nt as shared13_Ia,JS as shared13_J,ZP as shared13_Ja,xr as shared13_K,li as shared13_Ka,no as shared13_L,Wm as shared13_La,hJ as shared13_M,mv as shared13_Ma,Hr as shared13_N,vc as shared13_Na,E5 as shared13_O,nn as shared13_Oa,Ai as shared13_P,qm as shared13_Pa,oi as shared13_Q,p5 as shared13_Qa,wc as shared13_R,Om as shared13_Ra,tr as shared13_S,N5 as shared13_Sa,si as shared13_T,P5 as shared13_Ta,VS as shared13_U,R5 as shared13_Ua,GS as shared13_V,Um as shared13_Va,zre as shared13_W,hv as shared13_Wa,Qn as shared13_X,Yd as shared13_Xa,Xr as shared13_Y,gv as shared13_Ya,Ra as shared13_Z,Vd as shared13_Za,$i as shared13__,O5 as shared13__a,te as shared13_a,Er as shared13_aa,kt as shared13_ab,WS as shared13_b,EJ as shared13_ba,s4 as shared13_bb,Km as shared13_c,kJ as shared13_ca,Vm as shared13_cb,p4 as shared13_d,pv as shared13_da,pn as shared13_db,Rne as shared13_e,lt as shared13_ea,Ec as shared13_eb,RR as shared13_f,nS as shared13_fa,eR as shared13_fb,Gt as shared13_g,jt as shared13_ga,u4 as shared13_gb,xt as shared13_h,kP as shared13_ha,rR as shared13_hb,Pa as shared13_i,$5 as shared13_ia,tu as shared13_ib,US as shared13_j,gc as shared13_ja,Ute as shared13_jb,er as shared13_k,e4 as shared13_ka,Jd as shared13_kb,iP as shared13_l,wt as shared13_la,IR as shared13_lb,wr as shared13_m,_t as shared13_ma,q5 as shared13_mb,fr as shared13_n,xc as shared13_na,ka as shared13_nb,zm as shared13_o,Pm as shared13_oa,Gm as shared13_ob,Xs as shared13_p,ve as shared13_pa,wv as shared13_pb,Lm as shared13_q,M5 as shared13_qa,H5 as shared13_qb,cP as shared13_r,$P as shared13_ra,mn as shared13_rb,ln as shared13_s,St as shared13_sa,W5 as shared13_sb,jo as shared13_t,Zd as shared13_ta,BR as shared13_tb,ru as shared13_u,pr as shared13_ua,ci as shared13_ub,fP as shared13_v,yv as shared13_va,Xm as shared13_vb,Qs as shared13_w,o4 as shared13_wa,Cne as shared13_wb,pP as shared13_x,ao as shared13_xa,Ym as shared13_xb,C5 as shared13_y,Bi as shared13_ya,Yn as shared13_yb,dv as shared13_z,L5 as shared13_za,Ee as shared13_zb,a7 as shared14_a,i7 as shared14_b,she as shared14_c,o7 as shared14_d,s7 as shared14_e,c7 as shared14_f,l7 as shared14_g,u7 as shared14_h,J3 as shared15_a,WH as shared15_b,qme as shared15_c,Wme as shared15_d,Ume as shared15_e,Q3 as shared15_f,Vme as shared15_g,Gme as shared15_h,Kme as shared15_i,e7 as shared15_j,t7 as shared15_k,Xme as shared15_l,t2 as shared15_m,$f as shared15_n,wb as shared15_o,xb as shared15_p,Eb as shared15_q,yb as shared15_r,Rh as shared15_s,ZH as shared15_t,ahe as shared15_u,d3 as shared16_a,rH as shared16_b,f3 as shared16_c,mo as shared16_d,Da as shared16_e,Mh as shared17_A,hfe as shared17_B,l3 as shared17_C,jh as shared17_D,nb as shared17_E,ZL as shared17_F,fb as shared17_G,qx as shared17_H,JL as shared17_I,eH as shared17_J,Wx as shared17_K,Ux as shared17_L,tH as shared17_M,Ffe as shared17_N,u3 as shared17_O,ab as shared17_a,PL as shared17_b,Yde as shared17_c,t3 as shared17_d,RL as shared17_e,OL as shared17_f,LL as shared17_g,n3 as shared17_h,GF as shared17_i,KF as shared17_j,Jde as shared17_k,tfe as shared17_l,a3 as shared17_m,i3 as shared17_n,ib as shared17_o,Ic as shared17_p,ob as shared17_q,sb as shared17_r,lb as shared17_s,ub as shared17_t,Hx as shared17_u,Th as shared17_v,o3 as shared17_w,cb as shared17_x,db as shared17_y,HL as shared17_z,ef as shared18_a,U5 as shared18_b,V5 as shared18_c,qne as shared18_d,Js as shared19_a,KE as shared1_$,oI as shared1_$a,Jye as shared1_A,UB as shared1_Aa,Tp as shared1_Ab,PV as shared1_B,Ml as shared1_Ba,vI as shared1_Bb,L1 as shared1_C,KB as shared1_Ca,bI as shared1_Cb,rwe as shared1_D,XB as shared1_Da,tg as shared1_Db,z$ as shared1_E,QB as shared1_Ea,mi as shared1_Eb,L$ as shared1_F,YB as shared1_Fa,mk as shared1_Fb,awe as shared1_G,Cy as shared1_Ga,yI as shared1_Gb,iwe as shared1_H,ZB as shared1_Ha,hk as shared1_Hb,HV as shared1_I,Q0 as shared1_Ia,wI as shared1_Ib,lwe as shared1_J,JB as shared1_Ja,xI as shared1_Jb,uwe as shared1_K,eI as shared1_Ka,EI as shared1_Kb,cwe as shared1_L,Ip as shared1_La,AX as shared1_Lb,RX as shared1_M,Sy as shared1_Ma,jl as shared1_Mb,hi as shared1_N,tI as shared1_Na,By as shared1_Nb,SG as shared1_O,rI as shared1_Oa,kI as shared1_Ob,FG as shared1_P,vCe as shared1_Pa,gk as shared1_Pb,DG as shared1_Q,aI as shared1_Qa,Lp as shared1_Qb,uB as shared1_R,nk as shared1_Ra,Ed as shared1_Rb,hy as shared1_S,wCe as shared1_Sa,jX as shared1_Sb,cB as shared1_T,_s as shared1_Ta,NX as shared1_Tb,W0 as shared1_U,ECe as shared1_Ua,H8e as shared1_Ub,mB as shared1_V,YK as shared1_Va,W8e as shared1_Vb,iy as shared1_W,kCe as shared1_Wa,PX as shared1_Wb,GE as shared1_X,aX as shared1_Xa,by as shared1_Y,iX as shared1_Ya,P2e as shared1_Z,jCe as shared1_Za,R2e as shared1__,_Ce as shared1__a,TV as shared1_a,Ps as shared1_aa,Y0 as shared1_ab,Lt as shared1_b,U0 as shared1_ba,PCe as shared1_bb,P$ as shared1_c,wp as shared1_ca,_u as shared1_cb,Ur as shared1_d,sy as shared1_da,_xe as shared1_db,m as shared1_e,XE as shared1_ea,lB as shared1_eb,jV as shared1_f,V0 as shared1_fa,ny as shared1_fb,M1 as shared1_g,wy as shared1_ga,Txe as shared1_gb,q9 as shared1_h,G0 as shared1_ha,xG as shared1_hb,my as shared1_i,EB as shared1_ia,dd as shared1_ib,W$ as shared1_j,YE as shared1_ja,sI as shared1_jb,U$ as shared1_k,Np as shared1_ka,Z0 as shared1_kb,HE as shared1_l,ts as shared1_la,J0 as shared1_lb,V$ as shared1_m,Qe as shared1_ma,_E as shared1_mb,G$ as shared1_n,Pp as shared1_na,sk as shared1_nb,K$ as shared1_o,E$ as shared1_oa,lI as shared1_ob,X$ as shared1_p,FB as shared1_pa,uI as shared1_pb,Q$ as shared1_q,Op as shared1_qa,Tl as shared1_qb,Y$ as shared1_r,BB as shared1_ra,s8e as shared1_rb,Z$ as shared1_s,K0 as shared1_sa,Os as shared1_sb,J$ as shared1_t,zp as shared1_ta,Dy as shared1_tb,eB as shared1_u,es as shared1_ua,Ay as shared1_ub,nB as shared1_v,zB as shared1_va,fk as shared1_vb,Il as shared1_w,LB as shared1_wa,Fl as shared1_wb,ja as shared1_x,qB as shared1_xa,gi as shared1_xb,R$ as shared1_y,WB as shared1_ya,In as shared1_yb,Gye as shared1_z,rk as shared1_za,Ou as shared1_zb,Zs as shared20_a,G5 as shared20_b,g4 as shared20_c,K5 as shared20_d,Ys as shared20_e,kv as shared20_f,_o as shared20_g,Cv as shared20_h,iu as shared20_i,Zm as shared20_j,Jm as shared20_k,Sv as shared20_l,v4 as shared20_m,ou as shared20_n,X5 as shared20_o,Q5 as shared20_p,Y5 as shared20_q,Z5 as shared20_r,J5 as shared20_s,Jne as shared20_t,fi as shared21_a,HR as shared22_a,tf as shared22_b,tae as shared22_c,aae as shared22_d,b4 as shared22_e,Sh as shared23_a,ol as shared23_b,pL as shared23_c,HF as shared23_d,bf as shared24_a,Fc as shared24_b,Dc as shared24_c,yf as shared24_d,Qv as shared24_e,wh as shared24_f,wf as shared24_g,$x as shared24_h,zn as shared24_i,Uz as shared24_j,SF as shared25_a,yO as shared26_a,L4 as shared26_b,rf as shared27_a,eh as shared27_b,uf as shared28_a,dx as shared28_b,rl as shared28_c,ah as shared29_a,Iv as shared29_b,nh as shared29_c,$ie as shared29_d,lf as shared29_e,N4 as shared29_f,cx as shared29_g,Mv as shared29_h,uZ as shared2_a,cZ as shared2_b,Qg as shared2_c,el as shared30_a,tl as shared30_b,S4 as shared30_c,Dv as shared30_d,of as shared30_e,sf as shared30_f,F4 as shared30_g,On as shared31_a,nf as shared31_b,x4 as shared31_c,k4 as shared31_d,E4 as shared31_e,Nae as shared31_f,tx as shared31_g,rx as shared31_h,nx as shared31_i,ax as shared31_j,KR as shared31_k,XR as shared31_l,QR as shared31_m,YR as shared31_n,ix as shared31_o,af as shared31_p,ox as shared31_q,ZR as shared31_r,Fv as shared31_s,Av as shared32_a,Dn as shared33_a,pF as shared34_a,yx as shared34_b,pf as shared34_c,mf as shared34_d,wx as shared34_e,mF as shared34_f,tz as shared34_g,az as shared34_h,oz as shared34_i,lz as shared34_j,uz as shared34_k,hF as shared34_l,gF as shared34_m,vF as shared34_n,xx as shared34_o,dh as shared34_p,qv as shared34_q,du as shared35_a,ff as shared36_a,Ov as shared36_b,tF as shared36_c,NO as shared36_d,rF as shared36_e,IO as shared36_f,Rse as shared36_g,Ose as shared36_h,zse as shared36_i,Lse as shared36_j,Hse as shared36_k,so as shared36_l,nF as shared36_m,aF as shared36_n,zv as shared37_a,ch as shared38_a,Lv as shared39_a,Kn as shared3_a,xF as shared40_a,EF as shared40_b,kF as shared40_c,FF as shared41_a,iue as shared41_b,Ae as shared41_c,za as shared42_A,sr as shared42_B,Xv as shared42_C,Tz as shared42_D,Bue as shared42_a,AF as shared42_b,Nue as shared42_c,_z as shared42_d,que as shared42_e,Uue as shared42_f,MF as shared42_g,hh as shared42_h,gh as shared42_i,Dz as shared42_j,Az as shared42_k,Uv as shared42_l,ca as shared42_m,Fz as shared42_n,Vv as shared42_o,Fx as shared42_p,vh as shared42_q,bh as shared42_r,Gv as shared42_s,Oa as shared42_t,$z as shared42_u,Cx as shared42_v,fo as shared42_w,ece as shared42_x,yh as shared42_y,Sc as shared42_z,kx as shared43_a,Zv as shared44_a,Ix as shared44_b,Zz as shared44_c,Jv as shared44_d,Mx as shared44_e,eL as shared44_f,Tx as shared44_g,xf as shared44_h,RF as shared44_i,zo as shared44_j,Bx as shared45_a,Gz as shared45_b,NF as shared45_c,pi as shared46_a,_i as shared47_a,$h as shared48_a,Sa as shared48_b,IL as shared48_c,vb as shared49_a,bb as shared49_b,K3 as shared49_c,X3 as shared49_d,Us as shared4_a,Ph 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,NH as shared50_i,PH as shared50_j,jc as shared50_k,Rme as shared50_l,Ome as shared50_m,V3 as shared50_n,gu as shared50_o,Jx as shared50_p,RH as shared50_q,G3 as shared50_r,g3 as shared51_a,mu as shared51_b,v3 as shared51_c,$a as shared51_d,b3 as shared51_e,At as shared51_f,yt as shared51_g,hn as shared51_h,da as shared52_a,Nh as shared52_b,Ke as shared52_c,Aa as shared52_d,gs as shared52_e,Ff as shared53_a,Ne as shared54_a,Mr as shared54_b,La as shared55_a,x3 as shared56_a,k3 as shared57_a,S3 as shared58_a,Mc as shared59_a,Jt as shared5_a,Jl as shared5_b,B as shared5_c,oe as shared5_d,zt as shared60_a,Xe as shared61_a,M3 as shared61_b,T3 as shared61_c,j3 as shared61_d,N3 as shared62_a,kb as shared63_a,f7 as shared63_b,bs as shared64_a,C7 as shared64_b,Fb as shared64_c,an as shared65_a,Cb as shared66_a,ho as shared67_a,vs as shared67_b,a2 as shared67_c,g7 as shared68_a,b7 as shared69_a,Kw as shared6_a,F8 as shared6_b,Oh as shared70_a,Nc as shared71_a,S7 as shared71_b,F7 as shared71_c,Pc as shared72_a,D7 as shared72_b,A7 as shared72_c,Tf as shared73_a,$7 as shared73_b,B7 as shared73_c,Ab as shared74_a,M7 as shared74_b,Es as shared75_a,Nf as shared75_b,V7 as shared75_c,jf as shared76_a,u2 as shared77_a,R7 as shared77_b,$b as shared78_a,Bb as shared78_b,T7 as shared78_c,j7 as shared78_d,Ib as shared78_e,Hh as shared78_f,t0e as shared78_g,r0e as shared78_h,n0e as shared78_i,_7 as shared78_j,N7 as shared78_k,o0e as shared78_l,vn as shared79_a,ws as shared79_b,F_ as shared7_a,D8 as shared7_b,L7 as shared80_a,H7 as shared80_b,c0e as shared80_c,q7 as shared80_d,xs as shared81_a,_f as shared81_b,Oc as shared81_c,qa as shared81_d,Ln as shared82_a,qh as shared82_b,Lc as shared83_a,Mb as shared83_b,X7 as shared84_a,Q7 as shared84_b,w0e as shared84_c,Nb as shared85_a,mD as shared85_b,Tb as shared86_a,aD as shared86_b,F0e as shared86_c,D0e as shared86_d,Hn as shared87_a,go as shared87_b,eD as shared87_c,Va as shared87_d,tD as shared87_e,Rf as shared87_f,yu as shared87_g,rD as shared87_h,nD as shared87_i,Of as shared88_a,$0e as shared88_b,I0e as shared88_c,oD as shared88_d,Hf as shared89_a,Kh as shared89_b,zf as shared89_c,Lf as shared89_d,cn as shared89_e,wu as shared89_f,Bo as shared8_a,Gh as shared90_a,f2 as shared91_a,wq as shared91_b,sD as shared91_c,_ge as shared92_A,Wq as shared92_B,UD as shared92_C,VD as shared92_D,qD as shared92_E,Pge as shared92_F,_2 as shared92_G,WD as shared92_H,zq as shared92_a,M2 as shared92_b,qb as shared92_c,_D as shared92_d,ND as shared92_e,PD as shared92_f,RD as shared92_g,OD as shared92_h,xge as shared92_i,Hb as shared92_j,zD as shared92_k,Wb as shared92_l,LD as shared92_m,T2 as shared92_n,Ub as shared92_o,Ege as shared92_p,Lq as shared92_q,kge as shared92_r,Cge as shared92_s,ku as shared92_t,Sge as shared92_u,Fge as shared92_v,HD as shared92_w,j2 as shared92_x,n0 as shared92_y,Tge as shared92_z,U0e as shared93_a,ll as shared93_b,vo as shared93_c,Ri as shared93_d,Wf as shared93_e,Cs as shared93_f,xu as shared93_g,y2 as shared93_h,K0e as shared93_i,X0e as shared93_j,yD as shared93_k,Q0e as shared93_l,w2 as shared93_m,wD as shared93_n,Z0e as shared93_o,J0e as shared93_p,ege as shared93_q,x2 as shared93_r,Eu as shared93_s,Uf as shared93_t,Vf as shared93_u,Rb as shared93_v,Ob as shared93_w,Qh as shared93_x,nge as shared93_y,hD as shared94_a,g2 as shared94_b,Pi as shared94_c,_q as shared95_a,e0 as shared95_b,DD as shared95_c,AD as shared95_d,$D as shared95_e,BD as shared95_f,A2 as shared95_g,ID as shared95_h,Zh as shared96_a,Hc as shared96_b,Gf as shared96_c,qc as shared96_d,lge as shared96_e,Ss as shared96_f,xD as shared96_g,ED as shared96_h,E2 as shared97_a,Yh as shared97_b,Wr as shared98_a,cl as shared98_b,kD as shared98_c,Ia as shared99_a,dl as shared99_b,SD as shared99_c,Xf as shared99_d,Ka as shared99_e,FD as shared99_f,LR as shared9_a,Hne as shared9_b,m4 as shared9_c};
|