diff --git a/bun.lock b/bun.lock index a678512..f40b8c6 100644 --- a/bun.lock +++ b/bun.lock @@ -18,6 +18,18 @@ "name": "@microvoid/convax-plugin-hello-convax", "version": "0.1.0" }, + "packages/plugins/relight-studio": { + "name": "@microvoid/convax-plugin-relight-studio", + "version": "0.1.1", + "devDependencies": { + "@types/react": "19.2.14", + "@types/react-dom": "19.2.3", + "radix-ui": "1.6.2", + "react": "19.2.4", + "react-dom": "19.2.4", + "typescript": "5.9.3" + } + }, "packages/plugins/xiaoyunque-generation": { "name": "@microvoid/convax-plugin-xiaoyunque-generation", "version": "0.3.5", @@ -91,10 +103,1746 @@ } }, "packages": { - "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="], - "@types/node": ["@types/node@26.1.1", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="], - "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], - "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], - "undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="] + "@floating-ui/core": [ + "@floating-ui/core@1.8.0", + "", + { + "dependencies": { + "@floating-ui/utils": "^0.2.12" + } + }, + "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==" + ], + "@floating-ui/dom": [ + "@floating-ui/dom@1.8.0", + "", + { + "dependencies": { + "@floating-ui/core": "^1.8.0", + "@floating-ui/utils": "^0.2.12" + } + }, + "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==" + ], + "@floating-ui/react-dom": [ + "@floating-ui/react-dom@2.1.9", + "", + { + "dependencies": { + "@floating-ui/dom": "^1.8.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg==" + ], + "@floating-ui/utils": [ + "@floating-ui/utils@0.2.12", + "", + {}, + "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==" + ], + "@microvoid/convax-ffmpeg-mcp": [ + "@microvoid/convax-ffmpeg-mcp@workspace:packages/tools/ffmpeg-mcp" + ], + "@microvoid/convax-plugin-ffmpeg-tools": [ + "@microvoid/convax-plugin-ffmpeg-tools@workspace:packages/plugins/ffmpeg-tools" + ], + "@microvoid/convax-plugin-hello-convax": [ + "@microvoid/convax-plugin-hello-convax@workspace:packages/plugins/hello-convax" + ], + "@microvoid/convax-plugin-relight-studio": [ + "@microvoid/convax-plugin-relight-studio@workspace:packages/plugins/relight-studio" + ], + "@microvoid/convax-plugin-xiaoyunque-generation": [ + "@microvoid/convax-plugin-xiaoyunque-generation@workspace:packages/plugins/xiaoyunque-generation" + ], + "@microvoid/convax-skill-ad-idea": [ + "@microvoid/convax-skill-ad-idea@workspace:packages/skills/ad-idea" + ], + "@microvoid/convax-skill-audiobook": [ + "@microvoid/convax-skill-audiobook@workspace:packages/skills/audiobook" + ], + "@microvoid/convax-skill-clip-export": [ + "@microvoid/convax-skill-clip-export@workspace:packages/skills/clip-export" + ], + "@microvoid/convax-skill-ecommerce-image": [ + "@microvoid/convax-skill-ecommerce-image@workspace:packages/skills/ecommerce-image" + ], + "@microvoid/convax-skill-ffmpeg-canvas": [ + "@microvoid/convax-skill-ffmpeg-canvas@workspace:packages/skills/ffmpeg-canvas" + ], + "@microvoid/convax-skill-film-shot": [ + "@microvoid/convax-skill-film-shot@workspace:packages/skills/film-shot" + ], + "@microvoid/convax-skill-hello-convax-guide": [ + "@microvoid/convax-skill-hello-convax-guide@workspace:packages/skills/hello-convax-guide" + ], + "@microvoid/convax-skill-image-remix": [ + "@microvoid/convax-skill-image-remix@workspace:packages/skills/image-remix" + ], + "@microvoid/convax-skill-short-drama-screenwriter": [ + "@microvoid/convax-skill-short-drama-screenwriter@workspace:packages/skills/short-drama-screenwriter" + ], + "@microvoid/convax-skill-skill-creator": [ + "@microvoid/convax-skill-skill-creator@workspace:packages/skills/skill-creator" + ], + "@microvoid/convax-skill-skill-reviewer": [ + "@microvoid/convax-skill-skill-reviewer@workspace:packages/skills/skill-reviewer" + ], + "@microvoid/convax-skill-video-prompting": [ + "@microvoid/convax-skill-video-prompting@workspace:packages/skills/video-prompting" + ], + "@microvoid/convax-xiaoyunque-mcp": [ + "@microvoid/convax-xiaoyunque-mcp@workspace:packages/tools/xiaoyunque-mcp" + ], + "@radix-ui/number": [ + "@radix-ui/number@1.1.2", + "", + {}, + "sha512-ceTwaxc4I5IOi97DgCotl3pqiyRGvffcc0oOsE2dQYaJOFIDsDt4VWG6xEbg1QePv9QWausCEIppud/tJ1wNig==" + ], + "@radix-ui/primitive": [ + "@radix-ui/primitive@1.1.5", + "", + {}, + "sha512-d86WIWFYNtGA0H/d8exstrTRTp7eWJYlYJbtNofxr/3ljupZYn6EFDG/Qgu/0Kc8v7yMUxySagqJsL1+PdYjWg==" + ], + "@radix-ui/react-accessible-icon": [ + "@radix-ui/react-accessible-icon@1.1.11", + "", + { + "dependencies": { + "@radix-ui/react-visually-hidden": "1.2.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-HQDOFTKwSnmUij6l54wYJJtxTAnxI71+YJLOrjm2ladFB8HAV5Jt7hwaZPhWTGBkYoW4+ZAOfNZrLDh/qvxSYA==" + ], + "@radix-ui/react-accordion": [ + "@radix-ui/react-accordion@1.2.16", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collapsible": "1.1.16", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-BpZJNmetujnGgUI6OX0jEhEmlA46WPqgub8Rv09Kyquwd0cc1ndMKpiPYCjmBU6KSSRPAMtgLpEoZSG/tdNIWQ==" + ], + "@radix-ui/react-alert-dialog": [ + "@radix-ui/react-alert-dialog@1.1.19", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-dialog": "1.1.19", + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-FA7n1f6D/DwGE0+AWxiY5LacNbbExQuEgMubeG06idEaH+mSLuf9dp/qBNqOnvbTQ+4gZ2ue1RATF1Ub91Mg5g==" + ], + "@radix-ui/react-arrow": [ + "@radix-ui/react-arrow@1.1.11", + "", + { + "dependencies": { + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-Kdil9BB1rIFC/khmf4hC35bn8701AJcizTU7G7cUbEbk5XqqbjDuHW60uUfKqO5WojjZcbAW51Q7P0hRmMLw8A==" + ], + "@radix-ui/react-aspect-ratio": [ + "@radix-ui/react-aspect-ratio@1.1.11", + "", + { + "dependencies": { + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-IUAhIVpBUvP5NNICjlaB1OFmtRLGqQqTF3ZOSGPoq3XeLXRFtHiWTRxSVEULgOd9GQR2c7tsYqDnhUennapZnw==" + ], + "@radix-ui/react-avatar": [ + "@radix-ui/react-avatar@1.2.2", + "", + { + "dependencies": { + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-is-hydrated": "0.1.1", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-sST0qh8GzOB7besQ3tMLWLyngnRuSk0gc/Hm+667KYKQFCt6Y6ZXv25WlqM7dIDK54ULCh5+CHmk4LIolzfz+A==" + ], + "@radix-ui/react-checkbox": [ + "@radix-ui/react-checkbox@1.3.7", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-previous": "1.1.2", + "@radix-ui/react-use-size": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-JroKHfQBfh+fDuzpPsBC+pESkhuq8ql4hljTguz8MWnS35cISr3d/Jhl9kYrB44FlDtxCArYdDvTx+BSsJ64rQ==" + ], + "@radix-ui/react-collapsible": [ + "@radix-ui/react-collapsible@1.1.16", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-opfXRe6nnzyGmCDPx+l1Aqo/RbqWtQal2FnsBqF9hhePp6j0LsRoBaRxcMOlTv+uYTJVtWYZKg9t9wTe+BA/ZA==" + ], + "@radix-ui/react-collection": [ + "@radix-ui/react-collection@1.1.12", + "", + { + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-slot": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-nb67INpE0IahJKN7EYPp9m9YGwYeKlnzxT3MwXVkgCskaSJia97kG4T0ywpjNUSSnoJk/uvk12V8vbrEHEj+/Q==" + ], + "@radix-ui/react-compose-refs": [ + "@radix-ui/react-compose-refs@1.1.3", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-rYOP8OMnuuPMQF1uhPVlGNcCDlkokKqGFE3JcxFViIkAXP7EvFWUliJAstrapypaBLJNHbZL6jGhbVDGTwmVhA==" + ], + "@radix-ui/react-context": [ + "@radix-ui/react-context@1.2.0", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-fOE+JtN9rygNZkCnHRBEP0TAvLldlhyOxMsbwFvTP4nAs+nBmfnna+o/Zski2wkmY1YMrFC0aSzsHoLY47iLrg==" + ], + "@radix-ui/react-context-menu": [ + "@radix-ui/react-context-menu@2.3.3", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-menu": "2.1.20", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-PS+gKE0z2prJ74Y0sM+brAGK4mYOHIR7TlcV5EJgUQ6E0xMvyswkK2X4yRqyganrzsRL+WCSKAPu0NQITICRWg==" + ], + "@radix-ui/react-dialog": [ + "@radix-ui/react-dialog@1.1.19", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-focus-guards": "1.1.4", + "@radix-ui/react-focus-scope": "1.1.12", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-slot": "1.3.0", + "@radix-ui/react-use-controllable-state": "1.2.3", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-+HhbN2+YtkRgVirjZ2afMeutQRuGOrdkWR5+EFC58SJojGmtyNQwYzgi6tHBpOxvFHefMtPeHdgtjz0BOGxFQg==" + ], + "@radix-ui/react-direction": [ + "@radix-ui/react-direction@1.1.2", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-C3vFhbyi4SW3PmbAi6Awpu4OzJtd0MxGurvSsYtr7p7nM8RNB3VAF3CUmnp2j50knpkrRcB7+ycVXzgLgF6yNA==" + ], + "@radix-ui/react-dismissable-layer": [ + "@radix-ui/react-dismissable-layer@1.1.15", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-effect-event": "0.0.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-b0XaRlzn2QKuo10XyNgi2DAJDf5XC9d1nD3FJcuvCjbR7+4Ad28zmZsLsqx+hvDEzMnRuZaZxZm9gYObV6RmRA==" + ], + "@radix-ui/react-dropdown-menu": [ + "@radix-ui/react-dropdown-menu@2.1.20", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-menu": "2.1.20", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-slfm+rRaZRuQBvHq60lXvSVUPhid0IPtjSZzIuUlWZMUs01iYZNlGS3mJgRD3ChLQVBAYlKiL/tFyWGX+dz8Xw==" + ], + "@radix-ui/react-focus-guards": [ + "@radix-ui/react-focus-guards@1.1.4", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-cot/aB/mOm0IYVYTTmQcEEK1M48lZWi8FlYe5nDPQQ8NYZUlXEFgncJ9p2Kzer3RKSrY7cTTpEMLZKNo9QoP5Q==" + ], + "@radix-ui/react-focus-scope": [ + "@radix-ui/react-focus-scope@1.1.12", + "", + { + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-jjk/lqTeNL0azUx5ZYzVrl4NgaDIrdzTNE4mABV9yBFI7FQqN7pIgzV1bTleUezP2QiTGA1BFTqY8MegDgWX9A==" + ], + "@radix-ui/react-form": [ + "@radix-ui/react-form@0.1.12", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-label": "2.1.11", + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-JTX94E4LDL91rzLg7X0mHPdxr0A8JEdVwZEmeOwZJSMDHCGW5DFtSlTSJozUyUs807IQmnvbfzKZFVCK5DmkqQ==" + ], + "@radix-ui/react-hover-card": [ + "@radix-ui/react-hover-card@1.1.19", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-popper": "1.3.3", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-2KTgMLQtKvicznQgbindEI2RZ3QbDIwU5gabjUPwFJsormjGDz+rUvO4NANmYwzEEpTcTONUt33vBHIfTIVSfw==" + ], + "@radix-ui/react-id": [ + "@radix-ui/react-id@1.1.2", + "", + { + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-orBC88futVpqCmhX1p4cvquNHsELQ+w+vBJnuj3ftETI5bJb0bZn3Tqu3SWN2IOcPycTnMGnhwoermvISt72sA==" + ], + "@radix-ui/react-label": [ + "@radix-ui/react-label@2.1.11", + "", + { + "dependencies": { + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-3PKvDDxOn62k0oV1n4QtNtD2vpu+zYjXR7ojLBPaO6SPvhy53yg0vAmgNeBQeJW5rV3dffoRG+HYfLBZuzw0CQ==" + ], + "@radix-ui/react-menu": [ + "@radix-ui/react-menu@2.1.20", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-focus-guards": "1.1.4", + "@radix-ui/react-focus-scope": "1.1.12", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-popper": "1.3.3", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-slot": "1.3.0", + "@radix-ui/react-use-callback-ref": "1.1.2", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-VsUrXxFe9d2ScbZF0fR/oPR1+qjyeLs5p0jzG8h90puMoA9bq4SirYlXbE+USRg9Q2qTeJSFNqjw2nts8jJe4w==" + ], + "@radix-ui/react-menubar": [ + "@radix-ui/react-menubar@1.1.20", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-menu": "2.1.20", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-gzFZvybgmwYsFBWDqanycIoEYnhyk8MMnuLamdFVHUZYGp4COM+sqXiwbnn0VMWqGLeeU7GV7jm+dXRa+Wufag==" + ], + "@radix-ui/react-navigation-menu": [ + "@radix-ui/react-navigation-menu@1.2.18", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-layout-effect": "1.1.2", + "@radix-ui/react-use-previous": "1.1.2", + "@radix-ui/react-visually-hidden": "1.2.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-K9HiuxZ6xCwSaHcIuUpxyhy4w5gpwzWjh9dHTSbMN3Ix4qAyVObS9RlU3zMycb0PO3v9Tpk0BXMwWvXOUbVXew==" + ], + "@radix-ui/react-one-time-password-field": [ + "@radix-ui/react-one-time-password-field@0.1.12", + "", + { + "dependencies": { + "@radix-ui/number": "1.1.2", + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-effect-event": "0.0.3", + "@radix-ui/react-use-is-hydrated": "0.1.1", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-nQLu5OAcORDQp1EHAv6k3mJGV1hjMTw2NTGVAsGE1g/mWeNqAd1R5jyaAs3U+A8ZD/W8XNPY2yKT0ZdQnqo3NA==" + ], + "@radix-ui/react-password-toggle-field": [ + "@radix-ui/react-password-toggle-field@0.1.7", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-effect-event": "0.0.3", + "@radix-ui/react-use-is-hydrated": "0.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-gB1Mr8vzdv1XzDjrtJTXmL0JORRs1B4g7ngUs0F+H2VvMOwXTZMTmLCl0wZZ3m7ylX8TssI7NCvgiSHmLuTm/A==" + ], + "@radix-ui/react-popover": [ + "@radix-ui/react-popover@1.1.19", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-focus-guards": "1.1.4", + "@radix-ui/react-focus-scope": "1.1.12", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-popper": "1.3.3", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-slot": "1.3.0", + "@radix-ui/react-use-controllable-state": "1.2.3", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-jkrTdQVxnIB8fpn0NyyxW9CTB5aCXZZelVz5z+Xmii6g5WxMqS3fInNslZ63puP39+Puu4jYohUK31y3dT87gQ==" + ], + "@radix-ui/react-popper": [ + "@radix-ui/react-popper@1.3.3", + "", + { + "dependencies": { + "@floating-ui/react-dom": "^2.0.0", + "@radix-ui/react-arrow": "1.1.11", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-layout-effect": "1.1.2", + "@radix-ui/react-use-rect": "1.1.2", + "@radix-ui/react-use-size": "1.1.2", + "@radix-ui/rect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-mS7dGpyjv6b+gsDjLF7e0ia1W4Im1B1hSCy2yuXlHuvnZxHKagfDaobt/KAKt27EpZMit2pss8eJBVyVjEWM+g==" + ], + "@radix-ui/react-portal": [ + "@radix-ui/react-portal@1.1.13", + "", + { + "dependencies": { + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-z3oXfmaHLJTF1wktbjgD6cn9jiEbq3WSondB10LIuIt2m2Ym4iJlrW04/euMwENDdWDdE7z+OuY7Qyp1YpRSwA==" + ], + "@radix-ui/react-presence": [ + "@radix-ui/react-presence@1.1.7", + "", + { + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-zBZ4QM5XG3JRanDmqXYf3MD6th4AFXFmgU6KNMFzUaV6F3uw9I5/zjMUvFriSEn5ewo1nxuibvyxJdmLlDcslA==" + ], + "@radix-ui/react-primitive": [ + "@radix-ui/react-primitive@2.1.7", + "", + { + "dependencies": { + "@radix-ui/react-slot": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-bC3NiwsprbxKjuon9l7X6BUTw7FPVzEYaL92MPEY5SCd/9hUTPXVFtVwRix7778wtRsVao+zE062gL79FZleeQ==" + ], + "@radix-ui/react-progress": [ + "@radix-ui/react-progress@1.1.12", + "", + { + "dependencies": { + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-ZPHyI0JyzoH/rP0tq2uRaIZTj/4s8+kAbqPz+e2N8+ejHvwPJ889dHhqn+vh7PNvNeq+boAoH9yzqeoShzwF2w==" + ], + "@radix-ui/react-radio-group": [ + "@radix-ui/react-radio-group@1.4.3", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-previous": "1.1.2", + "@radix-ui/react-use-size": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-WwZFjWV4s3aC1QtR3k04R+oANHtX2q6fgKlc7MCEiDNlnTxCZ3H8k3mHtEgVlOejystwk1WQgarQhNOQZ2bK1g==" + ], + "@radix-ui/react-roving-focus": [ + "@radix-ui/react-roving-focus@1.1.15", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-is-hydrated": "0.1.1", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-40svmmugfM3mUN7VUDGVE1tQGOhyi8enlGD0CNJEcMM36C1f71PKM21DFgNHUfem0XnA+d8H8oN3Z9ZpJjSslg==" + ], + "@radix-ui/react-scroll-area": [ + "@radix-ui/react-scroll-area@1.2.14", + "", + { + "dependencies": { + "@radix-ui/number": "1.1.2", + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-bBODCWZK7JTbQLHs0uIP4f73wIWatakK4OS33UzkR1x897wu0PuO658a3f+6P2GEGyDzGYMuHRatMVoAk9WZTw==" + ], + "@radix-ui/react-select": [ + "@radix-ui/react-select@2.3.3", + "", + { + "dependencies": { + "@radix-ui/number": "1.1.2", + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-focus-guards": "1.1.4", + "@radix-ui/react-focus-scope": "1.1.12", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-popper": "1.3.3", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-slot": "1.3.0", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-layout-effect": "1.1.2", + "@radix-ui/react-use-previous": "1.1.2", + "@radix-ui/react-visually-hidden": "1.2.7", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-L5RQTXz6Anxsf9CCv+pTgiAsUpyVj7rJxsGtmhFaEOJ++cVfXucv4qWfsIO0AIB4NAhi3yovWGVMKKS1Xf1Wrg==" + ], + "@radix-ui/react-separator": [ + "@radix-ui/react-separator@1.1.11", + "", + { + "dependencies": { + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-jRhe86+8PF7VZ1u14eOWVOuh2BuAhALg/FT1VcMC4OHedMTRUazDnDlKTt+yxo5cRNKHMfmvZ4sSQtWDeMV4CQ==" + ], + "@radix-ui/react-slider": [ + "@radix-ui/react-slider@1.4.3", + "", + { + "dependencies": { + "@radix-ui/number": "1.1.2", + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-layout-effect": "1.1.2", + "@radix-ui/react-use-previous": "1.1.2", + "@radix-ui/react-use-size": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-CWVVj+XaTom0SKCqw1EUgb0NuiLwS+N3OFG73mVEezKEjgNIvZiu0EevMelSSU+CbX3owbqJweG2gPU31WGC5A==" + ], + "@radix-ui/react-slot": [ + "@radix-ui/react-slot@1.3.0", + "", + { + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-MojKku4U/miO8Av4Dkb+ctMAQx7JmY96LmtDQlAarCRtd7rN52QCSzBF+XAvr5S6coSVj9HEPBgHAHKEJVk/WA==" + ], + "@radix-ui/react-switch": [ + "@radix-ui/react-switch@1.3.3", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-previous": "1.1.2", + "@radix-ui/react-use-size": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-1+mlB4/lxJfk5tgJ4g+R5mUCbRpPE1T9+UsEyeLYbGgMtwiMgmuTnfKz4Mw1nHALHjuwyxw4MLd4cSHn6pNSlQ==" + ], + "@radix-ui/react-tabs": [ + "@radix-ui/react-tabs@1.1.17", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-nRyXnrAVCwjeXcHbvEbLS6ndbTeKHG1RqCP4A8Gw5L4cemDzPXdD8rAmr6wet0v57R69wGvuIIsFjHSVkZiMzQ==" + ], + "@radix-ui/react-toast": [ + "@radix-ui/react-toast@1.2.19", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-layout-effect": "1.1.2", + "@radix-ui/react-visually-hidden": "1.2.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-SxfVZfVOibWKWdkf0Xx1awW2d09fQu4V4PXDY1j5hi4MVf7MWdJZqTBJMa1KWtOr1S6GGtCk02nniZ0Iia+dHw==" + ], + "@radix-ui/react-toggle": [ + "@radix-ui/react-toggle@1.1.14", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-QI/hB65XKWACA66P64A+aHxtLUgHJeJLkaQa+awUNXT6T3swndtY5DojeHA+vldrTspMTtFBd7HfZ9QGbM1Qrw==" + ], + "@radix-ui/react-toggle-group": [ + "@radix-ui/react-toggle-group@1.1.15", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-toggle": "1.1.14", + "@radix-ui/react-use-controllable-state": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-gIC5Q+Xljg7lmUdzSuDoy0t97yZn1sZl00Ra37ZvKrYdWnQLU6sWLd09yG8cIB9jUAlQfHgJ2ACAG00MFwsqSQ==" + ], + "@radix-ui/react-toolbar": [ + "@radix-ui/react-toolbar@1.1.15", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-separator": "1.1.11", + "@radix-ui/react-toggle-group": "1.1.15" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-t/iEuVjUnXXtrsGK40AA43uIx37sn3AqZ7oAVnPICK6lFJP6dzMzWR3U9b6eCfFjb6wtSEqkJ9Rn9xDjiOx20g==" + ], + "@radix-ui/react-tooltip": [ + "@radix-ui/react-tooltip@1.2.12", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-id": "1.1.2", + "@radix-ui/react-popper": "1.3.3", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-slot": "1.3.0", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-visually-hidden": "1.2.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-U3HoftgWnmla78vzQbLvKKb7bUYJxoiiqYFzp1wu/TBMyDqMZSuCl3aRICsD6EfVEwcJD2mumGDGUXLFVqQHKA==" + ], + "@radix-ui/react-use-callback-ref": [ + "@radix-ui/react-use-callback-ref@1.1.2", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-xCso9j1/u8sEgP1RNHjFrXJLApL8LiqOkI1R4ywuN00rxWdYg4oQXuwKLS3i0j5NWLromUD27/4nlxj2UFVvIw==" + ], + "@radix-ui/react-use-controllable-state": [ + "@radix-ui/react-use-controllable-state@1.2.3", + "", + { + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.3", + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-PLzC90MS+ReootmjC597dvopoelpZ8Q61HJkDXZSExitIq7PL55vHNnesAHwguHK0aPfBnpdNzQtv1uliaqQrA==" + ], + "@radix-ui/react-use-effect-event": [ + "@radix-ui/react-use-effect-event@0.0.3", + "", + { + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-6c8ZqvPTWILEKnyVkP53EGRCcpnJiKTC21sS/6R1GF5xKyHJJWQEPfkqlcgUkdRQivd6tb23abUwe4ngWmY0JA==" + ], + "@radix-ui/react-use-escape-keydown": [ + "@radix-ui/react-use-escape-keydown@1.1.3", + "", + { + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-3wEkMiPHXha/2VadZ68rYBcmYnPINVGl4Y3gtcM7fKRjANk0OscK+cdqBgUWdozb7YJxsh0vefM7vgAMHXOjqg==" + ], + "@radix-ui/react-use-is-hydrated": [ + "@radix-ui/react-use-is-hydrated@0.1.1", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-qwOiz4Tjo8CNnrOLAYUMXeZwDzXgXpvK4TKQPmWLECM9XoWvA6+0Z2/7Ag3A4ivjS4ovbLJPbskkxioFyBhr8A==" + ], + "@radix-ui/react-use-layout-effect": [ + "@radix-ui/react-use-layout-effect@1.1.2", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-jrBWOxZITuGcnjRCM2t2U5ZPkCLxD+Ym6DjfssS5haTj2iiak/DOb64JeN6OdLfLgptb6/e2kKR+ZuTrGoZTPA==" + ], + "@radix-ui/react-use-previous": [ + "@radix-ui/react-use-previous@1.1.2", + "", + { + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-IGBQPtRFdhN6MQ8dbegVmBq1LVZluya3F1jWY+puIcQC3MHctRwTDSBWCkL/3ZcnMJLTMJ++Z+ktmvg0F89iCw==" + ], + "@radix-ui/react-use-rect": [ + "@radix-ui/react-use-rect@1.1.2", + "", + { + "dependencies": { + "@radix-ui/rect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-d8a+bBY/FxikNPlgJJoaBHZX+zKVbWHYJGTLnLvveQgFSTntkGdEKv3JDtHrMS0DNYpllz2nRsTLGLKYttbpmw==" + ], + "@radix-ui/react-use-size": [ + "@radix-ui/react-use-size@1.1.2", + "", + { + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-giWQp+4mxjBPt4KZ0MmyuykFNWfbDxKt4x+fPkRYmgRFJSbCZFzUglvMb/Kjn38tm10YP4ufiQZDx3zna4LU6w==" + ], + "@radix-ui/react-visually-hidden": [ + "@radix-ui/react-visually-hidden@1.2.7", + "", + { + "dependencies": { + "@radix-ui/react-primitive": "2.1.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-1wNZBggTDK3GRuuQ6nP4k2yi7a6l7I5qbMPbZcRsrGsGVead/f/d5FhEzUvqFs0bcrDLx7n1zKQ3JvLR6whaaw==" + ], + "@radix-ui/rect": [ + "@radix-ui/rect@1.1.2", + "", + {}, + "sha512-xnXE7wG13PI+cxieVssYXlQJuYVRhH9NBoxt3KNwzghDIA69GMm7d4wXRouHIYjE+KvS6U/MsMO73NdS2MH9ZA==" + ], + "@types/bun": [ + "@types/bun@1.3.14", + "", + { + "dependencies": { + "bun-types": "1.3.14" + } + }, + "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw==" + ], + "@types/node": [ + "@types/node@26.1.1", + "", + { + "dependencies": { + "undici-types": "~8.3.0" + } + }, + "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==" + ], + "@types/react": [ + "@types/react@19.2.14", + "", + { + "dependencies": { + "csstype": "^3.2.2" + } + }, + "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==" + ], + "@types/react-dom": [ + "@types/react-dom@19.2.3", + "", + { + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==" + ], + "aria-hidden": [ + "aria-hidden@1.2.6", + "", + { + "dependencies": { + "tslib": "^2.0.0" + } + }, + "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==" + ], + "bun-types": [ + "bun-types@1.3.14", + "", + { + "dependencies": { + "@types/node": "*" + } + }, + "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ==" + ], + "csstype": [ + "csstype@3.2.3", + "", + {}, + "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==" + ], + "detect-node-es": [ + "detect-node-es@1.1.0", + "", + {}, + "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" + ], + "get-nonce": [ + "get-nonce@1.0.1", + "", + {}, + "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==" + ], + "radix-ui": [ + "radix-ui@1.6.2", + "", + { + "dependencies": { + "@radix-ui/primitive": "1.1.5", + "@radix-ui/react-accessible-icon": "1.1.11", + "@radix-ui/react-accordion": "1.2.16", + "@radix-ui/react-alert-dialog": "1.1.19", + "@radix-ui/react-arrow": "1.1.11", + "@radix-ui/react-aspect-ratio": "1.1.11", + "@radix-ui/react-avatar": "1.2.2", + "@radix-ui/react-checkbox": "1.3.7", + "@radix-ui/react-collapsible": "1.1.16", + "@radix-ui/react-collection": "1.1.12", + "@radix-ui/react-compose-refs": "1.1.3", + "@radix-ui/react-context": "1.2.0", + "@radix-ui/react-context-menu": "2.3.3", + "@radix-ui/react-dialog": "1.1.19", + "@radix-ui/react-direction": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.15", + "@radix-ui/react-dropdown-menu": "2.1.20", + "@radix-ui/react-focus-guards": "1.1.4", + "@radix-ui/react-focus-scope": "1.1.12", + "@radix-ui/react-form": "0.1.12", + "@radix-ui/react-hover-card": "1.1.19", + "@radix-ui/react-label": "2.1.11", + "@radix-ui/react-menu": "2.1.20", + "@radix-ui/react-menubar": "1.1.20", + "@radix-ui/react-navigation-menu": "1.2.18", + "@radix-ui/react-one-time-password-field": "0.1.12", + "@radix-ui/react-password-toggle-field": "0.1.7", + "@radix-ui/react-popover": "1.1.19", + "@radix-ui/react-popper": "1.3.3", + "@radix-ui/react-portal": "1.1.13", + "@radix-ui/react-presence": "1.1.7", + "@radix-ui/react-primitive": "2.1.7", + "@radix-ui/react-progress": "1.1.12", + "@radix-ui/react-radio-group": "1.4.3", + "@radix-ui/react-roving-focus": "1.1.15", + "@radix-ui/react-scroll-area": "1.2.14", + "@radix-ui/react-select": "2.3.3", + "@radix-ui/react-separator": "1.1.11", + "@radix-ui/react-slider": "1.4.3", + "@radix-ui/react-slot": "1.3.0", + "@radix-ui/react-switch": "1.3.3", + "@radix-ui/react-tabs": "1.1.17", + "@radix-ui/react-toast": "1.2.19", + "@radix-ui/react-toggle": "1.1.14", + "@radix-ui/react-toggle-group": "1.1.15", + "@radix-ui/react-toolbar": "1.1.15", + "@radix-ui/react-tooltip": "1.2.12", + "@radix-ui/react-use-callback-ref": "1.1.2", + "@radix-ui/react-use-controllable-state": "1.2.3", + "@radix-ui/react-use-effect-event": "0.0.3", + "@radix-ui/react-use-escape-keydown": "1.1.3", + "@radix-ui/react-use-is-hydrated": "0.1.1", + "@radix-ui/react-use-layout-effect": "1.1.2", + "@radix-ui/react-use-size": "1.1.2", + "@radix-ui/react-visually-hidden": "1.2.7" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react", + "@types/react-dom" + ] + }, + "sha512-OwYUjzMwiInCUxgAWpPsavXC3Kh4iyi/49uU1/qZTG3RQDlvegyk1GOMiGvSkjua1RDb3JD3fo3eroL9FV4GQw==" + ], + "react": [ + "react@19.2.4", + "", + {}, + "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==" + ], + "react-dom": [ + "react-dom@19.2.4", + "", + { + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.4" + } + }, + "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==" + ], + "react-remove-scroll": [ + "react-remove-scroll@2.7.2", + "", + { + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==" + ], + "react-remove-scroll-bar": [ + "react-remove-scroll-bar@2.3.8", + "", + { + "dependencies": { + "react-style-singleton": "^2.2.2", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==" + ], + "react-style-singleton": [ + "react-style-singleton@2.2.3", + "", + { + "dependencies": { + "get-nonce": "^1.0.0", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==" + ], + "scheduler": [ + "scheduler@0.27.0", + "", + {}, + "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==" + ], + "tslib": [ + "tslib@2.8.1", + "", + {}, + "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + ], + "typescript": [ + "typescript@5.9.3", + "", + { + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + } + }, + "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==" + ], + "undici-types": [ + "undici-types@8.3.0", + "", + {}, + "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==" + ], + "use-callback-ref": [ + "use-callback-ref@1.3.3", + "", + { + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==" + ], + "use-sidecar": [ + "use-sidecar@1.1.3", + "", + { + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "optionalPeers": [ + "@types/react" + ] + }, + "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==" + ] } } diff --git a/packages/plugins/relight-studio/convax-package.json b/packages/plugins/relight-studio/convax-package.json new file mode 100644 index 0000000..6bb1302 --- /dev/null +++ b/packages/plugins/relight-studio/convax-package.json @@ -0,0 +1,14 @@ +{ + "schema": "convax.package/1", + "kind": "plugin", + "id": "relight-studio", + "name": "重打光", + "description": "连接一张 Canvas 图片,通过宿主统一的 AI 生图能力生成不同主光方向、色温与电影氛围的重打光结果。", + "version": "0.1.1", + "license": "MIT", + "compatibility": { + "pluginSchema": "convax.plugin/3", + "pluginHost": "convax.plugin-host/3" + }, + "yanked": false +} diff --git a/packages/plugins/relight-studio/package.json b/packages/plugins/relight-studio/package.json new file mode 100644 index 0000000..c71ba9d --- /dev/null +++ b/packages/plugins/relight-studio/package.json @@ -0,0 +1,20 @@ +{ + "name": "@microvoid/convax-plugin-relight-studio", + "version": "0.1.1", + "private": true, + "type": "module", + "scripts": { + "build": "bun scripts/build.ts", + "typecheck": "tsc --noEmit --jsx react-jsx --module ESNext --moduleResolution Bundler --target ES2022 --lib ES2022,DOM src/radix-controls.tsx", + "validate": "bun ../../../tooling/validate.mjs --kind plugin --id relight-studio", + "pack": "bun ../../../tooling/pack.mjs --kind plugin --id relight-studio" + }, + "devDependencies": { + "@types/react": "19.2.14", + "@types/react-dom": "19.2.3", + "radix-ui": "1.6.2", + "react": "19.2.4", + "react-dom": "19.2.4", + "typescript": "5.9.3" + } +} diff --git a/packages/plugins/relight-studio/package/LICENSE b/packages/plugins/relight-studio/package/LICENSE new file mode 100644 index 0000000..0260f10 --- /dev/null +++ b/packages/plugins/relight-studio/package/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Microvoid contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/plugins/relight-studio/package/SKILL.md b/packages/plugins/relight-studio/package/SKILL.md new file mode 100644 index 0000000..959826e --- /dev/null +++ b/packages/plugins/relight-studio/package/SKILL.md @@ -0,0 +1,27 @@ +--- +name: relight-studio +description: Generate relit variations from a directly connected Canvas image through the Relight Studio Plugin and Convax's installed image-generation tools. +--- + +# 重打光 + +Use this Skill when the user wants to relight an existing image with a new light +direction, color temperature, contrast, or cinematic atmosphere. + +1. Confirm the active Canvas contains a `relight-studio` Plugin node and connect the + source image to it with a direct incoming Canvas edge. +2. Choose a lighting preset or refine the light direction, intensity, softness, + temperature, ambient level, and atmosphere in the Plugin surface. +3. Start generation from the Plugin. It discovers compatible installed image tools + through `generation.tools.list` and submits the relighting prompt plus the direct + incoming image through `generation.canvas.execute`. +4. The host creates a pending image node beside the Plugin surface immediately, + then admits the generated image into managed Project assets and replaces that + pending node. Treat generation as successful only when the host reports the + created Canvas node id. +5. If no compatible image tool is installed or authorized, explain that generation + is unavailable and ask the user to install or authorize one; do not claim that a + preview is a generated result. + +Do not edit `.convax` files, pass local paths or credentials, call a vendor directly, +or claim that this Skill grants Plugin permissions. diff --git a/packages/plugins/relight-studio/package/assets/app.js b/packages/plugins/relight-studio/package/assets/app.js new file mode 100644 index 0000000..746941b --- /dev/null +++ b/packages/plugins/relight-studio/package/assets/app.js @@ -0,0 +1,1129 @@ +import { RelightRenderer } from "./relight-renderer.js" +import { buildRelightGenerationRequest, normalizeGenerationTools } from "./generation.js" +import { mountRadixControls } from "./radix-controls.js" + +const HOST_PROTOCOL = "convax.plugin-host/3" +const PLUGIN_ID = "relight-studio" +const CONNECTED_IMAGES_CHANGED = "canvas.connectedImages.changed" +const MAX_IMAGE_FILE_BYTES = 16 * 1024 * 1024 +const MAX_IMAGE_PIXELS = 40 * 1024 * 1024 +const STATE_SAVE_DELAY = 300 +const STATE_SAVE_MAX_ATTEMPTS = 3 +const DEFAULT_REQUEST_TIMEOUT_MS = 20_000 +const ACCEPTED_IMAGE_TYPES = new Set(["image/jpeg", "image/png", "image/webp"]) + +const PRESETS = { + cinematic: { + lightX: 0.25, + lightY: 0.24, + intensity: 1.18, + softness: 0.62, + exposure: -0.03, + temperature: 0.18, + shadows: 0.28, + contrast: 1.12, + saturation: 1.05, + vignette: 0.3, + depth: 0.46, + rim: 0.42, + keyColor: [1.08, 0.97, 0.84], + shadowColor: [0.84, 0.92, 1.02], + rimColor: [0.58, 0.82, 1.08], + }, + studio: { + lightX: 0.35, + lightY: 0.18, + intensity: 0.92, + softness: 0.9, + exposure: 0.1, + temperature: 0.02, + shadows: 0.58, + contrast: 1.02, + saturation: 0.98, + vignette: 0.1, + depth: 0.46, + rim: 0.25, + keyColor: [1.04, 1.01, 0.96], + shadowColor: [0.94, 0.97, 1.02], + rimColor: [0.92, 0.97, 1.08], + }, + sunset: { + lightX: 0.14, + lightY: 0.42, + intensity: 1.34, + softness: 0.7, + exposure: -0.08, + temperature: 0.72, + shadows: 0.2, + contrast: 1.14, + saturation: 1.14, + vignette: 0.32, + depth: 0.76, + rim: 0.7, + keyColor: [1.28, 0.76, 0.42], + shadowColor: [0.84, 0.72, 0.92], + rimColor: [1.12, 0.64, 0.64], + }, + neon: { + lightX: 0.76, + lightY: 0.28, + intensity: 1.22, + softness: 0.52, + exposure: -0.16, + temperature: -0.3, + shadows: 0.16, + contrast: 1.2, + saturation: 1.28, + vignette: 0.46, + depth: 1, + rim: 1, + keyColor: [0.48, 0.92, 1.25], + shadowColor: [0.78, 0.58, 0.94], + rimColor: [1.12, 0.44, 0.86], + }, + moonlight: { + lightX: 0.68, + lightY: 0.12, + intensity: 0.98, + softness: 0.68, + exposure: -0.28, + temperature: -0.76, + shadows: 0.14, + contrast: 1.14, + saturation: 0.82, + vignette: 0.5, + depth: 0.88, + rim: 0.84, + keyColor: [0.62, 0.82, 1.24], + shadowColor: [0.68, 0.75, 0.94], + rimColor: [0.58, 0.78, 1.12], + }, + natural: { + lightX: 0.42, + lightY: 0.2, + intensity: 0.66, + softness: 0.88, + exposure: 0.08, + temperature: 0.08, + shadows: 0.48, + contrast: 1.01, + saturation: 1.01, + vignette: 0.08, + depth: 0.34, + rim: 0.16, + keyColor: [1.04, 1, 0.94], + shadowColor: [0.9, 0.95, 1.02], + rimColor: [0.9, 0.98, 1.06], + }, +} + +const PRESET_PROMPTS = { + cinematic: "电影级冷暖对比光,暖色主光配合克制的冷色轮廓光,层次清晰但不过度戏剧化", + studio: "高端摄影棚柔光,干净均匀的主体塑形与柔和自然的接触阴影", + sunset: "日落时刻的低角度金色主光,带有柔和暖色边缘光和真实环境反射", + neon: "夜景霓虹氛围,青蓝主光与洋红轮廓光形成电影感色彩对比", + moonlight: "克制的蓝调月光,冷色方向光与深而保留细节的阴影", + natural: "自然窗光提亮,肤色或产品颜色准确,明暗过渡轻柔真实", + custom: "按照下列精确参数设计自定义主光、环境光和轮廓光", +} + +const elements = { + additionalPrompt: document.getElementById("additionalPrompt"), + chooseButton: document.getElementById("chooseButton"), + compareButton: document.getElementById("compareButton"), + compareLabel: document.getElementById("compareLabel"), + connectionPill: document.getElementById("connectionPill"), + connectionText: document.getElementById("connectionText"), + dragHint: document.getElementById("dragHint"), + emptyChooseButton: document.getElementById("emptyChooseButton"), + emptyState: document.getElementById("emptyState"), + fileInput: document.getElementById("fileInput"), + fullscreenButton: document.getElementById("fullscreenButton"), + generateButton: document.getElementById("generateButton"), + generationHelp: document.getElementById("generationHelp"), + generationResult: document.getElementById("generationResult"), + generationStatus: document.getElementById("generationStatus"), + generationTool: document.getElementById("generationTool"), + lightHandle: document.getElementById("lightHandle"), + loadingState: document.getElementById("loadingState"), + loadingText: document.getElementById("loadingText"), + presetGrid: document.getElementById("presetGrid"), + preview: document.getElementById("preview"), + previewToolbar: document.getElementById("previewToolbar"), + refreshButton: document.getElementById("refreshButton"), + resetButton: document.getElementById("resetButton"), + sourceSelect: document.getElementById("sourceSelect"), + sourceSelectShell: document.getElementById("sourceSelectShell"), + sourceStatus: document.getElementById("sourceStatus"), + toast: document.getElementById("toast"), +} + +const sliderDefinitions = { + intensity: { + input: "intensityRange", + output: "intensityOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: (value) => Math.round(value * 100) + "%", + }, + softness: { + input: "softnessRange", + output: "softnessOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: (value) => Math.round(value * 100) + "%", + }, + exposure: { + input: "exposureRange", + output: "exposureOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: signedPercent, + }, + temperature: { + input: "temperatureRange", + output: "temperatureOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: signedPercent, + }, + shadows: { + input: "shadowsRange", + output: "shadowsOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: (value) => Math.round(value * 100) + "%", + }, + contrast: { + input: "contrastRange", + output: "contrastOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: (value) => Math.round(value * 100) + "%", + }, + saturation: { + input: "saturationRange", + output: "saturationOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: (value) => Math.round(value * 100) + "%", + }, + vignette: { + input: "vignetteRange", + output: "vignetteOutput", + read: (value) => value / 100, + write: (value) => Math.round(value * 100), + label: (value) => Math.round(value * 100) + "%", + }, +} + +const renderer = new RelightRenderer(document.getElementById("relightCanvas")) +let settings = copyPreset(PRESETS.cinematic) +let presetId = "cinematic" +let selectedSourceNodeId = null +let selectedGenerationToolId = null +let connectedImages = [] +let generationTools = [] +let currentSource = { kind: "none" } +let currentBitmap = null +let hostPort = null +let hostReady = false +let generationInFlight = false +let requestSequence = 0 +let loadSequence = 0 +let refreshPromise = null +let refreshQueued = false +let saveTimer = 0 +let saveRevision = 0 +let savedRevision = 0 +let saveInFlight = null +let saveAttempts = 0 +let lastSaveError = null +let renderFrame = 0 +let toastTimer = 0 +let dragDepth = 0 +let lightPointerId = null +let radixControls = null +const pendingRequests = new Map() + +function copyPreset(preset) { + return { + ...preset, + keyColor: [...preset.keyColor], + shadowColor: [...preset.shadowColor], + rimColor: [...preset.rimColor], + showOriginal: false, + } +} + +function signedPercent(value) { + const percent = Math.round(value * 100) + return (percent > 0 ? "+" : "") + String(percent) + "%" +} + +function clamp(value, minimum, maximum) { + return Math.min(maximum, Math.max(minimum, value)) +} + +function isRecord(value) { + return Boolean(value) && typeof value === "object" && !Array.isArray(value) +} + +function setHidden(element, hidden) { + element.classList.toggle("is-hidden", hidden) +} + +function syncRadixControls() { + if (radixControls) radixControls.sync() +} + +function errorMessage(error, fallback) { + return error instanceof Error && error.message ? error.message : fallback +} + +function showToast(message, kind) { + window.clearTimeout(toastTimer) + elements.toast.textContent = message + elements.toast.dataset.kind = kind || "info" + setHidden(elements.toast, false) + toastTimer = window.setTimeout(function () { + setHidden(elements.toast, true) + }, 4_500) +} + +function setConnectionState(connected) { + elements.connectionPill.classList.toggle("is-connected", connected) + elements.connectionText.textContent = connected ? "Canvas 已连接" : "等待宿主" +} + +function setLoading(loading, label) { + if (label) elements.loadingText.textContent = label + setHidden(elements.loadingState, !loading) +} + +function setSourceStatus(value) { + elements.sourceStatus.textContent = value +} + +function scheduleRender() { + if (renderFrame) return + renderFrame = window.requestAnimationFrame(function () { + renderFrame = 0 + renderer.render(currentSource.kind === "none" ? null : settings) + }) +} + +function updatePreviewState() { + const hasSource = currentSource.kind !== "none" + elements.preview.classList.toggle("has-source", hasSource) + setHidden(elements.emptyState, hasSource) + setHidden(elements.lightHandle, !hasSource) + setHidden(elements.previewToolbar, !hasSource) + elements.lightHandle.style.left = String(settings.lightX * 100) + "%" + elements.lightHandle.style.top = String(settings.lightY * 100) + "%" + elements.preview.classList.toggle("showing-original", settings.showOriginal) + elements.compareButton.setAttribute("aria-pressed", String(settings.showOriginal)) + elements.compareLabel.textContent = settings.showOriginal ? "查看效果" : "查看原图" + updateGenerationAvailability() +} + +function updateControls() { + Object.entries(sliderDefinitions).forEach(function ([key, definition]) { + const input = document.getElementById(definition.input) + const output = document.getElementById(definition.output) + input.value = String(definition.write(settings[key])) + output.value = definition.label(settings[key]) + const minimum = Number(input.min) + const maximum = Number(input.max) + const progress = ((Number(input.value) - minimum) / (maximum - minimum)) * 100 + input.style.setProperty("--range-progress", String(progress) + "%") + }) + elements.presetGrid.querySelectorAll("[data-preset]").forEach(function (button) { + button.classList.toggle("is-active", button.dataset.preset === presetId) + }) + syncRadixControls() + updatePreviewState() +} + +function applyPreset(nextPresetId, options) { + const preset = PRESETS[nextPresetId] + if (!preset) return + presetId = nextPresetId + settings = copyPreset(preset) + updateControls() + scheduleRender() + if (!options || options.save !== false) queueStateSave() +} + +function markCustom() { + presetId = "custom" + updateControls() + scheduleRender() + queueStateSave() +} + +function snapshotState() { + return { + schemaVersion: 1, + relightProject: { + version: 1, + selectedSourceNodeId, + generation: { + toolId: selectedGenerationToolId, + additionalPrompt: elements.additionalPrompt.value.trim(), + }, + presetId, + light: { + x: settings.lightX, + y: settings.lightY, + intensity: settings.intensity, + softness: settings.softness, + keyColor: [...settings.keyColor], + shadowColor: [...settings.shadowColor], + rimColor: [...settings.rimColor], + rim: settings.rim, + depth: settings.depth, + }, + grading: { + exposure: settings.exposure, + temperature: settings.temperature, + shadows: settings.shadows, + contrast: settings.contrast, + saturation: settings.saturation, + vignette: settings.vignette, + }, + }, + } +} + +function finite(value, fallback, minimum, maximum) { + return typeof value === "number" && Number.isFinite(value) ? clamp(value, minimum, maximum) : fallback +} + +function color(value, fallback) { + if (!Array.isArray(value) || value.length !== 3) return [...fallback] + return value.map(function (channel, index) { + return finite(channel, fallback[index], 0, 2) + }) +} + +function hydrateState(value) { + const project = isRecord(value) && isRecord(value.relightProject) ? value.relightProject : null + if (!project || project.version !== 1) return + const light = isRecord(project.light) ? project.light : {} + const grading = isRecord(project.grading) ? project.grading : {} + const generation = isRecord(project.generation) ? project.generation : {} + const fallbackPreset = PRESETS[typeof project.presetId === "string" ? project.presetId : ""] || PRESETS.cinematic + presetId = typeof project.presetId === "string" ? project.presetId : "cinematic" + if (!PRESETS[presetId] && presetId !== "custom") presetId = "cinematic" + selectedSourceNodeId = typeof project.selectedSourceNodeId === "string" ? project.selectedSourceNodeId : null + selectedGenerationToolId = typeof generation.toolId === "string" ? generation.toolId : null + elements.additionalPrompt.value = typeof generation.additionalPrompt === "string" + ? generation.additionalPrompt.slice(0, 1_000) + : "" + settings = { + ...settings, + lightX: finite(light.x, fallbackPreset.lightX, 0.03, 0.97), + lightY: finite(light.y, fallbackPreset.lightY, 0.03, 0.97), + intensity: finite(light.intensity, fallbackPreset.intensity, 0, 2), + softness: finite(light.softness, fallbackPreset.softness, 0.1, 1), + keyColor: color(light.keyColor, fallbackPreset.keyColor), + shadowColor: color(light.shadowColor, fallbackPreset.shadowColor), + rimColor: color(light.rimColor, fallbackPreset.rimColor), + rim: finite(light.rim, fallbackPreset.rim, 0, 1), + depth: finite(light.depth, fallbackPreset.depth, 0, 1), + exposure: finite(grading.exposure, fallbackPreset.exposure, -1, 1), + temperature: finite(grading.temperature, fallbackPreset.temperature, -1, 1), + shadows: finite(grading.shadows, fallbackPreset.shadows, 0, 1), + contrast: finite(grading.contrast, fallbackPreset.contrast, 0.5, 1.5), + saturation: finite(grading.saturation, fallbackPreset.saturation, 0, 1.6), + vignette: finite(grading.vignette, fallbackPreset.vignette, 0, 1), + showOriginal: false, + } + updateControls() +} + +function queueStateSave() { + if (!hostReady) return + saveRevision += 1 + saveAttempts = 0 + lastSaveError = null + window.clearTimeout(saveTimer) + if (generationInFlight) return + saveTimer = window.setTimeout(function () { + void flushStateSave() + }, STATE_SAVE_DELAY) +} + +async function flushStateSave(options) { + const allowDuringGeneration = isRecord(options) && options.allowDuringGeneration === true + window.clearTimeout(saveTimer) + if (!hostReady || (!allowDuringGeneration && generationInFlight) || savedRevision >= saveRevision) return + if (saveInFlight) { + await saveInFlight + return + } + if (saveAttempts >= STATE_SAVE_MAX_ATTEMPTS) return + const targetRevision = saveRevision + saveAttempts += 1 + saveInFlight = hostRequest("canvas.node.updateState", { state: snapshotState() }) + .then(function () { + savedRevision = Math.max(savedRevision, targetRevision) + saveAttempts = 0 + lastSaveError = null + }) + .catch(function (error) { + lastSaveError = error + if (saveAttempts >= STATE_SAVE_MAX_ATTEMPTS) { + showToast(errorMessage(error, "光效参数保存失败"), "error") + } + }) + .finally(function () { + saveInFlight = null + if (!generationInFlight && savedRevision < saveRevision && saveAttempts < STATE_SAVE_MAX_ATTEMPTS) { + saveTimer = window.setTimeout( + function () { + void flushStateSave() + }, + STATE_SAVE_DELAY * Math.max(1, saveAttempts), + ) + } + }) + await saveInFlight +} + +async function drainStateSave() { + while (hostReady && savedRevision < saveRevision) { + await flushStateSave({ allowDuringGeneration: true }) + if (savedRevision >= saveRevision) return + if (saveAttempts >= STATE_SAVE_MAX_ATTEMPTS) { + throw lastSaveError instanceof Error ? lastSaveError : new Error("光效参数保存失败") + } + } +} + +function postStateSnapshotBestEffort() { + if (!hostPort || !hostReady || generationInFlight || savedRevision >= saveRevision) return + try { + hostPort.postMessage({ + id: PLUGIN_ID + ":close:" + String(++requestSequence), + method: "canvas.node.updateState", + params: { state: snapshotState() }, + protocol: HOST_PROTOCOL, + type: "request", + }) + } catch { + // The owning frame may already be gone. + } +} + +function hostRequest(method, params, timeoutMs = DEFAULT_REQUEST_TIMEOUT_MS) { + if (!hostPort) return Promise.reject(new Error("插件尚未连接宿主")) + const id = PLUGIN_ID + ":" + String(++requestSequence) + return new Promise(function (resolve, reject) { + const timeout = timeoutMs === null + ? null + : window.setTimeout(function () { + pendingRequests.delete(id) + reject(new Error("宿主请求超时")) + }, timeoutMs) + pendingRequests.set(id, { reject, resolve, timeout }) + try { + hostPort.postMessage({ id, method, ...(params === undefined ? {} : { params }), protocol: HOST_PROTOCOL, type: "request" }) + } catch (error) { + if (timeout !== null) window.clearTimeout(timeout) + pendingRequests.delete(id) + reject(error) + } + }) +} + +function rejectPendingRequests(error) { + pendingRequests.forEach(function (pending) { + if (pending.timeout !== null) window.clearTimeout(pending.timeout) + pending.reject(error) + }) + pendingRequests.clear() +} + +function normalizeConnectedImages(result) { + if (!isRecord(result) || !Array.isArray(result.images)) return [] + return result.images + .filter(function (image) { + return isRecord(image) && typeof image.id === "string" && typeof image.name === "string" && typeof image.readable === "boolean" + }) + .map(function (image) { + return { id: image.id, name: image.name, readable: image.readable, mimeType: image.mimeType } + }) +} + +function updateSourceSelect() { + elements.sourceSelect.replaceChildren() + connectedImages.forEach(function (image) { + const option = document.createElement("option") + option.value = image.id + option.textContent = image.name + (image.readable ? "" : " · 不可读取") + option.disabled = !image.readable + elements.sourceSelect.append(option) + }) + setHidden(elements.sourceSelectShell, connectedImages.length === 0) + if (currentSource.kind === "canvas") elements.sourceSelect.value = currentSource.nodeId + else if (selectedSourceNodeId) elements.sourceSelect.value = selectedSourceNodeId + syncRadixControls() +} + +function updateGenerationToolSelect() { + elements.generationTool.replaceChildren() + if (generationTools.length === 0) { + const option = document.createElement("option") + option.value = "" + option.textContent = "暂无支持参考图的生图模型" + elements.generationTool.append(option) + selectedGenerationToolId = null + } else { + const selected = generationTools.find((tool) => tool.id === selectedGenerationToolId) || generationTools[0] + selectedGenerationToolId = selected.id + generationTools.forEach(function (tool) { + const option = document.createElement("option") + option.value = tool.id + option.textContent = tool.title + option.title = tool.description + elements.generationTool.append(option) + }) + elements.generationTool.value = selected.id + } + elements.generationTool.disabled = generationInFlight || generationTools.length === 0 + elements.generationStatus.textContent = generationTools.length ? String(generationTools.length) + " 个可用" : "未找到模型" + syncRadixControls() + updateGenerationAvailability() +} + +function updateGenerationAvailability() { + if (!elements.generateButton) return + const tool = generationTools.find((candidate) => candidate.id === selectedGenerationToolId) + const canvasSource = currentSource.kind === "canvas" && connectedImages.some(function (image) { + return image.id === currentSource.nodeId && image.readable + }) + elements.generateButton.disabled = !hostReady || generationInFlight || !tool || !canvasSource + elements.generateButton.classList.toggle("is-busy", generationInFlight) + elements.generationTool.disabled = generationInFlight || generationTools.length === 0 + elements.additionalPrompt.disabled = generationInFlight + if (generationInFlight) { + elements.generationHelp.textContent = "生成任务正在运行。请保持当前 Canvas、连接和参考图片不变。" + } else if (currentSource.kind === "local") { + elements.generationHelp.textContent = "本地图片只用于预览。请把需要生成的 Canvas 图片直接连接到当前插件节点。" + } else if (!canvasSource) { + elements.generationHelp.textContent = "需要一张直接连接到当前插件节点的 Canvas 图片。" + } else if (!tool) { + elements.generationHelp.textContent = "请先安装并连接一个支持参考图的图像生成插件,然后刷新模型。" + } else { + elements.generationHelp.textContent = "将使用“" + tool.title + "”生成;结果会作为新图片节点添加到 Canvas。" + } + syncRadixControls() +} + +async function refreshConnectedImages(forceReload) { + if (!hostReady) return + if (refreshPromise) { + refreshQueued = refreshQueued || forceReload + return refreshPromise + } + refreshPromise = (async function () { + try { + connectedImages = normalizeConnectedImages(await hostRequest("canvas.connectedImages.list")) + updateSourceSelect() + if (currentSource.kind === "local") { + setSourceStatus("本地临时图片 · " + currentSource.name + " · 仅预览") + updateGenerationAvailability() + return + } + const current = currentSource.kind === "canvas" + ? connectedImages.find(function (image) { + return image.id === currentSource.nodeId && image.readable + }) + : null + const preferred = connectedImages.find(function (image) { + return image.id === selectedSourceNodeId && image.readable + }) + const readable = connectedImages.filter(function (image) { + return image.readable + }) + const target = current || preferred || readable[readable.length - 1] + if (target && (forceReload || !current)) await loadConnectedImage(target) + else if (!target && currentSource.kind === "canvas") clearSource("连接图片已断开") + else if (!target) setSourceStatus(connectedImages.length ? "连接图片暂不可读取" : "尚未连接 Canvas 图片") + updateGenerationAvailability() + } catch (error) { + showToast(errorMessage(error, "刷新画布连接失败"), "error") + } + })() + try { + await refreshPromise + } finally { + refreshPromise = null + if (refreshQueued) { + refreshQueued = false + window.queueMicrotask(function () { + void refreshConnectedImages(true) + }) + } + } +} + +async function refreshGenerationTools() { + if (!hostReady || generationInFlight) return + elements.generationStatus.textContent = "正在读取模型…" + try { + generationTools = normalizeGenerationTools(await hostRequest("generation.tools.list", { output: "image" })) + updateGenerationToolSelect() + } catch (error) { + generationTools = [] + updateGenerationToolSelect() + showToast(errorMessage(error, "读取生成模型失败"), "error") + } +} + +function dataUrlBlob(dataUrl, expectedMimeType) { + const match = /^data:([^;,]+);base64,([A-Za-z0-9+/]*={0,2})$/i.exec(dataUrl) + if (!match || match[1].toLowerCase() !== expectedMimeType.toLowerCase()) throw new Error("宿主返回了无效图片") + const decoded = window.atob(match[2]) + if (decoded.length > MAX_IMAGE_FILE_BYTES) throw new Error("图片超过 16 MiB 限制") + const bytes = new Uint8Array(decoded.length) + for (let index = 0; index < decoded.length; index += 1) bytes[index] = decoded.charCodeAt(index) + return new Blob([bytes], { type: expectedMimeType }) +} + +async function decodeImage(blob) { + const bitmap = await createImageBitmap(blob) + if (!bitmap.width || !bitmap.height || bitmap.width * bitmap.height > MAX_IMAGE_PIXELS) { + bitmap.close() + throw new Error("图片尺寸过大,最多支持 4000 万像素") + } + return bitmap +} + +function replaceBitmap(bitmap, source) { + if (currentBitmap) currentBitmap.close() + currentBitmap = bitmap + currentSource = source + renderer.setSource(bitmap, { width: bitmap.width, height: bitmap.height }, "image") + updatePreviewState() + scheduleRender() +} + +async function loadConnectedImage(image) { + const sequence = ++loadSequence + setLoading(true, "正在读取画布图片…") + try { + const result = await hostRequest("canvas.connectedImage.read", { nodeId: image.id }) + if (sequence !== loadSequence) return + if ( + !isRecord(result) || + typeof result.dataUrl !== "string" || + typeof result.mimeType !== "string" || + !ACCEPTED_IMAGE_TYPES.has(result.mimeType.toLowerCase()) + ) throw new Error("宿主没有返回可用图片") + const bitmap = await decodeImage(dataUrlBlob(result.dataUrl, result.mimeType)) + if (sequence !== loadSequence) { + bitmap.close() + return + } + const name = typeof result.name === "string" ? result.name : image.name + replaceBitmap(bitmap, { kind: "canvas", name, nodeId: image.id }) + selectedSourceNodeId = image.id + updateSourceSelect() + setSourceStatus("Canvas · " + name + " · " + String(bitmap.width) + "×" + String(bitmap.height)) + queueStateSave() + } catch (error) { + if (sequence === loadSequence) showToast(errorMessage(error, "画布图片载入失败"), "error") + } finally { + if (sequence === loadSequence) setLoading(false) + updateGenerationAvailability() + } +} + +async function loadLocalImage(file) { + if (!file || !ACCEPTED_IMAGE_TYPES.has(file.type)) { + showToast("请选择 JPEG、PNG 或 WebP 图片。", "error") + return + } + if (!Number.isSafeInteger(file.size) || file.size < 1 || file.size > MAX_IMAGE_FILE_BYTES) { + showToast("本地图片必须小于或等于 16 MiB。", "error") + return + } + const sequence = ++loadSequence + setLoading(true, "正在解码本地图片…") + try { + const bitmap = await decodeImage(file) + if (sequence !== loadSequence) { + bitmap.close() + return + } + replaceBitmap(bitmap, { kind: "local", name: file.name }) + setSourceStatus("本地临时图片 · " + file.name + " · " + String(bitmap.width) + "×" + String(bitmap.height) + " · 仅预览") + } catch (error) { + if (sequence === loadSequence) showToast(errorMessage(error, "本地图片载入失败"), "error") + } finally { + if (sequence === loadSequence) setLoading(false) + updateGenerationAvailability() + } +} + +function clearSource(status) { + loadSequence += 1 + if (currentBitmap) currentBitmap.close() + currentBitmap = null + currentSource = { kind: "none" } + renderer.clearSource() + setSourceStatus(status || "尚未载入") + updatePreviewState() +} + +function handleHostMessage(event) { + const message = event.data + if (!isRecord(message) || message.protocol !== HOST_PROTOCOL) return + if (message.type === "response" && typeof message.id === "string") { + const pending = pendingRequests.get(message.id) + if (!pending) return + if (pending.timeout !== null) window.clearTimeout(pending.timeout) + pendingRequests.delete(message.id) + if (message.ok === true) pending.resolve(message.result) + else pending.reject(new Error(typeof message.error === "string" ? message.error : "宿主请求失败")) + return + } + if (message.type !== "command" || typeof message.command !== "string") return + if (message.command === CONNECTED_IMAGES_CHANGED || message.command === "relight.refresh-connections") { + void refreshConnectedImages(true) + void refreshGenerationTools() + } else if (message.command === "relight.compare") { + toggleComparison() + } else if (message.command === "relight.reset") { + applyPreset("cinematic") + } +} + +async function initializeHost() { + try { + const context = await hostRequest("host.context.get") + const metadata = isRecord(context) && isRecord(context.node) && isRecord(context.node.data) + ? context.node.data.metadata + : null + const state = isRecord(metadata) ? metadata.convaxPluginState : null + hydrateState(state) + hostReady = true + setConnectionState(true) + await Promise.all([refreshConnectedImages(false), refreshGenerationTools()]) + } catch (error) { + showToast(errorMessage(error, "无法连接 Convax 宿主"), "error") + } +} + +function handleWindowMessage(event) { + const message = event.data + if ( + event.source !== window.parent || + hostPort || + !isRecord(message) || + message.protocol !== HOST_PROTOCOL || + message.type !== "connect" || + message.pluginId !== PLUGIN_ID || + event.ports.length !== 1 + ) return + window.removeEventListener("message", handleWindowMessage) + hostPort = event.ports[0] + hostPort.onmessage = handleHostMessage + hostPort.start() + void initializeHost() +} + +function toggleComparison() { + if (currentSource.kind === "none") return + settings.showOriginal = !settings.showOriginal + updatePreviewState() + scheduleRender() +} + +function updateLightFromEvent(event) { + const bounds = elements.preview.getBoundingClientRect() + settings.lightX = clamp((event.clientX - bounds.left) / bounds.width, 0.03, 0.97) + settings.lightY = clamp((event.clientY - bounds.top) / bounds.height, 0.03, 0.97) + presetId = "custom" + updateControls() + scheduleRender() +} + +function openFilePicker() { + elements.fileInput.click() +} + +async function toggleFullscreen() { + try { + if (document.fullscreenElement) await document.exitFullscreen() + else await document.documentElement.requestFullscreen() + } catch (error) { + showToast(errorMessage(error, "宿主或系统未允许全屏预览"), "error") + } +} + +function updateFullscreenState() { + document.documentElement.classList.toggle("is-fullscreen", Boolean(document.fullscreenElement)) +} + +function lightPositionDescription(x, y) { + const horizontal = x < 0.38 ? "左侧" : x > 0.62 ? "右侧" : "中央" + const vertical = y < 0.38 ? "上方" : y > 0.62 ? "下方" : "平视高度" + return vertical + horizontal +} + +function percent(value) { + return String(Math.round(value * 100)) + "%" +} + +function buildRelightPrompt() { + const additional = elements.additionalPrompt.value.trim() + const lines = [ + "请对参考图片进行专业重打光,只改变光照、阴影、色调与整体氛围。", + "严格保留主体身份、面部特征、姿态、构图、镜头视角、景别、背景结构、产品几何、材质、纹理、已有文字与标志;不要新增、删除、移动或替换对象,不要裁切或改变画幅。", + "灯光风格:" + (PRESET_PROMPTS[presetId] || PRESET_PROMPTS.custom) + "。", + "主光位置:画面" + lightPositionDescription(settings.lightX, settings.lightY) + + "(水平 " + percent(settings.lightX) + ",垂直 " + percent(settings.lightY) + ");主光强度 " + + percent(settings.intensity) + ";柔和度 " + percent(settings.softness) + "。", + "曝光调整 " + signedPercent(settings.exposure) + ";色温 " + signedPercent(settings.temperature) + + ";暗部抬升 " + percent(settings.shadows) + ";对比度 " + percent(settings.contrast) + + ";饱和度 " + percent(settings.saturation) + ";暗角 " + percent(settings.vignette) + "。", + "让光向、遮挡、接触阴影、反射和轮廓光连续可信,保留皮肤、织物、金属、玻璃等原始材质细节,避免塑料感、过曝光斑、脏污色块和不自然边缘。", + ] + if (additional) lines.push("补充要求:" + additional) + return lines.join("\n") +} + +function validGenerationResult(value) { + return isRecord(value) && + Array.isArray(value.createdNodeIds) && value.createdNodeIds.length > 0 && + value.createdNodeIds.every((id) => typeof id === "string" && id.length > 0) && + Number.isSafeInteger(value.revision) && value.revision >= 0 && + typeof value.toolId === "string" && value.toolId.length > 0 && + Array.isArray(value.warnings) +} + +async function generateRelight() { + if (generationInFlight) return + const tool = generationTools.find((candidate) => candidate.id === selectedGenerationToolId) + if (!tool) { + showToast("没有可用的参考图生成模型。", "error") + return + } + if (currentSource.kind !== "canvas") { + showToast("请先选择一张直接连接的 Canvas 图片;本地图片只能预览。", "error") + return + } + const image = connectedImages.find((candidate) => candidate.id === currentSource.nodeId && candidate.readable) + if (!image) { + showToast("当前 Canvas 图片已断开或不可读取。", "error") + return + } + generationInFlight = true + setHidden(elements.generationResult, true) + elements.generationStatus.textContent = "生成中" + updateGenerationAvailability() + queueStateSave() + try { + await drainStateSave() + const result = await hostRequest( + "generation.canvas.execute", + buildRelightGenerationRequest({ + prompt: buildRelightPrompt(), + referenceNodeId: image.id, + toolId: tool.id, + }), + null, + ) + if (!validGenerationResult(result)) throw new Error("宿主返回了无效生成结果") + const count = result.createdNodeIds.length + elements.generationResult.textContent = "已生成 " + String(count) + " 张图片到 Canvas(revision " + String(result.revision) + ")。" + elements.generationResult.dataset.kind = "success" + setHidden(elements.generationResult, false) + result.warnings.filter((warning) => typeof warning === "string").forEach(function (warning) { + showToast(warning, "warning") + }) + } catch (error) { + elements.generationResult.textContent = errorMessage(error, "重打光图片生成失败") + elements.generationResult.dataset.kind = "error" + setHidden(elements.generationResult, false) + } finally { + generationInFlight = false + elements.generationStatus.textContent = generationTools.length ? String(generationTools.length) + " 个可用" : "未找到模型" + updateGenerationAvailability() + void flushStateSave() + } +} + +function bindControls() { + Object.entries(sliderDefinitions).forEach(function ([key, definition]) { + const input = document.getElementById(definition.input) + input.addEventListener("input", function () { + settings[key] = definition.read(Number(input.value)) + markCustom() + }) + input.addEventListener("change", function () { + void flushStateSave() + }) + }) + elements.presetGrid.addEventListener("click", function (event) { + const button = event.target.closest("[data-preset]") + if (button) applyPreset(button.dataset.preset) + }) + elements.resetButton.addEventListener("click", function () { + applyPreset("cinematic") + }) + elements.compareButton.addEventListener("click", toggleComparison) + elements.refreshButton.addEventListener("click", function () { + void refreshConnectedImages(true) + void refreshGenerationTools() + }) + elements.fullscreenButton.addEventListener("click", function () { + void toggleFullscreen() + }) + elements.chooseButton.addEventListener("click", openFilePicker) + elements.emptyChooseButton.addEventListener("click", openFilePicker) + elements.fileInput.addEventListener("change", function () { + const file = elements.fileInput.files && elements.fileInput.files[0] + elements.fileInput.value = "" + if (file) void loadLocalImage(file) + }) + elements.sourceSelect.addEventListener("change", function () { + const image = connectedImages.find(function (candidate) { + return candidate.id === elements.sourceSelect.value && candidate.readable + }) + if (image) void loadConnectedImage(image) + }) + elements.generationTool.addEventListener("change", function () { + const tool = generationTools.find((candidate) => candidate.id === elements.generationTool.value) + selectedGenerationToolId = tool ? tool.id : null + queueStateSave() + updateGenerationAvailability() + }) + elements.additionalPrompt.addEventListener("input", queueStateSave) + elements.additionalPrompt.addEventListener("change", function () { + void flushStateSave() + }) + elements.generateButton.addEventListener("click", function () { + void generateRelight() + }) + + elements.lightHandle.addEventListener("pointerdown", function (event) { + if (event.button !== 0) return + lightPointerId = event.pointerId + elements.lightHandle.setPointerCapture(event.pointerId) + elements.lightHandle.classList.add("is-dragging") + updateLightFromEvent(event) + }) + elements.lightHandle.addEventListener("pointermove", function (event) { + if (lightPointerId === event.pointerId) updateLightFromEvent(event) + }) + function finishLightDrag(event) { + if (lightPointerId !== event.pointerId) return + lightPointerId = null + elements.lightHandle.classList.remove("is-dragging") + queueStateSave() + void flushStateSave() + } + elements.lightHandle.addEventListener("pointerup", finishLightDrag) + elements.lightHandle.addEventListener("pointercancel", finishLightDrag) + elements.lightHandle.addEventListener("keydown", function (event) { + const step = event.shiftKey ? 0.05 : 0.015 + if (event.key === "ArrowLeft") settings.lightX = clamp(settings.lightX - step, 0.03, 0.97) + else if (event.key === "ArrowRight") settings.lightX = clamp(settings.lightX + step, 0.03, 0.97) + else if (event.key === "ArrowUp") settings.lightY = clamp(settings.lightY - step, 0.03, 0.97) + else if (event.key === "ArrowDown") settings.lightY = clamp(settings.lightY + step, 0.03, 0.97) + else return + event.preventDefault() + markCustom() + }) + + elements.preview.addEventListener("dragenter", function (event) { + event.preventDefault() + dragDepth += 1 + setHidden(elements.dragHint, false) + }) + elements.preview.addEventListener("dragover", function (event) { + event.preventDefault() + }) + elements.preview.addEventListener("dragleave", function (event) { + event.preventDefault() + dragDepth = Math.max(0, dragDepth - 1) + if (!dragDepth) setHidden(elements.dragHint, true) + }) + elements.preview.addEventListener("drop", function (event) { + event.preventDefault() + dragDepth = 0 + setHidden(elements.dragHint, true) + const file = Array.from(event.dataTransfer.files || []).find(function (candidate) { + return ACCEPTED_IMAGE_TYPES.has(candidate.type) + }) + if (file) void loadLocalImage(file) + else showToast("拖入内容中没有可用的 JPEG、PNG 或 WebP 图片。", "error") + }) + document.addEventListener("fullscreenchange", updateFullscreenState) +} + +function bindLifecycle() { + window.addEventListener("message", handleWindowMessage) + window.addEventListener("beforeunload", function () { + postStateSnapshotBestEffort() + window.clearTimeout(saveTimer) + window.clearTimeout(toastTimer) + if (renderFrame) window.cancelAnimationFrame(renderFrame) + rejectPendingRequests(new Error("插件页面已关闭")) + if (hostPort) { + hostPort.onmessage = null + hostPort.close() + hostPort = null + } + if (currentBitmap) currentBitmap.close() + if (radixControls) { + radixControls.destroy() + radixControls = null + } + }) + const canvas = renderer.canvas + canvas.addEventListener("webglcontextlost", function (event) { + event.preventDefault() + renderer.contextState = "lost" + setLoading(true, "图形上下文恢复中…") + }) + canvas.addEventListener("webglcontextrestored", function () { + try { + renderer.initialize() + if (currentBitmap) renderer.setSource(currentBitmap, { width: currentBitmap.width, height: currentBitmap.height }, "image") + setLoading(false) + scheduleRender() + } catch (error) { + showToast(errorMessage(error, "WebGL 恢复失败"), "error") + } + }) + const resizeObserver = new ResizeObserver(scheduleRender) + resizeObserver.observe(elements.preview) +} + +function boot() { + radixControls = mountRadixControls(document) + bindControls() + bindLifecycle() + updateControls() + updatePreviewState() + setConnectionState(false) + setSourceStatus("尚未连接 Canvas 图片") + updateGenerationToolSelect() + try { + renderer.initialize() + scheduleRender() + } catch (error) { + elements.emptyState.querySelector("h1").textContent = "WebGL2 不可用" + elements.emptyState.querySelector("p").textContent = errorMessage(error, "无法初始化重打光预览") + elements.emptyChooseButton.disabled = true + elements.chooseButton.disabled = true + } +} + +boot() diff --git a/packages/plugins/relight-studio/package/assets/generation.js b/packages/plugins/relight-studio/package/assets/generation.js new file mode 100644 index 0000000..40dd0b6 --- /dev/null +++ b/packages/plugins/relight-studio/package/assets/generation.js @@ -0,0 +1,38 @@ +function isRecord(value) { + return Boolean(value) && typeof value === "object" && !Array.isArray(value) +} + +export function normalizeGenerationTools(result) { + if (!isRecord(result) || !Array.isArray(result.tools)) return [] + const seen = new Set() + return result.tools.filter(function (tool) { + if ( + !isRecord(tool) || + typeof tool.id !== "string" || + typeof tool.title !== "string" || + tool.kind !== "model" || + tool.output !== "image" || + !Array.isArray(tool.acceptedInputs) || + !tool.acceptedInputs.includes("reference_image") || + seen.has(tool.id) + ) return false + seen.add(tool.id) + return true + }).map(function (tool) { + return { + id: tool.id, + title: tool.title, + description: typeof tool.description === "string" ? tool.description : "", + } + }) +} + +export function buildRelightGenerationRequest(options) { + return { + output: "image", + prompt: options.prompt, + references: [{ nodeId: options.referenceNodeId, role: "reference_image" }], + resultMode: "create-pending-node", + toolId: options.toolId, + } +} diff --git a/packages/plugins/relight-studio/package/assets/radix-controls.js b/packages/plugins/relight-studio/package/assets/radix-controls.js new file mode 100644 index 0000000..cdc71e5 --- /dev/null +++ b/packages/plugins/relight-studio/package/assets/radix-controls.js @@ -0,0 +1,49 @@ +var kj=Object.create;var{getPrototypeOf:Cj,defineProperty:O8,getOwnPropertyNames:Sj}=Object;var xj=Object.prototype.hasOwnProperty;function Pj(Z){return this[Z]}var Ej,hj,v6=(Z,G,Y)=>{var J=Z!=null&&typeof Z==="object";if(J){var X=G?Ej??=new WeakMap:hj??=new WeakMap,q=X.get(Z);if(q)return q}Y=Z!=null?kj(Cj(Z)):{};let U=G||!Z||!Z.__esModule?O8(Y,"default",{value:Z,enumerable:!0}):Y;for(let Q of Sj(Z))if(!xj.call(U,Q))O8(U,Q,{get:Pj.bind(Z,Q),enumerable:!0});if(J)X.set(Z,U);return U};var VU=(Z,G)=>()=>(G||Z((G={exports:{}}).exports,G),G.exports);var yj=(Z)=>Z;function fj(Z,G){this[Z]=yj.bind(null,G)}var lG=(Z,G)=>{for(var Y in G)O8(Z,Y,{get:G[Y],enumerable:!0,configurable:!0,set:fj.bind(G,Y)})};var HJ=(Z,G)=>()=>(Z&&(G=Z(Z=0)),G);var u={};lG(u,{version:()=>BJ,useTransition:()=>eU,useSyncExternalStore:()=>tU,useState:()=>x,useRef:()=>N,useReducer:()=>iG,useOptimistic:()=>nU,useMemo:()=>A0,useLayoutEffect:()=>OZ,useInsertionEffect:()=>oU,useImperativeHandle:()=>aU,useId:()=>rU,useEffectEvent:()=>sU,useEffect:()=>P,useDeferredValue:()=>iU,useDebugValue:()=>lU,useContext:()=>n7,useCallback:()=>f,useActionState:()=>pU,use:()=>cU,unstable_useCacheRefresh:()=>dU,startTransition:()=>mU,memo:()=>uU,lazy:()=>vU,isValidElement:()=>Y6,forwardRef:()=>S,createRef:()=>gU,createElement:()=>d0,createContext:()=>o7,cloneElement:()=>h7,cacheSignal:()=>fU,cache:()=>yU,__COMPILER_RUNTIME:()=>hU,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>d6,Suspense:()=>EU,StrictMode:()=>PU,PureComponent:()=>xU,Profiler:()=>SU,Fragment:()=>E7,Component:()=>CU,Children:()=>a7,Activity:()=>kU});function rj(Z){if(Z===null||typeof Z!=="object")return null;return Z=AU&&Z[AU]||Z["@@iterator"],typeof Z==="function"?Z:null}function m6(Z,G,Y){this.props=Z,this.context=G,this.refs=RU,this.updater=Y||_U}function NU(){}function _8(Z,G,Y){this.props=Z,this.context=G,this.refs=RU,this.updater=Y||_U}function I8(){}function R8(Z,G,Y){var J=Y.ref;return{$$typeof:T8,type:Z,key:G,ref:J!==void 0?J:null,props:Y}}function aj(Z,G){return R8(Z.type,G,Z.props)}function N8(Z){return typeof Z==="object"&&Z!==null&&Z.$$typeof===T8}function oj(Z){var G={"=":"=0",":":"=2"};return"$"+Z.replace(/[=:]/g,function(Y){return G[Y]})}function $8(Z,G){return typeof Z==="object"&&Z!==null&&Z.key!=null?oj(""+Z.key):G.toString(36)}function nj(Z){switch(Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason;default:switch(typeof Z.status==="string"?Z.then(I8,I8):(Z.status="pending",Z.then(function(G){Z.status==="pending"&&(Z.status="fulfilled",Z.value=G)},function(G){Z.status==="pending"&&(Z.status="rejected",Z.reason=G)})),Z.status){case"fulfilled":return Z.value;case"rejected":throw Z.reason}}throw Z}function u6(Z,G,Y,J,X){var q=typeof Z;if(q==="undefined"||q==="boolean")Z=null;var U=!1;if(Z===null)U=!0;else switch(q){case"bigint":case"string":case"number":U=!0;break;case"object":switch(Z.$$typeof){case T8:case gj:U=!0;break;case TU:return U=Z._init,u6(U(Z._payload),G,Y,J,X)}}if(U)return X=X(Z),U=J===""?"."+$8(Z,0):J,OU(X)?(Y="",U!=null&&(Y=U.replace($U,"$&/")+"/"),u6(X,G,Y,"",function(H){return H})):X!=null&&(N8(X)&&(X=aj(X,Y+(X.key==null||Z&&Z.key===X.key?"":(""+X.key).replace($U,"$&/")+"/")+U)),G.push(X)),1;U=0;var Q=J===""?".":J+":";if(OU(Z))for(var z=0;z{T8=Symbol.for("react.transitional.element"),gj=Symbol.for("react.portal"),vj=Symbol.for("react.fragment"),uj=Symbol.for("react.strict_mode"),mj=Symbol.for("react.profiler"),dj=Symbol.for("react.consumer"),cj=Symbol.for("react.context"),pj=Symbol.for("react.forward_ref"),lj=Symbol.for("react.suspense"),ij=Symbol.for("react.memo"),TU=Symbol.for("react.lazy"),sj=Symbol.for("react.activity"),AU=Symbol.iterator;_U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wU=Object.assign,RU={};m6.prototype.isReactComponent={};m6.prototype.setState=function(Z,G){if(typeof Z!=="object"&&typeof Z!=="function"&&Z!=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,Z,G,"setState")};m6.prototype.forceUpdate=function(Z){this.updater.enqueueForceUpdate(this,Z,"forceUpdate")};NU.prototype=m6.prototype;w8=_8.prototype=new NU;w8.constructor=_8;wU(w8,m6.prototype);w8.isPureReactComponent=!0;OU=Array.isArray;W0={H:null,A:null,T:null,S:null},bU=Object.prototype.hasOwnProperty;$U=/\/+/g;IU=typeof reportError==="function"?reportError:function(Z){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Z==="object"&&Z!==null&&typeof Z.message==="string"?String(Z.message):String(Z),error:Z});if(!window.dispatchEvent(G))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",Z);return}console.error(Z)},ej={map:WJ,forEach:function(Z,G,Y){WJ(Z,function(){G.apply(this,arguments)},Y)},count:function(Z){var G=0;return WJ(Z,function(){G++}),G},toArray:function(Z){return WJ(Z,function(G){return G})||[]},only:function(Z){if(!N8(Z))throw Error("React.Children.only expected to receive a single React element child.");return Z}};kU=sj,a7=ej,CU=m6,E7=vj,SU=mj,xU=_8,PU=uj,EU=lj,d6=W0,hU={__proto__:null,c:function(Z){return W0.H.useMemoCache(Z)}},Y6=N8});var b8={};lG(b8,{version:()=>MQ,useFormStatus:()=>LQ,useFormState:()=>jQ,unstable_batchedUpdates:()=>BQ,requestFormReset:()=>WQ,preloadModule:()=>HQ,preload:()=>zQ,preinitModule:()=>QQ,preinit:()=>UQ,prefetchDNS:()=>qQ,preconnect:()=>XQ,flushSync:()=>JQ,createPortal:()=>YQ,__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>GQ});function ZQ(Z){var G="react-error:"+Z;if(1{m();c0={d:{f:$Z,r:function(){throw Error(ZQ(522))},D:$Z,C:$Z,L:$Z,m:$Z,X:$Z,S:$Z,M:$Z},p:0,findDOMNode:null},Z2=Symbol.for("react.portal");sG=d6;GQ=c0});var c6=VU((j3,DQ)=>{FQ();function KQ(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(KQ)}catch(Z){console.error(Z)}}KQ(),DQ.exports=b8});function b9(Z,G){var Y=Z.length;Z.push(G);Z:for(;0>>1,X=Z[J];if(0>>1;JpJ(Q,Y))zpJ(H,Q)?(Z[J]=H,Z[z]=Y,J=z):(Z[J]=Q,Z[U]=Y,J=U);else if(zpJ(H,Y))Z[J]=H,Z[z]=Y,J=z;else break Z}}return G}function pJ(Z,G){var Y=Z.sortIndex-G.sortIndex;return Y!==0?Y:Z.id-G.id}function sJ(Z){for(var G=u7(bZ);G!==null;){if(G.callback===null)aJ(bZ);else if(G.startTime<=Z)aJ(bZ),G.sortIndex=G.expirationTime,b9(ZZ,G);else break;G=u7(bZ)}}function E9(Z){if(QY=!1,sJ(Z),!UY)if(u7(ZZ)!==null)UY=!0,ZG||(ZG=!0,e6());else{var G=u7(bZ);G!==null&&h9(E9,G.startTime-Z)}}function WH(){return P9?!0:m7()-HHZ&&WH());){var J=F7.callback;if(typeof J==="function"){F7.callback=null,iJ=F7.priorityLevel;var X=J(F7.expirationTime<=Z);if(Z=m7(),typeof X==="function"){F7.callback=X,sJ(Z),G=!0;break G}F7===u7(ZZ)&&aJ(ZZ),sJ(Z)}else aJ(ZZ);F7=u7(ZZ)}if(F7!==null)G=!0;else{var q=u7(bZ);q!==null&&h9(E9,q.startTime-Z),G=!1}}break Z}finally{F7=null,iJ=Y,S9=!1}G=void 0}}finally{G?e6():ZG=!1}}}function h9(Z,G){zY=QH(function(){Z(m7())},G)}var m7=void 0,k9,lJ,C9,ZZ,bZ,EM=1,F7=null,iJ=3,S9=!1,UY=!1,QY=!1,P9=!1,QH,zH,UH,ZG=!1,zY=-1,hM=5,HH=-1,e6,rJ,x9,y9=5,f9=1,g9=4,GG=3,v9=2,u9=function(Z){Z.callback=null},m9=function(){return iJ},d9=function(){P9=!0},YG=function(Z,G,Y){var J=m7();switch(typeof Y==="object"&&Y!==null?(Y=Y.delay,Y=typeof Y==="number"&&0J?(Z.sortIndex=Y,b9(bZ,Z),u7(ZZ)===null&&Z===u7(bZ)&&(QY?(zH(zY),zY=-1):QY=!0,h9(E9,Y-J))):(Z.sortIndex=X,b9(ZZ,Z),UY||S9||(UY=!0,ZG||(ZG=!0,e6()))),Z},c9;var BH=HJ(()=>{if(typeof performance==="object"&&typeof performance.now==="function")k9=performance,m7=function(){return k9.now()};else lJ=Date,C9=lJ.now(),m7=function(){return lJ.now()-C9};ZZ=[],bZ=[],QH=typeof setTimeout==="function"?setTimeout:null,zH=typeof clearTimeout==="function"?clearTimeout:null,UH=typeof setImmediate<"u"?setImmediate:null;if(typeof UH==="function")e6=function(){UH(N9)};else if(typeof MessageChannel<"u")rJ=new MessageChannel,x9=rJ.port2,rJ.port1.onmessage=N9,e6=function(){x9.postMessage(null)};else e6=function(){QH(N9,0)};c9=WH});var FU={};lG(FU,{version:()=>Tj,hydrateRoot:()=>Ij,createRoot:()=>$j});function T(Z){var G="react-error:"+Z;if(1HG||(Z.current=N4[HG],N4[HG]=null,HG--)}function z0(Z,G){HG++,N4[HG]=Z.current,Z.current=G}function NX(Z,G){switch(z0(uZ,G),z0(fY,Z),z0(l7,null),G.nodeType){case 9:case 11:Z=(Z=G.documentElement)?(Z=Z.namespaceURI)?VW(Z):0:0;break;default:if(Z=G.tagName,G=G.namespaceURI)G=VW(G),Z=Qj(G,Z);else switch(Z){case"svg":Z=1;break;case"math":Z=2;break;default:Z=0}}E0(l7),z0(l7,Z)}function NG(){E0(l7),E0(fY),E0(uZ)}function b4(Z){Z.memoizedState!==null&&z0(RX,Z);var G=l7.current,Y=Qj(G,Z.type);G!==Y&&(z0(fY,Z),z0(l7,Y))}function bX(Z){fY.current===Z&&(E0(l7),E0(fY)),RX.current===Z&&(E0(RX),rY._currentValue=T6)}function V6(Z){if(p9===void 0)try{throw Error()}catch(Y){var G=Y.stack.trim().match(/\n( *(at )?)/);p9=G&&G[1]||"",MH=-1)":-1X||z[J]!==H[X]){var j=` +`+z[J].replace(" at new "," at ");return Z.displayName&&j.includes("")&&(j=j.replace("",Z.displayName)),j}while(1<=J&&0<=X);break}}}finally{l9=!1,Error.prepareStackTrace=Y}return(Y=Z?Z.displayName||Z.name:"")?V6(Y):""}function mM(Z,G){switch(Z.tag){case 26:case 27:case 5:return V6(Z.type);case 16:return V6("Lazy");case 13:return Z.child!==G&&G!==null?V6("Suspense Fallback"):V6("Suspense");case 19:return V6("SuspenseList");case 0:case 15:return i9(Z.type,!1);case 11:return i9(Z.type.render,!1);case 1:return i9(Z.type,!0);case 31:return V6("Activity");default:return""}}function FH(Z){try{var G="",Y=null;do G+=mM(Z,Y),Y=Z,Z=Z.return;while(Z);return G}catch(J){return` +Error generating stack: `+J.message+` +`+J.stack}}function hZ(Z){if(typeof iM==="function"&&sM(Z),H7&&typeof H7.setStrictMode==="function")try{H7.setStrictMode(tY,Z)}catch(G){}}function oM(Z){return Z>>>=0,Z===0?32:31-(rM(Z)/aM|0)|0}function A6(Z){var G=Z&42;if(G!==0)return G;switch(Z&-Z){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 Z&261888;case 262144:case 524288:case 1048576:case 2097152:return Z&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return Z&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return Z}}function G8(Z,G,Y){var J=Z.pendingLanes;if(J===0)return 0;var X=0,q=Z.suspendedLanes,U=Z.pingedLanes;Z=Z.warmLanes;var Q=J&134217727;return Q!==0?(J=Q&~q,J!==0?X=A6(J):(U&=Q,U!==0?X=A6(U):Y||(Y=Q&~Z,Y!==0&&(X=A6(Y))))):(Q=J&~q,Q!==0?X=A6(Q):U!==0?X=A6(U):Y||(Y=J&~Z,Y!==0&&(X=A6(Y)))),X===0?0:G!==0&&G!==X&&(G&q)===0&&(q=X&-X,Y=G&-G,q>=Y||q===32&&(Y&4194048)!==0)?G:X}function eY(Z,G){return(Z.pendingLanes&~(Z.suspendedLanes&~Z.pingedLanes)&G)===0}function nM(Z,G){switch(Z){case 1:case 2:case 4:case 8:case 64:return G+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 G+5000;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 lW(){var Z=eJ;return eJ<<=1,(eJ&62914560)===0&&(eJ=4194304),Z}function r9(Z){for(var G=[],Y=0;31>Y;Y++)G.push(Z);return G}function ZJ(Z,G){Z.pendingLanes|=G,G!==268435456&&(Z.suspendedLanes=0,Z.pingedLanes=0,Z.warmLanes=0)}function tM(Z,G,Y,J,X,q){var U=Z.pendingLanes;Z.pendingLanes=Y,Z.suspendedLanes=0,Z.pingedLanes=0,Z.warmLanes=0,Z.expiredLanes&=Y,Z.entangledLanes&=Y,Z.errorRecoveryDisabledLanes&=Y,Z.shellSuspendCounter=0;var{entanglements:Q,expirationTimes:z,hiddenUpdates:H}=Z;for(Y=U&~Y;0"u")return null;try{return Z.activeElement||Z.body}catch(G){return Z.body}}function O7(Z){return Z.replace(XF,function(G){return"\\"+G.charCodeAt(0).toString(16)+" "})}function x4(Z,G,Y,J,X,q,U,Q){if(Z.name="",U!=null&&typeof U!=="function"&&typeof U!=="symbol"&&typeof U!=="boolean"?Z.type=U:Z.removeAttribute("type"),G!=null)if(U==="number"){if(G===0&&Z.value===""||Z.value!=G)Z.value=""+D7(G)}else Z.value!==""+D7(G)&&(Z.value=""+D7(G));else U!=="submit"&&U!=="reset"||Z.removeAttribute("value");G!=null?P4(Z,U,D7(G)):Y!=null?P4(Z,U,D7(Y)):J!=null&&Z.removeAttribute("value"),X==null&&q!=null&&(Z.defaultChecked=!!q),X!=null&&(Z.checked=X&&typeof X!=="function"&&typeof X!=="symbol"),Q!=null&&typeof Q!=="function"&&typeof Q!=="symbol"&&typeof Q!=="boolean"?Z.name=""+D7(Q):Z.removeAttribute("name")}function Z1(Z,G,Y,J,X,q,U,Q){if(q!=null&&typeof q!=="function"&&typeof q!=="symbol"&&typeof q!=="boolean"&&(Z.type=q),G!=null||Y!=null){if(!(q!=="submit"&&q!=="reset"||G!==void 0&&G!==null)){S4(Z);return}Y=Y!=null?""+D7(Y):"",G=G!=null?""+D7(G):Y,Q||G===Z.value||(Z.value=G),Z.defaultValue=G}J=J!=null?J:X,J=typeof J!=="function"&&typeof J!=="symbol"&&!!J,Z.checked=Q?Z.checked:!!J,Z.defaultChecked=!!J,U!=null&&typeof U!=="function"&&typeof U!=="symbol"&&typeof U!=="boolean"&&(Z.name=U),S4(Z)}function P4(Z,G,Y){G==="number"&&CX(Z.ownerDocument)===Z||Z.defaultValue===""+Y||(Z.defaultValue=""+Y)}function $G(Z,G,Y,J){if(Z=Z.options,G){G={};for(var X=0;X=G)return{node:Y,offset:G-Z};Z=J}Z:{for(;Y;){if(Y.nextSibling){Y=Y.nextSibling;break Z}Y=Y.parentNode}Y=void 0}Y=SH(Y)}}function j1(Z,G){return Z&&G?Z===G?!0:Z&&Z.nodeType===3?!1:G&&G.nodeType===3?j1(Z,G.parentNode):("contains"in Z)?Z.contains(G):Z.compareDocumentPosition?!!(Z.compareDocumentPosition(G)&16):!1:!1}function L1(Z){Z=Z!=null&&Z.ownerDocument!=null&&Z.ownerDocument.defaultView!=null?Z.ownerDocument.defaultView:window;for(var G=CX(Z.document);G instanceof Z.HTMLIFrameElement;){try{var Y=typeof G.contentWindow.location.href==="string"}catch(J){Y=!1}if(Y)Z=G.contentWindow;else break;G=CX(Z.document)}return G}function Cq(Z){var G=Z&&Z.nodeName&&Z.nodeName.toLowerCase();return G&&(G==="input"&&(Z.type==="text"||Z.type==="search"||Z.type==="tel"||Z.type==="url"||Z.type==="password")||G==="textarea"||Z.contentEditable==="true")}function PH(Z,G,Y){var J=Y.window===Y?Y.document:Y.nodeType===9?Y:Y.ownerDocument;f4||LG==null||LG!==CX(J)||(J=LG,("selectionStart"in J)&&Cq(J)?J={start:J.selectionStart,end:J.selectionEnd}:(J=(J.ownerDocument&&J.ownerDocument.defaultView||window).getSelection(),J={anchorNode:J.anchorNode,anchorOffset:J.anchorOffset,focusNode:J.focusNode,focusOffset:J.focusOffset}),RY&&uY(RY,J)||(RY=J,J=rX(y4,"onSelect"),0>=U,X-=U,d7=1<<32-W7(G)+X|Y<R?(k=I,I=null):k=I.sibling;var b=L(F,I,K[R],A);if(b===null){I===null&&(I=k);break}Z&&I&&b.alternate===null&&G(F,I),B=q(b,B,R),w===null?$=b:w.sibling=b,w=b,I=k}if(R===K.length)return Y(F,I),r&&UZ(F,R),$;if(I===null){for(;RR?(k=I,I=null):k=I.sibling;var C=L(F,I,b.value,A);if(C===null){I===null&&(I=k);break}Z&&I&&C.alternate===null&&G(F,I),B=q(C,B,R),w===null?$=C:w.sibling=C,w=C,I=k}if(b.done)return Y(F,I),r&&UZ(F,R),$;if(I===null){for(;!b.done;R++,b=K.next())b=W(F,b.value,A),b!==null&&(B=q(b,B,R),w===null?$=b:w.sibling=b,w=b);return r&&UZ(F,R),$}for(I=J(I);!b.done;R++,b=K.next())b=M(I,F,R,b.value,A),b!==null&&(Z&&b.alternate!==null&&I.delete(b.key===null?R:b.key),B=q(b,B,R),w===null?$=b:w.sibling=b,w=b);return Z&&I.forEach(function(a){return G(F,a)}),r&&UZ(F,R),$}function O(F,B,K,A){if(typeof K==="object"&&K!==null&&K.type===zG&&K.key===null&&(K=K.props.children),typeof K==="object"&&K!==null){switch(K.$$typeof){case oJ:Z:{for(var $=K.key;B!==null;){if(B.key===$){if($=K.type,$===zG){if(B.tag===7){Y(F,B.sibling),A=X(B,K.props.children),A.return=F,F=A;break Z}}else if(B.elementType===$||typeof $==="object"&&$!==null&&$.$$typeof===kZ&&$6($)===B.type){Y(F,B.sibling),A=X(B,K.props),BY(A,K),A.return=F,F=A;break Z}Y(F,B);break}else G(F,B);B=B.sibling}K.type===zG?(A=_6(K.props.children,F.mode,A,K.key),A.return=F,F=A):(A=FX(K.type,K.key,K.props,null,F.mode,A),BY(A,K),A.return=F,F=A)}return U(F);case FY:Z:{for($=K.key;B!==null;){if(B.key===$)if(B.tag===4&&B.stateNode.containerInfo===K.containerInfo&&B.stateNode.implementation===K.implementation){Y(F,B.sibling),A=X(B,K.children||[]),A.return=F,F=A;break Z}else{Y(F,B);break}else G(F,B);B=B.sibling}A=G4(K,F.mode,A),A.return=F,F=A}return U(F);case kZ:return K=$6(K),O(F,B,K,A)}if(KY(K))return V(F,B,K,A);if(HY(K)){if($=HY(K),typeof $!=="function")throw Error(T(150));return K=$.call(K),D(F,B,K,A)}if(typeof K.then==="function")return O(F,B,JX(K),A);if(K.$$typeof===zZ)return O(F,B,YX(F,K),A);XX(F,K)}return typeof K==="string"&&K!==""||typeof K==="number"||typeof K==="bigint"?(K=""+K,B!==null&&B.tag===6?(Y(F,B.sibling),A=X(B,K),A.return=F,F=A):(Y(F,B),A=Z4(K,F.mode,A),A.return=F,F=A),U(F)):Y(F,B)}return function(F,B,K,A){try{cY=0;var $=O(F,B,K,A);return _G=null,$}catch(I){if(I===mG||I===Q8)throw I;var w=U7(29,I,null,F.mode);return w.lanes=A,w.return=F,w}finally{}}}function vq(Z){Z.updateQueue={baseState:Z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function p4(Z,G){Z=Z.updateQueue,G.updateQueue===Z&&(G.updateQueue={baseState:Z.baseState,firstBaseUpdate:Z.firstBaseUpdate,lastBaseUpdate:Z.lastBaseUpdate,shared:Z.shared,callbacks:null})}function dZ(Z){return{lane:Z,tag:0,payload:null,callback:null,next:null}}function cZ(Z,G,Y){var J=Z.updateQueue;if(J===null)return null;if(J=J.shared,(t&2)!==0){var X=J.pending;return X===null?G.next=G:(G.next=X.next,X.next=G),J.pending=G,G=xX(Z),O1(Z,null,Y),G}return U8(Z,J,G,Y),xX(Z)}function bY(Z,G,Y){if(G=G.updateQueue,G!==null&&(G=G.shared,(Y&4194048)!==0)){var J=G.lanes;J&=Z.pendingLanes,Y|=J,G.lanes=Y,sW(Z,Y)}}function J4(Z,G){var{updateQueue:Y,alternate:J}=Z;if(J!==null&&(J=J.updateQueue,Y===J)){var X=null,q=null;if(Y=Y.firstBaseUpdate,Y!==null){do{var U={lane:Y.lane,tag:Y.tag,payload:Y.payload,callback:null,next:null};q===null?X=q=U:q=q.next=U,Y=Y.next}while(Y!==null);q===null?X=q=G:q=q.next=G}else X=q=G;Y={baseState:J.baseState,firstBaseUpdate:X,lastBaseUpdate:q,shared:J.shared,callbacks:J.callbacks},Z.updateQueue=Y;return}Z=Y.lastBaseUpdate,Z===null?Y.firstBaseUpdate=G:Z.next=G,Y.lastBaseUpdate=G}function kY(){if(l4){var Z=TG;if(Z!==null)throw Z}}function CY(Z,G,Y,J){l4=!1;var X=Z.updateQueue;CZ=!1;var{firstBaseUpdate:q,lastBaseUpdate:U}=X,Q=X.shared.pending;if(Q!==null){X.shared.pending=null;var z=Q,H=z.next;z.next=null,U===null?q=H:U.next=H,U=z;var j=Z.alternate;j!==null&&(j=j.updateQueue,Q=j.lastBaseUpdate,Q!==U&&(Q===null?j.firstBaseUpdate=H:Q.next=H,j.lastBaseUpdate=z))}if(q!==null){var W=X.baseState;U=0,j=H=z=null,Q=q;do{var L=Q.lane&-536870913,M=L!==Q.lane;if(M?(p&L)===L:(J&L)===L){L!==0&&L===CG&&(l4=!0),j!==null&&(j=j.next={lane:0,tag:Q.tag,payload:Q.payload,callback:null,next:null});Z:{var V=Z,D=Q;L=G;var O=Y;switch(D.tag){case 1:if(V=D.payload,typeof V==="function"){W=V.call(O,W,L);break Z}W=V;break Z;case 3:V.flags=V.flags&-65537|128;case 0:if(V=D.payload,L=typeof V==="function"?V.call(O,W,L):V,L===null||L===void 0)break Z;W=L0({},W,L);break Z;case 2:CZ=!0}}L=Q.callback,L!==null&&(Z.flags|=64,M&&(Z.flags|=8192),M=X.callbacks,M===null?X.callbacks=[L]:M.push(L))}else M={lane:L,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},j===null?(H=j=M,z=W):j=j.next=M,U|=L;if(Q=Q.next,Q===null)if(Q=X.shared.pending,Q===null)break;else M=Q,Q=M.next,M.next=null,X.lastBaseUpdate=M,X.shared.pending=null}while(1);j===null&&(z=W),X.baseState=z,X.firstBaseUpdate=H,X.lastBaseUpdate=j,q===null&&(X.shared.lanes=0),tZ|=U,Z.lanes=U,Z.memoizedState=W}}function C1(Z,G){if(typeof Z!=="function")throw Error(T(191,Z));Z.call(G)}function S1(Z,G){var Y=Z.callbacks;if(Y!==null)for(Z.callbacks=null,Z=0;Zq?q:8;var U=h.T,Q={};h.T=Q,tq(Z,!1,G,Y);try{var z=X(),H=h.S;if(H!==null&&H(Q,z),z!==null&&typeof z==="object"&&typeof z.then==="function"){var j=tF(z,J);SY(Z,G,j,B7(Z))}else SY(Z,G,J,B7(Z))}catch(W){SY(Z,G,{then:function(){},status:"rejected",reason:W},B7())}finally{e.p=q,U!==null&&Q.types!==null&&(U.types=Q.types),h.T=U}}function XK(){}function o4(Z,G,Y,J){if(Z.tag!==5)throw Error(T(476));var X=YB(Z).queue;GB(Z,X,G,T6,Y===null?XK:function(){return JB(Z),Y(J)})}function YB(Z){var G=Z.memoizedState;if(G!==null)return G;G={memoizedState:T6,baseState:T6,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:KZ,lastRenderedState:T6},next:null};var Y={};return G.next={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:KZ,lastRenderedState:Y},next:null},Z.memoizedState=G,Z=Z.alternate,Z!==null&&(Z.memoizedState=G),G}function JB(Z){var G=YB(Z);G.next===null&&(G=Z.alternate.memoizedState),SY(Z,G.next.queue,{},B7())}function nq(){return g0(rY)}function XB(){return _0().memoizedState}function qB(){return _0().memoizedState}function qK(Z){for(var G=Z.return;G!==null;){switch(G.tag){case 24:case 3:var Y=B7();Z=dZ(Y);var J=cZ(G,Z,Y);J!==null&&(t0(J,G,Y),bY(J,G,Y)),G={cache:yq()},Z.payload=G;return}G=G.return}}function UK(Z,G,Y){var J=B7();Y={lane:J,revertLane:0,gesture:null,action:Y,hasEagerState:!1,eagerState:null,next:null},B8(Z)?QB(G,Y):(Y=xq(Z,G,Y,J),Y!==null&&(t0(Y,Z,J),zB(Y,G,J)))}function UB(Z,G,Y){var J=B7();SY(Z,G,Y,J)}function SY(Z,G,Y,J){var X={lane:J,revertLane:0,gesture:null,action:Y,hasEagerState:!1,eagerState:null,next:null};if(B8(Z))QB(G,X);else{var q=Z.alternate;if(Z.lanes===0&&(q===null||q.lanes===0)&&(q=G.lastRenderedReducer,q!==null))try{var U=G.lastRenderedState,Q=q(U,Y);if(X.hasEagerState=!0,X.eagerState=Q,j7(Q,U))return U8(Z,G,X,0),Q0===null&&q8(),!1}catch(z){}finally{}if(Y=xq(Z,G,X,J),Y!==null)return t0(Y,Z,J),zB(Y,G,J),!0}return!1}function tq(Z,G,Y,J){if(J={lane:2,revertLane:QU(),gesture:null,action:J,hasEagerState:!1,eagerState:null,next:null},B8(Z)){if(G)throw Error(T(479))}else G=xq(Z,Y,J,2),G!==null&&t0(G,Z,2)}function B8(Z){var G=Z.alternate;return Z===g||G!==null&&G===g}function QB(Z,G){wG=gX=!0;var Y=Z.pending;Y===null?G.next=G:(G.next=Y.next,Y.next=G),Z.pending=G}function zB(Z,G,Y){if((Y&4194048)!==0){var J=G.lanes;J&=Z.pendingLanes,Y|=J,G.lanes=Y,sW(Z,Y)}}function q4(Z,G,Y,J){G=Z.memoizedState,Y=Y(J,G),Y=Y===null||Y===void 0?G:L0({},G,Y),Z.memoizedState=Y,Z.lanes===0&&(Z.updateQueue.baseState=Y)}function aH(Z,G,Y,J,X,q,U){return Z=Z.stateNode,typeof Z.shouldComponentUpdate==="function"?Z.shouldComponentUpdate(J,q,U):G.prototype&&G.prototype.isPureReactComponent?!uY(Y,J)||!uY(X,q):!0}function oH(Z,G,Y,J){Z=G.state,typeof G.componentWillReceiveProps==="function"&&G.componentWillReceiveProps(Y,J),typeof G.UNSAFE_componentWillReceiveProps==="function"&&G.UNSAFE_componentWillReceiveProps(Y,J),G.state!==Z&&n4.enqueueReplaceState(G,G.state,null)}function x6(Z,G){var Y=G;if("ref"in G){Y={};for(var J in G)J!=="ref"&&(Y[J]=G[J])}if(Z=Z.defaultProps){Y===G&&(Y=L0({},Y));for(var X in Z)Y[X]===void 0&&(Y[X]=Z[X])}return Y}function BB(Z){SX(Z)}function jB(Z){console.error(Z)}function LB(Z){SX(Z)}function uX(Z,G){try{var Y=Z.onUncaughtError;Y(G.value,{componentStack:G.stack})}catch(J){setTimeout(function(){throw J})}}function nH(Z,G,Y){try{var J=Z.onCaughtError;J(Y.value,{componentStack:Y.stack,errorBoundary:G.tag===1?G.stateNode:null})}catch(X){setTimeout(function(){throw X})}}function t4(Z,G,Y){return Y=dZ(Y),Y.tag=3,Y.payload={element:null},Y.callback=function(){uX(Z,G)},Y}function MB(Z){return Z=dZ(Z),Z.tag=3,Z}function FB(Z,G,Y,J){var X=Y.type.getDerivedStateFromError;if(typeof X==="function"){var q=J.value;Z.payload=function(){return X(q)},Z.callback=function(){nH(G,Y,J)}}var U=Y.stateNode;U!==null&&typeof U.componentDidCatch==="function"&&(Z.callback=function(){nH(G,Y,J),typeof X!=="function"&&(pZ===null?pZ=new Set([this]):pZ.add(this));var Q=J.stack;this.componentDidCatch(J.value,{componentStack:Q!==null?Q:""})})}function QK(Z,G,Y,J,X){if(Y.flags|=32768,J!==null&&typeof J==="object"&&typeof J.then==="function"){if(G=Y.alternate,G!==null&&uG(G,Y,X,!0),Y=L7.current,Y!==null){switch(Y.tag){case 31:case 13:return T7===null?lX():Y.alternate===null&&$0===0&&($0=3),Y.flags&=-257,Y.flags|=65536,Y.lanes=X,J===hX?Y.flags|=16384:(G=Y.updateQueue,G===null?Y.updateQueue=new Set([J]):G.add(J),K4(Z,J,X)),!1;case 22:return Y.flags|=65536,J===hX?Y.flags|=16384:(G=Y.updateQueue,G===null?(G={transitions:null,markerInstances:null,retryQueue:new Set([J])},Y.updateQueue=G):(Y=G.retryQueue,Y===null?G.retryQueue=new Set([J]):Y.add(J)),K4(Z,J,X)),!1}throw Error(T(435,Y.tag))}return K4(Z,J,X),lX(),!1}if(r)return G=L7.current,G!==null?((G.flags&65536)===0&&(G.flags|=256),G.flags|=65536,G.lanes=X,J!==v4&&(Z=Error(T(422),{cause:J}),dY($7(Z,Y)))):(J!==v4&&(G=Error(T(423),{cause:J}),dY($7(G,Y))),Z=Z.current.alternate,Z.flags|=65536,X&=-X,Z.lanes|=X,J=$7(J,Y),X=t4(Z.stateNode,J,X),J4(Z,X),$0!==4&&($0=2)),!1;var q=Error(T(520),{cause:J});if(q=$7(q,Y),EY===null?EY=[q]:EY.push(q),$0!==4&&($0=2),G===null)return!0;J=$7(J,Y),Y=G;do{switch(Y.tag){case 3:return Y.flags|=65536,Z=X&-X,Y.lanes|=Z,Z=t4(Y.stateNode,J,Z),J4(Y,Z),!1;case 1:if(G=Y.type,q=Y.stateNode,(Y.flags&128)===0&&(typeof G.getDerivedStateFromError==="function"||q!==null&&typeof q.componentDidCatch==="function"&&(pZ===null||!pZ.has(q))))return Y.flags|=65536,X&=-X,Y.lanes|=X,X=MB(X),FB(X,Z,Y,J),J4(Y,X),!1}Y=Y.return}while(Y!==null);return!1}function h0(Z,G,Y,J){G.child=Z===null?k1(G,null,Y,J):C6(G,Z.child,Y,J)}function tH(Z,G,Y,J,X){Y=Y.render;var q=G.ref;if("ref"in J){var U={};for(var Q in J)Q!=="ref"&&(U[Q]=J[Q])}else U=J;if(k6(G),J=dq(Z,G,Y,U,q,X),Q=cq(),Z!==null&&!C0)return pq(Z,G,X),DZ(Z,G,X);return r&&Q&&Eq(G),G.flags|=1,h0(Z,G,J,X),G.child}function eH(Z,G,Y,J,X){if(Z===null){var q=Y.type;if(typeof q==="function"&&!Pq(q)&&q.defaultProps===void 0&&Y.compare===null)return G.tag=15,G.type=q,KB(Z,G,q,J,X);return Z=FX(Y.type,null,J,G,G.mode,X),Z.ref=G.ref,Z.return=G,G.child=Z}if(q=Z.child,!GU(Z,X)){var U=q.memoizedProps;if(Y=Y.compare,Y=Y!==null?Y:uY,Y(U,J)&&Z.ref===G.ref)return DZ(Z,G,X)}return G.flags|=1,Z=BZ(q,J),Z.ref=G.ref,Z.return=G,G.child=Z}function KB(Z,G,Y,J,X){if(Z!==null){var q=Z.memoizedProps;if(uY(q,J)&&Z.ref===G.ref)if(C0=!1,G.pendingProps=J=q,GU(Z,X))(Z.flags&131072)!==0&&(C0=!0);else return G.lanes=Z.lanes,DZ(Z,G,X)}return e4(Z,G,Y,J,X)}function DB(Z,G,Y,J){var X=J.children,q=Z!==null?Z.memoizedState:null;if(Z===null&&G.stateNode===null&&(G.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),J.mode==="hidden"){if((G.flags&128)!==0){if(q=q!==null?q.baseLanes|Y:Y,Z!==null){J=G.child=Z.child;for(X=0;J!==null;)X=X|J.lanes|J.childLanes,J=J.sibling;J=X&~q}else J=0,G.child=null;return ZW(Z,G,q,Y,J)}if((Y&536870912)!==0)G.memoizedState={baseLanes:0,cachePool:null},Z!==null&&KX(G,q!==null?q.cachePool:null),q!==null?dH(G,q):i4(),x1(G);else return J=G.lanes=536870912,ZW(Z,G,q!==null?q.baseLanes|Y:Y,Y,J)}else q!==null?(KX(G,q.cachePool),dH(G,q),PZ(G),G.memoizedState=null):(Z!==null&&KX(G,null),i4(),PZ(G));return h0(Z,G,X,Y),G.child}function OY(Z,G){return Z!==null&&Z.tag===22||G.stateNode!==null||(G.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),G.sibling}function ZW(Z,G,Y,J,X){var q=fq();return q=q===null?null:{parent:k0._currentValue,pool:q},G.memoizedState={baseLanes:Y,cachePool:q},Z!==null&&KX(G,null),i4(),x1(G),Z!==null&&uG(Z,G,J,!0),G.childLanes=X,null}function AX(Z,G){return G=mX({mode:G.mode,children:G.children},Z.mode),G.ref=Z.ref,Z.child=G,G.return=Z,G}function GW(Z,G,Y){return C6(G,Z.child,null,Y),Z=AX(G,G.pendingProps),Z.flags|=2,q7(G),G.memoizedState=null,Z}function zK(Z,G,Y){var J=G.pendingProps,X=(G.flags&128)!==0;if(G.flags&=-129,Z===null){if(r){if(J.mode==="hidden")return Z=AX(G,J),G.lanes=536870912,OY(null,Z);if(s4(G),(Z=j0)?(Z=Hj(Z,I7),Z=Z!==null&&Z.data==="&"?Z:null,Z!==null&&(G.memoizedState={dehydrated:Z,treeContext:aZ!==null?{id:d7,overflow:c7}:null,retryLane:536870912,hydrationErrors:null},Y=I1(Z),Y.return=G,G.child=Y,f0=G,j0=null)):Z=null,Z===null)throw oZ(G);return G.lanes=536870912,null}return AX(G,J)}var q=Z.memoizedState;if(q!==null){var U=q.dehydrated;if(s4(G),X)if(G.flags&256)G.flags&=-257,G=GW(Z,G,Y);else if(G.memoizedState!==null)G.child=Z.child,G.flags|=128,G=null;else throw Error(T(558));else if(C0||uG(Z,G,Y,!1),X=(Y&Z.childLanes)!==0,C0||X){if(J=Q0,J!==null&&(U=rW(J,Y),U!==0&&U!==q.retryLane))throw q.retryLane=U,y6(Z,U),t0(J,Z,U),ZU;lX(),G=GW(Z,G,Y)}else Z=q.treeContext,j0=_7(U.nextSibling),f0=G,r=!0,mZ=null,I7=!1,Z!==null&&_1(G,Z),G=AX(G,J),G.flags|=4096;return G}return Z=BZ(Z.child,{mode:J.mode,children:J.children}),Z.ref=G.ref,G.child=Z,Z.return=G,Z}function OX(Z,G){var Y=G.ref;if(Y===null)Z!==null&&Z.ref!==null&&(G.flags|=4194816);else{if(typeof Y!=="function"&&typeof Y!=="object")throw Error(T(284));if(Z===null||Z.ref!==Y)G.flags|=4194816}}function e4(Z,G,Y,J,X){if(k6(G),Y=dq(Z,G,Y,J,void 0,X),J=cq(),Z!==null&&!C0)return pq(Z,G,X),DZ(Z,G,X);return r&&J&&Eq(G),G.flags|=1,h0(Z,G,Y,X),G.child}function YW(Z,G,Y,J,X,q){if(k6(G),G.updateQueue=null,Y=E1(G,J,Y,X),P1(Z),J=cq(),Z!==null&&!C0)return pq(Z,G,q),DZ(Z,G,q);return r&&J&&Eq(G),G.flags|=1,h0(Z,G,Y,q),G.child}function JW(Z,G,Y,J,X){if(k6(G),G.stateNode===null){var q=KG,U=Y.contextType;typeof U==="object"&&U!==null&&(q=g0(U)),q=new Y(J,q),G.memoizedState=q.state!==null&&q.state!==void 0?q.state:null,q.updater=n4,G.stateNode=q,q._reactInternals=G,q=G.stateNode,q.props=J,q.state=G.memoizedState,q.refs={},vq(G),U=Y.contextType,q.context=typeof U==="object"&&U!==null?g0(U):KG,q.state=G.memoizedState,U=Y.getDerivedStateFromProps,typeof U==="function"&&(q4(G,Y,U,J),q.state=G.memoizedState),typeof Y.getDerivedStateFromProps==="function"||typeof q.getSnapshotBeforeUpdate==="function"||typeof q.UNSAFE_componentWillMount!=="function"&&typeof q.componentWillMount!=="function"||(U=q.state,typeof q.componentWillMount==="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount==="function"&&q.UNSAFE_componentWillMount(),U!==q.state&&n4.enqueueReplaceState(q,q.state,null),CY(G,J,q,X),kY(),q.state=G.memoizedState),typeof q.componentDidMount==="function"&&(G.flags|=4194308),J=!0}else if(Z===null){q=G.stateNode;var Q=G.memoizedProps,z=x6(Y,Q);q.props=z;var H=q.context,j=Y.contextType;U=KG,typeof j==="object"&&j!==null&&(U=g0(j));var W=Y.getDerivedStateFromProps;j=typeof W==="function"||typeof q.getSnapshotBeforeUpdate==="function",Q=G.pendingProps!==Q,j||typeof q.UNSAFE_componentWillReceiveProps!=="function"&&typeof q.componentWillReceiveProps!=="function"||(Q||H!==U)&&oH(G,q,J,U),CZ=!1;var L=G.memoizedState;q.state=L,CY(G,J,q,X),kY(),H=G.memoizedState,Q||L!==H||CZ?(typeof W==="function"&&(q4(G,Y,W,J),H=G.memoizedState),(z=CZ||aH(G,Y,z,J,L,H,U))?(j||typeof q.UNSAFE_componentWillMount!=="function"&&typeof q.componentWillMount!=="function"||(typeof q.componentWillMount==="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount==="function"&&q.UNSAFE_componentWillMount()),typeof q.componentDidMount==="function"&&(G.flags|=4194308)):(typeof q.componentDidMount==="function"&&(G.flags|=4194308),G.memoizedProps=J,G.memoizedState=H),q.props=J,q.state=H,q.context=U,J=z):(typeof q.componentDidMount==="function"&&(G.flags|=4194308),J=!1)}else{q=G.stateNode,p4(Z,G),U=G.memoizedProps,j=x6(Y,U),q.props=j,W=G.pendingProps,L=q.context,H=Y.contextType,z=KG,typeof H==="object"&&H!==null&&(z=g0(H)),Q=Y.getDerivedStateFromProps,(H=typeof Q==="function"||typeof q.getSnapshotBeforeUpdate==="function")||typeof q.UNSAFE_componentWillReceiveProps!=="function"&&typeof q.componentWillReceiveProps!=="function"||(U!==W||L!==z)&&oH(G,q,J,z),CZ=!1,L=G.memoizedState,q.state=L,CY(G,J,q,X),kY();var M=G.memoizedState;U!==W||L!==M||CZ||Z!==null&&Z.dependencies!==null&&EX(Z.dependencies)?(typeof Q==="function"&&(q4(G,Y,Q,J),M=G.memoizedState),(j=CZ||aH(G,Y,j,J,L,M,z)||Z!==null&&Z.dependencies!==null&&EX(Z.dependencies))?(H||typeof q.UNSAFE_componentWillUpdate!=="function"&&typeof q.componentWillUpdate!=="function"||(typeof q.componentWillUpdate==="function"&&q.componentWillUpdate(J,M,z),typeof q.UNSAFE_componentWillUpdate==="function"&&q.UNSAFE_componentWillUpdate(J,M,z)),typeof q.componentDidUpdate==="function"&&(G.flags|=4),typeof q.getSnapshotBeforeUpdate==="function"&&(G.flags|=1024)):(typeof q.componentDidUpdate!=="function"||U===Z.memoizedProps&&L===Z.memoizedState||(G.flags|=4),typeof q.getSnapshotBeforeUpdate!=="function"||U===Z.memoizedProps&&L===Z.memoizedState||(G.flags|=1024),G.memoizedProps=J,G.memoizedState=M),q.props=J,q.state=M,q.context=z,J=j):(typeof q.componentDidUpdate!=="function"||U===Z.memoizedProps&&L===Z.memoizedState||(G.flags|=4),typeof q.getSnapshotBeforeUpdate!=="function"||U===Z.memoizedProps&&L===Z.memoizedState||(G.flags|=1024),J=!1)}return q=J,OX(Z,G),J=(G.flags&128)!==0,q||J?(q=G.stateNode,Y=J&&typeof Y.getDerivedStateFromError!=="function"?null:q.render(),G.flags|=1,Z!==null&&J?(G.child=C6(G,Z.child,null,X),G.child=C6(G,null,Y,X)):h0(Z,G,Y,X),G.memoizedState=q.state,Z=G.child):Z=DZ(Z,G,X),Z}function XW(Z,G,Y,J){return b6(),G.flags|=256,h0(Z,G,Y,J),G.child}function Q4(Z){return{baseLanes:Z,cachePool:R1()}}function z4(Z,G,Y){return Z=Z!==null?Z.childLanes&~Y:0,G&&(Z|=Q7),Z}function VB(Z,G,Y){var J=G.pendingProps,X=!1,q=(G.flags&128)!==0,U;if((U=q)||(U=Z!==null&&Z.memoizedState===null?!1:(T0.current&2)!==0),U&&(X=!0,G.flags&=-129),U=(G.flags&32)!==0,G.flags&=-33,Z===null){if(r){if(X?xZ(G):PZ(G),(Z=j0)?(Z=Hj(Z,I7),Z=Z!==null&&Z.data!=="&"?Z:null,Z!==null&&(G.memoizedState={dehydrated:Z,treeContext:aZ!==null?{id:d7,overflow:c7}:null,retryLane:536870912,hydrationErrors:null},Y=I1(Z),Y.return=G,G.child=Y,f0=G,j0=null)):Z=null,Z===null)throw oZ(G);return Fq(Z)?G.lanes=32:G.lanes=536870912,null}var Q=J.children;if(J=J.fallback,X)return PZ(G),X=G.mode,Q=mX({mode:"hidden",children:Q},X),J=_6(J,X,Y,null),Q.return=G,J.return=G,Q.sibling=J,G.child=Q,J=G.child,J.memoizedState=Q4(Y),J.childLanes=z4(Z,U,Y),G.memoizedState=U4,OY(null,J);return xZ(G),Zq(G,Q)}var z=Z.memoizedState;if(z!==null&&(Q=z.dehydrated,Q!==null)){if(q)G.flags&256?(xZ(G),G.flags&=-257,G=H4(Z,G,Y)):G.memoizedState!==null?(PZ(G),G.child=Z.child,G.flags|=128,G=null):(PZ(G),Q=J.fallback,X=G.mode,J=mX({mode:"visible",children:J.children},X),Q=_6(Q,X,Y,null),Q.flags|=2,J.return=G,Q.return=G,J.sibling=Q,G.child=J,C6(G,Z.child,null,Y),J=G.child,J.memoizedState=Q4(Y),J.childLanes=z4(Z,U,Y),G.memoizedState=U4,G=OY(null,J));else if(xZ(G),Fq(Q)){if(U=Q.nextSibling&&Q.nextSibling.dataset,U)var H=U.dgst;U=H,J=Error(T(419)),J.stack="",J.digest=U,dY({value:J,source:null,stack:null}),G=H4(Z,G,Y)}else if(C0||uG(Z,G,Y,!1),U=(Y&Z.childLanes)!==0,C0||U){if(U=Q0,U!==null&&(J=rW(U,Y),J!==0&&J!==z.retryLane))throw z.retryLane=J,y6(Z,J),t0(U,Z,J),ZU;Mq(Q)||lX(),G=H4(Z,G,Y)}else Mq(Q)?(G.flags|=192,G.child=Z.child,G=null):(Z=z.treeContext,j0=_7(Q.nextSibling),f0=G,r=!0,mZ=null,I7=!1,Z!==null&&_1(G,Z),G=Zq(G,J.children),G.flags|=4096);return G}if(X)return PZ(G),Q=J.fallback,X=G.mode,z=Z.child,H=z.sibling,J=BZ(z,{mode:"hidden",children:J.children}),J.subtreeFlags=z.subtreeFlags&65011712,H!==null?Q=BZ(H,Q):(Q=_6(Q,X,Y,null),Q.flags|=2),Q.return=G,J.return=G,J.sibling=Q,G.child=J,OY(null,J),J=G.child,Q=Z.child.memoizedState,Q===null?Q=Q4(Y):(X=Q.cachePool,X!==null?(z=k0._currentValue,X=X.parent!==z?{parent:z,pool:z}:X):X=R1(),Q={baseLanes:Q.baseLanes|Y,cachePool:X}),J.memoizedState=Q,J.childLanes=z4(Z,U,Y),G.memoizedState=U4,OY(Z.child,J);return xZ(G),Y=Z.child,Z=Y.sibling,Y=BZ(Y,{mode:"visible",children:J.children}),Y.return=G,Y.sibling=null,Z!==null&&(U=G.deletions,U===null?(G.deletions=[Z],G.flags|=16):U.push(Z)),G.child=Y,G.memoizedState=null,Y}function Zq(Z,G){return G=mX({mode:"visible",children:G},Z.mode),G.return=Z,Z.child=G}function mX(Z,G){return Z=U7(22,Z,null,G),Z.lanes=0,Z}function H4(Z,G,Y){return C6(G,Z.child,null,Y),Z=Zq(G,G.pendingProps.children),Z.flags|=2,G.memoizedState=null,Z}function qW(Z,G,Y){Z.lanes|=G;var J=Z.alternate;J!==null&&(J.lanes|=G),m4(Z.return,G,Y)}function W4(Z,G,Y,J,X,q){var U=Z.memoizedState;U===null?Z.memoizedState={isBackwards:G,rendering:null,renderingStartTime:0,last:J,tail:Y,tailMode:X,treeForkCount:q}:(U.isBackwards=G,U.rendering=null,U.renderingStartTime=0,U.last=J,U.tail=Y,U.tailMode=X,U.treeForkCount=q)}function AB(Z,G,Y){var J=G.pendingProps,X=J.revealOrder,q=J.tail;J=J.children;var U=T0.current,Q=(U&2)!==0;if(Q?(U=U&1|2,G.flags|=128):U&=1,z0(T0,U),h0(Z,G,J,Y),J=r?mY:0,!Q&&Z!==null&&(Z.flags&128)!==0)Z:for(Z=G.child;Z!==null;){if(Z.tag===13)Z.memoizedState!==null&&qW(Z,Y,G);else if(Z.tag===19)qW(Z,Y,G);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===G)break Z;for(;Z.sibling===null;){if(Z.return===null||Z.return===G)break Z;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}switch(X){case"forwards":Y=G.child;for(X=null;Y!==null;)Z=Y.alternate,Z!==null&&fX(Z)===null&&(X=Y),Y=Y.sibling;Y=X,Y===null?(X=G.child,G.child=null):(X=Y.sibling,Y.sibling=null),W4(G,!1,X,Y,q,J);break;case"backwards":case"unstable_legacy-backwards":Y=null,X=G.child;for(G.child=null;X!==null;){if(Z=X.alternate,Z!==null&&fX(Z)===null){G.child=X;break}Z=X.sibling,X.sibling=Y,Y=X,X=Z}W4(G,!0,Y,null,q,J);break;case"together":W4(G,!1,null,null,void 0,J);break;default:G.memoizedState=null}return G.child}function DZ(Z,G,Y){if(Z!==null&&(G.dependencies=Z.dependencies),tZ|=G.lanes,(Y&G.childLanes)===0)if(Z!==null){if(uG(Z,G,Y,!1),(Y&G.childLanes)===0)return null}else return null;if(Z!==null&&G.child!==Z.child)throw Error(T(153));if(G.child!==null){Z=G.child,Y=BZ(Z,Z.pendingProps),G.child=Y;for(Y.return=G;Z.sibling!==null;)Z=Z.sibling,Y=Y.sibling=BZ(Z,Z.pendingProps),Y.return=G;Y.sibling=null}return G.child}function GU(Z,G){if((Z.lanes&G)!==0)return!0;return Z=Z.dependencies,Z!==null&&EX(Z)?!0:!1}function HK(Z,G,Y){switch(G.tag){case 3:NX(G,G.stateNode.containerInfo),SZ(G,k0,Z.memoizedState.cache),b6();break;case 27:case 5:b4(G);break;case 4:NX(G,G.stateNode.containerInfo);break;case 10:SZ(G,G.type,G.memoizedProps.value);break;case 31:if(G.memoizedState!==null)return G.flags|=128,s4(G),null;break;case 13:var J=G.memoizedState;if(J!==null){if(J.dehydrated!==null)return xZ(G),G.flags|=128,null;if((Y&G.child.childLanes)!==0)return VB(Z,G,Y);return xZ(G),Z=DZ(Z,G,Y),Z!==null?Z.sibling:null}xZ(G);break;case 19:var X=(Z.flags&128)!==0;if(J=(Y&G.childLanes)!==0,J||(uG(Z,G,Y,!1),J=(Y&G.childLanes)!==0),X){if(J)return AB(Z,G,Y);G.flags|=128}if(X=G.memoizedState,X!==null&&(X.rendering=null,X.tail=null,X.lastEffect=null),z0(T0,T0.current),J)break;else return null;case 22:return G.lanes=0,DB(Z,G,Y,G.pendingProps);case 24:SZ(G,k0,Z.memoizedState.cache)}return DZ(Z,G,Y)}function OB(Z,G,Y){if(Z!==null)if(Z.memoizedProps!==G.pendingProps)C0=!0;else{if(!GU(Z,Y)&&(G.flags&128)===0)return C0=!1,HK(Z,G,Y);C0=(Z.flags&131072)!==0?!0:!1}else C0=!1,r&&(G.flags&1048576)!==0&&T1(G,mY,G.index);switch(G.lanes=0,G.tag){case 16:Z:{var J=G.pendingProps;if(Z=$6(G.elementType),G.type=Z,typeof Z==="function")Pq(Z)?(J=x6(Z,J),G.tag=1,G=JW(null,G,Z,J,Y)):(G.tag=0,G=e4(null,G,Z,J,Y));else{if(Z!==void 0&&Z!==null){var X=Z.$$typeof;if(X===Aq){G.tag=11,G=tH(null,G,Z,J,Y);break Z}else if(X===Oq){G.tag=14,G=eH(null,G,Z,J,Y);break Z}}throw G=R4(Z)||Z,Error(T(306,G,""))}}return G;case 0:return e4(Z,G,G.type,G.pendingProps,Y);case 1:return J=G.type,X=x6(J,G.pendingProps),JW(Z,G,J,X,Y);case 3:Z:{if(NX(G,G.stateNode.containerInfo),Z===null)throw Error(T(387));J=G.pendingProps;var q=G.memoizedState;X=q.element,p4(Z,G),CY(G,J,null,Y);var U=G.memoizedState;if(J=U.cache,SZ(G,k0,J),J!==q.cache&&d4(G,[k0],Y,!0),kY(),J=U.element,q.isDehydrated)if(q={element:J,isDehydrated:!1,cache:U.cache},G.updateQueue.baseState=q,G.memoizedState=q,G.flags&256){G=XW(Z,G,J,Y);break Z}else if(J!==X){X=$7(Error(T(424)),G),dY(X),G=XW(Z,G,J,Y);break Z}else{switch(Z=G.stateNode.containerInfo,Z.nodeType){case 9:Z=Z.body;break;default:Z=Z.nodeName==="HTML"?Z.ownerDocument.body:Z}j0=_7(Z.firstChild),f0=G,r=!0,mZ=null,I7=!0,Y=k1(G,null,J,Y);for(G.child=Y;Y;)Y.flags=Y.flags&-3|4096,Y=Y.sibling}else{if(b6(),J===X){G=DZ(Z,G,Y);break Z}h0(Z,G,J,Y)}G=G.child}return G;case 26:return OX(Z,G),Z===null?(Y=wW(G.type,null,G.pendingProps,null))?G.memoizedState=Y:r||(Y=G.type,Z=G.pendingProps,J=aX(uZ.current).createElement(Y),J[y0]=G,J[e0]=Z,v0(J,Y,Z),P0(J),G.stateNode=J):G.memoizedState=wW(G.type,Z.memoizedProps,G.pendingProps,Z.memoizedState),null;case 27:return b4(G),Z===null&&r&&(J=G.stateNode=Wj(G.type,G.pendingProps,uZ.current),f0=G,I7=!0,X=j0,Z6(G.type)?(Kq=X,j0=_7(J.firstChild)):j0=X),h0(Z,G,G.pendingProps.children,Y),OX(Z,G),Z===null&&(G.flags|=4194304),G.child;case 5:if(Z===null&&r){if(X=J=j0)J=fK(J,G.type,G.pendingProps,I7),J!==null?(G.stateNode=J,f0=G,j0=_7(J.firstChild),I7=!1,X=!0):X=!1;X||oZ(G)}return b4(G),X=G.type,q=G.pendingProps,U=Z!==null?Z.memoizedProps:null,J=q.children,jq(X,q)?J=null:U!==null&&jq(X,U)&&(G.flags|=32),G.memoizedState!==null&&(X=dq(Z,G,ZK,null,null,Y),rY._currentValue=X),OX(Z,G),h0(Z,G,J,Y),G.child;case 6:if(Z===null&&r){if(Z=Y=j0)Y=gK(Y,G.pendingProps,I7),Y!==null?(G.stateNode=Y,f0=G,j0=null,Z=!0):Z=!1;Z||oZ(G)}return null;case 13:return VB(Z,G,Y);case 4:return NX(G,G.stateNode.containerInfo),J=G.pendingProps,Z===null?G.child=C6(G,null,J,Y):h0(Z,G,J,Y),G.child;case 11:return tH(Z,G,G.type,G.pendingProps,Y);case 7:return h0(Z,G,G.pendingProps,Y),G.child;case 8:return h0(Z,G,G.pendingProps.children,Y),G.child;case 12:return h0(Z,G,G.pendingProps.children,Y),G.child;case 10:return J=G.pendingProps,SZ(G,G.type,J.value),h0(Z,G,J.children,Y),G.child;case 9:return X=G.type._context,J=G.pendingProps.children,k6(G),X=g0(X),J=J(X),G.flags|=1,h0(Z,G,J,Y),G.child;case 14:return eH(Z,G,G.type,G.pendingProps,Y);case 15:return KB(Z,G,G.type,G.pendingProps,Y);case 19:return AB(Z,G,Y);case 31:return zK(Z,G,Y);case 22:return DB(Z,G,Y,G.pendingProps);case 24:return k6(G),J=g0(k0),Z===null?(X=fq(),X===null&&(X=Q0,q=yq(),X.pooledCache=q,q.refCount++,q!==null&&(X.pooledCacheLanes|=Y),X=q),G.memoizedState={parent:J,cache:X},vq(G),SZ(G,k0,X)):((Z.lanes&Y)!==0&&(p4(Z,G),CY(G,null,null,Y),kY()),X=Z.memoizedState,q=G.memoizedState,X.parent!==J?(X={parent:J,cache:J},G.memoizedState=X,G.lanes===0&&(G.memoizedState=G.updateQueue.baseState=X),SZ(G,k0,J)):(J=q.cache,SZ(G,k0,J),J!==X.cache&&d4(G,[k0],Y,!0))),h0(Z,G,G.pendingProps.children,Y),G.child;case 29:throw G.pendingProps}throw Error(T(156,G.tag))}function YZ(Z){Z.flags|=4}function B4(Z,G,Y,J,X){if(G=(Z.mode&32)!==0)G=!1;if(G){if(Z.flags|=16777216,(X&335544128)===X)if(Z.stateNode.complete)Z.flags|=8192;else if(pB())Z.flags|=8192;else throw R6=hX,gq}else Z.flags&=-16777217}function UW(Z,G){if(G.type!=="stylesheet"||(G.state.loading&4)!==0)Z.flags&=-16777217;else if(Z.flags|=16777216,!Lj(G))if(pB())Z.flags|=8192;else throw R6=hX,gq}function qX(Z,G){G!==null&&(Z.flags|=4),Z.flags&16384&&(G=Z.tag!==22?lW():536870912,Z.lanes|=G,PG|=G)}function jY(Z,G){if(!r)switch(Z.tailMode){case"hidden":G=Z.tail;for(var Y=null;G!==null;)G.alternate!==null&&(Y=G),G=G.sibling;Y===null?Z.tail=null:Y.sibling=null;break;case"collapsed":Y=Z.tail;for(var J=null;Y!==null;)Y.alternate!==null&&(J=Y),Y=Y.sibling;J===null?G||Z.tail===null?Z.tail=null:Z.tail.sibling=null:J.sibling=null}}function B0(Z){var G=Z.alternate!==null&&Z.alternate.child===Z.child,Y=0,J=0;if(G)for(var X=Z.child;X!==null;)Y|=X.lanes|X.childLanes,J|=X.subtreeFlags&65011712,J|=X.flags&65011712,X.return=Z,X=X.sibling;else for(X=Z.child;X!==null;)Y|=X.lanes|X.childLanes,J|=X.subtreeFlags,J|=X.flags,X.return=Z,X=X.sibling;return Z.subtreeFlags|=J,Z.childLanes=Y,G}function WK(Z,G,Y){var J=G.pendingProps;switch(hq(G),G.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B0(G),null;case 1:return B0(G),null;case 3:if(Y=G.stateNode,J=null,Z!==null&&(J=Z.memoizedState.cache),G.memoizedState.cache!==J&&(G.flags|=2048),jZ(k0),NG(),Y.pendingContext&&(Y.context=Y.pendingContext,Y.pendingContext=null),Z===null||Z.child===null)JG(G)?YZ(G):Z===null||Z.memoizedState.isDehydrated&&(G.flags&256)===0||(G.flags|=1024,Y4());return B0(G),null;case 26:var{type:X,memoizedState:q}=G;return Z===null?(YZ(G),q!==null?(B0(G),UW(G,q)):(B0(G),B4(G,X,null,J,Y))):q?q!==Z.memoizedState?(YZ(G),B0(G),UW(G,q)):(B0(G),G.flags&=-16777217):(Z=Z.memoizedProps,Z!==J&&YZ(G),B0(G),B4(G,X,Z,J,Y)),null;case 27:if(bX(G),Y=uZ.current,X=G.type,Z!==null&&G.stateNode!=null)Z.memoizedProps!==J&&YZ(G);else{if(!J){if(G.stateNode===null)throw Error(T(166));return B0(G),null}Z=l7.current,JG(G)?hH(G,Z):(Z=Wj(X,J,Y),G.stateNode=Z,YZ(G))}return B0(G),null;case 5:if(bX(G),X=G.type,Z!==null&&G.stateNode!=null)Z.memoizedProps!==J&&YZ(G);else{if(!J){if(G.stateNode===null)throw Error(T(166));return B0(G),null}if(q=l7.current,JG(G))hH(G,q);else{var U=aX(uZ.current);switch(q){case 1:q=U.createElementNS("http"+"://www.w3.org/2000/svg",X);break;case 2:q=U.createElementNS("http"+"://www.w3.org/1998/Math/MathML",X);break;default:switch(X){case"svg":q=U.createElementNS("http"+"://www.w3.org/2000/svg",X);break;case"math":q=U.createElementNS("http"+"://www.w3.org/1998/Math/MathML",X);break;case"script":q=U.createElement("div"),q.innerHTML="",q=q.removeChild(q.firstChild);break;case"select":q=typeof J.is==="string"?U.createElement("select",{is:J.is}):U.createElement("select"),J.multiple?q.multiple=!0:J.size&&(q.size=J.size);break;default:q=typeof J.is==="string"?U.createElement(X,{is:J.is}):U.createElement(X)}}q[y0]=G,q[e0]=J;Z:for(U=G.child;U!==null;){if(U.tag===5||U.tag===6)q.appendChild(U.stateNode);else if(U.tag!==4&&U.tag!==27&&U.child!==null){U.child.return=U,U=U.child;continue}if(U===G)break Z;for(;U.sibling===null;){if(U.return===null||U.return===G)break Z;U=U.return}U.sibling.return=U.return,U=U.sibling}G.stateNode=q;Z:switch(v0(q,X,J),X){case"button":case"input":case"select":case"textarea":J=!!J.autoFocus;break Z;case"img":J=!0;break Z;default:J=!1}J&&YZ(G)}}return B0(G),B4(G,G.type,Z===null?null:Z.memoizedProps,G.pendingProps,Y),null;case 6:if(Z&&G.stateNode!=null)Z.memoizedProps!==J&&YZ(G);else{if(typeof J!=="string"&&G.stateNode===null)throw Error(T(166));if(Z=uZ.current,JG(G)){if(Z=G.stateNode,Y=G.memoizedProps,J=null,X=f0,X!==null)switch(X.tag){case 27:case 5:J=X.memoizedProps}Z[y0]=G,Z=Z.nodeValue===Y||J!==null&&J.suppressHydrationWarning===!0||Uj(Z.nodeValue,Y)?!0:!1,Z||oZ(G,!0)}else Z=aX(Z).createTextNode(J),Z[y0]=G,G.stateNode=Z}return B0(G),null;case 31:if(Y=G.memoizedState,Z===null||Z.memoizedState!==null){if(J=JG(G),Y!==null){if(Z===null){if(!J)throw Error(T(318));if(Z=G.memoizedState,Z=Z!==null?Z.dehydrated:null,!Z)throw Error(T(557));Z[y0]=G}else b6(),(G.flags&128)===0&&(G.memoizedState=null),G.flags|=4;B0(G),Z=!1}else Y=Y4(),Z!==null&&Z.memoizedState!==null&&(Z.memoizedState.hydrationErrors=Y),Z=!0;if(!Z){if(G.flags&256)return q7(G),G;return q7(G),null}if((G.flags&128)!==0)throw Error(T(558))}return B0(G),null;case 13:if(J=G.memoizedState,Z===null||Z.memoizedState!==null&&Z.memoizedState.dehydrated!==null){if(X=JG(G),J!==null&&J.dehydrated!==null){if(Z===null){if(!X)throw Error(T(318));if(X=G.memoizedState,X=X!==null?X.dehydrated:null,!X)throw Error(T(317));X[y0]=G}else b6(),(G.flags&128)===0&&(G.memoizedState=null),G.flags|=4;B0(G),X=!1}else X=Y4(),Z!==null&&Z.memoizedState!==null&&(Z.memoizedState.hydrationErrors=X),X=!0;if(!X){if(G.flags&256)return q7(G),G;return q7(G),null}}if(q7(G),(G.flags&128)!==0)return G.lanes=Y,G;return Y=J!==null,Z=Z!==null&&Z.memoizedState!==null,Y&&(J=G.child,X=null,J.alternate!==null&&J.alternate.memoizedState!==null&&J.alternate.memoizedState.cachePool!==null&&(X=J.alternate.memoizedState.cachePool.pool),q=null,J.memoizedState!==null&&J.memoizedState.cachePool!==null&&(q=J.memoizedState.cachePool.pool),q!==X&&(J.flags|=2048)),Y!==Z&&Y&&(G.child.flags|=8192),qX(G,G.updateQueue),B0(G),null;case 4:return NG(),Z===null&&zU(G.stateNode.containerInfo),B0(G),null;case 10:return jZ(G.type),B0(G),null;case 19:if(E0(T0),J=G.memoizedState,J===null)return B0(G),null;if(X=(G.flags&128)!==0,q=J.rendering,q===null)if(X)jY(J,!1);else{if($0!==0||Z!==null&&(Z.flags&128)!==0)for(Z=G.child;Z!==null;){if(q=fX(Z),q!==null){G.flags|=128,jY(J,!1),Z=q.updateQueue,G.updateQueue=Z,qX(G,Z),G.subtreeFlags=0,Z=Y;for(Y=G.child;Y!==null;)$1(Y,Z),Y=Y.sibling;return z0(T0,T0.current&1|2),r&&UZ(G,J.treeForkCount),G.child}Z=Z.sibling}J.tail!==null&&z7()>cX&&(G.flags|=128,X=!0,jY(J,!1),G.lanes=4194304)}else{if(!X)if(Z=fX(q),Z!==null){if(G.flags|=128,X=!0,Z=Z.updateQueue,G.updateQueue=Z,qX(G,Z),jY(J,!0),J.tail===null&&J.tailMode==="hidden"&&!q.alternate&&!r)return B0(G),null}else 2*z7()-J.renderingStartTime>cX&&Y!==536870912&&(G.flags|=128,X=!0,jY(J,!1),G.lanes=4194304);J.isBackwards?(q.sibling=G.child,G.child=q):(Z=J.last,Z!==null?Z.sibling=q:G.child=q,J.last=q)}if(J.tail!==null)return Z=J.tail,J.rendering=Z,J.tail=Z.sibling,J.renderingStartTime=z7(),Z.sibling=null,Y=T0.current,z0(T0,X?Y&1|2:Y&1),r&&UZ(G,J.treeForkCount),Z;return B0(G),null;case 22:case 23:return q7(G),uq(),J=G.memoizedState!==null,Z!==null?Z.memoizedState!==null!==J&&(G.flags|=8192):J&&(G.flags|=8192),J?(Y&536870912)!==0&&(G.flags&128)===0&&(B0(G),G.subtreeFlags&6&&(G.flags|=8192)):B0(G),Y=G.updateQueue,Y!==null&&qX(G,Y.retryQueue),Y=null,Z!==null&&Z.memoizedState!==null&&Z.memoizedState.cachePool!==null&&(Y=Z.memoizedState.cachePool.pool),J=null,G.memoizedState!==null&&G.memoizedState.cachePool!==null&&(J=G.memoizedState.cachePool.pool),J!==Y&&(G.flags|=2048),Z!==null&&E0(w6),null;case 24:return Y=null,Z!==null&&(Y=Z.memoizedState.cache),G.memoizedState.cache!==Y&&(G.flags|=2048),jZ(k0),B0(G),null;case 25:return null;case 30:return null}throw Error(T(156,G.tag))}function BK(Z,G){switch(hq(G),G.tag){case 1:return Z=G.flags,Z&65536?(G.flags=Z&-65537|128,G):null;case 3:return jZ(k0),NG(),Z=G.flags,(Z&65536)!==0&&(Z&128)===0?(G.flags=Z&-65537|128,G):null;case 26:case 27:case 5:return bX(G),null;case 31:if(G.memoizedState!==null){if(q7(G),G.alternate===null)throw Error(T(340));b6()}return Z=G.flags,Z&65536?(G.flags=Z&-65537|128,G):null;case 13:if(q7(G),Z=G.memoizedState,Z!==null&&Z.dehydrated!==null){if(G.alternate===null)throw Error(T(340));b6()}return Z=G.flags,Z&65536?(G.flags=Z&-65537|128,G):null;case 19:return E0(T0),null;case 4:return NG(),null;case 10:return jZ(G.type),null;case 22:case 23:return q7(G),uq(),Z!==null&&E0(w6),Z=G.flags,Z&65536?(G.flags=Z&-65537|128,G):null;case 24:return jZ(k0),null;case 25:return null;default:return null}}function $B(Z,G){switch(hq(G),G.tag){case 3:jZ(k0),NG();break;case 26:case 27:case 5:bX(G);break;case 4:NG();break;case 31:G.memoizedState!==null&&q7(G);break;case 13:q7(G);break;case 19:E0(T0);break;case 10:jZ(G.type);break;case 22:case 23:q7(G),uq(),Z!==null&&E0(w6);break;case 24:jZ(k0)}}function qJ(Z,G){try{var Y=G.updateQueue,J=Y!==null?Y.lastEffect:null;if(J!==null){var X=J.next;Y=X;do{if((Y.tag&Z)===Z){J=void 0;var{create:q,inst:U}=Y;J=q(),U.destroy=J}Y=Y.next}while(Y!==X)}}catch(Q){X0(G,G.return,Q)}}function nZ(Z,G,Y){try{var J=G.updateQueue,X=J!==null?J.lastEffect:null;if(X!==null){var q=X.next;J=q;do{if((J.tag&Z)===Z){var U=J.inst,Q=U.destroy;if(Q!==void 0){U.destroy=void 0,X=G;var z=Y,H=Q;try{H()}catch(j){X0(X,z,j)}}}J=J.next}while(J!==q)}}catch(j){X0(G,G.return,j)}}function IB(Z){var G=Z.updateQueue;if(G!==null){var Y=Z.stateNode;try{S1(G,Y)}catch(J){X0(Z,Z.return,J)}}}function TB(Z,G,Y){Y.props=x6(Z.type,Z.memoizedProps),Y.state=Z.memoizedState;try{Y.componentWillUnmount()}catch(J){X0(Z,G,J)}}function xY(Z,G){try{var Y=Z.ref;if(Y!==null){switch(Z.tag){case 26:case 27:case 5:var J=Z.stateNode;break;case 30:J=Z.stateNode;break;default:J=Z.stateNode}typeof Y==="function"?Z.refCleanup=Y(J):Y.current=J}}catch(X){X0(Z,G,X)}}function p7(Z,G){var{ref:Y,refCleanup:J}=Z;if(Y!==null)if(typeof J==="function")try{J()}catch(X){X0(Z,G,X)}finally{Z.refCleanup=null,Z=Z.alternate,Z!=null&&(Z.refCleanup=null)}else if(typeof Y==="function")try{Y(null)}catch(X){X0(Z,G,X)}else Y.current=null}function _B(Z){var{type:G,memoizedProps:Y,stateNode:J}=Z;try{Z:switch(G){case"button":case"input":case"select":case"textarea":Y.autoFocus&&J.focus();break Z;case"img":Y.src?J.src=Y.src:Y.srcSet&&(J.srcset=Y.srcSet)}}catch(X){X0(Z,Z.return,X)}}function j4(Z,G,Y){try{var J=Z.stateNode;SK(J,Z.type,Y,G),J[e0]=G}catch(X){X0(Z,Z.return,X)}}function wB(Z){return Z.tag===5||Z.tag===3||Z.tag===26||Z.tag===27&&Z6(Z.type)||Z.tag===4}function L4(Z){Z:for(;;){for(;Z.sibling===null;){if(Z.return===null||wB(Z.return))return null;Z=Z.return}Z.sibling.return=Z.return;for(Z=Z.sibling;Z.tag!==5&&Z.tag!==6&&Z.tag!==18;){if(Z.tag===27&&Z6(Z.type))continue Z;if(Z.flags&2)continue Z;if(Z.child===null||Z.tag===4)continue Z;else Z.child.return=Z,Z=Z.child}if(!(Z.flags&2))return Z.stateNode}}function Gq(Z,G,Y){var J=Z.tag;if(J===5||J===6)Z=Z.stateNode,G?(Y.nodeType===9?Y.body:Y.nodeName==="HTML"?Y.ownerDocument.body:Y).insertBefore(Z,G):(G=Y.nodeType===9?Y.body:Y.nodeName==="HTML"?Y.ownerDocument.body:Y,G.appendChild(Z),Y=Y._reactRootContainer,Y!==null&&Y!==void 0||G.onclick!==null||(G.onclick=HZ));else if(J!==4&&(J===27&&Z6(Z.type)&&(Y=Z.stateNode,G=null),Z=Z.child,Z!==null))for(Gq(Z,G,Y),Z=Z.sibling;Z!==null;)Gq(Z,G,Y),Z=Z.sibling}function dX(Z,G,Y){var J=Z.tag;if(J===5||J===6)Z=Z.stateNode,G?Y.insertBefore(Z,G):Y.appendChild(Z);else if(J!==4&&(J===27&&Z6(Z.type)&&(Y=Z.stateNode),Z=Z.child,Z!==null))for(dX(Z,G,Y),Z=Z.sibling;Z!==null;)dX(Z,G,Y),Z=Z.sibling}function RB(Z){var{stateNode:G,memoizedProps:Y}=Z;try{for(var J=Z.type,X=G.attributes;X.length;)G.removeAttributeNode(X[0]);v0(G,J,Y),G[y0]=Z,G[e0]=Y}catch(q){X0(Z,Z.return,q)}}function jK(Z,G){if(Z=Z.containerInfo,Wq=eX,Z=L1(Z),Cq(Z)){if("selectionStart"in Z)var Y={start:Z.selectionStart,end:Z.selectionEnd};else Z:{Y=(Y=Z.ownerDocument)&&Y.defaultView||window;var J=Y.getSelection&&Y.getSelection();if(J&&J.rangeCount!==0){Y=J.anchorNode;var{anchorOffset:X,focusNode:q}=J;J=J.focusOffset;try{Y.nodeType,q.nodeType}catch(D){Y=null;break Z}var U=0,Q=-1,z=-1,H=0,j=0,W=Z,L=null;G:for(;;){for(var M;;){if(W!==Y||X!==0&&W.nodeType!==3||(Q=U+X),W!==q||J!==0&&W.nodeType!==3||(z=U+J),W.nodeType===3&&(U+=W.nodeValue.length),(M=W.firstChild)===null)break;L=W,W=M}for(;;){if(W===Z)break G;if(L===Y&&++H===X&&(Q=U),L===q&&++j===J&&(z=U),(M=W.nextSibling)!==null)break;W=L,L=W.parentNode}W=M}Y=Q===-1||z===-1?null:{start:Q,end:z}}else Y=null}Y=Y||{start:0,end:0}}else Y=null;Bq={focusedElem:Z,selectionRange:Y},eX=!1;for(x0=G;x0!==null;)if(G=x0,Z=G.child,(G.subtreeFlags&1028)!==0&&Z!==null)Z.return=G,x0=Z;else for(;x0!==null;){switch(G=x0,q=G.alternate,Z=G.flags,G.tag){case 0:if((Z&4)!==0&&(Z=G.updateQueue,Z=Z!==null?Z.events:null,Z!==null))for(Y=0;Y title"));v0(q,J,Y),q[y0]=Z,P0(q),J=q;break Z;case"link":var U=NW("link","href",X).get(J+(Y.href||""));if(U){for(var Q=0;QO&&(U=O,O=D,D=U);var F=xH(Q,D),B=xH(Q,O);if(F&&B&&(M.rangeCount!==1||M.anchorNode!==F.node||M.anchorOffset!==F.offset||M.focusNode!==B.node||M.focusOffset!==B.offset)){var K=W.createRange();K.setStart(F.node,F.offset),M.removeAllRanges(),D>O?(M.addRange(K),M.extend(B.node,B.offset)):(K.setEnd(B.node,B.offset),M.addRange(K))}}}}W=[];for(M=Q;M=M.parentNode;)M.nodeType===1&&W.push({element:M,left:M.scrollLeft,top:M.scrollTop});typeof Q.focus==="function"&&Q.focus();for(Q=0;QY?32:Y,h.T=null,Y=Xq,Xq=null;var q=lZ,U=LZ;if(S0=0,EG=lZ=null,LZ=0,(t&6)!==0)throw Error(T(331));var Q=t;if(t|=4,fB(q.current),EB(q,q.current,U,Y),t=Q,UJ(0,!1),H7&&typeof H7.onPostCommitFiberRoot==="function")try{H7.onPostCommitFiberRoot(tY,q)}catch(z){}return!0}finally{e.p=X,h.T=J,tB(Z,G)}}function BW(Z,G,Y){G=$7(Y,G),G=t4(Z.stateNode,G,2),Z=cZ(Z,G,2),Z!==null&&(ZJ(Z,2),s7(Z))}function X0(Z,G,Y){if(Z.tag===3)BW(Z,Z,Y);else for(;G!==null;){if(G.tag===3){BW(G,Z,Y);break}else if(G.tag===1){var J=G.stateNode;if(typeof G.type.getDerivedStateFromError==="function"||typeof J.componentDidCatch==="function"&&(pZ===null||!pZ.has(J))){Z=$7(Y,Z),Y=MB(2),J=cZ(G,Y,2),J!==null&&(FB(Y,J,G,Z),ZJ(J,2),s7(J));break}}G=G.return}}function K4(Z,G,Y){var J=Z.pingCache;if(J===null){J=Z.pingCache=new FK;var X=new Set;J.set(G,X)}else X=J.get(G),X===void 0&&(X=new Set,J.set(G,X));X.has(Y)||(XU=!0,X.add(Y),Z=OK.bind(null,Z,G,Y),G.then(Z,Z))}function OK(Z,G,Y){var J=Z.pingCache;J!==null&&J.delete(G),Z.pingedLanes|=Z.suspendedLanes&Y,Z.warmLanes&=~Y,Q0===Z&&(p&Y)===Y&&($0===4||$0===3&&(p&62914560)===p&&300>z7()-j8?(t&2)===0&&hG(Z,0):qU|=Y,PG===p&&(PG=0)),s7(Z)}function Zj(Z,G){G===0&&(G=lW()),Z=y6(Z,G),Z!==null&&(ZJ(Z,G),s7(Z))}function $K(Z){var G=Z.memoizedState,Y=0;G!==null&&(Y=G.retryLane),Zj(Z,Y)}function IK(Z,G){var Y=0;switch(Z.tag){case 31:case 13:var{stateNode:J,memoizedState:X}=Z;X!==null&&(Y=X.retryLane);break;case 19:J=Z.stateNode;break;case 22:J=Z.stateNode._retryCache;break;default:throw Error(T(314))}J!==null&&J.delete(G),Zj(Z,Y)}function TK(Z,G){return $q(Z,G)}function s7(Z){Z!==UG&&Z.next===null&&(UG===null?iX=UG=Z:UG=UG.next=Z),sX=!0,Uq||(Uq=!0,wK())}function UJ(Z,G){if(!D4&&sX){D4=!0;do{var Y=!1;for(var J=iX;J!==null;){if(!G)if(Z!==0){var X=J.pendingLanes;if(X===0)var q=0;else{var{suspendedLanes:U,pingedLanes:Q}=J;q=(1<<31-W7(42|Z)+1)-1,q&=X&~(U&~Q),q=q&201326741?q&201326741|1:q?q|2:0}q!==0&&(Y=!0,jW(J,q))}else q=p,q=G8(J,J===Q0?q:0,J.cancelPendingCommit!==null||J.timeoutHandle!==-1),(q&3)===0||eY(J,q)||(Y=!0,jW(J,q));J=J.next}}while(Y);D4=!1}}function _K(){Gj()}function Gj(){sX=Uq=!1;var Z=0;vZ!==0&&PK()&&(Z=vZ);for(var G=z7(),Y=null,J=iX;J!==null;){var X=J.next,q=Yj(J,G);if(q===0)J.next=null,Y===null?iX=X:Y.next=X,X===null&&(UG=Y);else if(Y=J,Z!==0||(q&3)!==0)sX=!0;J=X}S0!==0&&S0!==5||UJ(Z,!1),vZ!==0&&(vZ=0)}function Yj(Z,G){for(var{suspendedLanes:Y,pingedLanes:J,expirationTimes:X}=Z,q=Z.pendingLanes&-62914561;0Q)break;var{transferSize:j,initiatorType:W}=z;j&&DW(W)&&(z=z.responseEnd,U+=j*(z title"):null)}function oK(Z,G,Y){if(Y===1||G.itemProp!=null)return!1;switch(Z){case"meta":case"title":return!0;case"style":if(typeof G.precedence!=="string"||typeof G.href!=="string"||G.href==="")break;return!0;case"link":if(typeof G.rel!=="string"||typeof G.href!=="string"||G.href===""||G.onLoad||G.onError)break;switch(G.rel){case"stylesheet":return Z=G.disabled,typeof G.precedence==="string"&&Z==null;default:return!0}case"script":if(G.async&&typeof G.async!=="function"&&typeof G.async!=="symbol"&&!G.onLoad&&!G.onError&&G.src&&typeof G.src==="string")return!0}return!1}function Lj(Z){return Z.type==="stylesheet"&&(Z.state.loading&3)===0?!1:!0}function nK(Z,G,Y,J){if(Y.type==="stylesheet"&&(typeof J.media!=="string"||matchMedia(J.media).matches!==!1)&&(Y.state.loading&4)===0){if(Y.instance===null){var X=yG(J.href),q=G.querySelector(QJ(X));if(q){G=q._p,G!==null&&typeof G==="object"&&typeof G.then==="function"&&(Z.count++,Z=nX.bind(Z),G.then(Z,Z)),Y.state.loading|=4,Y.instance=q,P0(q);return}q=G.ownerDocument||G,J=jj(J),(X=w7.get(X))&&HU(J,X),q=q.createElement("link"),P0(q);var U=q;U._p=new Promise(function(Q,z){U.onload=Q,U.onerror=z}),v0(q,"link",J),Y.instance=q}Z.stylesheets===null&&(Z.stylesheets=new Map),Z.stylesheets.set(Y,G),(G=Y.state.preload)&&(Y.state.loading&3)===0&&(Z.count++,Y=nX.bind(Z),G.addEventListener("load",Y),G.addEventListener("error",Y))}}function tK(Z,G){return Z.stylesheets&&Z.count===0&&_X(Z,Z.stylesheets),0$4?50:800)+G);return Z.unsuspend=Y,function(){Z.unsuspend=null,clearTimeout(J),clearTimeout(X)}}:null}function nX(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_X(this,this.stylesheets);else if(this.unsuspend){var Z=this.unsuspend;this.unsuspend=null,Z()}}}function _X(Z,G){Z.stylesheets=null,Z.unsuspend!==null&&(Z.count++,tX=new Map,G.forEach(eK,Z),tX=null,nX.call(Z))}function eK(Z,G){if(!(G.state.loading&4)){var Y=tX.get(Z);if(Y)var J=Y.get(null);else{Y=new Map,tX.set(Z,Y);for(var X=Z.querySelectorAll("link[data-precedence],style[data-precedence]"),q=0;q{BH();m();hW=v6(c6(),1);L0=Object.assign,gM=Symbol.for("react.element"),oJ=Symbol.for("react.transitional.element"),FY=Symbol.for("react.portal"),zG=Symbol.for("react.fragment"),uW=Symbol.for("react.strict_mode"),I4=Symbol.for("react.profiler"),mW=Symbol.for("react.consumer"),zZ=Symbol.for("react.context"),Aq=Symbol.for("react.forward_ref"),T4=Symbol.for("react.suspense"),_4=Symbol.for("react.suspense_list"),Oq=Symbol.for("react.memo"),kZ=Symbol.for("react.lazy"),w4=Symbol.for("react.activity"),vM=Symbol.for("react.memo_cache_sentinel"),LH=Symbol.iterator;uM=Symbol.for("react.client.reference");KY=Array.isArray,h=d6,e=hW.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T6={pending:!1,data:null,method:null,action:null},N4=[];l7=i7(null),fY=i7(null),uZ=i7(null),RX=i7(null);k4=Object.prototype.hasOwnProperty,$q=YG,s9=u9,dM=c9,cM=d9,z7=m7,pM=m9,dW=f9,cW=v9,kX=GG,lM=g9,pW=y9,iM=void 0,sM=void 0;W7=Math.clz32?Math.clz32:oM,rM=Math.log,aM=Math.LN2;eZ=Math.random().toString(36).slice(2),y0="__reactFiber$"+eZ,e0="__reactProps$"+eZ,gG="__reactContainer$"+eZ,C4="__reactEvents$"+eZ,eM="__reactListeners$"+eZ,ZF="__reactHandles$"+eZ,DH="__reactResources$"+eZ,GJ="__reactMarker$"+eZ;oW=new Set,nW={};GF=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]*$"),VH={},AH={};XF=/[\n"\\]/g;qF=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(" "));UF=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"]]),QF=/^[\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;MZ=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u");if(MZ)try{O6={},Object.defineProperty(O6,"passive",{get:function(){h4=!0}}),window.addEventListener("test",O6,O6),window.removeEventListener("test",O6,O6)}catch(Z){h4=!1}E6={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(Z){return Z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Y8=Z7(E6),YJ=L0({},E6,{view:0,detail:0}),zF=Z7(YJ),J8=L0({},YJ,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bq,button:0,buttons:0,relatedTarget:function(Z){return Z.relatedTarget===void 0?Z.fromElement===Z.srcElement?Z.toElement:Z.fromElement:Z.relatedTarget},movementX:function(Z){if("movementX"in Z)return Z.movementX;return Z!==WY&&(WY&&Z.type==="mousemove"?(o9=Z.screenX-WY.screenX,n9=Z.screenY-WY.screenY):n9=o9=0,WY=Z),o9},movementY:function(Z){return"movementY"in Z?Z.movementY:n9}}),TH=Z7(J8),HF=L0({},J8,{dataTransfer:0}),WF=Z7(HF),BF=L0({},YJ,{relatedTarget:0}),t9=Z7(BF),jF=L0({},E6,{animationName:0,elapsedTime:0,pseudoElement:0}),LF=Z7(jF),MF=L0({},E6,{clipboardData:function(Z){return"clipboardData"in Z?Z.clipboardData:window.clipboardData}}),FF=Z7(MF),KF=L0({},E6,{data:0}),_H=Z7(KF),DF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VF={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"},AF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};$F=L0({},YJ,{key:function(Z){if(Z.key){var G=DF[Z.key]||Z.key;if(G!=="Unidentified")return G}return Z.type==="keypress"?(Z=LX(Z),Z===13?"Enter":String.fromCharCode(Z)):Z.type==="keydown"||Z.type==="keyup"?VF[Z.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bq,charCode:function(Z){return Z.type==="keypress"?LX(Z):0},keyCode:function(Z){return Z.type==="keydown"||Z.type==="keyup"?Z.keyCode:0},which:function(Z){return Z.type==="keypress"?LX(Z):Z.type==="keydown"||Z.type==="keyup"?Z.keyCode:0}}),IF=Z7($F),TF=L0({},J8,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wH=Z7(TF),_F=L0({},YJ,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bq}),wF=Z7(_F),RF=L0({},E6,{propertyName:0,elapsedTime:0,pseudoElement:0}),NF=Z7(RF),bF=L0({},J8,{deltaX:function(Z){return"deltaX"in Z?Z.deltaX:("wheelDeltaX"in Z)?-Z.wheelDeltaX:0},deltaY:function(Z){return"deltaY"in Z?Z.deltaY:("wheelDeltaY"in Z)?-Z.wheelDeltaY:("wheelDelta"in Z)?-Z.wheelDelta:0},deltaZ:0,deltaMode:0}),kF=Z7(bF),CF=L0({},E6,{newState:0,oldState:0}),SF=Z7(CF),xF=[9,13,27,32],kq=MZ&&"CompositionEvent"in window;MZ&&"documentMode"in document&&(_Y=document.documentMode);PF=MZ&&"TextEvent"in window&&!_Y,U1=MZ&&(!kq||_Y&&8<_Y&&11>=_Y),RH=String.fromCharCode(32);yF={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};if(MZ){if(MZ){if(AY="oninput"in document,!AY)MX=document.createElement("div"),MX.setAttribute("oninput","return;"),AY=typeof MX.oninput==="function";VY=AY}else VY=!1;W1=VY&&(!document.documentMode||9=document.documentMode;MG={animationend:D6("Animation","AnimationEnd"),animationiteration:D6("Animation","AnimationIteration"),animationstart:D6("Animation","AnimationStart"),transitionrun:D6("Transition","TransitionRun"),transitionstart:D6("Transition","TransitionStart"),transitioncancel:D6("Transition","TransitionCancel"),transitionend:D6("Transition","TransitionEnd")},e9={},M1={};MZ&&(M1=document.createElement("div").style,("AnimationEvent"in window)||(delete MG.animationend.animation,delete MG.animationiteration.animation,delete MG.animationstart.animation),("TransitionEvent"in window)||delete MG.transitionend.transition);F1=h6("animationend"),K1=h6("animationiteration"),D1=h6("animationstart"),pF=h6("transitionrun"),lF=h6("transitionstart"),iF=h6("transitioncancel"),V1=h6("transitionend"),A1=new Map,g4="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(" ");g4.push("scrollEnd");SX=typeof reportError==="function"?reportError:function(Z){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Z==="object"&&Z!==null&&typeof Z.message==="string"?String(Z.message):String(Z),error:Z});if(!window.dispatchEvent(G))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",Z);return}console.error(Z)},K7=[];KG={};EH=new WeakMap;DG=[],V7=[];v4=Error(T(519));u4=i7(null);rF=typeof AbortController<"u"?AbortController:function(){var Z=[],G=this.signal={aborted:!1,addEventListener:function(Y,J){Z.push(J)}};this.abort=function(){G.aborted=!0,Z.forEach(function(Y){return Y()})}},aF=YG,oF=GG,k0={$$typeof:zZ,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};gH=h.S;h.S=function(Z,G){vB=z7(),typeof G==="object"&&G!==null&&typeof G.then==="function"&&nF(Z,G),gH!==null&&gH(Z,G)};w6=i7(null);mG=Error(T(460)),gq=Error(T(474)),Q8=Error(T(542)),hX={then:function(){}};C6=b1(!0),k1=b1(!1);SG=i7(null),yX=i7(0);L7=i7(null);T0=i7(0);lY={readContext:g0,use:H8,useCallback:O0,useContext:O0,useEffect:O0,useImperativeHandle:O0,useLayoutEffect:O0,useInsertionEffect:O0,useMemo:O0,useReducer:O0,useRef:O0,useState:O0,useDebugValue:O0,useDeferredValue:O0,useTransition:O0,useSyncExternalStore:O0,useId:O0,useHostTransitionStatus:O0,useFormState:O0,useActionState:O0,useOptimistic:O0,useMemoCache:O0,useCacheRefresh:O0};lY.useEffectEvent=O0;HB={readContext:g0,use:H8,useCallback:function(Z,G){return l0().memoizedState=[Z,G===void 0?null:G],Z},useContext:g0,useEffect:rH,useImperativeHandle:function(Z,G,Y){Y=Y!==null&&Y!==void 0?Y.concat([Z]):null,VX(4194308,4,o1.bind(null,G,Z),Y)},useLayoutEffect:function(Z,G){return VX(4194308,4,Z,G)},useInsertionEffect:function(Z,G){VX(4,2,Z,G)},useMemo:function(Z,G){var Y=l0();G=G===void 0?null:G;var J=Z();if(S6){hZ(!0);try{Z()}finally{hZ(!1)}}return Y.memoizedState=[J,G],J},useReducer:function(Z,G,Y){var J=l0();if(Y!==void 0){var X=Y(G);if(S6){hZ(!0);try{Y(G)}finally{hZ(!1)}}}else X=G;return J.memoizedState=J.baseState=X,Z={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Z,lastRenderedState:X},J.queue=Z,Z=Z.dispatch=UK.bind(null,g,Z),[J.memoizedState,Z]},useRef:function(Z){var G=l0();return Z={current:Z},G.memoizedState=Z},useState:function(Z){Z=r4(Z);var G=Z.queue,Y=UB.bind(null,g,G);return G.dispatch=Y,[Z.memoizedState,Y]},useDebugValue:aq,useDeferredValue:function(Z,G){var Y=l0();return oq(Y,Z,G)},useTransition:function(){var Z=r4(!1);return Z=GB.bind(null,g,Z.queue,!0,!1),l0().memoizedState=Z,[!1,Z]},useSyncExternalStore:function(Z,G,Y){var J=g,X=l0();if(r){if(Y===void 0)throw Error(T(407));Y=Y()}else{if(Y=G(),Q0===null)throw Error(T(349));(p&127)!==0||y1(J,G,Y)}X.memoizedState=Y;var q={value:Y,getSnapshot:G};return X.queue=q,rH(g1.bind(null,J,q,Z),[Z]),J.flags|=2048,xG(9,{destroy:void 0},f1.bind(null,J,q,Y,G),null),Y},useId:function(){var Z=l0(),G=Q0.identifierPrefix;if(r){var Y=c7,J=d7;Y=(J&~(1<<32-W7(J)-1)).toString(32)+Y,G="_"+G+"R_"+Y,Y=vX++,0"u"?null:document;rY={$$typeof:zZ,Provider:null,Consumer:null,_currentValue:T6,_currentValue2:T6,_threadCount:0};aY=new Map,oY=new Map,EZ=[],J3="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(" ");K8.prototype.render=MU.prototype.render=function(Z){var G=this._internalRoot;if(G===null)throw Error(T(409));var Y=G.current,J=B7();Kj(Y,J,Z,G,null,null)};K8.prototype.unmount=MU.prototype.unmount=function(){var Z=this._internalRoot;if(Z!==null){this._internalRoot=null;var G=Z.containerInfo;Kj(Z.current,2,null,Z,null,null),L8(),G[gG]=null}};K8.prototype.unstable_scheduleHydration=function(Z){if(Z){var G=aW();Z={blockedOn:null,target:Z,priority:G};for(var Y=0;Y{_j();function wj(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wj)}catch(Z){console.error(Z)}}wj(),Rj.exports=FU});m();var J7={};lG(J7,{unstable_SelectProvider:()=>D9,unstable_SelectBubbleInput:()=>A9,unstable_Provider:()=>D9,unstable_BubbleInput:()=>A9,createSelectScope:()=>ZM,Viewport:()=>_5,Value:()=>F5,Trigger:()=>L5,Separator:()=>f5,SelectViewport:()=>_5,SelectValue:()=>F5,SelectTrigger:()=>L5,SelectSeparator:()=>f5,SelectScrollUpButton:()=>E5,SelectScrollDownButton:()=>h5,SelectPortal:()=>V5,SelectLabel:()=>b5,SelectItemText:()=>S5,SelectItemIndicator:()=>P5,SelectItem:()=>C5,SelectIcon:()=>K5,SelectGroup:()=>R5,SelectContent:()=>A5,SelectArrow:()=>v5,Select:()=>B5,ScrollUpButton:()=>E5,ScrollDownButton:()=>h5,Root:()=>B5,Portal:()=>V5,Label:()=>b5,ItemText:()=>S5,ItemIndicator:()=>P5,Item:()=>C5,Icon:()=>K5,Group:()=>R5,Content:()=>A5,Arrow:()=>v5});var K9=v6(c6(),1);function p6(Z,[G,Y]){return Math.min(Y,Math.max(G,Z))}var M3=!!(typeof window<"u"&&window.document&&window.document.createElement);function Y0(Z,G,{checkForDefaultPrevented:Y=!0}={}){return function(X){if(Z?.(X),Y===!1||!X||!X.defaultPrevented)return G?.(X)}}m();m();var Y2=Symbol.for("react.transitional.element"),J2=Symbol.for("react.fragment");function VQ(Z,G,Y){var J=null;if(Y!==void 0&&(J=""+Y),G.key!==void 0&&(J=""+G.key),"key"in G){Y={};for(var X in G)X!=="key"&&(Y[X]=G[X])}else Y=G;return G=Y.ref,{$$typeof:Y2,type:Z,key:J,ref:G!==void 0?G:null,props:Y}}var J6=J2,_=VQ,G7=VQ;function IZ(Z,G=[]){let Y=[];function J(q,U){let Q=o7(U);Q.displayName=q+"Context";let z=Y.length;Y=[...Y,U];let H=(W)=>{let{scope:L,children:M,...V}=W,D=L?.[Z]?.[z]||Q,O=A0(()=>V,Object.values(V));return _(D.Provider,{value:O,children:M})};H.displayName=q+"Provider";function j(W,L,M={}){let{optional:V=!1}=M,D=L?.[Z]?.[z]||Q,O=n7(D);if(O)return O;if(U!==void 0)return U;if(V)return;throw Error(`\`${W}\` must be used within \`${q}\``)}return[H,j]}let X=()=>{let q=Y.map((U)=>{return o7(U)});return function(Q){let z=Q?.[Z]||q;return A0(()=>({[`__scope${Z}`]:{...Q,[Z]:z}}),[Q,z])}};return X.scopeName=Z,[J,X2(X,...G)]}function X2(...Z){let G=Z[0];if(Z.length===1)return G;let Y=()=>{let J=Z.map((X)=>({useScope:X(),scopeName:X.scopeName}));return function(q){let U=J.reduce((Q,{useScope:z,scopeName:H})=>{let W=z(q)[`__scope${H}`];return{...Q,...W}},{});return A0(()=>({[`__scope${G.scopeName}`]:U}),[U])}};return Y.scopeName=G.scopeName,Y}m();function AQ(Z,G){if(typeof Z==="function")return Z(G);else if(Z!==null&&Z!==void 0)Z.current=G}function q2(...Z){return(G)=>{let Y=!1,J=Z.map((X)=>{let q=AQ(X,G);if(!Y&&typeof q=="function")Y=!0;return q});if(Y)return()=>{for(let X=0;X{let{children:X,...q}=Y,U=null,Q=!1,z=[];if(OQ(X)&&typeof LJ==="function")X=LJ(X._payload);if(a7.forEach(X,(L)=>{if(W2(L)){Q=!0;let M=L,V="child"in M.props?M.props.child:M.props.children;if(OQ(V)&&typeof LJ==="function")V=LJ(V._payload);U=Q2(M,V),z.push(U?.props?.children)}else z.push(L)}),U)U=h7(U,void 0,z);else if(!Q&&a7.count(X)===1&&Y6(X))U=X;let H=U?H2(U):void 0,j=n(J,H);if(!U){if(X||X===0)throw Error(Q?M2(Z):L2(Z));return X}let W=z2(q,U.props??{});if(U.type!==E7)W.ref=J?j:H;return h7(U,W)});return G.displayName=`${Z}.Slot`,G}var U2=Symbol.for("radix.slottable");var Q2=(Z,G)=>{if("child"in Z.props){let Y=Z.props.child;if(!Y6(Y))return null;return h7(Y,void 0,Z.props.children(Y.props.children))}return Y6(G)?G:null};function z2(Z,G){let Y={...G};for(let J in G){let X=Z[J],q=G[J];if(/^on[A-Z]/.test(J)){if(X&&q)Y[J]=(...Q)=>{let z=q(...Q);return X(...Q),z};else if(X)Y[J]=X}else if(J==="style")Y[J]={...X,...q};else if(J==="className")Y[J]=[X,q].filter(Boolean).join(" ")}return{...Z,...Y}}function H2(Z){let G=Object.getOwnPropertyDescriptor(Z.props,"ref")?.get,Y=G&&"isReactWarning"in G&&G.isReactWarning;if(Y)return Z.ref;if(G=Object.getOwnPropertyDescriptor(Z,"ref")?.get,Y=G&&"isReactWarning"in G&&G.isReactWarning,Y)return Z.props.ref;return Z.props.ref||Z.ref}function W2(Z){return Y6(Z)&&typeof Z.type==="function"&&"__radixId"in Z.type&&Z.type.__radixId===U2}var B2=Symbol.for("react.lazy");function OQ(Z){return Z!=null&&typeof Z==="object"&&"$$typeof"in Z&&Z.$$typeof===B2&&"_payload"in Z&&j2(Z._payload)}function j2(Z){return typeof Z==="object"&&Z!==null&&"then"in Z}var L2=(Z)=>{return`${Z} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`},M2=(Z)=>{return`${Z} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`},LJ=u[" use ".trim().toString()];m();function MJ(Z){let G=Z+"CollectionProvider",[Y,J]=IZ(G),[X,q]=Y(G,{collectionRef:{current:null},itemMap:new Map}),U=(D)=>{let{scope:O,children:F}=D,B=N(null),K=N(new Map).current;return _(X,{scope:O,itemMap:K,collectionRef:B,children:F})};U.displayName=G;let Q=Z+"CollectionSlot",z=X6(Q),H=S((D,O)=>{let{scope:F,children:B}=D,K=q(Q,F),A=n(O,K.collectionRef);return _(z,{ref:A,children:B})});H.displayName=Q;let j=Z+"CollectionItemSlot",W="data-radix-collection-item",L=X6(j),M=S((D,O)=>{let{scope:F,children:B,...K}=D,A=N(null),$=n(O,A),w=q(j,F);return P(()=>{return w.itemMap.set(A,{ref:A,...K}),()=>void w.itemMap.delete(A)}),_(L,{...{[W]:""},ref:$,children:B})});M.displayName=j;function V(D){let O=q(Z+"CollectionConsumer",D);return f(()=>{let B=O.collectionRef.current;if(!B)return[];let K=Array.from(B.querySelectorAll(`[${W}]`));return Array.from(O.itemMap.values()).sort((w,I)=>K.indexOf(w.ref.current)-K.indexOf(I.ref.current))},[O.collectionRef,O.itemMap])}return[{Provider:U,Slot:H,ItemSlot:M},V,J]}var $Q=new WeakMap,R3=class Z extends Map{#Z;constructor(G){super(G);this.#Z=[...super.keys()],$Q.set(this,!0)}set(G,Y){if($Q.get(this))if(this.has(G))this.#Z[this.#Z.indexOf(G)]=G;else this.#Z.push(G);return super.set(G,Y),this}insert(G,Y,J){let X=this.has(Y),q=this.#Z.length,U=IQ(G),Q=U>=0?U:q+U,z=Q<0||Q>=q?-1:Q;if(z===this.size||X&&z===this.size-1||z===-1)return this.set(Y,J),this;let H=this.size+(X?0:1);if(U<0)Q++;let j=[...this.#Z],W,L=!1;for(let M=Q;M=this.size)X=this.size-1;return this.at(X)}keyFrom(G,Y){let J=this.indexOf(G);if(J===-1)return;let X=J+Y;if(X<0)X=0;if(X>=this.size)X=this.size-1;return this.keyAt(X)}find(G,Y){let J=0;for(let X of this){if(Reflect.apply(G,Y,[X,J,this]))return X;J++}return}findIndex(G,Y){let J=0;for(let X of this){if(Reflect.apply(G,Y,[X,J,this]))return J;J++}return-1}filter(G,Y){let J=[],X=0;for(let q of this){if(Reflect.apply(G,Y,[q,X,this]))J.push(q);X++}return new Z(J)}map(G,Y){let J=[],X=0;for(let q of this)J.push([q[0],Reflect.apply(G,Y,[q,X,this])]),X++;return new Z(J)}reduce(...G){let[Y,J]=G,X=0,q=J??this.at(0);for(let U of this){if(X===0&&G.length===1)q=U;else q=Reflect.apply(Y,this,[q,U,X,this]);X++}return q}reduceRight(...G){let[Y,J]=G,X=J??this.at(-1);for(let q=this.size-1;q>=0;q--){let U=this.at(q);if(q===this.size-1&&G.length===1)X=U;else X=Reflect.apply(Y,this,[X,U,q,this])}return X}toSorted(G){let Y=[...this.entries()].sort(G);return new Z(Y)}toReversed(){let G=new Z;for(let Y=this.size-1;Y>=0;Y--){let J=this.keyAt(Y),X=this.get(J);G.set(J,X)}return G}toSpliced(...G){let Y=[...this.entries()];return Y.splice(...G),new Z(Y)}slice(G,Y){let J=new Z,X=this.size-1;if(G===void 0)return J;if(G<0)G=G+this.size;if(Y!==void 0&&Y>0)X=Y-1;for(let q=G;q<=X;q++){let U=this.keyAt(q),Q=this.get(U);J.set(U,Q)}return J}every(G,Y){let J=0;for(let X of this){if(!Reflect.apply(G,Y,[X,J,this]))return!1;J++}return!0}some(G,Y){let J=0;for(let X of this){if(Reflect.apply(G,Y,[X,J,this]))return!0;J++}return!1}};function k8(Z,G){if("at"in Array.prototype)return Array.prototype.at.call(Z,G);let Y=F2(Z,G);return Y===-1?void 0:Z[Y]}function F2(Z,G){let Y=Z.length,J=IQ(G),X=J>=0?J:Y+J;return X<0||X>=Y?-1:X}function IQ(Z){return Z!==Z||Z===0?0:Math.trunc(Z)}m();var K2=o7(void 0);function FJ(Z){let G=n7(K2);return Z||G||"ltr"}m();m();var TQ=v6(c6(),1);var D2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],s=D2.reduce((Z,G)=>{let Y=X6(`Primitive.${G}`),J=S((X,q)=>{let{asChild:U,...Q}=X,z=U?Y:G;if(typeof window<"u")window[Symbol.for("radix-ui")]=!0;return _(z,{...Q,ref:q})});return J.displayName=`Primitive.${G}`,{...Z,[G]:J}},{});function _Q(Z,G){if(Z)TQ.flushSync(()=>Z.dispatchEvent(G))}m();function Y7(Z){let G=N(Z);return P(()=>{G.current=Z}),A0(()=>(...Y)=>G.current?.(...Y),[])}var V2="DismissableLayer",C8="dismissableLayer.update",A2="dismissableLayer.pointerDownOutside",O2="dismissableLayer.focusOutside",wQ,NQ=o7({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),S8=S((Z,G)=>{let{disableOutsidePointerEvents:Y=!1,deferPointerDownOutside:J=!1,onEscapeKeyDown:X,onPointerDownOutside:q,onFocusOutside:U,onInteractOutside:Q,onDismiss:z,...H}=Z,j=n7(NQ),[W,L]=x(null),M=W?.ownerDocument??globalThis?.document,[,V]=x({}),D=n(G,L),O=Array.from(j.layers),[F]=[...j.layersWithOutsidePointerEventsDisabled].slice(-1),B=F?O.indexOf(F):-1,K=W?O.indexOf(W):-1,A=j.layersWithOutsidePointerEventsDisabled.size>0,$=K>=B,w=N(!1),I=_2((C)=>{if(q?.(C),Q?.(C),!C.defaultPrevented)z?.()},{ownerDocument:M,deferPointerDownOutside:J,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:j.dismissableSurfaces,shouldHandlePointerDownOutside:f((C)=>{if(!(C instanceof Node))return!1;let a=[...j.branches].some((l)=>l.contains(C));return $&&!a},[j.branches,$])}),R=w2((C)=>{if(J&&w.current)return;let a=C.target;if([...j.branches].some((Z0)=>Z0.contains(a)))return;if(U?.(C),Q?.(C),!C.defaultPrevented)z?.()},M),k=W?K===O.length-1:!1,b=Y7((C)=>{if(C.key!=="Escape")return;if(X?.(C),!C.defaultPrevented&&z)C.preventDefault(),z()});return P(()=>{if(!k)return;return M.addEventListener("keydown",b,{capture:!0}),()=>M.removeEventListener("keydown",b,{capture:!0})},[M,k,b]),P(()=>{if(!W)return;if(Y){if(j.layersWithOutsidePointerEventsDisabled.size===0)wQ=M.body.style.pointerEvents,M.body.style.pointerEvents="none";j.layersWithOutsidePointerEventsDisabled.add(W)}return j.layers.add(W),RQ(),()=>{if(Y){if(j.layersWithOutsidePointerEventsDisabled.delete(W),j.layersWithOutsidePointerEventsDisabled.size===0)M.body.style.pointerEvents=wQ}}},[W,M,Y,j]),P(()=>{return()=>{if(!W)return;j.layers.delete(W),j.layersWithOutsidePointerEventsDisabled.delete(W),RQ()}},[W,j]),P(()=>{let C=()=>V({});return document.addEventListener(C8,C),()=>document.removeEventListener(C8,C)},[]),_(s.div,{...H,ref:D,style:{pointerEvents:A?$?"auto":"none":void 0,...Z.style},onFocusCapture:Y0(Z.onFocusCapture,R.onFocusCapture),onBlurCapture:Y0(Z.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Y0(Z.onPointerDownCapture,I.onPointerDownCapture)})});S8.displayName=V2;var $2="DismissableLayerBranch",I2=S((Z,G)=>{let Y=n7(NQ),J=N(null),X=n(G,J);return P(()=>{let q=J.current;if(q)return Y.branches.add(q),()=>{Y.branches.delete(q)}},[Y.branches]),_(s.div,{...Z,ref:X})});I2.displayName=$2;var T2=()=>!0;function _2(Z,G){let{ownerDocument:Y=globalThis?.document,deferPointerDownOutside:J=!1,isDeferredPointerDownOutsideRef:X,dismissableSurfaces:q,shouldHandlePointerDownOutside:U=T2}=G,Q=Y7(Z),z=N(!1),H=N(!1),j=N(new Map),W=N(()=>{});return P(()=>{function L(){H.current=!1,X.current=!1,j.current.clear()}function M(){return Array.from(j.current.values()).some(Boolean)}function V(K){if(!H.current)return;let A=K.target;if(!(A instanceof Node&&[...q].some((w)=>w.contains(A))))j.current.set(K.type,!0);if(K.type==="click")window.setTimeout(()=>{if(H.current)W.current()},0)}function D(K){if(H.current)j.current.set(K.type,!1)}let O=(K)=>{if(K.target&&!z.current){let $=function(){Y.removeEventListener("click",W.current);let I=M();if(L(),!I)bQ(A2,Q,w,{discrete:!0})};var A=$;if(!U(K.target)){Y.removeEventListener("click",W.current),L(),z.current=!1;return}let w={originalEvent:K};if(H.current=!0,X.current=J&&K.button===0,j.current.clear(),!J||K.button!==0)$();else Y.removeEventListener("click",W.current),W.current=$,Y.addEventListener("click",W.current,{once:!0})}else Y.removeEventListener("click",W.current),L();z.current=!1},F=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let K of F)Y.addEventListener(K,V,!0),Y.addEventListener(K,D);let B=window.setTimeout(()=>{Y.addEventListener("pointerdown",O)},0);return()=>{window.clearTimeout(B),Y.removeEventListener("pointerdown",O),Y.removeEventListener("click",W.current);for(let K of F)Y.removeEventListener(K,V,!0),Y.removeEventListener(K,D)}},[Y,Q,J,X,q,U]),{onPointerDownCapture:()=>z.current=!0}}function w2(Z,G=globalThis?.document){let Y=Y7(Z),J=N(!1);return P(()=>{let X=(q)=>{if(q.target&&!J.current)bQ(O2,Y,{originalEvent:q},{discrete:!1})};return G.addEventListener("focusin",X),()=>G.removeEventListener("focusin",X)},[G,Y]),{onFocusCapture:()=>J.current=!0,onBlurCapture:()=>J.current=!1}}function RQ(){let Z=new CustomEvent(C8);document.dispatchEvent(Z)}function bQ(Z,G,Y,{discrete:J}){let X=Y.originalEvent.target,q=new CustomEvent(Z,{bubbles:!1,cancelable:!0,detail:Y});if(G)X.addEventListener(Z,G,{once:!0});if(J)_Q(X,q);else X.dispatchEvent(q)}m();var KJ=0,l6=null;function CQ(){P(()=>{if(!l6)l6={start:kQ(),end:kQ()};let{start:Z,end:G}=l6;if(document.body.firstElementChild!==Z)document.body.insertAdjacentElement("afterbegin",Z);if(document.body.lastElementChild!==G)document.body.insertAdjacentElement("beforeend",G);return KJ++,()=>{if(KJ===1)l6?.start.remove(),l6?.end.remove(),l6=null;KJ=Math.max(0,KJ-1)}},[])}function kQ(){let Z=document.createElement("span");return Z.setAttribute("data-radix-focus-guard",""),Z.tabIndex=0,Z.style.outline="none",Z.style.opacity="0",Z.style.position="fixed",Z.style.pointerEvents="none",Z}m();var x8="focusScope.autoFocusOnMount",P8="focusScope.autoFocusOnUnmount",SQ={bubbles:!1,cancelable:!0},R2="FocusScope",E8=S((Z,G)=>{let{loop:Y=!1,trapped:J=!1,onMountAutoFocus:X,onUnmountAutoFocus:q,...U}=Z,[Q,z]=x(null),H=Y7(X),j=Y7(q),W=N(null),L=n(G,z),M=N({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P(()=>{if(J){let B=function(w){if(M.paused||!Q)return;let I=w.target;if(Q.contains(I))W.current=I;else TZ(W.current,{select:!0})},K=function(w){if(M.paused||!Q)return;let I=w.relatedTarget;if(I===null)return;if(!Q.contains(I))TZ(W.current,{select:!0})},A=function(w){if(document.activeElement!==document.body)return;for(let R of w)if(R.removedNodes.length>0)TZ(Q)};var D=B,O=K,F=A;document.addEventListener("focusin",B),document.addEventListener("focusout",K);let $=new MutationObserver(A);if(Q)$.observe(Q,{childList:!0,subtree:!0});return()=>{document.removeEventListener("focusin",B),document.removeEventListener("focusout",K),$.disconnect()}}},[J,Q,M.paused]),P(()=>{if(Q){PQ.add(M);let D=document.activeElement;if(!Q.contains(D)){let F=new CustomEvent(x8,SQ);if(Q.addEventListener(x8,H),Q.dispatchEvent(F),!F.defaultPrevented){if(N2(x2(hQ(Q)),{select:!0}),document.activeElement===D)TZ(Q)}}return()=>{Q.removeEventListener(x8,H),setTimeout(()=>{let F=new CustomEvent(P8,SQ);if(Q.addEventListener(P8,j),Q.dispatchEvent(F),!F.defaultPrevented)TZ(D??document.body,{select:!0});Q.removeEventListener(P8,j),PQ.remove(M)},0)}}},[Q,H,j,M]);let V=f((D)=>{if(!Y&&!J)return;if(M.paused)return;let O=D.key==="Tab"&&!D.altKey&&!D.ctrlKey&&!D.metaKey,F=document.activeElement;if(O&&F){let B=D.currentTarget,[K,A]=b2(B);if(!(K&&A)){if(F===B)D.preventDefault()}else if(!D.shiftKey&&F===A){if(D.preventDefault(),Y)TZ(K,{select:!0})}else if(D.shiftKey&&F===K){if(D.preventDefault(),Y)TZ(A,{select:!0})}}},[Y,J,M.paused]);return _(s.div,{tabIndex:-1,...U,ref:L,onKeyDown:V})});E8.displayName=R2;function N2(Z,{select:G=!1}={}){let Y=document.activeElement;for(let J of Z)if(TZ(J,{select:G}),document.activeElement!==Y)return}function b2(Z){let G=hQ(Z),Y=xQ(G,Z),J=xQ(G.reverse(),Z);return[Y,J]}function hQ(Z){let G=[],Y=document.createTreeWalker(Z,NodeFilter.SHOW_ELEMENT,{acceptNode:(J)=>{let X=J.tagName==="INPUT"&&J.type==="hidden";if(J.disabled||J.hidden||X)return NodeFilter.FILTER_SKIP;return J.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});while(Y.nextNode())G.push(Y.currentNode);return G}function xQ(Z,G){let Y=typeof G.checkVisibility==="function"&&G.checkVisibility({checkVisibilityCSS:!0});for(let J of Z)if(!(Y?!J.checkVisibility({checkVisibilityCSS:!0}):k2(J,{upTo:G})))return J}function k2(Z,{upTo:G}){if(getComputedStyle(Z).visibility==="hidden")return!0;while(Z){if(G!==void 0&&Z===G)return!1;if(getComputedStyle(Z).display==="none")return!0;Z=Z.parentElement}return!1}function C2(Z){return Z instanceof HTMLInputElement&&"select"in Z}function TZ(Z,{select:G=!1}={}){if(Z&&Z.focus){let Y=document.activeElement;if(Z.focus({preventScroll:!0}),Z!==Y&&C2(Z)&&G)Z.select()}}var PQ=S2();function S2(){let Z=[];return{add(G){let Y=Z[0];if(G!==Y)Y?.pause();Z=EQ(Z,G),Z.unshift(G)},remove(G){Z=EQ(Z,G),Z[0]?.resume()}}}function EQ(Z,G){let Y=[...Z],J=Y.indexOf(G);if(J!==-1)Y.splice(J,1);return Y}function x2(Z){return Z.filter((G)=>G.tagName!=="A")}m();m();var F0=globalThis?.document?OZ:()=>{};var P2=u[" useId ".trim().toString()]||(()=>{return}),E2=0;function DJ(Z){let[G,Y]=x(P2());return F0(()=>{if(!Z)Y((J)=>J??String(E2++))},[Z]),Z||(G?`radix-${G}`:"")}m();var gQ=["top","right","bottom","left"];var{min:y7,max:R7,round:aG,floor:oG}=Math,f7=(Z)=>({x:Z,y:Z}),h2={left:"right",right:"left",bottom:"top",top:"bottom"};function h8(Z,G,Y){return R7(Z,y7(G,Y))}function g7(Z,G){return typeof Z==="function"?Z(G):Z}function t7(Z){return Z.split("-")[0]}function q6(Z){return Z.split("-")[1]}function AJ(Z){return Z==="x"?"y":"x"}function OJ(Z){return Z==="y"?"height":"width"}function N7(Z){let G=Z[0];return G==="t"||G==="b"?"y":"x"}function $J(Z){return AJ(N7(Z))}function vQ(Z,G,Y){if(Y===void 0)Y=!1;let J=q6(Z),X=$J(Z),q=OJ(X),U=X==="x"?J===(Y?"end":"start")?"right":"left":J==="start"?"bottom":"top";if(G.reference[q]>G.floating[q])U=rG(U);return[U,rG(U)]}function uQ(Z){let G=rG(Z);return[VJ(Z),G,VJ(G)]}function VJ(Z){return Z.includes("start")?Z.replace("start","end"):Z.replace("end","start")}var yQ=["left","right"],fQ=["right","left"],y2=["top","bottom"],f2=["bottom","top"];function g2(Z,G,Y){switch(Z){case"top":case"bottom":if(Y)return G?fQ:yQ;return G?yQ:fQ;case"left":case"right":return G?y2:f2;default:return[]}}function mQ(Z,G,Y,J){let X=q6(Z),q=g2(t7(Z),Y==="start",J);if(X){if(q=q.map((U)=>U+"-"+X),G)q=q.concat(q.map(VJ))}return q}function rG(Z){let G=t7(Z);return h2[G]+Z.slice(G.length)}function v2(Z){var G,Y,J,X;return{top:(G=Z.top)!=null?G:0,right:(Y=Z.right)!=null?Y:0,bottom:(J=Z.bottom)!=null?J:0,left:(X=Z.left)!=null?X:0}}function y8(Z){return typeof Z!=="number"?v2(Z):{top:Z,right:Z,bottom:Z,left:Z}}function U6(Z){let{x:G,y:Y,width:J,height:X}=Z;return{width:J,height:X,top:Y,left:G,right:G+J,bottom:Y+X,x:G,y:Y}}function dQ(Z,G,Y){let{reference:J,floating:X}=Z,q=N7(G),U=$J(G),Q=OJ(U),z=t7(G),H=q==="y",j=J.x+J.width/2-X.width/2,W=J.y+J.height/2-X.height/2,L=J[Q]/2-X[Q]/2,M;switch(z){case"top":M={x:j,y:J.y-X.height};break;case"bottom":M={x:j,y:J.y+J.height};break;case"right":M={x:J.x+J.width,y:W};break;case"left":M={x:J.x-X.width,y:W};break;default:M={x:J.x,y:J.y}}let V=q6(G);if(V)M[U]+=L*(V==="end"?1:-1)*(Y&&H?-1:1);return M}async function lQ(Z,G){var Y;if(G===void 0)G={};let{x:J,y:X,platform:q,rects:U,elements:Q,strategy:z}=Z,{boundary:H="clippingAncestors",rootBoundary:j="viewport",elementContext:W="floating",altBoundary:L=!1,padding:M=0}=g7(G,Z),V=y8(M),O=Q[L?W==="floating"?"reference":"floating":W],F=U6(await q.getClippingRect({element:((Y=await(q.isElement==null?void 0:q.isElement(O)))!=null?Y:!0)?O:O.contextElement||await(q.getDocumentElement==null?void 0:q.getDocumentElement(Q.floating)),boundary:H,rootBoundary:j,strategy:z})),B=W==="floating"?{x:J,y:X,width:U.floating.width,height:U.floating.height}:U.reference,K=await(q.getOffsetParent==null?void 0:q.getOffsetParent(Q.floating)),A=await(q.isElement==null?void 0:q.isElement(K))&&await(q.getScale==null?void 0:q.getScale(K))||{x:1,y:1},$=U6(q.convertOffsetParentRelativeRectToViewportRelativeRect?await q.convertOffsetParentRelativeRectToViewportRelativeRect({elements:Q,rect:B,offsetParent:K,strategy:z}):B);return{top:(F.top-$.top+V.top)/A.y,bottom:($.bottom-F.bottom+V.bottom)/A.y,left:(F.left-$.left+V.left)/A.x,right:($.right-F.right+V.right)/A.x}}var u2=50,iQ=async(Z,G,Y)=>{let{placement:J="bottom",strategy:X="absolute",middleware:q=[],platform:U}=Y,Q=U.detectOverflow?U:{...U,detectOverflow:lQ},z=await(U.isRTL==null?void 0:U.isRTL(G)),H=await U.getElementRects({reference:Z,floating:G,strategy:X}),{x:j,y:W}=dQ(H,J,z),L=J,M=0,V={};for(let D=0;D({name:"arrow",options:Z,async fn(G){let{x:Y,y:J,placement:X,rects:q,platform:U,elements:Q,middlewareData:z}=G,{element:H,padding:j=0}=g7(Z,G)||{};if(H==null)return{};let W=y8(j),L={x:Y,y:J},M=$J(X),V=OJ(M),D=await U.getDimensions(H),O=M==="y",F=O?"top":"left",B=O?"bottom":"right",K=O?"clientHeight":"clientWidth",A=q.reference[V]+q.reference[M]-L[M]-q.floating[V],$=L[M]-q.reference[M],w=await(U.getOffsetParent==null?void 0:U.getOffsetParent(H)),I=w?w[K]:0;if(!I||!await(U.isElement==null?void 0:U.isElement(w)))I=Q.floating[K]||q.floating[V];let R=A/2-$/2,k=I/2-D[V]/2-1,b=y7(W[F],k),C=y7(W[B],k),a=I-D[V]-C,l=I/2-D[V]/2+R,Z0=h8(b,l,a),G0=!z.arrow&&q6(X)!=null&&l!==Z0&&q.reference[V]/2-(lZ0<=0)){var C,a;let Z0=(((C=q.flip)==null?void 0:C.index)||0)+1,G0=I[Z0];if(G0){if(!(W==="alignment"?B!==N7(G0):!1)||b.every((y)=>N7(y.placement)===B?y.overflows[0]>0:!0))return{data:{index:Z0,overflows:b},reset:{placement:G0}}}let E=(a=b.filter((i)=>i.overflows[0]<=0).sort((i,y)=>i.overflows[1]-y.overflows[1])[0])==null?void 0:a.placement;if(!E)switch(M){case"bestFit":{var l;let i=(l=b.filter((y)=>{if(w){let o=N7(y.placement);return o===B||o==="y"}return!0}).map((y)=>[y.placement,y.overflows.filter((o)=>o>0).reduce((o,I0)=>o+I0,0)]).sort((y,o)=>y[1]-o[1])[0])==null?void 0:l[0];if(i)E=i;break}case"initialPlacement":E=Q;break}if(X!==E)return{reset:{placement:E}}}return{}}}};function cQ(Z,G){return{top:Z.top-G.height,right:Z.right-G.width,bottom:Z.bottom-G.height,left:Z.left-G.width}}function pQ(Z){return gQ.some((G)=>Z[G]>=0)}var aQ=function(Z){if(Z===void 0)Z={};return{name:"hide",options:Z,async fn(G){let{rects:Y,platform:J}=G,{strategy:X="referenceHidden",...q}=g7(Z,G);switch(X){case"referenceHidden":{let U=await J.detectOverflow(G,{...q,elementContext:"reference"}),Q=cQ(U,Y.reference);return{data:{referenceHiddenOffsets:Q,referenceHidden:pQ(Q)}}}case"escaped":{let U=await J.detectOverflow(G,{...q,altBoundary:!0}),Q=cQ(U,Y.floating);return{data:{escapedOffsets:Q,escaped:pQ(Q)}}}default:return{}}}}};var oQ=new Set(["left","top"]);async function m2(Z,G){let{placement:Y,platform:J,elements:X}=Z,q=await(J.isRTL==null?void 0:J.isRTL(X.floating)),U=t7(Y),Q=q6(Y),z=N7(Y)==="y",H=oQ.has(U)?-1:1,j=q&&z?-1:1,W=g7(G,Z),{mainAxis:L,crossAxis:M,alignmentAxis:V}=typeof W==="number"?{mainAxis:W,crossAxis:0,alignmentAxis:null}:{mainAxis:W.mainAxis||0,crossAxis:W.crossAxis||0,alignmentAxis:W.alignmentAxis};if(Q&&typeof V==="number")M=Q==="end"?V*-1:V;return z?{x:M*j,y:L*H}:{x:L*H,y:M*j}}var nQ=function(Z){if(Z===void 0)Z=0;return{name:"offset",options:Z,async fn(G){var Y,J;let{x:X,y:q,placement:U,middlewareData:Q}=G,z=await m2(G,Z);if(U===((Y=Q.offset)==null?void 0:Y.placement)&&(J=Q.arrow)!=null&&J.alignmentOffset)return{};return{x:X+z.x,y:q+z.y,data:{...z,placement:U}}}}},tQ=function(Z){if(Z===void 0)Z={};return{name:"shift",options:Z,async fn(G){let{x:Y,y:J,placement:X,platform:q}=G,{mainAxis:U=!0,crossAxis:Q=!1,limiter:z={fn:(B)=>{let{x:K,y:A}=B;return{x:K,y:A}}},...H}=g7(Z,G),j={x:Y,y:J},W=await q.detectOverflow(G,H),L=N7(X),M=AJ(L),V=j[M],D=j[L],O=(B,K)=>h8(K+W[B==="y"?"top":"left"],K,K-W[B==="y"?"bottom":"right"]);if(U)V=O(M,V);if(Q)D=O(L,D);let F=z.fn({...G,[M]:V,[L]:D});return{...F,data:{x:F.x-Y,y:F.y-J,enabled:{[M]:U,[L]:Q}}}}}},eQ=function(Z){if(Z===void 0)Z={};return{options:Z,fn(G){var Y,J;let{x:X,y:q,placement:U,rects:Q,middlewareData:z}=G,{offset:H=0,mainAxis:j=!0,crossAxis:W=!0}=g7(Z,G),L={x:X,y:q},M=N7(U),V=AJ(M),D=L[V],O=L[M],F=g7(H,G),B=typeof F==="number"?{mainAxis:F,crossAxis:0}:{mainAxis:(Y=F.mainAxis)!=null?Y:0,crossAxis:(J=F.crossAxis)!=null?J:0};if(j){let $=V==="y"?"height":"width",w=Q.reference[V]-Q.floating[$]+B.mainAxis,I=Q.reference[V]+Q.reference[$]-B.mainAxis;if(DI)D=I}if(W){var K,A;let $=V==="y"?"width":"height",w=oQ.has(t7(U)),I=Q.reference[M]-Q.floating[$]+(w?((K=z.offset)==null?void 0:K[M])||0:0)+(w?0:B.crossAxis),R=Q.reference[M]+Q.reference[$]+(w?0:((A=z.offset)==null?void 0:A[M])||0)-(w?B.crossAxis:0);if(OR)O=R}return{[V]:D,[M]:O}}}},Zz=function(Z){if(Z===void 0)Z={};return{name:"size",options:Z,async fn(G){let{placement:Y,rects:J,platform:X,elements:q}=G,{apply:U=()=>{},...Q}=g7(Z,G),z=await X.detectOverflow(G,Q),H=t7(Y),j=q6(Y),W=N7(Y)==="y",{width:L,height:M}=J.floating,V,D;if(H==="top"||H==="bottom")V=H,D=j===(await(X.isRTL==null?void 0:X.isRTL(q.floating))?"start":"end")?"left":"right";else D=H,V=j==="end"?"top":"bottom";let O=M-z.top-z.bottom,F=L-z.left-z.right,B=y7(M-z[V],O),K=y7(L-z[D],F),A=G.middlewareData.shift,$=!A,w=B,I=K;if(A!=null&&A.enabled.x)I=F;if(A!=null&&A.enabled.y)w=O;if($&&!j)if(W)I=L-2*R7(z.left,z.right);else w=M-2*R7(z.top,z.bottom);await U({...G,availableWidth:I,availableHeight:w});let R=await X.getDimensions(q.floating);if(L!==R.width||M!==R.height)return{reset:{rects:!0}};return{}}}};function IJ(){return typeof window<"u"}function H6(Z){if(Yz(Z))return(Z.nodeName||"").toLowerCase();return"#document"}function p0(Z){var G;return(Z==null||(G=Z.ownerDocument)==null?void 0:G.defaultView)||window}function v7(Z){var G;return(G=(Yz(Z)?Z.ownerDocument:Z.document)||window.document)==null?void 0:G.documentElement}function Yz(Z){if(!IJ())return!1;return Z instanceof Node||Z instanceof p0(Z).Node}function b7(Z){if(!IJ())return!1;return Z instanceof Element||Z instanceof p0(Z).Element}function e7(Z){if(!IJ())return!1;return Z instanceof HTMLElement||Z instanceof p0(Z).HTMLElement}function Gz(Z){if(!IJ()||typeof ShadowRoot>"u")return!1;return Z instanceof ShadowRoot||Z instanceof p0(Z).ShadowRoot}function nG(Z){let{overflow:G,overflowX:Y,overflowY:J,display:X}=k7(Z);return/auto|scroll|overlay|hidden|clip/.test(G+J+Y)&&X!=="inline"&&X!=="contents"}function Jz(Z){return/^(table|td|th)$/.test(H6(Z))}function tG(Z){try{if(Z.matches(":popover-open"))return!0}catch(G){}try{return Z.matches(":modal")}catch(G){return!1}}var d2=/transform|translate|scale|rotate|perspective|filter/,c2=/paint|layout|strict|content/,Q6=(Z)=>!!Z&&Z!=="none",f8;function TJ(Z){let G=b7(Z)?k7(Z):Z;return Q6(G.transform)||Q6(G.translate)||Q6(G.scale)||Q6(G.rotate)||Q6(G.perspective)||!_J()&&(Q6(G.backdropFilter)||Q6(G.filter))||d2.test(G.willChange||"")||c2.test(G.contain||"")}function Xz(Z){let G=_Z(Z);while(e7(G)&&!i6(G)){if(TJ(G))return G;else if(tG(G))return null;G=_Z(G)}return null}function _J(){if(f8==null)f8=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return f8}function i6(Z){return/^(html|body|#document)$/.test(H6(Z))}function k7(Z){return p0(Z).getComputedStyle(Z)}function eG(Z){if(b7(Z))return{scrollLeft:Z.scrollLeft,scrollTop:Z.scrollTop};return{scrollLeft:Z.scrollX,scrollTop:Z.scrollY}}function _Z(Z){if(H6(Z)==="html")return Z;let G=Z.assignedSlot||Z.parentNode||Gz(Z)&&Z.host||v7(Z);return Gz(G)?G.host:G}function qz(Z){let G=_Z(Z);if(i6(G))return(Z.ownerDocument||Z).body;if(e7(G)&&nG(G))return G;return qz(G)}function z6(Z,G,Y){var J;if(G===void 0)G=[];if(Y===void 0)Y=!0;let X=qz(Z),q=X===((J=Z.ownerDocument)==null?void 0:J.body),U=p0(X);if(q){let Q=wJ(U);return G.concat(U,U.visualViewport||[],nG(X)?X:[],Q&&Y?z6(Q):[])}else return G.concat(X,z6(X,[],Y))}function wJ(Z){return Z.parent&&Object.getPrototypeOf(Z.parent)?Z.frameElement:null}function zz(Z){let G=k7(Z),Y=parseFloat(G.width)||0,J=parseFloat(G.height)||0,X=e7(Z),q=X?Z.offsetWidth:Y,U=X?Z.offsetHeight:J,Q=aG(Y)!==q||aG(J)!==U;if(Q)Y=q,J=U;return{width:Y,height:J,$:Q}}function v8(Z){return!b7(Z)?Z.contextElement:Z}function s6(Z){let G=v8(Z);if(!e7(G))return f7(1);let Y=G.getBoundingClientRect(),{width:J,height:X,$:q}=zz(G),U=(q?aG(Y.width):Y.width)/J,Q=(q?aG(Y.height):Y.height)/X;if(!U||!Number.isFinite(U))U=1;if(!Q||!Number.isFinite(Q))Q=1;return{x:U,y:Q}}var p2=f7(0);function Hz(Z){let G=p0(Z);if(!_J()||!G.visualViewport)return p2;return{x:G.visualViewport.offsetLeft,y:G.visualViewport.offsetTop}}function l2(Z,G,Y){if(G===void 0)G=!1;return!!Y&&G&&Y===p0(Z)}function W6(Z,G,Y,J){if(G===void 0)G=!1;if(Y===void 0)Y=!1;let X=Z.getBoundingClientRect(),q=v8(Z),U=f7(1);if(G)if(J){if(b7(J))U=s6(J)}else U=s6(Z);let Q=l2(q,Y,J)?Hz(q):f7(0),z=(X.left+Q.x)/U.x,H=(X.top+Q.y)/U.y,j=X.width/U.x,W=X.height/U.y;if(q&&J){let L=p0(q),M=b7(J)?p0(J):J,V=L,D=wJ(V);while(D&&M!==V){let O=s6(D),F=D.getBoundingClientRect(),B=k7(D),K=F.left+(D.clientLeft+parseFloat(B.paddingLeft))*O.x,A=F.top+(D.clientTop+parseFloat(B.paddingTop))*O.y;z*=O.x,H*=O.y,j*=O.x,W*=O.y,z+=K,H+=A,V=p0(D),D=wJ(V)}}return U6({width:j,height:W,x:z,y:H})}function RJ(Z,G){let Y=eG(Z).scrollLeft;if(!G)return W6(v7(Z)).left+Y;return G.left+Y}function Wz(Z,G){let Y=Z.getBoundingClientRect(),J=Y.left+G.scrollLeft-RJ(Z,Y),X=Y.top+G.scrollTop;return{x:J,y:X}}function i2(Z){let{elements:G,rect:Y,offsetParent:J,strategy:X}=Z,q=X==="fixed",U=v7(J),Q=G?tG(G.floating):!1;if(J===U||Q&&q)return Y;let z={scrollLeft:0,scrollTop:0},H=f7(1),j=f7(0),W=e7(J);if(W||!q){if(H6(J)!=="body"||nG(U))z=eG(J);if(W){let M=W6(J);H=s6(J),j.x=M.x+J.clientLeft,j.y=M.y+J.clientTop}}let L=U&&!W&&!q?Wz(U,z):f7(0);return{width:Y.width*H.x,height:Y.height*H.y,x:Y.x*H.x-z.scrollLeft*H.x+j.x+L.x,y:Y.y*H.y-z.scrollTop*H.y+j.y+L.y}}function s2(Z){return Z.getClientRects?Array.from(Z.getClientRects()):[]}function r2(Z){let G=eG(Z),Y=Z.ownerDocument.body,J=R7(Z.scrollWidth,Z.clientWidth,Y.scrollWidth,Y.clientWidth),X=R7(Z.scrollHeight,Z.clientHeight,Y.scrollHeight,Y.clientHeight),q=-G.scrollLeft+RJ(Z),U=-G.scrollTop;if(k7(Y).direction==="rtl")q+=R7(Z.clientWidth,Y.clientWidth)-J;return{width:J,height:X,x:q,y:U}}var a2=25;function o2(Z,G,Y){if(Y===void 0)Y="viewport";let J=Y==="layoutViewport",X=p0(Z),q=v7(Z),U=X.visualViewport,Q=q.clientWidth,z=q.clientHeight,H=0,j=0;if(U){let L=!_J()||G==="fixed";if(J){if(!L)H=-U.offsetLeft,j=-U.offsetTop}else if(Q=U.width,z=U.height,L)H=U.offsetLeft,j=U.offsetTop}if(RJ(q)<=0){let L=q.ownerDocument,M=L.body,V=getComputedStyle(M),D=L.compatMode==="CSS1Compat"?parseFloat(V.marginLeft)+parseFloat(V.marginRight)||0:0,O=Math.abs(q.clientWidth-M.clientWidth-D),F=getComputedStyle(q).scrollbarGutter==="stable both-edges"?O/2:O;if(F<=a2)Q-=F}return{width:Q,height:z,x:H,y:j}}function n2(Z,G){let Y=W6(Z,!0,G==="fixed"),J=Y.top+Z.clientTop,X=Y.left+Z.clientLeft,q=s6(Z),U=Z.clientWidth*q.x,Q=Z.clientHeight*q.y,z=X*q.x,H=J*q.y;return{width:U,height:Q,x:z,y:H}}function Uz(Z,G,Y){let J;if(G==="viewport"||G==="layoutViewport")J=o2(Z,Y,G);else if(G==="document")J=r2(v7(Z));else if(b7(G))J=n2(G,Y);else{let X=Hz(Z);J={x:G.x-X.x,y:G.y-X.y,width:G.width,height:G.height}}return U6(J)}function t2(Z,G){let Y=G.get(Z);if(Y)return Y;let J=z6(Z,[],!1).filter((Q)=>b7(Q)&&H6(Q)!=="body"),X=null,q=k7(Z).position==="fixed",U=q?_Z(Z):Z;while(b7(U)&&!i6(U)){let Q=k7(U),z=TJ(U),H=X?X.position:q?"fixed":"";if(!z&&(H==="fixed"||H==="absolute"&&Q.position==="static"))J=J.filter((W)=>W!==U);else X=Q;U=_Z(U)}return G.set(Z,J),J}function e2(Z){let{element:G,boundary:Y,rootBoundary:J,strategy:X}=Z,U=[...Y==="clippingAncestors"?tG(G)?[]:t2(G,this._c):[].concat(Y),J],Q=Uz(G,U[0],X),z=Q.top,H=Q.right,j=Q.bottom,W=Q.left;for(let L=1;L{Q(!1,0.0000001)},1000);else Q(!1,b)}I=!1}try{J=new IntersectionObserver(R,{...w,root:q.ownerDocument})}catch(k){J=new IntersectionObserver(R,w)}J.observe(Z)}let z=p0(Z),H=()=>Q(Y);return z.addEventListener("resize",H),Q(!0),()=>{z.removeEventListener("resize",H),U()}}function u8(Z,G,Y,J){if(J===void 0)J={};let{ancestorScroll:X=!0,ancestorResize:q=!0,elementResize:U=typeof ResizeObserver==="function",layoutShift:Q=typeof IntersectionObserver==="function",animationFrame:z=!1}=J,H=v8(Z),j=X||q?[...H?z6(H):[],...G?z6(G):[]]:[];j.forEach((F)=>{X&&F.addEventListener("scroll",Y),q&&F.addEventListener("resize",Y)});let W=H&&Q?XL(H,Y,q):null,L=-1,M=null;if(U){if(M=new ResizeObserver((F)=>{let[B]=F;if(B&&B.target===H&&M&&G)M.unobserve(G),cancelAnimationFrame(L),L=requestAnimationFrame(()=>{var K;(K=M)==null||K.observe(G)});Y()}),H&&!z)M.observe(H);if(G)M.observe(G)}let V,D=z?W6(Z):null;if(z)O();function O(){let F=W6(Z);if(D&&!Lz(D,F))Y();D=F,V=requestAnimationFrame(O)}return Y(),()=>{var F;if(j.forEach((B)=>{X&&B.removeEventListener("scroll",Y),q&&B.removeEventListener("resize",Y)}),W==null||W(),(F=M)==null||F.disconnect(),M=null,z)cancelAnimationFrame(V)}}var Mz=nQ;var Fz=tQ,Kz=rQ,Dz=Zz,Vz=aQ,m8=sQ;var Az=eQ,d8=(Z,G,Y)=>{let J=new Map,X=Y!=null?Y:{},q={...jz,...X.platform,_c:J};return iQ(Z,G,{...X,platform:q})};m();m();var $z=v6(c6(),1),qL=typeof document<"u",UL=function(){},NJ=qL?OZ:UL;function bJ(Z,G){if(Z===G)return!0;if(typeof Z!==typeof G)return!1;if(typeof Z==="function"&&Z.toString()===G.toString())return!0;let Y,J,X;if(Z&&G&&typeof Z==="object"){if(Array.isArray(Z)){if(Y=Z.length,Y!==G.length)return!1;for(J=Y;J--!==0;)if(!bJ(Z[J],G[J]))return!1;return!0}if(X=Object.keys(Z),Y=X.length,Y!==Object.keys(G).length)return!1;for(J=Y;J--!==0;)if(!{}.hasOwnProperty.call(G,X[J]))return!1;for(J=Y;J--!==0;){let q=X[J];if(q==="_owner"&&Z.$$typeof)continue;if(!bJ(Z[q],G[q]))return!1}return!0}return Z!==Z&&G!==G}function Iz(Z){if(typeof window>"u")return 1;return(Z.ownerDocument.defaultView||window).devicePixelRatio||1}function Oz(Z,G){let Y=Iz(Z);return Math.round(G*Y)/Y}function c8(Z){let G=N(Z);return NJ(()=>{G.current=Z}),G}function Tz(Z){if(Z===void 0)Z={};let{placement:G="bottom",strategy:Y="absolute",middleware:J=[],platform:X,elements:{reference:q,floating:U}={},transform:Q=!0,whileElementsMounted:z,open:H}=Z,[j,W]=x({x:0,y:0,strategy:Y,placement:G,middlewareData:{},isPositioned:!1}),[L,M]=x(J);if(!bJ(L,J))M(J);let[V,D]=x(null),[O,F]=x(null),B=f((y)=>{if(y!==w.current)w.current=y,D(y)},[]),K=f((y)=>{if(y!==I.current)I.current=y,F(y)},[]),A=q||V,$=U||O,w=N(null),I=N(null),R=N(j),k=z!=null,b=c8(z),C=c8(X),a=c8(H),l=f(()=>{if(!w.current||!I.current)return;let y={placement:G,strategy:Y,middleware:L};if(C.current)y.platform=C.current;d8(w.current,I.current,y).then((o)=>{let I0={...o,isPositioned:a.current!==!1};if(Z0.current&&!bJ(R.current,I0))R.current=I0,$z.flushSync(()=>{W(I0)})})},[L,G,Y,C,a]);NJ(()=>{if(H===!1&&R.current.isPositioned)R.current.isPositioned=!1,W((y)=>({...y,isPositioned:!1}))},[H]);let Z0=N(!1);NJ(()=>{return Z0.current=!0,()=>{Z0.current=!1}},[]),NJ(()=>{if(A)w.current=A;if($)I.current=$;if(A&&$){if(b.current)return b.current(A,$,l);l()}},[A,$,l,b,k]);let G0=A0(()=>({reference:w,floating:I,setReference:B,setFloating:K}),[B,K]),E=A0(()=>({reference:A,floating:$}),[A,$]),i=A0(()=>{let y={position:Y,left:0,top:0};if(!E.floating)return y;let o=Oz(E.floating,j.x),I0=Oz(E.floating,j.y);if(Q)return{...y,transform:"translate("+o+"px, "+I0+"px)",...Iz(E.floating)>=1.5&&{willChange:"transform"}};return{position:Y,left:o,top:I0}},[Y,Q,E.floating,j.x,j.y]);return A0(()=>({...j,update:l,refs:G0,elements:E,floatingStyles:i}),[j,l,G0,E,i])}var QL=(Z)=>{function G(Y){return{}.hasOwnProperty.call(Y,"current")}return{name:"arrow",options:Z,fn(Y){let{element:J,padding:X}=typeof Z==="function"?Z(Y):Z;if(J&&G(J)){if(J.current!=null)return m8({element:J.current,padding:X}).fn(Y);return{}}if(J)return m8({element:J,padding:X}).fn(Y);return{}}}},_z=(Z,G)=>{let Y=Mz(Z);return{name:Y.name,fn:Y.fn,options:[Z,G]}},wz=(Z,G)=>{let Y=Fz(Z);return{name:Y.name,fn:Y.fn,options:[Z,G]}},Rz=(Z,G)=>{return{fn:Az(Z).fn,options:[Z,G]}},Nz=(Z,G)=>{let Y=Kz(Z);return{name:Y.name,fn:Y.fn,options:[Z,G]}},bz=(Z,G)=>{let Y=Dz(Z);return{name:Y.name,fn:Y.fn,options:[Z,G]}};var kz=(Z,G)=>{let Y=Vz(Z);return{name:Y.name,fn:Y.fn,options:[Z,G]}};var Cz=(Z,G)=>{let Y=QL(Z);return{name:Y.name,fn:Y.fn,options:[Z,G]}};m();var zL="Arrow",Sz=S((Z,G)=>{let{children:Y,width:J=10,height:X=5,...q}=Z;return _(s.svg,{...q,ref:G,width:J,height:X,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:Z.asChild?Y:_("polygon",{points:"0,0 30,0 15,10"})})});Sz.displayName=zL;var xz=Sz;m();function kJ(Z){let[G,Y]=x(void 0);return F0(()=>{if(Z){Y({width:Z.offsetWidth,height:Z.offsetHeight});let J=new ResizeObserver((X)=>{if(!Array.isArray(X))return;if(!X.length)return;let q=X[0],U,Q;if("borderBoxSize"in q){let z=q.borderBoxSize,H=Array.isArray(z)?z[0]:z;U=H.inlineSize,Q=H.blockSize}else U=Z.offsetWidth,Q=Z.offsetHeight;Y({width:U,height:Q})});return J.observe(Z,{box:"border-box"}),()=>J.unobserve(Z)}else Y(void 0)},[Z]),G}var p8="Popper",[Pz,l8]=IZ(p8),[WL,Ez]=Pz(p8),hz=(Z)=>{let{__scopePopper:G,children:Y}=Z,[J,X]=x(null),[q,U]=x(void 0);return _(WL,{scope:G,anchor:J,onAnchorChange:X,placementState:q,setPlacementState:U,children:Y})};hz.displayName=p8;var yz="PopperAnchor",fz=S((Z,G)=>{let{__scopePopper:Y,virtualRef:J,...X}=Z,q=Ez(yz,Y),U=N(null),Q=q.onAnchorChange,z=f((V)=>{if(U.current=V,V)Q(V)},[Q]),H=n(G,z),j=N(null);P(()=>{if(!J)return;let V=j.current;if(j.current=J.current,V!==j.current)Q(j.current)});let W=q.placementState&&s8(q.placementState),L=W?.[0],M=W?.[1];return J?null:_(s.div,{"data-radix-popper-side":L,"data-radix-popper-align":M,...X,ref:H})});fz.displayName=yz;var i8="PopperContent",[BL,jL]=Pz(i8),gz=S((Z,G)=>{let{__scopePopper:Y,side:J="bottom",sideOffset:X=0,align:q="center",alignOffset:U=0,arrowPadding:Q=0,avoidCollisions:z=!0,collisionBoundary:H=[],collisionPadding:j=0,sticky:W="partial",hideWhenDetached:L=!1,updatePositionStrategy:M="optimized",onPlaced:V,...D}=Z,O=Ez(i8,Y),[F,B]=x(null),K=n(G,B),[A,$]=x(null),w=kJ(A),I=w?.width??0,R=w?.height??0,k=J+(q!=="center"?"-"+q:""),b=typeof j==="number"?j:{top:0,right:0,bottom:0,left:0,...j},C=Array.isArray(H)?H:[H],a=C.length>0,l={padding:b,boundary:C.filter(ML),altBoundary:a},{refs:Z0,floatingStyles:G0,placement:E,isPositioned:i,middlewareData:y}=Tz({strategy:"fixed",placement:k,whileElementsMounted:(...V0)=>{return u8(...V0,{animationFrame:M==="always"})},elements:{reference:O.anchor},middleware:[_z({mainAxis:X+R,alignmentAxis:U}),z&&wz({mainAxis:!0,crossAxis:!1,limiter:W==="partial"?Rz():void 0,...l}),z&&Nz({...l}),bz({...l,apply:({elements:V0,rects:m0,availableWidth:H0,availableHeight:M0})=>{let{width:R0,height:r7}=m0.reference,M7=V0.floating.style;M7.setProperty("--radix-popper-available-width",`${H0}px`),M7.setProperty("--radix-popper-available-height",`${M0}px`),M7.setProperty("--radix-popper-anchor-width",`${R0}px`),M7.setProperty("--radix-popper-anchor-height",`${r7}px`)}}),A&&Cz({element:A,padding:Q}),FL({arrowWidth:I,arrowHeight:R}),L&&kz({strategy:"referenceHidden",...l,boundary:a?l.boundary:void 0})]}),o=O.setPlacementState;F0(()=>{return o(E),()=>{o(void 0)}},[E,o]);let[I0,u0]=s8(E),D0=Y7(V);F0(()=>{if(i)D0?.()},[i,D0]);let w0=y.arrow?.x,i0=y.arrow?.y,g6=y.arrow?.centerOffset!==0,[G6,v]=x();return F0(()=>{if(F)v(window.getComputedStyle(F).zIndex)},[F]),_("div",{ref:Z0.setFloating,"data-radix-popper-content-wrapper":"",style:{...G0,transform:i?G0.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G6,"--radix-popper-transform-origin":[y.transformOrigin?.x,y.transformOrigin?.y].join(" "),...y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:Z.dir,children:_(BL,{scope:Y,placedSide:I0,placedAlign:u0,onArrowChange:$,arrowX:w0,arrowY:i0,shouldHideArrow:g6,children:_(s.div,{"data-side":I0,"data-align":u0,...D,ref:K,style:{...D.style,animation:!i?"none":void 0}})})})});gz.displayName=i8;var vz="PopperArrow",LL={top:"bottom",right:"left",bottom:"top",left:"right"},uz=S(function(G,Y){let{__scopePopper:J,...X}=G,q=jL(vz,J),U=LL[q.placedSide];return _("span",{ref:q.onArrowChange,style:{position:"absolute",left:q.arrowX,top:q.arrowY,[U]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[q.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[q.placedSide],visibility:q.shouldHideArrow?"hidden":void 0},children:_(xz,{...X,ref:Y,style:{...X.style,display:"block"}})})});uz.displayName=vz;function ML(Z){return Z!==null}var FL=(Z)=>({name:"transformOrigin",options:Z,fn(G){let{placement:Y,rects:J,middlewareData:X}=G,U=X.arrow?.centerOffset!==0,Q=U?0:Z.arrowWidth,z=U?0:Z.arrowHeight,[H,j]=s8(Y),W={start:"0%",center:"50%",end:"100%"}[j],L=(X.arrow?.x??0)+Q/2,M=(X.arrow?.y??0)+z/2,V="",D="";if(H==="bottom")V=U?W:`${L}px`,D=`${-z}px`;else if(H==="top")V=U?W:`${L}px`,D=`${J.floating.height+z}px`;else if(H==="right")V=`${-z}px`,D=U?W:`${M}px`;else if(H==="left")V=`${J.floating.width+z}px`,D=U?W:`${M}px`;return{data:{x:V,y:D}}}});function s8(Z){let[G,Y="center"]=Z.split("-");return[G,Y]}var mz=hz,dz=fz,cz=gz,pz=uz;m();var lz=v6(c6(),1);var DL="Portal",r8=S((Z,G)=>{let{container:Y,...J}=Z,[X,q]=x(!1);F0(()=>q(!0),[]);let U=Y||X&&globalThis?.document?.body;return U?lz.createPortal(_(s.div,{...J,ref:G}),U):null});r8.displayName=DL;m();m();function VL(Z,G){return iG((Y,J)=>{return G[Y][J]??Y},Z)}var a8=(Z)=>{let{present:G,children:Y}=Z,J=AL(G),X=typeof Y==="function"?Y({present:J.isPresent}):a7.only(Y),q=OL(J.ref,$L(X));return typeof Y==="function"||J.isPresent?h7(X,{ref:q}):null};a8.displayName="Presence";function AL(Z){let[G,Y]=x(),J=N(null),X=N(Z),q=N("none"),U=N(void 0),Q=Z?"mounted":"unmounted",[z,H]=VL(Q,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P(()=>{if(z==="mounted")q.current=U.current??ZY(J.current),U.current=void 0;else q.current="none"},[z]),F0(()=>{let j=J.current,W=X.current;if(W!==Z){let M=q.current,V=ZY(j);if(Z)U.current=V,H("MOUNT");else if(V==="none"||j?.display==="none")H("UNMOUNT");else if(W&&M!==V)H("ANIMATION_OUT");else H("UNMOUNT");X.current=Z}},[Z,H]),F0(()=>{if(G){let j,W=G.ownerDocument.defaultView??window,L=(V)=>{let O=ZY(J.current).includes(CSS.escape(V.animationName));if(V.target===G&&O){if(H("ANIMATION_END"),!X.current){let F=G.style.animationFillMode;G.style.animationFillMode="forwards",j=W.setTimeout(()=>{if(G.style.animationFillMode==="forwards")G.style.animationFillMode=F})}}},M=(V)=>{if(V.target===G)q.current=ZY(J.current)};return G.addEventListener("animationstart",M),G.addEventListener("animationcancel",L),G.addEventListener("animationend",L),()=>{W.clearTimeout(j),G.removeEventListener("animationstart",M),G.removeEventListener("animationcancel",L),G.removeEventListener("animationend",L)}}else H("ANIMATION_END")},[G,H]),{isPresent:["mounted","unmountSuspended"].includes(z),ref:f((j)=>{if(j){let W=getComputedStyle(j);J.current=W,U.current=ZY(W)}else J.current=null;Y(j)},[])}}function iz(Z,G){if(typeof Z==="function")return Z(G);else if(Z!==null&&Z!==void 0)Z.current=G}function OL(...Z){let G=N(Z);return G.current=Z,f((Y)=>{let J=G.current,X=!1,q=J.map((U)=>{let Q=iz(U,Y);if(!X&&typeof Q==="function")X=!0;return Q});if(X)return()=>{for(let U=0;U{},caller:J}){let[X,q,U]=TL({defaultProp:G,onChange:Y}),Q=Z!==void 0,z=Q?Z:X;{let j=N(Z!==void 0);P(()=>{let W=j.current;if(W!==Q)console.warn(`${J} is changing from ${W?"controlled":"uncontrolled"} to ${Q?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);j.current=Q},[Q,J])}let H=f((j)=>{if(Q){let W=_L(j)?j(Z):j;if(W!==Z)U.current?.(W)}else q(j)},[Q,Z,q,U]);return[z,H]}function TL({defaultProp:Z,onChange:G}){let[Y,J]=x(Z),X=N(Y),q=N(G);return IL(()=>{q.current=G},[G]),P(()=>{if(X.current!==Y)q.current?.(Y),X.current=Y},[Y,X]),[Y,J,q]}function _L(Z){return typeof Z==="function"}var ED=Symbol("RADIX:SYNC_STATE");m();function CJ(Z){let G=N({value:Z,previous:Z});return A0(()=>{if(G.current.value!==Z)G.current.previous=G.current.value,G.current.value=Z;return G.current.previous},[Z])}m();var o8=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),wL="VisuallyHidden",RL=S((Z,G)=>{return _(s.span,{...Z,ref:G,style:{...o8,...Z.style}})});RL.displayName=wL;var NL=function(Z){if(typeof document>"u")return null;var G=Array.isArray(Z)?Z[0]:Z;return G.ownerDocument.body},r6=new WeakMap,SJ=new WeakMap,xJ={},n8=0,sz=function(Z){return Z&&(Z.host||sz(Z.parentNode))},bL=function(Z,G){return G.map(function(Y){if(Z.contains(Y))return Y;var J=sz(Y);if(J&&Z.contains(J))return J;return console.error("aria-hidden",Y,"in not contained inside",Z,". Doing nothing"),null}).filter(function(Y){return Boolean(Y)})},kL=function(Z,G,Y,J){var X=bL(G,Array.isArray(Z)?Z:[Z]);if(!xJ[Y])xJ[Y]=new WeakMap;var q=xJ[Y],U=[],Q=new Set,z=new Set(X),H=function(W){if(!W||Q.has(W))return;Q.add(W),H(W.parentNode)};X.forEach(H);var j=function(W){if(!W||z.has(W))return;Array.prototype.forEach.call(W.children,function(L){if(Q.has(L))j(L);else try{var M=L.getAttribute(J),V=M!==null&&M!=="false",D=(r6.get(L)||0)+1,O=(q.get(L)||0)+1;if(r6.set(L,D),q.set(L,O),U.push(L),D===1&&V)SJ.set(L,!0);if(O===1)L.setAttribute(Y,"true");if(!V)L.setAttribute(J,"true")}catch(F){console.error("aria-hidden: cannot operate on ",L,F)}})};return j(G),Q.clear(),n8++,function(){if(U.forEach(function(W){var L=r6.get(W)-1,M=q.get(W)-1;if(r6.set(W,L),q.set(W,M),!L){if(!SJ.has(W))W.removeAttribute(J);SJ.delete(W)}if(!M)W.removeAttribute(Y)}),n8--,!n8)r6=new WeakMap,r6=new WeakMap,SJ=new WeakMap,xJ={}}},rz=function(Z,G,Y){if(Y===void 0)Y="data-aria-hidden";var J=Array.from(Array.isArray(Z)?Z:[Z]),X=G||NL(Z);if(!X)return function(){return null};return J.push.apply(J,Array.from(X.querySelectorAll("[aria-live], script"))),kL(J,X,Y,"aria-hidden")};var s0=function(){return s0=Object.assign||function(G){for(var Y,J=1,X=arguments.length;J"u")return yL;var G=fL(Z),Y=document.documentElement.clientWidth,J=window.innerWidth;return{left:G[0],top:G[1],right:G[2],gap:Math.max(0,J-Y+G[2]-G[0])}};var gL=JY(),a6="data-scroll-locked",vL=function(Z,G,Y,J){var{left:X,top:q,right:U,gap:Q}=Z;if(Y===void 0)Y="margin";return` + .`.concat(t8,` { + overflow: hidden `).concat(J,`; + padding-right: `).concat(Q,"px ").concat(J,`; + } + body[`).concat(a6,`] { + overflow: hidden `).concat(J,`; + overscroll-behavior: contain; + `).concat([G&&"position: relative ".concat(J,";"),Y==="margin"&&` + padding-left: `.concat(X,`px; + padding-top: `).concat(q,`px; + padding-right: `).concat(U,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(Q,"px ").concat(J,`; + `),Y==="padding"&&"padding-right: ".concat(Q,"px ").concat(J,";")].filter(Boolean).join(""),` + } + + .`).concat(B6,` { + right: `).concat(Q,"px ").concat(J,`; + } + + .`).concat(j6,` { + margin-right: `).concat(Q,"px ").concat(J,`; + } + + .`).concat(B6," .").concat(B6,` { + right: 0 `).concat(J,`; + } + + .`).concat(j6," .").concat(j6,` { + margin-right: 0 `).concat(J,`; + } + + body[`).concat(a6,`] { + `).concat(e8,": ").concat(Q,`px; + } +`)},G5=function(){var Z=parseInt(document.body.getAttribute(a6)||"0",10);return isFinite(Z)?Z:0},uL=function(){P(function(){return document.body.setAttribute(a6,(G5()+1).toString()),function(){var Z=G5()-1;if(Z<=0)document.body.removeAttribute(a6);else document.body.setAttribute(a6,Z.toString())}},[])},z9=function(Z){var{noRelative:G,noImportant:Y,gapMode:J}=Z,X=J===void 0?"margin":J;uL();var q=A0(function(){return Q9(X)},[X]);return d0(gL,{styles:vL(q,!G,X,!Y?"!important":"")})};var H9=!1;if(typeof window<"u")try{o6=Object.defineProperty({},"passive",{get:function(){return H9=!0,!0}}),window.addEventListener("test",o6,o6),window.removeEventListener("test",o6,o6)}catch(Z){H9=!1}var o6,L6=H9?{passive:!1}:!1;var mL=function(Z){return Z.tagName==="TEXTAREA"},Y5=function(Z,G){if(!(Z instanceof Element))return!1;var Y=window.getComputedStyle(Z);return Y[G]!=="hidden"&&!(Y.overflowY===Y.overflowX&&!mL(Z)&&Y[G]==="visible")},dL=function(Z){return Y5(Z,"overflowY")},cL=function(Z){return Y5(Z,"overflowX")},W9=function(Z,G){var Y=G.ownerDocument,J=G;do{if(typeof ShadowRoot<"u"&&J instanceof ShadowRoot)J=J.host;var X=J5(Z,J);if(X){var q=X5(Z,J),U=q[1],Q=q[2];if(U>Q)return!0}J=J.parentNode}while(J&&J!==Y.body);return!1},pL=function(Z){var{scrollTop:G,scrollHeight:Y,clientHeight:J}=Z;return[G,Y,J]},lL=function(Z){var{scrollLeft:G,scrollWidth:Y,clientWidth:J}=Z;return[G,Y,J]},J5=function(Z,G){return Z==="v"?dL(G):cL(G)},X5=function(Z,G){return Z==="v"?pL(G):lL(G)},iL=function(Z,G){return Z==="h"&&G==="rtl"?-1:1},q5=function(Z,G,Y,J,X){var q=iL(Z,window.getComputedStyle(G).direction),U=q*J,Q=Y.target,z=G.contains(Q),H=!1,j=U>0,W=0,L=0;do{if(!Q)break;var M=X5(Z,Q),V=M[0],D=M[1],O=M[2],F=D-O-q*V;if(V||F){if(J5(Z,Q))W+=F,L+=V}var B=Q.parentNode;Q=B&&B.nodeType===Node.DOCUMENT_FRAGMENT_NODE?B.host:B}while(!z&&Q!==document.body||z&&(G.contains(Q)||G===Q));if(j&&(X&&Math.abs(W)<1||!X&&U>W))H=!0;else if(!j&&(X&&Math.abs(L)<1||!X&&-U>L))H=!0;return H};var yJ=function(Z){return"changedTouches"in Z?[Z.changedTouches[0].clientX,Z.changedTouches[0].clientY]:[0,0]},U5=function(Z){return[Z.deltaX,Z.deltaY]},Q5=function(Z){return Z&&"current"in Z?Z.current:Z},sL=function(Z,G){return Z[0]===G[0]&&Z[1]===G[1]},rL=function(Z){return` + .block-interactivity-`.concat(Z,` {pointer-events: none;} + .allow-interactivity-`).concat(Z,` {pointer-events: all;} +`)},aL=0,n6=[];function z5(Z){var G=N([]),Y=N([0,0]),J=N(),X=x(aL++)[0],q=x(JY)[0],U=N(Z);P(function(){U.current=Z},[Z]),P(function(){if(Z.inert){document.body.classList.add("block-interactivity-".concat(X));var D=az([Z.lockRef.current],(Z.shards||[]).map(Q5),!0).filter(Boolean);return D.forEach(function(O){return O.classList.add("allow-interactivity-".concat(X))}),function(){document.body.classList.remove("block-interactivity-".concat(X)),D.forEach(function(O){return O.classList.remove("allow-interactivity-".concat(X))})}}return},[Z.inert,Z.lockRef.current,Z.shards]);var Q=f(function(D,O){if("touches"in D&&D.touches.length===2||D.type==="wheel"&&D.ctrlKey)return!U.current.allowPinchZoom;var F=yJ(D),B=Y.current,K="deltaX"in D?D.deltaX:B[0]-F[0],A="deltaY"in D?D.deltaY:B[1]-F[1],$,w=D.target,I=Math.abs(K)>Math.abs(A)?"h":"v";if("touches"in D&&I==="h"&&w.type==="range")return!1;var R=window.getSelection(),k=R&&R.anchorNode,b=k?k===w||k.contains(w):!1;if(b)return!1;var C=W9(I,w);if(!C)return!0;if(C)$=I;else $=I==="v"?"h":"v",C=W9(I,w);if(!C)return!1;if(!J.current&&"changedTouches"in D&&(K||A))J.current=$;if(!$)return!0;var a=J.current||$;return q5(a,O,D,a==="h"?K:A,!0)},[]),z=f(function(D){var O=D;if(!n6.length||n6[n6.length-1]!==q)return;var F="deltaY"in O?U5(O):yJ(O),B=G.current.filter(function($){return $.name===O.type&&($.target===O.target||O.target===$.shadowParent)&&sL($.delta,F)})[0];if(B&&B.should){if(O.cancelable)O.preventDefault();return}if(!B){var K=(U.current.shards||[]).map(Q5).filter(Boolean).filter(function($){return $.contains(O.target)}),A=K.length>0?Q(O,K[0]):!U.current.noIsolation;if(A){if(O.cancelable)O.preventDefault()}}},[]),H=f(function(D,O,F,B){var K={name:D,delta:O,target:F,should:B,shadowParent:oL(F)};G.current.push(K),setTimeout(function(){G.current=G.current.filter(function(A){return A!==K})},1)},[]),j=f(function(D){Y.current=yJ(D),J.current=void 0},[]),W=f(function(D){H(D.type,U5(D),D.target,Q(D,Z.lockRef.current))},[]),L=f(function(D){H(D.type,yJ(D),D.target,Q(D,Z.lockRef.current))},[]);P(function(){return n6.push(q),Z.setCallbacks({onScrollCapture:W,onWheelCapture:W,onTouchMoveCapture:L}),document.addEventListener("wheel",z,L6),document.addEventListener("touchmove",z,L6),document.addEventListener("touchstart",j,L6),function(){n6=n6.filter(function(D){return D!==q}),document.removeEventListener("wheel",z,L6),document.removeEventListener("touchmove",z,L6),document.removeEventListener("touchstart",j,L6)}},[]);var{removeScrollBar:M,inert:V}=Z;return d0(E7,null,V?d0(q,{styles:rL(X)}):null,M?d0(z9,{noRelative:Z.noRelative,gapMode:Z.gapMode}):null)}function oL(Z){var G=null;while(Z!==null){if(Z instanceof ShadowRoot)G=Z.host,Z=Z.host;Z=Z.parentNode}return G}var H5=Y9(hJ,z5);var W5=S(function(Z,G){return d0(YY,s0({},Z,{ref:G,sideCar:H5}))});W5.classNames=YY.classNames;var B9=W5;var nL=[" ","Enter","ArrowUp","ArrowDown"],tL=[" ","Enter"],M6="Select",[gJ,vJ,eL]=MJ(M6),[F6,ZM]=IZ(M6,[eL,l8]),uJ=l8(),[GM,RZ]=F6(M6),[YM,JM]=F6(M6),XM="SelectProvider";function D9(Z){let{__scopeSelect:G,children:Y,open:J,defaultOpen:X,onOpenChange:q,value:U,defaultValue:Q,onValueChange:z,dir:H,name:j,autoComplete:W,disabled:L,required:M,form:V,internal_do_not_use_render:D}=Z,O=uJ(G),[F,B]=x(null),[K,A]=x(null),[$,w]=x(!1),I=FJ(H),[R,k]=GY({prop:J,defaultProp:X??!1,onChange:q,caller:M6}),[b,C]=GY({prop:U,defaultProp:Q,onChange:z,caller:M6}),a=N(null),l=N(b);P(()=>{let D0=V?F?.ownerDocument.getElementById(V):F?.form;if(D0 instanceof HTMLFormElement){let w0=()=>C(l.current);return D0.addEventListener("reset",w0),()=>D0.removeEventListener("reset",w0)}},[V,F,C]);let Z0=F?!!V||!!F.closest("form"):!0,[G0,E]=x(new Set),i=DJ(),y=Array.from(G0).map((D0)=>D0.props.value).join(";"),o=f((D0)=>{E((w0)=>new Set(w0).add(D0))},[]),I0=f((D0)=>{E((w0)=>{let i0=new Set(w0);return i0.delete(D0),i0})},[]),u0={required:M,trigger:F,onTriggerChange:B,valueNode:K,onValueNodeChange:A,valueNodeHasChildren:$,onValueNodeHasChildrenChange:w,contentId:i,value:b,onValueChange:C,open:R,onOpenChange:k,dir:I,triggerPointerDownPosRef:a,disabled:L,name:j,autoComplete:W,form:V,nativeOptions:G0,nativeSelectKey:y,isFormControl:Z0};return _(mz,{...O,children:_(GM,{scope:G,...u0,children:_(gJ.Provider,{scope:G,children:_(YM,{scope:G,onNativeOptionAdd:o,onNativeOptionRemove:I0,children:DM(D)?D(u0):Y})})})})}D9.displayName=XM;var B5=(Z)=>{let{__scopeSelect:G,children:Y,...J}=Z;return _(D9,{__scopeSelect:G,...J,internal_do_not_use_render:({isFormControl:X})=>G7(J6,{children:[Y,X?_(A9,{__scopeSelect:G}):null]})})};B5.displayName=M6;var j5="SelectTrigger",L5=S((Z,G)=>{let{__scopeSelect:Y,disabled:J=!1,...X}=Z,q=uJ(Y),U=RZ(j5,Y),Q=U.disabled||J,z=n(G,U.onTriggerChange),H=vJ(Y),j=N("touch"),[W,L,M]=m5((D)=>{let O=H().filter((K)=>!K.disabled),F=O.find((K)=>K.value===U.value),B=d5(O,D,F);if(B!==void 0)U.onValueChange(B.value)}),V=(D)=>{if(!Q)U.onOpenChange(!0),M();if(D)U.triggerPointerDownPosRef.current={x:Math.round(D.pageX),y:Math.round(D.pageY)}};return _(dz,{asChild:!0,...q,children:_(s.button,{type:"button",role:"combobox","aria-controls":U.open?U.contentId:void 0,"aria-expanded":U.open,"aria-required":U.required,"aria-autocomplete":"none",dir:U.dir,"data-state":U.open?"open":"closed",disabled:Q,"data-disabled":Q?"":void 0,"data-placeholder":mJ(U.value)?"":void 0,...X,ref:z,onClick:Y0(X.onClick,(D)=>{if(D.currentTarget.focus(),j.current!=="mouse")V(D)}),onPointerDown:Y0(X.onPointerDown,(D)=>{j.current=D.pointerType;let O=D.target;if(O.hasPointerCapture(D.pointerId))O.releasePointerCapture(D.pointerId);if(D.button===0&&D.ctrlKey===!1&&D.pointerType==="mouse")V(D),D.preventDefault()}),onKeyDown:Y0(X.onKeyDown,(D)=>{let O=W.current!=="";if(!(D.ctrlKey||D.altKey||D.metaKey)&&D.key.length===1)L(D.key);if(O&&D.key===" ")return;if(nL.includes(D.key))V(),D.preventDefault()})})})});L5.displayName=j5;var M5="SelectValue",F5=S((Z,G)=>{let{__scopeSelect:Y,className:J,style:X,children:q,placeholder:U="",...Q}=Z,z=RZ(M5,Y),{onValueNodeHasChildrenChange:H}=z,j=q!==void 0,W=n(G,z.onValueNodeChange);F0(()=>{H(j)},[H,j]);let L=mJ(z.value);return _(s.span,{...Q,asChild:L?!1:Q.asChild,ref:W,style:{pointerEvents:"none"},children:_(E7,{children:L?U:q},L?"placeholder":"value")})});F5.displayName=M5;var qM="SelectIcon",K5=S((Z,G)=>{let{__scopeSelect:Y,children:J,...X}=Z;return _(s.span,{"aria-hidden":!0,...X,ref:G,children:J||"▼"})});K5.displayName=qM;var D5="SelectPortal",[UM,QM]=F6(D5,{forceMount:void 0}),V5=(Z)=>{let{__scopeSelect:G,forceMount:Y,...J}=Z;return _(UM,{scope:Z.__scopeSelect,forceMount:Y,children:_(r8,{asChild:!0,...J})})};V5.displayName=D5;var wZ="SelectContent",A5=S((Z,G)=>{let Y=QM(wZ,Z.__scopeSelect),{forceMount:J=Y.forceMount,...X}=Z,q=RZ(wZ,Z.__scopeSelect),[U,Q]=x();return F0(()=>{Q(new DocumentFragment)},[]),_(a8,{present:J||q.open,children:({present:z})=>z?_(I5,{...X,ref:G}):_(O5,{...X,fragment:U})})});A5.displayName=wZ;var O5=S((Z,G)=>{let{__scopeSelect:Y,children:J,fragment:X}=Z;if(!X)return null;return K9.createPortal(_($5,{scope:Y,children:_(gJ.Slot,{scope:Y,children:_("div",{ref:G,children:J})})}),X)});O5.displayName="SelectContentFragment";var C7=10,[$5,NZ]=F6(wZ),zM="SelectContentImpl",HM=X6("SelectContent.RemoveScroll"),I5=S((Z,G)=>{let{__scopeSelect:Y}=Z,{position:J="item-aligned",onCloseAutoFocus:X,onEscapeKeyDown:q,onPointerDownOutside:U,side:Q,sideOffset:z,align:H,alignOffset:j,arrowPadding:W,collisionBoundary:L,collisionPadding:M,sticky:V,hideWhenDetached:D,avoidCollisions:O,...F}=Z,B=RZ(wZ,Y),[K,A]=x(null),[$,w]=x(null),I=n(G,A),[R,k]=x(null),[b,C]=x(null),a=vJ(Y),[l,Z0]=x(!1),G0=N(!1);P(()=>{if(K)return rz(K)},[K]),CQ();let E=f((v)=>{let[V0,...m0]=a().map((R0)=>R0.ref.current),[H0]=m0.slice(-1),M0=document.activeElement;for(let R0 of v){if(R0===M0)return;if(R0?.scrollIntoView({block:"nearest"}),R0===V0&&$)$.scrollTop=0;if(R0===H0&&$)$.scrollTop=$.scrollHeight;if(R0?.focus(),document.activeElement!==M0)return}},[a,$]),i=f(()=>E([R,K]),[E,R,K]);P(()=>{if(l)i()},[l,i]);let{onOpenChange:y,triggerPointerDownPosRef:o}=B;P(()=>{if(K){let v={x:0,y:0},V0=(H0)=>{v={x:Math.abs(Math.round(H0.pageX)-(o.current?.x??0)),y:Math.abs(Math.round(H0.pageY)-(o.current?.y??0))}},m0=(H0)=>{if(v.x<=10&&v.y<=10)H0.preventDefault();else if(!H0.composedPath().includes(K))y(!1);document.removeEventListener("pointermove",V0),o.current=null};if(o.current!==null)document.addEventListener("pointermove",V0),document.addEventListener("pointerup",m0,{capture:!0,once:!0});return()=>{document.removeEventListener("pointermove",V0),document.removeEventListener("pointerup",m0,{capture:!0})}}},[K,y,o]),P(()=>{let v=()=>y(!1);return window.addEventListener("blur",v),window.addEventListener("resize",v),()=>{window.removeEventListener("blur",v),window.removeEventListener("resize",v)}},[y]);let[I0,u0]=m5((v)=>{let V0=a().filter((M0)=>!M0.disabled),m0=V0.find((M0)=>M0.ref.current===document.activeElement),H0=d5(V0,v,m0);if(H0)setTimeout(()=>H0.ref.current?.focus())}),D0=f((v,V0,m0)=>{let H0=!G0.current&&!m0;if(B.value!==void 0&&B.value===V0||H0){if(k(v),H0)G0.current=!0}},[B.value]),w0=f(()=>K?.focus(),[K]),i0=f((v,V0,m0)=>{let H0=!G0.current&&!m0;if(B.value!==void 0&&B.value===V0||H0)C(v)},[B.value]),g6=J==="popper"?j9:T5,G6=g6===j9?{side:Q,sideOffset:z,align:H,alignOffset:j,arrowPadding:W,collisionBoundary:L,collisionPadding:M,sticky:V,hideWhenDetached:D,avoidCollisions:O}:{};return _($5,{scope:Y,content:K,viewport:$,onViewportChange:w,itemRefCallback:D0,selectedItem:R,onItemLeave:w0,itemTextRefCallback:i0,focusSelectedItem:i,selectedItemText:b,position:J,isPositioned:l,searchRef:I0,children:_(B9,{as:HM,allowPinchZoom:!0,children:_(E8,{asChild:!0,trapped:B.open,onMountAutoFocus:(v)=>{v.preventDefault()},onUnmountAutoFocus:Y0(X,(v)=>{B.trigger?.focus({preventScroll:!0}),v.preventDefault()}),children:_(S8,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:q,onPointerDownOutside:U,onFocusOutside:(v)=>v.preventDefault(),onDismiss:()=>B.onOpenChange(!1),children:_(g6,{role:"listbox",id:B.contentId,"data-state":B.open?"open":"closed",dir:B.dir,onContextMenu:(v)=>v.preventDefault(),...F,...G6,onPlaced:()=>Z0(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...F.style},onKeyDown:Y0(F.onKeyDown,(v)=>{let V0=v.ctrlKey||v.altKey||v.metaKey;if(v.key==="Tab")v.preventDefault();if(!V0&&v.key.length===1)u0(v.key);if(["ArrowUp","ArrowDown","Home","End"].includes(v.key)){let H0=a().filter((M0)=>!M0.disabled).map((M0)=>M0.ref.current);if(["ArrowUp","End"].includes(v.key))H0=H0.slice().reverse();if(["ArrowUp","ArrowDown"].includes(v.key)){let M0=v.target,R0=H0.indexOf(M0);H0=H0.slice(R0+1)}setTimeout(()=>E(H0)),v.preventDefault()}})})})})})})});I5.displayName=zM;var WM="SelectItemAlignedPosition",T5=S((Z,G)=>{let{__scopeSelect:Y,onPlaced:J,...X}=Z,q=RZ(wZ,Y),U=NZ(wZ,Y),[Q,z]=x(null),[H,j]=x(null),W=n(G,j),L=vJ(Y),M=N(!1),V=N(!0),{viewport:D,selectedItem:O,selectedItemText:F,focusSelectedItem:B}=U,K=f(()=>{if(q.trigger&&q.valueNode&&Q&&H&&D&&O&&F){let I=q.trigger.getBoundingClientRect(),R=H.getBoundingClientRect(),k=q.valueNode.getBoundingClientRect(),b=F.getBoundingClientRect();if(q.dir!=="rtl"){let M0=b.left-R.left,R0=k.left-M0,r7=I.left-R0,M7=I.width+r7,D8=Math.max(M7,R.width),V8=window.innerWidth-C7,A8=p6(R0,[C7,Math.max(C7,V8-D8)]);Q.style.minWidth=M7+"px",Q.style.left=A8+"px"}else{let M0=R.right-b.right,R0=window.innerWidth-k.right-M0,r7=window.innerWidth-I.right-R0,M7=I.width+r7,D8=Math.max(M7,R.width),V8=window.innerWidth-C7,A8=p6(R0,[C7,Math.max(C7,V8-D8)]);Q.style.minWidth=M7+"px",Q.style.right=A8+"px"}let C=L(),a=window.innerHeight-C7*2,l=D.scrollHeight,Z0=window.getComputedStyle(H),G0=parseInt(Z0.borderTopWidth,10),E=parseInt(Z0.paddingTop,10),i=parseInt(Z0.borderBottomWidth,10),y=parseInt(Z0.paddingBottom,10),o=G0+E+l+y+i,I0=Math.min(O.offsetHeight*5,o),u0=window.getComputedStyle(D),D0=parseInt(u0.paddingTop,10),w0=parseInt(u0.paddingBottom,10),i0=I.top+I.height/2-C7,g6=a-i0,G6=O.offsetHeight/2,v=O.offsetTop+G6,V0=G0+E+v,m0=o-V0;if(V0<=i0){let M0=C.length>0&&O===C[C.length-1].ref.current;Q.style.bottom="0px";let R0=H.clientHeight-D.offsetTop-D.offsetHeight,r7=Math.max(g6,G6+(M0?w0:0)+R0+i),M7=V0+r7;Q.style.height=M7+"px"}else{let M0=C.length>0&&O===C[0].ref.current;Q.style.top="0px";let r7=Math.max(i0,G0+D.offsetTop+(M0?D0:0)+G6)+m0;Q.style.height=r7+"px",D.scrollTop=V0-i0+D.offsetTop}Q.style.margin=`${C7}px 0`,Q.style.minHeight=I0+"px",Q.style.maxHeight=a+"px",J?.(),requestAnimationFrame(()=>M.current=!0)}},[L,q.trigger,q.valueNode,Q,H,D,O,F,q.dir,J]);F0(()=>K(),[K]);let[A,$]=x();F0(()=>{if(H)$(window.getComputedStyle(H).zIndex)},[H]);let w=f((I)=>{if(I&&V.current===!0)K(),B?.(),V.current=!1},[K,B]);return _(jM,{scope:Y,contentWrapper:Q,shouldExpandOnScrollRef:M,onScrollButtonChange:w,children:_("div",{ref:z,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:_(s.div,{...X,ref:W,style:{boxSizing:"border-box",maxHeight:"100%",...X.style}})})})});T5.displayName=WM;var BM="SelectPopperPosition",j9=S((Z,G)=>{let{__scopeSelect:Y,align:J="start",collisionPadding:X=C7,...q}=Z,U=uJ(Y);return _(cz,{...U,...q,ref:G,align:J,collisionPadding:X,style:{boxSizing:"border-box",...q.style,...{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}})});j9.displayName=BM;var[jM,V9]=F6(wZ,{}),L9="SelectViewport",_5=S((Z,G)=>{let{__scopeSelect:Y,nonce:J,...X}=Z,q=NZ(L9,Y),U=V9(L9,Y),Q=n(G,q.onViewportChange),z=N(0);return G7(J6,{children:[_("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:J}),_(gJ.Slot,{scope:Y,children:_(s.div,{"data-radix-select-viewport":"",role:"presentation",...X,ref:Q,style:{position:"relative",flex:1,overflow:"hidden auto",...X.style},onScroll:Y0(X.onScroll,(H)=>{let j=H.currentTarget,{contentWrapper:W,shouldExpandOnScrollRef:L}=U;if(L?.current&&W){let M=Math.abs(z.current-j.scrollTop);if(M>0){let V=window.innerHeight-C7*2,D=parseFloat(W.style.minHeight),O=parseFloat(W.style.height),F=Math.max(D,O);if(F0?A:0,W.style.justifyContent="flex-end"}}}z.current=j.scrollTop})})})]})});_5.displayName=L9;var w5="SelectGroup",[LM,MM]=F6(w5),R5=S((Z,G)=>{let{__scopeSelect:Y,...J}=Z,X=DJ();return _(LM,{scope:Y,id:X,children:_(s.div,{role:"group","aria-labelledby":X,...J,ref:G})})});R5.displayName=w5;var N5="SelectLabel",b5=S((Z,G)=>{let{__scopeSelect:Y,...J}=Z,X=MM(N5,Y);return _(s.div,{id:X.id,...J,ref:G})});b5.displayName=N5;var fJ="SelectItem",[FM,k5]=F6(fJ),C5=S((Z,G)=>{let{__scopeSelect:Y,value:J,disabled:X=!1,textValue:q,...U}=Z,Q=RZ(fJ,Y),z=NZ(fJ,Y),H=Q.value===J,[j,W]=x(q??""),[L,M]=x(!1),V=Y7((K)=>z.itemRefCallback?.(K,J,X)),D=n(G,V),O=DJ(),F=N("touch"),B=()=>{if(!X)Q.onValueChange(J),Q.onOpenChange(!1)};return _(FM,{scope:Y,value:J,disabled:X,textId:O,isSelected:H,onItemTextChange:f((K)=>{W((A)=>A||(K?.textContent??"").trim())},[]),children:_(gJ.ItemSlot,{scope:Y,value:J,disabled:X,textValue:j,children:_(s.div,{role:"option","aria-labelledby":O,"data-highlighted":L?"":void 0,"aria-selected":H&&L,"data-state":H?"checked":"unchecked","aria-disabled":X||void 0,"data-disabled":X?"":void 0,tabIndex:X?void 0:-1,...U,ref:D,onFocus:Y0(U.onFocus,()=>M(!0)),onBlur:Y0(U.onBlur,()=>M(!1)),onClick:Y0(U.onClick,()=>{if(F.current!=="mouse")B()}),onPointerUp:Y0(U.onPointerUp,()=>{if(F.current==="mouse")B()}),onPointerDown:Y0(U.onPointerDown,(K)=>{F.current=K.pointerType}),onPointerMove:Y0(U.onPointerMove,(K)=>{if(F.current=K.pointerType,X)z.onItemLeave?.();else if(F.current==="mouse")K.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Y0(U.onPointerLeave,(K)=>{if(K.currentTarget===document.activeElement)z.onItemLeave?.()}),onKeyDown:Y0(U.onKeyDown,(K)=>{if(X||K.target!==K.currentTarget)return;if(z.searchRef?.current!==""&&K.key===" ")return;if(tL.includes(K.key))B();if(K.key===" ")K.preventDefault()})})})})});C5.displayName=fJ;var XY="SelectItemText",S5=S((Z,G)=>{let{__scopeSelect:Y,className:J,style:X,...q}=Z,U=RZ(XY,Y),Q=NZ(XY,Y),z=k5(XY,Y),H=JM(XY,Y),[j,W]=x(null),L=Y7((B)=>Q.itemTextRefCallback?.(B,z.value,z.disabled)),M=n(G,W,z.onItemTextChange,L),V=j?.textContent,D=A0(()=>_("option",{value:z.value,disabled:z.disabled,children:V},z.value),[z.disabled,z.value,V]),{onNativeOptionAdd:O,onNativeOptionRemove:F}=H;return F0(()=>{return O(D),()=>F(D)},[O,F,D]),G7(J6,{children:[_(s.span,{id:z.textId,...q,ref:M}),z.isSelected&&U.valueNode&&!U.valueNodeHasChildren&&!mJ(U.value)?K9.createPortal(q.children,U.valueNode):null]})});S5.displayName=XY;var x5="SelectItemIndicator",P5=S((Z,G)=>{let{__scopeSelect:Y,...J}=Z;return k5(x5,Y).isSelected?_(s.span,{"aria-hidden":!0,...J,ref:G}):null});P5.displayName=x5;var M9="SelectScrollUpButton",E5=S((Z,G)=>{let Y=NZ(M9,Z.__scopeSelect),J=V9(M9,Z.__scopeSelect),[X,q]=x(!1),U=n(G,J.onScrollButtonChange);return F0(()=>{if(Y.viewport&&Y.isPositioned){let z=function(){let j=H.scrollTop>0;q(j)};var Q=z;let H=Y.viewport;return z(),H.addEventListener("scroll",z),()=>H.removeEventListener("scroll",z)}},[Y.viewport,Y.isPositioned]),X?_(y5,{...Z,ref:U,onAutoScroll:()=>{let{viewport:Q,selectedItem:z}=Y;if(Q&&z)Q.scrollTop=Q.scrollTop-z.offsetHeight}}):null});E5.displayName=M9;var F9="SelectScrollDownButton",h5=S((Z,G)=>{let Y=NZ(F9,Z.__scopeSelect),J=V9(F9,Z.__scopeSelect),[X,q]=x(!1),U=n(G,J.onScrollButtonChange);return F0(()=>{if(Y.viewport&&Y.isPositioned){let z=function(){let j=H.scrollHeight-H.clientHeight,W=Math.ceil(H.scrollTop)H.removeEventListener("scroll",z)}},[Y.viewport,Y.isPositioned]),X?_(y5,{...Z,ref:U,onAutoScroll:()=>{let{viewport:Q,selectedItem:z}=Y;if(Q&&z)Q.scrollTop=Q.scrollTop+z.offsetHeight}}):null});h5.displayName=F9;var y5=S((Z,G)=>{let{__scopeSelect:Y,onAutoScroll:J,...X}=Z,q=NZ("SelectScrollButton",Y),U=N(null),Q=vJ(Y),z=f(()=>{if(U.current!==null)window.clearInterval(U.current),U.current=null},[]);return P(()=>{return()=>z()},[z]),F0(()=>{Q().find((j)=>j.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[Q]),_(s.div,{"aria-hidden":!0,...X,ref:G,style:{flexShrink:0,...X.style},onPointerDown:Y0(X.onPointerDown,()=>{if(U.current===null)U.current=window.setInterval(J,50)}),onPointerMove:Y0(X.onPointerMove,()=>{if(q.onItemLeave?.(),U.current===null)U.current=window.setInterval(J,50)}),onPointerLeave:Y0(X.onPointerLeave,()=>{z()})})}),KM="SelectSeparator",f5=S((Z,G)=>{let{__scopeSelect:Y,...J}=Z;return _(s.div,{"aria-hidden":!0,...J,ref:G})});f5.displayName=KM;var g5="SelectArrow",v5=S((Z,G)=>{let{__scopeSelect:Y,...J}=Z,X=uJ(Y);return NZ(g5,Y).position==="popper"?_(pz,{...X,...J,ref:G}):null});v5.displayName=g5;var u5="SelectBubbleInput",A9=S(({__scopeSelect:Z,...G},Y)=>{let J=RZ(u5,Z),{value:X,onValueChange:q,required:U,disabled:Q,name:z,autoComplete:H,form:j}=J,{nativeOptions:W,nativeSelectKey:L}=J,M=N(null),V=n(Y,M),D=X??"",O=CJ(D),F=Array.from(W).some((B)=>(B.props.value??"")==="");return P(()=>{let B=M.current;if(!B)return;let K=window.HTMLSelectElement.prototype,$=Object.getOwnPropertyDescriptor(K,"value").set;if(O!==D&&$){let w=new Event("change",{bubbles:!0});$.call(B,D),B.dispatchEvent(w)}},[O,D]),G7(s.select,{"aria-hidden":!0,required:U,tabIndex:-1,name:z,autoComplete:H,disabled:Q,form:j,onChange:(B)=>q(B.target.value),...G,style:{...o8,...G.style},ref:V,defaultValue:D,children:[mJ(X)&&!F?_("option",{value:""}):null,Array.from(W)]},L)});A9.displayName=u5;function DM(Z){return typeof Z==="function"}function mJ(Z){return Z===""||Z===void 0}function m5(Z){let G=Y7(Z),Y=N(""),J=N(0),X=f((U)=>{let Q=Y.current+U;G(Q),function z(H){if(Y.current=H,window.clearTimeout(J.current),H!=="")J.current=window.setTimeout(()=>z(""),1000)}(Q)},[G]),q=f(()=>{Y.current="",window.clearTimeout(J.current)},[]);return P(()=>{return()=>window.clearTimeout(J.current)},[]),[Y,X,q]}function d5(Z,G,Y){let X=G.length>1&&Array.from(G).every((H)=>H===G[0])?G[0]:G,q=Y?Z.indexOf(Y):-1,U=VM(Z,Math.max(q,0));if(X.length===1)U=U.filter((H)=>H!==Y);let z=U.find((H)=>H.textValue.toLowerCase().startsWith(X.toLowerCase()));return z!==Y?z:void 0}function VM(Z,G){return Z.map((Y,J)=>Z[(G+J)%Z.length])}m();var K6={};lG(K6,{unstable_ThumbTrigger:()=>_9,unstable_ThumbProvider:()=>T9,unstable_SliderThumbTrigger:()=>_9,unstable_SliderThumbProvider:()=>T9,unstable_SliderBubbleInput:()=>w9,unstable_BubbleInput:()=>w9,createSliderScope:()=>$M,Track:()=>n5,Thumb:()=>YH,SliderTrack:()=>n5,SliderThumb:()=>YH,SliderRange:()=>t5,Slider:()=>i5,Root:()=>i5,Range:()=>t5});var c5=["PageUp","PageDown"],p5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],l5={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},t6="Slider",[O9,AM,OM]=MJ(t6),[I9,$M]=IZ(t6,[OM]),[IM,qY]=I9(t6),i5=S((Z,G)=>{let{name:Y,min:J=0,max:X=100,step:q=1,orientation:U="horizontal",disabled:Q=!1,minStepsBetweenThumbs:z=0,defaultValue:H=[J],value:j,onValueChange:W=()=>{},onValueCommit:L=()=>{},inverted:M=!1,form:V,...D}=Z,O=N(new Set),F=N(0),B=N(!1),A=U==="horizontal"?TM:_M,[$,w]=x(null),I=n(G,w),[R=[],k]=GY({prop:j,defaultProp:H,onChange:(E)=>{[...O.current][F.current]?.focus({preventScroll:!0,focusVisible:B.current}),B.current=!1,W(E)}}),b=N(R),C=N(R);P(()=>{let E=V?$?.ownerDocument.getElementById(V):$?.closest("form");if(E instanceof HTMLFormElement){let i=()=>k(C.current);return E.addEventListener("reset",i),()=>E.removeEventListener("reset",i)}},[$,V,k]);function a(E){let i=bM(R,E);G0(E,i)}function l(E){G0(E,F.current)}function Z0(){let E=b.current[F.current];if(R[F.current]!==E)L(R)}function G0(E,i,{commit:y}={commit:!1}){let o=qH(q),I0=cJ(Math.round((E-J)/q)*q+J,o),u0=p6(I0,[J,X]);k((D0=[])=>{let w0=RM(D0,u0,i);if(SM(w0,z*q)){F.current=w0.indexOf(u0);let i0=String(w0)!==String(D0);if(i0&&y)L(w0);return i0?w0:D0}else return D0})}return _(IM,{scope:Z.__scopeSlider,name:Y,disabled:Q,min:J,max:X,valueIndexToChangeRef:F,thumbs:O.current,values:R,orientation:U,form:V,children:_(O9.Provider,{scope:Z.__scopeSlider,children:_(O9.Slot,{scope:Z.__scopeSlider,children:_(A,{"aria-disabled":Q,"data-disabled":Q?"":void 0,...D,ref:I,onPointerDown:Y0(D.onPointerDown,()=>{if(!Q)b.current=R,B.current=!1}),min:J,max:X,inverted:M,onSlideStart:Q?void 0:a,onSlideMove:Q?void 0:l,onSlideEnd:Q?void 0:Z0,onHomeKeyDown:()=>{if(!Q)B.current=!0,G0(J,0,{commit:!0})},onEndKeyDown:()=>{if(!Q)B.current=!0,G0(X,R.length-1,{commit:!0})},onStepKeyDown:({event:E,direction:i})=>{if(!Q){B.current=!0;let I0=c5.includes(E.key)||E.shiftKey&&p5.includes(E.key)?10:1,u0=F.current,D0=R[u0],w0=xM(D0,{min:J,step:q,direction:i,multiplier:I0});G0(w0,u0,{commit:!0})}}})})})})});i5.displayName=t6;var[s5,r5]=I9(t6,{startEdge:"left",endEdge:"right",size:"width",direction:1}),TM=S((Z,G)=>{let{min:Y,max:J,dir:X,inverted:q,onSlideStart:U,onSlideMove:Q,onSlideEnd:z,onStepKeyDown:H,...j}=Z,[W,L]=x(null),M=n(G,L),V=N(void 0),D=FJ(X),O=D==="ltr",F=O&&!q||!O&&q;function B(K){let A=V.current||W.getBoundingClientRect(),$=[0,A.width],I=R9($,F?[Y,J]:[J,Y]);return V.current=A,I(K-A.left)}return _(s5,{scope:Z.__scopeSlider,startEdge:F?"left":"right",endEdge:F?"right":"left",direction:F?1:-1,size:"width",children:_(a5,{dir:D,"data-orientation":"horizontal",...j,ref:M,style:{...j.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:(K)=>{let A=B(K.clientX);U?.(A)},onSlideMove:(K)=>{let A=B(K.clientX);Q?.(A)},onSlideEnd:()=>{V.current=void 0,z?.()},onStepKeyDown:(K)=>{let $=l5[F?"from-left":"from-right"].includes(K.key);H?.({event:K,direction:$?-1:1})}})})}),_M=S((Z,G)=>{let{min:Y,max:J,inverted:X,onSlideStart:q,onSlideMove:U,onSlideEnd:Q,onStepKeyDown:z,...H}=Z,j=N(null),W=n(G,j),L=N(void 0),M=!X;function V(D){let O=L.current||j.current.getBoundingClientRect(),F=[0,O.height],K=R9(F,M?[J,Y]:[Y,J]);return L.current=O,K(D-O.top)}return _(s5,{scope:Z.__scopeSlider,startEdge:M?"bottom":"top",endEdge:M?"top":"bottom",size:"height",direction:M?1:-1,children:_(a5,{"data-orientation":"vertical",...H,ref:W,style:{...H.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:(D)=>{let O=V(D.clientY);q?.(O)},onSlideMove:(D)=>{let O=V(D.clientY);U?.(O)},onSlideEnd:()=>{L.current=void 0,Q?.()},onStepKeyDown:(D)=>{let F=l5[M?"from-bottom":"from-top"].includes(D.key);z?.({event:D,direction:F?-1:1})}})})}),a5=S((Z,G)=>{let{__scopeSlider:Y,onSlideStart:J,onSlideMove:X,onSlideEnd:q,onHomeKeyDown:U,onEndKeyDown:Q,onStepKeyDown:z,...H}=Z,j=qY(t6,Y);return _(s.span,{...H,ref:G,onKeyDown:Y0(Z.onKeyDown,(W)=>{if(W.key==="Home")U(W),W.preventDefault();else if(W.key==="End")Q(W),W.preventDefault();else if(c5.concat(p5).includes(W.key))z(W),W.preventDefault()}),onPointerDown:Y0(Z.onPointerDown,(W)=>{let L=W.target;if(L.setPointerCapture(W.pointerId),W.preventDefault(),j.thumbs.has(L))L.focus({preventScroll:!0,focusVisible:!1});else J(W)}),onPointerMove:Y0(Z.onPointerMove,(W)=>{if(W.target.hasPointerCapture(W.pointerId))X(W)}),onPointerUp:Y0(Z.onPointerUp,(W)=>{let L=W.target;if(L.hasPointerCapture(W.pointerId))L.releasePointerCapture(W.pointerId),q(W)})})}),o5="SliderTrack",n5=S((Z,G)=>{let{__scopeSlider:Y,...J}=Z,X=qY(o5,Y);return _(s.span,{"data-disabled":X.disabled?"":void 0,"data-orientation":X.orientation,...J,ref:G})});n5.displayName=o5;var $9="SliderRange",t5=S((Z,G)=>{let{__scopeSlider:Y,...J}=Z,X=qY($9,Y),q=r5($9,Y),U=N(null),Q=n(G,U),z=X.values.length,H=X.values.map((L)=>XH(L,X.min,X.max)),j=z>1?Math.min(...H):0,W=100-Math.max(...H);return _(s.span,{"data-orientation":X.orientation,"data-disabled":X.disabled?"":void 0,...J,ref:Q,style:{...Z.style,[q.startEdge]:j+"%",[q.endEdge]:W+"%"}})});t5.displayName=$9;var e5="SliderThumb",[wM,ZH]=I9(e5),GH="SliderThumbProvider";function T9(Z){let{__scopeSlider:G,name:Y,children:J,internal_do_not_use_render:X}=Z,q=qY(GH,G),U=AM(G),[Q,z]=x(null),H=A0(()=>Q?U().findIndex((O)=>O.ref.current===Q):-1,[U,Q]),j=kJ(Q),W=Q?!!q.form||!!Q.closest("form"):!0,L=q.values[H],M=Y??(q.name?q.name+(q.values.length>1?"[]":""):void 0),V=L===void 0?0:XH(L,q.min,q.max);P(()=>{if(Q)return q.thumbs.add(Q),()=>{q.thumbs.delete(Q)}},[Q,q.thumbs]);let D={value:L,name:M,form:q.form,isFormControl:W,index:H,thumb:Q,onThumbChange:z,percent:V,size:j};return _(wM,{scope:G,...D,children:PM(X)?X(D):J})}T9.displayName=GH;var dJ="SliderThumbTrigger",_9=S((Z,G)=>{let{__scopeSlider:Y,...J}=Z,X=qY(dJ,Y),q=r5(dJ,Y),{index:U,value:Q,percent:z,size:H,onThumbChange:j}=ZH(dJ,Y),W=n(G,j),L=NM(U,X.values.length),M=H?.[q.size],V=M?kM(M,z,q.direction):0;return _("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[q.startEdge]:`calc(${z}% + ${V}px)`},children:_(O9.ItemSlot,{scope:Y,children:_(s.span,{role:"slider","aria-label":Z["aria-label"]||L,"aria-valuemin":X.min,"aria-valuenow":Q,"aria-valuemax":X.max,"aria-orientation":X.orientation,"data-orientation":X.orientation,"data-disabled":X.disabled?"":void 0,tabIndex:X.disabled?void 0:0,...J,ref:W,style:Q===void 0?{display:"none"}:Z.style,onFocus:Y0(Z.onFocus,()=>{X.valueIndexToChangeRef.current=U})})})})});_9.displayName=dJ;var YH=S((Z,G)=>{let{__scopeSlider:Y,name:J,...X}=Z;return _(T9,{__scopeSlider:Y,name:J,internal_do_not_use_render:({index:q,isFormControl:U})=>G7(J6,{children:[_(_9,{...X,ref:G,__scopeSlider:Y}),U?_(w9,{__scopeSlider:Y},q):null]})})});YH.displayName=e5;var JH="SliderBubbleInput",w9=S(({__scopeSlider:Z,...G},Y)=>{let{value:J,name:X,form:q}=ZH(JH,Z),U=N(null),Q=n(U,Y),z=CJ(J);return P(()=>{let H=U.current;if(!H)return;let j=window.HTMLInputElement.prototype,L=Object.getOwnPropertyDescriptor(j,"value").set;if(z!==J&&L){let M=new Event("input",{bubbles:!0});L.call(H,J),H.dispatchEvent(M)}},[z,J]),_(s.input,{style:{display:"none"},name:X,form:q,...G,ref:Q,defaultValue:J})});w9.displayName=JH;function RM(Z=[],G,Y){let J=[...Z];return J[Y]=G,J.sort((X,q)=>X-q)}function XH(Z,G,Y){let q=100/(Y-G)*(Z-G);return p6(q,[0,100])}function NM(Z,G){if(G>2)return`Value ${Z+1} of ${G}`;else if(G===2)return["Minimum","Maximum"][Z];else return}function bM(Z,G){if(Z.length===1)return 0;let Y=Z.map((X)=>Math.abs(X-G)),J=Math.min(...Y);return Y.indexOf(J)}function kM(Z,G,Y){let J=Z/2,X=50,q=R9([0,50],[0,J]);return(J-q(G)*Y)*Y}function CM(Z){return Z.slice(0,-1).map((G,Y)=>Z[Y+1]-G)}function SM(Z,G){if(G>0){let Y=CM(Z);return Math.min(...Y)>=G}return!0}function R9(Z,G){return(Y)=>{if(Z[0]===Z[1]||G[0]===G[1])return G[0];let J=(G[1]-G[0])/(Z[1]-Z[0]);return G[0]+J*(Y-Z[0])}}function qH(Z){if(!Number.isFinite(Z))return 0;let G=Z.toString();if(G.includes("e")){let[J,X]=G.split("e"),q=J.split(".")[1]||"",U=Number(X);return Math.max(0,q.length-U)}let Y=G.split(".")[1];return Y?Y.length:0}function cJ(Z,G){let Y=Math.pow(10,G);return Math.round(Z*Y)/Y}function xM(Z,{min:G,step:Y,direction:J,multiplier:X}){let q=qH(Y),U=(Z-G)/Y,Q=Math.round(U),z=cJ(Q*Y+G,q)===cJ(Z,q),H;if(z)H=Q+X*J;else if(J>0)H=Math.ceil(U);else H=Math.floor(U);return cJ(H*Y+G,q)}function PM(Z){return typeof Z==="function"}var DU=v6(Nj(),1);function KU(Z,G){Z.dispatchEvent(new Event(G,{bubbles:!0}))}function bj(Z){return Z.getAttribute("aria-label")||Z.labels?.[0]?.textContent?.trim()||"Control"}function H3(Z,G){let Y=document.createElement("span");Y.className="radix-select-host",Z.insertAdjacentElement("afterend",Y);let J=DU.createRoot(Y),X={host:Y,root:J,render(){let q=Array.from(Z.options).filter((z)=>z.value.length>0).map((z)=>({description:z.title,disabled:z.disabled,label:z.textContent||z.value,value:z.value})),U=q.some((z)=>z.value===Z.value)?Z.value:void 0,Q=Z.options[0]?.textContent||"请选择";J.render(G7(J7.Root,{disabled:Z.disabled,value:U,onValueChange:(z)=>{Z.value=z,KU(Z,"change"),X.render()},children:[G7(J7.Trigger,{className:"radix-select-trigger","aria-label":bj(Z),children:[_(J7.Value,{placeholder:Q}),_(J7.Icon,{className:"radix-select-icon","aria-hidden":"true",children:_("svg",{viewBox:"0 0 24 24",children:_("path",{d:"m7 9 5 5 5-5"})})})]}),_(J7.Portal,{children:_(J7.Content,{className:"radix-select-content",position:"popper",sideOffset:5,children:_(J7.Viewport,{className:"radix-select-viewport",children:q.map((z)=>G7(J7.Item,{className:"radix-select-item",disabled:z.disabled,title:z.description,value:z.value,children:[_(J7.ItemText,{children:z.label}),_(J7.ItemIndicator,{className:"radix-select-indicator","aria-hidden":"true",children:"✓"})]},z.value))})})})]}))}};G.push(X)}function W3(Z,G){let Y=document.createElement("span");Y.className="radix-slider-host",Z.insertAdjacentElement("afterend",Y);let J=DU.createRoot(Y),X={host:Y,root:J,render(){let q=Number(Z.min),U=Number(Z.max),Q=Number(Z.step),z=Number(Z.value);J.render(G7(K6.Root,{"aria-label":bj(Z),className:"radix-slider-root",disabled:Z.disabled,max:Number.isFinite(U)?U:100,min:Number.isFinite(q)?q:0,step:Number.isFinite(Q)&&Q>0?Q:1,value:[Number.isFinite(z)?z:0],onValueChange:([H])=>{if(H===void 0)return;Z.value=String(H),KU(Z,"input"),X.render()},onValueCommit:()=>KU(Z,"change"),children:[_(K6.Track,{className:"radix-slider-track",children:_(K6.Range,{className:"radix-slider-range"})}),_(K6.Thumb,{className:"radix-slider-thumb"})]}))}};G.push(X)}function hO(Z=document){let G=[];return Z.querySelectorAll("select[data-radix-select]").forEach((Y)=>{Y.classList.add("radix-native-control"),Y.hidden=!0,Y.tabIndex=-1,Y.setAttribute("aria-hidden","true"),H3(Y,G)}),Z.querySelectorAll('input[type="range"][data-radix-slider]').forEach((Y)=>{Y.classList.add("radix-native-control"),Y.hidden=!0,Y.tabIndex=-1,Y.setAttribute("aria-hidden","true"),W3(Y,G)}),G.forEach((Y)=>Y.render()),{destroy(){G.forEach((Y)=>{Y.root.unmount(),Y.host.remove()}),G.length=0},sync(){G.forEach((Y)=>Y.render())}}}export{hO as mountRadixControls}; diff --git a/packages/plugins/relight-studio/package/assets/relight-renderer.js b/packages/plugins/relight-studio/package/assets/relight-renderer.js new file mode 100644 index 0000000..7a24a09 --- /dev/null +++ b/packages/plugins/relight-studio/package/assets/relight-renderer.js @@ -0,0 +1,240 @@ +const vertexShaderSource = `#version 300 es +in vec2 aPosition; +in vec2 aUv; +uniform vec2 uScale; +out vec2 vUv; +void main() { + vUv = aUv; + gl_Position = vec4(aPosition * uScale, 0.0, 1.0); +}` + +const fragmentShaderSource = `#version 300 es +precision highp float; +uniform sampler2D uSource; +uniform vec2 uTexel; +uniform vec2 uLightPosition; +uniform vec3 uKeyColor; +uniform vec3 uShadowColor; +uniform vec3 uRimColor; +uniform float uIntensity; +uniform float uSoftness; +uniform float uExposure; +uniform float uTemperature; +uniform float uShadows; +uniform float uContrast; +uniform float uSaturation; +uniform float uVignette; +uniform float uDepth; +uniform float uRim; +uniform float uOriginal; +in vec2 vUv; +out vec4 outputColor; + +float luminance(vec3 color) { + return dot(color, vec3(0.2126, 0.7152, 0.0722)); +} + +void main() { + vec4 source = texture(uSource, vUv); + if (uOriginal > 0.5) { + outputColor = source; + return; + } + + float left = luminance(texture(uSource, vUv - vec2(uTexel.x, 0.0)).rgb); + float right = luminance(texture(uSource, vUv + vec2(uTexel.x, 0.0)).rgb); + float top = luminance(texture(uSource, vUv - vec2(0.0, uTexel.y)).rgb); + float bottom = luminance(texture(uSource, vUv + vec2(0.0, uTexel.y)).rgb); + vec2 gradient = vec2(left - right, top - bottom); + vec3 normal = normalize(vec3(gradient * (1.2 + uDepth * 3.6), 1.45)); + vec2 towardLight = (uLightPosition - vUv) * vec2(1.35, 1.0); + vec3 lightDirection = normalize(vec3(towardLight * 1.7, 0.72)); + float diffuse = max(dot(normal, lightDirection), 0.0); + float distanceToLight = length(towardLight); + float falloff = exp(-distanceToLight * distanceToLight * mix(11.0, 2.0, uSoftness)); + float key = uIntensity * mix(0.18 + diffuse * 0.28, 0.28 + diffuse * 0.24, uSoftness) * (0.5 + falloff * 0.5); + + vec3 linear = pow(max(source.rgb, vec3(0.0)), vec3(2.2)); + float baseLuma = luminance(source.rgb); + float shadowMask = 1.0 - smoothstep(0.08, 0.72, baseLuma); + vec3 ambient = linear * (0.76 + uShadows * 0.3); + vec3 lit = ambient + linear * uKeyColor * key; + lit = mix(lit * uShadowColor, lit, 1.0 - shadowMask * (0.24 - uShadows * 0.14)); + + float edge = clamp(length(gradient) * (1.8 + uDepth * 3.6), 0.0, 1.0); + float rimSide = smoothstep(-0.2, 0.75, dot(normal.xy, -normalize(towardLight + vec2(0.0001)))); + lit += uRimColor * edge * rimSide * uRim * (0.04 + 0.14 * uIntensity); + lit *= exp2(uExposure); + + vec3 warm = vec3(1.12, 0.92, 0.72); + vec3 cool = vec3(0.72, 0.92, 1.13); + vec3 temperatureTint = uTemperature >= 0.0 + ? mix(vec3(1.0), warm, uTemperature) + : mix(vec3(1.0), cool, -uTemperature); + lit *= temperatureTint; + + vec3 graded = pow(max(lit, vec3(0.0)), vec3(1.0 / 2.2)); + graded = (graded - 0.5) * uContrast + 0.5; + float gray = luminance(graded); + graded = mix(vec3(gray), graded, uSaturation); + vec2 centered = vUv - 0.5; + float vignette = smoothstep(0.9, 0.18, dot(centered, centered) * 1.55); + graded *= mix(1.0, vignette, uVignette); + outputColor = vec4(clamp(graded, 0.0, 1.0), source.a); +}` + +function compileShader(gl, type, source) { + const shader = gl.createShader(type) + if (!shader) throw new Error("无法创建 WebGL 着色器") + gl.shaderSource(shader, source) + gl.compileShader(shader) + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + const message = gl.getShaderInfoLog(shader) || "着色器编译失败" + gl.deleteShader(shader) + throw new Error(message) + } + return shader +} + +function createProgram(gl) { + const vertex = compileShader(gl, gl.VERTEX_SHADER, vertexShaderSource) + const fragment = compileShader(gl, gl.FRAGMENT_SHADER, fragmentShaderSource) + const program = gl.createProgram() + if (!program) throw new Error("无法创建 WebGL 程序") + gl.attachShader(program, vertex) + gl.attachShader(program, fragment) + gl.linkProgram(program) + gl.deleteShader(vertex) + gl.deleteShader(fragment) + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + const message = gl.getProgramInfoLog(program) || "着色器链接失败" + gl.deleteProgram(program) + throw new Error(message) + } + return program +} + +function location(gl, program, name) { + const value = gl.getUniformLocation(program, name) + if (value === null) throw new Error("缺少 WebGL uniform: " + name) + return value +} + +export class RelightRenderer { + constructor(canvas) { + this.canvas = canvas + this.gl = null + this.program = null + this.texture = null + this.source = null + this.sourceWidth = 1 + this.sourceHeight = 1 + this.sourceIsVideo = false + this.ready = false + this.contextState = "new" + } + + initialize() { + const gl = this.canvas.getContext("webgl2", { + alpha: false, + antialias: false, + depth: false, + desynchronized: true, + preserveDrawingBuffer: false, + }) + if (!gl) throw new Error("当前图形环境不支持 WebGL2") + this.gl = gl + this.program = createProgram(gl) + const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, 1, 1, 1, 0]) + const buffer = gl.createBuffer() + gl.bindBuffer(gl.ARRAY_BUFFER, buffer) + gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW) + const stride = 4 * Float32Array.BYTES_PER_ELEMENT + const position = gl.getAttribLocation(this.program, "aPosition") + const uv = gl.getAttribLocation(this.program, "aUv") + gl.enableVertexAttribArray(position) + gl.vertexAttribPointer(position, 2, gl.FLOAT, false, stride, 0) + gl.enableVertexAttribArray(uv) + gl.vertexAttribPointer(uv, 2, gl.FLOAT, false, stride, 2 * Float32Array.BYTES_PER_ELEMENT) + this.texture = gl.createTexture() + gl.bindTexture(gl.TEXTURE_2D, this.texture) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR) + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false) + gl.clearColor(0.035, 0.035, 0.045, 1) + this.ready = true + this.contextState = "ready" + } + + setSource(source, dimensions, kind) { + if (!this.gl || !this.texture) throw new Error("重打光渲染器尚未初始化") + this.source = source + this.sourceWidth = dimensions.width + this.sourceHeight = dimensions.height + this.sourceIsVideo = kind === "video" + this.uploadSource() + } + + uploadSource() { + const gl = this.gl + if (!gl || !this.texture || !this.source) return + gl.bindTexture(gl.TEXTURE_2D, this.texture) + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.source) + } + + clearSource() { + this.source = null + this.sourceIsVideo = false + this.render(null) + } + + resize() { + const gl = this.gl + if (!gl) return + const dpr = Math.min(window.devicePixelRatio || 1, 2) + const width = Math.max(1, Math.round(this.canvas.clientWidth * dpr)) + const height = Math.max(1, Math.round(this.canvas.clientHeight * dpr)) + if (this.canvas.width !== width || this.canvas.height !== height) { + this.canvas.width = width + this.canvas.height = height + } + gl.viewport(0, 0, width, height) + } + + render(settings) { + const gl = this.gl + const program = this.program + if (!gl || !program || this.contextState !== "ready") return + this.resize() + gl.clear(gl.COLOR_BUFFER_BIT) + if (!this.source || !settings) return + if (this.sourceIsVideo) this.uploadSource() + gl.useProgram(program) + const outputAspect = this.canvas.width / this.canvas.height + const sourceAspect = this.sourceWidth / this.sourceHeight + const scale = sourceAspect > outputAspect ? [1, outputAspect / sourceAspect] : [sourceAspect / outputAspect, 1] + gl.uniform2f(location(gl, program, "uScale"), scale[0], scale[1]) + gl.uniform2f(location(gl, program, "uTexel"), 1 / this.sourceWidth, 1 / this.sourceHeight) + gl.uniform2f(location(gl, program, "uLightPosition"), settings.lightX, settings.lightY) + gl.uniform3fv(location(gl, program, "uKeyColor"), settings.keyColor) + gl.uniform3fv(location(gl, program, "uShadowColor"), settings.shadowColor) + gl.uniform3fv(location(gl, program, "uRimColor"), settings.rimColor) + gl.uniform1f(location(gl, program, "uIntensity"), settings.intensity) + gl.uniform1f(location(gl, program, "uSoftness"), settings.softness) + gl.uniform1f(location(gl, program, "uExposure"), settings.exposure) + gl.uniform1f(location(gl, program, "uTemperature"), settings.temperature) + gl.uniform1f(location(gl, program, "uShadows"), settings.shadows) + gl.uniform1f(location(gl, program, "uContrast"), settings.contrast) + gl.uniform1f(location(gl, program, "uSaturation"), settings.saturation) + gl.uniform1f(location(gl, program, "uVignette"), settings.vignette) + gl.uniform1f(location(gl, program, "uDepth"), settings.depth) + gl.uniform1f(location(gl, program, "uRim"), settings.rim) + gl.uniform1f(location(gl, program, "uOriginal"), settings.showOriginal ? 1 : 0) + gl.activeTexture(gl.TEXTURE0) + gl.bindTexture(gl.TEXTURE_2D, this.texture) + gl.uniform1i(location(gl, program, "uSource"), 0) + gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4) + } +} diff --git a/packages/plugins/relight-studio/package/assets/styles.css b/packages/plugins/relight-studio/package/assets/styles.css new file mode 100644 index 0000000..f1df7e5 --- /dev/null +++ b/packages/plugins/relight-studio/package/assets/styles.css @@ -0,0 +1,1147 @@ +:root { + color-scheme: dark; + font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + font-synthesis: none; + --bg: #0b0b0e; + --panel: #121216; + --panel-raised: #18181e; + --line: rgba(255, 255, 255, 0.09); + --line-strong: rgba(255, 255, 255, 0.16); + --text: #f6f5f3; + --muted: #94939b; + --accent: #ffb94a; + --accent-strong: #ffd07a; + --accent-soft: rgba(255, 185, 74, 0.13); + --danger: #ff7474; + --success: #5bdda8; +} + +* { + box-sizing: border-box; +} + +html, +body { + width: 100%; + height: 100%; + margin: 0; + overflow: hidden; + background: var(--bg); + color: var(--text); +} + +button, +input, +select, +textarea { + font: inherit; +} + +button { + color: inherit; +} + +button:focus-visible, +input:focus-visible, +select:focus-visible, +textarea:focus-visible, +[tabindex]:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; +} + +#fileInput { + display: none; +} + +.app-shell { + display: flex; + width: 100%; + height: 100%; + min-width: 620px; + flex-direction: column; + background: + radial-gradient(circle at 22% -20%, rgba(255, 170, 55, 0.12), transparent 34%), + linear-gradient(160deg, #0e0e12, #09090b 68%); +} + +.topbar { + z-index: 5; + display: flex; + min-height: 64px; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid var(--line); + padding: 0 18px; + background: rgba(12, 12, 15, 0.88); + backdrop-filter: blur(14px); +} + +.brand, +.topbar-actions, +.source-actions, +.empty-actions, +.preview-toolbar { + display: flex; + align-items: center; +} + +.brand { + gap: 11px; +} + +.brand-mark { + display: grid; + width: 38px; + height: 38px; + place-items: center; + border: 1px solid rgba(255, 205, 119, 0.24); + border-radius: 11px; + background: linear-gradient(145deg, rgba(255, 195, 86, 0.2), rgba(255, 139, 52, 0.05)); + box-shadow: inset 0 0 18px rgba(255, 183, 70, 0.08), 0 6px 24px rgba(0, 0, 0, 0.26); +} + +.brand-mark svg { + width: 27px; + fill: none; + stroke: var(--accent-strong); + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 1.5; +} + +.brand-title { + font-size: 16px; + font-weight: 680; + letter-spacing: 0.02em; +} + +.brand-subtitle { + margin-top: 3px; + color: #777780; + font-size: 9px; + font-weight: 650; + letter-spacing: 0.12em; +} + +.topbar-actions { + gap: 8px; +} + +.connection-pill { + display: inline-flex; + min-height: 30px; + align-items: center; + gap: 7px; + border: 1px solid var(--line); + border-radius: 999px; + padding: 0 11px; + color: var(--muted); + background: rgba(255, 255, 255, 0.035); + font-size: 11px; +} + +.connection-dot { + width: 6px; + height: 6px; + border-radius: 50%; + background: #777780; +} + +.connection-pill.is-connected { + color: #c8eedf; + border-color: rgba(93, 223, 170, 0.18); + background: rgba(42, 171, 119, 0.08); +} + +.connection-pill.is-connected .connection-dot { + background: var(--success); + box-shadow: 0 0 9px rgba(91, 221, 168, 0.72); +} + +.icon-button { + display: grid; + width: 32px; + height: 32px; + cursor: pointer; + place-items: center; + border: 1px solid var(--line); + border-radius: 9px; + background: rgba(255, 255, 255, 0.035); + transition: border-color 140ms ease, background 140ms ease, transform 140ms ease; +} + +.icon-button:hover { + border-color: var(--line-strong); + background: rgba(255, 255, 255, 0.07); + transform: translateY(-1px); +} + +.icon-button svg { + width: 16px; + fill: none; + stroke: currentColor; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 1.7; +} + +.fullscreen-exit { + display: none; +} + +.is-fullscreen .fullscreen-enter { + display: none; +} + +.is-fullscreen .fullscreen-exit { + display: block; +} + +.workspace { + display: grid; + min-height: 0; + flex: 1; + grid-template-columns: minmax(0, 1fr) 348px; + gap: 12px; + padding: 12px; +} + +.preview-panel, +.control-panel { + min-height: 0; + border: 1px solid var(--line); + border-radius: 15px; + background: rgba(18, 18, 22, 0.92); + box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22); +} + +.preview-panel { + display: grid; + overflow: hidden; + grid-template-rows: minmax(0, 1fr) 55px; +} + +.preview { + position: relative; + min-height: 0; + overflow: hidden; + background: + linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), + linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px), + radial-gradient(circle at 50% 42%, #25252b, #0a0a0d 72%); + background-size: 30px 30px, 30px 30px, auto; +} + +.preview::after { + position: absolute; + inset: 0; + border: 1px solid rgba(255, 255, 255, 0.035); + content: ""; + pointer-events: none; +} + +#relightCanvas { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + opacity: 0; + transition: opacity 220ms ease; +} + +.preview.has-source #relightCanvas { + opacity: 1; +} + +.preview-glow { + position: absolute; + width: 280px; + height: 280px; + border-radius: 50%; + background: radial-gradient(circle, rgba(255, 183, 76, 0.09), transparent 67%); + filter: blur(18px); + pointer-events: none; + transform: translate(-42%, -42%); +} + +.preview.has-source .preview-glow { + display: none; +} + +.empty-state { + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + padding: 26px; + text-align: center; +} + +.empty-light { + position: relative; + width: 104px; + height: 104px; + margin-bottom: 8px; +} + +.empty-light svg { + position: relative; + z-index: 1; + width: 100%; + fill: rgba(255, 255, 255, 0.025); + stroke: #8c8990; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 1.6; + filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32)); +} + +.empty-light circle { + fill: rgba(255, 190, 85, 0.28); + stroke: var(--accent-strong); +} + +.empty-beam { + position: absolute; + inset: 16px; + border-radius: 50%; + background: rgba(255, 186, 72, 0.25); + box-shadow: 0 0 38px rgba(255, 177, 61, 0.34), 0 0 80px rgba(255, 152, 36, 0.14); + animation: breathe 2.8s ease-in-out infinite; +} + +.empty-eyebrow, +.section-kicker { + color: var(--accent); + font-size: 9px; + font-weight: 720; + letter-spacing: 0.18em; +} + +.empty-state h1 { + margin: 9px 0 7px; + font-size: 22px; + font-weight: 660; +} + +.empty-state p { + max-width: 440px; + margin: 0; + color: var(--muted); + font-size: 12px; + line-height: 1.65; +} + +.empty-actions { + margin-top: 17px; + gap: 8px; +} + +.primary-button, +.secondary-button, +.compare-button, +.text-button, +.generate-button { + cursor: pointer; + border: 0; + transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease; +} + +.primary-button { + min-height: 36px; + border-radius: 10px; + padding: 0 17px; + color: #211508; + background: linear-gradient(135deg, #ffd177, #f2a83e); + box-shadow: 0 8px 24px rgba(235, 151, 37, 0.2); + font-size: 12px; + font-weight: 680; +} + +.primary-button:hover, +.generate-button:not(:disabled):hover { + transform: translateY(-1px); + background: linear-gradient(135deg, #ffdc92, #ffb54e); +} + +.primary-button:disabled, +.secondary-button:disabled, +.generate-button:disabled, +select:disabled, +textarea:disabled { + cursor: not-allowed; + opacity: 0.45; +} + +.feature-tags { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 6px; + margin-top: 20px; +} + +.feature-tags span { + border: 1px solid var(--line); + border-radius: 999px; + padding: 4px 9px; + color: #85848c; + background: rgba(255, 255, 255, 0.025); + font-size: 10px; +} + +.light-handle { + position: absolute; + z-index: 4; + width: 36px; + height: 36px; + cursor: grab; + touch-action: none; + transform: translate(-50%, -50%); + transition: opacity 150ms ease; +} + +.light-handle::before { + position: absolute; + top: 50%; + left: 50%; + width: 90px; + height: 90px; + border-radius: 50%; + background: radial-gradient(circle, rgba(255, 216, 139, 0.3), rgba(255, 180, 61, 0.08) 36%, transparent 70%); + content: ""; + pointer-events: none; + transform: translate(-50%, -50%); +} + +.light-handle-core { + position: absolute; + inset: 12px; + border-radius: 50%; + background: #fff3cf; + box-shadow: 0 0 15px #ffc45e; +} + +.light-handle-ring { + position: absolute; + inset: 4px; + border: 1px solid rgba(255, 229, 175, 0.8); + border-radius: 50%; + box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.18); +} + +.light-handle.is-dragging { + cursor: grabbing; + transform: translate(-50%, -50%) scale(1.08); +} + +.preview.showing-original .light-handle { + opacity: 0.22; +} + +.preview-toolbar { + position: absolute; + z-index: 4; + right: 14px; + bottom: 13px; + gap: 8px; +} + +.compare-button { + display: inline-flex; + min-height: 31px; + align-items: center; + gap: 7px; + border: 1px solid rgba(255, 255, 255, 0.13); + border-radius: 9px; + padding: 0 10px; + background: rgba(11, 11, 14, 0.72); + backdrop-filter: blur(10px); + font-size: 10px; +} + +.compare-button:hover, +.compare-button[aria-pressed="true"] { + border-color: rgba(255, 196, 100, 0.4); + background: rgba(54, 38, 18, 0.78); +} + +.compare-button svg { + width: 14px; + fill: none; + stroke: currentColor; + stroke-width: 1.6; +} + +.preview-badge { + border: 1px solid rgba(255, 255, 255, 0.08); + border-radius: 8px; + padding: 7px 9px; + color: #a09fa6; + background: rgba(11, 11, 14, 0.64); + backdrop-filter: blur(10px); + font-size: 9px; +} + +.loading-state, +.drag-hint { + position: absolute; + z-index: 8; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + gap: 9px; + background: rgba(7, 7, 9, 0.78); + backdrop-filter: blur(9px); + font-size: 12px; +} + +.drag-hint { + inset: 12px; + border: 1px dashed rgba(255, 193, 89, 0.56); + border-radius: 13px; + color: var(--accent-strong); + background: rgba(31, 22, 10, 0.82); +} + +.spinner { + width: 17px; + height: 17px; + border: 2px solid rgba(255, 255, 255, 0.15); + border-top-color: var(--accent); + border-radius: 50%; + animation: spin 0.8s linear infinite; +} + +.source-bar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + border-top: 1px solid var(--line); + padding: 0 13px 0 16px; + background: rgba(17, 17, 21, 0.96); +} + +.source-copy { + min-width: 0; + display: flex; + flex-direction: column; + gap: 3px; +} + +.source-label { + color: #777680; + font-size: 9px; + font-weight: 680; + letter-spacing: 0.1em; +} + +.source-status { + max-width: min(42vw, 500px); + overflow: hidden; + color: #c1c0c5; + font-size: 10px; + text-overflow: ellipsis; + white-space: nowrap; +} + +.source-actions { + min-width: 0; + gap: 7px; +} + +.secondary-button { + flex: none; + min-height: 31px; + border: 1px solid var(--line); + border-radius: 9px; + padding: 0 11px; + background: rgba(255, 255, 255, 0.04); + font-size: 10px; +} + +.secondary-button:hover { + border-color: var(--line-strong); + background: rgba(255, 255, 255, 0.075); +} + +.select-shell, +.generation-select-shell { + position: relative; + display: flex; + align-items: center; +} + +.select-shell { + max-width: 190px; +} + +.radix-select-host { + display: block; + min-width: 0; + width: 100%; +} + +.radix-select-trigger { + display: flex; + width: 100%; + cursor: pointer; + align-items: center; + justify-content: space-between; + gap: 8px; + width: 100%; + border: 1px solid var(--line); + border-radius: 9px; + overflow: hidden; + color: #c2c1c6; + background: #19191e; + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; +} + +.select-shell .radix-select-trigger { + min-height: 31px; + padding: 0 9px 0 10px; + font-size: 10px; +} + +.radix-select-icon { + display: inline-flex; + flex: none; +} + +.radix-select-icon svg { + width: 13px; + fill: none; + stroke: #8b8a91; + stroke-width: 1.8; + pointer-events: none; +} + +.radix-select-trigger:hover, +.radix-select-trigger[data-state="open"] { + border-color: var(--line-strong); + background: #202026; +} + +.radix-select-trigger[data-disabled] { + cursor: not-allowed; + opacity: 0.48; +} + +.radix-select-content { + z-index: 120; + min-width: var(--radix-select-trigger-width); + max-height: min(280px, var(--radix-select-content-available-height)); + overflow: hidden; + border: 1px solid var(--line-strong); + border-radius: 10px; + color: #d8d7db; + background: rgba(27, 27, 32, 0.98); + box-shadow: 0 16px 44px rgba(0, 0, 0, 0.46); + backdrop-filter: blur(18px); +} + +.radix-select-viewport { + padding: 4px; +} + +.radix-select-item { + position: relative; + display: flex; + min-height: 31px; + cursor: pointer; + align-items: center; + border-radius: 7px; + padding: 0 30px 0 9px; + outline: none; + font-size: 10px; + user-select: none; +} + +.radix-select-item[data-highlighted] { + color: #fff4df; + background: rgba(255, 185, 74, 0.13); +} + +.radix-select-item[data-disabled] { + pointer-events: none; + opacity: 0.42; +} + +.radix-select-indicator { + position: absolute; + right: 9px; + color: var(--accent-strong); +} + +.control-panel { + overflow-x: hidden; + overflow-y: auto; + scrollbar-color: #37363d transparent; + scrollbar-width: thin; +} + +.control-section { + padding: 18px 17px; +} + +.control-section + .control-section { + border-top: 1px solid var(--line); +} + +.section-heading { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 12px; + margin-bottom: 15px; +} + +.section-heading.compact { + margin-bottom: 12px; +} + +.section-heading h2 { + margin: 5px 0 0; + font-size: 14px; + font-weight: 650; +} + +.text-button { + border-radius: 7px; + padding: 5px 7px; + color: #8f8e95; + background: transparent; + font-size: 10px; +} + +.text-button:hover { + color: var(--accent-strong); + background: var(--accent-soft); +} + +.preset-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 7px; +} + +.preset-card { + display: flex; + min-width: 0; + min-height: 43px; + cursor: pointer; + align-items: center; + gap: 8px; + border: 1px solid var(--line); + border-radius: 10px; + padding: 6px 8px; + color: inherit; + background: rgba(255, 255, 255, 0.025); + font-size: 10px; + text-align: left; + transition: border-color 140ms ease, background 140ms ease, transform 140ms ease; +} + +.preset-card:hover { + border-color: var(--line-strong); + background: rgba(255, 255, 255, 0.05); + transform: translateY(-1px); +} + +.preset-card.is-active { + border-color: rgba(255, 190, 83, 0.46); + background: var(--accent-soft); + box-shadow: inset 0 0 0 1px rgba(255, 198, 105, 0.05); +} + +.preset-swatch { + flex: none; + width: 28px; + height: 28px; + border: 1px solid rgba(255, 255, 255, 0.13); + border-radius: 8px; + box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.09); +} + +.swatch-cinematic { background: linear-gradient(135deg, #e79a4e, #162b4e 65%, #5bc9df); } +.swatch-studio { background: radial-gradient(circle at 35% 30%, #fff5dd, #9a9da6 48%, #30333c); } +.swatch-sunset { background: linear-gradient(135deg, #ffe091, #ef7d46 48%, #713c72); } +.swatch-neon { background: linear-gradient(135deg, #19d7e8, #272055 48%, #f329a7); } +.swatch-moonlight { background: linear-gradient(135deg, #a7c7ff, #3b5087 48%, #12182e); } +.swatch-natural { background: linear-gradient(135deg, #e7ddbd, #8fa588 48%, #52616c); } + +.slider-list { + display: flex; + flex-direction: column; + gap: 12px; +} + +.slider-row { + display: grid; + grid-template-columns: 74px minmax(0, 1fr) 42px; + align-items: center; + gap: 8px; + color: #a7a6ac; + font-size: 10px; +} + +.slider-row output { + color: #d2d1d5; + font-variant-numeric: tabular-nums; + text-align: right; +} + +input[type="range"] { + width: 100%; + height: 16px; + margin: 0; + appearance: none; + background: transparent; + cursor: pointer; +} + +input[type="range"]::-webkit-slider-runnable-track { + height: 3px; + border-radius: 999px; + background: linear-gradient(to right, var(--accent) var(--range-progress), #36363d var(--range-progress)); +} + +input[type="range"]::-webkit-slider-thumb { + width: 12px; + height: 12px; + margin-top: -4.5px; + appearance: none; + border: 2px solid #1a1815; + border-radius: 50%; + background: #ffd37f; + box-shadow: 0 0 0 1px rgba(255, 207, 120, 0.36); +} + +input[type="range"]:hover::-webkit-slider-thumb { + background: #ffe1a7; + transform: scale(1.08); +} + +.radix-native-control { + position: absolute !important; + width: 1px !important; + height: 1px !important; + margin: -1px !important; + overflow: hidden !important; + clip: rect(0, 0, 0, 0) !important; + clip-path: inset(50%) !important; + pointer-events: none !important; + white-space: nowrap !important; +} + +.radix-slider-host { + display: flex; + width: 100%; + min-width: 0; + align-items: center; +} + +.radix-slider-root { + position: relative; + display: flex; + width: 100%; + height: 18px; + cursor: pointer; + touch-action: none; + align-items: center; + user-select: none; +} + +.radix-slider-root[data-disabled] { + cursor: not-allowed; + opacity: 0.48; +} + +.radix-slider-track { + position: relative; + flex: 1; + height: 3px; + overflow: hidden; + border-radius: 999px; + background: #36363d; +} + +.radix-slider-range { + position: absolute; + height: 100%; + border-radius: inherit; + background: var(--accent); +} + +.radix-slider-thumb { + display: block; + width: 12px; + height: 12px; + border: 2px solid #1a1815; + border-radius: 50%; + outline: none; + background: #ffd37f; + box-shadow: 0 0 0 1px rgba(255, 207, 120, 0.36); + transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease; +} + +.radix-slider-thumb:hover, +.radix-slider-thumb:focus-visible { + background: #ffe1a7; + box-shadow: 0 0 0 3px rgba(255, 185, 74, 0.2); + transform: scale(1.08); +} + +.generation-section { + background: linear-gradient(160deg, rgba(255, 182, 68, 0.04), transparent 58%); +} + +.generation-status { + flex: none; + margin-top: 2px; + border: 1px solid var(--line); + border-radius: 999px; + padding: 4px 7px; + color: #8f8e95; + background: rgba(255, 255, 255, 0.025); + font-size: 9px; +} + +.field-label { + display: block; + margin: 10px 0 6px; + color: #8d8c94; + font-size: 9px; + font-weight: 650; + letter-spacing: 0.04em; +} + +.generation-select-shell .radix-select-trigger { + min-height: 36px; + padding: 0 10px 0 11px; + font-size: 10px; +} + +textarea { + width: 100%; + min-height: 66px; + resize: vertical; + border: 1px solid var(--line); + border-radius: 9px; + padding: 9px 10px; + color: #d5d4d8; + background: #151519; + font-size: 10px; + line-height: 1.5; +} + +textarea::placeholder { + color: #616069; +} + +.generate-button { + display: grid; + width: 100%; + min-height: 40px; + place-items: center; + margin-top: 12px; + border-radius: 10px; + color: #211508; + background: linear-gradient(135deg, #ffd177, #f2a83e); + box-shadow: 0 8px 24px rgba(235, 151, 37, 0.16); + font-size: 11px; + font-weight: 720; +} + +.generate-button-busy { + display: none; + align-items: center; + gap: 8px; +} + +.generate-button-busy .spinner { + width: 14px; + height: 14px; + border-color: rgba(32, 21, 8, 0.22); + border-top-color: #2c1d0b; +} + +.generate-button.is-busy .generate-button-label { + display: none; +} + +.generate-button.is-busy .generate-button-busy { + display: inline-flex; +} + +.generation-help { + margin: 9px 1px 0; + color: #777680; + font-size: 9px; + line-height: 1.55; +} + +.generation-result { + margin-top: 10px; + border: 1px solid rgba(91, 221, 168, 0.2); + border-radius: 9px; + padding: 9px 10px; + color: #bcebd8; + background: rgba(36, 142, 99, 0.08); + font-size: 9px; + line-height: 1.5; +} + +.generation-result[data-kind="error"] { + border-color: rgba(255, 116, 116, 0.24); + color: #ffc0c0; + background: rgba(110, 37, 43, 0.1); +} + +.notice-card { + display: flex; + gap: 9px; + margin: 0 13px 16px; + border: 1px solid rgba(255, 190, 83, 0.15); + border-radius: 11px; + padding: 11px; + color: #a9a6a0; + background: rgba(255, 181, 65, 0.055); +} + +.notice-card svg { + flex: none; + width: 15px; + margin-top: 1px; + fill: none; + stroke: #dca651; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 1.6; +} + +.notice-card strong { + display: block; + color: #d9c29a; + font-size: 10px; + font-weight: 650; +} + +.notice-card p { + margin: 4px 0 0; + font-size: 9px; + line-height: 1.55; +} + +.toast { + position: fixed; + z-index: 50; + right: 18px; + bottom: 17px; + max-width: min(380px, calc(100vw - 36px)); + border: 1px solid var(--line-strong); + border-radius: 10px; + padding: 10px 13px; + color: #dddce0; + background: rgba(27, 27, 32, 0.96); + box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38); + font-size: 11px; + line-height: 1.45; + backdrop-filter: blur(14px); +} + +.toast[data-kind="error"] { + border-color: rgba(255, 116, 116, 0.3); + color: #ffc0c0; + background: rgba(46, 21, 24, 0.96); +} + +.toast[data-kind="warning"] { + border-color: rgba(255, 190, 83, 0.28); + color: #ffe0aa; + background: rgba(49, 34, 14, 0.96); +} + +.is-hidden { + display: none !important; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; +} + +@keyframes spin { + to { transform: rotate(360deg); } +} + +@keyframes breathe { + 50% { + opacity: 0.64; + transform: scale(0.88); + } +} + +@media (max-width: 900px) { + .workspace { + grid-template-columns: minmax(0, 1fr) 304px; + } + + .control-section { + padding-inline: 13px; + } + + .preset-card { + padding-inline: 6px; + } + + .preview-badge { + display: none; + } +} + +@media (max-height: 650px) { + .topbar { + min-height: 54px; + } + + .workspace { + padding: 8px; + gap: 8px; + } + + .control-section { + padding-block: 12px; + } + + .slider-list { + gap: 7px; + } + + .notice-card { + display: none; + } +} + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + scroll-behavior: auto !important; + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} diff --git a/packages/plugins/relight-studio/package/index.html b/packages/plugins/relight-studio/package/index.html new file mode 100644 index 0000000..856b51c --- /dev/null +++ b/packages/plugins/relight-studio/package/index.html @@ -0,0 +1,198 @@ + + + + + + 重打光 + + + + + +
+
+
+ +
+
重打光
+
RELIGHT STUDIO · 灯光预览与 AI 生成
+
+
+
+ + + 等待宿主 + + + +
+
+ +
+
+
+ + +
+ +
LIGHTING WORKBENCH
+

连接一张 Canvas 图片

+

将图片节点连接到此插件即可预览并生成。也可临时载入本地图片,只用于灯光预览。

+
+ +
+
+ 光影图片日落霓虹电影感 +
+
+ + + + + +
+ +
+
+ 输入图片 + 尚未载入 +
+
+ + +
+
+
+ + +
+ + + +
+ + diff --git a/packages/plugins/relight-studio/package/manifest.json b/packages/plugins/relight-studio/package/manifest.json new file mode 100644 index 0000000..8028282 --- /dev/null +++ b/packages/plugins/relight-studio/package/manifest.json @@ -0,0 +1,24 @@ +{ + "schema": "convax.plugin/3", + "id": "relight-studio", + "name": "重打光", + "description": "连接一张 Canvas 图片,通过宿主统一的 AI 生图能力生成不同主光方向、色温与电影氛围的重打光结果。", + "version": "0.1.1", + "entry": "index.html", + "capabilities": [ + "canvas.connectedImages.read", + "canvas.node.write", + "generation.execute", + "ui.fullscreen" + ], + "contributes": { + "canvas": { + "renderer": { + "create": true, + "width": 1080, + "height": 720 + } + } + }, + "skill": "SKILL.md" +} diff --git a/packages/plugins/relight-studio/scripts/build.ts b/packages/plugins/relight-studio/scripts/build.ts new file mode 100644 index 0000000..29bbd9e --- /dev/null +++ b/packages/plugins/relight-studio/scripts/build.ts @@ -0,0 +1,31 @@ +import path from "node:path" + +const packageRoot = path.resolve(import.meta.dir, "..") +const result = await Bun.build({ + define: { "process.env.NODE_ENV": JSON.stringify("production") }, + entrypoints: [path.join(packageRoot, "src", "radix-controls.tsx")], + format: "esm", + minify: true, + target: "browser", +}) + +if (!result.success || result.outputs.length !== 1) { + result.logs.forEach((message) => console.error(message)) + throw new Error("Relight Studio Radix bundle failed") +} + +let source = await result.outputs[0]!.text() +source = source + // React's production diagnostics do not make network requests, but Plugin + // packages fail closed on every literal remote URL. Keep the diagnostic local. + .replaceAll("https://react.dev/errors/", "react-error:") + // React DOM needs these namespace values at runtime. Split the literals so + // static package validation cannot mistake standards identifiers for fetches. + .replaceAll('"http://www.w3.org/1998/Math/MathML"', '"http"+"://www.w3.org/1998/Math/MathML"') + .replaceAll('"http://www.w3.org/1999/xlink"', '"http"+"://www.w3.org/1999/xlink"') + .replaceAll('"http://www.w3.org/2000/svg"', '"http"+"://www.w3.org/2000/svg"') + .replaceAll('"http://www.w3.org/XML/1998/namespace"', '"http"+"://www.w3.org/XML/1998/namespace"') + .replace(/[ \t]+$/gmu, "") + +if (/https?:\/\//iu.test(source)) throw new Error("Relight Studio bundle contains a remote URL") +await Bun.write(path.join(packageRoot, "package", "assets", "radix-controls.js"), source) diff --git a/packages/plugins/relight-studio/src/radix-controls.tsx b/packages/plugins/relight-studio/src/radix-controls.tsx new file mode 100644 index 0000000..393d2d6 --- /dev/null +++ b/packages/plugins/relight-studio/src/radix-controls.tsx @@ -0,0 +1,153 @@ +import { Select, Slider } from "radix-ui" +import { createRoot, type Root } from "react-dom/client" + +interface MountedControl { + host: HTMLElement + render(): void + root: Root +} + +export interface RadixControls { + destroy(): void + sync(): void +} + +function dispatchNativeControl(element: HTMLElement, type: "change" | "input") { + element.dispatchEvent(new Event(type, { bubbles: true })) +} + +function labelFor(element: HTMLInputElement | HTMLSelectElement) { + return element.getAttribute("aria-label") || element.labels?.[0]?.textContent?.trim() || "Control" +} + +function mountSelect(select: HTMLSelectElement, controls: MountedControl[]) { + const host = document.createElement("span") + host.className = "radix-select-host" + select.insertAdjacentElement("afterend", host) + const root = createRoot(host) + const mounted: MountedControl = { + host, + root, + render() { + const options = Array.from(select.options) + .filter((option) => option.value.length > 0) + .map((option) => ({ + description: option.title, + disabled: option.disabled, + label: option.textContent || option.value, + value: option.value, + })) + const selected = options.some((option) => option.value === select.value) ? select.value : undefined + const placeholder = select.options[0]?.textContent || "请选择" + root.render( + { + select.value = value + dispatchNativeControl(select, "change") + mounted.render() + }} + > + + + + + + + + {options.map((option) => ( + + {option.label} + + + ))} + + + + , + ) + }, + } + controls.push(mounted) +} + +function mountSlider(input: HTMLInputElement, controls: MountedControl[]) { + const host = document.createElement("span") + host.className = "radix-slider-host" + input.insertAdjacentElement("afterend", host) + const root = createRoot(host) + const mounted: MountedControl = { + host, + root, + render() { + const minimum = Number(input.min) + const maximum = Number(input.max) + const step = Number(input.step) + const value = Number(input.value) + root.render( + 0 ? step : 1} + value={[Number.isFinite(value) ? value : 0]} + onValueChange={([next]) => { + if (next === undefined) return + input.value = String(next) + dispatchNativeControl(input, "input") + mounted.render() + }} + onValueCommit={() => dispatchNativeControl(input, "change")} + > + + + + + , + ) + }, + } + controls.push(mounted) +} + +export function mountRadixControls(scope: ParentNode = document): RadixControls { + const controls: MountedControl[] = [] + scope.querySelectorAll("select[data-radix-select]").forEach((select) => { + select.classList.add("radix-native-control") + select.hidden = true + select.tabIndex = -1 + select.setAttribute("aria-hidden", "true") + mountSelect(select, controls) + }) + scope.querySelectorAll('input[type="range"][data-radix-slider]').forEach((input) => { + input.classList.add("radix-native-control") + input.hidden = true + input.tabIndex = -1 + input.setAttribute("aria-hidden", "true") + mountSlider(input, controls) + }) + controls.forEach((control) => control.render()) + return { + destroy() { + controls.forEach((control) => { + control.root.unmount() + control.host.remove() + }) + controls.length = 0 + }, + sync() { + controls.forEach((control) => control.render()) + }, + } +} diff --git a/registry/config.json b/registry/config.json index ea67b52..e70fea7 100644 --- a/registry/config.json +++ b/registry/config.json @@ -1,4 +1,4 @@ { - "sequence": 24, + "sequence": 25, "yanked": [] } diff --git a/tooling/registry.test.js b/tooling/registry.test.js index 910c6ac..f12d230 100644 --- a/tooling/registry.test.js +++ b/tooling/registry.test.js @@ -35,6 +35,7 @@ describe("source packages", () => { expect(packages.map((pkg) => `${pkg.metadata.kind}/${pkg.metadata.id}`)).toEqual([ "plugin/ffmpeg-tools", "plugin/hello-convax", + "plugin/relight-studio", "plugin/xiaoyunque-generation", "skill/ad-idea", "skill/audiobook", diff --git a/tooling/relight-studio.test.js b/tooling/relight-studio.test.js new file mode 100644 index 0000000..07d7aa5 --- /dev/null +++ b/tooling/relight-studio.test.js @@ -0,0 +1,200 @@ +import { describe, expect, test } from "bun:test" +import { promises as fs } from "node:fs" +import path from "node:path" + +import { + buildRelightGenerationRequest, + normalizeGenerationTools, +} from "../packages/plugins/relight-studio/package/assets/generation.js" +import { + assertPluginStatic, + collectFiles, + parsePluginManifest, + parseSourceMetadata, + readJson, + root, +} from "./lib.mjs" + +const sourceRoot = path.join(root, "packages", "plugins", "relight-studio") +const packageRoot = path.join(sourceRoot, "package") + +describe("relight-studio package", () => { + test("declares a v3 Web caller of the shared generation executor", async () => { + const metadata = parseSourceMetadata( + await readJson(path.join(sourceRoot, "convax-package.json")), + "plugin/relight-studio", + ) + const manifest = parsePluginManifest( + await readJson(path.join(packageRoot, "manifest.json")), + "plugin/relight-studio manifest", + ) + + expect(metadata).toEqual({ + schema: "convax.package/1", + kind: "plugin", + id: "relight-studio", + name: "重打光", + description: manifest.description, + version: "0.1.1", + license: "MIT", + compatibility: { + pluginSchema: "convax.plugin/3", + pluginHost: "convax.plugin-host/3", + }, + yanked: false, + }) + expect(manifest).toEqual(expect.objectContaining({ + schema: "convax.plugin/3", + id: metadata.id, + name: metadata.name, + description: metadata.description, + version: metadata.version, + entry: "index.html", + capabilities: [ + "canvas.connectedImages.read", + "canvas.node.write", + "generation.execute", + "ui.fullscreen", + ], + skill: "SKILL.md", + })) + expect(manifest.contributes).toEqual({ + canvas: { + renderer: { create: true, width: 1080, height: 720 }, + }, + }) + expect(manifest).not.toHaveProperty("runtime") + expect(manifest.contributes).not.toHaveProperty("generation") + expect(metadata).not.toHaveProperty("companions") + }) + + test("selects only generic reference-image generation tools", () => { + expect(normalizeGenerationTools({ + tools: [ + { + id: "example-vendor/image-a", + title: "Image A", + description: "Accepts image references.", + kind: "model", + output: "image", + acceptedInputs: ["reference_image"], + }, + { + id: "example-vendor/image-without-reference", + title: "Prompt-only image", + kind: "model", + output: "image", + acceptedInputs: [], + }, + { + id: "example-vendor/video-a", + title: "Video A", + kind: "model", + output: "video", + acceptedInputs: ["reference_image"], + }, + { + id: "example-vendor/image-operation", + title: "Image operation", + kind: "operation", + output: "image", + acceptedInputs: ["reference_image"], + }, + { + id: "example-vendor/image-a", + title: "Duplicate Image A", + kind: "model", + output: "image", + acceptedInputs: ["reference_image"], + }, + ], + })).toEqual([{ + id: "example-vendor/image-a", + title: "Image A", + description: "Accepts image references.", + }]) + }) + + test("drains Plugin state before requesting a pending Canvas generation node", async () => { + const request = buildRelightGenerationRequest({ + prompt: "Relight this image.", + referenceNodeId: "source-image", + toolId: "example-vendor/image-a", + }) + expect(request).toEqual({ + output: "image", + prompt: "Relight this image.", + references: [{ nodeId: "source-image", role: "reference_image" }], + resultMode: "create-pending-node", + toolId: "example-vendor/image-a", + }) + expect(request).not.toHaveProperty("nodeId") + + const app = await fs.readFile(path.join(packageRoot, "assets", "app.js"), "utf8") + const generateStart = app.indexOf("async function generateRelight()") + const generateEnd = app.indexOf("\nfunction bindControls()", generateStart) + expect(generateStart).toBeGreaterThanOrEqual(0) + expect(generateEnd).toBeGreaterThan(generateStart) + const generate = app.slice(generateStart, generateEnd) + const drainIndex = generate.indexOf("await drainStateSave()") + const executeIndex = generate.indexOf('hostRequest(\n "generation.canvas.execute"') + expect(drainIndex).toBeGreaterThanOrEqual(0) + expect(executeIndex).toBeGreaterThan(drainIndex) + expect(generate.slice(0, executeIndex)).not.toContain("void flushStateSave()") + expect(generate.slice(executeIndex)).toContain("void flushStateSave()") + + const queueStart = app.indexOf("function queueStateSave()") + const queueEnd = app.indexOf("\nasync function flushStateSave", queueStart) + expect(app.slice(queueStart, queueEnd)).toContain("if (generationInFlight) return") + const flushStart = queueEnd + const flushEnd = app.indexOf("\nasync function drainStateSave", flushStart) + expect(app.slice(flushStart, flushEnd)).toContain("(!allowDuringGeneration && generationInFlight)") + }) + + test("ships Radix Select and Slider as a self-contained local browser bundle", async () => { + const workspace = await readJson(path.join(sourceRoot, "package.json")) + expect(workspace.scripts).toMatchObject({ + build: "bun scripts/build.ts", + typecheck: expect.stringContaining("tsc --noEmit"), + }) + expect(workspace.devDependencies).toMatchObject({ + "radix-ui": "1.6.2", + react: "19.2.4", + "react-dom": "19.2.4", + }) + + const [html, source, bundle] = await Promise.all([ + fs.readFile(path.join(packageRoot, "index.html"), "utf8"), + fs.readFile(path.join(sourceRoot, "src", "radix-controls.tsx"), "utf8"), + fs.readFile(path.join(packageRoot, "assets", "radix-controls.js"), "utf8"), + ]) + expect(html.match(/data-radix-select/g)).toHaveLength(2) + expect(html.match(/data-radix-slider/g)).toHaveLength(8) + expect(source).toContain('import { Select, Slider } from "radix-ui"') + expect(source).toContain(" { + const files = await collectFiles(packageRoot, "plugin/relight-studio") + const names = files.map((file) => file.relativePath) + + expect(names).toEqual(expect.arrayContaining([ + "LICENSE", + "SKILL.md", + "assets/radix-controls.js", + "index.html", + "manifest.json", + ])) + expect(() => assertPluginStatic(files, "plugin/relight-studio")).not.toThrow() + + const skill = files.find((file) => file.relativePath === "SKILL.md")?.data.toString("utf8") ?? "" + expect(skill).toContain("generation.tools.list") + expect(skill).toContain("generation.canvas.execute") + expect(skill).toContain("created Canvas node") + expect(skill).not.toContain("local preview only") + }) +})