prime-dev-cli 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.mjs +19 -4
- package/config/projects.json +32 -16
- package/dist/server/.next/BUILD_ID +1 -1
- package/dist/server/.next/app-build-manifest.json +112 -70
- package/dist/server/.next/app-path-routes-manifest.json +15 -9
- package/dist/server/.next/build-manifest.json +6 -6
- package/dist/server/.next/cache/.rscinfo +1 -1
- package/dist/server/.next/cache/.tsbuildinfo +1 -1
- package/dist/server/.next/cache/eslint/.cache_1qa5vxt +1 -1
- package/dist/server/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/1.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/11.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/13.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/14.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/15.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/16.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/17.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/18.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/2.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/3.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/4.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/5.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/6.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/7.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/8.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/server/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/dist/server/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/server/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/dist/server/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/1.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/2.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/3.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/4.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/6.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/7.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/8.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/9.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/server/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/dist/server/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/server/.next/next-server.js.nft.json +1 -1
- package/dist/server/.next/prerender-manifest.json +3 -3
- package/dist/server/.next/required-server-files.json +3 -3
- package/dist/server/.next/server/app/_not-found/page.js +1 -1
- package/dist/server/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/_not-found.html +1 -1
- package/dist/server/.next/server/app/_not-found.rsc +2 -4
- package/dist/server/.next/server/app/api/all-projects-envs/route.js +1 -1
- package/dist/server/.next/server/app/api/all-projects-envs/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/check-mock-intercept/route.js +1 -1
- package/dist/server/.next/server/app/api/check-mock-intercept/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/check-workspace/route.js +2 -2
- package/dist/server/.next/server/app/api/check-workspace/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/cleanup-mock/route.js +6 -0
- package/dist/server/.next/server/app/api/cleanup-mock/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/cleanup-mock/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/cleanup-project/route.js +1 -1
- package/dist/server/.next/server/app/api/cleanup-project/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/get-mock-data/route.js +1 -1
- package/dist/server/.next/server/app/api/get-mock-data/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/initialize-workspace/route.js +6 -6
- package/dist/server/.next/server/app/api/initialize-workspace/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route.js +3 -3
- package/dist/server/.next/server/app/api/microapp-proxy-change-stream/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/microapp-proxy-config/route.js +2 -2
- package/dist/server/.next/server/app/api/microapp-proxy-config/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-file/route.js +2 -2
- package/dist/server/.next/server/app/api/mock-file/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-file-content/route.js +1 -1
- package/dist/server/.next/server/app/api/mock-file-content/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-open-status/route.js +3 -3
- package/dist/server/.next/server/app/api/mock-open-status/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/mock-setting/route.js +1 -1
- package/dist/server/.next/server/app/api/mock-setting/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/open-all-mock/route.js +11 -0
- package/dist/server/.next/server/app/api/open-all-mock/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/open-all-mock/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/open-project/route.js +2 -2
- package/dist/server/.next/server/app/api/open-project/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/process/logs/route.js +1 -0
- package/dist/server/.next/server/app/api/process/logs/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/logs/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/process/logs/stream/route.js +9 -0
- package/dist/server/.next/server/app/api/process/logs/stream/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/logs/stream/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/process/start/route.js +1 -0
- package/dist/server/.next/server/app/api/process/start/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/start/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/process/status/route.js +1 -0
- package/dist/server/.next/server/app/api/process/status/route.js.nft.json +1 -0
- package/dist/server/.next/server/app/api/process/status/route_client-reference-manifest.js +1 -0
- package/dist/server/.next/server/app/api/project-config/route.js +1 -1
- package/dist/server/.next/server/app/api/project-config/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/api/retry-project/route.js +9 -9
- package/dist/server/.next/server/app/api/retry-project/route_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/configuration/page.js +3 -3
- package/dist/server/.next/server/app/configuration/page.js.nft.json +1 -1
- package/dist/server/.next/server/app/configuration/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/configuration.html +1 -1
- package/dist/server/.next/server/app/configuration.rsc +3 -5
- package/dist/server/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/server/.next/server/app/index.html +1 -1
- package/dist/server/.next/server/app/index.rsc +2 -4
- package/dist/server/.next/server/app/initialization/page.js +1 -1
- package/dist/server/.next/server/app/initialization/page.js.nft.json +1 -1
- package/dist/server/.next/server/app/initialization/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app/initialization.html +1 -1
- package/dist/server/.next/server/app/initialization.rsc +3 -5
- package/dist/server/.next/server/app/page.js +1 -1
- package/dist/server/.next/server/app/page.js.nft.json +1 -1
- package/dist/server/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/server/.next/server/app-paths-manifest.json +15 -9
- package/dist/server/.next/server/chunks/821.js +5 -0
- package/dist/server/.next/server/chunks/967.js +3 -3
- package/dist/server/.next/server/middleware-build-manifest.js +1 -1
- package/dist/server/.next/server/next-font-manifest.js +1 -1
- package/dist/server/.next/server/next-font-manifest.json +1 -1
- package/dist/server/.next/server/pages/404.html +1 -1
- package/dist/server/.next/server/pages/500.html +1 -1
- package/dist/server/.next/server/pages-manifest.json +1 -1
- package/dist/server/.next/server/server-reference-manifest.json +1 -1
- package/dist/server/.next/static/0YG3L7wZtbtQp2XameODj/_buildManifest.js +1 -0
- package/dist/server/.next/static/0YG3L7wZtbtQp2XameODj/_ssgManifest.js +1 -0
- package/dist/server/.next/static/Mmn2KHpe4Btd9UFvAkzbC/_buildManifest.js +1 -0
- package/dist/server/.next/static/Mmn2KHpe4Btd9UFvAkzbC/_ssgManifest.js +1 -0
- package/dist/server/.next/static/MwYZh9prxBMJtf26zAtTY/_buildManifest.js +1 -0
- package/dist/server/.next/static/MwYZh9prxBMJtf26zAtTY/_ssgManifest.js +1 -0
- package/dist/server/.next/static/chunks/495-1a64c3075b5b8ac4.js +1 -0
- package/dist/server/.next/static/chunks/app/api/all-projects-envs/route-312524aaaaffe75e.js +1 -0
- package/dist/server/.next/static/chunks/app/api/all-projects-envs/route-4a1691275c5ae416.js +1 -0
- package/dist/server/.next/static/chunks/app/api/check-mock-intercept/route-21db47c08229689f.js +1 -0
- package/dist/server/.next/static/chunks/app/api/check-mock-intercept/route-f2e048a9d229f7e7.js +1 -0
- package/dist/server/.next/static/chunks/app/api/check-workspace/route-3569564cd2b09683.js +1 -0
- package/dist/server/.next/static/chunks/app/api/check-workspace/route-ea618578d55f6d3e.js +1 -0
- package/dist/server/.next/static/chunks/app/api/cleanup-mock/route-bbcac882e4f160cb.js +1 -0
- package/dist/server/.next/static/chunks/app/api/cleanup-project/route-16fdad40de98b440.js +1 -0
- package/dist/server/.next/static/chunks/app/api/cleanup-project/route-a6c005b8a485a192.js +1 -0
- package/dist/server/.next/static/chunks/app/api/get-mock-data/route-0ff137f28b0bbfd4.js +1 -0
- package/dist/server/.next/static/chunks/app/api/get-mock-data/route-e8c5eb5bfef356e4.js +1 -0
- package/dist/server/.next/static/chunks/app/api/initialize-workspace/route-7faec0a7a2e6383d.js +1 -0
- package/dist/server/.next/static/chunks/app/api/initialize-workspace/route-a546e3abb74bc427.js +1 -0
- package/dist/server/.next/static/chunks/app/api/microapp-proxy-change-stream/route-81a2d573a6a5b3d9.js +1 -0
- package/dist/server/.next/static/chunks/app/api/microapp-proxy-change-stream/route-92fea0302ce9e17c.js +1 -0
- package/dist/server/.next/static/chunks/app/api/microapp-proxy-config/route-05c8c2aae5088b98.js +1 -0
- package/dist/server/.next/static/chunks/app/api/microapp-proxy-config/route-ad103dba19eb36c2.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-file/route-606d825407e0fd4c.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-file/route-d8676439ef29db7c.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-file-content/route-4bc78ec0cbed800a.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-file-content/route-ed711cf05050ae4b.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-open-status/route-2397a28b4e49887e.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-open-status/route-a9410ab77572cb9e.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-setting/route-48cfb30a284d746d.js +1 -0
- package/dist/server/.next/static/chunks/app/api/mock-setting/route-fc5ad9735304a090.js +1 -0
- package/dist/server/.next/static/chunks/app/api/open-all-mock/route-57687ce93101e033.js +1 -0
- package/dist/server/.next/static/chunks/app/api/open-project/route-33e8ebae3ec34cf6.js +1 -0
- package/dist/server/.next/static/chunks/app/api/open-project/route-b6e6fca6c827640d.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/logs/route-2dda16be53467324.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/logs/route-3d9ee52d7c8aacef.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/logs/stream/route-e3aa80178b56d92e.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/logs/stream/route-e9633e0e72dfb31b.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/start/route-4fe85c59a6cf5d14.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/start/route-54c553f9e551d14b.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/status/route-06151b6ca21ffd52.js +1 -0
- package/dist/server/.next/static/chunks/app/api/process/status/route-9dadfb92dd227115.js +1 -0
- package/dist/server/.next/static/chunks/app/api/project-config/route-0d5799a7d2a92f24.js +1 -0
- package/dist/server/.next/static/chunks/app/api/project-config/route-ebe1c2ee41dedc74.js +1 -0
- package/dist/server/.next/static/chunks/app/api/retry-project/route-c25d253b5eacedef.js +1 -0
- package/dist/server/.next/static/chunks/app/api/retry-project/route-ed8eb5f938cd3503.js +1 -0
- package/dist/server/.next/static/chunks/app/configuration/page-978351fa7fe07983.js +1 -0
- package/dist/server/.next/static/chunks/app/configuration/page-c873f4a20842fe9f.js +1 -0
- package/dist/server/.next/static/chunks/app/layout-882f4e368aeaff73.js +1 -0
- package/dist/server/.next/static/chunks/app/page-46b160ccc2d2f6fd.js +1 -0
- package/dist/server/.next/static/chunks/app/page-9e7caf746eefeed4.js +1 -0
- package/dist/server/.next/static/chunks/webpack-d5f30c51b0af95c2.js +1 -0
- package/dist/server/.next/static/css/1c3633790ce12b77.css +3 -0
- package/dist/server/.next/static/css/99c159237be93dc6.css +1 -0
- package/dist/server/.next/static/tATlS048MJsMzIVQDTgrk/_buildManifest.js +1 -0
- package/dist/server/.next/static/tATlS048MJsMzIVQDTgrk/_ssgManifest.js +1 -0
- package/dist/server/.next/trace +7 -12
- package/dist/server/.next/types/app/api/all-projects-envs/route.ts +1 -1
- package/dist/server/.next/types/app/api/check-mock-intercept/route.ts +1 -1
- package/dist/server/.next/types/app/api/check-workspace/route.ts +1 -1
- package/dist/server/.next/types/app/api/cleanup-mock/route.ts +347 -0
- package/dist/server/.next/types/app/api/cleanup-project/route.ts +1 -1
- package/dist/server/.next/types/app/api/get-mock-data/route.ts +1 -1
- package/dist/server/.next/types/app/api/initialize-workspace/route.ts +1 -1
- package/dist/server/.next/types/app/api/microapp-proxy-change-stream/route.ts +1 -1
- package/dist/server/.next/types/app/api/microapp-proxy-config/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-file/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-file-content/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-open-status/route.ts +1 -1
- package/dist/server/.next/types/app/api/mock-setting/route.ts +1 -1
- package/dist/server/.next/types/app/api/open-all-mock/route.ts +347 -0
- package/dist/server/.next/types/app/api/open-project/route.ts +1 -1
- package/dist/server/.next/types/app/api/process/logs/route.ts +347 -0
- package/dist/server/.next/types/app/api/process/logs/stream/route.ts +347 -0
- package/dist/server/.next/types/app/api/process/start/route.ts +347 -0
- package/dist/server/.next/types/app/api/process/status/route.ts +347 -0
- package/dist/server/.next/types/app/api/project-config/route.ts +1 -1
- package/dist/server/.next/types/app/api/retry-project/route.ts +1 -1
- package/dist/server/.next/types/app/configuration/page.ts +1 -1
- package/dist/server/.next/types/app/initialization/page.ts +1 -1
- package/dist/server/.next/types/app/layout.ts +1 -1
- package/dist/server/.next/types/app/page.ts +1 -1
- package/package.json +3 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(()=>{var e={};e.id=823,e.ids=[823],e.modules={84:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4542);let o=async e=>[{type:"image/x-icon",sizes:"16x16",url:(0,r.fillMetadataSegment)(".",await e.params,"favicon.ico")+""}]},568:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,7774,23)),Promise.resolve().then(n.t.bind(n,9136,23)),Promise.resolve().then(n.t.bind(n,6996,23)),Promise.resolve().then(n.t.bind(n,767,23)),Promise.resolve().then(n.t.bind(n,5207,23)),Promise.resolve().then(n.t.bind(n,9855,23)),Promise.resolve().then(n.t.bind(n,8751,23)),Promise.resolve().then(n.t.bind(n,1681,23))},651:()=>{},840:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,4928,23)),Promise.resolve().then(n.t.bind(n,9670,23)),Promise.resolve().then(n.t.bind(n,1382,23)),Promise.resolve().then(n.t.bind(n,5473,23)),Promise.resolve().then(n.t.bind(n,7429,23)),Promise.resolve().then(n.t.bind(n,8653,23)),Promise.resolve().then(n.t.bind(n,8757,23)),Promise.resolve().then(n.t.bind(n,9687,23))},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1435:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(9563);n(638);var o=n(4659),a=n(8473),i=n(6820);let s=(0,a.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l({className:e,variant:t,size:n,asChild:a=!1,...l}){let c=a?o.DX:"button";return(0,r.jsx)(c,{"data-slot":"button",className:(0,i.cn)(s({variant:t,size:n,className:e})),...l})}},1813:(e,t,n)=>{Promise.resolve().then(n.bind(n,8843))},3019:()=>{},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalError:()=>i.a,__next_app__:()=>d,pages:()=>u,routeModule:()=>f,tree:()=>c});var r=n(1611),o=n(9044),a=n(1382),i=n.n(a),s=n(6465),l={};for(let e in s)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>s[e]);n.d(t,l);let c={children:["",{children:["configuration",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(n.bind(n,4761)),"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx"]}]},{metadata:{icon:[async e=>(await Promise.resolve().then(n.bind(n,84))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(n.bind(n,5735)),"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(n.t.bind(n,7170,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(n.t.bind(n,1475,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(n.t.bind(n,4776,23)),"next/dist/client/components/unauthorized-error"],metadata:{icon:[async e=>(await Promise.resolve().then(n.bind(n,84))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,u=["/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx"],d={require:n,loadChunk:()=>Promise.resolve()},f=new r.AppPageRouteModule({definition:{kind:o.RouteKind.APP_PAGE,page:"/configuration/page",pathname:"/configuration",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},3873:e=>{"use strict";e.exports=require("path")},4761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});let r=(0,n(807).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/edy/Documents/prime-workspace/prime-dev-cli/packages/server/src/app/configuration/page.tsx","default")},5735:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c,metadata:()=>l});var r=n(8433),o=n(6590),a=n.n(o),i=n(9856),s=n.n(i);n(3019);let l={title:"Create Next App",description:"Generated by create next app"};function c({children:e}){return(0,r.jsx)("html",{lang:"en",children:(0,r.jsx)("body",{className:`${a().variable} ${s().variable} antialiased`,children:e})})}},6820:(e,t,n)=>{"use strict";n.d(t,{cn:()=>a});var r=n(5931),o=n(1143);function a(...e){return(0,o.QP)((0,r.$)(e))}},8661:(e,t,n)=>{Promise.resolve().then(n.bind(n,4761))},8843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>aR});var r,o,a,i=n(9563),s=n(638),l=n.t(s,2),c=n(5329),u=n(1435);function d(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function f(e,t=[]){let n=[],r=()=>{let t=n.map(e=>s.createContext(e));return function(n){let r=n?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=s.createContext(r),a=n.length;n=[...n,r];let l=t=>{let{scope:n,children:r,...l}=t,c=n?.[e]?.[a]||o,u=s.useMemo(()=>l,Object.values(l));return(0,i.jsx)(c.Provider,{value:u,children:r})};return l.displayName=t+"Provider",[l,function(n,i){let l=i?.[e]?.[a]||o,c=s.useContext(l);if(c)return c;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}var p=n(831),m=n(4659);function h(e){let t=e+"CollectionProvider",[n,r]=f(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{let{scope:t,children:n}=e,r=s.useRef(null),a=s.useRef(new Map).current;return(0,i.jsx)(o,{scope:t,itemMap:a,collectionRef:r,children:n})};l.displayName=t;let c=e+"CollectionSlot",u=(0,m.TL)(c),d=s.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=a(c,n),s=(0,p.s)(t,o.collectionRef);return(0,i.jsx)(u,{ref:s,children:r})});d.displayName=c;let h=e+"CollectionItemSlot",g="data-radix-collection-item",v=(0,m.TL)(h),x=s.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,l=s.useRef(null),c=(0,p.s)(t,l),u=a(h,n);return s.useEffect(()=>(u.itemMap.set(l,{ref:l,...o}),()=>void u.itemMap.delete(l))),(0,i.jsx)(v,{...{[g]:""},ref:c,children:r})});return x.displayName=h,[{Provider:l,Slot:d,ItemSlot:x},function(t){let n=a(e+"CollectionConsumer",t);return s.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}var g=new WeakMap;function v(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=x(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return -1===n?void 0:e[n]}function x(e){return e!=e||0===e?0:Math.trunc(e)}var y=globalThis?.document?s.useLayoutEffect:()=>{},b=l[" useId ".trim().toString()]||(()=>void 0),w=0;function j(e){let[t,n]=s.useState(b());return y(()=>{e||n(e=>e??String(w++))},[e]),e||(t?`radix-${t}`:"")}var N=n(8803),k=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,m.TL)(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:o,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(o?n:t,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function E(e){let t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}var C=l[" useInsertionEffect ".trim().toString()]||y;function S({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[o,a,i]=function({defaultProp:e,onChange:t}){let[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return C(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{let t=s.useRef(void 0!==e);s.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. 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.`)}t.current=l},[l,r])}return[c,s.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&i.current?.(n)}else a(t)},[l,e,a,i])]}Symbol("RADIX:SYNC_STATE");var P=s.createContext(void 0);function R(e){let t=s.useContext(P);return e||t||"ltr"}var T="rovingFocusGroup.onEntryFocus",M={bubbles:!1,cancelable:!0},O="RovingFocusGroup",[A,L,D]=h(O),[I,$]=f(O,[D]),[F,_]=I(O),z=s.forwardRef((e,t)=>(0,i.jsx)(A.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(A.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(U,{...e,ref:t})})}));z.displayName=O;var U=s.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...h}=e,g=s.useRef(null),v=(0,p.s)(t,g),x=R(a),[y,b]=S({prop:l,defaultProp:c??null,onChange:u,caller:O}),[w,j]=s.useState(!1),N=E(f),C=L(n),P=s.useRef(!1),[A,D]=s.useState(0);return s.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(T,N),()=>e.removeEventListener(T,N)},[N]),(0,i.jsx)(F,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:y,onItemFocus:s.useCallback(e=>b(e),[b]),onItemShiftTab:s.useCallback(()=>j(!0),[]),onFocusableItemAdd:s.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:s.useCallback(()=>D(e=>e-1),[]),children:(0,i.jsx)(k.div,{tabIndex:w||0===A?-1:0,"data-orientation":r,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:d(e.onMouseDown,()=>{P.current=!0}),onFocus:d(e.onFocus,e=>{let t=!P.current;if(e.target===e.currentTarget&&t&&!w){let t=new CustomEvent(T,M);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=C().filter(e=>e.focusable);B([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),m)}}P.current=!1}),onBlur:d(e.onBlur,()=>j(!1))})})}),W="RovingFocusGroupItem",H=s.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:l,...c}=e,u=j(),f=a||u,p=_(W,n),m=p.currentTabStopId===f,h=L(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:x}=p;return s.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),(0,i.jsx)(A.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:(0,i.jsx)(k.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:d(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:d(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:d(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let o=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return V[o]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>B(n))}}),children:"function"==typeof l?l({isCurrentTabStop:m,hasTabStop:null!=x}):l})})});H.displayName=W;var V={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var K=e=>{let{present:t,children:n}=e,r=function(e){var t,n;let[r,o]=s.useState(),a=s.useRef(null),i=s.useRef(e),l=s.useRef("none"),[c,u]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},s.useReducer((e,t)=>n[e][t]??e,t));return s.useEffect(()=>{let e=q(a.current);l.current="mounted"===c?e:"none"},[c]),y(()=>{let t=a.current,n=i.current;if(n!==e){let r=l.current,o=q(t);e?u("MOUNT"):"none"===o||t?.display==="none"?u("UNMOUNT"):n&&r!==o?u("ANIMATION_OUT"):u("UNMOUNT"),i.current=e}},[e,u]),y(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let o=q(a.current).includes(n.animationName);if(n.target===r&&o&&(u("ANIMATION_END"),!i.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},o=e=>{e.target===r&&(l.current=q(a.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(e=>{a.current=e?getComputedStyle(e):null,o(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),a=(0,p.s)(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:a}):null};function q(e){return e?.animationName||"none"}K.displayName="Presence";var G="Tabs",[X,Y]=f(G,[$]),J=$(),[Z,Q]=X(G),ee=s.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=R(l),[f,p]=S({prop:r,onChange:o,defaultProp:a??"",caller:G});return(0,i.jsx)(Z,{scope:n,baseId:j(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:c,children:(0,i.jsx)(k.div,{dir:d,"data-orientation":s,...u,ref:t})})});ee.displayName=G;var et="TabsList",en=s.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...o}=e,a=Q(et,n),s=J(n);return(0,i.jsx)(z,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:(0,i.jsx)(k.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});en.displayName=et;var er="TabsTrigger",eo=s.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Q(er,n),l=J(n),c=es(s.baseId,r),u=el(s.baseId,r),f=r===s.value;return(0,i.jsx)(H,{asChild:!0,...l,focusable:!o,active:f,children:(0,i.jsx)(k.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:d(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)}),onKeyDown:d(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)}),onFocus:d(e.onFocus,()=>{let e="manual"!==s.activationMode;f||o||!e||s.onValueChange(r)})})})});eo.displayName=er;var ea="TabsContent",ei=s.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:o,children:a,...l}=e,c=Q(ea,n),u=es(c.baseId,r),d=el(c.baseId,r),f=r===c.value,p=s.useRef(f);return s.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,i.jsx)(K,{present:o||f,children:({present:n})=>(0,i.jsx)(k.div,{"data-state":f?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:n&&a})})});function es(e,t){return`${e}-trigger-${t}`}function el(e,t){return`${e}-content-${t}`}ei.displayName=ea;var ec=n(6820);function eu({className:e,...t}){return(0,i.jsx)(ee,{"data-slot":"tabs",className:(0,ec.cn)("flex flex-col gap-2",e),...t})}function ed({className:e,...t}){return(0,i.jsx)(en,{"data-slot":"tabs-list",className:(0,ec.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ef({className:e,...t}){return(0,i.jsx)(eo,{"data-slot":"tabs-trigger",className:(0,ec.cn)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ep({className:e,...t}){return(0,i.jsx)(ei,{"data-slot":"tabs-content",className:(0,ec.cn)("flex-1 outline-none",e),...t})}function em(e,[t,n]){return Math.min(n,Math.max(t,e))}var eh="dismissableLayer.update",eg=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ev=s.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:c,onDismiss:u,...f}=e,m=s.useContext(eg),[h,g]=s.useState(null),v=h?.ownerDocument??globalThis?.document,[,x]=s.useState({}),y=(0,p.s)(t,e=>g(e)),b=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=b.indexOf(w),N=h?b.indexOf(h):-1,C=m.layersWithOutsidePointerEventsDisabled.size>0,S=N>=j,P=function(e,t=globalThis?.document){let n=E(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ey("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));S&&!n&&(a?.(e),c?.(e),e.defaultPrevented||u?.())},v),R=function(e,t=globalThis?.document){let n=E(e),r=s.useRef(!1);return s.useEffect(()=>{let e=e=>{e.target&&!r.current&&ey("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;![...m.branches].some(e=>e.contains(t))&&(l?.(e),c?.(e),e.defaultPrevented||u?.())},v);return!function(e,t=globalThis?.document){let n=E(e);s.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{N===m.layers.size-1&&(r?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},v),s.useEffect(()=>{if(h)return n&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(o=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),ex(),()=>{n&&1===m.layersWithOutsidePointerEventsDisabled.size&&(v.body.style.pointerEvents=o)}},[h,v,n,m]),s.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),ex())},[h,m]),s.useEffect(()=>{let e=()=>x({});return document.addEventListener(eh,e),()=>document.removeEventListener(eh,e)},[]),(0,i.jsx)(k.div,{...f,ref:y,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:d(e.onFocusCapture,R.onFocusCapture),onBlurCapture:d(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:d(e.onPointerDownCapture,P.onPointerDownCapture)})});function ex(){let e=new CustomEvent(eh);document.dispatchEvent(e)}function ey(e,t,n,{discrete:r}){let o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&o.addEventListener(e,t,{once:!0}),r)o&&N.flushSync(()=>o.dispatchEvent(a));else o.dispatchEvent(a)}ev.displayName="DismissableLayer",s.forwardRef((e,t)=>{let n=s.useContext(eg),r=s.useRef(null),o=(0,p.s)(t,r);return s.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,i.jsx)(k.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var eb=0;function ew(){s.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ej()),document.body.insertAdjacentElement("beforeend",e[1]??ej()),eb++,()=>{1===eb&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),eb--}},[])}function ej(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var eN="focusScope.autoFocusOnMount",ek="focusScope.autoFocusOnUnmount",eE={bubbles:!1,cancelable:!0},eC=s.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[c,u]=s.useState(null),d=E(o),f=E(a),m=s.useRef(null),h=(0,p.s)(t,e=>u(e)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;c.contains(t)?m.current=t:eR(m.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;null!==t&&(c.contains(t)||eR(m.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&eR(c)});return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,c,g.paused]),s.useEffect(()=>{if(c){eT.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(eN,eE);c.addEventListener(eN,d),c.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(eR(r,{select:t}),document.activeElement!==n)return}(eS(c).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&eR(c))}return()=>{c.removeEventListener(eN,d),setTimeout(()=>{let t=new CustomEvent(ek,eE);c.addEventListener(ek,f),c.dispatchEvent(t),t.defaultPrevented||eR(e??document.body,{select:!0}),c.removeEventListener(ek,f),eT.remove(g)},0)}}},[c,d,f,g]);let v=s.useCallback(e=>{if(!n&&!r||g.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,a]=function(e){let t=eS(e);return[eP(t,e),eP(t.reverse(),e)]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&eR(a,{select:!0})):(e.preventDefault(),n&&eR(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,g.paused]);return(0,i.jsx)(k.div,{tabIndex:-1,...l,ref:h,onKeyDown:v})});function eS(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eP(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function eR(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}eC.displayName="FocusScope";var eT=function(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=eM(e,t)).unshift(t)},remove(t){e=eM(e,t),e[0]?.resume()}}}();function eM(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}let eO=["top","right","bottom","left"],eA=Math.min,eL=Math.max,eD=Math.round,eI=Math.floor,e$=e=>({x:e,y:e}),eF={left:"right",right:"left",bottom:"top",top:"bottom"},e_={start:"end",end:"start"};function ez(e,t){return"function"==typeof e?e(t):e}function eU(e){return e.split("-")[0]}function eW(e){return e.split("-")[1]}function eH(e){return"x"===e?"y":"x"}function eV(e){return"y"===e?"height":"width"}function eB(e){return["top","bottom"].includes(eU(e))?"y":"x"}function eK(e){return e.replace(/start|end/g,e=>e_[e])}function eq(e){return e.replace(/left|right|bottom|top/g,e=>eF[e])}function eG(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function eX(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eY(e,t,n){let r,{reference:o,floating:a}=e,i=eB(t),s=eH(eB(t)),l=eV(s),c=eU(t),u="y"===i,d=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,p=o[l]/2-a[l]/2;switch(c){case"top":r={x:d,y:o.y-a.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-a.width,y:f};break;default:r={x:o.x,y:o.y}}switch(eW(t)){case"start":r[s]-=p*(n&&u?-1:1);break;case"end":r[s]+=p*(n&&u?-1:1)}return r}let eJ=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=eY(c,r,l),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:v,data:x,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[a]:{...p[a],...x}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:u,y:d}=eY(c,f,l)),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function eZ(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ez(t,e),m=eG(p),h=s[f?"floating"===d?"reference":"floating":d],g=eX(await a.getClippingRect({element:null==(n=await (null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await (null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),y=await (null==a.isElement?void 0:a.isElement(x))&&await (null==a.getScale?void 0:a.getScale(x))||{x:1,y:1},b=eX(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:l}):v);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}function eQ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e0(e){return eO.some(t=>e[t]>=0)}async function e1(e,t){let{placement:n,platform:r,elements:o}=e,a=await (null==r.isRTL?void 0:r.isRTL(o.floating)),i=eU(n),s=eW(n),l="y"===eB(n),c=["left","top"].includes(i)?-1:1,u=a&&l?-1:1,d=ez(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}function e2(){return"undefined"!=typeof window}function e5(e){return e4(e)?(e.nodeName||"").toLowerCase():"#document"}function e3(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function e6(e){var t;return null==(t=(e4(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function e4(e){return!!e2()&&(e instanceof Node||e instanceof e3(e).Node)}function e8(e){return!!e2()&&(e instanceof Element||e instanceof e3(e).Element)}function e9(e){return!!e2()&&(e instanceof HTMLElement||e instanceof e3(e).HTMLElement)}function e7(e){return!!e2()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof e3(e).ShadowRoot)}function te(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function tt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function tn(e){let t=tr(),n=e8(e)?ta(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function tr(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function to(e){return["html","body","#document"].includes(e5(e))}function ta(e){return e3(e).getComputedStyle(e)}function ti(e){return e8(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if("html"===e5(e))return e;let t=e.assignedSlot||e.parentNode||e7(e)&&e.host||e6(e);return e7(t)?t.host:t}function tl(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=ts(t);return to(n)?t.ownerDocument?t.ownerDocument.body:t.body:e9(n)&&te(n)?n:e(n)}(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=e3(o);if(a){let e=tc(i);return t.concat(i,i.visualViewport||[],te(o)?o:[],e&&n?tl(e):[])}return t.concat(o,tl(o,[],n))}function tc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tu(e){let t=ta(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=e9(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=eD(n)!==a||eD(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function td(e){return e8(e)?e:e.contextElement}function tf(e){let t=td(e);if(!e9(t))return e$(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:a}=tu(t),i=(a?eD(n.width):n.width)/r,s=(a?eD(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}let tp=e$(0);function tm(e){let t=e3(e);return tr()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tp}function th(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),i=td(e),s=e$(1);t&&(r?e8(r)&&(s=tf(r)):s=tf(e));let l=(void 0===(o=n)&&(o=!1),r&&(!o||r===e3(i))&&o)?tm(i):e$(0),c=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,d=a.width/s.x,f=a.height/s.y;if(i){let e=e3(i),t=r&&e8(r)?e3(r):r,n=e,o=tc(n);for(;o&&r&&t!==n;){let e=tf(o),t=o.getBoundingClientRect(),r=ta(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=a,u+=i,o=tc(n=e3(o))}}return eX({width:d,height:f,x:c,y:u})}function tg(e,t){let n=ti(e).scrollLeft;return t?t.left+n:th(e6(e)).left+n}function tv(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:tg(e,r)),y:r.top+t.scrollTop}}function tx(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=e3(e),r=e6(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let e=tr();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){let t=e6(e),n=ti(e),r=e.ownerDocument.body,o=eL(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=eL(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+tg(e),s=-n.scrollTop;return"rtl"===ta(r).direction&&(i+=eL(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(e6(e));else if(e8(t))r=function(e,t){let n=th(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=e9(e)?tf(e):e$(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y;return{width:i,height:s,x:o*a.x,y:r*a.y}}(t,n);else{let n=tm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eX(r)}function ty(e){return"static"===ta(e).position}function tb(e,t){if(!e9(e)||"fixed"===ta(e).position)return null;if(t)return t(e);let n=e.offsetParent;return e6(e)===n&&(n=n.ownerDocument.body),n}function tw(e,t){let n=e3(e);if(tt(e))return n;if(!e9(e)){let t=ts(e);for(;t&&!to(t);){if(e8(t)&&!ty(t))return t;t=ts(t)}return n}let r=tb(e,t);for(;r&&["table","td","th"].includes(e5(r))&&ty(r);)r=tb(r,t);return r&&to(r)&&ty(r)&&!tn(r)?n:r||function(e){let t=ts(e);for(;e9(t)&&!to(t);){if(tn(t))return t;if(tt(t))break;t=ts(t)}return null}(e)||n}let tj=async function(e){let t=this.getOffsetParent||tw,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=e9(t),o=e6(t),a="fixed"===n,i=th(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=e$(0);if(r||!r&&!a)if(("body"!==e5(t)||te(o))&&(s=ti(t)),r){let e=th(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=tg(o));a&&!r&&o&&(l.x=tg(o));let c=!o||r||a?e$(0):tv(o,s);return{x:i.left+s.scrollLeft-l.x-c.x,y:i.top+s.scrollTop-l.y-c.y,width:i.width,height:i.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},tN={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a="fixed"===o,i=e6(r),s=!!t&&tt(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=e$(1),u=e$(0),d=e9(r);if((d||!d&&!a)&&(("body"!==e5(r)||te(i))&&(l=ti(r)),e9(r))){let e=th(r);c=tf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=!i||d||a?e$(0):tv(i,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:e6,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[..."clippingAncestors"===n?tt(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=tl(e,[],!1).filter(e=>e8(e)&&"body"!==e5(e)),o=null,a="fixed"===ta(e).position,i=a?ts(e):e;for(;e8(i)&&!to(i);){let t=ta(i),n=tn(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||te(i)&&!n&&function e(t,n){let r=ts(t);return!(r===n||!e8(r)||to(r))&&("fixed"===ta(r).position||e(r,n))}(e,i))?r=r.filter(e=>e!==i):o=t,i=ts(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=a[0],s=a.reduce((e,n)=>{let r=tx(t,n,o);return e.top=eL(r.top,e.top),e.right=eA(r.right,e.right),e.bottom=eA(r.bottom,e.bottom),e.left=eL(r.left,e.left),e},tx(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:tw,getElementRects:tj,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=tu(e);return{width:t,height:n}},getScale:tf,isElement:e8,isRTL:function(e){return"rtl"===ta(e).direction}};function tk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let tE=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ez(e,t)||{};if(null==c)return{};let d=eG(u),f={x:n,y:r},p=eH(eB(o)),m=eV(p),h=await i.getDimensions(c),g="y"===p,v=g?"clientHeight":"clientWidth",x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],y=f[p]-a.reference[p],b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c)),w=b?b[v]:0;w&&await (null==i.isElement?void 0:i.isElement(b))||(w=s.floating[v]||a.floating[m]);let j=w/2-h[m]/2-1,N=eA(d[g?"top":"left"],j),k=eA(d[g?"bottom":"right"],j),E=w-h[m]-k,C=w/2-h[m]/2+(x/2-y/2),S=eL(N,eA(C,E)),P=!l.arrow&&null!=eW(o)&&C!==S&&a.reference[m]/2-(C<N?N:k)-h[m]/2<0,R=P?C<N?C-N:C-E:0;return{[p]:f[p]+R,data:{[p]:S,centerOffset:C-S-R,...P&&{alignmentOffset:R}},reset:P}}}),tC=(e,t,n)=>{let r=new Map,o={platform:tN,...n},a={...o.platform,_c:r};return eJ(e,t,{...o,platform:a})};var tS="undefined"!=typeof document?s.useLayoutEffect:function(){};function tP(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!tP(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tP(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function tR(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tT(e,t){let n=tR(e);return Math.round(t*n)/n}function tM(e){let t=s.useRef(e);return tS(()=>{t.current=e}),t}let tO=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?tE({element:n.current,padding:r}).fn(t):{}:n?tE({element:n,padding:r}).fn(t):{}}}),tA=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await e1(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}}(e),options:[e,t]}),tL=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ez(e,t),c={x:n,y:r},u=await eZ(t,l),d=eB(eU(o)),f=eH(d),p=c[f],m=c[d];if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+u[e],r=p-u[t];p=eL(n,eA(p,r))}if(i){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=m+u[e],r=m-u[t];m=eL(n,eA(m,r))}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}}(e),options:[e,t]}),tD=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ez(e,t),u={x:n,y:r},d=eB(o),f=eH(d),p=u[f],m=u[d],h=ez(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,x;let e="y"===f?"width":"height",t=["top","left"].includes(eU(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(x=i.offset)?void 0:x[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}}(e),options:[e,t]}),tI=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,a,i;let{placement:s,middlewareData:l,rects:c,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...y}=ez(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let b=eU(s),w=eB(u),j=eU(u)===u,N=await (null==d.isRTL?void 0:d.isRTL(f.floating)),k=h||(j||!x?[eq(u)]:function(e){let t=eq(e);return[eK(e),t,eK(t)]}(u)),E="none"!==v;!h&&E&&k.push(...function(e,t,n,r){let o=eW(e),a=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(eU(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(eK)))),a}(u,x,v,N));let C=[u,...k],S=await eZ(t,y),P=[],R=(null==(r=l.flip)?void 0:r.overflows)||[];if(p&&P.push(S[b]),m){let e=function(e,t,n){void 0===n&&(n=!1);let r=eW(e),o=eH(eB(e)),a=eV(o),i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=eq(i)),[i,eq(i)]}(s,c,N);P.push(S[e[0]],S[e[1]])}if(R=[...R,{placement:s,overflows:P}],!P.every(e=>e<=0)){let e=((null==(o=l.flip)?void 0:o.index)||0)+1,t=C[e];if(t&&("alignment"!==m||w===eB(t)||R.every(e=>e.overflows[0]>0&&eB(e.placement)===w)))return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(a=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(g){case"bestFit":{let e=null==(i=R.filter(e=>{if(E){let t=eB(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=u}if(s!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}),t$=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,a,{placement:i,rects:s,platform:l,elements:c}=t,{apply:u=()=>{},...d}=ez(e,t),f=await eZ(t,d),p=eU(i),m=eW(i),h="y"===eB(i),{width:g,height:v}=s.floating;"top"===p||"bottom"===p?(o=p,a=m===(await (null==l.isRTL?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(a=p,o="end"===m?"top":"bottom");let x=v-f.top-f.bottom,y=g-f.left-f.right,b=eA(v-f[o],x),w=eA(g-f[a],y),j=!t.middlewareData.shift,N=b,k=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=x),j&&!m){let e=eL(f.left,0),t=eL(f.right,0),n=eL(f.top,0),r=eL(f.bottom,0);h?k=g-2*(0!==e||0!==t?e+t:eL(f.left,f.right)):N=v-2*(0!==n||0!==r?n+r:eL(f.top,f.bottom))}await u({...t,availableWidth:k,availableHeight:N});let E=await l.getDimensions(c.floating);return g!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),tF=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=ez(e,t);switch(r){case"referenceHidden":{let e=eQ(await eZ(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:e0(e)}}}case"escaped":{let e=eQ(await eZ(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:e0(e)}}}default:return{}}}}}(e),options:[e,t]}),t_=(e,t)=>({...tO(e),options:[e,t]});var tz=s.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...a}=e;return(0,i.jsx)(k.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function tU(e){let[t,n]=s.useState(void 0);return y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}tz.displayName="Arrow";var tW="Popper",[tH,tV]=f(tW),[tB,tK]=tH(tW),tq=e=>{let{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return(0,i.jsx)(tB,{scope:t,anchor:r,onAnchorChange:o,children:n})};tq.displayName=tW;var tG="PopperAnchor",tX=s.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,a=tK(tG,n),l=s.useRef(null),c=(0,p.s)(t,l);return s.useEffect(()=>{a.onAnchorChange(r?.current||l.current)}),r?null:(0,i.jsx)(k.div,{...o,ref:c})});tX.displayName=tG;var tY="PopperContent",[tJ,tZ]=tH(tY),tQ=s.forwardRef((e,t)=>{let{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...x}=e,b=tK(tY,n),[w,j]=s.useState(null),C=(0,p.s)(t,e=>j(e)),[S,P]=s.useState(null),R=tU(S),T=R?.width??0,M=R?.height??0,O="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(d)?d:[d],L=A.length>0,D={padding:O,boundary:A.filter(t5),altBoundary:L},{refs:I,floatingStyles:$,placement:F,isPositioned:_,middlewareData:z}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=s.useState(r);tP(p,r)||m(r);let[h,g]=s.useState(null),[v,x]=s.useState(null),y=s.useCallback(e=>{e!==k.current&&(k.current=e,g(e))},[]),b=s.useCallback(e=>{e!==E.current&&(E.current=e,x(e))},[]),w=a||h,j=i||v,k=s.useRef(null),E=s.useRef(null),C=s.useRef(d),S=null!=c,P=tM(c),R=tM(o),T=tM(u),M=s.useCallback(()=>{if(!k.current||!E.current)return;let e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),tC(k.current,E.current,e).then(e=>{let t={...e,isPositioned:!1!==T.current};O.current&&!tP(C.current,t)&&(C.current=t,N.flushSync(()=>{f(t)}))})},[p,t,n,R,T]);tS(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let O=s.useRef(!1);tS(()=>(O.current=!0,()=>{O.current=!1}),[]),tS(()=>{if(w&&(k.current=w),j&&(E.current=j),w&&j){if(P.current)return P.current(w,j,M);M()}},[w,j,M,P,S]);let A=s.useMemo(()=>({reference:k,floating:E,setReference:y,setFloating:b}),[y,b]),L=s.useMemo(()=>({reference:w,floating:j}),[w,j]),D=s.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=tT(L.floating,d.x),r=tT(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...tR(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,L.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:M,refs:A,elements:L,floatingStyles:D}),[d,M,A,L,D])}({strategy:"fixed",placement:r+("center"!==a?"-"+a:""),whileElementsMounted:(...e)=>(function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=td(e),d=a||i?[...u?tl(u):[],...tl(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});let f=u&&l?function(e,t){let n,r=null,o=e6(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;let m=eI(d),h=eI(o.clientWidth-(u+f)),g={rootMargin:-m+"px "+-h+"px "+-eI(o.clientHeight-(d+p))+"px "+-eI(u)+"px",threshold:eL(0,eA(1,l))||1},v=!0;function x(t){let r=t[0].intersectionRatio;if(r!==l){if(!v)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||tk(c,e.getBoundingClientRect())||i(),v=!1}try{r=new IntersectionObserver(x,{...g,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(x,g)}r.observe(e)}(!0),a}(u,n):null,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let h=c?th(e):null;return c&&function t(){let r=th(e);h&&!tk(h,r)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[tA({mainAxis:o+M,alignmentAxis:l}),u&&tL({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?tD():void 0,...D}),u&&tI({...D}),t$({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),S&&t_({element:S,padding:c}),t3({arrowWidth:T,arrowHeight:M}),h&&tF({strategy:"referenceHidden",...D})]}),[U,W]=t6(F),H=E(v);y(()=>{_&&H?.()},[_,H]);let V=z.arrow?.x,B=z.arrow?.y,K=z.arrow?.centerOffset!==0,[q,G]=s.useState();return y(()=>{w&&G(window.getComputedStyle(w).zIndex)},[w]),(0,i.jsx)("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:_?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(tJ,{scope:n,placedSide:U,onArrowChange:P,arrowX:V,arrowY:B,shouldHideArrow:K,children:(0,i.jsx)(k.div,{"data-side":U,"data-align":W,...x,ref:C,style:{...x.style,animation:_?void 0:"none"}})})})});tQ.displayName=tY;var t0="PopperArrow",t1={top:"bottom",right:"left",bottom:"top",left:"right"},t2=s.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=tZ(t0,n),a=t1[o.placedSide];return(0,i.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(tz,{...r,ref:t,style:{...r.style,display:"block"}})})});function t5(e){return null!==e}t2.displayName=t0;var t3=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=t6(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2,p="",m="";return"bottom"===l?(p=a?u:`${d}px`,m=`${-s}px`):"top"===l?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):"right"===l?(p=`${-s}px`,m=a?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function t6(e){let[t,n="center"]=e.split("-");return[t,n]}var t4=s.forwardRef((e,t)=>{let{container:n,...r}=e,[o,a]=s.useState(!1);y(()=>a(!0),[]);let l=n||o&&globalThis?.document?.body;return l?N.createPortal((0,i.jsx)(k.div,{...r,ref:t}),l):null});function t8(e){let t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}t4.displayName="Portal";var t9=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"});s.forwardRef((e,t)=>(0,i.jsx)(k.span,{...e,ref:t,style:{...t9,...e.style}})).displayName="VisuallyHidden";var t7=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ne=new WeakMap,nt=new WeakMap,nn={},nr=0,no=function(e){return e&&(e.host||no(e.parentNode))},na=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=no(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});nn[n]||(nn[n]=new WeakMap);var a=nn[n],i=[],s=new Set,l=new Set(o),c=function(e){!e||s.has(e)||(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(ne.get(e)||0)+1,c=(a.get(e)||0)+1;ne.set(e,l),a.set(e,c),i.push(e),1===l&&o&&nt.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),nr++,function(){i.forEach(function(e){var t=ne.get(e)-1,o=a.get(e)-1;ne.set(e,t),a.set(e,o),t||(nt.has(e)||e.removeAttribute(r),nt.delete(e)),o||e.removeAttribute(n)}),--nr||(ne=new WeakMap,ne=new WeakMap,nt=new WeakMap,nn={})}},ni=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||t7(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),na(r,o,n,"aria-hidden")):function(){return null}},ns=function(){return(ns=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function nl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}Object.create;Object.create;var nc=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),nu="width-before-scroll-bar";function nd(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var nf="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,np=new WeakMap;function nm(e){return e}var nh=function(e){void 0===e&&(e={});var t,n,r,o,a=(t=null,void 0===n&&(n=nm),r=[],o=!1,{read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}});return a.options=ns({async:!0,ssr:!1},e),a}(),ng=function(){},nv=s.forwardRef(function(e,t){var n,r,o,a,i=s.useRef(null),l=s.useState({onScrollCapture:ng,onWheelCapture:ng,onTouchMoveCapture:ng}),c=l[0],u=l[1],d=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,g=e.shards,v=e.sideCar,x=e.noRelative,y=e.noIsolation,b=e.inert,w=e.allowPinchZoom,j=e.as,N=e.gapMode,k=nl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=(n=[i,t],r=function(e){return n.forEach(function(t){return nd(t,e)})},(o=(0,s.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,a=o.facade,nf(function(){var e=np.get(a);if(e){var t=new Set(e),r=new Set(n),o=a.current;t.forEach(function(e){r.has(e)||nd(e,null)}),r.forEach(function(e){t.has(e)||nd(e,o)})}np.set(a,n)},[n]),a),C=ns(ns({},k),c);return s.createElement(s.Fragment,null,h&&s.createElement(v,{sideCar:nh,removeScrollBar:m,shards:g,noRelative:x,noIsolation:y,inert:b,setCallbacks:u,allowPinchZoom:!!w,lockRef:i,gapMode:N}),d?s.cloneElement(s.Children.only(f),ns(ns({},C),{ref:E})):s.createElement(void 0===j?"div":j,ns({},C,{className:p,ref:E}),f))});nv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},nv.classNames={fullWidth:nu,zeroRight:nc};var nx=function(e){var t=e.sideCar,n=nl(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return s.createElement(r,ns({},n))};nx.isSideCarExport=!0;var ny=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nb=function(){var e=ny();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nw=function(){var e=nb();return function(t){return e(t.styles,t.dynamic),null}},nj={left:0,top:0,right:0,gap:0},nN=function(e){return parseInt(e||"",10)||0},nk=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[nN(n),nN(r),nN(o)]},nE=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return nj;var t=nk(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nC=nw(),nS="data-scroll-locked",nP=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(nS,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(nc," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nu," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nc," .").concat(nc," {\n right: 0 ").concat(r,";\n }\n \n .").concat(nu," .").concat(nu," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(nS,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},nR=function(){var e=parseInt(document.body.getAttribute(nS)||"0",10);return isFinite(e)?e:0},nT=function(){s.useEffect(function(){return document.body.setAttribute(nS,(nR()+1).toString()),function(){var e=nR()-1;e<=0?document.body.removeAttribute(nS):document.body.setAttribute(nS,e.toString())}},[])},nM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;nT();var a=s.useMemo(function(){return nE(o)},[o]);return s.createElement(nC,{styles:nP(a,!t,o,n?"":"!important")})},nO=!1;if("undefined"!=typeof window)try{var nA=Object.defineProperty({},"passive",{get:function(){return nO=!0,!0}});window.addEventListener("test",nA,nA),window.removeEventListener("test",nA,nA)}catch(e){nO=!1}var nL=!!nO&&{passive:!1},nD=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},nI=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),n$(e,r)){var o=nF(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},n$=function(e,t){return"v"===e?nD(t,"overflowY"):nD(t,"overflowX")},nF=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},n_=function(e,t,n,r,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),s=i*r,l=n.target,c=t.contains(l),u=!1,d=s>0,f=0,p=0;do{if(!l)break;var m=nF(e,l),h=m[0],g=m[1]-m[2]-i*h;(h||g)&&n$(e,l)&&(f+=g,p+=h);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return d&&(o&&1>Math.abs(f)||!o&&s>f)?u=!0:!d&&(o&&1>Math.abs(p)||!o&&-s>p)&&(u=!0),u},nz=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nU=function(e){return[e.deltaX,e.deltaY]},nW=function(e){return e&&"current"in e?e.current:e},nH=0,nV=[];let nB=(r=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(nH++)[0],a=s.useState(nw)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(nW),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=nz(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],c="deltaY"in e?e.deltaY:s[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=nI(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=nI(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return n_(p,t,e,"h"===p?l:c,!0)},[]),c=s.useCallback(function(e){if(nV.length&&nV[nV.length-1]===a){var n="deltaY"in e?nU(e):nz(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(nW).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=s.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=s.useCallback(function(e){n.current=nz(e),r.current=void 0},[]),f=s.useCallback(function(t){u(t.type,nU(t),t.target,l(t,e.lockRef.current))},[]),p=s.useCallback(function(t){u(t.type,nz(t),t.target,l(t,e.lockRef.current))},[]);s.useEffect(function(){return nV.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,nL),document.addEventListener("touchmove",c,nL),document.addEventListener("touchstart",d,nL),function(){nV=nV.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,nL),document.removeEventListener("touchmove",c,nL),document.removeEventListener("touchstart",d,nL)}},[]);var m=e.removeScrollBar,h=e.inert;return s.createElement(s.Fragment,null,h?s.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?s.createElement(nM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},nh.useMedium(r),nx);var nK=s.forwardRef(function(e,t){return s.createElement(nv,ns({},e,{ref:t,sideCar:nB}))});nK.classNames=nv.classNames;var nq=[" ","Enter","ArrowUp","ArrowDown"],nG=[" ","Enter"],nX="Select",[nY,nJ,nZ]=h(nX),[nQ,n0]=f(nX,[nZ,tV]),n1=tV(),[n2,n5]=nQ(nX),[n3,n6]=nQ(nX),n4=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:l,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,v=n1(t),[x,y]=s.useState(null),[b,w]=s.useState(null),[N,k]=s.useState(!1),E=R(d),[C,P]=S({prop:r,defaultProp:o??!1,onChange:a,caller:nX}),[T,M]=S({prop:l,defaultProp:c,onChange:u,caller:nX}),O=s.useRef(null),A=!x||g||!!x.closest("form"),[L,D]=s.useState(new Set),I=Array.from(L).map(e=>e.props.value).join(";");return(0,i.jsx)(tq,{...v,children:(0,i.jsxs)(n2,{required:h,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:N,onValueNodeHasChildrenChange:k,contentId:j(),value:T,onValueChange:M,open:C,onOpenChange:P,dir:E,triggerPointerDownPosRef:O,disabled:m,children:[(0,i.jsx)(nY.Provider,{scope:t,children:(0,i.jsx)(n3,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(e=>{D(t=>new Set(t).add(e))},[]),onNativeOptionRemove:s.useCallback(e=>{D(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,i.jsxs)(rA,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:T,onChange:e=>M(e.target.value),disabled:m,form:g,children:[void 0===T?(0,i.jsx)("option",{value:""}):null,Array.from(L)]},I):null]})})};n4.displayName=nX;var n8="SelectTrigger",n9=s.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,a=n1(n),l=n5(n8,n),c=l.disabled||r,u=(0,p.s)(t,l.onTriggerChange),f=nJ(n),m=s.useRef("touch"),[h,g,v]=rD(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=rI(t,e,n);void 0!==r&&l.onValueChange(r.value)}),x=e=>{c||(l.onOpenChange(!0),v()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,i.jsx)(tX,{asChild:!0,...a,children:(0,i.jsx)(k.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":rL(l.value)?"":void 0,...o,ref:u,onClick:d(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&x(e)}),onPointerDown:d(o.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(x(e),e.preventDefault())}),onKeyDown:d(o.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||g(e.key),(!t||" "!==e.key)&&nq.includes(e.key)&&(x(),e.preventDefault())})})})});n9.displayName=n8;var n7="SelectValue",re=s.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...l}=e,c=n5(n7,n),{onValueNodeHasChildrenChange:u}=c,d=void 0!==a,f=(0,p.s)(t,c.onValueNodeChange);return y(()=>{u(d)},[u,d]),(0,i.jsx)(k.span,{...l,ref:f,style:{pointerEvents:"none"},children:rL(c.value)?(0,i.jsx)(i.Fragment,{children:s}):a})});re.displayName=n7;var rt=s.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,i.jsx)(k.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});rt.displayName="SelectIcon";var rn=e=>(0,i.jsx)(t4,{asChild:!0,...e});rn.displayName="SelectPortal";var rr="SelectContent",ro=s.forwardRef((e,t)=>{let n=n5(rr,e.__scopeSelect),[r,o]=s.useState();return(y(()=>{o(new DocumentFragment)},[]),n.open)?(0,i.jsx)(rl,{...e,ref:t}):r?N.createPortal((0,i.jsx)(ra,{scope:e.__scopeSelect,children:(0,i.jsx)(nY.Slot,{scope:e.__scopeSelect,children:(0,i.jsx)("div",{children:e.children})})}),r):null});ro.displayName=rr;var[ra,ri]=nQ(rr),rs=(0,m.TL)("SelectContent.RemoveScroll"),rl=s.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:l,side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:b,...w}=e,j=n5(rr,n),[N,k]=s.useState(null),[E,C]=s.useState(null),S=(0,p.s)(t,e=>k(e)),[P,R]=s.useState(null),[T,M]=s.useState(null),O=nJ(n),[A,L]=s.useState(!1),D=s.useRef(!1);s.useEffect(()=>{if(N)return ni(N)},[N]),ew();let I=s.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&E&&(E.scrollTop=0),n===r&&E&&(E.scrollTop=E.scrollHeight),n?.focus(),document.activeElement!==o))return},[O,E]),$=s.useCallback(()=>I([P,N]),[I,P,N]);s.useEffect(()=>{A&&$()},[A,$]);let{onOpenChange:F,triggerPointerDownPosRef:_}=j;s.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(_.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():N.contains(n.target)||F(!1),document.removeEventListener("pointermove",t),_.current=null};return null!==_.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[N,F,_]),s.useEffect(()=>{let e=()=>F(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[F]);let[z,U]=rD(e=>{let t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=rI(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),W=s.useCallback((e,t,n)=>{let r=!D.current&&!n;(void 0!==j.value&&j.value===t||r)&&(R(e),r&&(D.current=!0))},[j.value]),H=s.useCallback(()=>N?.focus(),[N]),V=s.useCallback((e,t,n)=>{let r=!D.current&&!n;(void 0!==j.value&&j.value===t||r)&&M(e)},[j.value]),B="popper"===r?ru:rc,K=B===ru?{side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:b}:{};return(0,i.jsx)(ra,{scope:n,content:N,viewport:E,onViewportChange:C,itemRefCallback:W,selectedItem:P,onItemLeave:H,itemTextRefCallback:V,focusSelectedItem:$,selectedItemText:T,position:r,isPositioned:A,searchRef:z,children:(0,i.jsx)(nK,{as:rs,allowPinchZoom:!0,children:(0,i.jsx)(eC,{asChild:!0,trapped:j.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:d(o,e=>{j.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,i.jsx)(ev,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:(0,i.jsx)(B,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:e=>e.preventDefault(),...w,...K,onPlaced:()=>L(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:d(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>I(t)),e.preventDefault()}})})})})})})});rl.displayName="SelectContentImpl";var rc=s.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,a=n5(rr,n),l=ri(rr,n),[c,u]=s.useState(null),[d,f]=s.useState(null),m=(0,p.s)(t,e=>f(e)),h=nJ(n),g=s.useRef(!1),v=s.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:w,focusSelectedItem:j}=l,N=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&x&&b&&w){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=w.getBoundingClientRect();if("rtl"!==a.dir){let r=o.left-t.left,a=n.left-r,i=e.left-a,s=e.width+i,l=Math.max(s,t.width),u=em(a,[10,Math.max(10,window.innerWidth-10-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{let r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,s=e.width+i,l=Math.max(s,t.width),u=em(a,[10,Math.max(10,window.innerWidth-10-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}let i=h(),s=window.innerHeight-20,l=x.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),v=f+p+l+parseInt(u.paddingBottom,10)+m,y=Math.min(5*b.offsetHeight,v),j=window.getComputedStyle(x),N=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),E=e.top+e.height/2-10,C=b.offsetHeight/2,S=f+p+(b.offsetTop+C);if(S<=E){let e=i.length>0&&b===i[i.length-1].ref.current;c.style.bottom="0px";let t=Math.max(s-E,C+(e?k:0)+(d.clientHeight-x.offsetTop-x.offsetHeight)+m);c.style.height=S+t+"px"}else{let e=i.length>0&&b===i[0].ref.current;c.style.top="0px";let t=Math.max(E,f+x.offsetTop+(e?N:0)+C);c.style.height=t+(v-S)+"px",x.scrollTop=S-E+x.offsetTop}c.style.margin="10px 0",c.style.minHeight=y+"px",c.style.maxHeight=s+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,d,x,b,w,a.dir,r]);y(()=>N(),[N]);let[E,C]=s.useState();y(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);let S=s.useCallback(e=>{e&&!0===v.current&&(N(),j?.(),v.current=!1)},[N,j]);return(0,i.jsx)(rd,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:S,children:(0,i.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:(0,i.jsx)(k.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});rc.displayName="SelectItemAlignedPosition";var ru=s.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...a}=e,s=n1(n);return(0,i.jsx)(tQ,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});ru.displayName="SelectPopperPosition";var[rd,rf]=nQ(rr,{}),rp="SelectViewport",rm=s.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,a=ri(rp,n),l=rf(rp,n),c=(0,p.s)(t,a.onViewportChange),u=s.useRef(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("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:r}),(0,i.jsx)(nY.Slot,{scope:n,children:(0,i.jsx)(k.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:d(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let a=o+e,i=Math.min(r,a),s=a-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});rm.displayName=rp;var rh="SelectGroup",[rg,rv]=nQ(rh);s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=j();return(0,i.jsx)(rg,{scope:n,id:o,children:(0,i.jsx)(k.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=rh;var rx="SelectLabel";s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=rv(rx,n);return(0,i.jsx)(k.div,{id:o.id,...r,ref:t})}).displayName=rx;var ry="SelectItem",[rb,rw]=nQ(ry),rj=s.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...l}=e,c=n5(ry,n),u=ri(ry,n),f=c.value===r,[m,h]=s.useState(a??""),[g,v]=s.useState(!1),x=(0,p.s)(t,e=>u.itemRefCallback?.(e,r,o)),y=j(),b=s.useRef("touch"),w=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,i.jsx)(rb,{scope:n,value:r,disabled:o,textId:y,isSelected:f,onItemTextChange:s.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,i.jsx)(nY.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:(0,i.jsx)(k.div,{role:"option","aria-labelledby":y,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:x,onFocus:d(l.onFocus,()=>v(!0)),onBlur:d(l.onBlur,()=>v(!1)),onClick:d(l.onClick,()=>{"mouse"!==b.current&&w()}),onPointerUp:d(l.onPointerUp,()=>{"mouse"===b.current&&w()}),onPointerDown:d(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:d(l.onPointerMove,e=>{b.current=e.pointerType,o?u.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:d(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:d(l.onKeyDown,e=>{(u.searchRef?.current===""||" "!==e.key)&&(nG.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});rj.displayName=ry;var rN="SelectItemText",rk=s.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...a}=e,l=n5(rN,n),c=ri(rN,n),u=rw(rN,n),d=n6(rN,n),[f,m]=s.useState(null),h=(0,p.s)(t,e=>m(e),u.onItemTextChange,e=>c.itemTextRefCallback?.(e,u.value,u.disabled)),g=f?.textContent,v=s.useMemo(()=>(0,i.jsx)("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=d;return y(()=>(x(v),()=>b(v)),[x,b,v]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren?N.createPortal(a.children,l.valueNode):null]})});rk.displayName=rN;var rE="SelectItemIndicator",rC=s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return rw(rE,n).isSelected?(0,i.jsx)(k.span,{"aria-hidden":!0,...r,ref:t}):null});rC.displayName=rE;var rS="SelectScrollUpButton",rP=s.forwardRef((e,t)=>{let n=ri(rS,e.__scopeSelect),r=rf(rS,e.__scopeSelect),[o,a]=s.useState(!1),l=(0,p.s)(t,r.onScrollButtonChange);return y(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(rM,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});rP.displayName=rS;var rR="SelectScrollDownButton",rT=s.forwardRef((e,t)=>{let n=ri(rR,e.__scopeSelect),r=rf(rR,e.__scopeSelect),[o,a]=s.useState(!1),l=(0,p.s)(t,r.onScrollButtonChange);return y(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(rM,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});rT.displayName=rR;var rM=s.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,a=ri("SelectScrollButton",n),l=s.useRef(null),c=nJ(n),u=s.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),y(()=>{let e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,i.jsx)(k.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:d(o.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(r,50))}),onPointerMove:d(o.onPointerMove,()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(r,50))}),onPointerLeave:d(o.onPointerLeave,()=>{u()})})});s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,i.jsx)(k.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var rO="SelectArrow";s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=n1(n),a=n5(rO,n),s=ri(rO,n);return a.open&&"popper"===s.position?(0,i.jsx)(t2,{...o,...r,ref:t}):null}).displayName=rO;var rA=s.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let o=s.useRef(null),a=(0,p.s)(r,o),l=t8(t);return s.useEffect(()=>{let e=o.current;if(!e)return;let n=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(l!==t&&n){let r=new Event("change",{bubbles:!0});n.call(e,t),e.dispatchEvent(r)}},[l,t]),(0,i.jsx)(k.select,{...n,style:{...t9,...n.style},ref:a,defaultValue:t})});function rL(e){return""===e||void 0===e}function rD(e){let t=E(e),n=s.useRef(""),r=s.useRef(0),o=s.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function rI(e,t,n){var r,o;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,s=(r=e,o=Math.max(i,0),r.map((e,t)=>r[(o+t)%r.length]));1===a.length&&(s=s.filter(e=>e!==n));let l=s.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==n?l:void 0}rA.displayName="SelectBubbleInput";let r$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),r_=e=>{let t=rF(e);return t.charAt(0).toUpperCase()+t.slice(1)},rz=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),rU=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var rW={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let rH=(0,s.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>(0,s.createElement)("svg",{ref:c,...rW,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:rz("lucide",o),...!a&&!rU(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(a)?a:[a]])),rV=(e,t)=>{let n=(0,s.forwardRef)(({className:n,...r},o)=>(0,s.createElement)(rH,{ref:o,iconNode:t,className:rz(`lucide-${r$(r_(e))}`,`lucide-${e}`,n),...r}));return n.displayName=r_(e),n},rB=rV("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),rK=rV("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),rq=rV("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function rG({...e}){return(0,i.jsx)(n4,{"data-slot":"select",...e})}function rX({...e}){return(0,i.jsx)(re,{"data-slot":"select-value",...e})}function rY({className:e,size:t="default",children:n,...r}){return(0,i.jsxs)(n9,{"data-slot":"select-trigger","data-size":t,className:(0,ec.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,(0,i.jsx)(rt,{asChild:!0,children:(0,i.jsx)(rB,{className:"size-4 opacity-50"})})]})}function rJ({className:e,children:t,position:n="popper",...r}){return(0,i.jsx)(rn,{children:(0,i.jsxs)(ro,{"data-slot":"select-content",className:(0,ec.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[(0,i.jsx)(rQ,{}),(0,i.jsx)(rm,{className:(0,ec.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,i.jsx)(r0,{})]})})}function rZ({className:e,children:t,...n}){return(0,i.jsxs)(rj,{"data-slot":"select-item",className:(0,ec.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,i.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,i.jsx)(rC,{children:(0,i.jsx)(rK,{className:"size-4"})})}),(0,i.jsx)(rk,{children:t})]})}function rQ({className:e,...t}){return(0,i.jsx)(rP,{"data-slot":"select-scroll-up-button",className:(0,ec.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,i.jsx)(rq,{className:"size-4"})})}function r0({className:e,...t}){return(0,i.jsx)(rT,{"data-slot":"select-scroll-down-button",className:(0,ec.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,i.jsx)(rB,{className:"size-4"})})}function r1({className:e,type:t,...n}){return(0,i.jsx)("input",{type:t,"data-slot":"input",className:(0,ec.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}var r2=s.forwardRef((e,t)=>(0,i.jsx)(k.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));function r5({className:e,...t}){return(0,i.jsx)(r2,{"data-slot":"label",className:(0,ec.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}r2.displayName="Label";var r3="Switch",[r6,r4]=f(r3),[r8,r9]=r6(r3),r7=s.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:l,disabled:c,value:u="on",onCheckedChange:f,form:m,...h}=e,[g,v]=s.useState(null),x=(0,p.s)(t,e=>v(e)),y=s.useRef(!1),b=!g||m||!!g.closest("form"),[w,j]=S({prop:o,defaultProp:a??!1,onChange:f,caller:r3});return(0,i.jsxs)(r8,{scope:n,checked:w,disabled:c,children:[(0,i.jsx)(k.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":or(w),"data-disabled":c?"":void 0,disabled:c,value:u,...h,ref:x,onClick:d(e.onClick,e=>{j(e=>!e),b&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),b&&(0,i.jsx)(on,{control:g,bubbles:!y.current,name:r,value:u,checked:w,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});r7.displayName=r3;var oe="SwitchThumb",ot=s.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,o=r9(oe,n);return(0,i.jsx)(k.span,{"data-state":or(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});ot.displayName=oe;var on=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{let l=s.useRef(null),c=(0,p.s)(l,a),u=t8(n),d=tU(t);return s.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(u!==n&&t){let o=new Event("click",{bubbles:r});t.call(e,n),e.dispatchEvent(o)}},[u,n,r]),(0,i.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function or(e){return e?"checked":"unchecked"}function oo({className:e,...t}){return(0,i.jsx)(r7,{"data-slot":"switch",className:(0,ec.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,i.jsx)(ot,{"data-slot":"switch-thumb",className:(0,ec.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function oa({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,i.jsx)("table",{"data-slot":"table",className:(0,ec.cn)("w-full caption-bottom text-sm",e),...t})})}function oi({className:e,...t}){return(0,i.jsx)("thead",{"data-slot":"table-header",className:(0,ec.cn)("[&_tr]:border-b",e),...t})}function os({className:e,...t}){return(0,i.jsx)("tbody",{"data-slot":"table-body",className:(0,ec.cn)("[&_tr:last-child]:border-0",e),...t})}function ol({className:e,...t}){return(0,i.jsx)("tr",{"data-slot":"table-row",className:(0,ec.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function oc({className:e,...t}){return(0,i.jsx)("th",{"data-slot":"table-head",className:(0,ec.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function ou({className:e,...t}){return(0,i.jsx)("td",{"data-slot":"table-cell",className:(0,ec.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}on.displayName="SwitchBubbleInput";var od="Dialog",[of,op]=f(od),[om,oh]=of(od),og=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,f]=S({prop:r,defaultProp:o??!1,onChange:a,caller:od});return(0,i.jsx)(om,{scope:t,triggerRef:c,contentRef:u,contentId:j(),titleId:j(),descriptionId:j(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(e=>!e),[f]),modal:l,children:n})};og.displayName=od;var ov="DialogTrigger";s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(ov,n),a=(0,p.s)(t,o.triggerRef);return(0,i.jsx)(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":o$(o.open),...r,ref:a,onClick:d(e.onClick,o.onOpenToggle)})}).displayName=ov;var ox="DialogPortal",[oy,ob]=of(ox,{forceMount:void 0}),ow=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=oh(ox,t);return(0,i.jsx)(oy,{scope:t,forceMount:n,children:s.Children.map(r,e=>(0,i.jsx)(K,{present:n||a.open,children:(0,i.jsx)(t4,{asChild:!0,container:o,children:e})}))})};ow.displayName=ox;var oj="DialogOverlay",oN=s.forwardRef((e,t)=>{let n=ob(oj,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oh(oj,e.__scopeDialog);return a.modal?(0,i.jsx)(K,{present:r||a.open,children:(0,i.jsx)(oE,{...o,ref:t})}):null});oN.displayName=oj;var ok=(0,m.TL)("DialogOverlay.RemoveScroll"),oE=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oj,n);return(0,i.jsx)(nK,{as:ok,allowPinchZoom:!0,shards:[o.contentRef],children:(0,i.jsx)(k.div,{"data-state":o$(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),oC="DialogContent",oS=s.forwardRef((e,t)=>{let n=ob(oC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oh(oC,e.__scopeDialog);return(0,i.jsx)(K,{present:r||a.open,children:a.modal?(0,i.jsx)(oP,{...o,ref:t}):(0,i.jsx)(oR,{...o,ref:t})})});oS.displayName=oC;var oP=s.forwardRef((e,t)=>{let n=oh(oC,e.__scopeDialog),r=s.useRef(null),o=(0,p.s)(t,n.contentRef,r);return s.useEffect(()=>{let e=r.current;if(e)return ni(e)},[]),(0,i.jsx)(oT,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:d(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:d(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:d(e.onFocusOutside,e=>e.preventDefault())})}),oR=s.forwardRef((e,t)=>{let n=oh(oC,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return(0,i.jsx)(oT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),oT=s.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,c=oh(oC,n),u=s.useRef(null),d=(0,p.s)(t,u);return ew(),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,i.jsx)(ev,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":o$(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oU,{titleId:c.titleId}),(0,i.jsx)(oW,{contentRef:u,descriptionId:c.descriptionId})]})]})}),oM="DialogTitle",oO=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oM,n);return(0,i.jsx)(k.h2,{id:o.titleId,...r,ref:t})});oO.displayName=oM;var oA="DialogDescription",oL=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oA,n);return(0,i.jsx)(k.p,{id:o.descriptionId,...r,ref:t})});oL.displayName=oA;var oD="DialogClose",oI=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oD,n);return(0,i.jsx)(k.button,{type:"button",...r,ref:t,onClick:d(e.onClick,()=>o.onOpenChange(!1))})});function o$(e){return e?"open":"closed"}oI.displayName=oD;var oF="DialogTitleWarning",[o_,oz]=function(e,t){let n=s.createContext(t),r=e=>{let{children:t,...r}=e,o=s.useMemo(()=>r,Object.values(r));return(0,i.jsx)(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){let o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}(oF,{contentName:oC,titleName:oM,docsSlug:"dialog"}),oU=({titleId:e})=>{let t=oz(oF),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1
|
+
(()=>{var e={};e.id=823,e.ids=[823],e.modules={84:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4542);let o=async e=>[{type:"image/x-icon",sizes:"16x16",url:(0,r.fillMetadataSegment)(".",await e.params,"favicon.ico")+""}]},730:(e,t,n)=>{Promise.resolve().then(n.bind(n,4761))},846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},859:(e,t,n)=>{"use strict";e.exports=n(6612).style},898:(e,t,n)=>{Promise.resolve().then(n.bind(n,8786))},1435:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(9563);n(638);var o=n(4659),a=n(8473),i=n(6820);let s=(0,a.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l({className:e,variant:t,size:n,asChild:a=!1,...l}){let c=a?o.DX:"button";return(0,r.jsx)(c,{"data-slot":"button",className:(0,i.cn)(s({variant:t,size:n,className:e})),...l})}},2873:()=>{},3019:()=>{},3033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:e=>{"use strict";e.exports=require("path")},4761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});let r=(0,n(807).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx","default")},5020:()=>{},5292:()=>{},5735:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a,metadata:()=>o});var r=n(8433);n(3019);let o={title:"Create Next App",description:"Generated by create next app"};function a({children:e}){return(0,r.jsx)("html",{lang:"en",children:(0,r.jsx)("body",{children:e})})}},5788:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,7774,23)),Promise.resolve().then(n.t.bind(n,9136,23)),Promise.resolve().then(n.t.bind(n,6996,23)),Promise.resolve().then(n.t.bind(n,767,23)),Promise.resolve().then(n.t.bind(n,5207,23)),Promise.resolve().then(n.t.bind(n,9855,23)),Promise.resolve().then(n.t.bind(n,8751,23)),Promise.resolve().then(n.t.bind(n,1681,23))},6612:(e,t,n)=>{"use strict";n(2873);var r=n(638),o=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(r),a="undefined"!=typeof process&&process.env&&!0,i=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,o=t.optimizeForSpeed,s=void 0===o?a:o;l(i(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",l("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var t,n=e.prototype;return n.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},n.isOptimizeForSpeed=function(){return this._optimizeForSpeed},n.inject=function(){var e=this;l(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},n.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},n.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},n.insertRule=function(e,t){return l(i(e),"`insertRule` accepts only strings"),"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++},n.replaceRule=function(e,t){this._optimizeForSpeed;var n=this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){a||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}return e},n.deleteRule=function(e){this._serverSheet.deleteRule(e)},n.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},n.cssRules=function(){return this._serverSheet.cssRules},n.makeStyleTag=function(e,t,n){t&&l(i(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var o=document.head||document.getElementsByTagName("head")[0];return n?o.insertBefore(r,n):o.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},u={};function d(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return u[r]||(u[r]="jsx-"+c(e+"-"+n)),u[r]}function f(e,t){var n=e+(t=t.replace(/\/style/gi,"\\/style"));return u[n]||(u[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[n]}var p=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,o=t.optimizeForSpeed,a=void 0!==o&&o;this._sheet=r||new s({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),r&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var n=this.getIdAndRules(e),r=n.styleId,o=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var a=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=a,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return o.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var o=d(r,n);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return f(o,e)}):[f(o,t)]}}return{styleId:d(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=r.createContext(null);m.displayName="StyleSheetContext";o.default.useInsertionEffect||o.default.useLayoutEffect;var h=void 0;function g(e){var t=h||r.useContext(m);return t&&t.add(e),null}g.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},t.style=g},6820:(e,t,n)=>{"use strict";n.d(t,{cn:()=>a});var r=n(5931),o=n(1143);function a(...e){return(0,o.QP)((0,r.$)(e))}},8590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalError:()=>i.a,__next_app__:()=>d,pages:()=>u,routeModule:()=>f,tree:()=>c});var r=n(1611),o=n(9044),a=n(1382),i=n.n(a),s=n(6465),l={};for(let e in s)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>s[e]);n.d(t,l);let c={children:["",{children:["configuration",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(n.bind(n,4761)),"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx"]}]},{metadata:{icon:[async e=>(await Promise.resolve().then(n.bind(n,84))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(n.bind(n,5735)),"/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(n.t.bind(n,7170,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(n.t.bind(n,1475,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(n.t.bind(n,4776,23)),"next/dist/client/components/unauthorized-error"],metadata:{icon:[async e=>(await Promise.resolve().then(n.bind(n,84))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,u=["/Users/edy/Documents/Coding/prime-dev-cli/packages/server/src/app/configuration/page.tsx"],d={require:n,loadChunk:()=>Promise.resolve()},f=new r.AppPageRouteModule({definition:{kind:o.RouteKind.APP_PAGE,page:"/configuration/page",pathname:"/configuration",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},8786:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>aO});var r,o,a,i=n(9563),s=n(638),l=n.t(s,2),c=n(5329),u=n(1435);function d(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function f(e,t=[]){let n=[],r=()=>{let t=n.map(e=>s.createContext(e));return function(n){let r=n?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=s.createContext(r),a=n.length;n=[...n,r];let l=t=>{let{scope:n,children:r,...l}=t,c=n?.[e]?.[a]||o,u=s.useMemo(()=>l,Object.values(l));return(0,i.jsx)(c.Provider,{value:u,children:r})};return l.displayName=t+"Provider",[l,function(n,i){let l=i?.[e]?.[a]||o,c=s.useContext(l);if(c)return c;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}var p=n(831),m=n(4659);function h(e){let t=e+"CollectionProvider",[n,r]=f(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{let{scope:t,children:n}=e,r=s.useRef(null),a=s.useRef(new Map).current;return(0,i.jsx)(o,{scope:t,itemMap:a,collectionRef:r,children:n})};l.displayName=t;let c=e+"CollectionSlot",u=(0,m.TL)(c),d=s.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=a(c,n),s=(0,p.s)(t,o.collectionRef);return(0,i.jsx)(u,{ref:s,children:r})});d.displayName=c;let h=e+"CollectionItemSlot",g="data-radix-collection-item",v=(0,m.TL)(h),x=s.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,l=s.useRef(null),c=(0,p.s)(t,l),u=a(h,n);return s.useEffect(()=>(u.itemMap.set(l,{ref:l,...o}),()=>void u.itemMap.delete(l))),(0,i.jsx)(v,{...{[g]:""},ref:c,children:r})});return x.displayName=h,[{Provider:l,Slot:d,ItemSlot:x},function(t){let n=a(e+"CollectionConsumer",t);return s.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}var g=new WeakMap;function v(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=x(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return -1===n?void 0:e[n]}function x(e){return e!=e||0===e?0:Math.trunc(e)}var y=globalThis?.document?s.useLayoutEffect:()=>{},b=l[" useId ".trim().toString()]||(()=>void 0),w=0;function j(e){let[t,n]=s.useState(b());return y(()=>{e||n(e=>e??String(w++))},[e]),e||(t?`radix-${t}`:"")}var N=n(8803),S=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,m.TL)(`Primitive.${t}`),r=s.forwardRef((e,r)=>{let{asChild:o,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(o?n:t,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function C(e){let t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}var k=l[" useInsertionEffect ".trim().toString()]||y;function E({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[o,a,i]=function({defaultProp:e,onChange:t}){let[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return k(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{let t=s.useRef(void 0!==e);s.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. 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.`)}t.current=l},[l,r])}return[c,s.useCallback(t=>{if(l){let n="function"==typeof t?t(e):t;n!==e&&i.current?.(n)}else a(t)},[l,e,a,i])]}Symbol("RADIX:SYNC_STATE");var R=s.createContext(void 0);function P(e){let t=s.useContext(R);return e||t||"ltr"}var T="rovingFocusGroup.onEntryFocus",M={bubbles:!1,cancelable:!0},O="RovingFocusGroup",[A,_,L]=h(O),[I,D]=f(O,[L]),[$,F]=I(O),z=s.forwardRef((e,t)=>(0,i.jsx)(A.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(A.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(U,{...e,ref:t})})}));z.displayName=O;var U=s.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...h}=e,g=s.useRef(null),v=(0,p.s)(t,g),x=P(a),[y,b]=E({prop:l,defaultProp:c??null,onChange:u,caller:O}),[w,j]=s.useState(!1),N=C(f),k=_(n),R=s.useRef(!1),[A,L]=s.useState(0);return s.useEffect(()=>{let e=g.current;if(e)return e.addEventListener(T,N),()=>e.removeEventListener(T,N)},[N]),(0,i.jsx)($,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:y,onItemFocus:s.useCallback(e=>b(e),[b]),onItemShiftTab:s.useCallback(()=>j(!0),[]),onFocusableItemAdd:s.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:s.useCallback(()=>L(e=>e-1),[]),children:(0,i.jsx)(S.div,{tabIndex:w||0===A?-1:0,"data-orientation":r,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:d(e.onMouseDown,()=>{R.current=!0}),onFocus:d(e.onFocus,e=>{let t=!R.current;if(e.target===e.currentTarget&&t&&!w){let t=new CustomEvent(T,M);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=k().filter(e=>e.focusable);V([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),m)}}R.current=!1}),onBlur:d(e.onBlur,()=>j(!1))})})}),W="RovingFocusGroupItem",H=s.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:l,...c}=e,u=j(),f=a||u,p=F(W,n),m=p.currentTabStopId===f,h=_(n),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:x}=p;return s.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),(0,i.jsx)(A.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:(0,i.jsx)(S.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:d(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:d(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:d(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let o=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(o))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)))return B[o]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>V(n))}}),children:"function"==typeof l?l({isCurrentTabStop:m,hasTabStop:null!=x}):l})})});H.displayName=W;var B={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function V(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var K=e=>{let{present:t,children:n}=e,r=function(e){var t,n;let[r,o]=s.useState(),a=s.useRef(null),i=s.useRef(e),l=s.useRef("none"),[c,u]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},s.useReducer((e,t)=>n[e][t]??e,t));return s.useEffect(()=>{let e=q(a.current);l.current="mounted"===c?e:"none"},[c]),y(()=>{let t=a.current,n=i.current;if(n!==e){let r=l.current,o=q(t);e?u("MOUNT"):"none"===o||t?.display==="none"?u("UNMOUNT"):n&&r!==o?u("ANIMATION_OUT"):u("UNMOUNT"),i.current=e}},[e,u]),y(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let o=q(a.current).includes(n.animationName);if(n.target===r&&o&&(u("ANIMATION_END"),!i.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},o=e=>{e.target===r&&(l.current=q(a.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(e=>{a.current=e?getComputedStyle(e):null,o(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),a=(0,p.s)(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:a}):null};function q(e){return e?.animationName||"none"}K.displayName="Presence";var G="Tabs",[X,Y]=f(G,[D]),J=D(),[Z,Q]=X(G),ee=s.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=P(l),[f,p]=E({prop:r,onChange:o,defaultProp:a??"",caller:G});return(0,i.jsx)(Z,{scope:n,baseId:j(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:c,children:(0,i.jsx)(S.div,{dir:d,"data-orientation":s,...u,ref:t})})});ee.displayName=G;var et="TabsList",en=s.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...o}=e,a=Q(et,n),s=J(n);return(0,i.jsx)(z,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:(0,i.jsx)(S.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});en.displayName=et;var er="TabsTrigger",eo=s.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Q(er,n),l=J(n),c=es(s.baseId,r),u=el(s.baseId,r),f=r===s.value;return(0,i.jsx)(H,{asChild:!0,...l,focusable:!o,active:f,children:(0,i.jsx)(S.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:d(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)}),onKeyDown:d(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)}),onFocus:d(e.onFocus,()=>{let e="manual"!==s.activationMode;f||o||!e||s.onValueChange(r)})})})});eo.displayName=er;var ea="TabsContent",ei=s.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:o,children:a,...l}=e,c=Q(ea,n),u=es(c.baseId,r),d=el(c.baseId,r),f=r===c.value,p=s.useRef(f);return s.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,i.jsx)(K,{present:o||f,children:({present:n})=>(0,i.jsx)(S.div,{"data-state":f?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:n&&a})})});function es(e,t){return`${e}-trigger-${t}`}function el(e,t){return`${e}-content-${t}`}ei.displayName=ea;var ec=n(6820);function eu({className:e,...t}){return(0,i.jsx)(ee,{"data-slot":"tabs",className:(0,ec.cn)("flex flex-col gap-2",e),...t})}function ed({className:e,...t}){return(0,i.jsx)(en,{"data-slot":"tabs-list",className:(0,ec.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ef({className:e,...t}){return(0,i.jsx)(eo,{"data-slot":"tabs-trigger",className:(0,ec.cn)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ep({className:e,...t}){return(0,i.jsx)(ei,{"data-slot":"tabs-content",className:(0,ec.cn)("flex-1 outline-none",e),...t})}function em(e,[t,n]){return Math.min(n,Math.max(t,e))}var eh="dismissableLayer.update",eg=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ev=s.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:c,onDismiss:u,...f}=e,m=s.useContext(eg),[h,g]=s.useState(null),v=h?.ownerDocument??globalThis?.document,[,x]=s.useState({}),y=(0,p.s)(t,e=>g(e)),b=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=b.indexOf(w),N=h?b.indexOf(h):-1,k=m.layersWithOutsidePointerEventsDisabled.size>0,E=N>=j,R=function(e,t=globalThis?.document){let n=C(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ey("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));E&&!n&&(a?.(e),c?.(e),e.defaultPrevented||u?.())},v),P=function(e,t=globalThis?.document){let n=C(e),r=s.useRef(!1);return s.useEffect(()=>{let e=e=>{e.target&&!r.current&&ey("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target;![...m.branches].some(e=>e.contains(t))&&(l?.(e),c?.(e),e.defaultPrevented||u?.())},v);return!function(e,t=globalThis?.document){let n=C(e);s.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{N===m.layers.size-1&&(r?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},v),s.useEffect(()=>{if(h)return n&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(o=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),ex(),()=>{n&&1===m.layersWithOutsidePointerEventsDisabled.size&&(v.body.style.pointerEvents=o)}},[h,v,n,m]),s.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),ex())},[h,m]),s.useEffect(()=>{let e=()=>x({});return document.addEventListener(eh,e),()=>document.removeEventListener(eh,e)},[]),(0,i.jsx)(S.div,{...f,ref:y,style:{pointerEvents:k?E?"auto":"none":void 0,...e.style},onFocusCapture:d(e.onFocusCapture,P.onFocusCapture),onBlurCapture:d(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:d(e.onPointerDownCapture,R.onPointerDownCapture)})});function ex(){let e=new CustomEvent(eh);document.dispatchEvent(e)}function ey(e,t,n,{discrete:r}){let o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&o.addEventListener(e,t,{once:!0}),r)o&&N.flushSync(()=>o.dispatchEvent(a));else o.dispatchEvent(a)}ev.displayName="DismissableLayer",s.forwardRef((e,t)=>{let n=s.useContext(eg),r=s.useRef(null),o=(0,p.s)(t,r);return s.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,i.jsx)(S.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var eb=0;function ew(){s.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ej()),document.body.insertAdjacentElement("beforeend",e[1]??ej()),eb++,()=>{1===eb&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),eb--}},[])}function ej(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var eN="focusScope.autoFocusOnMount",eS="focusScope.autoFocusOnUnmount",eC={bubbles:!1,cancelable:!0},ek=s.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[c,u]=s.useState(null),d=C(o),f=C(a),m=s.useRef(null),h=(0,p.s)(t,e=>u(e)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;c.contains(t)?m.current=t:eP(m.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;null!==t&&(c.contains(t)||eP(m.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&eP(c)});return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,c,g.paused]),s.useEffect(()=>{if(c){eT.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(eN,eC);c.addEventListener(eN,d),c.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(eP(r,{select:t}),document.activeElement!==n)return}(eE(c).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&eP(c))}return()=>{c.removeEventListener(eN,d),setTimeout(()=>{let t=new CustomEvent(eS,eC);c.addEventListener(eS,f),c.dispatchEvent(t),t.defaultPrevented||eP(e??document.body,{select:!0}),c.removeEventListener(eS,f),eT.remove(g)},0)}}},[c,d,f,g]);let v=s.useCallback(e=>{if(!n&&!r||g.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,a]=function(e){let t=eE(e);return[eR(t,e),eR(t.reverse(),e)]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&eP(a,{select:!0})):(e.preventDefault(),n&&eP(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,g.paused]);return(0,i.jsx)(S.div,{tabIndex:-1,...l,ref:h,onKeyDown:v})});function eE(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eR(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function eP(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}ek.displayName="FocusScope";var eT=function(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=eM(e,t)).unshift(t)},remove(t){e=eM(e,t),e[0]?.resume()}}}();function eM(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}let eO=["top","right","bottom","left"],eA=Math.min,e_=Math.max,eL=Math.round,eI=Math.floor,eD=e=>({x:e,y:e}),e$={left:"right",right:"left",bottom:"top",top:"bottom"},eF={start:"end",end:"start"};function ez(e,t){return"function"==typeof e?e(t):e}function eU(e){return e.split("-")[0]}function eW(e){return e.split("-")[1]}function eH(e){return"x"===e?"y":"x"}function eB(e){return"y"===e?"height":"width"}function eV(e){return["top","bottom"].includes(eU(e))?"y":"x"}function eK(e){return e.replace(/start|end/g,e=>eF[e])}function eq(e){return e.replace(/left|right|bottom|top/g,e=>e$[e])}function eG(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function eX(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eY(e,t,n){let r,{reference:o,floating:a}=e,i=eV(t),s=eH(eV(t)),l=eB(s),c=eU(t),u="y"===i,d=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,p=o[l]/2-a[l]/2;switch(c){case"top":r={x:d,y:o.y-a.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-a.width,y:f};break;default:r={x:o.x,y:o.y}}switch(eW(t)){case"start":r[s]-=p*(n&&u?-1:1);break;case"end":r[s]+=p*(n&&u?-1:1)}return r}let eJ=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=eY(c,r,l),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:v,data:x,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[a]:{...p[a],...x}},y&&m<=50&&(m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:u,y:d}=eY(c,f,l)),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function eZ(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ez(t,e),m=eG(p),h=s[f?"floating"===d?"reference":"floating":d],g=eX(await a.getClippingRect({element:null==(n=await (null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await (null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),y=await (null==a.isElement?void 0:a.isElement(x))&&await (null==a.getScale?void 0:a.getScale(x))||{x:1,y:1},b=eX(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:x,strategy:l}):v);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}function eQ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e0(e){return eO.some(t=>e[t]>=0)}async function e1(e,t){let{placement:n,platform:r,elements:o}=e,a=await (null==r.isRTL?void 0:r.isRTL(o.floating)),i=eU(n),s=eW(n),l="y"===eV(n),c=["left","top"].includes(i)?-1:1,u=a&&l?-1:1,d=ez(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}function e2(){return"undefined"!=typeof window}function e5(e){return e6(e)?(e.nodeName||"").toLowerCase():"#document"}function e4(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function e3(e){var t;return null==(t=(e6(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function e6(e){return!!e2()&&(e instanceof Node||e instanceof e4(e).Node)}function e8(e){return!!e2()&&(e instanceof Element||e instanceof e4(e).Element)}function e9(e){return!!e2()&&(e instanceof HTMLElement||e instanceof e4(e).HTMLElement)}function e7(e){return!!e2()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof e4(e).ShadowRoot)}function te(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function tt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function tn(e){let t=tr(),n=e8(e)?ta(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function tr(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function to(e){return["html","body","#document"].includes(e5(e))}function ta(e){return e4(e).getComputedStyle(e)}function ti(e){return e8(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if("html"===e5(e))return e;let t=e.assignedSlot||e.parentNode||e7(e)&&e.host||e3(e);return e7(t)?t.host:t}function tl(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=ts(t);return to(n)?t.ownerDocument?t.ownerDocument.body:t.body:e9(n)&&te(n)?n:e(n)}(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=e4(o);if(a){let e=tc(i);return t.concat(i,i.visualViewport||[],te(o)?o:[],e&&n?tl(e):[])}return t.concat(o,tl(o,[],n))}function tc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tu(e){let t=ta(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=e9(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=eL(n)!==a||eL(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function td(e){return e8(e)?e:e.contextElement}function tf(e){let t=td(e);if(!e9(t))return eD(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:a}=tu(t),i=(a?eL(n.width):n.width)/r,s=(a?eL(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}let tp=eD(0);function tm(e){let t=e4(e);return tr()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tp}function th(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),i=td(e),s=eD(1);t&&(r?e8(r)&&(s=tf(r)):s=tf(e));let l=(void 0===(o=n)&&(o=!1),r&&(!o||r===e4(i))&&o)?tm(i):eD(0),c=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,d=a.width/s.x,f=a.height/s.y;if(i){let e=e4(i),t=r&&e8(r)?e4(r):r,n=e,o=tc(n);for(;o&&r&&t!==n;){let e=tf(o),t=o.getBoundingClientRect(),r=ta(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=a,u+=i,o=tc(n=e4(o))}}return eX({width:d,height:f,x:c,y:u})}function tg(e,t){let n=ti(e).scrollLeft;return t?t.left+n:th(e3(e)).left+n}function tv(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:tg(e,r)),y:r.top+t.scrollTop}}function tx(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=e4(e),r=e3(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let e=tr();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){let t=e3(e),n=ti(e),r=e.ownerDocument.body,o=e_(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=e_(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+tg(e),s=-n.scrollTop;return"rtl"===ta(r).direction&&(i+=e_(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(e3(e));else if(e8(t))r=function(e,t){let n=th(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=e9(e)?tf(e):eD(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y;return{width:i,height:s,x:o*a.x,y:r*a.y}}(t,n);else{let n=tm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eX(r)}function ty(e){return"static"===ta(e).position}function tb(e,t){if(!e9(e)||"fixed"===ta(e).position)return null;if(t)return t(e);let n=e.offsetParent;return e3(e)===n&&(n=n.ownerDocument.body),n}function tw(e,t){let n=e4(e);if(tt(e))return n;if(!e9(e)){let t=ts(e);for(;t&&!to(t);){if(e8(t)&&!ty(t))return t;t=ts(t)}return n}let r=tb(e,t);for(;r&&["table","td","th"].includes(e5(r))&&ty(r);)r=tb(r,t);return r&&to(r)&&ty(r)&&!tn(r)?n:r||function(e){let t=ts(e);for(;e9(t)&&!to(t);){if(tn(t))return t;if(tt(t))break;t=ts(t)}return null}(e)||n}let tj=async function(e){let t=this.getOffsetParent||tw,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=e9(t),o=e3(t),a="fixed"===n,i=th(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=eD(0);if(r||!r&&!a)if(("body"!==e5(t)||te(o))&&(s=ti(t)),r){let e=th(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=tg(o));a&&!r&&o&&(l.x=tg(o));let c=!o||r||a?eD(0):tv(o,s);return{x:i.left+s.scrollLeft-l.x-c.x,y:i.top+s.scrollTop-l.y-c.y,width:i.width,height:i.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},tN={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a="fixed"===o,i=e3(r),s=!!t&&tt(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=eD(1),u=eD(0),d=e9(r);if((d||!d&&!a)&&(("body"!==e5(r)||te(i))&&(l=ti(r)),e9(r))){let e=th(r);c=tf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=!i||d||a?eD(0):tv(i,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:e3,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[..."clippingAncestors"===n?tt(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=tl(e,[],!1).filter(e=>e8(e)&&"body"!==e5(e)),o=null,a="fixed"===ta(e).position,i=a?ts(e):e;for(;e8(i)&&!to(i);){let t=ta(i),n=tn(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||te(i)&&!n&&function e(t,n){let r=ts(t);return!(r===n||!e8(r)||to(r))&&("fixed"===ta(r).position||e(r,n))}(e,i))?r=r.filter(e=>e!==i):o=t,i=ts(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=a[0],s=a.reduce((e,n)=>{let r=tx(t,n,o);return e.top=e_(r.top,e.top),e.right=eA(r.right,e.right),e.bottom=eA(r.bottom,e.bottom),e.left=e_(r.left,e.left),e},tx(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:tw,getElementRects:tj,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=tu(e);return{width:t,height:n}},getScale:tf,isElement:e8,isRTL:function(e){return"rtl"===ta(e).direction}};function tS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let tC=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ez(e,t)||{};if(null==c)return{};let d=eG(u),f={x:n,y:r},p=eH(eV(o)),m=eB(p),h=await i.getDimensions(c),g="y"===p,v=g?"clientHeight":"clientWidth",x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],y=f[p]-a.reference[p],b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(c)),w=b?b[v]:0;w&&await (null==i.isElement?void 0:i.isElement(b))||(w=s.floating[v]||a.floating[m]);let j=w/2-h[m]/2-1,N=eA(d[g?"top":"left"],j),S=eA(d[g?"bottom":"right"],j),C=w-h[m]-S,k=w/2-h[m]/2+(x/2-y/2),E=e_(N,eA(k,C)),R=!l.arrow&&null!=eW(o)&&k!==E&&a.reference[m]/2-(k<N?N:S)-h[m]/2<0,P=R?k<N?k-N:k-C:0;return{[p]:f[p]+P,data:{[p]:E,centerOffset:k-E-P,...R&&{alignmentOffset:P}},reset:R}}}),tk=(e,t,n)=>{let r=new Map,o={platform:tN,...n},a={...o.platform,_c:r};return eJ(e,t,{...o,platform:a})};var tE="undefined"!=typeof document?s.useLayoutEffect:function(){};function tR(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!tR(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tR(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function tP(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tT(e,t){let n=tP(e);return Math.round(t*n)/n}function tM(e){let t=s.useRef(e);return tE(()=>{t.current=e}),t}let tO=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?tC({element:n.current,padding:r}).fn(t):{}:n?tC({element:n,padding:r}).fn(t):{}}}),tA=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await e1(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}}(e),options:[e,t]}),t_=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ez(e,t),c={x:n,y:r},u=await eZ(t,l),d=eV(eU(o)),f=eH(d),p=c[f],m=c[d];if(a){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+u[e],r=p-u[t];p=e_(n,eA(p,r))}if(i){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=m+u[e],r=m-u[t];m=e_(n,eA(m,r))}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}}(e),options:[e,t]}),tL=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ez(e,t),u={x:n,y:r},d=eV(o),f=eH(d),p=u[f],m=u[d],h=ez(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,x;let e="y"===f?"width":"height",t=["top","left"].includes(eU(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(x=i.offset)?void 0:x[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}}(e),options:[e,t]}),tI=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,a,i;let{placement:s,middlewareData:l,rects:c,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...y}=ez(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let b=eU(s),w=eV(u),j=eU(u)===u,N=await (null==d.isRTL?void 0:d.isRTL(f.floating)),S=h||(j||!x?[eq(u)]:function(e){let t=eq(e);return[eK(e),t,eK(t)]}(u)),C="none"!==v;!h&&C&&S.push(...function(e,t,n,r){let o=eW(e),a=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(eU(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(eK)))),a}(u,x,v,N));let k=[u,...S],E=await eZ(t,y),R=[],P=(null==(r=l.flip)?void 0:r.overflows)||[];if(p&&R.push(E[b]),m){let e=function(e,t,n){void 0===n&&(n=!1);let r=eW(e),o=eH(eV(e)),a=eB(o),i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=eq(i)),[i,eq(i)]}(s,c,N);R.push(E[e[0]],E[e[1]])}if(P=[...P,{placement:s,overflows:R}],!R.every(e=>e<=0)){let e=((null==(o=l.flip)?void 0:o.index)||0)+1,t=k[e];if(t&&("alignment"!==m||w===eV(t)||P.every(e=>e.overflows[0]>0&&eV(e.placement)===w)))return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(a=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(g){case"bestFit":{let e=null==(i=P.filter(e=>{if(C){let t=eV(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=u}if(s!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}),tD=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,a,{placement:i,rects:s,platform:l,elements:c}=t,{apply:u=()=>{},...d}=ez(e,t),f=await eZ(t,d),p=eU(i),m=eW(i),h="y"===eV(i),{width:g,height:v}=s.floating;"top"===p||"bottom"===p?(o=p,a=m===(await (null==l.isRTL?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(a=p,o="end"===m?"top":"bottom");let x=v-f.top-f.bottom,y=g-f.left-f.right,b=eA(v-f[o],x),w=eA(g-f[a],y),j=!t.middlewareData.shift,N=b,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=x),j&&!m){let e=e_(f.left,0),t=e_(f.right,0),n=e_(f.top,0),r=e_(f.bottom,0);h?S=g-2*(0!==e||0!==t?e+t:e_(f.left,f.right)):N=v-2*(0!==n||0!==r?n+r:e_(f.top,f.bottom))}await u({...t,availableWidth:S,availableHeight:N});let C=await l.getDimensions(c.floating);return g!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),t$=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=ez(e,t);switch(r){case"referenceHidden":{let e=eQ(await eZ(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:e0(e)}}}case"escaped":{let e=eQ(await eZ(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:e0(e)}}}default:return{}}}}}(e),options:[e,t]}),tF=(e,t)=>({...tO(e),options:[e,t]});var tz=s.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...a}=e;return(0,i.jsx)(S.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function tU(e){let[t,n]=s.useState(void 0);return y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}tz.displayName="Arrow";var tW="Popper",[tH,tB]=f(tW),[tV,tK]=tH(tW),tq=e=>{let{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return(0,i.jsx)(tV,{scope:t,anchor:r,onAnchorChange:o,children:n})};tq.displayName=tW;var tG="PopperAnchor",tX=s.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,a=tK(tG,n),l=s.useRef(null),c=(0,p.s)(t,l);return s.useEffect(()=>{a.onAnchorChange(r?.current||l.current)}),r?null:(0,i.jsx)(S.div,{...o,ref:c})});tX.displayName=tG;var tY="PopperContent",[tJ,tZ]=tH(tY),tQ=s.forwardRef((e,t)=>{let{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...x}=e,b=tK(tY,n),[w,j]=s.useState(null),k=(0,p.s)(t,e=>j(e)),[E,R]=s.useState(null),P=tU(E),T=P?.width??0,M=P?.height??0,O="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(d)?d:[d],_=A.length>0,L={padding:O,boundary:A.filter(t5),altBoundary:_},{refs:I,floatingStyles:D,placement:$,isPositioned:F,middlewareData:z}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=s.useState(r);tR(p,r)||m(r);let[h,g]=s.useState(null),[v,x]=s.useState(null),y=s.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),b=s.useCallback(e=>{e!==C.current&&(C.current=e,x(e))},[]),w=a||h,j=i||v,S=s.useRef(null),C=s.useRef(null),k=s.useRef(d),E=null!=c,R=tM(c),P=tM(o),T=tM(u),M=s.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:p};P.current&&(e.platform=P.current),tk(S.current,C.current,e).then(e=>{let t={...e,isPositioned:!1!==T.current};O.current&&!tR(k.current,t)&&(k.current=t,N.flushSync(()=>{f(t)}))})},[p,t,n,P,T]);tE(()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let O=s.useRef(!1);tE(()=>(O.current=!0,()=>{O.current=!1}),[]),tE(()=>{if(w&&(S.current=w),j&&(C.current=j),w&&j){if(R.current)return R.current(w,j,M);M()}},[w,j,M,R,E]);let A=s.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:b}),[y,b]),_=s.useMemo(()=>({reference:w,floating:j}),[w,j]),L=s.useMemo(()=>{let e={position:n,left:0,top:0};if(!_.floating)return e;let t=tT(_.floating,d.x),r=tT(_.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...tP(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,_.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:M,refs:A,elements:_,floatingStyles:L}),[d,M,A,_,L])}({strategy:"fixed",placement:r+("center"!==a?"-"+a:""),whileElementsMounted:(...e)=>(function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=td(e),d=a||i?[...u?tl(u):[],...tl(t)]:[];d.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});let f=u&&l?function(e,t){let n,r=null,o=e3(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;let m=eI(d),h=eI(o.clientWidth-(u+f)),g={rootMargin:-m+"px "+-h+"px "+-eI(o.clientHeight-(d+p))+"px "+-eI(u)+"px",threshold:e_(0,eA(1,l))||1},v=!0;function x(t){let r=t[0].intersectionRatio;if(r!==l){if(!v)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||tS(c,e.getBoundingClientRect())||i(),v=!1}try{r=new IntersectionObserver(x,{...g,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(x,g)}r.observe(e)}(!0),a}(u,n):null,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let h=c?th(e):null;return c&&function t(){let r=th(e);h&&!tS(h,r)&&n(),h=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{a&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[tA({mainAxis:o+M,alignmentAxis:l}),u&&t_({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?tL():void 0,...L}),u&&tI({...L}),tD({...L,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),E&&tF({element:E,padding:c}),t4({arrowWidth:T,arrowHeight:M}),h&&t$({strategy:"referenceHidden",...L})]}),[U,W]=t3($),H=C(v);y(()=>{F&&H?.()},[F,H]);let B=z.arrow?.x,V=z.arrow?.y,K=z.arrow?.centerOffset!==0,[q,G]=s.useState();return y(()=>{w&&G(window.getComputedStyle(w).zIndex)},[w]),(0,i.jsx)("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:F?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(tJ,{scope:n,placedSide:U,onArrowChange:R,arrowX:B,arrowY:V,shouldHideArrow:K,children:(0,i.jsx)(S.div,{"data-side":U,"data-align":W,...x,ref:k,style:{...x.style,animation:F?void 0:"none"}})})})});tQ.displayName=tY;var t0="PopperArrow",t1={top:"bottom",right:"left",bottom:"top",left:"right"},t2=s.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=tZ(t0,n),a=t1[o.placedSide];return(0,i.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(tz,{...r,ref:t,style:{...r.style,display:"block"}})})});function t5(e){return null!==e}t2.displayName=t0;var t4=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,c]=t3(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+s/2,p="",m="";return"bottom"===l?(p=a?u:`${d}px`,m=`${-s}px`):"top"===l?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):"right"===l?(p=`${-s}px`,m=a?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function t3(e){let[t,n="center"]=e.split("-");return[t,n]}var t6=s.forwardRef((e,t)=>{let{container:n,...r}=e,[o,a]=s.useState(!1);y(()=>a(!0),[]);let l=n||o&&globalThis?.document?.body;return l?N.createPortal((0,i.jsx)(S.div,{...r,ref:t}),l):null});function t8(e){let t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}t6.displayName="Portal";var t9=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"});s.forwardRef((e,t)=>(0,i.jsx)(S.span,{...e,ref:t,style:{...t9,...e.style}})).displayName="VisuallyHidden";var t7=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ne=new WeakMap,nt=new WeakMap,nn={},nr=0,no=function(e){return e&&(e.host||no(e.parentNode))},na=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=no(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});nn[n]||(nn[n]=new WeakMap);var a=nn[n],i=[],s=new Set,l=new Set(o),c=function(e){!e||s.has(e)||(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(ne.get(e)||0)+1,c=(a.get(e)||0)+1;ne.set(e,l),a.set(e,c),i.push(e),1===l&&o&&nt.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),nr++,function(){i.forEach(function(e){var t=ne.get(e)-1,o=a.get(e)-1;ne.set(e,t),a.set(e,o),t||(nt.has(e)||e.removeAttribute(r),nt.delete(e)),o||e.removeAttribute(n)}),--nr||(ne=new WeakMap,ne=new WeakMap,nt=new WeakMap,nn={})}},ni=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||t7(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),na(r,o,n,"aria-hidden")):function(){return null}},ns=function(){return(ns=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function nl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}Object.create;Object.create;var nc=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),nu="width-before-scroll-bar";function nd(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var nf="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,np=new WeakMap;function nm(e){return e}var nh=function(e){void 0===e&&(e={});var t,n,r,o,a=(t=null,void 0===n&&(n=nm),r=[],o=!1,{read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}});return a.options=ns({async:!0,ssr:!1},e),a}(),ng=function(){},nv=s.forwardRef(function(e,t){var n,r,o,a,i=s.useRef(null),l=s.useState({onScrollCapture:ng,onWheelCapture:ng,onTouchMoveCapture:ng}),c=l[0],u=l[1],d=e.forwardProps,f=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,g=e.shards,v=e.sideCar,x=e.noRelative,y=e.noIsolation,b=e.inert,w=e.allowPinchZoom,j=e.as,N=e.gapMode,S=nl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(n=[i,t],r=function(e){return n.forEach(function(t){return nd(t,e)})},(o=(0,s.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,a=o.facade,nf(function(){var e=np.get(a);if(e){var t=new Set(e),r=new Set(n),o=a.current;t.forEach(function(e){r.has(e)||nd(e,null)}),r.forEach(function(e){t.has(e)||nd(e,o)})}np.set(a,n)},[n]),a),k=ns(ns({},S),c);return s.createElement(s.Fragment,null,h&&s.createElement(v,{sideCar:nh,removeScrollBar:m,shards:g,noRelative:x,noIsolation:y,inert:b,setCallbacks:u,allowPinchZoom:!!w,lockRef:i,gapMode:N}),d?s.cloneElement(s.Children.only(f),ns(ns({},k),{ref:C})):s.createElement(void 0===j?"div":j,ns({},k,{className:p,ref:C}),f))});nv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},nv.classNames={fullWidth:nu,zeroRight:nc};var nx=function(e){var t=e.sideCar,n=nl(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return s.createElement(r,ns({},n))};nx.isSideCarExport=!0;var ny=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,i;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nb=function(){var e=ny();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nw=function(){var e=nb();return function(t){return e(t.styles,t.dynamic),null}},nj={left:0,top:0,right:0,gap:0},nN=function(e){return parseInt(e||"",10)||0},nS=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[nN(n),nN(r),nN(o)]},nC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return nj;var t=nS(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nk=nw(),nE="data-scroll-locked",nR=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(nE,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(nc," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nu," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nc," .").concat(nc," {\n right: 0 ").concat(r,";\n }\n \n .").concat(nu," .").concat(nu," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(nE,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},nP=function(){var e=parseInt(document.body.getAttribute(nE)||"0",10);return isFinite(e)?e:0},nT=function(){s.useEffect(function(){return document.body.setAttribute(nE,(nP()+1).toString()),function(){var e=nP()-1;e<=0?document.body.removeAttribute(nE):document.body.setAttribute(nE,e.toString())}},[])},nM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;nT();var a=s.useMemo(function(){return nC(o)},[o]);return s.createElement(nk,{styles:nR(a,!t,o,n?"":"!important")})},nO=!1;if("undefined"!=typeof window)try{var nA=Object.defineProperty({},"passive",{get:function(){return nO=!0,!0}});window.addEventListener("test",nA,nA),window.removeEventListener("test",nA,nA)}catch(e){nO=!1}var n_=!!nO&&{passive:!1},nL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},nI=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),nD(e,r)){var o=n$(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nD=function(e,t){return"v"===e?nL(t,"overflowY"):nL(t,"overflowX")},n$=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},nF=function(e,t,n,r,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),s=i*r,l=n.target,c=t.contains(l),u=!1,d=s>0,f=0,p=0;do{if(!l)break;var m=n$(e,l),h=m[0],g=m[1]-m[2]-i*h;(h||g)&&nD(e,l)&&(f+=g,p+=h);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return d&&(o&&1>Math.abs(f)||!o&&s>f)?u=!0:!d&&(o&&1>Math.abs(p)||!o&&-s>p)&&(u=!0),u},nz=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nU=function(e){return[e.deltaX,e.deltaY]},nW=function(e){return e&&"current"in e?e.current:e},nH=0,nB=[];let nV=(r=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(nH++)[0],a=s.useState(nw)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(nW),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=nz(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],c="deltaY"in e?e.deltaY:s[1]-a[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=nI(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=nI(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return nF(p,t,e,"h"===p?l:c,!0)},[]),c=s.useCallback(function(e){if(nB.length&&nB[nB.length-1]===a){var n="deltaY"in e?nU(e):nz(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(nW).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?l(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=s.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=s.useCallback(function(e){n.current=nz(e),r.current=void 0},[]),f=s.useCallback(function(t){u(t.type,nU(t),t.target,l(t,e.lockRef.current))},[]),p=s.useCallback(function(t){u(t.type,nz(t),t.target,l(t,e.lockRef.current))},[]);s.useEffect(function(){return nB.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,n_),document.addEventListener("touchmove",c,n_),document.addEventListener("touchstart",d,n_),function(){nB=nB.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,n_),document.removeEventListener("touchmove",c,n_),document.removeEventListener("touchstart",d,n_)}},[]);var m=e.removeScrollBar,h=e.inert;return s.createElement(s.Fragment,null,h?s.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?s.createElement(nM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},nh.useMedium(r),nx);var nK=s.forwardRef(function(e,t){return s.createElement(nv,ns({},e,{ref:t,sideCar:nV}))});nK.classNames=nv.classNames;var nq=[" ","Enter","ArrowUp","ArrowDown"],nG=[" ","Enter"],nX="Select",[nY,nJ,nZ]=h(nX),[nQ,n0]=f(nX,[nZ,tB]),n1=tB(),[n2,n5]=nQ(nX),[n4,n3]=nQ(nX),n6=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:l,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,v=n1(t),[x,y]=s.useState(null),[b,w]=s.useState(null),[N,S]=s.useState(!1),C=P(d),[k,R]=E({prop:r,defaultProp:o??!1,onChange:a,caller:nX}),[T,M]=E({prop:l,defaultProp:c,onChange:u,caller:nX}),O=s.useRef(null),A=!x||g||!!x.closest("form"),[_,L]=s.useState(new Set),I=Array.from(_).map(e=>e.props.value).join(";");return(0,i.jsx)(tq,{...v,children:(0,i.jsxs)(n2,{required:h,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:N,onValueNodeHasChildrenChange:S,contentId:j(),value:T,onValueChange:M,open:k,onOpenChange:R,dir:C,triggerPointerDownPosRef:O,disabled:m,children:[(0,i.jsx)(nY.Provider,{scope:t,children:(0,i.jsx)(n4,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(e=>{L(t=>new Set(t).add(e))},[]),onNativeOptionRemove:s.useCallback(e=>{L(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,i.jsxs)(rA,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:T,onChange:e=>M(e.target.value),disabled:m,form:g,children:[void 0===T?(0,i.jsx)("option",{value:""}):null,Array.from(_)]},I):null]})})};n6.displayName=nX;var n8="SelectTrigger",n9=s.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,a=n1(n),l=n5(n8,n),c=l.disabled||r,u=(0,p.s)(t,l.onTriggerChange),f=nJ(n),m=s.useRef("touch"),[h,g,v]=rL(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=rI(t,e,n);void 0!==r&&l.onValueChange(r.value)}),x=e=>{c||(l.onOpenChange(!0),v()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,i.jsx)(tX,{asChild:!0,...a,children:(0,i.jsx)(S.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":r_(l.value)?"":void 0,...o,ref:u,onClick:d(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&x(e)}),onPointerDown:d(o.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(x(e),e.preventDefault())}),onKeyDown:d(o.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||g(e.key),(!t||" "!==e.key)&&nq.includes(e.key)&&(x(),e.preventDefault())})})})});n9.displayName=n8;var n7="SelectValue",re=s.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...l}=e,c=n5(n7,n),{onValueNodeHasChildrenChange:u}=c,d=void 0!==a,f=(0,p.s)(t,c.onValueNodeChange);return y(()=>{u(d)},[u,d]),(0,i.jsx)(S.span,{...l,ref:f,style:{pointerEvents:"none"},children:r_(c.value)?(0,i.jsx)(i.Fragment,{children:s}):a})});re.displayName=n7;var rt=s.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,i.jsx)(S.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});rt.displayName="SelectIcon";var rn=e=>(0,i.jsx)(t6,{asChild:!0,...e});rn.displayName="SelectPortal";var rr="SelectContent",ro=s.forwardRef((e,t)=>{let n=n5(rr,e.__scopeSelect),[r,o]=s.useState();return(y(()=>{o(new DocumentFragment)},[]),n.open)?(0,i.jsx)(rl,{...e,ref:t}):r?N.createPortal((0,i.jsx)(ra,{scope:e.__scopeSelect,children:(0,i.jsx)(nY.Slot,{scope:e.__scopeSelect,children:(0,i.jsx)("div",{children:e.children})})}),r):null});ro.displayName=rr;var[ra,ri]=nQ(rr),rs=(0,m.TL)("SelectContent.RemoveScroll"),rl=s.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:l,side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:b,...w}=e,j=n5(rr,n),[N,S]=s.useState(null),[C,k]=s.useState(null),E=(0,p.s)(t,e=>S(e)),[R,P]=s.useState(null),[T,M]=s.useState(null),O=nJ(n),[A,_]=s.useState(!1),L=s.useRef(!1);s.useEffect(()=>{if(N)return ni(N)},[N]),ew();let I=s.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==o))return},[O,C]),D=s.useCallback(()=>I([R,N]),[I,R,N]);s.useEffect(()=>{A&&D()},[A,D]);let{onOpenChange:$,triggerPointerDownPosRef:F}=j;s.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():N.contains(n.target)||$(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[N,$,F]),s.useEffect(()=>{let e=()=>$(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[$]);let[z,U]=rL(e=>{let t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=rI(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),W=s.useCallback((e,t,n)=>{let r=!L.current&&!n;(void 0!==j.value&&j.value===t||r)&&(P(e),r&&(L.current=!0))},[j.value]),H=s.useCallback(()=>N?.focus(),[N]),B=s.useCallback((e,t,n)=>{let r=!L.current&&!n;(void 0!==j.value&&j.value===t||r)&&M(e)},[j.value]),V="popper"===r?ru:rc,K=V===ru?{side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:y,avoidCollisions:b}:{};return(0,i.jsx)(ra,{scope:n,content:N,viewport:C,onViewportChange:k,itemRefCallback:W,selectedItem:R,onItemLeave:H,itemTextRefCallback:B,focusSelectedItem:D,selectedItemText:T,position:r,isPositioned:A,searchRef:z,children:(0,i.jsx)(nK,{as:rs,allowPinchZoom:!0,children:(0,i.jsx)(ek,{asChild:!0,trapped:j.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:d(o,e=>{j.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,i.jsx)(ev,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:(0,i.jsx)(V,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:e=>e.preventDefault(),...w,...K,onPlaced:()=>_(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:d(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>I(t)),e.preventDefault()}})})})})})})});rl.displayName="SelectContentImpl";var rc=s.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,a=n5(rr,n),l=ri(rr,n),[c,u]=s.useState(null),[d,f]=s.useState(null),m=(0,p.s)(t,e=>f(e)),h=nJ(n),g=s.useRef(!1),v=s.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:w,focusSelectedItem:j}=l,N=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&x&&b&&w){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=w.getBoundingClientRect();if("rtl"!==a.dir){let r=o.left-t.left,a=n.left-r,i=e.left-a,s=e.width+i,l=Math.max(s,t.width),u=em(a,[10,Math.max(10,window.innerWidth-10-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{let r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,s=e.width+i,l=Math.max(s,t.width),u=em(a,[10,Math.max(10,window.innerWidth-10-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}let i=h(),s=window.innerHeight-20,l=x.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),v=f+p+l+parseInt(u.paddingBottom,10)+m,y=Math.min(5*b.offsetHeight,v),j=window.getComputedStyle(x),N=parseInt(j.paddingTop,10),S=parseInt(j.paddingBottom,10),C=e.top+e.height/2-10,k=b.offsetHeight/2,E=f+p+(b.offsetTop+k);if(E<=C){let e=i.length>0&&b===i[i.length-1].ref.current;c.style.bottom="0px";let t=Math.max(s-C,k+(e?S:0)+(d.clientHeight-x.offsetTop-x.offsetHeight)+m);c.style.height=E+t+"px"}else{let e=i.length>0&&b===i[0].ref.current;c.style.top="0px";let t=Math.max(C,f+x.offsetTop+(e?N:0)+k);c.style.height=t+(v-E)+"px",x.scrollTop=E-C+x.offsetTop}c.style.margin="10px 0",c.style.minHeight=y+"px",c.style.maxHeight=s+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,d,x,b,w,a.dir,r]);y(()=>N(),[N]);let[C,k]=s.useState();y(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);let E=s.useCallback(e=>{e&&!0===v.current&&(N(),j?.(),v.current=!1)},[N,j]);return(0,i.jsx)(rd,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:(0,i.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:(0,i.jsx)(S.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});rc.displayName="SelectItemAlignedPosition";var ru=s.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...a}=e,s=n1(n);return(0,i.jsx)(tQ,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});ru.displayName="SelectPopperPosition";var[rd,rf]=nQ(rr,{}),rp="SelectViewport",rm=s.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,a=ri(rp,n),l=rf(rp,n),c=(0,p.s)(t,a.onViewportChange),u=s.useRef(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("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:r}),(0,i.jsx)(nY.Slot,{scope:n,children:(0,i.jsx)(S.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:d(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let a=o+e,i=Math.min(r,a),s=a-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});rm.displayName=rp;var rh="SelectGroup",[rg,rv]=nQ(rh);s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=j();return(0,i.jsx)(rg,{scope:n,id:o,children:(0,i.jsx)(S.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=rh;var rx="SelectLabel";s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=rv(rx,n);return(0,i.jsx)(S.div,{id:o.id,...r,ref:t})}).displayName=rx;var ry="SelectItem",[rb,rw]=nQ(ry),rj=s.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...l}=e,c=n5(ry,n),u=ri(ry,n),f=c.value===r,[m,h]=s.useState(a??""),[g,v]=s.useState(!1),x=(0,p.s)(t,e=>u.itemRefCallback?.(e,r,o)),y=j(),b=s.useRef("touch"),w=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,i.jsx)(rb,{scope:n,value:r,disabled:o,textId:y,isSelected:f,onItemTextChange:s.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,i.jsx)(nY.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:(0,i.jsx)(S.div,{role:"option","aria-labelledby":y,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:x,onFocus:d(l.onFocus,()=>v(!0)),onBlur:d(l.onBlur,()=>v(!1)),onClick:d(l.onClick,()=>{"mouse"!==b.current&&w()}),onPointerUp:d(l.onPointerUp,()=>{"mouse"===b.current&&w()}),onPointerDown:d(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:d(l.onPointerMove,e=>{b.current=e.pointerType,o?u.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:d(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:d(l.onKeyDown,e=>{(u.searchRef?.current===""||" "!==e.key)&&(nG.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});rj.displayName=ry;var rN="SelectItemText",rS=s.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...a}=e,l=n5(rN,n),c=ri(rN,n),u=rw(rN,n),d=n3(rN,n),[f,m]=s.useState(null),h=(0,p.s)(t,e=>m(e),u.onItemTextChange,e=>c.itemTextRefCallback?.(e,u.value,u.disabled)),g=f?.textContent,v=s.useMemo(()=>(0,i.jsx)("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=d;return y(()=>(x(v),()=>b(v)),[x,b,v]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S.span,{id:u.textId,...a,ref:h}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren?N.createPortal(a.children,l.valueNode):null]})});rS.displayName=rN;var rC="SelectItemIndicator",rk=s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return rw(rC,n).isSelected?(0,i.jsx)(S.span,{"aria-hidden":!0,...r,ref:t}):null});rk.displayName=rC;var rE="SelectScrollUpButton",rR=s.forwardRef((e,t)=>{let n=ri(rE,e.__scopeSelect),r=rf(rE,e.__scopeSelect),[o,a]=s.useState(!1),l=(0,p.s)(t,r.onScrollButtonChange);return y(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(rM,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});rR.displayName=rE;var rP="SelectScrollDownButton",rT=s.forwardRef((e,t)=>{let n=ri(rP,e.__scopeSelect),r=rf(rP,e.__scopeSelect),[o,a]=s.useState(!1),l=(0,p.s)(t,r.onScrollButtonChange);return y(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(rM,{...e,ref:l,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});rT.displayName=rP;var rM=s.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,a=ri("SelectScrollButton",n),l=s.useRef(null),c=nJ(n),u=s.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),y(()=>{let e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,i.jsx)(S.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:d(o.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(r,50))}),onPointerMove:d(o.onPointerMove,()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(r,50))}),onPointerLeave:d(o.onPointerLeave,()=>{u()})})});s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,i.jsx)(S.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var rO="SelectArrow";s.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=n1(n),a=n5(rO,n),s=ri(rO,n);return a.open&&"popper"===s.position?(0,i.jsx)(t2,{...o,...r,ref:t}):null}).displayName=rO;var rA=s.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let o=s.useRef(null),a=(0,p.s)(r,o),l=t8(t);return s.useEffect(()=>{let e=o.current;if(!e)return;let n=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(l!==t&&n){let r=new Event("change",{bubbles:!0});n.call(e,t),e.dispatchEvent(r)}},[l,t]),(0,i.jsx)(S.select,{...n,style:{...t9,...n.style},ref:a,defaultValue:t})});function r_(e){return""===e||void 0===e}function rL(e){let t=C(e),n=s.useRef(""),r=s.useRef(0),o=s.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function rI(e,t,n){var r,o;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,s=(r=e,o=Math.max(i,0),r.map((e,t)=>r[(o+t)%r.length]));1===a.length&&(s=s.filter(e=>e!==n));let l=s.find(e=>e.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==n?l:void 0}rA.displayName="SelectBubbleInput";let rD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),rF=e=>{let t=r$(e);return t.charAt(0).toUpperCase()+t.slice(1)},rz=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),rU=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var rW={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let rH=(0,s.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>(0,s.createElement)("svg",{ref:c,...rW,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:rz("lucide",o),...!a&&!rU(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(a)?a:[a]])),rB=(e,t)=>{let n=(0,s.forwardRef)(({className:n,...r},o)=>(0,s.createElement)(rH,{ref:o,iconNode:t,className:rz(`lucide-${rD(rF(e))}`,`lucide-${e}`,n),...r}));return n.displayName=rF(e),n},rV=rB("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),rK=rB("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),rq=rB("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function rG({...e}){return(0,i.jsx)(n6,{"data-slot":"select",...e})}function rX({...e}){return(0,i.jsx)(re,{"data-slot":"select-value",...e})}function rY({className:e,size:t="default",children:n,...r}){return(0,i.jsxs)(n9,{"data-slot":"select-trigger","data-size":t,className:(0,ec.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,(0,i.jsx)(rt,{asChild:!0,children:(0,i.jsx)(rV,{className:"size-4 opacity-50"})})]})}function rJ({className:e,children:t,position:n="popper",...r}){return(0,i.jsx)(rn,{children:(0,i.jsxs)(ro,{"data-slot":"select-content",className:(0,ec.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[(0,i.jsx)(rQ,{}),(0,i.jsx)(rm,{className:(0,ec.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,i.jsx)(r0,{})]})})}function rZ({className:e,children:t,...n}){return(0,i.jsxs)(rj,{"data-slot":"select-item",className:(0,ec.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[(0,i.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,i.jsx)(rk,{children:(0,i.jsx)(rK,{className:"size-4"})})}),(0,i.jsx)(rS,{children:t})]})}function rQ({className:e,...t}){return(0,i.jsx)(rR,{"data-slot":"select-scroll-up-button",className:(0,ec.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,i.jsx)(rq,{className:"size-4"})})}function r0({className:e,...t}){return(0,i.jsx)(rT,{"data-slot":"select-scroll-down-button",className:(0,ec.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,i.jsx)(rV,{className:"size-4"})})}function r1({className:e,type:t,...n}){return(0,i.jsx)("input",{type:t,"data-slot":"input",className:(0,ec.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}var r2=s.forwardRef((e,t)=>(0,i.jsx)(S.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));function r5({className:e,...t}){return(0,i.jsx)(r2,{"data-slot":"label",className:(0,ec.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}r2.displayName="Label";var r4="Switch",[r3,r6]=f(r4),[r8,r9]=r3(r4),r7=s.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:l,disabled:c,value:u="on",onCheckedChange:f,form:m,...h}=e,[g,v]=s.useState(null),x=(0,p.s)(t,e=>v(e)),y=s.useRef(!1),b=!g||m||!!g.closest("form"),[w,j]=E({prop:o,defaultProp:a??!1,onChange:f,caller:r4});return(0,i.jsxs)(r8,{scope:n,checked:w,disabled:c,children:[(0,i.jsx)(S.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":or(w),"data-disabled":c?"":void 0,disabled:c,value:u,...h,ref:x,onClick:d(e.onClick,e=>{j(e=>!e),b&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),b&&(0,i.jsx)(on,{control:g,bubbles:!y.current,name:r,value:u,checked:w,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});r7.displayName=r4;var oe="SwitchThumb",ot=s.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,o=r9(oe,n);return(0,i.jsx)(S.span,{"data-state":or(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});ot.displayName=oe;var on=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{let l=s.useRef(null),c=(0,p.s)(l,a),u=t8(n),d=tU(t);return s.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(u!==n&&t){let o=new Event("click",{bubbles:r});t.call(e,n),e.dispatchEvent(o)}},[u,n,r]),(0,i.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function or(e){return e?"checked":"unchecked"}function oo({className:e,...t}){return(0,i.jsx)(r7,{"data-slot":"switch",className:(0,ec.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,i.jsx)(ot,{"data-slot":"switch-thumb",className:(0,ec.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function oa({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,i.jsx)("table",{"data-slot":"table",className:(0,ec.cn)("w-full caption-bottom text-sm",e),...t})})}function oi({className:e,...t}){return(0,i.jsx)("thead",{"data-slot":"table-header",className:(0,ec.cn)("[&_tr]:border-b",e),...t})}function os({className:e,...t}){return(0,i.jsx)("tbody",{"data-slot":"table-body",className:(0,ec.cn)("[&_tr:last-child]:border-0",e),...t})}function ol({className:e,...t}){return(0,i.jsx)("tr",{"data-slot":"table-row",className:(0,ec.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function oc({className:e,...t}){return(0,i.jsx)("th",{"data-slot":"table-head",className:(0,ec.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function ou({className:e,...t}){return(0,i.jsx)("td",{"data-slot":"table-cell",className:(0,ec.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}on.displayName="SwitchBubbleInput";var od="Dialog",[of,op]=f(od),[om,oh]=of(od),og=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,f]=E({prop:r,defaultProp:o??!1,onChange:a,caller:od});return(0,i.jsx)(om,{scope:t,triggerRef:c,contentRef:u,contentId:j(),titleId:j(),descriptionId:j(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(e=>!e),[f]),modal:l,children:n})};og.displayName=od;var ov="DialogTrigger";s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(ov,n),a=(0,p.s)(t,o.triggerRef);return(0,i.jsx)(S.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":oD(o.open),...r,ref:a,onClick:d(e.onClick,o.onOpenToggle)})}).displayName=ov;var ox="DialogPortal",[oy,ob]=of(ox,{forceMount:void 0}),ow=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=oh(ox,t);return(0,i.jsx)(oy,{scope:t,forceMount:n,children:s.Children.map(r,e=>(0,i.jsx)(K,{present:n||a.open,children:(0,i.jsx)(t6,{asChild:!0,container:o,children:e})}))})};ow.displayName=ox;var oj="DialogOverlay",oN=s.forwardRef((e,t)=>{let n=ob(oj,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oh(oj,e.__scopeDialog);return a.modal?(0,i.jsx)(K,{present:r||a.open,children:(0,i.jsx)(oC,{...o,ref:t})}):null});oN.displayName=oj;var oS=(0,m.TL)("DialogOverlay.RemoveScroll"),oC=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oj,n);return(0,i.jsx)(nK,{as:oS,allowPinchZoom:!0,shards:[o.contentRef],children:(0,i.jsx)(S.div,{"data-state":oD(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ok="DialogContent",oE=s.forwardRef((e,t)=>{let n=ob(ok,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oh(ok,e.__scopeDialog);return(0,i.jsx)(K,{present:r||a.open,children:a.modal?(0,i.jsx)(oR,{...o,ref:t}):(0,i.jsx)(oP,{...o,ref:t})})});oE.displayName=ok;var oR=s.forwardRef((e,t)=>{let n=oh(ok,e.__scopeDialog),r=s.useRef(null),o=(0,p.s)(t,n.contentRef,r);return s.useEffect(()=>{let e=r.current;if(e)return ni(e)},[]),(0,i.jsx)(oT,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:d(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:d(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:d(e.onFocusOutside,e=>e.preventDefault())})}),oP=s.forwardRef((e,t)=>{let n=oh(ok,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return(0,i.jsx)(oT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),oT=s.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,c=oh(ok,n),u=s.useRef(null),d=(0,p.s)(t,u);return ew(),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ek,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,i.jsx)(ev,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":oD(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oU,{titleId:c.titleId}),(0,i.jsx)(oW,{contentRef:u,descriptionId:c.descriptionId})]})]})}),oM="DialogTitle",oO=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oM,n);return(0,i.jsx)(S.h2,{id:o.titleId,...r,ref:t})});oO.displayName=oM;var oA="DialogDescription",o_=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oA,n);return(0,i.jsx)(S.p,{id:o.descriptionId,...r,ref:t})});o_.displayName=oA;var oL="DialogClose",oI=s.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=oh(oL,n);return(0,i.jsx)(S.button,{type:"button",...r,ref:t,onClick:d(e.onClick,()=>o.onOpenChange(!1))})});function oD(e){return e?"open":"closed"}oI.displayName=oL;var o$="DialogTitleWarning",[oF,oz]=function(e,t){let n=s.createContext(t),r=e=>{let{children:t,...r}=e,o=s.useMemo(()=>r,Object.values(r));return(0,i.jsx)(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){let o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}]}(o$,{contentName:ok,titleName:oM,docsSlug:"dialog"}),oU=({titleId:e})=>{let t=oz(o$),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
4
|
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},oW=({contentRef:e,descriptionId:t})=>{let n=oz("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return s.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null};let oH=rV("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function oV({...e}){return(0,i.jsx)(og,{"data-slot":"dialog",...e})}function oB({...e}){return(0,i.jsx)(ow,{"data-slot":"dialog-portal",...e})}function oK({className:e,...t}){return(0,i.jsx)(oN,{"data-slot":"dialog-overlay",className:(0,ec.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function oq({className:e,children:t,showCloseButton:n=!0,...r}){return(0,i.jsxs)(oB,{"data-slot":"dialog-portal",children:[(0,i.jsx)(oK,{}),(0,i.jsxs)(oS,{"data-slot":"dialog-content",className:(0,ec.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",e),...r,children:[t,n&&(0,i.jsxs)(oI,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,i.jsx)(oH,{}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function oG({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"dialog-header",className:(0,ec.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function oX({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"dialog-footer",className:(0,ec.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function oY({className:e,...t}){return(0,i.jsx)(oO,{"data-slot":"dialog-title",className:(0,ec.cn)("text-lg leading-none font-semibold",e),...t})}function oJ({className:e,...t}){return(0,i.jsx)(oL,{"data-slot":"dialog-description",className:(0,ec.cn)("text-muted-foreground text-sm",e),...t})}function oZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o0(Object(n),!0).forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o2(e){return function t(){for(var n=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];return t.apply(n,[].concat(o,r))}}}function o5(e){return({}).toString.call(e).includes("Object")}function o3(e){return"function"==typeof e}var o6=o2(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),o4={changes:function(e,t){return o5(t)||o6("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&o6("changeField"),t},selector:function(e){o3(e)||o6("selectorType")},handler:function(e){o3(e)||o5(e)||o6("handlerType"),o5(e)&&Object.values(e).some(function(e){return!o3(e)})&&o6("handlersType")},initial:function(e){e||o6("initialIsRequired"),o5(e)||o6("initialType"),Object.keys(e).length||o6("initialContent")}};function o8(e,t){return o3(t)?t(e.current):t}function o9(e,t){return e.current=o1(o1({},e.current),t),t}function o7(e,t,n){return o3(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null==(r=t[n])?void 0:r.call(t,e.current[n])}),n}var ae={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},at=(function(e){return function t(){for(var n=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];return t.apply(n,[].concat(o,r))}}})(function(e,t){throw Error(e[t]||e.default)})(ae);let an=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}};var ar={type:"cancelation",msg:"operation is manually canceled"};let ao=function(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(ar):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n};var aa=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}(e,2)||function(e,t){if(e){if("string"==typeof e)return oQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oQ(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o4.initial(e),o4.handler(t);var n={current:e},r=o2(o7)(n,t),o=o2(o9)(n),a=o2(o4.changes)(e),i=o2(o8)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return o4.selector(e),e(n.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(r,o,a,i)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),2),ai=aa[0],as=aa[1];function al(e){return document.body.appendChild(e)}function ac(e){var t,n,r=ai(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(r.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return o.onload=function(){return e()},o.onerror=r.reject,o}function au(){var e=ai(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){ad(t),e.resolve(t)},function(t){e.reject(t)})}function ad(e){ai().monaco||as({monaco:e})}var af=new Promise(function(e,t){return as({resolve:e,reject:t})});let ap={init:function(){var e=ai(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(as({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ao(af);if(window.monaco&&window.monaco.editor)return ad(window.monaco),e.resolve(window.monaco),ao(af);an(al,ac)(au)}return ao(af)}};var am={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ah={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ag=function({children:e}){return s.createElement("div",{style:ah.container},e)},av=(0,s.memo)(function({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return s.createElement("section",{style:{...am.wrapper,width:e,height:t},...i},!n&&s.createElement(ag,null,r),s.createElement("div",{ref:o,style:{...am.fullWidth,...!n&&am.hide},className:a}))}),ax=function(e){(0,s.useEffect)(e,[])},ay=function(e,t,n=!0){let r=(0,s.useRef)(!0);(0,s.useEffect)(r.current||!n?()=>{r.current=!1}:e,t)};function ab(){}function aw(e,t,n,r){var o,a,i,s,l,c;return o=e,a=r,o.editor.getModel(aj(o,a))||(i=e,s=t,l=n,c=r,i.editor.createModel(s,l,c?aj(i,c):void 0))}function aj(e,t){return e.Uri.parse(t)}(0,s.memo)(function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:p="100%",width:m="100%",className:h,wrapperProps:g={},beforeMount:v=ab,onMount:x=ab}){let[y,b]=(0,s.useState)(!1),[w,j]=(0,s.useState)(!0),N=(0,s.useRef)(null),k=(0,s.useRef)(null),E=(0,s.useRef)(null),C=(0,s.useRef)(x),S=(0,s.useRef)(v),P=(0,s.useRef)(!1);ax(()=>{let e=ap.init();return e.then(e=>(k.current=e)&&j(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return N.current?(t=N.current?.getModel(),void(l||t?.original?.dispose(),c||t?.modified?.dispose(),N.current?.dispose())):e.cancel()}}),ay(()=>{if(N.current&&k.current){let t=N.current.getOriginalEditor(),o=aw(k.current,e||"",r||n||"text",a||"");o!==t.getModel()&&t.setModel(o)}},[a],y),ay(()=>{if(N.current&&k.current){let e=N.current.getModifiedEditor(),r=aw(k.current,t||"",o||n||"text",i||"");r!==e.getModel()&&e.setModel(r)}},[i],y),ay(()=>{let e=N.current.getModifiedEditor();e.getOption(k.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),ay(()=>{N.current?.getModel()?.original.setValue(e||"")},[e],y),ay(()=>{let{original:e,modified:t}=N.current.getModel();k.current.editor.setModelLanguage(e,r||n||"text"),k.current.editor.setModelLanguage(t,o||n||"text")},[n,r,o],y),ay(()=>{k.current?.editor.setTheme(u)},[u],y),ay(()=>{N.current?.updateOptions(f)},[f],y);let R=(0,s.useCallback)(()=>{if(!k.current)return;S.current(k.current);let s=aw(k.current,e||"",r||n||"text",a||""),l=aw(k.current,t||"",o||n||"text",i||"");N.current?.setModel({original:s,modified:l})},[n,t,o,e,r,a,i]),T=(0,s.useCallback)(()=>{!P.current&&E.current&&(N.current=k.current.editor.createDiffEditor(E.current,{automaticLayout:!0,...f}),R(),k.current?.editor.setTheme(u),b(!0),P.current=!0)},[f,u,R]);return(0,s.useEffect)(()=>{y&&C.current(N.current,k.current)},[y]),(0,s.useEffect)(()=>{w||y||T()},[w,y,T]),s.createElement(av,{width:m,height:p,isEditorReady:y,loading:d,_ref:E,className:h,wrapperProps:g})});var aN=function(e){let t=(0,s.useRef)();return(0,s.useEffect)(()=>{t.current=e},[e]),t.current},ak=new Map,aE=(0,s.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:p=!1,width:m="100%",height:h="100%",className:g,wrapperProps:v={},beforeMount:x=ab,onMount:y=ab,onChange:b,onValidate:w=ab}){let[j,N]=(0,s.useState)(!1),[k,E]=(0,s.useState)(!0),C=(0,s.useRef)(null),S=(0,s.useRef)(null),P=(0,s.useRef)(null),R=(0,s.useRef)(y),T=(0,s.useRef)(x),M=(0,s.useRef)(),O=(0,s.useRef)(r),A=aN(a),L=(0,s.useRef)(!1),D=(0,s.useRef)(!1);ax(()=>{let e=ap.init();return e.then(e=>(C.current=e)&&E(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>S.current?void(M.current?.dispose(),p?f&&ak.set(a,S.current.saveViewState()):S.current.getModel()?.dispose(),S.current.dispose()):e.cancel()}),ay(()=>{let i=aw(C.current,e||r||"",t||o||"",a||n||"");i!==S.current?.getModel()&&(f&&ak.set(A,S.current?.saveViewState()),S.current?.setModel(i),f&&S.current?.restoreViewState(ak.get(a)))},[a],j),ay(()=>{S.current?.updateOptions(u)},[u],j),ay(()=>{S.current&&void 0!==r&&(S.current.getOption(C.current.editor.EditorOption.readOnly)?S.current.setValue(r):r!==S.current.getValue()&&(D.current=!0,S.current.executeEdits("",[{range:S.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),S.current.pushUndoStop(),D.current=!1))},[r],j),ay(()=>{let e=S.current?.getModel();e&&o&&C.current?.editor.setModelLanguage(e,o)},[o],j),ay(()=>{void 0!==l&&S.current?.revealLine(l)},[l],j),ay(()=>{C.current?.editor.setTheme(i)},[i],j);let I=(0,s.useCallback)(()=>{if(!(!P.current||!C.current)&&!L.current){T.current(C.current);let s=a||n,c=aw(C.current,r||e||"",t||o||"",s||"");S.current=C.current?.editor.create(P.current,{model:c,automaticLayout:!0,...u},d),f&&S.current.restoreViewState(ak.get(s)),C.current.editor.setTheme(i),void 0!==l&&S.current.revealLine(l),N(!0),L.current=!0}},[e,t,n,r,o,a,u,d,f,i,l]);return(0,s.useEffect)(()=>{j&&R.current(S.current,C.current)},[j]),(0,s.useEffect)(()=>{k||j||I()},[k,j,I]),O.current=r,(0,s.useEffect)(()=>{j&&b&&(M.current?.dispose(),M.current=S.current?.onDidChangeModelContent(e=>{D.current||b(S.current.getValue(),e)}))},[j,b]),(0,s.useEffect)(()=>{if(j){let e=C.current.editor.onDidChangeMarkers(e=>{let t=S.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=C.current.editor.getModelMarkers({resource:t});w?.(e)}});return()=>{e?.dispose()}}return()=>{}},[j,w]),s.createElement(av,{width:m,height:h,isEditorReady:j,loading:c,_ref:P,className:g,wrapperProps:v})});function aC({className:e,currentProjectName:t,currentEnvName:n}){let[r,o]=(0,s.useState)([]),[a,l]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),[f,p]=(0,s.useState)(new Set),[m,h]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[x,y]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[j,N]=(0,s.useState)(null),k=(0,s.useRef)(null),E=async()=>{l(!0),d(null);try{let e=await fetch("/api/all-projects-envs"),t=await e.json();t.success?o(t.data):d(t.error||"获取项目环境信息失败")}catch(e){console.error("获取项目环境信息失败:",e),d("获取项目环境信息失败: 网络错误")}finally{l(!1)}},C=e=>`${e.projectName}-${e.envName}`,S=m.trim()?r.filter(e=>e.projectName.toLowerCase().includes(m.toLowerCase())||e.envName.toLowerCase().includes(m.toLowerCase())||e.host.toLowerCase().includes(m.toLowerCase())):r,P=(e,t)=>{let n=new Set(f);t?n.add(e):n.delete(e),p(n)},R=e=>{e?p(new Set(S.map(e=>C(e)))):p(new Set)},T=async()=>{v(!0),y("");try{let e=Array.from(f).map(e=>{let t=r.find(t=>C(t)===e);return t?t.envName:""}).filter(e=>""!==e),o=[...new Set(e)],a=await fetch("/api/microapp-proxy-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:t,envName:n,selectedItems:o})}),i=await a.json();i.success?(y(i.message||"保存成功"),await E()):y(`保存失败: ${i.error}`)}catch(e){console.error("保存MicroApp代理配置失败:",e),y("保存失败: 网络错误")}finally{v(!1),setTimeout(()=>{y("")},5e3)}},M=f.size,O=S.length>0&&S.every(e=>f.has(C(e))),A=S.some(e=>f.has(C(e)));return a?(0,i.jsxs)("div",{className:`p-6 bg-gray-50 rounded-lg ${e}`,children:[(0,i.jsx)("h4",{className:"text-md font-medium mb-4",children:"MicroApp代理配置"}),(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{className:"text-gray-500",children:"加载中..."})})]}):c?(0,i.jsxs)("div",{className:`p-6 bg-gray-50 rounded-lg ${e}`,children:[(0,i.jsx)("h4",{className:"text-md font-medium mb-4",children:"MicroApp代理配置"}),(0,i.jsxs)("div",{className:"text-center py-8",children:[(0,i.jsx)("p",{className:"text-red-500",children:c}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:E,className:"mt-2",children:"重试"})]})]}):(0,i.jsxs)("div",{className:`p-6 bg-gray-50 rounded-lg ${e}`,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-md font-medium",children:"MicroApp代理配置"}),(0,i.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["为 ",t," - ",n," 环境配置微应用代理"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)("div",{className:`w-2 h-2 rounded-full ${b?"bg-green-500":"bg-red-500"}`,title:b?"实时推送已连接":"实时推送断开"}),(0,i.jsx)("span",{className:"text-xs text-gray-500",children:b?"实时":"离线"})]}),(x||j)&&(0,i.jsx)("span",{className:`text-sm max-w-xs ${x&&x.includes("失败")||j?"text-red-600":x&&x.includes("但有")?"text-yellow-600":"text-green-600"}`,title:x||j||"",children:x||j}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:E,disabled:g,children:"刷新"}),(0,i.jsx)(u.$,{variant:"default",size:"sm",onClick:T,disabled:g,children:g?"保存中...":"保存配置"})]})]}),(0,i.jsxs)("div",{className:"space-y-3 mb-4",children:[(0,i.jsx)("div",{className:"flex items-center gap-2",children:(0,i.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,i.jsx)(r1,{placeholder:"搜索项目名称、环境名称或Host...",value:m,onChange:e=>h(e.target.value),className:"pr-8"}),m&&(0,i.jsx)(u.$,{variant:"ghost",size:"sm",onClick:()=>{h("")},className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0 hover:bg-gray-100",children:"\xd7"})]})}),(0,i.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[(0,i.jsxs)("span",{children:["显示 ",S.length," 个环境配置",m&&` (搜索: "${m}")`]}),M>0&&(0,i.jsxs)("span",{className:"text-blue-600 font-medium",children:["已选择 ",M," 项"]})]}),M>0&&(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>{p(new Set)},children:"清空选择"})]})]}),S.length>0?(0,i.jsx)("div",{className:"border rounded-md",children:(0,i.jsxs)(oa,{children:[(0,i.jsx)(oi,{children:(0,i.jsxs)(ol,{children:[(0,i.jsx)(oc,{className:"w-12",children:(0,i.jsx)("input",{type:"checkbox",checked:O,onChange:e=>R(e.target.checked),ref:e=>{e&&(e.indeterminate=A&&!O)},className:"rounded border-gray-300"})}),(0,i.jsx)(oc,{children:"环境名称"}),(0,i.jsx)(oc,{children:"项目名称"}),(0,i.jsx)(oc,{children:"Host地址"}),(0,i.jsx)(oc,{children:"当前代理"})]})}),(0,i.jsx)(os,{children:S.map(e=>{let t=C(e),n=f.has(t);return(0,i.jsxs)(ol,{children:[(0,i.jsx)(ou,{children:(0,i.jsx)("input",{type:"checkbox",checked:n,onChange:e=>P(t,e.target.checked),className:"rounded border-gray-300"})}),(0,i.jsx)(ou,{children:(0,i.jsx)("span",{className:"px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800",children:e.envName})}),(0,i.jsx)(ou,{className:"font-medium",children:e.projectName}),(0,i.jsx)(ou,{className:"font-mono text-sm",children:e.host}),(0,i.jsxs)(ou,{className:"text-sm text-gray-600",children:[e.currentProxy,e.proxyEnv[e.currentProxy]&&(0,i.jsx)("div",{className:"text-xs text-gray-500",children:e.proxyEnv[e.currentProxy]})]})]},t)})})]})}):(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{className:"text-gray-500",children:m?"没有找到匹配的环境配置":"暂无环境配置"})}),M>0&&(0,i.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("span",{className:"text-sm text-blue-700",children:["已选择 ",M," 个环境配置将作为微应用代理"]}),(0,i.jsx)("span",{className:"text-xs text-blue-600",children:"点击上方“保存配置”按钮保存设置"})]})})]})}var aS=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e}(aS||{});function aP(){let e=(0,c.useSearchParams)(),t=(0,c.useRouter)(),n=e.get("project"),[r,o]=(0,s.useState)(null),[a,l]=(0,s.useState)(!0),[d,f]=(0,s.useState)(null),[p,m]=(0,s.useState)({}),[h,g]=(0,s.useState)({mockingIntercept:!1,mockOpen:!1}),[v,x]=(0,s.useState)(!1),[y,b]=(0,s.useState)(null),[w,j]=(0,s.useState)(!1),[N,k]=(0,s.useState)(1),[E]=(0,s.useState)(10),[C,S]=(0,s.useState)(""),[P,R]=(0,s.useState)(null),[T,M]=(0,s.useState)(!1),[O,A]=(0,s.useState)(!1),[L,D]=(0,s.useState)(!1),[I,$]=(0,s.useState)(!0),[F,_]=(0,s.useState)(null),[z,U]=(0,s.useState)([]),[W,H]=(0,s.useState)(!1),[V,B]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[G,X]=(0,s.useState)({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0}),[Y,J]=(0,s.useState)(null),[Z,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(""),en=async()=>{F&&await er(F)},er=async e=>{try{await new Promise(e=>setTimeout(e,200));let t=e.getModel();if(t){await e.getAction("editor.action.formatDocument")?.run();let n=t.getValue();if(n&&!n.includes("\n")&&n.length>50){let r=n.replace(/\{\s*/g,"{\n ").replace(/\}\s*/g,"\n}").replace(/;\s*/g,";\n ").replace(/,\s*/g,",\n ").replace(/\n\s*\n/g,"\n").trim();r!==n&&(t.setValue(r),setTimeout(()=>{e.getAction("editor.action.formatDocument")?.run()},100))}}}catch(e){console.log("自动格式化失败:",e)}},eo=()=>{t.push("/initialization")},ea=async()=>{if(n){x(!0);try{let e=await fetch("/api/open-project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n})}),t=await e.json();t.success||(console.error("打开项目失败:",t.error),alert(`打开项目失败: ${t.error}`))}catch(e){console.error("打开项目失败:",e),alert("打开项目失败: 网络错误")}finally{x(!1)}}},ei=(e,t)=>{if(!r)return;let n=r.envs[e],o="";o="custom"===t?p[e]?.selectedOption==="custom"?p[e]?.selectedProxy||"":n.proxyEnv.custom||"":n.proxyEnv[t]||"",m(n=>({...n,[e]:{...n[e],selectedProxy:o,selectedOption:t,saveMessage:""}}))},es=(e,t)=>{m(n=>({...n,[e]:{...n[e],selectedProxy:t,saveMessage:""}}))},el=async e=>{g(t=>({...t,mockingIntercept:e,saving:!0,saveMessage:""}));try{let t=await fetch("/api/project-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,projectConfig:{mockingIntercept:e,mockOpen:h.mockOpen}})}),r=await t.json();if(r.success)o(t=>t?{...t,mockingIntercept:e}:t),g(e=>({...e,saving:!1,saveMessage:"Mock拦截配置已保存"})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},2e3);else throw Error(r.error||"保存失败")}catch(t){console.error("保存Mock拦截配置失败:",t),g(n=>({...n,mockingIntercept:!e,saving:!1,saveMessage:`保存失败: ${t instanceof Error?t.message:"未知错误"}`})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},3e3)}},ec=async e=>{g(t=>({...t,mockOpen:e,saving:!0,saveMessage:""}));try{let t=await fetch("/api/project-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,projectConfig:{mockingIntercept:h.mockingIntercept,mockOpen:e}})}),r=await t.json();if(r.success)o(t=>t?{...t,mockOpen:e}:t),g(e=>({...e,saving:!1,saveMessage:"Mock开启配置已保存"})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},2e3);else throw Error(r.error||"保存失败")}catch(t){console.error("保存Mock开启配置失败:",t),g(n=>({...n,mockOpen:!e,saving:!1,saveMessage:`保存失败: ${t instanceof Error?t.message:"未知错误"}`})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},3e3)}},em=async e=>{if(!r||!n)return;let t=p[e]?.selectedProxy?.trim();if(!t)return void m(t=>({...t,[e]:{...t[e],saveMessage:"请先选择或填写代理地址"}}));let a=r.envs[e],i=!Object.values(a.proxyEnv).includes(t);m(t=>({...t,[e]:{...t[e],saving:!0,saveMessage:""}}));try{let r={projectName:n,envName:e,newProxy:i?"custom":Object.keys(a.proxyEnv).find(e=>a.proxyEnv[e]===t)||""};i&&(r.customProxyUrl=t);let s=await fetch("/api/project-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),l=await s.json();l.success?(o(n=>{if(!n)return n;let r={...n.envs};return r[e]={...r[e],currentProxy:l.data.currentProxy},"custom"===l.data.currentProxy&&(r[e].proxyEnv={...r[e].proxyEnv,custom:t}),{...n,envs:r}}),m(t=>({...t,[e]:{...t[e],saving:!1,saveMessage:"保存成功"}}))):m(t=>({...t,[e]:{...t[e],saving:!1,saveMessage:`保存失败: ${l.error}`}}))}catch(t){console.error("保存配置失败:",t),m(t=>({...t,[e]:{...t[e],saving:!1,saveMessage:"保存失败: 网络错误"}}))}},eh=async()=>{if(n){j(!0);try{let e=await fetch(`/api/mock-file?project=${encodeURIComponent(n)}`),t=await e.json();t.success?b(t.data):console.error("获取Mock数据失败:",t.error)}catch(e){console.error("获取Mock数据失败:",e)}finally{j(!1)}}},eg=async(e,t,r)=>{if(n)try{let o=await fetch("/api/mock-setting",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,apiName:e,method:t,currentSite:r})}),a=await o.json();a.success?b(n=>n?{...n,mockFiles:n.mockFiles.map(n=>n.apiName===e?{...n,methods:n.methods.map(e=>e.method===t?{...e,setting:{...e.setting,currentSite:r}}:e)}:n)}:n):(console.error("更新场景失败:",a.error),alert(`更新场景失败: ${a.error}`))}catch(e){console.error("更新场景失败:",e),alert("更新场景失败: 网络错误")}},ev=async(e,t,r)=>{if(n){A(!0),$(!0);try{let o=await fetch(`/api/mock-file-content?project=${encodeURIComponent(n)}&apiName=${encodeURIComponent(e)}&method=${encodeURIComponent(t)}&siteName=${encodeURIComponent(r)}`),a=await o.json();a.success?(R({projectName:n,apiName:e,method:t,siteName:r,content:a.data.content}),M(!0)):(console.error("获取文件内容失败:",a.error),alert(`获取文件内容失败: ${a.error}`))}catch(e){console.error("获取文件内容失败:",e),alert("获取文件内容失败: 网络错误")}finally{A(!1)}}},ex=async()=>{if(P){D(!0);try{let e=await fetch("/api/mock-file-content",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(P)}),t=await e.json();t.success?(M(!1),R(null)):(console.error("保存文件失败:",t.error),alert(`保存文件失败: ${t.error}`))}catch(e){console.error("保存文件失败:",e),alert("保存文件失败: 网络错误")}finally{D(!1)}}},ey=()=>{M(!1),R(null),$(!0)},eb=(e,t)=>{"siteName"===e&&V||X(n=>({...n,[e]:t}))},ew=(e,t)=>{let n=e.toUpperCase(),r=t.replace(/\//g,"_").replace(/^_/,"");switch(n){case"GET":return`module.exports = {
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},oW=({contentRef:e,descriptionId:t})=>{let n=oz("DialogDescriptionWarning"),r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return s.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null};let oH=rB("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function oB({...e}){return(0,i.jsx)(og,{"data-slot":"dialog",...e})}function oV({...e}){return(0,i.jsx)(ow,{"data-slot":"dialog-portal",...e})}function oK({className:e,...t}){return(0,i.jsx)(oN,{"data-slot":"dialog-overlay",className:(0,ec.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function oq({className:e,children:t,showCloseButton:n=!0,...r}){return(0,i.jsxs)(oV,{"data-slot":"dialog-portal",children:[(0,i.jsx)(oK,{}),(0,i.jsxs)(oE,{"data-slot":"dialog-content",className:(0,ec.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",e),...r,children:[t,n&&(0,i.jsxs)(oI,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,i.jsx)(oH,{}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function oG({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"dialog-header",className:(0,ec.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function oX({className:e,...t}){return(0,i.jsx)("div",{"data-slot":"dialog-footer",className:(0,ec.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function oY({className:e,...t}){return(0,i.jsx)(oO,{"data-slot":"dialog-title",className:(0,ec.cn)("text-lg leading-none font-semibold",e),...t})}function oJ({className:e,...t}){return(0,i.jsx)(o_,{"data-slot":"dialog-description",className:(0,ec.cn)("text-muted-foreground text-sm",e),...t})}function oZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o0(Object(n),!0).forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o2(e){return function t(){for(var n=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];return t.apply(n,[].concat(o,r))}}}function o5(e){return({}).toString.call(e).includes("Object")}function o4(e){return"function"==typeof e}var o3=o2(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),o6={changes:function(e,t){return o5(t)||o3("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&o3("changeField"),t},selector:function(e){o4(e)||o3("selectorType")},handler:function(e){o4(e)||o5(e)||o3("handlerType"),o5(e)&&Object.values(e).some(function(e){return!o4(e)})&&o3("handlersType")},initial:function(e){e||o3("initialIsRequired"),o5(e)||o3("initialType"),Object.keys(e).length||o3("initialContent")}};function o8(e,t){return o4(t)?t(e.current):t}function o9(e,t){return e.current=o1(o1({},e.current),t),t}function o7(e,t,n){return o4(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null==(r=t[n])?void 0:r.call(t,e.current[n])}),n}var ae={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},at=(function(e){return function t(){for(var n=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=Array(e),a=0;a<e;a++)r[a]=arguments[a];return t.apply(n,[].concat(o,r))}}})(function(e,t){throw Error(e[t]||e.default)})(ae);let an=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}};var ar={type:"cancelation",msg:"operation is manually canceled"};let ao=function(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(ar):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n};var aa=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}(e,2)||function(e,t){if(e){if("string"==typeof e)return oQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oQ(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o6.initial(e),o6.handler(t);var n={current:e},r=o2(o7)(n,t),o=o2(o9)(n),a=o2(o6.changes)(e),i=o2(o8)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return o6.selector(e),e(n.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(r,o,a,i)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),2),ai=aa[0],as=aa[1];function al(e){return document.body.appendChild(e)}function ac(e){var t,n,r=ai(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(r.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return o.onload=function(){return e()},o.onerror=r.reject,o}function au(){var e=ai(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){ad(t),e.resolve(t)},function(t){e.reject(t)})}function ad(e){ai().monaco||as({monaco:e})}var af=new Promise(function(e,t){return as({resolve:e,reject:t})});let ap={init:function(){var e=ai(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(as({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ao(af);if(window.monaco&&window.monaco.editor)return ad(window.monaco),e.resolve(window.monaco),ao(af);an(al,ac)(au)}return ao(af)}};var am={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ah={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ag=function({children:e}){return s.createElement("div",{style:ah.container},e)},av=(0,s.memo)(function({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return s.createElement("section",{style:{...am.wrapper,width:e,height:t},...i},!n&&s.createElement(ag,null,r),s.createElement("div",{ref:o,style:{...am.fullWidth,...!n&&am.hide},className:a}))}),ax=function(e){(0,s.useEffect)(e,[])},ay=function(e,t,n=!0){let r=(0,s.useRef)(!0);(0,s.useEffect)(r.current||!n?()=>{r.current=!1}:e,t)};function ab(){}function aw(e,t,n,r){var o,a,i,s,l,c;return o=e,a=r,o.editor.getModel(aj(o,a))||(i=e,s=t,l=n,c=r,i.editor.createModel(s,l,c?aj(i,c):void 0))}function aj(e,t){return e.Uri.parse(t)}(0,s.memo)(function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:p="100%",width:m="100%",className:h,wrapperProps:g={},beforeMount:v=ab,onMount:x=ab}){let[y,b]=(0,s.useState)(!1),[w,j]=(0,s.useState)(!0),N=(0,s.useRef)(null),S=(0,s.useRef)(null),C=(0,s.useRef)(null),k=(0,s.useRef)(x),E=(0,s.useRef)(v),R=(0,s.useRef)(!1);ax(()=>{let e=ap.init();return e.then(e=>(S.current=e)&&j(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return N.current?(t=N.current?.getModel(),void(l||t?.original?.dispose(),c||t?.modified?.dispose(),N.current?.dispose())):e.cancel()}}),ay(()=>{if(N.current&&S.current){let t=N.current.getOriginalEditor(),o=aw(S.current,e||"",r||n||"text",a||"");o!==t.getModel()&&t.setModel(o)}},[a],y),ay(()=>{if(N.current&&S.current){let e=N.current.getModifiedEditor(),r=aw(S.current,t||"",o||n||"text",i||"");r!==e.getModel()&&e.setModel(r)}},[i],y),ay(()=>{let e=N.current.getModifiedEditor();e.getOption(S.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),ay(()=>{N.current?.getModel()?.original.setValue(e||"")},[e],y),ay(()=>{let{original:e,modified:t}=N.current.getModel();S.current.editor.setModelLanguage(e,r||n||"text"),S.current.editor.setModelLanguage(t,o||n||"text")},[n,r,o],y),ay(()=>{S.current?.editor.setTheme(u)},[u],y),ay(()=>{N.current?.updateOptions(f)},[f],y);let P=(0,s.useCallback)(()=>{if(!S.current)return;E.current(S.current);let s=aw(S.current,e||"",r||n||"text",a||""),l=aw(S.current,t||"",o||n||"text",i||"");N.current?.setModel({original:s,modified:l})},[n,t,o,e,r,a,i]),T=(0,s.useCallback)(()=>{!R.current&&C.current&&(N.current=S.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...f}),P(),S.current?.editor.setTheme(u),b(!0),R.current=!0)},[f,u,P]);return(0,s.useEffect)(()=>{y&&k.current(N.current,S.current)},[y]),(0,s.useEffect)(()=>{w||y||T()},[w,y,T]),s.createElement(av,{width:m,height:p,isEditorReady:y,loading:d,_ref:C,className:h,wrapperProps:g})});var aN=function(e){let t=(0,s.useRef)();return(0,s.useEffect)(()=>{t.current=e},[e]),t.current},aS=new Map,aC=(0,s.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:p=!1,width:m="100%",height:h="100%",className:g,wrapperProps:v={},beforeMount:x=ab,onMount:y=ab,onChange:b,onValidate:w=ab}){let[j,N]=(0,s.useState)(!1),[S,C]=(0,s.useState)(!0),k=(0,s.useRef)(null),E=(0,s.useRef)(null),R=(0,s.useRef)(null),P=(0,s.useRef)(y),T=(0,s.useRef)(x),M=(0,s.useRef)(),O=(0,s.useRef)(r),A=aN(a),_=(0,s.useRef)(!1),L=(0,s.useRef)(!1);ax(()=>{let e=ap.init();return e.then(e=>(k.current=e)&&C(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>E.current?void(M.current?.dispose(),p?f&&aS.set(a,E.current.saveViewState()):E.current.getModel()?.dispose(),E.current.dispose()):e.cancel()}),ay(()=>{let i=aw(k.current,e||r||"",t||o||"",a||n||"");i!==E.current?.getModel()&&(f&&aS.set(A,E.current?.saveViewState()),E.current?.setModel(i),f&&E.current?.restoreViewState(aS.get(a)))},[a],j),ay(()=>{E.current?.updateOptions(u)},[u],j),ay(()=>{E.current&&void 0!==r&&(E.current.getOption(k.current.editor.EditorOption.readOnly)?E.current.setValue(r):r!==E.current.getValue()&&(L.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),E.current.pushUndoStop(),L.current=!1))},[r],j),ay(()=>{let e=E.current?.getModel();e&&o&&k.current?.editor.setModelLanguage(e,o)},[o],j),ay(()=>{void 0!==l&&E.current?.revealLine(l)},[l],j),ay(()=>{k.current?.editor.setTheme(i)},[i],j);let I=(0,s.useCallback)(()=>{if(!(!R.current||!k.current)&&!_.current){T.current(k.current);let s=a||n,c=aw(k.current,r||e||"",t||o||"",s||"");E.current=k.current?.editor.create(R.current,{model:c,automaticLayout:!0,...u},d),f&&E.current.restoreViewState(aS.get(s)),k.current.editor.setTheme(i),void 0!==l&&E.current.revealLine(l),N(!0),_.current=!0}},[e,t,n,r,o,a,u,d,f,i,l]);return(0,s.useEffect)(()=>{j&&P.current(E.current,k.current)},[j]),(0,s.useEffect)(()=>{S||j||I()},[S,j,I]),O.current=r,(0,s.useEffect)(()=>{j&&b&&(M.current?.dispose(),M.current=E.current?.onDidChangeModelContent(e=>{L.current||b(E.current.getValue(),e)}))},[j,b]),(0,s.useEffect)(()=>{if(j){let e=k.current.editor.onDidChangeMarkers(e=>{let t=E.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=k.current.editor.getModelMarkers({resource:t});w?.(e)}});return()=>{e?.dispose()}}return()=>{}},[j,w]),s.createElement(av,{width:m,height:h,isEditorReady:j,loading:c,_ref:R,className:g,wrapperProps:v})});function ak({className:e,currentProjectName:t,currentEnvName:n}){let[r,o]=(0,s.useState)([]),[a,l]=(0,s.useState)(!0),[c,d]=(0,s.useState)(null),[f,p]=(0,s.useState)(new Set),[m,h]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[x,y]=(0,s.useState)(""),[b,w]=(0,s.useState)(!1),[j,N]=(0,s.useState)(null),S=(0,s.useRef)(null),C=async()=>{l(!0),d(null);try{let e=await fetch("/api/all-projects-envs"),t=await e.json();t.success?o(t.data):d(t.error||"获取项目环境信息失败")}catch(e){console.error("获取项目环境信息失败:",e),d("获取项目环境信息失败: 网络错误")}finally{l(!1)}},k=e=>`${e.projectName}-${e.envName}`,E=m.trim()?r.filter(e=>e.projectName.toLowerCase().includes(m.toLowerCase())||e.envName.toLowerCase().includes(m.toLowerCase())||e.host.toLowerCase().includes(m.toLowerCase())):r,R=(e,t)=>{let n=new Set(f);t?n.add(e):n.delete(e),p(n)},P=e=>{e?p(new Set(E.map(e=>k(e)))):p(new Set)},T=async()=>{v(!0),y("");try{let e=Array.from(f).map(e=>{let t=r.find(t=>k(t)===e);return t?t.envName:""}).filter(e=>""!==e),o=[...new Set(e)],a=await fetch("/api/microapp-proxy-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:t,envName:n,selectedItems:o})}),i=await a.json();i.success?(y(i.message||"保存成功"),await C()):y(`保存失败: ${i.error}`)}catch(e){console.error("保存MicroApp代理配置失败:",e),y("保存失败: 网络错误")}finally{v(!1),setTimeout(()=>{y("")},5e3)}},M=f.size,O=E.length>0&&E.every(e=>f.has(k(e))),A=E.some(e=>f.has(k(e)));return a?(0,i.jsxs)("div",{className:`p-6 bg-gray-50 rounded-lg ${e}`,children:[(0,i.jsx)("h4",{className:"text-md font-medium mb-4",children:"MicroApp代理配置"}),(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{className:"text-gray-500",children:"加载中..."})})]}):c?(0,i.jsxs)("div",{className:`p-6 bg-gray-50 rounded-lg ${e}`,children:[(0,i.jsx)("h4",{className:"text-md font-medium mb-4",children:"MicroApp代理配置"}),(0,i.jsxs)("div",{className:"text-center py-8",children:[(0,i.jsx)("p",{className:"text-red-500",children:c}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:C,className:"mt-2",children:"重试"})]})]}):(0,i.jsxs)("div",{className:`p-6 bg-gray-50 rounded-lg ${e}`,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-md font-medium",children:"MicroApp代理配置"}),(0,i.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:["为 ",t," - ",n," 环境配置微应用代理"]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)("div",{className:`w-2 h-2 rounded-full ${b?"bg-green-500":"bg-red-500"}`,title:b?"实时推送已连接":"实时推送断开"}),(0,i.jsx)("span",{className:"text-xs text-gray-500",children:b?"实时":"离线"})]}),(x||j)&&(0,i.jsx)("span",{className:`text-sm max-w-xs ${x&&x.includes("失败")||j?"text-red-600":x&&x.includes("但有")?"text-yellow-600":"text-green-600"}`,title:x||j||"",children:x||j}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:C,disabled:g,children:"刷新"}),(0,i.jsx)(u.$,{variant:"default",size:"sm",onClick:T,disabled:g,children:g?"保存中...":"保存配置"})]})]}),(0,i.jsxs)("div",{className:"space-y-3 mb-4",children:[(0,i.jsx)("div",{className:"flex items-center gap-2",children:(0,i.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,i.jsx)(r1,{placeholder:"搜索项目名称、环境名称或Host...",value:m,onChange:e=>h(e.target.value),className:"pr-8"}),m&&(0,i.jsx)(u.$,{variant:"ghost",size:"sm",onClick:()=>{h("")},className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0 hover:bg-gray-100",children:"\xd7"})]})}),(0,i.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[(0,i.jsxs)("span",{children:["显示 ",E.length," 个环境配置",m&&` (搜索: "${m}")`]}),M>0&&(0,i.jsxs)("span",{className:"text-blue-600 font-medium",children:["已选择 ",M," 项"]})]}),M>0&&(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>{p(new Set)},children:"清空选择"})]})]}),E.length>0?(0,i.jsx)("div",{className:"border rounded-md",children:(0,i.jsxs)(oa,{children:[(0,i.jsx)(oi,{children:(0,i.jsxs)(ol,{children:[(0,i.jsx)(oc,{className:"w-12",children:(0,i.jsx)("input",{type:"checkbox",checked:O,onChange:e=>P(e.target.checked),ref:e=>{e&&(e.indeterminate=A&&!O)},className:"rounded border-gray-300"})}),(0,i.jsx)(oc,{children:"环境名称"}),(0,i.jsx)(oc,{children:"项目名称"}),(0,i.jsx)(oc,{children:"Host地址"}),(0,i.jsx)(oc,{children:"当前代理"})]})}),(0,i.jsx)(os,{children:E.map(e=>{let t=k(e),n=f.has(t);return(0,i.jsxs)(ol,{children:[(0,i.jsx)(ou,{children:(0,i.jsx)("input",{type:"checkbox",checked:n,onChange:e=>R(t,e.target.checked),className:"rounded border-gray-300"})}),(0,i.jsx)(ou,{children:(0,i.jsx)("span",{className:"px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800",children:e.envName})}),(0,i.jsx)(ou,{className:"font-medium",children:e.projectName}),(0,i.jsx)(ou,{className:"font-mono text-sm",children:e.host}),(0,i.jsxs)(ou,{className:"text-sm text-gray-600",children:[e.currentProxy,e.proxyEnv[e.currentProxy]&&(0,i.jsx)("div",{className:"text-xs text-gray-500",children:e.proxyEnv[e.currentProxy]})]})]},t)})})]})}):(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{className:"text-gray-500",children:m?"没有找到匹配的环境配置":"暂无环境配置"})}),M>0&&(0,i.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md",children:(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("span",{className:"text-sm text-blue-700",children:["已选择 ",M," 个环境配置将作为微应用代理"]}),(0,i.jsx)("span",{className:"text-xs text-blue-600",children:"点击上方“保存配置”按钮保存设置"})]})})]})}var aE=n(859),aR=n.n(aE);function aP({logs:e}){let t=(0,s.useRef)(null),n=(0,s.useRef)(!0),r=e=>e.replace(/\x1b\[[0-9;]*m/g,"").replace(/\x1b\[[0-9]*[A-Z]/g,"").replace(/\x1b\[K/g,"").replace(/\x1b\[2K/g,"").replace(/\x1b\[G/g,"").replace(/\x1b\[\d+A/g,"").replace(/\x1b\[\d+B/g,"").replace(/\x1b\[\d+C/g,"").replace(/\x1b\[\d+D/g,"").replace(/\[2K\[1A\[2K\[G/g,"").replace(/\[\d+[A-Z]/g,"").replace(/\[STDOUT\]/g,"[OUT]").replace(/\[STDERR\]/g,"[ERR]"),o=()=>{if(!t.current)return!0;let{scrollTop:e,scrollHeight:n,clientHeight:r}=t.current;return n-e-r<100};return(0,i.jsxs)("div",{ref:t,onScroll:()=>{n.current=o()},style:{scrollBehavior:"smooth",maxHeight:"100%"},className:"jsx-b464fb0f479e34f5 h-full w-full overflow-y-auto overflow-x-hidden p-4 custom-scrollbar",children:[(0,i.jsx)(aR(),{id:"b464fb0f479e34f5",children:".custom-scrollbar.jsx-b464fb0f479e34f5{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2)rgba(0,0,0,.1)}.custom-scrollbar.jsx-b464fb0f479e34f5::-webkit-scrollbar{width:10px;height:10px}.custom-scrollbar.jsx-b464fb0f479e34f5::-webkit-scrollbar-track{background:rgba(0,0,0,.1);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.custom-scrollbar.jsx-b464fb0f479e34f5::-webkit-scrollbar-thumb{background:rgba(255,255,255,.3);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.custom-scrollbar.jsx-b464fb0f479e34f5::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.4)}"}),(0,i.jsx)("div",{className:"jsx-b464fb0f479e34f5 space-y-0.5",children:e.length>0?e.map((e,t)=>{let n=r(e);if(!n.trim())return null;let o=e.includes("[STDERR]"),a=e.includes("[SYSTEM]"),s=n.match(/^\[([\d-T:.Z]+)\]/)?.[1],l=n.replace(/^\[[\d-T:.Z]+\]\s*/,"");return(0,i.jsxs)("div",{className:`jsx-b464fb0f479e34f5 font-mono text-xs leading-5 ${o?"text-red-400":a?"text-yellow-400":"text-gray-100"}`,children:[s&&(0,i.jsxs)("span",{className:"jsx-b464fb0f479e34f5 text-gray-500 mr-2",children:["[",new Date(s).toLocaleTimeString("zh-CN"),"]"]}),(0,i.jsx)("span",{className:"jsx-b464fb0f479e34f5 whitespace-pre-wrap break-all",children:l})]},t)}):(0,i.jsx)("div",{className:"jsx-b464fb0f479e34f5 text-center text-gray-500 mt-8",children:"等待日志输出..."})})]})}var aT=function(e){return e.PENDING="pending",e.EXISTING="existing",e.CLONING="cloning",e.SUCCESS="success",e.FAILED="failed",e.RETRYING="retrying",e}(aT||{});function aM(){let e=(0,c.useSearchParams)(),t=(0,c.useRouter)(),n=e.get("project"),[r,o]=(0,s.useState)(null),[a,l]=(0,s.useState)(!0),[d,f]=(0,s.useState)(null),[p,m]=(0,s.useState)({}),[h,g]=(0,s.useState)({mockingIntercept:!1,mockOpen:!1}),[v,x]=(0,s.useState)(!1),[y,b]=(0,s.useState)(null),[w,j]=(0,s.useState)(!1),[N,S]=(0,s.useState)(1),[C]=(0,s.useState)(10),[k,E]=(0,s.useState)(""),[R,P]=(0,s.useState)(null),[T,M]=(0,s.useState)(!1),[O,A]=(0,s.useState)(!1),[_,L]=(0,s.useState)(!1),[I,D]=(0,s.useState)(!0),[$,F]=(0,s.useState)(null),[z,U]=(0,s.useState)([]),[W,H]=(0,s.useState)(!1),[B,V]=(0,s.useState)(!1),[K,q]=(0,s.useState)(!1),[G,X]=(0,s.useState)({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0}),[Y,J]=(0,s.useState)(null),[Z,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(""),[en,er]=(0,s.useState)({}),[eo,ea]=(0,s.useState)(!1),[ei,es]=(0,s.useState)(""),[el,ec]=(0,s.useState)([]),em=async()=>{$&&await eh($)},eh=async e=>{try{await new Promise(e=>setTimeout(e,200));let t=e.getModel();if(t){await e.getAction("editor.action.formatDocument")?.run();let n=t.getValue();if(n&&!n.includes("\n")&&n.length>50){let r=n.replace(/\{\s*/g,"{\n ").replace(/\}\s*/g,"\n}").replace(/;\s*/g,";\n ").replace(/,\s*/g,",\n ").replace(/\n\s*\n/g,"\n").trim();r!==n&&(t.setValue(r),setTimeout(()=>{e.getAction("editor.action.formatDocument")?.run()},100))}}}catch(e){console.log("自动格式化失败:",e)}},eg=()=>{t.push("/initialization")},ev=async()=>{if(n){x(!0);try{let e=await fetch("/api/open-project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n})}),t=await e.json();t.success||(console.error("打开项目失败:",t.error),alert(`打开项目失败: ${t.error}`))}catch(e){console.error("打开项目失败:",e),alert("打开项目失败: 网络错误")}finally{x(!1)}}};(0,s.useCallback)(async()=>{if(!n||!r)return;let e={};for(let t of Object.keys(r.envs))e[`${t}`]={loading:!0,running:!1};er(e);let t=Object.keys(r.envs).map(async e=>{try{let t=await fetch(`/api/process/status?projectName=${encodeURIComponent(n)}&envName=${encodeURIComponent(e)}`),r=await t.json();if(r.success&&r.data)return{envName:e,status:r.data}}catch(t){console.error(`获取环境 ${e} 状态失败:`,t)}return{envName:e,status:{running:!1}}}),o=await Promise.all(t),a={};o.forEach(({envName:e,status:t})=>{a[e]={running:t.running||!1,pid:t.pid,startTime:t.startTime,port:t.port,loading:!1}}),er(a)},[n,r]);let ex=async e=>{if(!n||!r)return;let t=r.envs[e];if(!t.startCommand)return void alert("该环境未配置启动命令");er(t=>({...t,[e]:{...t[e],loading:!0}}));try{let r=await fetch("/api/process/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,envName:e,startCommand:t.startCommand})}),o=await r.json();if(o.success)er(t=>({...t,[e]:{running:!0,pid:o.data.pid,startTime:o.data.startTime,port:o.data.port,loading:!1}}));else throw Error(o.error||"启动失败")}catch(t){console.error("启动进程失败:",t),alert(`启动失败: ${t instanceof Error?t.message:"未知错误"}`),er(t=>({...t,[e]:{...t[e],loading:!1}}))}},ey=async e=>{if(n){er(t=>({...t,[e]:{...t[e],loading:!0}}));try{let t=await fetch(`/api/process/start?projectName=${encodeURIComponent(n)}&envName=${encodeURIComponent(e)}`,{method:"DELETE"}),r=await t.json();if(r.success)er(t=>({...t,[e]:{running:!1,loading:!1}}));else throw Error(r.error||"停止失败")}catch(t){console.error("停止进程失败:",t),alert(`停止失败: ${t instanceof Error?t.message:"未知错误"}`),er(t=>({...t,[e]:{...t[e],loading:!1}}))}}},[eb,ew]=(0,s.useState)(null),ej=e=>{if(!n)return;eb&&eb.close(),ec([]);let t=new EventSource(`/api/process/logs/stream?projectName=${encodeURIComponent(n)}&envName=${encodeURIComponent(e)}`);t.onmessage=e=>{try{let t=JSON.parse(e.data);"log"===t.type?ec(e=>{let n=[...e,t.content];return n.length>1e3?n.slice(-1e3):n}):"init"===t.type?ec([t.message]):"end"===t.type&&ec(e=>[...e,`[系统] ${t.message}`])}catch(e){console.error("解析日志数据失败:",e)}},t.onerror=e=>{console.error("日志流错误:",e),t.close(),ew(null)},ew(t)},eN=()=>{eb&&(eb.close(),ew(null))},eS=e=>{es(e),ea(!0),ej(e)},eC=()=>{ea(!1),ec([]),es(""),eN()},ek=(e,t)=>{if(!r)return;let n=r.envs[e],o="";o="custom"===t?p[e]?.selectedOption==="custom"?p[e]?.selectedProxy||"":n.proxyEnv.custom||"":n.proxyEnv[t]||"",m(n=>({...n,[e]:{...n[e],selectedProxy:o,selectedOption:t,saveMessage:""}}))},eE=(e,t)=>{m(n=>({...n,[e]:{...n[e],selectedProxy:t,saveMessage:""}}))},eR=async e=>{g(t=>({...t,mockingIntercept:e,saving:!0,saveMessage:""}));try{let t=await fetch("/api/project-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,projectConfig:{mockingIntercept:e,mockOpen:h.mockOpen}})}),r=await t.json();if(r.success)o(t=>t?{...t,mockingIntercept:e}:t),g(e=>({...e,saving:!1,saveMessage:"Mock拦截配置已保存"})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},2e3);else throw Error(r.error||"保存失败")}catch(t){console.error("保存Mock拦截配置失败:",t),g(n=>({...n,mockingIntercept:!e,saving:!1,saveMessage:`保存失败: ${t instanceof Error?t.message:"未知错误"}`})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},3e3)}},eP=async e=>{g(t=>({...t,mockOpen:e,saving:!0,saveMessage:""}));try{let t=await fetch("/api/project-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,projectConfig:{mockingIntercept:h.mockingIntercept,mockOpen:e}})}),r=await t.json();if(r.success)o(t=>t?{...t,mockOpen:e}:t),g(e=>({...e,saving:!1,saveMessage:"Mock开启配置已保存"})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},2e3);else throw Error(r.error||"保存失败")}catch(t){console.error("保存Mock开启配置失败:",t),g(n=>({...n,mockOpen:!e,saving:!1,saveMessage:`保存失败: ${t instanceof Error?t.message:"未知错误"}`})),setTimeout(()=>{g(e=>({...e,saveMessage:""}))},3e3)}},eT=async e=>{if(!r||!n)return;let t=p[e]?.selectedProxy?.trim();if(!t)return void m(t=>({...t,[e]:{...t[e],saveMessage:"请先选择或填写代理地址"}}));let a=r.envs[e],i=!Object.values(a.proxyEnv).includes(t);m(t=>({...t,[e]:{...t[e],saving:!0,saveMessage:""}}));try{let r={projectName:n,envName:e,newProxy:i?"custom":Object.keys(a.proxyEnv).find(e=>a.proxyEnv[e]===t)||""};i&&(r.customProxyUrl=t);let s=await fetch("/api/project-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),l=await s.json();l.success?(o(n=>{if(!n)return n;let r={...n.envs};return r[e]={...r[e],currentProxy:l.data.currentProxy},"custom"===l.data.currentProxy&&(r[e].proxyEnv={...r[e].proxyEnv,custom:t}),{...n,envs:r}}),m(t=>({...t,[e]:{...t[e],saving:!1,saveMessage:"保存成功"}}))):m(t=>({...t,[e]:{...t[e],saving:!1,saveMessage:`保存失败: ${l.error}`}}))}catch(t){console.error("保存配置失败:",t),m(t=>({...t,[e]:{...t[e],saving:!1,saveMessage:"保存失败: 网络错误"}}))}},eM=async()=>{if(window.confirm("确定要一键关闭所有Mock吗?"))try{let e=await fetch("/api/cleanup-mock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n})});(await e.json()).success&&await eA()}catch(e){console.error("清空Mock配置失败:",e)}},eO=async()=>{if(window.confirm("确定要一键开启所有Mock吗?"))try{let e=await fetch("/api/open-all-mock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n})});(await e.json()).success&&await eA()}catch(e){console.error("清空Mock配置失败:",e)}},eA=async()=>{if(n){j(!0);try{let e=await fetch(`/api/mock-file?project=${encodeURIComponent(n)}`),t=await e.json();t.success?b(t.data):console.error("获取Mock数据失败:",t.error)}catch(e){console.error("获取Mock数据失败:",e)}finally{j(!1)}}},e_=async(e,t,r)=>{if(n)try{let o=await fetch("/api/mock-setting",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,apiName:e,method:t,currentSite:r})}),a=await o.json();a.success?b(n=>n?{...n,mockFiles:n.mockFiles.map(n=>n.apiName===e?{...n,methods:n.methods.map(e=>e.method===t?{...e,setting:{...e.setting,currentSite:r}}:e)}:n)}:n):(console.error("更新场景失败:",a.error),alert(`更新场景失败: ${a.error}`))}catch(e){console.error("更新场景失败:",e),alert("更新场景失败: 网络错误")}},eL=async(e,t,r)=>{if(n){A(!0),D(!0);try{let o=await fetch(`/api/mock-file-content?project=${encodeURIComponent(n)}&apiName=${encodeURIComponent(e)}&method=${encodeURIComponent(t)}&siteName=${encodeURIComponent(r)}`),a=await o.json();a.success?(P({projectName:n,apiName:e,method:t,siteName:r,content:a.data.content}),M(!0)):(console.error("获取文件内容失败:",a.error),alert(`获取文件内容失败: ${a.error}`))}catch(e){console.error("获取文件内容失败:",e),alert("获取文件内容失败: 网络错误")}finally{A(!1)}}},eI=async()=>{if(R){L(!0);try{let e=await fetch("/api/mock-file-content",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(R)}),t=await e.json();t.success?(M(!1),P(null)):(console.error("保存文件失败:",t.error),alert(`保存文件失败: ${t.error}`))}catch(e){console.error("保存文件失败:",e),alert("保存文件失败: 网络错误")}finally{L(!1)}}},eD=()=>{M(!1),P(null),D(!0)},e$=(e,t)=>{"siteName"===e&&B||X(n=>({...n,[e]:t}))},eF=(e,t)=>{let n=e.toUpperCase(),r=t.replace(/\//g,"_").replace(/^_/,"");switch(n){case"GET":return`module.exports = {
|
|
6
6
|
"code": 200,
|
|
7
7
|
"message": "获取${r}成功",
|
|
8
8
|
"data": {
|
|
@@ -34,4 +34,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
34
34
|
"code": 200,
|
|
35
35
|
"message": "操作成功",
|
|
36
36
|
"data": {}
|
|
37
|
-
}`}},ej=(e,t,n)=>{if(!y)return!1;let r=e.replace(/\//g,"_").replace(/^_/,""),o=y.mockFiles.find(e=>e.apiName===r);if(!o)return!1;let a=o.methods.find(e=>e.method.toLowerCase()===t.toLowerCase());return!!a&&!!a.files.find(e=>e.siteName===n)},eN=async()=>{if(!G.apiPath.trim())return void alert("请输入接口地址");if(ej(G.apiPath,G.method,G.siteName))return void alert(`接口 ${G.apiPath} [${G.method.toUpperCase()}] 的场景 "${G.siteName}" 已存在,不能重复创建`);Q(!0);try{let e=G.apiPath.replace(/\//g,"_").replace(/^_/,""),t=ew(G.method,G.apiPath),r=await fetch("/api/mock-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,apiName:e,method:G.method.toLowerCase(),siteName:G.siteName,content:t})}),o=await r.json();if(o.success)G.mockOpen&&await eS(e,G.method.toLowerCase(),G.siteName,!0),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0}),B(!1),await eh(),alert("Mock文件创建成功");else throw Error(o.error||"创建失败")}catch(e){console.error("创建Mock文件失败:",e),alert(`创建Mock文件失败: ${e instanceof Error?e.message:"未知错误"}`)}finally{Q(!1)}},ek=(e,t,n)=>{console.log("新增场景点击:",{apiName:e,method:t,apiPath:n}),J({apiName:e,method:t,apiPath:n});let r={apiPath:n,method:t.toUpperCase(),siteName:"",mockOpen:!0};console.log("设置表单数据:",r),X(r),q(!0)},eE=(e,t,n)=>{if(!y)return!1;let r=y.mockFiles.find(t=>t.apiName===e);if(!r)return!1;let o=r.methods.find(e=>e.method.toLowerCase()===t.toLowerCase());return!!o&&!!o.files.find(e=>e.siteName===n)},eC=async()=>{if(!Y||!G.siteName.trim())return void alert("请输入场景名称");if(eE(Y.apiName,Y.method,G.siteName))return void alert(`接口 ${Y.apiPath} [${Y.method.toUpperCase()}] 的场景 "${G.siteName}" 已存在`);Q(!0);try{let e=ew(Y.method,Y.apiPath),t=await fetch("/api/mock-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,apiName:Y.apiName,method:Y.method.toLowerCase(),siteName:G.siteName,content:e})}),r=await t.json();if(r.success)G.mockOpen&&await eS(Y.apiName,Y.method,G.siteName,!0),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0}),q(!1),J(null),await eh(),alert("场景创建成功");else throw Error(r.error||"创建失败")}catch(e){console.error("创建场景失败:",e),alert(`创建场景失败: ${e instanceof Error?e.message:"未知错误"}`)}finally{Q(!1)}},eS=async(e,t,n,o)=>{if(r)try{let a=await fetch("/api/mock-open-status",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:r.projectName,apiName:e,method:t,siteName:n,isOpen:o})}),i=await a.json();i.success?await eh():console.error("更新Mock开启状态失败:",i.error)}catch(e){console.error("更新Mock开启状态失败:",e)}},eP=e=>{et(e),k(1)};if(a)return(0,i.jsx)("main",{className:"container mx-auto p-4 sm:p-6 md:p-8",children:(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{children:"加载中..."})})});if(d||!r)return(0,i.jsxs)("main",{className:"container mx-auto p-4 sm:p-6 md:p-8",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,i.jsx)("h1",{className:"text-2xl font-bold",children:"项目配置"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[n&&(0,i.jsx)(u.$,{variant:"default",onClick:ea,disabled:v,children:v?"打开中...":"在 Cursor 中打开"}),(0,i.jsx)(u.$,{variant:"outline",onClick:eo,children:"返回初始化页面"})]})]}),(0,i.jsx)("div",{className:"text-center text-red-500 py-8",children:(0,i.jsx)("p",{children:d||"未找到项目配置"})})]});let eR=Object.keys(r.envs);return(0,i.jsxs)("main",{className:"container mx-auto p-4 sm:p-6 md:p-8",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[(0,i.jsxs)("h1",{className:"text-2xl font-bold",children:[r.projectName," - 项目配置"]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(r5,{className:"text-sm font-medium text-gray-600",children:"切换项目:"}),(0,i.jsxs)(rG,{value:n||"",onValueChange:r=>{if(r===n)return;let o=e.get("tab"),a=`/configuration?project=${encodeURIComponent(r)}${o?`&tab=${o}`:""}`;t.push(a)},disabled:W,children:[(0,i.jsx)(rY,{className:"w-40",children:(0,i.jsx)(rX,{placeholder:W?"加载中...":"选择项目"})}),(0,i.jsx)(rJ,{children:z.map(e=>(0,i.jsx)(rZ,{value:e.name,children:(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:`w-2 h-2 rounded-full ${"existing"===e.status?"bg-green-500":"failed"===e.status?"bg-red-500":"bg-yellow-500"}`}),(0,i.jsx)("span",{children:e.name})]})},e.name))})]})]})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"default",onClick:ea,disabled:v,children:v?"打开中...":"在 Cursor 中打开"}),(0,i.jsx)(u.$,{variant:"outline",onClick:eo,children:"返回初始化页面"})]})]}),eR.length>0?(0,i.jsxs)(eu,{value:C||eR[0],onValueChange:e=>{S(e),"mock"===e&&eh()},className:"w-full",children:[(0,i.jsxs)(ed,{className:"grid w-full",style:{gridTemplateColumns:`repeat(${eR.length+1}, 1fr)`},children:[eR.map(e=>(0,i.jsx)(ef,{value:e,className:"capitalize",children:e},e)),(0,i.jsx)(ef,{value:"mock",className:"capitalize",children:"Mock配置"})]}),eR.map(e=>{let t=r.envs[e],n=Object.entries(t.proxyEnv),o=p[e]?.selectedProxy||"",a=p[e]?.selectedOption||"",s=t.currentProxy,l=t.proxyEnv[s]||s,c=t.proxyEnv[s]?s:"custom";return(0,i.jsx)(ep,{value:e,className:"space-y-6",children:(0,i.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,i.jsxs)("div",{className:"p-6 bg-gray-50 rounded-lg",children:[(0,i.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[e," 环境配置"]}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(r5,{className:"block text-sm font-medium mb-2",children:"接口代理环境切换"}),(0,i.jsxs)(rG,{value:a,onValueChange:t=>ei(e,t),children:[(0,i.jsx)(rY,{className:"w-full",children:(0,i.jsx)(rX,{placeholder:"选择代理环境"})}),(0,i.jsx)(rJ,{children:n.map(([e,t])=>(0,i.jsxs)(rZ,{value:e,children:[e,"(",t,")"]},e))})]})]}),l&&(0,i.jsxs)("div",{className:"p-3 bg-blue-50 rounded-md",children:[(0,i.jsxs)("p",{className:"text-sm text-blue-700",children:["当前项目接口已代理至:",c," 环境"]}),(0,i.jsxs)("p",{className:"text-sm text-blue-600",children:["代理地址为:",l]})]}),"custom"===a&&(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{className:"block text-sm font-medium",children:"自定义代理地址"}),(0,i.jsx)(r1,{type:"url",placeholder:"请输入自定义代理地址 (如: http://localhost:52741)",value:o,onChange:t=>es(e,t.target.value),className:"w-full"}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:"请输入完整的代理地址,包括协议 (http:// 或 https://)"})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)(u.$,{onClick:()=>em(e),disabled:p[e]?.saving,className:"w-full sm:w-auto",children:p[e]?.saving?"保存中...":"保存配置"}),p[e]?.saveMessage&&(0,i.jsx)("span",{className:`text-sm ml-3 ${p[e]?.saveMessage==="保存成功"?"text-green-600":"text-red-600"}`,children:p[e]?.saveMessage})]})]})]}),(0,i.jsx)(aC,{currentProjectName:r.projectName,currentEnvName:e})]})},e)}),(0,i.jsx)(ep,{value:"mock",className:"space-y-6",children:(0,i.jsxs)("div",{className:"p-6 bg-gray-50 rounded-lg",children:[(0,i.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Mock配置"}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"space-y-1",children:[(0,i.jsx)(r5,{className:"text-sm font-medium",children:"Mock拦截"}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:"启用或禁用Mock拦截功能"})]}),(0,i.jsx)(oo,{checked:h.mockingIntercept,onCheckedChange:el})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"space-y-1",children:[(0,i.jsx)(r5,{className:"text-sm font-medium",children:"Mock开启"}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:"启用或禁用Mock功能"})]}),(0,i.jsx)(oo,{checked:h.mockOpen,onCheckedChange:ec})]})]}),h.saveMessage&&(0,i.jsx)("div",{className:"mb-6",children:(0,i.jsx)("span",{className:`text-sm ${h.saveMessage.includes("已保存")?"text-green-600":"text-red-600"}`,children:h.saveMessage})}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("h4",{className:"text-md font-medium",children:"Mock接口列表"}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(u.$,{onClick:()=>B(!0),variant:"default",size:"sm",children:"新建"}),(0,i.jsx)(u.$,{onClick:eh,disabled:w,variant:"outline",size:"sm",children:w?"加载中...":"刷新"})]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,i.jsx)(r1,{placeholder:"搜索接口地址...",value:ee,onChange:e=>eP(e.target.value),className:"pr-8"}),ee&&(0,i.jsx)(u.$,{variant:"ghost",size:"sm",onClick:()=>{et(""),k(1)},className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0 hover:bg-gray-100",children:"\xd7"})]}),ee&&(0,i.jsxs)("span",{className:"text-sm text-gray-500",children:['搜索关键词: "',ee,'"']})]}),w?(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{className:"text-gray-500",children:"加载Mock数据中..."})}):y&&y.mockFiles.length>0?(()=>{let e=[];y.mockFiles.forEach(t=>{t.methods.forEach(n=>{let r=t.apiName.replace(/_/g,"/"),o=n.files.map(e=>e.siteName),a=n.setting?.currentSite||o[0]||"",i=n.setting?.open||[],s=i.includes(a);e.push({apiPath:r,method:n.method.toUpperCase(),currentSite:a,availableSites:o,apiName:t.apiName,isOpen:s,openSites:i})})});let t=ee.trim()?e.filter(e=>e.apiPath.toLowerCase().includes(ee.toLowerCase())):e,n=t.length,r=Math.ceil(n/E),o=(N-1)*E,a=o+E,s=t.slice(o,a);return(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)(oa,{children:[(0,i.jsx)(oi,{children:(0,i.jsxs)(ol,{children:[(0,i.jsx)(oc,{children:"接口地址"}),(0,i.jsx)(oc,{children:"请求方法"}),(0,i.jsx)(oc,{children:"当前场景"}),(0,i.jsx)(oc,{children:"开启mock"}),(0,i.jsx)(oc,{children:"操作"})]})}),(0,i.jsx)(os,{children:s.map((e,t)=>(0,i.jsxs)(ol,{children:[(0,i.jsx)(ou,{className:"font-medium",children:e.apiPath}),(0,i.jsx)(ou,{children:(0,i.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===e.method?"bg-green-100 text-green-800":"POST"===e.method?"bg-blue-100 text-blue-800":"PUT"===e.method?"bg-yellow-100 text-yellow-800":"DELETE"===e.method?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:e.method})}),(0,i.jsx)(ou,{children:(0,i.jsxs)(rG,{value:e.currentSite,onValueChange:t=>eg(e.apiName,e.method.toLowerCase(),t),children:[(0,i.jsx)(rY,{className:"w-32",children:(0,i.jsx)(rX,{})}),(0,i.jsx)(rJ,{children:e.availableSites.map(e=>(0,i.jsx)(rZ,{value:e,children:e},e))})]})}),(0,i.jsx)(ou,{children:(0,i.jsx)(oo,{checked:e.isOpen,onCheckedChange:t=>eS(e.apiName,e.method.toLowerCase(),e.currentSite,t)})}),(0,i.jsx)(ou,{children:(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>ev(e.apiName,e.method.toLowerCase(),e.currentSite),disabled:O,children:O?"加载中...":"编辑"}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>ek(e.apiName,e.method.toLowerCase(),e.apiPath),disabled:Z,children:"新增场景"})]})})]},`${e.apiName}-${e.method}-${t}`))})]}),r>1&&(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"text-sm text-gray-500",children:["显示 ",o+1,"-",Math.min(a,n)," 条,共 ",n," 条"]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>k(e=>Math.max(1,e-1)),disabled:1===N,children:"上一页"}),(0,i.jsxs)("span",{className:"text-sm",children:[N," / ",r]}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>k(e=>Math.min(r,e+1)),disabled:N===r,children:"下一页"})]})]})]})})():(0,i.jsxs)("div",{className:"text-center py-8",children:[(0,i.jsx)("p",{className:"text-gray-500",children:"暂无Mock接口数据"}),(0,i.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"请先创建Mock文件"})]})]})]})})]}):(0,i.jsx)("div",{className:"text-center text-gray-500 py-8",children:(0,i.jsx)("p",{children:"该项目没有配置环境信息"})}),(0,i.jsx)(oV,{open:T||V||K,onOpenChange:e=>{e||(M(!1),B(!1),q(!1),J(null))},children:(0,i.jsxs)(oq,{className:"w-screen h-screen max-w-none max-h-none m-0 rounded-none overflow-hidden flex flex-col",children:[(0,i.jsxs)(oG,{className:"flex-shrink-0 border-b pb-4",children:[(0,i.jsx)(oY,{children:V?"新建Mock文件":K?"新增场景":"编辑Mock文件"}),(0,i.jsx)(oJ,{children:V?"创建一个新的Mock接口文件":K&&Y?(0,i.jsxs)(i.Fragment,{children:["为接口 ",Y.apiPath," [",Y.method.toUpperCase(),"] 新增场景"]}):P?(0,i.jsxs)(i.Fragment,{children:["编辑 ",P.apiName.replace(/_/g,"/")," - ",P.method.toUpperCase()," - ",P.siteName,".js"]}):null})]}),(V||K)&&(0,i.jsxs)("div",{className:"flex-shrink-0 border-b pb-4",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"apiPath",className:"text-sm font-medium",children:"接口地址"}),K?(0,i.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-600",children:G.apiPath}):(0,i.jsx)(r1,{id:"apiPath",placeholder:"/api/user/info",value:G.apiPath,onChange:e=>eb("apiPath",e.target.value)})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"method",className:"text-sm font-medium",children:"请求方法"}),K?(0,i.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-600",children:G.method}):(0,i.jsxs)(rG,{value:G.method,onValueChange:e=>eb("method",e),children:[(0,i.jsx)(rY,{children:(0,i.jsx)(rX,{})}),(0,i.jsxs)(rJ,{children:[(0,i.jsx)(rZ,{value:"GET",children:"GET"}),(0,i.jsx)(rZ,{value:"POST",children:"POST"}),(0,i.jsx)(rZ,{value:"PUT",children:"PUT"}),(0,i.jsx)(rZ,{value:"DELETE",children:"DELETE"}),(0,i.jsx)(rZ,{value:"PATCH",children:"PATCH"})]})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"siteName",className:"text-sm font-medium",children:"场景名称"}),V?(0,i.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-600",children:"默认场景"}):(0,i.jsx)(r1,{id:"siteName",placeholder:"请输入场景名称",value:G.siteName,onChange:e=>eb("siteName",e.target.value)})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"mockOpen",className:"text-sm font-medium",children:"开启Mock"}),(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsx)(oo,{id:"mockOpen",checked:G.mockOpen,onCheckedChange:e=>eb("mockOpen",e)}),(0,i.jsx)("span",{className:"text-sm text-gray-600",children:G.mockOpen?"开启":"关闭"})]})]})]}),V&&G.apiPath.trim()&&G.siteName.trim()&&ej(G.apiPath,G.method,G.siteName)&&(0,i.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsxs)("span",{className:"text-red-600 text-sm",children:["⚠️ 接口 ",G.apiPath," [",G.method.toUpperCase(),'] 的场景 "',G.siteName,'" 已存在']})})}),K&&Y&&G.siteName.trim()&&eE(Y.apiName,Y.method,G.siteName)&&(0,i.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsxs)("span",{className:"text-red-600 text-sm",children:['⚠️ 场景 "',G.siteName,'" 已存在']})})})]}),(0,i.jsx)("div",{className:"flex-1 flex flex-col space-y-4 py-4",children:(0,i.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,i.jsx)(r5,{className:"text-sm font-medium mb-2",children:"文件内容"}),(0,i.jsxs)("div",{className:"flex-1 border rounded-md overflow-hidden relative",children:[I&&(0,i.jsx)("div",{className:"absolute inset-0 bg-gray-50 flex items-center justify-center z-10",children:(0,i.jsx)("p",{className:"text-gray-500",children:"编辑器加载中..."})}),(0,i.jsx)(aE,{height:"100%",defaultLanguage:"javascript",value:V||K?ew(G.method,G.apiPath):P?.content||"",onChange:e=>{V||K||R(t=>t?{...t,content:e||""}:null)},onMount:async e=>{console.log("编辑器挂载,模式:",{isCreateMode:V,isAddSceneMode:K,createFormData:G}),_(e),$(!1),setTimeout(()=>er(e),500)},loading:(0,i.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,i.jsx)("p",{className:"text-gray-500",children:"编辑器加载中..."})}),options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",roundedSelection:!1,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,wordWrap:"on",theme:"vs-dark",bracketPairColorization:{enabled:!0},quickSuggestions:{other:!0,comments:!0,strings:!0},formatOnPaste:!0,formatOnType:!0,readOnly:V&&!G.apiPath.trim()||K&&!G.apiPath.trim()}},V?"create":K?"addscene":"edit")]})]})}),(0,i.jsxs)(oX,{className:"flex justify-between flex-shrink-0 border-t pt-4",children:[(0,i.jsx)(u.$,{variant:"secondary",onClick:en,disabled:!F||I,children:"格式化代码"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",onClick:()=>{V?(B(!1),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0})):K?(q(!1),J(null),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0})):ey()},children:"取消"}),V?(0,i.jsx)(u.$,{onClick:eN,disabled:Z||!G.apiPath.trim()||!G.siteName.trim()||ej(G.apiPath,G.method,G.siteName),children:Z?"创建中...":"创建"}):K?(0,i.jsx)(u.$,{onClick:eC,disabled:Z||!G.siteName.trim()||!!Y&&eE(Y.apiName,Y.method,G.siteName),children:Z?"创建中...":"创建"}):(0,i.jsx)(u.$,{onClick:ex,disabled:L,children:L?"保存中...":"保存"})]})]})]})})]})}function aR(){return(0,i.jsx)(s.Suspense,{fallback:(0,i.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,i.jsxs)("div",{className:"text-center space-y-4",children:[(0,i.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto"}),(0,i.jsx)("p",{className:"text-gray-600",children:"正在加载配置页面..."})]})}),children:(0,i.jsx)(aP,{})})}},9121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9551:e=>{"use strict";e.exports=require("url")},9875:()=>{}};var t=require("../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),r=t.X(0,[131,967,542,901],()=>n(3567));module.exports=r})();
|
|
37
|
+
}`}},ez=(e,t,n)=>{if(!y)return!1;let r=e.replace(/\//g,"_").replace(/^_/,""),o=y.mockFiles.find(e=>e.apiName===r);if(!o)return!1;let a=o.methods.find(e=>e.method.toLowerCase()===t.toLowerCase());return!!a&&!!a.files.find(e=>e.siteName===n)},eU=async()=>{if(!G.apiPath.trim())return void alert("请输入接口地址");if(ez(G.apiPath,G.method,G.siteName))return void alert(`接口 ${G.apiPath} [${G.method.toUpperCase()}] 的场景 "${G.siteName}" 已存在,不能重复创建`);Q(!0);try{let e=G.apiPath.replace(/\//g,"_").replace(/^_/,""),t=R?.content??eF(G.method,G.apiPath),r=await fetch("/api/mock-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,apiName:e,method:G.method.toLowerCase(),siteName:G.siteName,content:t})}),o=await r.json();if(o.success)G.mockOpen&&await eV(e,G.method.toLowerCase(),G.siteName,!0),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0}),V(!1),await eA(),alert("Mock文件创建成功");else throw Error(o.error||"创建失败")}catch(e){console.error("创建Mock文件失败:",e),alert(`创建Mock文件失败: ${e instanceof Error?e.message:"未知错误"}`)}finally{Q(!1)}},eW=(e,t,r)=>{console.log("新增场景点击:",{apiName:e,method:t,apiPath:r}),J({apiName:e,method:t,apiPath:r});let o={apiPath:r,method:t.toUpperCase(),siteName:"",mockOpen:!0};console.log("设置表单数据:",o),X(o),q(!0);let a=eF(o.method,o.apiPath);P({projectName:n||"",apiName:e,method:t.toLowerCase(),siteName:"",content:a||""})},eH=(e,t,n)=>{if(!y)return!1;let r=y.mockFiles.find(t=>t.apiName===e);if(!r)return!1;let o=r.methods.find(e=>e.method.toLowerCase()===t.toLowerCase());return!!o&&!!o.files.find(e=>e.siteName===n)},eB=async()=>{if(!Y||!G.siteName.trim())return void alert("请输入场景名称");if(eH(Y.apiName,Y.method,G.siteName))return void alert(`接口 ${Y.apiPath} [${Y.method.toUpperCase()}] 的场景 "${G.siteName}" 已存在`);Q(!0);try{let e=R?.content??eF(Y.method,Y.apiPath);console.log("defaultContent",e,R);let t=await fetch("/api/mock-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:n,apiName:Y.apiName,method:Y.method.toLowerCase(),siteName:G.siteName,content:e})}),r=await t.json();if(r.success)G.mockOpen&&await eV(Y.apiName,Y.method,G.siteName,!0),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0}),q(!1),J(null),await eA(),alert("场景创建成功");else throw Error(r.error||"创建失败")}catch(e){console.error("创建场景失败:",e),alert(`创建场景失败: ${e instanceof Error?e.message:"未知错误"}`)}finally{Q(!1)}},eV=async(e,t,n,o)=>{if(r)try{let a=await fetch("/api/mock-open-status",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:r.projectName,apiName:e,method:t,siteName:n,isOpen:o})}),i=await a.json();i.success?await eA():console.error("更新Mock开启状态失败:",i.error)}catch(e){console.error("更新Mock开启状态失败:",e)}},eK=e=>{et(e),S(1)};if(a)return(0,i.jsx)("main",{className:"container mx-auto p-4 sm:p-6 md:p-8",children:(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{children:"加载中..."})})});if(d||!r)return(0,i.jsxs)("main",{className:"container mx-auto p-4 sm:p-6 md:p-8",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,i.jsx)("h1",{className:"text-2xl font-bold",children:"项目配置"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[n&&(0,i.jsx)(u.$,{variant:"default",onClick:ev,disabled:v,children:v?"打开中...":"在 Cursor 中打开"}),(0,i.jsx)(u.$,{variant:"outline",onClick:eg,children:"返回初始化页面"})]})]}),(0,i.jsx)("div",{className:"text-center text-red-500 py-8",children:(0,i.jsx)("p",{children:d||"未找到项目配置"})})]});let eq=Object.keys(r.envs);return(0,i.jsxs)("main",{className:"container mx-auto p-4 sm:p-6 md:p-8",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[(0,i.jsxs)("h1",{className:"text-2xl font-bold",children:[r.projectName," - 项目配置"]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(r5,{className:"text-sm font-medium text-gray-600",children:"切换项目:"}),(0,i.jsxs)(rG,{value:n||"",onValueChange:r=>{if(r===n)return;let o=e.get("tab"),a=`/configuration?project=${encodeURIComponent(r)}${o?`&tab=${o}`:""}`;t.push(a)},disabled:W,children:[(0,i.jsx)(rY,{className:"w-40",children:(0,i.jsx)(rX,{placeholder:W?"加载中...":"选择项目"})}),(0,i.jsx)(rJ,{children:z.map(e=>(0,i.jsx)(rZ,{value:e.name,children:(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:`w-2 h-2 rounded-full ${"existing"===e.status?"bg-green-500":"failed"===e.status?"bg-red-500":"bg-yellow-500"}`}),(0,i.jsx)("span",{children:e.name})]})},e.name))})]})]})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"default",onClick:ev,disabled:v,children:v?"打开中...":"在 Cursor 中打开"}),(0,i.jsx)(u.$,{variant:"outline",onClick:eg,children:"返回初始化页面"})]})]}),eq.length>0?(0,i.jsxs)(eu,{value:k||eq[0],onValueChange:e=>{E(e),"mock"===e&&eA()},className:"w-full",children:[(0,i.jsxs)(ed,{className:"grid w-full",style:{gridTemplateColumns:`repeat(${eq.length+1}, 1fr)`},children:[eq.map(e=>(0,i.jsx)(ef,{value:e,className:"capitalize relative",children:(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[e,en[e]?.running&&(0,i.jsx)("span",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse",title:"运行中"})]})},e)),(0,i.jsx)(ef,{value:"mock",className:"capitalize",children:"Mock配置"})]}),eq.map(e=>{let t=r.envs[e],n=Object.entries(t.proxyEnv),o=p[e]?.selectedProxy||"",a=p[e]?.selectedOption||"",s=t.currentProxy,l=t.proxyEnv[s]||s,c=t.proxyEnv[s]?s:"custom";return(0,i.jsxs)(ep,{value:e,className:"space-y-6",children:[(0,i.jsxs)("div",{className:"p-6 bg-gray-50 rounded-lg",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsx)("h3",{className:"text-lg font-semibold",children:"开发服务器控制"}),(0,i.jsx)("div",{className:"flex items-center gap-4",children:en[e]?.running?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"运行中 (PID: ",en[e]?.pid,")"]}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>eS(e),children:"查看日志"}),(0,i.jsx)(u.$,{variant:"destructive",size:"sm",onClick:()=>ey(e),disabled:en[e]?.loading,children:en[e]?.loading?"处理中...":"停止"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-500",children:[(0,i.jsx)("span",{className:"w-2 h-2 bg-gray-400 rounded-full"}),"未运行"]}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>eS(e),children:"查看日志"}),(0,i.jsx)(u.$,{variant:"default",size:"sm",onClick:()=>ex(e),disabled:en[e]?.loading||!t.startCommand,children:en[e]?.loading?"处理中...":"启动"})]})})]}),t.startCommand?(0,i.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,i.jsx)("span",{className:"font-medium",children:"启动命令:"})," ",(0,i.jsx)("code",{className:"px-2 py-1 bg-gray-200 rounded",children:t.startCommand})]}):(0,i.jsx)("div",{className:"text-sm text-yellow-600",children:"⚠️ 该环境未配置启动命令"}),t.host&&(0,i.jsxs)("div",{className:"text-sm text-gray-600 mt-2",children:[(0,i.jsx)("span",{className:"font-medium",children:"访问地址:"}),en[e]?.running?(0,i.jsx)("a",{href:t.host,target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-blue-600 hover:underline",children:t.host}):(0,i.jsx)("span",{className:"ml-2",children:t.host})]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,i.jsxs)("div",{className:"p-6 bg-gray-50 rounded-lg",children:[(0,i.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[e," 环境配置"]}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(r5,{className:"block text-sm font-medium mb-2",children:"接口代理环境切换"}),(0,i.jsxs)(rG,{value:a,onValueChange:t=>ek(e,t),children:[(0,i.jsx)(rY,{className:"w-full",children:(0,i.jsx)(rX,{placeholder:"选择代理环境"})}),(0,i.jsx)(rJ,{children:n.map(([e,t])=>(0,i.jsxs)(rZ,{value:e,children:[e,"(",t,")"]},e))})]})]}),l&&(0,i.jsxs)("div",{className:"p-3 bg-blue-50 rounded-md",children:[(0,i.jsxs)("p",{className:"text-sm text-blue-700",children:["当前项目接口已代理至:",c," 环境"]}),(0,i.jsxs)("p",{className:"text-sm text-blue-600",children:["代理地址为:",l]})]}),"custom"===a&&(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{className:"block text-sm font-medium",children:"自定义代理地址"}),(0,i.jsx)(r1,{type:"url",placeholder:"请输入自定义代理地址 (如: http://localhost:52741)",value:o,onChange:t=>eE(e,t.target.value),className:"w-full"}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:"请输入完整的代理地址,包括协议 (http:// 或 https://)"})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)(u.$,{onClick:()=>eT(e),disabled:p[e]?.saving,className:"w-full sm:w-auto",children:p[e]?.saving?"保存中...":"保存配置"}),p[e]?.saveMessage&&(0,i.jsx)("span",{className:`text-sm ml-3 ${p[e]?.saveMessage==="保存成功"?"text-green-600":"text-red-600"}`,children:p[e]?.saveMessage})]})]})]}),(0,i.jsx)(ak,{currentProjectName:r.projectName,currentEnvName:e})]})]},e)}),(0,i.jsx)(ep,{value:"mock",className:"space-y-6",children:(0,i.jsxs)("div",{className:"p-6 bg-gray-50 rounded-lg",children:[(0,i.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Mock配置"}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"space-y-1",children:[(0,i.jsx)(r5,{className:"text-sm font-medium",children:"Mock拦截"}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:"启用或禁用Mock拦截功能"})]}),(0,i.jsx)(oo,{checked:h.mockingIntercept,onCheckedChange:eR})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"space-y-1",children:[(0,i.jsx)(r5,{className:"text-sm font-medium",children:"Mock开启"}),(0,i.jsx)("p",{className:"text-xs text-gray-500",children:"启用或禁用Mock功能"})]}),(0,i.jsx)(oo,{checked:h.mockOpen,onCheckedChange:eP})]})]}),h.saveMessage&&(0,i.jsx)("div",{className:"mb-6",children:(0,i.jsx)("span",{className:`text-sm ${h.saveMessage.includes("已保存")?"text-green-600":"text-red-600"}`,children:h.saveMessage})}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("h4",{className:"text-md font-medium",children:"Mock接口列表"}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(u.$,{onClick:()=>{V(!0);let e=eF(G.method,G.apiPath);P({projectName:n||"",apiName:G.apiPath,method:G.method.toLowerCase(),siteName:"",content:e||""})},variant:"default",size:"sm",children:"新建"}),(0,i.jsx)(u.$,{onClick:eA,disabled:w,variant:"outline",size:"sm",children:w?"加载中...":"刷新"}),(0,i.jsx)(u.$,{onClick:eM,variant:"outline",size:"sm",children:"一键关闭"}),(0,i.jsx)(u.$,{onClick:eO,variant:"outline",size:"sm",children:"一键开启"})]})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,i.jsx)(r1,{placeholder:"搜索接口地址...",value:ee,onChange:e=>eK(e.target.value),className:"pr-8"}),ee&&(0,i.jsx)(u.$,{variant:"ghost",size:"sm",onClick:()=>{et(""),S(1)},className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-6 w-6 p-0 hover:bg-gray-100",children:"\xd7"})]}),ee&&(0,i.jsxs)("span",{className:"text-sm text-gray-500",children:['搜索关键词: "',ee,'"']})]}),w?(0,i.jsx)("div",{className:"text-center py-8",children:(0,i.jsx)("p",{className:"text-gray-500",children:"加载Mock数据中..."})}):y&&y.mockFiles.length>0?(()=>{let e=[];y.mockFiles.forEach(t=>{t.methods.forEach(n=>{let r=t.apiName.replace(/_/g,"/"),o=n.files.map(e=>e.siteName),a=n.setting?.currentSite||o[0]||"",i=n.setting?.open||[],s=i.includes(a);e.push({apiPath:r,method:n.method.toUpperCase(),currentSite:a,availableSites:o,apiName:t.apiName,isOpen:s,openSites:i})})});let t=ee.trim()?e.filter(e=>e.apiPath.toLowerCase().includes(ee.toLowerCase())):e,n=t.length,r=Math.ceil(n/C),o=(N-1)*C,a=o+C,s=t.slice(o,a);return(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)(oa,{children:[(0,i.jsx)(oi,{children:(0,i.jsxs)(ol,{children:[(0,i.jsx)(oc,{children:"接口地址"}),(0,i.jsx)(oc,{children:"请求方法"}),(0,i.jsx)(oc,{children:"当前场景"}),(0,i.jsx)(oc,{children:"开启mock"}),(0,i.jsx)(oc,{children:"操作"})]})}),(0,i.jsx)(os,{children:s.map((e,t)=>(0,i.jsxs)(ol,{children:[(0,i.jsx)(ou,{className:"font-medium",children:e.apiPath}),(0,i.jsx)(ou,{children:(0,i.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===e.method?"bg-green-100 text-green-800":"POST"===e.method?"bg-blue-100 text-blue-800":"PUT"===e.method?"bg-yellow-100 text-yellow-800":"DELETE"===e.method?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:e.method})}),(0,i.jsx)(ou,{children:(0,i.jsxs)(rG,{value:e.currentSite,onValueChange:t=>e_(e.apiName,e.method.toLowerCase(),t),children:[(0,i.jsx)(rY,{className:"w-32",children:(0,i.jsx)(rX,{})}),(0,i.jsx)(rJ,{children:e.availableSites.map(e=>(0,i.jsx)(rZ,{value:e,children:e},e))})]})}),(0,i.jsx)(ou,{children:(0,i.jsx)(oo,{checked:e.isOpen,onCheckedChange:t=>eV(e.apiName,e.method.toLowerCase(),e.currentSite,t)})}),(0,i.jsx)(ou,{children:(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>eL(e.apiName,e.method.toLowerCase(),e.currentSite),disabled:O,children:O?"加载中...":"编辑"}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>eW(e.apiName,e.method.toLowerCase(),e.apiPath),disabled:Z,children:"新增场景"})]})})]},`${e.apiName}-${e.method}-${t}`))})]}),r>1&&(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"text-sm text-gray-500",children:["显示 ",o+1,"-",Math.min(a,n)," 条,共 ",n," 条"]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>S(e=>Math.max(1,e-1)),disabled:1===N,children:"上一页"}),(0,i.jsxs)("span",{className:"text-sm",children:[N," / ",r]}),(0,i.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>S(e=>Math.min(r,e+1)),disabled:N===r,children:"下一页"})]})]})]})})():(0,i.jsxs)("div",{className:"text-center py-8",children:[(0,i.jsx)("p",{className:"text-gray-500",children:"暂无Mock接口数据"}),(0,i.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"请先创建Mock文件"})]})]})]})})]}):(0,i.jsx)("div",{className:"text-center text-gray-500 py-8",children:(0,i.jsx)("p",{children:"该项目没有配置环境信息"})}),(0,i.jsx)(oB,{open:T||B||K,onOpenChange:e=>{e||(M(!1),V(!1),q(!1),J(null))},children:(0,i.jsxs)(oq,{className:"w-screen h-screen max-w-none max-h-none m-0 rounded-none overflow-hidden flex flex-col",children:[(0,i.jsxs)(oG,{className:"flex-shrink-0 border-b pb-4",children:[(0,i.jsx)(oY,{children:B?"新建Mock文件":K?"新增场景":"编辑Mock文件"}),(0,i.jsx)(oJ,{children:B?"创建一个新的Mock接口文件":K&&Y?(0,i.jsxs)(i.Fragment,{children:["为接口 ",Y.apiPath," [",Y.method.toUpperCase(),"] 新增场景"]}):R?(0,i.jsxs)(i.Fragment,{children:["编辑 ",R.apiName.replace(/_/g,"/")," - ",R.method.toUpperCase()," - ",R.siteName,".js"]}):null})]}),(B||K)&&(0,i.jsxs)("div",{className:"flex-shrink-0 border-b pb-4",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"apiPath",className:"text-sm font-medium",children:"接口地址"}),K?(0,i.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-600",children:G.apiPath}):(0,i.jsx)(r1,{id:"apiPath",placeholder:"/api/user/info",value:G.apiPath,onChange:e=>e$("apiPath",e.target.value)})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"method",className:"text-sm font-medium",children:"请求方法"}),K?(0,i.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-600",children:G.method}):(0,i.jsxs)(rG,{value:G.method,onValueChange:e=>e$("method",e),children:[(0,i.jsx)(rY,{children:(0,i.jsx)(rX,{})}),(0,i.jsxs)(rJ,{children:[(0,i.jsx)(rZ,{value:"GET",children:"GET"}),(0,i.jsx)(rZ,{value:"POST",children:"POST"}),(0,i.jsx)(rZ,{value:"PUT",children:"PUT"}),(0,i.jsx)(rZ,{value:"DELETE",children:"DELETE"}),(0,i.jsx)(rZ,{value:"PATCH",children:"PATCH"})]})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"siteName",className:"text-sm font-medium",children:"场景名称"}),B?(0,i.jsx)("div",{className:"px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-600",children:"默认场景"}):(0,i.jsx)(r1,{id:"siteName",placeholder:"请输入场景名称",value:G.siteName,onChange:e=>e$("siteName",e.target.value)})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(r5,{htmlFor:"mockOpen",className:"text-sm font-medium",children:"开启Mock"}),(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsx)(oo,{id:"mockOpen",checked:G.mockOpen,onCheckedChange:e=>e$("mockOpen",e)}),(0,i.jsx)("span",{className:"text-sm text-gray-600",children:G.mockOpen?"开启":"关闭"})]})]})]}),B&&G.apiPath.trim()&&G.siteName.trim()&&ez(G.apiPath,G.method,G.siteName)&&(0,i.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsxs)("span",{className:"text-red-600 text-sm",children:["⚠️ 接口 ",G.apiPath," [",G.method.toUpperCase(),'] 的场景 "',G.siteName,'" 已存在']})})}),K&&Y&&G.siteName.trim()&&eH(Y.apiName,Y.method,G.siteName)&&(0,i.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,i.jsx)("div",{className:"flex items-center",children:(0,i.jsxs)("span",{className:"text-red-600 text-sm",children:['⚠️ 场景 "',G.siteName,'" 已存在']})})})]}),(0,i.jsx)("div",{className:"flex-1 flex flex-col space-y-4 py-4",children:(0,i.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,i.jsx)(r5,{className:"text-sm font-medium mb-2",children:"文件内容"}),(0,i.jsxs)("div",{className:"flex-1 border rounded-md overflow-hidden relative",children:[I&&(0,i.jsx)("div",{className:"absolute inset-0 bg-gray-50 flex items-center justify-center z-10",children:(0,i.jsx)("p",{className:"text-gray-500",children:"编辑器加载中..."})}),(0,i.jsx)(aC,{height:"100%",defaultLanguage:"javascript",value:R?.content||"",onChange:e=>{P(t=>t?{...t,content:e||""}:null)},onMount:async e=>{console.log("编辑器挂载,模式:",{isCreateMode:B,isAddSceneMode:K,createFormData:G}),F(e),D(!1),setTimeout(()=>eh(e),500)},loading:(0,i.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,i.jsx)("p",{className:"text-gray-500",children:"编辑器加载中..."})}),options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",roundedSelection:!1,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,wordWrap:"on",theme:"vs-dark",bracketPairColorization:{enabled:!0},quickSuggestions:{other:!0,comments:!0,strings:!0},formatOnPaste:!0,formatOnType:!0,readOnly:B&&!G.apiPath.trim()||K&&!G.apiPath.trim()}},B?"create":K?"addscene":"edit")]})]})}),(0,i.jsxs)(oX,{className:"flex justify-between flex-shrink-0 border-t pt-4",children:[(0,i.jsx)(u.$,{variant:"secondary",onClick:em,disabled:!$||I,children:"格式化代码"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",onClick:()=>{B?(V(!1),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0})):K?(q(!1),J(null),X({apiPath:"",method:"GET",siteName:"默认场景",mockOpen:!0})):eD()},children:"取消"}),B?(0,i.jsx)(u.$,{onClick:eU,disabled:Z||!G.apiPath.trim()||!G.siteName.trim()||ez(G.apiPath,G.method,G.siteName),children:Z?"创建中...":"创建"}):K?(0,i.jsx)(u.$,{onClick:eB,disabled:Z||!G.siteName.trim()||!!Y&&eH(Y.apiName,Y.method,G.siteName),children:Z?"创建中...":"创建"}):(0,i.jsx)(u.$,{onClick:eI,disabled:_,children:_?"保存中...":"保存"})]})]})]})}),(0,i.jsx)(oB,{open:eo,onOpenChange:e=>{e||eC()},children:(0,i.jsxs)(oq,{className:"max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0",children:[(0,i.jsxs)(oG,{className:"px-6 pt-6 pb-4",children:[(0,i.jsxs)(oY,{className:"flex items-center justify-between",children:[(0,i.jsxs)("span",{children:["进程日志 - ",n," - ",ei]}),(0,i.jsx)("span",{className:"flex items-center gap-2 text-sm font-normal",children:eb&&(0,i.jsxs)("span",{className:"flex items-center gap-1 text-green-600",children:[(0,i.jsx)("span",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"实时连接"]})})]}),(0,i.jsx)(oJ,{children:"实时显示进程输出日志"})]}),(0,i.jsx)("div",{className:"flex-1 min-h-0 bg-gray-900 mx-6 rounded-md overflow-hidden",children:(0,i.jsx)(aP,{logs:el})}),(0,i.jsxs)(oX,{className:"flex items-center justify-between px-6 pb-6 pt-4",children:[(0,i.jsxs)("div",{className:"text-sm text-gray-500",children:["共 ",el.length," 条日志"]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(u.$,{variant:"outline",onClick:()=>{ei&&(eN(),ej(ei))},disabled:!!eb,children:"重新连接"}),(0,i.jsx)(u.$,{variant:"default",onClick:eC,children:"关闭"})]})]})]})})]})}function aO(){return(0,i.jsx)(s.Suspense,{fallback:(0,i.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,i.jsxs)("div",{className:"text-center space-y-4",children:[(0,i.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto"}),(0,i.jsx)("p",{className:"text-gray-600",children:"正在加载配置页面..."})]})}),children:(0,i.jsx)(aM,{})})}},8940:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,4928,23)),Promise.resolve().then(n.t.bind(n,9670,23)),Promise.resolve().then(n.t.bind(n,1382,23)),Promise.resolve().then(n.t.bind(n,5473,23)),Promise.resolve().then(n.t.bind(n,7429,23)),Promise.resolve().then(n.t.bind(n,8653,23)),Promise.resolve().then(n.t.bind(n,8757,23)),Promise.resolve().then(n.t.bind(n,9687,23))},9121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},9294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9551:e=>{"use strict";e.exports=require("url")}};var t=require("../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),r=t.X(0,[131,821,542,901],()=>n(8590));module.exports=r})();
|