reflex-agent 0.2.1
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/.next/BUILD_ID +1 -0
- package/.next/app-build-manifest.json +319 -0
- package/.next/app-path-routes-manifest.json +34 -0
- package/.next/build-manifest.json +33 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/export-marker.json +6 -0
- package/.next/images-manifest.json +58 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +160 -0
- package/.next/react-loadable-manifest.json +8 -0
- package/.next/required-server-files.json +337 -0
- package/.next/routes-manifest.json +282 -0
- package/.next/server/app/_not-found/page.js +2 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +8 -0
- package/.next/server/app/_not-found.rsc +18 -0
- package/.next/server/app/agents/[agentId]/page.js +3 -0
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -0
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agents/[agentId]/respond/route.js +2 -0
- package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -0
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/images/[rootId]/[file]/route.js +1 -0
- package/.next/server/app/api/images/[rootId]/[file]/route.js.nft.json +1 -0
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/oauth/callback/route.js +22 -0
- package/.next/server/app/api/oauth/callback/route.js.nft.json +1 -0
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/oauth/start/route.js +1 -0
- package/.next/server/app/api/oauth/start/route.js.nft.json +1 -0
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
- package/.next/server/app/api/roots/[id]/attachments/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +2 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +2 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +8 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -0
- package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -0
- package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -0
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +2 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route.js +55 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route.js +114 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route.js +21 -0
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route.js +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -0
- package/.next/server/app/audit/page.js +2 -0
- package/.next/server/app/audit/page.js.nft.json +1 -0
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +9 -0
- package/.next/server/app/index.rsc +19 -0
- package/.next/server/app/onboarding/page.js +10 -0
- package/.next/server/app/onboarding/page.js.nft.json +1 -0
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -0
- package/.next/server/app/page.js +2 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +7 -0
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +6 -0
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/page.js +5 -0
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -0
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/[id]/workflows/page.js +2 -0
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -0
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/new/page.js +5 -0
- package/.next/server/app/roots/new/page.js.nft.json +1 -0
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -0
- package/.next/server/app/roots/new.html +1 -0
- package/.next/server/app/roots/new.meta +7 -0
- package/.next/server/app/roots/new.rsc +21 -0
- package/.next/server/app/settings/page.js +65 -0
- package/.next/server/app/settings/page.js.nft.json +1 -0
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -0
- package/.next/server/app/settings.html +1 -0
- package/.next/server/app/settings.meta +7 -0
- package/.next/server/app/settings.rsc +22 -0
- package/.next/server/app/share/[id]/file/page.js +2 -0
- package/.next/server/app/share/[id]/file/page.js.nft.json +1 -0
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -0
- package/.next/server/app/share/[id]/page.js +2 -0
- package/.next/server/app/share/[id]/page.js.nft.json +1 -0
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -0
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -0
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/utilities/page.js +17 -0
- package/.next/server/app/utilities/page.js.nft.json +1 -0
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -0
- package/.next/server/app-paths-manifest.json +34 -0
- package/.next/server/chunks/1088.js +1 -0
- package/.next/server/chunks/1105.js +1 -0
- package/.next/server/chunks/1223.js +1 -0
- package/.next/server/chunks/1244.js +1 -0
- package/.next/server/chunks/133.js +490 -0
- package/.next/server/chunks/1888.js +1 -0
- package/.next/server/chunks/192.js +1 -0
- package/.next/server/chunks/1960.js +1 -0
- package/.next/server/chunks/1961.js +1 -0
- package/.next/server/chunks/1986.js +1 -0
- package/.next/server/chunks/2035.js +1 -0
- package/.next/server/chunks/2356.js +1 -0
- package/.next/server/chunks/2433.js +1 -0
- package/.next/server/chunks/2485.js +6 -0
- package/.next/server/chunks/2503.js +1 -0
- package/.next/server/chunks/3240.js +1 -0
- package/.next/server/chunks/3295.js +1 -0
- package/.next/server/chunks/3332.js +1 -0
- package/.next/server/chunks/3657.js +1 -0
- package/.next/server/chunks/4031.js +6 -0
- package/.next/server/chunks/4066.js +1 -0
- package/.next/server/chunks/4553.js +1 -0
- package/.next/server/chunks/4833.js +1 -0
- package/.next/server/chunks/4840.js +1 -0
- package/.next/server/chunks/4842.js +1 -0
- package/.next/server/chunks/4925.js +1 -0
- package/.next/server/chunks/5087.js +1 -0
- package/.next/server/chunks/5152.js +1 -0
- package/.next/server/chunks/5243.js +1 -0
- package/.next/server/chunks/5319.js +1 -0
- package/.next/server/chunks/5373.js +1 -0
- package/.next/server/chunks/5401.js +1 -0
- package/.next/server/chunks/5436.js +1 -0
- package/.next/server/chunks/5543.js +1 -0
- package/.next/server/chunks/569.js +1 -0
- package/.next/server/chunks/5895.js +16 -0
- package/.next/server/chunks/5986.js +3 -0
- package/.next/server/chunks/613.js +1 -0
- package/.next/server/chunks/6216.js +1 -0
- package/.next/server/chunks/6435.js +1 -0
- package/.next/server/chunks/6536.js +3 -0
- package/.next/server/chunks/6602.js +4 -0
- package/.next/server/chunks/6730.js +1 -0
- package/.next/server/chunks/6909.js +488 -0
- package/.next/server/chunks/7188.js +1 -0
- package/.next/server/chunks/7300.js +128 -0
- package/.next/server/chunks/7508.js +1 -0
- package/.next/server/chunks/7572.js +2 -0
- package/.next/server/chunks/8056.js +1 -0
- package/.next/server/chunks/8124.js +1 -0
- package/.next/server/chunks/8262.js +1 -0
- package/.next/server/chunks/8404.js +62 -0
- package/.next/server/chunks/8514.js +1 -0
- package/.next/server/chunks/8843.js +1 -0
- package/.next/server/chunks/9098.js +1 -0
- package/.next/server/chunks/9293.js +1 -0
- package/.next/server/chunks/9328.js +179 -0
- package/.next/server/chunks/94.js +1 -0
- package/.next/server/chunks/9579.js +1 -0
- package/.next/server/chunks/9631.js +16 -0
- package/.next/server/chunks/9692.js +6 -0
- package/.next/server/chunks/9739.js +108 -0
- package/.next/server/chunks/9803.js +22 -0
- package/.next/server/chunks/9835.js +1 -0
- package/.next/server/chunks/9842.js +1 -0
- package/.next/server/chunks/9861.js +128 -0
- package/.next/server/chunks/9995.js +1 -0
- package/.next/server/edge-runtime-webpack.js +2 -0
- package/.next/server/edge-runtime-webpack.js.map +1 -0
- package/.next/server/functions-config-manifest.json +21 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +32 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/middleware.js +14 -0
- package/.next/server/middleware.js.map +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages/_app.js +1 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +1 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +19 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +6 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/1217-407174d9b164a499.js +1 -0
- package/.next/static/chunks/146-ccee3b26755b68c8.js +1 -0
- package/.next/static/chunks/3335-5647a38ab2cfa88d.js +1 -0
- package/.next/static/chunks/3954-fe27ff41d9bf012d.js +1 -0
- package/.next/static/chunks/4108.d6ed46bc2fcab462.js +1 -0
- package/.next/static/chunks/4400-cdb1f7913ae34e09.js +1 -0
- package/.next/static/chunks/4895-712004156efeccf2.js +1 -0
- package/.next/static/chunks/5097-f07f6aeee3f60a33.js +1 -0
- package/.next/static/chunks/5235-990ba9c4c8446446.js +62 -0
- package/.next/static/chunks/6489-ecde2d94e57eb8a9.js +1 -0
- package/.next/static/chunks/6568-e4d2de23d9f8d347.js +1 -0
- package/.next/static/chunks/6727-d38536774bdb32d5.js +1 -0
- package/.next/static/chunks/6734-9d524ec49e4ba49c.js +1 -0
- package/.next/static/chunks/6744-dbfe3cc4ce461613.js +1 -0
- package/.next/static/chunks/6fe292aa-7126ff9d6732e864.js +1 -0
- package/.next/static/chunks/8566-5d4c89b722d9cee1.js +1 -0
- package/.next/static/chunks/8775-890699c74c28df61.js +1 -0
- package/.next/static/chunks/9045-731ff0865352dd95.js +1 -0
- package/.next/static/chunks/app/_not-found/page-ffead1b4e248e14d.js +1 -0
- package/.next/static/chunks/app/agents/[agentId]/page-0b5c2838354d0eba.js +1 -0
- package/.next/static/chunks/app/api/agents/[agentId]/respond/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/images/[rootId]/[file]/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/oauth/callback/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/oauth/start/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/attachments/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/send/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stop/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/dashboard/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/suggestions/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/iframe/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/audit/page-e3445076d462aa80.js +1 -0
- package/.next/static/chunks/app/layout-c7a35075cfbfa3e3.js +1 -0
- package/.next/static/chunks/app/onboarding/page-cde5b92b13b03c63.js +1 -0
- package/.next/static/chunks/app/page-ddaeffdc9a15f597.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-1b55f68984817d29.js +1 -0
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-d4358cb6042740c4.js +1 -0
- package/.next/static/chunks/app/roots/[id]/layout-7e2f82a91b10b7e2.js +1 -0
- package/.next/static/chunks/app/roots/[id]/page-703d96bf8208af2f.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-738e8e4128baa722.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/page-e3445076d462aa80.js +1 -0
- package/.next/static/chunks/app/roots/new/page-534769dce46d0d29.js +1 -0
- package/.next/static/chunks/app/settings/page-86ee3d07ea1acbc7.js +1 -0
- package/.next/static/chunks/app/share/[id]/file/page-93e0105d7903f777.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-5bbc8503cb9a9eeb.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-72546d245b840091.js +1 -0
- package/.next/static/chunks/app/utilities/page-9f949d831421d314.js +1 -0
- package/.next/static/chunks/framework-aaa7c1a953276299.js +1 -0
- package/.next/static/chunks/main-app-ebe67847147d19aa.js +1 -0
- package/.next/static/chunks/main-bfb98fc1d6aa1d45.js +1 -0
- package/.next/static/chunks/pages/_app-bf8bc157ace53d59.js +1 -0
- package/.next/static/chunks/pages/_error-da89ab2956f0cf38.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-2e8cca5826414cc6.js +1 -0
- package/.next/static/css/87e01f779d555d04.css +1 -0
- package/.next/static/p8t15rbWhT5Rrs5fOXWZ6/_buildManifest.js +1 -0
- package/.next/static/p8t15rbWhT5Rrs5fOXWZ6/_ssgManifest.js +1 -0
- package/.next/trace +46 -0
- package/.next/types/app/agents/[agentId]/page.ts +84 -0
- package/.next/types/app/api/agents/[agentId]/respond/route.ts +347 -0
- package/.next/types/app/api/images/[rootId]/[file]/route.ts +347 -0
- package/.next/types/app/api/oauth/callback/route.ts +347 -0
- package/.next/types/app/api/oauth/start/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/attachments/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/chat/[topicId]/send/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/chat/[topicId]/stop/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/chat/[topicId]/stream/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/dashboard/route.ts +347 -0
- package/.next/types/app/api/roots/[id]/suggestions/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/bundle.js/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/host/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/host-api.mjs/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/host-ui.mjs/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/iframe/route.ts +347 -0
- package/.next/types/app/api/utilities/[scope]/[id]/style.css/route.ts +347 -0
- package/.next/types/app/audit/page.ts +84 -0
- package/.next/types/app/onboarding/page.ts +84 -0
- package/.next/types/app/page.ts +84 -0
- package/.next/types/app/roots/[id]/chat/[topicId]/page.ts +84 -0
- package/.next/types/app/roots/[id]/kb/[...slug]/page.ts +84 -0
- package/.next/types/app/roots/[id]/layout.ts +84 -0
- package/.next/types/app/roots/[id]/page.ts +84 -0
- package/.next/types/app/roots/[id]/workflows/[wfId]/page.ts +84 -0
- package/.next/types/app/roots/[id]/workflows/page.ts +84 -0
- package/.next/types/app/roots/new/page.ts +84 -0
- package/.next/types/app/settings/page.ts +84 -0
- package/.next/types/app/share/[id]/file/page.ts +84 -0
- package/.next/types/app/share/[id]/page.ts +84 -0
- package/.next/types/app/utilities/[scope]/[id]/page.ts +84 -0
- package/.next/types/app/utilities/page.ts +84 -0
- package/.next/types/cache-life.d.ts +141 -0
- package/.next/types/package.json +1 -0
- package/.next/types/routes.d.ts +103 -0
- package/.next/types/validator.ts +349 -0
- package/README.md +72 -0
- package/dist/bin/cli.js +82 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/lib/reflex/agents/backend.js +14 -0
- package/dist/lib/reflex/agents/backend.js.map +1 -0
- package/dist/lib/reflex/agents/claude-code.js +48 -0
- package/dist/lib/reflex/agents/claude-code.js.map +1 -0
- package/dist/lib/reflex/agents/codex.js +46 -0
- package/dist/lib/reflex/agents/codex.js.map +1 -0
- package/dist/lib/reflex/agents/index.js +13 -0
- package/dist/lib/reflex/agents/index.js.map +1 -0
- package/dist/lib/reflex/agents/prompts.js +228 -0
- package/dist/lib/reflex/agents/prompts.js.map +1 -0
- package/dist/lib/reflex/commands/chat.js +41 -0
- package/dist/lib/reflex/commands/chat.js.map +1 -0
- package/dist/lib/reflex/commands/init.js +38 -0
- package/dist/lib/reflex/commands/init.js.map +1 -0
- package/dist/lib/reflex/commands/start.js +64 -0
- package/dist/lib/reflex/commands/start.js.map +1 -0
- package/dist/lib/reflex/commands/watch.js +137 -0
- package/dist/lib/reflex/commands/watch.js.map +1 -0
- package/dist/lib/reflex/config.js +42 -0
- package/dist/lib/reflex/config.js.map +1 -0
- package/dist/lib/reflex/ignore.js +83 -0
- package/dist/lib/reflex/ignore.js.map +1 -0
- package/dist/lib/reflex/kb.js +48 -0
- package/dist/lib/reflex/kb.js.map +1 -0
- package/dist/lib/reflex/paths.js +33 -0
- package/dist/lib/reflex/paths.js.map +1 -0
- package/dist/lib/reflex/prompts/defaults.js +363 -0
- package/dist/lib/reflex/prompts/defaults.js.map +1 -0
- package/dist/lib/reflex/prompts/render.js +14 -0
- package/dist/lib/reflex/prompts/render.js.map +1 -0
- package/dist/lib/reflex/prompts/store.js +54 -0
- package/dist/lib/reflex/prompts/store.js.map +1 -0
- package/dist/lib/reflex/walker.js +55 -0
- package/dist/lib/reflex/walker.js.map +1 -0
- package/next.config.ts +33 -0
- package/package.json +87 -0
- package/packages/utilities/learn-anything/README.md +41 -0
- package/packages/utilities/learn-anything/actions/_json.ts +191 -0
- package/packages/utilities/learn-anything/actions/_store.ts +248 -0
- package/packages/utilities/learn-anything/actions/buildModule.ts +487 -0
- package/packages/utilities/learn-anything/actions/explainSelection.ts +64 -0
- package/packages/utilities/learn-anything/actions/generateOutline.ts +170 -0
- package/packages/utilities/learn-anything/actions/generateQuiz.ts +72 -0
- package/packages/utilities/learn-anything/actions/generateTrainer.ts +106 -0
- package/packages/utilities/learn-anything/actions/refreshCourseCard.ts +76 -0
- package/packages/utilities/learn-anything/actions/tutorAsk.ts +93 -0
- package/packages/utilities/learn-anything/article-view.tsx +464 -0
- package/packages/utilities/learn-anything/manifest.json +42 -0
- package/packages/utilities/learn-anything/ui.tsx +1589 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3954],{3606:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]])},7293:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},8096:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},9721:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},13561:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},16213:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]])},27474:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]])},31108:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]])},39624:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]])},41234:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},46972:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},49623:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},53732:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},59145:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},60621:(e,a,t)=>{t.d(a,{F:()=>d});var l=t(47989);let y=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,h=l.$,d=(e,a)=>t=>{var l;if((null==a?void 0:a.variants)==null)return h(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:d,defaultVariants:k}=a,p=Object.keys(d).map(e=>{let a=null==t?void 0:t[e],l=null==k?void 0:k[e];if(null===a)return null;let h=y(a)||y(l);return d[e][h]}),r=t&&Object.entries(t).reduce((e,a)=>{let[t,l]=a;return void 0===l||(e[t]=l),e},{});return h(e,p,null==a||null==(l=a.compoundVariants)?void 0:l.reduce((e,a)=>{let{class:t,className:l,...y}=a;return Object.entries(y).every(e=>{let[a,t]=e;return Array.isArray(t)?t.includes({...k,...r}[a]):({...k,...r})[a]===t})?[...e,t,l]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}},64417:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]])},69285:(e,a,t)=>{var l=t(48849);t.o(l,"usePathname")&&t.d(a,{usePathname:function(){return l.usePathname}}),t.o(l,"useRouter")&&t.d(a,{useRouter:function(){return l.useRouter}})},69709:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},71789:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]])},84860:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},86515:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},95265:(e,a,t)=>{t.d(a,{A:()=>l});let l=(0,t(45804).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4108],{896:(e,c,t)=>{t.d(c,{T:()=>a});var r=t(7911);let a=(0,r.createServerReference)("60e3090027a3d5604202b6d8326408b1a1c7f2da7d",r.callServer,void 0,r.findSourceMapURL,"beginOAuthAction")},37232:(e,c,t)=>{t.d(c,{J:()=>a});var r=t(7911);let a=(0,r.createServerReference)("408c94e084cce2b605b8c18c8fe0bd5c81ddd06919",r.callServer,void 0,r.findSourceMapURL,"getOAuthClientAction")},45394:(e,c,t)=>{t.d(c,{o:()=>a});var r=t(7911);let a=(0,r.createServerReference)("00836cc3059073482c3919ef173b7f92521f4f56c9",r.callServer,void 0,r.findSourceMapURL,"listOAuthStatusesAction")},94108:(e,c,t)=>{t.d(c,{beginOAuthAction:()=>n.T,getOAuthClientAction:()=>a.J,listOAuthStatusesAction:()=>r.o,saveOAuthClientAction:()=>i.S});var r=t(45394),a=t(37232),i=t(98485),n=t(896)},98485:(e,c,t)=>{t.d(c,{S:()=>a});var r=t(7911);let a=(0,r.createServerReference)("40f6801f3ea78f166da7a2ed774ca49c0b18e2a13b",r.callServer,void 0,r.findSourceMapURL,"saveOAuthClientAction")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4400],{20073:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},37463:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return u},formatWithValidation:function(){return i},urlObjectKeys:function(){return a}});let n=r(89655)._(r(74933)),o=/https?|ftp|gopher|file/;function u(e){let{auth:t,hostname:r}=e,u=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",f=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?f=t+e.host:r&&(f=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(f+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let c=e.search||l&&"?"+l||"";return u&&!u.endsWith(":")&&(u+=":"),e.slashes||(!u||o.test(u))&&!1!==f?(f="//"+(f||""),a&&"/"!==a[0]&&(a="/"+a)):f||(f=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),""+u+f+(a=a.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+i}let a=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function i(e){return u(e)}},54400:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return g},useLinkStatus:function(){return b}});let n=r(89655),o=r(4624),u=n._(r(99356)),a=r(37463),i=r(985),l=r(91728),f=r(65693),c=r(32347);r(75696);let s=r(91696),p=r(93818),d=r(79776);r(20073);let h=r(84563);function y(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}function g(e){var t;let r,n,a,[g,b]=(0,u.useOptimistic)(s.IDLE_LINK_STATUS),P=(0,u.useRef)(null),{href:_,as:v,children:E,prefetch:O=null,passHref:j,replace:S,shallow:C,scroll:N,onClick:T,onMouseEnter:x,onTouchStart:A,legacyBehavior:M=!1,onNavigate:R,ref:L,unstable_dynamicOnHover:k,...I}=e;r=E,M&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let U=u.default.useContext(i.AppRouterContext),w=!1!==O,F=!1!==O?null===(t=O)||"auto"===t?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,{href:D,as:K}=u.default.useMemo(()=>{let e=y(_);return{href:e,as:v?y(v):e}},[_,v]);M&&(n=u.default.Children.only(r));let B=M?n&&"object"==typeof n&&n.ref:L,z=u.default.useCallback(e=>(null!==U&&(P.current=(0,s.mountLinkInstance)(e,D,U,F,w,b)),()=>{P.current&&((0,s.unmountLinkForCurrentNavigation)(P.current),P.current=null),(0,s.unmountPrefetchableInstance)(e)}),[w,D,U,F,b]),Q={ref:(0,l.useMergedRef)(z,B),onClick(e){M||"function"!=typeof T||T(e),M&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),U&&(e.defaultPrevented||function(e,t,r,n,o,a,i){let{nodeName:l}=e.currentTarget;if(!("A"===l.toUpperCase()&&function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||e.currentTarget.hasAttribute("download"))){if(!(0,p.isLocalURL)(t)){o&&(e.preventDefault(),location.replace(t));return}if(e.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}u.default.startTransition(()=>{(0,d.dispatchNavigateAction)(r||t,o?"replace":"push",null==a||a,n.current)})}}(e,D,K,P,S,N,R))},onMouseEnter(e){M||"function"!=typeof x||x(e),M&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),U&&w&&(0,s.onNavigationIntent)(e.currentTarget,!0===k)},onTouchStart:function(e){M||"function"!=typeof A||A(e),M&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),U&&w&&(0,s.onNavigationIntent)(e.currentTarget,!0===k)}};return(0,f.isAbsoluteUrl)(K)?Q.href=K:M&&!j&&("a"!==n.type||"href"in n.props)||(Q.href=(0,c.addBasePath)(K)),a=M?u.default.cloneElement(n,Q):(0,o.jsx)("a",{...I,...Q,children:r}),(0,o.jsx)(m.Provider,{value:g,children:a})}let m=(0,u.createContext)(s.IDLE_LINK_STATUS),b=()=>(0,u.useContext)(m);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65693:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return m},NormalizeError:function(){return y},PageNotFoundError:function(){return g},SP:function(){return p},ST:function(){return d},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return a},getURL:function(){return i},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return s},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return P}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),u=0;u<n;u++)o[u]=arguments[u];return r||(r=!0,t=e(...o)),t}}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>o.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function i(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function s(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await s(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let p="undefined"!=typeof performance,d=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class y extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function P(e){return JSON.stringify({message:e.message,stack:e.stack})}},74933:(e,t)=>{function r(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function n(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))if(Array.isArray(o))for(let e of o)t.append(r,n(e));else t.set(r,n(o));return t}function u(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return u},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},91728:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=r(99356);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},93818:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=r(65693),o=r(71036);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4895],{15523:(e,t,r)=>{r.d(t,{p:()=>n});var a=r(4624);r(99356);var s=r(13506);function n(e){let{className:t,type:r,...n}=e;return(0,a.jsx)("input",{type:r,"data-slot":"input",className:(0,s.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...n})}},28310:(e,t,r)=>{r.d(t,{E:()=>l});var a=r(4624);r(99356);var s=r(60621),n=r(50362),o=r(13506);let i=(0,s.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function l(e){let{className:t,variant:r="default",asChild:s=!1,...l}=e,c=s?n.bL:"span";return(0,a.jsx)(c,{"data-slot":"badge","data-variant":r,className:(0,o.cn)(i({variant:r}),t),...l})}},34859:(e,t,r)=>{r.d(t,{p:()=>j});var a=r(4624),s=r(99356),n=r(88365),o=r(72461),i=r(43455),l=r(13561),c=r(60532),d=r(3239),u=r(8096),m=r(94151),p=r(65714),x=r(43153),b=r(95265),f=r(56221),h=r(85253),g=r(15523),v=r(7911);let y=(0,v.createServerReference)("40d2ac7d931df057cc763c3416ffd2aee8ff7a0ad9",v.callServer,void 0,v.findSourceMapURL,"summarizeYoutubeAction");var w=r(85171);function j(e){let{source:t,onSendToChat:r,autoSummarizeYoutube:l}=e,[c,d]=(0,s.useState)(null);return(0,a.jsxs)("div",{className:"prose prose-neutral dark:prose-invert max-w-none [&_pre]:bg-muted [&_pre]:rounded-md [&_pre]:p-4 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-foreground [&_:not(pre)>code]:bg-muted [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:rounded [&_:not(pre)>code]:text-[0.9em] [&_code]:font-mono [&_table]:text-sm",children:[(0,a.jsx)(n.oz,{remarkPlugins:[o.A],rehypePlugins:[[i.A,{detect:!0,ignoreMissing:!0}]],components:{a:e=>{let{href:t,children:s,...n}=e,o=t?function(e){try{let t=new URL(e),r=t.hostname.replace(/^www\./,"");if("youtu.be"===r){let e=t.pathname.slice(1).split("/")[0];return e&&/^[A-Za-z0-9_-]{6,}$/.test(e)?e:null}if("youtube.com"===r||"m.youtube.com"===r||"youtube-nocookie.com"===r){if("/watch"===t.pathname){let e=t.searchParams.get("v");return e&&/^[A-Za-z0-9_-]{6,}$/.test(e)?e:null}let e=/^\/(shorts|embed|live|v)\/([^/?#]+)/.exec(t.pathname);if(e&&/^[A-Za-z0-9_-]{6,}$/.test(e[2]))return e[2]}}catch(e){}return null}(t):null;return o&&t?(0,a.jsx)(_,{url:t,videoId:o,autoSummarize:null!=l&&l,...r?{onSendToChat:r}:{}}):(0,a.jsx)("a",{href:t,...n,children:s})},img:e=>{let{src:t,alt:r,title:s}=e;return"string"!=typeof t||0===t.length?null:(0,a.jsx)(k,{src:t,alt:"string"==typeof r?r:"",title:"string"==typeof s?s:void 0,onZoom:e=>d(e)})}},children:t}),c&&(0,a.jsx)(N,{src:c.src,alt:c.alt,onClose:()=>d(null)})]})}function k(e){var t;let{src:r,alt:s,title:n,onZoom:o}=e;return(0,a.jsx)("img",{src:r,alt:s,title:null!=(t=null!=n?n:s)?t:"Открыть на весь экран",onClick:()=>o({src:r,alt:s}),className:"cursor-zoom-in rounded-md border bg-muted/40 transition hover:opacity-90",loading:"lazy"})}function N(e){let{src:t,alt:r,onClose:n}=e,o=(0,s.useCallback)(e=>{"Escape"===e.key&&n()},[n]);return(0,s.useEffect)(()=>{document.addEventListener("keydown",o);let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=e}},[o]),(0,a.jsxs)("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-6 bg-background/85 backdrop-blur-sm cursor-zoom-out",onClick:n,role:"dialog","aria-label":r||"Просмотр изображения",children:[(0,a.jsx)(h.$,{type:"button",size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-9 w-9 bg-card/80 hover:bg-card",onClick:e=>{e.stopPropagation(),n()},"aria-label":"Закрыть",children:(0,a.jsx)(l.A,{className:"h-5 w-5"})}),(0,a.jsx)("img",{src:t,alt:r,className:"max-h-full max-w-full object-contain rounded-lg shadow-2xl",onClick:e=>e.stopPropagation()}),r&&(0,a.jsx)("div",{className:"absolute bottom-6 inset-x-0 mx-auto max-w-3xl px-6 text-center text-sm text-foreground/80 pointer-events-none",children:r})]})}function _(e){let{url:t,videoId:r,onSendToChat:n,autoSummarize:o}=e,[i,v]=(0,s.useTransition)(),[j,k]=(0,s.useState)(null),[N,_]=(0,s.useState)(!1),[A,z]=(0,s.useState)(""),[S,C]=(0,s.useState)(!1),R=(0,s.useRef)(!1),P=()=>{k(null),v(async()=>{let e=await y({url:t});if(e.ok){k(e.text),_(!1);return}if(e.needsKey)return void _(!0);f.oR.error(e.error)})};(0,s.useEffect)(()=>{o&&(R.current||(R.current=!0,P()))},[o]);let $=async()=>{if(!A.trim())return void f.oR.error("Введи ключ");C(!0);try{let e=await (0,w.A)(A.trim());if(!e.ok)return void f.oR.error(e.error);f.oR.success("Gemini key сохранён"),z(""),_(!1),P()}finally{C(!1)}};return(0,a.jsxs)("span",{className:"not-prose my-4 block rounded-lg border bg-card overflow-hidden",children:[(0,a.jsx)("span",{className:"relative block w-full",style:{paddingTop:"56.25%"},children:(0,a.jsx)("iframe",{src:"https://www.youtube-nocookie.com/embed/".concat(r),className:"absolute inset-0 h-full w-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,title:"YouTube video"})}),(0,a.jsxs)("span",{className:"flex items-center gap-2 p-2 border-t bg-muted/30",children:[(0,a.jsx)(c.A,{className:"h-4 w-4 text-red-600 shrink-0"}),(0,a.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:underline truncate flex-1 min-w-0",children:t}),(0,a.jsxs)(h.$,{type:"button",size:"sm",variant:"outline",onClick:P,disabled:i,className:"gap-1 shrink-0 h-7",children:[i?(0,a.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):(0,a.jsx)(u.A,{className:"h-3 w-3"}),"Суммаризировать"]})]}),N&&(0,a.jsxs)("span",{className:"block border-t bg-amber-50/60 p-3 space-y-2",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-xs text-amber-900",children:[(0,a.jsx)(m.A,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"font-medium",children:"Нужен Gemini API key"})]}),(0,a.jsxs)("span",{className:"block text-[11px] text-amber-900/80",children:["Возьми ключ в"," ",(0,a.jsx)("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"aistudio.google.com/apikey"})," ","— бесплатный tier (15 RPM / 1500 RPD). Сохранится в"," ",(0,a.jsx)("code",{className:"font-mono",children:"~/.reflex/api-keys/gemini.json"})," ","(0600), агентам не передаётся. Модель подтянется автоматически из"," ",(0,a.jsx)("code",{className:"font-mono",children:"models.list"})," (по умолчанию — самая быстрая flash); сменить можно в Settings → Gemini."]}),(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)(g.p,{type:"password",value:A,onChange:e=>z(e.target.value),placeholder:"AIza…",className:"font-mono text-xs h-8 flex-1",disabled:S}),(0,a.jsxs)(h.$,{type:"button",size:"sm",onClick:()=>void $(),disabled:S||!A.trim(),className:"h-8 gap-1",children:[S?(0,a.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):(0,a.jsx)(p.A,{className:"h-3 w-3"}),"Сохранить и продолжить"]}),(0,a.jsx)(h.$,{type:"button",size:"icon",variant:"ghost",onClick:()=>_(!1),className:"h-8 w-8",children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"})})]})]}),j&&(0,a.jsxs)("span",{className:"block border-t p-3 space-y-2",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:[(0,a.jsx)(x.A,{className:"h-3 w-3 text-emerald-600"}),"Gemini summary",(0,a.jsxs)(h.$,{type:"button",size:"sm",variant:"ghost",onClick:P,className:"ml-auto h-6 text-[10px] gap-1",disabled:i,children:[i?(0,a.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):(0,a.jsx)(u.A,{className:"h-3 w-3"}),"Переделать"]}),n&&(0,a.jsxs)(h.$,{type:"button",size:"sm",variant:"outline",onClick:()=>n(j,t),className:"h-6 text-[10px] gap-1",children:[(0,a.jsx)(b.A,{className:"h-3 w-3"}),"В чат"]})]}),(0,a.jsx)("span",{className:"block",children:(0,a.jsx)("span",{className:"block text-sm whitespace-pre-wrap leading-relaxed",children:j})})]})]})}},78825:(e,t,r)=>{r.d(t,{J:()=>o});var a=r(4624);r(99356);var s=r(33976),n=r(13506);function o(e){let{className:t,...r}=e;return(0,a.jsx)(s.Root,{"data-slot":"label",className:(0,n.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",t),...r})}},85171:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(7911);let s=(0,a.createServerReference)("409d333d3e7b13a505853122dbd9a15ab36b9a90a4",a.callServer,void 0,a.findSourceMapURL,"saveGeminiKeyAction")},91074:(e,t,r)=>{r.d(t,{Separator:()=>o});var a=r(4624);r(99356);var s=r(44188),n=r(13506);function o(e){let{className:t,orientation:r="horizontal",decorative:o=!0,...i}=e;return(0,a.jsx)(s.b,{"data-slot":"separator",decorative:o,orientation:r,className:(0,n.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...i})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5097],{3239:(t,e,a)=>{a.d(e,{A:()=>r});let r=(0,a(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},7911:(t,e,a)=>{Object.defineProperty(e,"__esModule",{value:!0}),!function(t,e){for(var a in e)Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}(e,{callServer:function(){return r.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}});let r=a(48220),o=a(61088),n=a(84166)},45804:(t,e,a)=>{a.d(e,{A:()=>i});var r=a(99356);let o=function(){for(var t=arguments.length,e=Array(t),a=0;a<t;a++)e[a]=arguments[a];return e.filter((t,e,a)=>!!t&&""!==t.trim()&&a.indexOf(t)===e).join(" ").trim()};var n={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 s=(0,r.forwardRef)((t,e)=>{let{color:a="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:d="",children:c,iconNode:u,...m}=t;return(0,r.createElement)("svg",{ref:e,...n,width:s,height:s,stroke:a,strokeWidth:l?24*Number(i)/Number(s):i,className:o("lucide",d),...m},[...u.map(t=>{let[e,a]=t;return(0,r.createElement)(e,a)}),...Array.isArray(c)?c:[c]])}),i=(t,e)=>{let a=(0,r.forwardRef)((a,n)=>{let{className:i,...l}=a;return(0,r.createElement)(s,{ref:n,iconNode:e,className:o("lucide-".concat(t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),i),...l})});return a.displayName="".concat(t),a}},56221:(t,e,a)=>{a.d(e,{l$:()=>w,oR:()=>p});var r=a(99356),o=a(16973),n=Array(12).fill(0),s=t=>{let{visible:e,className:a}=t;return r.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":e},r.createElement("div",{className:"sonner-spinner"},n.map((t,e)=>r.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(e)}))))},i=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),l=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),d=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),c=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),u=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),m=1,h=new class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:a,...r}=t,o="number"==typeof(null==t?void 0:t.id)||(null==(e=t.id)?void 0:e.length)>0?t.id:m++,n=this.toasts.find(t=>t.id===o),s=void 0===t.dismissible||t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),n?this.toasts=this.toasts.map(e=>e.id===o?(this.publish({...e,...t,id:o,title:a}),{...e,...t,id:o,dismissible:s,title:a}):e):this.addToast({title:a,...r,dismissible:s,id:o}),o},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(t=>{this.subscribers.forEach(e=>e({id:t.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{let a;if(!e)return;void 0!==e.loading&&(a=this.create({...e,promise:t,type:"loading",message:e.loading,description:"function"!=typeof e.description?e.description:void 0}));let o=t instanceof Promise?t:t(),n=void 0!==a,s,i=o.then(async t=>{if(s=["resolve",t],r.isValidElement(t))n=!1,this.create({id:a,type:"default",message:t});else if(f(t)&&!t.ok){n=!1;let r="function"==typeof e.error?await e.error("HTTP error! status: ".concat(t.status)):e.error,o="function"==typeof e.description?await e.description("HTTP error! status: ".concat(t.status)):e.description;this.create({id:a,type:"error",message:r,description:o})}else if(void 0!==e.success){n=!1;let r="function"==typeof e.success?await e.success(t):e.success,o="function"==typeof e.description?await e.description(t):e.description;this.create({id:a,type:"success",message:r,description:o})}}).catch(async t=>{if(s=["reject",t],void 0!==e.error){n=!1;let r="function"==typeof e.error?await e.error(t):e.error,o="function"==typeof e.description?await e.description(t):e.description;this.create({id:a,type:"error",message:r,description:o})}}).finally(()=>{var t;n&&(this.dismiss(a),a=void 0),null==(t=e.finally)||t.call(e)}),l=()=>new Promise((t,e)=>i.then(()=>"reject"===s[0]?e(s[1]):t(s[1])).catch(e));return"string"!=typeof a&&"number"!=typeof a?{unwrap:l}:Object.assign(a,{unwrap:l})},this.custom=(t,e)=>{let a=(null==e?void 0:e.id)||m++;return this.create({jsx:t(a),id:a,...e}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},f=t=>t&&"object"==typeof t&&"ok"in t&&"boolean"==typeof t.ok&&"status"in t&&"number"==typeof t.status,p=Object.assign((t,e)=>{let a=(null==e?void 0:e.id)||m++;return h.addToast({title:t,...e,id:a}),a},{success:h.success,info:h.info,warning:h.warning,error:h.error,custom:h.custom,message:h.message,promise:h.promise,dismiss:h.dismiss,loading:h.loading},{getHistory:()=>h.toasts,getToasts:()=>h.getActiveToasts()});function g(t){return void 0!==t.label}function v(){for(var t=arguments.length,e=Array(t),a=0;a<t;a++)e[a]=arguments[a];return e.filter(Boolean).join(" ")}!function(t){let{insertAt:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"undefined"==typeof document)return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===e&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');var b=t=>{var e,a,o,n,m,h,f,p,b,y,w;let{invert:x,toast:E,unstyled:k,interacting:N,setHeights:S,visibleToasts:T,heights:B,index:C,toasts:M,expanded:R,removeToast:z,defaultRichColors:j,closeButton:A,style:I,cancelButtonStyle:Y,actionButtonStyle:L,className:P="",descriptionClassName:D="",duration:H,position:O,gap:U,loadingIcon:V,expandByDefault:W,classNames:_,icons:F,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:$}=t,[X,Z]=r.useState(null),[q,G]=r.useState(null),[J,Q]=r.useState(!1),[tt,te]=r.useState(!1),[ta,tr]=r.useState(!1),[to,tn]=r.useState(!1),[ts,ti]=r.useState(!1),[tl,td]=r.useState(0),[tc,tu]=r.useState(0),tm=r.useRef(E.duration||H||4e3),th=r.useRef(null),tf=r.useRef(null),tp=0===C,tg=C+1<=T,tv=E.type,tb=!1!==E.dismissible,ty=E.className||"",tw=E.descriptionClassName||"",tx=r.useMemo(()=>B.findIndex(t=>t.toastId===E.id)||0,[B,E.id]),tE=r.useMemo(()=>{var t;return null!=(t=E.closeButton)?t:A},[E.closeButton,A]),tk=r.useMemo(()=>E.duration||H||4e3,[E.duration,H]),tN=r.useRef(0),tS=r.useRef(0),tT=r.useRef(0),tB=r.useRef(null),[tC,tM]=O.split("-"),tR=r.useMemo(()=>B.reduce((t,e,a)=>a>=tx?t:t+e.height,0),[B,tx]),tz=(()=>{let[t,e]=r.useState(document.hidden);return r.useEffect(()=>{let t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),t})(),tj=E.invert||x,tA="loading"===tv;tS.current=r.useMemo(()=>tx*U+tR,[tx,tR]),r.useEffect(()=>{tm.current=tk},[tk]),r.useEffect(()=>{Q(!0)},[]),r.useEffect(()=>{let t=tf.current;if(t){let e=t.getBoundingClientRect().height;return tu(e),S(t=>[{toastId:E.id,height:e,position:E.position},...t]),()=>S(t=>t.filter(t=>t.toastId!==E.id))}},[S,E.id]),r.useLayoutEffect(()=>{if(!J)return;let t=tf.current,e=t.style.height;t.style.height="auto";let a=t.getBoundingClientRect().height;t.style.height=e,tu(a),S(t=>t.find(t=>t.toastId===E.id)?t.map(t=>t.toastId===E.id?{...t,height:a}:t):[{toastId:E.id,height:a,position:E.position},...t])},[J,E.title,E.description,S,E.id]);let tI=r.useCallback(()=>{te(!0),td(tS.current),S(t=>t.filter(t=>t.toastId!==E.id)),setTimeout(()=>{z(E)},200)},[E,z,S,tS]);return r.useEffect(()=>{let t;if((!E.promise||"loading"!==tv)&&E.duration!==1/0&&"loading"!==E.type)return R||N||$&&tz?(()=>{if(tT.current<tN.current){let t=new Date().getTime()-tN.current;tm.current=tm.current-t}tT.current=new Date().getTime()})():tm.current!==1/0&&(tN.current=new Date().getTime(),t=setTimeout(()=>{var t;null==(t=E.onAutoClose)||t.call(E,E),tI()},tm.current)),()=>clearTimeout(t)},[R,N,E,tv,$,tz,tI]),r.useEffect(()=>{E.delete&&tI()},[tI,E.delete]),r.createElement("li",{tabIndex:0,ref:tf,className:v(P,ty,null==_?void 0:_.toast,null==(e=null==E?void 0:E.classNames)?void 0:e.toast,null==_?void 0:_.default,null==_?void 0:_[tv],null==(a=null==E?void 0:E.classNames)?void 0:a[tv]),"data-sonner-toast":"","data-rich-colors":null!=(o=E.richColors)?o:j,"data-styled":!(E.jsx||E.unstyled||k),"data-mounted":J,"data-promise":!!E.promise,"data-swiped":ts,"data-removed":tt,"data-visible":tg,"data-y-position":tC,"data-x-position":tM,"data-index":C,"data-front":tp,"data-swiping":ta,"data-dismissible":tb,"data-type":tv,"data-invert":tj,"data-swipe-out":to,"data-swipe-direction":q,"data-expanded":!!(R||W&&J),style:{"--index":C,"--toasts-before":C,"--z-index":M.length-C,"--offset":"".concat(tt?tl:tS.current,"px"),"--initial-height":W?"auto":"".concat(tc,"px"),...I,...E.style},onDragEnd:()=>{tr(!1),Z(null),tB.current=null},onPointerDown:t=>{tA||!tb||(th.current=new Date,td(tS.current),t.target.setPointerCapture(t.pointerId),"BUTTON"!==t.target.tagName&&(tr(!0),tB.current={x:t.clientX,y:t.clientY}))},onPointerUp:()=>{var t,e,a,r;if(to||!tb)return;tB.current=null;let o=Number((null==(t=tf.current)?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),n=Number((null==(e=tf.current)?void 0:e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=new Date().getTime()-(null==(a=th.current)?void 0:a.getTime()),i="x"===X?o:n,l=Math.abs(i)/s;if(Math.abs(i)>=20||l>.11){td(tS.current),null==(r=E.onDismiss)||r.call(E,E),G("x"===X?o>0?"right":"left":n>0?"down":"up"),tI(),tn(!0),ti(!1);return}tr(!1),Z(null)},onPointerMove:e=>{var a,r,o,n;if(!tB.current||!tb||(null==(a=window.getSelection())?void 0:a.toString().length)>0)return;let s=e.clientY-tB.current.y,i=e.clientX-tB.current.x,l=null!=(r=t.swipeDirections)?r:function(t){let[e,a]=t.split("-"),r=[];return e&&r.push(e),a&&r.push(a),r}(O);!X&&(Math.abs(i)>1||Math.abs(s)>1)&&Z(Math.abs(i)>Math.abs(s)?"x":"y");let d={x:0,y:0};"y"===X?(l.includes("top")||l.includes("bottom"))&&(l.includes("top")&&s<0||l.includes("bottom")&&s>0)&&(d.y=s):"x"===X&&(l.includes("left")||l.includes("right"))&&(l.includes("left")&&i<0||l.includes("right")&&i>0)&&(d.x=i),(Math.abs(d.x)>0||Math.abs(d.y)>0)&&ti(!0),null==(o=tf.current)||o.style.setProperty("--swipe-amount-x","".concat(d.x,"px")),null==(n=tf.current)||n.style.setProperty("--swipe-amount-y","".concat(d.y,"px"))}},tE&&!E.jsx?r.createElement("button",{"aria-label":K,"data-disabled":tA,"data-close-button":!0,onClick:tA||!tb?()=>{}:()=>{var t;tI(),null==(t=E.onDismiss)||t.call(E,E)},className:v(null==_?void 0:_.closeButton,null==(n=null==E?void 0:E.classNames)?void 0:n.closeButton)},null!=(m=null==F?void 0:F.close)?m:u):null,E.jsx||(0,r.isValidElement)(E.title)?E.jsx?E.jsx:"function"==typeof E.title?E.title():E.title:r.createElement(r.Fragment,null,tv||E.icon||E.promise?r.createElement("div",{"data-icon":"",className:v(null==_?void 0:_.icon,null==(h=null==E?void 0:E.classNames)?void 0:h.icon)},E.promise||"loading"===E.type&&!E.icon?E.icon||function(){var t,e,a;return null!=F&&F.loading?r.createElement("div",{className:v(null==_?void 0:_.loader,null==(t=null==E?void 0:E.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===tv},F.loading):V?r.createElement("div",{className:v(null==_?void 0:_.loader,null==(e=null==E?void 0:E.classNames)?void 0:e.loader,"sonner-loader"),"data-visible":"loading"===tv},V):r.createElement(s,{className:v(null==_?void 0:_.loader,null==(a=null==E?void 0:E.classNames)?void 0:a.loader),visible:"loading"===tv})}():null,"loading"!==E.type?E.icon||(null==F?void 0:F[tv])||(t=>{switch(t){case"success":return i;case"info":return d;case"warning":return l;case"error":return c;default:return null}})(tv):null):null,r.createElement("div",{"data-content":"",className:v(null==_?void 0:_.content,null==(f=null==E?void 0:E.classNames)?void 0:f.content)},r.createElement("div",{"data-title":"",className:v(null==_?void 0:_.title,null==(p=null==E?void 0:E.classNames)?void 0:p.title)},"function"==typeof E.title?E.title():E.title),E.description?r.createElement("div",{"data-description":"",className:v(D,tw,null==_?void 0:_.description,null==(b=null==E?void 0:E.classNames)?void 0:b.description)},"function"==typeof E.description?E.description():E.description):null),(0,r.isValidElement)(E.cancel)?E.cancel:E.cancel&&g(E.cancel)?r.createElement("button",{"data-button":!0,"data-cancel":!0,style:E.cancelButtonStyle||Y,onClick:t=>{var e,a;g(E.cancel)&&tb&&(null==(a=(e=E.cancel).onClick)||a.call(e,t),tI())},className:v(null==_?void 0:_.cancelButton,null==(y=null==E?void 0:E.classNames)?void 0:y.cancelButton)},E.cancel.label):null,(0,r.isValidElement)(E.action)?E.action:E.action&&g(E.action)?r.createElement("button",{"data-button":!0,"data-action":!0,style:E.actionButtonStyle||L,onClick:t=>{var e,a;g(E.action)&&(null==(a=(e=E.action).onClick)||a.call(e,t),t.defaultPrevented||tI())},className:v(null==_?void 0:_.actionButton,null==(w=null==E?void 0:E.classNames)?void 0:w.actionButton)},E.action.label):null))};function y(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}var w=(0,r.forwardRef)(function(t,e){let{invert:a,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:d,offset:c,mobileOffset:u,theme:m="light",richColors:f,duration:p,style:g,visibleToasts:v=3,toastOptions:w,dir:x=y(),gap:E=14,loadingIcon:k,icons:N,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:T}=t,[B,C]=r.useState([]),M=r.useMemo(()=>Array.from(new Set([n].concat(B.filter(t=>t.position).map(t=>t.position)))),[B,n]),[R,z]=r.useState([]),[j,A]=r.useState(!1),[I,Y]=r.useState(!1),[L,P]=r.useState("system"!==m?m:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=r.useRef(null),H=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=r.useRef(null),U=r.useRef(!1),V=r.useCallback(t=>{C(e=>{var a;return null!=(a=e.find(e=>e.id===t.id))&&a.delete||h.dismiss(t.id),e.filter(e=>{let{id:a}=e;return a!==t.id})})},[]);return r.useEffect(()=>h.subscribe(t=>{if(t.dismiss)return void C(e=>e.map(e=>e.id===t.id?{...e,delete:!0}:e));setTimeout(()=>{o.flushSync(()=>{C(e=>{let a=e.findIndex(e=>e.id===t.id);return -1!==a?[...e.slice(0,a),{...e[a],...t},...e.slice(a+1)]:[t,...e]})})})}),[]),r.useEffect(()=>{if("system"!==m)return void P(m);if("system"===m&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),"undefined"==typeof window)return;let t=window.matchMedia("(prefers-color-scheme: dark)");try{t.addEventListener("change",t=>{let{matches:e}=t;P(e?"dark":"light")})}catch(e){t.addListener(t=>{let{matches:e}=t;try{P(e?"dark":"light")}catch(t){console.error(t)}})}},[m]),r.useEffect(()=>{B.length<=1&&A(!1)},[B]),r.useEffect(()=>{let t=t=>{var e,a;s.every(e=>t[e]||t.code===e)&&(A(!0),null==(e=D.current)||e.focus()),"Escape"===t.code&&(document.activeElement===D.current||null!=(a=D.current)&&a.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[s]),r.useEffect(()=>{if(D.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,U.current=!1)}},[D.current]),r.createElement("section",{ref:e,"aria-label":"".concat(S," ").concat(H),tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((e,o)=>{var n;let s,[m,h]=e.split("-");return B.length?r.createElement("ol",{key:e,dir:"auto"===x?y():x,tabIndex:-1,ref:D,className:d,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":m,"data-lifted":j&&B.length>1&&!i,"data-x-position":h,style:{"--front-toast-height":"".concat((null==(n=R[0])?void 0:n.height)||0,"px"),"--width":"".concat(356,"px"),"--gap":"".concat(E,"px"),...g,...(s={},[c,u].forEach((t,e)=>{let a=1===e,r=a?"--mobile-offset":"--offset",o=a?"16px":"32px";function n(t){["top","right","bottom","left"].forEach(e=>{s["".concat(r,"-").concat(e)]="number"==typeof t?"".concat(t,"px"):t})}"number"==typeof t||"string"==typeof t?n(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{void 0===t[e]?s["".concat(r,"-").concat(e)]=o:s["".concat(r,"-").concat(e)]="number"==typeof t[e]?"".concat(t[e],"px"):t[e]}):n(o)}),s)},onBlur:t=>{U.current&&!t.currentTarget.contains(t.relatedTarget)&&(U.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:t=>{t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible||U.current||(U.current=!0,O.current=t.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{I||A(!1)},onDragEnd:()=>A(!1),onPointerDown:t=>{t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible||Y(!0)},onPointerUp:()=>Y(!1)},B.filter(t=>!t.position&&0===o||t.position===e).map((o,n)=>{var s,d;return r.createElement(b,{key:o.id,icons:N,index:n,toast:o,defaultRichColors:f,duration:null!=(s=null==w?void 0:w.duration)?s:p,className:null==w?void 0:w.className,descriptionClassName:null==w?void 0:w.descriptionClassName,invert:a,visibleToasts:v,closeButton:null!=(d=null==w?void 0:w.closeButton)?d:l,interacting:I,position:e,style:null==w?void 0:w.style,unstyled:null==w?void 0:w.unstyled,classNames:null==w?void 0:w.classNames,cancelButtonStyle:null==w?void 0:w.cancelButtonStyle,actionButtonStyle:null==w?void 0:w.actionButtonStyle,removeToast:V,toasts:B.filter(t=>t.position==o.position),heights:R.filter(t=>t.position==o.position),setHeights:z,expandByDefault:i,gap:E,loadingIcon:k,expanded:j,pauseWhenPageIsHidden:T,swipeDirections:t.swipeDirections})})):null}))})}}]);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5235],{487:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},2136:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},3747:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},8096:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},9598:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},13561:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},13704:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]])},22281:(e,t,n)=>{var r,i;function a(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}function o(e){var t;let i=n?.Parent?new a:this;for(let n of(r(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))n();return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>!!n?.Parent&&t instanceof n.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}n.d(t,{EB:()=>nd,YO:()=>nU,zM:()=>nI,k5:()=>nB,eu:()=>nG,ai:()=>nT,Ik:()=>nL,Yj:()=>nc}),Symbol("zod_brand");class o extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class s extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(r=globalThis).__zod_globalConfig??(r.__zod_globalConfig={});let u=globalThis.__zod_globalConfig;function l(e){return e&&Object.assign(u,e),u}let c=/^[cC][0-9a-z]{6,}$/,d=/^[0-9a-z]+$/,p=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,f=/^[0-9a-vA-V]{20}$/,h=/^[A-Za-z0-9]{27}$/,m=/^[a-zA-Z0-9_-]{21}$/,y=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,v=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,g=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,b=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,k=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,w=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,x=/^[A-Za-z0-9_-]*$/,O=/^https?$/,S=/^\+[1-9]\d{6,14}$/,A="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Z=RegExp(`^${A}$`);function E(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let j=/^-?\d+$/,T=/^-?\d+(?:\.\d+)?$/,P=/^(?:true|false)$/i,N=/^[^A-Z]*$/,M=/^[^a-z]*$/;function I(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function C(e,t){return"bigint"==typeof t?t.toString():t}function R(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function J(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let F=Symbol("evaluating");function U(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==F)return void 0===r&&(r=F,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function D(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function L(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function V(e){return JSON.stringify(e)}let W="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function q(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let B=R(()=>{if(u.jitless||"undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function H(e){if(!1===q(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==q(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function G(e){return H(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let K=new Set(["string","number","symbol"]);function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Q(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let ee={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function et(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function en(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function er(e){return"string"==typeof e?e:e?.message}function ei(e,t,n){let r=e.message?e.message:er(e.inst?._zod.def?.error?.(e))??er(t?.error?.(e))??er(n.customError?.(e))??er(n.localeError?.(e))??"Invalid input",{inst:i,continue:a,input:o,...s}=e;return s.path??(s.path=[]),s.message=r,t?.reportInput&&(s.input=o),s}function ea(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function eo(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let es=a("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eu={number:"number",bigint:"bigint",object:"date"},el=a("$ZodCheckLessThan",(e,t)=>{es.init(e,t);let n=eu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ec=a("$ZodCheckGreaterThan",(e,t)=>{es.init(e,t);let n=eu[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ed=a("$ZodCheckMultipleOf",(e,t)=>{es.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){let n=e/t,r=Math.round(n),i=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ep=a("$ZodCheckNumberFormat",(e,t)=>{es.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,a]=ee[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=j)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s))return void o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ef=a("$ZodCheckMaxLength",(e,t)=>{var n;es.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ea(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eh=a("$ZodCheckMinLength",(e,t)=>{var n;es.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ea(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),em=a("$ZodCheckLengthEquals",(e,t)=>{var n;es.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ea(r),o=i>t.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ey=a("$ZodCheckStringFormat",(e,t)=>{var n,r;es.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ev=a("$ZodCheckRegex",(e,t)=>{ey.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eg=a("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=N),ey.init(e,t)}),e_=a("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=M),ey.init(e,t)}),ez=a("$ZodCheckIncludes",(e,t)=>{es.init(e,t);let n=X(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),eb=a("$ZodCheckStartsWith",(e,t)=>{es.init(e,t);let n=RegExp(`^${X(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ek=a("$ZodCheckEndsWith",(e,t)=>{es.init(e,t);let n=RegExp(`.*${X(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ew=a("$ZodCheckOverwrite",(e,t)=>{es.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class e${constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let ex=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,C,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},eO=a("$ZodError",ex),eS=a("$ZodError",ex,{Parent:Error}),eA=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new o;if(s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>ei(e,a,l())));throw W(t,i?.callee),t}return s.value},eZ=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>ei(e,a,l())));throw W(t,i?.callee),t}return o.value},eE=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new o;return a.issues.length?{success:!1,error:new(e??eO)(a.issues.map(e=>ei(e,i,l())))}:{success:!0,data:a.value}},ej=eE(eS),eT=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>ei(e,i,l())))}:{success:!0,data:a.value}},eP=eT(eS),eN={major:4,minor:4,patch:3},eM=a("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eN;let r=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&r.unshift(e),r))for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r,i=et(e);for(let a of t){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}(e)||!a._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&n?.async===!1)throw new o;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(i||(i=et(e,t)))});else{if(e.issues.length===t)continue;i||(i=et(e,t))}}return r?r.then(()=>e):e},n=(n,i,a)=>{if(et(n))return n.aborted=!0,n;let s=t(i,r,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if("backward"===a.direction){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let s=e._zod.parse(i,a);if(s instanceof Promise){if(!1===a.async)throw new o;return s.then(e=>t(e,r,a))}return t(s,r,a)}}U(e,"~standard",()=>({validate:t=>{try{let n=ej(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return eP(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),eI=a("$ZodString",(e,t)=>{eM.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)})(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),eC=a("$ZodStringFormat",(e,t)=>{ey.init(e,t),eI.init(e,t)}),eR=a("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=v),eC.init(e,t)}),eJ=a("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=g(e))}else t.pattern??(t.pattern=g());eC.init(e,t)}),eF=a("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_),eC.init(e,t)}),eU=a("$ZodURL",(e,t)=>{eC.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===O.source&&!/^https?:\/\//i.test(r))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),eD=a("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),eC.init(e,t)}),eL=a("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=m),eC.init(e,t)}),eV=a("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=c),eC.init(e,t)}),eW=a("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=d),eC.init(e,t)}),eq=a("$ZodULID",(e,t)=>{t.pattern??(t.pattern=p),eC.init(e,t)}),eB=a("$ZodXID",(e,t)=>{t.pattern??(t.pattern=f),eC.init(e,t)}),eH=a("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=h),eC.init(e,t)}),eG=a("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){let t=E({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return RegExp(`^${A}T(?:${r})$`)}(t)),eC.init(e,t)}),eK=a("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Z),eC.init(e,t)}),eX=a("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${E(t)}$`)),eC.init(e,t)}),eY=a("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=y),eC.init(e,t)}),eQ=a("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=z),eC.init(e,t),e._zod.bag.format="ipv4"}),e0=a("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=b),eC.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),e1=a("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=k),eC.init(e,t)}),e2=a("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=w),eC.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function e4(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let e5=a("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=$),eC.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{e4(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),e9=a("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=x),eC.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{!function(e){if(!x.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return e4(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),e6=a("$ZodE164",(e,t)=>{t.pattern??(t.pattern=S),eC.init(e,t)}),e8=a("$ZodJWT",(e,t)=>{eC.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),e3=a("$ZodNumber",(e,t)=>{eM.init(e,t),e._zod.pattern=e._zod.bag.pattern??T,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}let i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),n}}),e7=a("$ZodNumberFormat",(e,t)=>{ep.init(e,t),e3.init(e,t)}),te=a("$ZodBoolean",(e,t)=>{eM.init(e,t),e._zod.pattern=P,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),tt=a("$ZodUnknown",(e,t)=>{eM.init(e,t),e._zod.parse=e=>e}),tn=a("$ZodNever",(e,t)=>{eM.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function tr(e,t,n){e.issues.length&&t.issues.push(...en(n,e.issues)),t.value[n]=e.value}let ti=a("$ZodArray",(e,t)=>{eM.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>tr(t,n,e))):tr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function ta(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...en(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}void 0===e.value?o&&(t.value[n]=void 0):t.value[n]=e.value}function to(e){var t;let n=Object.keys(e.shape);for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let r=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function ts(e,t,n,r,i,a){let o=[],s=i.keySet,u=i.catchall._zod,l=u.def.type,c="optional"===u.optin,d="optional"===u.optout;for(let i in t){if("__proto__"===i||s.has(i))continue;if("never"===l){o.push(i);continue}let a=u.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>ta(e,n,i,t,c,d))):ta(a,n,i,t,c,d)}return(o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:a}),e.length)?Promise.all(e).then(()=>n):n}let tu=a("$ZodObject",(e,t)=>{let n;eM.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!r?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let i=R(()=>to(t));U(e._zod,"propValues",()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values)for(let e of(n[t]??(n[t]=new Set),r.values))n[t].add(e)}return n});let a=t.catchall;e._zod.parse=(t,r)=>{n??(n=i.value);let o=t.value;if(!q(o))return t.issues.push({expected:"object",code:"invalid_type",input:o,inst:e}),t;t.value={};let s=[],u=n.shape;for(let e of n.keys){let n=u[e],i="optional"===n._zod.optin,a="optional"===n._zod.optout,l=n._zod.run({value:o[e],issues:[]},r);l instanceof Promise?s.push(l.then(n=>ta(n,t,e,o,i,a))):ta(l,t,e,o,i,a)}return a?ts(s,o,t,r,i.value,e):s.length?Promise.all(s).then(()=>t):t}}),tl=a("$ZodObjectJIT",(e,t)=>{let n,r;tu.init(e,t);let i=e._zod.parse,a=R(()=>to(t)),o=!u.jitless,s=o&&B.value,l=t.catchall;e._zod.parse=(u,c)=>{r??(r=a.value);let d=u.value;return q(d)?o&&s&&c?.async===!1&&!0!==c.jitless?(n||(n=(e=>{let t=new e$(["shape","payload","ctx"]),n=a.value,r=e=>{let t=V(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),o=0;for(let e of n.keys)i[e]=`key_${o++}`;for(let a of(t.write("const newResult = {};"),n.keys)){let n=i[a],o=V(a),s=e[a],u=s?._zod?.optin==="optional",l=s?._zod?.optout==="optional";t.write(`const ${n} = ${r(a)};`),u&&l?t.write(`
|
|
2
|
+
if (${n}.issues.length) {
|
|
3
|
+
if (${o} in input) {
|
|
4
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
5
|
+
...iss,
|
|
6
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
7
|
+
})));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (${n}.value === undefined) {
|
|
12
|
+
if (${o} in input) {
|
|
13
|
+
newResult[${o}] = undefined;
|
|
14
|
+
}
|
|
15
|
+
} else {
|
|
16
|
+
newResult[${o}] = ${n}.value;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
`):u?t.write(`
|
|
20
|
+
if (${n}.issues.length) {
|
|
21
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
22
|
+
...iss,
|
|
23
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
24
|
+
})));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (${n}.value === undefined) {
|
|
28
|
+
if (${o} in input) {
|
|
29
|
+
newResult[${o}] = undefined;
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
newResult[${o}] = ${n}.value;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
`):t.write(`
|
|
36
|
+
const ${n}_present = ${o} in input;
|
|
37
|
+
if (${n}.issues.length) {
|
|
38
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
39
|
+
...iss,
|
|
40
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
41
|
+
})));
|
|
42
|
+
}
|
|
43
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
44
|
+
payload.issues.push({
|
|
45
|
+
code: "invalid_type",
|
|
46
|
+
expected: "nonoptional",
|
|
47
|
+
input: undefined,
|
|
48
|
+
path: [${o}]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (${n}_present) {
|
|
53
|
+
if (${n}.value === undefined) {
|
|
54
|
+
newResult[${o}] = undefined;
|
|
55
|
+
} else {
|
|
56
|
+
newResult[${o}] = ${n}.value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
`)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),u=n(u,c),l)?ts([],d,u,c,r,e):u:i(u,c):(u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u)}});function tc(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!et(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ei(e,r,l())))}),t)}let td=a("$ZodUnion",(e,t)=>{eM.init(e,t),U(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),U(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),U(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),U(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>J(e.source)).join("|")})$`)}});let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(0===t.issues.length)return t;o.push(t)}}return a?Promise.all(o).then(t=>tc(t,r,e,i)):tc(o,r,e,i)}}),tp=a("$ZodIntersection",(e,t)=>{eM.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>tf(e,t,n)):tf(e,i,a)}});function tf(e,t,n){let r,i=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))i.has(e)||i.set(e,{}),i.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)i.has(e)||i.set(e,{}),i.get(e).r=!0;else e.issues.push(t);let a=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&r&&e.issues.push({...r,keys:a}),et(e))return e;let o=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(H(t)&&H(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};a[r]=i.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let a=e(t[i],n[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}let th=a("$ZodEnum",(e,t)=>{eM.init(e,t);let n=I(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>K.has(typeof e)).map(e=>"string"==typeof e?X(e):e.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),tm=a("$ZodLiteral",(e,t)=>{if(eM.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?X(e):e?X(e.toString()):String(e)).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}}),ty=a("$ZodTransform",(e,t)=>{eM.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new s(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new o;return n.value=i,n.fallback=!0,n}});function tv(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let tg=a("$ZodOptional",(e,t)=>{eM.init(e,t),e._zod.optin="optional",e._zod.optout="optional",U(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),U(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${J(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>tv(e,r)):tv(i,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),t_=a("$ZodExactOptional",(e,t)=>{tg.init(e,t),U(e._zod,"values",()=>t.innerType._zod.values),U(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),tz=a("$ZodNullable",(e,t)=>{eM.init(e,t),U(e._zod,"optin",()=>t.innerType._zod.optin),U(e._zod,"optout",()=>t.innerType._zod.optout),U(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${J(e.source)}|null)$`):void 0}),U(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),tb=a("$ZodDefault",(e,t)=>{eM.init(e,t),e._zod.optin="optional",U(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>tk(e,t)):tk(r,t)}});function tk(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tw=a("$ZodPrefault",(e,t)=>{eM.init(e,t),e._zod.optin="optional",U(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),t$=a("$ZodNonOptional",(e,t)=>{eM.init(e,t),U(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>tx(t,e)):tx(i,e)}});function tx(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let tO=a("$ZodCatch",(e,t)=>{eM.init(e,t),e._zod.optin="optional",U(e._zod,"optout",()=>t.innerType._zod.optout),U(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ei(e,n,l()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ei(e,n,l()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),tS=a("$ZodPipe",(e,t)=>{eM.init(e,t),U(e._zod,"values",()=>t.in._zod.values),U(e._zod,"optin",()=>t.in._zod.optin),U(e._zod,"optout",()=>t.out._zod.optout),U(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tA(e,t.in,n)):tA(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tA(e,t.out,n)):tA(r,t.out,n)}});function tA(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}let tZ=a("$ZodReadonly",(e,t)=>{eM.init(e,t),U(e._zod,"propValues",()=>t.innerType._zod.propValues),U(e._zod,"values",()=>t.innerType._zod.values),U(e._zod,"optin",()=>t.innerType?._zod?.optin),U(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(tE):tE(r)}});function tE(e){return e.value=Object.freeze(e.value),e}let tj=a("$ZodCustom",(e,t)=>{es.init(e,t),eM.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>tT(t,n,r,e));tT(i,n,r,e)}});function tT(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(eo(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class tP{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(i=globalThis).__zod_globalRegistry??(i.__zod_globalRegistry=new tP);let tN=globalThis.__zod_globalRegistry;function tM(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Q(t)})}function tI(e,t){return new el({check:"less_than",...Q(t),value:e,inclusive:!1})}function tC(e,t){return new el({check:"less_than",...Q(t),value:e,inclusive:!0})}function tR(e,t){return new ec({check:"greater_than",...Q(t),value:e,inclusive:!1})}function tJ(e,t){return new ec({check:"greater_than",...Q(t),value:e,inclusive:!0})}function tF(e,t){return new ed({check:"multiple_of",...Q(t),value:e})}function tU(e,t){return new ef({check:"max_length",...Q(t),maximum:e})}function tD(e,t){return new eh({check:"min_length",...Q(t),minimum:e})}function tL(e,t){return new em({check:"length_equals",...Q(t),length:e})}function tV(e){return new ew({check:"overwrite",tx:e})}function tW(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??tN,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function tq(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||(o.ref=a),tq(a,t,r),t.seen.get(a).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(o.schema,u),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete o.schema.examples,delete o.schema.default),"input"===t.io&&"_prefault"in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function tB(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:a}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i("__shared")}#/${r}/${a}`}}if(t[1]===n)return{ref:"#"};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}})(t);r.def={...r.schema},a&&(r.defId=a);let o=r.schema;for(let e in o)delete o[e];o.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
|
|
61
|
+
|
|
62
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&"ref"===e.reused){i(n);continue}}}function tH(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;void 0!==a&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&("draft-2020-12"===e.target?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:tG(t,"input",e.processors),output:tG(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let tG=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=tW({...i??{},target:a,io:t,processors:n});return tq(e,o),tB(o,e),tH(o,e)},tK={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tX=(e,t,n,r)=>{let i=e._zod.def;tq(i.innerType,t,r),t.seen.get(e).ref=i.innerType},tY=a("ZodISODateTime",(e,t)=>{eG.init(e,t),nd.init(e,t)}),tQ=a("ZodISODate",(e,t)=>{eK.init(e,t),nd.init(e,t)}),t0=a("ZodISOTime",(e,t)=>{eX.init(e,t),nd.init(e,t)}),t1=a("ZodISODuration",(e,t)=>{eY.init(e,t),nd.init(e,t)}),t2=a("ZodError",(e,t)=>{eO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if("invalid_key"===a.code)r({issues:a.issues},[...i,...a.path]);else if("invalid_element"===a.code)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(0===e.length)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,C,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,C,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),t4=eA(t2),t5=eZ(t2),t9=eE(t2),t6=eT(t2),t8=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return eA(t2)(e,t,r)},t3=(e,t,n)=>eA(t2)(e,t,n),t7=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return eZ(t2)(e,t,r)},ne=async(e,t,n)=>eZ(t2)(e,t,n),nt=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return eE(t2)(e,t,r)},nn=(e,t,n)=>eE(t2)(e,t,n),nr=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return eT(t2)(e,t,r)},ni=async(e,t,n)=>eT(t2)(e,t,n),na=new WeakMap;function no(e,t,n){let r=Object.getPrototypeOf(e),i=na.get(r);if(i||(i=new Set,na.set(r,i)),!i.has(t))for(let e in i.add(t),n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let ns=a("ZodType",(e,t)=>(eM.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:tG(e,"input"),output:tG(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=tW({...n,processors:t});return tq(e,r),tB(r,e),tH(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>t4(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>t9(e,t,n),e.parseAsync=async(t,n)=>t5(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>t6(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>t8(e,t,n),e.decode=(t,n)=>t3(e,t,n),e.encodeAsync=async(t,n)=>t7(e,t,n),e.decodeAsync=async(t,n)=>ne(e,t,n),e.safeEncode=(t,n)=>nt(e,t,n),e.safeDecode=(t,n)=>nn(e,t,n),e.safeEncodeAsync=async(t,n)=>nr(e,t,n),e.safeDecodeAsync=async(t,n)=>ni(e,t,n),no(e,"ZodType",{check(...e){let t=this.def;return this.clone(L(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Y(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new n7({type:"custom",check:"custom",fn:e,...Q(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){let n=function(e,t){let n=new es({check:"custom",...Q(t)});return n._zod.check=e,n}(t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(eo(e,t.value,n._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=n),e.continue??(e.continue=!n._zod.def.abort),t.issues.push(eo(e)))},e(t.value,t)),t);return n}(e,t))},overwrite(e){return this.check(tV(e))},optional(){return nY(this)},exactOptional(){var e;return e=this,new nQ({type:"optional",innerType:e})},nullable(){return n1(this)},nullish(){return nY(n1(this))},nonoptional(e){var t;return t=this,new n5({type:"nonoptional",innerType:t,...Q(e)})},array(){return nU(this)},or(e){return new nV({type:"union",options:[this,e],...Q(void 0)})},and(e){var t;return t=this,new nW({type:"intersection",left:t,right:e})},transform(e){return n8(this,new nK({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new n2({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():G(n)}})},prefault(e){var t,n;return t=this,n=e,new n4({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():G(n)}})},catch(e){var t,n;return t=this,new n9({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:()=>n})},pipe(e){return n8(this,e)},readonly(){var e;return e=this,new n3({type:"readonly",innerType:e})},describe(e){let t=this.clone();return tN.add(t,{description:e}),t},meta(...e){if(0===e.length)return tN.get(this);let t=this.clone();return tN.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>tN.get(e)?.description,configurable:!0}),e)),nu=a("_ZodString",(e,t)=>{eI.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{n.type="string";let{minimum:i,maximum:a,format:o,patterns:s,contentEncoding:u}=e._zod.bag;if("number"==typeof i&&(n.minLength=i),"number"==typeof a&&(n.maxLength=a),o&&(n.format=tK[o]??o,""===n.format&&delete n.format,"time"===o&&delete n.format),u&&(n.contentEncoding=u),s&&s.size>0){let e=[...s];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n,0);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,no(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new ev({check:"string_format",format:"regex",...Q(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new ez({check:"string_format",format:"includes",...Q(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new eb({check:"string_format",format:"starts_with",...Q(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new ek({check:"string_format",format:"ends_with",...Q(t),suffix:e})}(...e))},min(...e){return this.check(tD(...e))},max(...e){return this.check(tU(...e))},length(...e){return this.check(tL(...e))},nonempty(...e){return this.check(tD(1,...e))},lowercase(e){return this.check(new eg({check:"string_format",format:"lowercase",...Q(e)}))},uppercase(e){return this.check(new e_({check:"string_format",format:"uppercase",...Q(e)}))},trim(){return this.check(tV(e=>e.trim()))},normalize(...e){return this.check(function(e){return tV(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(tV(e=>e.toLowerCase()))},toUpperCase(){return this.check(tV(e=>e.toUpperCase()))},slugify(){return this.check(tV(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),nl=a("ZodString",(e,t)=>{eI.init(e,t),nu.init(e,t),e.email=t=>e.check(new np({type:"string",format:"email",check:"string_format",abort:!1,...Q(t)})),e.url=t=>e.check(new nm({type:"string",format:"url",check:"string_format",abort:!1,...Q(t)})),e.jwt=t=>e.check(new nE({type:"string",format:"jwt",check:"string_format",abort:!1,...Q(t)})),e.emoji=t=>e.check(new ny({type:"string",format:"emoji",check:"string_format",abort:!1,...Q(t)})),e.guid=t=>e.check(tM(nf,t)),e.uuid=t=>e.check(new nh({type:"string",format:"uuid",check:"string_format",abort:!1,...Q(t)})),e.uuidv4=t=>e.check(new nh({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Q(t)})),e.uuidv6=t=>e.check(new nh({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Q(t)})),e.uuidv7=t=>e.check(new nh({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Q(t)})),e.nanoid=t=>e.check(new nv({type:"string",format:"nanoid",check:"string_format",abort:!1,...Q(t)})),e.guid=t=>e.check(tM(nf,t)),e.cuid=t=>e.check(new ng({type:"string",format:"cuid",check:"string_format",abort:!1,...Q(t)})),e.cuid2=t=>e.check(new n_({type:"string",format:"cuid2",check:"string_format",abort:!1,...Q(t)})),e.ulid=t=>e.check(new nz({type:"string",format:"ulid",check:"string_format",abort:!1,...Q(t)})),e.base64=t=>e.check(new nS({type:"string",format:"base64",check:"string_format",abort:!1,...Q(t)})),e.base64url=t=>e.check(new nA({type:"string",format:"base64url",check:"string_format",abort:!1,...Q(t)})),e.xid=t=>e.check(new nb({type:"string",format:"xid",check:"string_format",abort:!1,...Q(t)})),e.ksuid=t=>e.check(new nk({type:"string",format:"ksuid",check:"string_format",abort:!1,...Q(t)})),e.ipv4=t=>e.check(new nw({type:"string",format:"ipv4",check:"string_format",abort:!1,...Q(t)})),e.ipv6=t=>e.check(new n$({type:"string",format:"ipv6",check:"string_format",abort:!1,...Q(t)})),e.cidrv4=t=>e.check(new nx({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Q(t)})),e.cidrv6=t=>e.check(new nO({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Q(t)})),e.e164=t=>e.check(new nZ({type:"string",format:"e164",check:"string_format",abort:!1,...Q(t)})),e.datetime=t=>e.check(new tY({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Q(t)})),e.date=t=>e.check(new tQ({type:"string",format:"date",check:"string_format",...Q(t)})),e.time=t=>e.check(new t0({type:"string",format:"time",check:"string_format",precision:null,...Q(t)})),e.duration=t=>e.check(new t1({type:"string",format:"duration",check:"string_format",...Q(t)}))});function nc(e){return new nl({type:"string",...Q(e)})}let nd=a("ZodStringFormat",(e,t)=>{eC.init(e,t),nu.init(e,t)}),np=a("ZodEmail",(e,t)=>{eF.init(e,t),nd.init(e,t)}),nf=a("ZodGUID",(e,t)=>{eR.init(e,t),nd.init(e,t)}),nh=a("ZodUUID",(e,t)=>{eJ.init(e,t),nd.init(e,t)}),nm=a("ZodURL",(e,t)=>{eU.init(e,t),nd.init(e,t)}),ny=a("ZodEmoji",(e,t)=>{eD.init(e,t),nd.init(e,t)}),nv=a("ZodNanoID",(e,t)=>{eL.init(e,t),nd.init(e,t)}),ng=a("ZodCUID",(e,t)=>{eV.init(e,t),nd.init(e,t)}),n_=a("ZodCUID2",(e,t)=>{eW.init(e,t),nd.init(e,t)}),nz=a("ZodULID",(e,t)=>{eq.init(e,t),nd.init(e,t)}),nb=a("ZodXID",(e,t)=>{eB.init(e,t),nd.init(e,t)}),nk=a("ZodKSUID",(e,t)=>{eH.init(e,t),nd.init(e,t)}),nw=a("ZodIPv4",(e,t)=>{eQ.init(e,t),nd.init(e,t)}),n$=a("ZodIPv6",(e,t)=>{e0.init(e,t),nd.init(e,t)}),nx=a("ZodCIDRv4",(e,t)=>{e1.init(e,t),nd.init(e,t)}),nO=a("ZodCIDRv6",(e,t)=>{e2.init(e,t),nd.init(e,t)}),nS=a("ZodBase64",(e,t)=>{e5.init(e,t),nd.init(e,t)}),nA=a("ZodBase64URL",(e,t)=>{e9.init(e,t),nd.init(e,t)}),nZ=a("ZodE164",(e,t)=>{e6.init(e,t),nd.init(e,t)}),nE=a("ZodJWT",(e,t)=>{e8.init(e,t),nd.init(e,t)}),nj=a("ZodNumber",(e,t)=>{e3.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:a,format:o,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;"string"==typeof o&&o.includes("int")?n.type="integer":n.type="number";let c="number"==typeof l&&l>=(i??-1/0),d="number"==typeof u&&u<=(a??1/0),p="draft-04"===t.target||"openapi-3.0"===t.target;c?p?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:"number"==typeof i&&(n.minimum=i),d?p?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:"number"==typeof a&&(n.maximum=a),"number"==typeof s&&(n.multipleOf=s)})(e,t,n,0),no(e,"ZodNumber",{gt(e,t){return this.check(tR(e,t))},gte(e,t){return this.check(tJ(e,t))},min(e,t){return this.check(tJ(e,t))},lt(e,t){return this.check(tI(e,t))},lte(e,t){return this.check(tC(e,t))},max(e,t){return this.check(tC(e,t))},int(e){return this.check(nN(e))},safe(e){return this.check(nN(e))},positive(e){return this.check(tR(0,e))},nonnegative(e){return this.check(tJ(0,e))},negative(e){return this.check(tI(0,e))},nonpositive(e){return this.check(tC(0,e))},multipleOf(e,t){return this.check(tF(e,t))},step(e,t){return this.check(tF(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function nT(e){return new nj({type:"number",checks:[],...Q(e)})}let nP=a("ZodNumberFormat",(e,t)=>{e7.init(e,t),nj.init(e,t)});function nN(e){return new nP({type:"number",check:"number_format",abort:!1,format:"safeint",...Q(e)})}let nM=a("ZodBoolean",(e,t)=>{te.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function nI(e){return new nM({type:"boolean",...Q(e)})}let nC=a("ZodUnknown",(e,t)=>{tt.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function nR(){return new nC({type:"unknown"})}let nJ=a("ZodNever",(e,t)=>{tn.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),nF=a("ZodArray",(e,t)=>{ti.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:a,maximum:o}=e._zod.bag;"number"==typeof a&&(n.minItems=a),"number"==typeof o&&(n.maxItems=o),n.type="array",n.items=tq(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,no(e,"ZodArray",{min(e,t){return this.check(tD(e,t))},nonempty(e){return this.check(tD(1,e))},max(e,t){return this.check(tU(e,t))},length(e,t){return this.check(tL(e,t))},unwrap(){return this.element}})});function nU(e,t){return new nF({type:"array",element:e,...Q(t)})}let nD=a("ZodObject",(e,t)=>{tl.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let e in a)n.properties[e]=tq(a[e],t,{...r,path:[...r.path,"properties",e]});let o=new Set([...new Set(Object.keys(a))].filter(e=>{let n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));o.size>0&&(n.required=Array.from(o)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=tq(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),U(e,"shape",()=>t.shape),no(e,"ZodObject",{keyof(){return nB(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:nR()})},loose(){return this.clone({...this._zod.def,catchall:nR()})},strict(){return this.clone({...this._zod.def,catchall:new nJ({type:"never",...Q(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!H(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=L(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return D(this,"shape",n),n}});return Y(e,r)}(this,e)},safeExtend(e){var t=this;if(!H(e))throw Error("Invalid input to safeExtend: expected a plain object");let n=L(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return D(this,"shape",n),n}});return Y(t,n)},merge(e){var t=this;if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=L(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return D(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Y(t,n)},pick(e){return function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=L(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return D(this,"shape",e),e},checks:[]});return Y(e,i)}(this,e)},omit(e){return function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=L(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return D(this,"shape",r),r},checks:[]});return Y(e,i)}(this,e)},partial(...e){return function(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let i=L(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return D(this,"shape",i),i},checks:[]});return Y(t,i)}(nX,this,e[0])},required(...e){return function(e,t,n){let r=L(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(let t in r)i[t]=new e({type:"nonoptional",innerType:r[t]});return D(this,"shape",i),i}});return Y(t,r)}(n5,this,e[0])}})});function nL(e,t){return new nD({type:"object",shape:e??{},...Q(t)})}let nV=a("ZodUnion",(e,t)=>{td.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,a=!1===i.inclusive,o=i.options.map((e,n)=>tq(e,t,{...r,path:[...r.path,a?"oneOf":"anyOf",n]}));a?n.oneOf=o:n.anyOf=o})(e,t,n,r),e.options=t.options}),nW=a("ZodIntersection",(e,t)=>{tp.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,a=tq(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=tq(i.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]})(e,t,n,r)}),nq=a("ZodEnum",(e,t)=>{th.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=I(e._zod.def.entries);i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=i})(e,0,n,0),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new nq({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new nq({...t,checks:[],...Q(r),entries:i})}});function nB(e,t){return new nq({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}let nH=a("ZodLiteral",(e,t)=>{tm.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else a.push(Number(e));else a.push(e);if(0===a.length);else if(1===a.length){let e=a[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else a.every(e=>"number"==typeof e)&&(n.type="number"),a.every(e=>"string"==typeof e)&&(n.type="string"),a.every(e=>"boolean"==typeof e)&&(n.type="boolean"),a.every(e=>null===e)&&(n.type="null"),n.enum=a})(e,t,n,0),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nG(e,t){return new nH({type:"literal",values:Array.isArray(e)?e:[e],...Q(t)})}let nK=a("ZodTransform",(e,t)=>{ty.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e,0,0),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new s(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(eo(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(eo(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),nX=a("ZodOptional",(e,t)=>{tg.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tX(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nY(e){return new nX({type:"optional",innerType:e})}let nQ=a("ZodExactOptional",(e,t)=>{t_.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tX(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),n0=a("ZodNullable",(e,t)=>{tz.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,a=tq(i.innerType,t,r),o=t.seen.get(e);"openapi-3.0"===t.target?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function n1(e){return new n0({type:"nullable",innerType:e})}let n2=a("ZodDefault",(e,t)=>{tb.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;tq(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),n4=a("ZodPrefault",(e,t)=>{tw.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;tq(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),n5=a("ZodNonOptional",(e,t)=>{t$.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;tq(i.innerType,t,r),t.seen.get(e).ref=i.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),n9=a("ZodCatch",(e,t)=>{tO.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,a=e._zod.def;tq(a.innerType,t,r),t.seen.get(e).ref=a.innerType;try{i=a.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),n6=a("ZodPipe",(e,t)=>{tS.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),o="input"===t.io?a?i.out:i.in:i.out;tq(o,t,r),t.seen.get(e).ref=o})(e,t,0,r),e.in=t.in,e.out=t.out});function n8(e,t){return new n6({type:"pipe",in:e,out:t})}let n3=a("ZodReadonly",(e,t)=>{tZ.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;tq(i.innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),n7=a("ZodCustom",(e,t)=>{tj.init(e,t),ns.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n,r)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e,0,0)})},23559:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]])},25104:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]])},35687:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]])},39160:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},39783:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},41379:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},43153:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},46972:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},52584:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},57118:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},58726:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},59728:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},60621:(e,t,n)=>{n.d(t,{F:()=>o});var r=n(47989);let i=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=r.$,o=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return a(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:o,defaultVariants:s}=t,u=Object.keys(o).map(e=>{let t=null==n?void 0:n[e],r=null==s?void 0:s[e];if(null===t)return null;let a=i(t)||i(r);return o[e][a]}),l=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return a(e,u,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...s,...l}[t]):({...s,...l})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},65714:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},67805:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},69285:(e,t,n)=>{var r=n(48849);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},69709:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},84860:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},85924:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},94151:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6489],{13506:(e,t,r)=>{r.d(t,{cn:()=>i});var a=r(47989),n=r(55701);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.QP)((0,a.$)(t))}},46334:(e,t,r)=>{r.d(t,{L:()=>B});var a=r(4624),n=r(99356),i=r(86515),s=r(41234),l=r(71789),o=r(53732),c=r(3606),d=r(31108),u=r(8096),p=r(46972),m=r(16213),g=r(59145),f=r(27474),x=r(39624),h=r(3239),v=r(9721),b=r(84860),k=r(7293),w=r(49623),y=r(64417),j=r(13561),N=r(69285),A=r(56221),C=r(85253),S=r(71651),R=r(13506),D=r(7911);let E=(0,D.createServerReference)("60f34cb5f6b482a5a4bcd98f0904da410a527a2ab4",D.callServer,void 0,D.findSourceMapURL,"searchMentionsAction"),T=[{id:"plan",trigger:"plan",label:"/plan",description:"Сначала покажи план — Reflex распишет шаги и подождёт одобрения.",kind:"agent-mode",usage:"/plan <задача>",icon:"ListChecks"},{id:"goal",trigger:"goal",label:"/goal",description:"Поставь цель — Reflex будет двигаться к ней сам, без напоминаний.",kind:"agent-mode",usage:"/goal <чего достичь>",icon:"Target"},{id:"research",trigger:"research",label:"/research",description:"Глубокое исследование темы — поиск в интернете + сводка с источниками.",kind:"agent-mode",usage:"/research <тема>",icon:"Telescope"},{id:"widget",trigger:"widget",label:"/widget",description:"Создать карточку на дашборде пространства.",kind:"agent-mode",usage:"/widget <что показать>",icon:"LayoutGrid"},{id:"workflow",trigger:"workflow",label:"/workflow",description:"Собрать рецепт — линейная автоматизация из шагов под задачу.",kind:"agent-mode",usage:"/workflow <что автоматизировать>",icon:"Workflow"},{id:"remember",trigger:"remember",label:"/remember",description:"Запомнить заметку — сразу в память, без обращения к AI.",kind:"direct",usage:"/remember <что запомнить>",icon:"BookmarkPlus"},{id:"mcp",trigger:"mcp",label:"/mcp",description:"Подключить внешний сервис (мастер настройки откроется в чате).",kind:"agent-mode",usage:"/mcp <что нужно>",icon:"PackagePlus"},{id:"skill",trigger:"skill",label:"/skill",description:"Подключить роль — готовый набор инструкций на этот разговор.",kind:"agent-mode",usage:"/skill <id-роли> [запрос]",icon:"Sparkles"},{id:"delete-topic",trigger:"delete-topic",label:"/delete-topic",description:"Удалить этот разговор (с подтверждением).",kind:"direct",usage:"/delete-topic",requiresConfirm:!0,allowEmpty:!0,icon:"Trash2"},{id:"clear-project",trigger:"clear-project",label:"/clear-project",description:"ОПАСНО: очистить пространство — все разговоры, карточки, память. Двойное подтверждение.",kind:"direct",usage:"/clear-project",requiresConfirm:!0,allowEmpty:!0,icon:"AlertOctagon"},{id:"util",trigger:"util",label:"/util",description:"Открыть мини-приложение (по части названия или из списка).",kind:"direct",usage:"/util <часть названия или id>",allowEmpty:!0,icon:"Boxes"},{id:"help",trigger:"help",label:"/help",description:"Список доступных команд.",kind:"direct",usage:"/help",allowEmpty:!0,icon:"HelpCircle"}],z=(0,D.createServerReference)("6045aeea001632c03b9388bbb27307f9b85409f06d",D.callServer,void 0,D.findSourceMapURL,"rememberAction"),L=(0,D.createServerReference)("606b339f68fe3420b4187eca6ee3f6590debee6d06",D.callServer,void 0,D.findSourceMapURL,"deleteCurrentTopicCommand"),M=(0,D.createServerReference)("60baac6750be8d662265b7cf43a42a6b5c1db8b51b",D.callServer,void 0,D.findSourceMapURL,"openUtilityAction"),P=(0,D.createServerReference)("40dbd4ddbc72e3d08c6f93083ace525b84416b9c20",D.callServer,void 0,D.findSourceMapURL,"clearProjectAction");var _=r(63514);let F={ListChecks:i.A,Target:s.A,Telescope:l.A,LayoutGrid:o.A,BookmarkPlus:c.A,PackagePlus:d.A,Sparkles:u.A,Trash2:p.A,AlertOctagon:m.A,HelpCircle:g.A,Workflow:f.A,Boxes:x.A};function B(e){let{rootId:t,topicId:r,placeholder:i,submitLabel:s,pendingLabel:l,SubmitIcon:o,disabled:c,onSubmit:d,active:u,onStop:p,clarifyLabel:m="Уточнить",stopLabel:g="Стоп"}=e,f=(0,N.useRouter)(),[x,k]=(0,n.useState)(""),[w,y]=(0,n.useState)([]),[j,D]=(0,n.useState)(!1),[z,L]=(0,n.useState)(!1),[M,P]=(0,n.useState)(!1),_=(0,n.useRef)(null),F=(0,n.useRef)(null),[B,q]=(0,n.useState)(null),[H,O]=(0,n.useState)([]),[Z,G]=(0,n.useState)(0),[V,I]=(0,n.useState)(!1),Q=(0,n.useRef)(0),[J,X]=(0,n.useState)(null),Y=(0,n.useCallback)(()=>{let e=_.current;e&&(e.style.height="auto",e.style.height=Math.min(e.scrollHeight,240)+"px")},[]);(0,n.useEffect)(()=>{Y()},[x,Y]);let ee=(0,n.useCallback)((e,r)=>{let a=r;for(;a>0;){let t=e[a-1];if("@"===t){a-=1;break}if(/\s/.test(t)){a=-1;break}a-=1}if(a<0||"@"!==e[a]||a>0&&!/\s/.test(e[a-1])){q(null),O([]);return}let n=e.slice(a+1,r);q({start:a,end:r}),G(0),I(!0);let i=++Q.current;(async()=>{let e=await E(t,n);Q.current===i&&(I(!1),O(e.ok?e.items:[]))})()},[t]),et=(0,n.useCallback)(()=>{q(null),O([]),Q.current++},[]),er=(0,n.useCallback)(e=>{if(!e.startsWith("/")||e.indexOf(" ")>=0)return void X(null);let t=e.slice(1).toLowerCase(),r=T.filter(e=>e.trigger.startsWith(t)||e.label.toLowerCase().includes(t)||e.description.toLowerCase().includes(t));if(0===r.length)return void X(null);X({items:r,index:0})},[]),ea=(0,n.useCallback)(()=>X(null),[]),en=(0,n.useCallback)(e=>{let t=_.current,r="/".concat(e.trigger).concat(e.allowEmpty&&"direct"===e.kind?"":" ");k(r),X(null),requestAnimationFrame(()=>{t&&(t.focus(),t.setSelectionRange(r.length,r.length))})},[]),ei=(0,n.useCallback)(e=>{let t=_.current;if(!t||!B)return;let r=x.slice(0,B.start),a=x.slice(B.end),n="@".concat(e.relPath," ");k(r+n+a),et();let i=r.length+n.length;requestAnimationFrame(()=>{t.focus(),t.setSelectionRange(i,i)})},[x,B,et]),es=(0,n.useCallback)(async e=>{if(0!==e.length){D(!0);try{let a=new FormData;for(let t of e)a.append("files",t);let n=await fetch("/api/roots/".concat(t,"/attachments"),{method:"POST",body:a});if(!n.ok){var r;let e=await n.json().catch(()=>({}));A.oR.error(null!=(r=e.error)?r:"Не удалось загрузить (".concat(n.status,")"));return}let i=await n.json();y(e=>[...e,...i.files])}catch(e){A.oR.error(e instanceof Error?e.message:String(e))}finally{D(!1)}}},[t]),el=x.trim().length>0||w.length>0,eo=u&&p?el?"clarify":"stop":"send",ec=(0,n.useCallback)(async()=>{if(z)return;if("stop"===eo){if(!p)return;L(!0);try{await p()}finally{L(!1)}return}let e=x.trim();if(!e&&0===w.length||c&&"send"===eo)return;let a=function(e){var t,r,a;let n=e.trim();if(!n.startsWith("/"))return null;let i=/^\/([a-z][a-z0-9-]*)(?:\s+([\s\S]*))?$/.exec(n);if(!i)return null;let s=(r=i[1],null!=(a=T.find(e=>e.trigger===r))?a:null);return s?{def:s,payload:(null!=(t=i[2])?t:"").trim()}:null}(e);if(a&&"direct"===a.def.kind){L(!0);try{await $({cmd:a.def,payload:a.payload,rootId:t,topicId:r,router:f}),k("")}finally{L(!1)}return}L(!0);try{"clarify"===eo&&p&&await p(),await d({message:e,attachments:w})&&(k(""),y([]))}finally{L(!1)}},[x,w,z,c,eo,p,d,t,r,f]),ed=!z&&!j&&("stop"===eo||el&&(!c||"clarify"===eo));return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),ec()},onDragEnter:e=>{Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),P(!0))},onDragOver:e=>{Array.from(e.dataTransfer.types).includes("Files")&&(e.preventDefault(),P(!0))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||P(!1)},onDrop:e=>{e.preventDefault(),P(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&es(t)},className:(0,R.cn)("space-y-2 rounded-md transition-colors",M&&"ring-2 ring-ring/60 bg-accent/40"),children:[w.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.map((e,t)=>(0,a.jsx)(W,{attachment:e,onRemove:()=>y(t=>t.filter(t=>t!==e))},e.absPath+t))}),(0,a.jsxs)("div",{className:"flex items-end gap-2",children:[(0,a.jsxs)("div",{className:"relative flex-1",children:[(0,a.jsx)(S.T,{ref:_,value:x,onChange:e=>{k(e.target.value),ee(e.target.value,e.target.selectionStart),er(e.target.value)},onKeyUp:e=>{let t=e.currentTarget;ee(t.value,t.selectionStart),er(t.value)},onClick:e=>{let t=e.currentTarget;ee(t.value,t.selectionStart),er(t.value)},onBlur:()=>{setTimeout(()=>{et(),ea()},150)},onKeyDown:e=>{if(J){if("ArrowDown"===e.key){e.preventDefault(),X(e=>e?{...e,index:Math.min(e.items.length-1,e.index+1)}:null);return}if("ArrowUp"===e.key){e.preventDefault(),X(e=>e?{...e,index:Math.max(0,e.index-1)}:null);return}if("Tab"===e.key){e.preventDefault();let t=J.items[J.index];t&&en(t);return}if("Escape"===e.key){e.preventDefault(),ea();return}}if(B&&H.length>0){if("ArrowDown"===e.key){e.preventDefault(),G(e=>Math.min(H.length-1,e+1));return}if("ArrowUp"===e.key){e.preventDefault(),G(e=>Math.max(0,e-1));return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=H[Z];t&&ei(t);return}if("Escape"===e.key){e.preventDefault(),et();return}}"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),ec())},onPaste:e=>{let t=Array.from(e.clipboardData.files);t.length>0&&(e.preventDefault(),es(t))},placeholder:i,rows:1,disabled:c||z,className:"resize-none min-h-[44px] max-h-60 text-base bg-background/70 border-transparent focus-visible:border-ring py-2.5 w-full"}),B&&(0,a.jsx)(K,{items:H,index:Z,loading:V,onPick:ei,onHover:e=>G(e)}),J&&!B&&(0,a.jsx)(U,{items:J.items,index:J.index,onPick:en,onHover:e=>X(t=>t?{...t,index:e}:null),topicAvailable:!!r})]}),(0,a.jsx)("input",{ref:F,type:"file",multiple:!0,className:"hidden",onChange:e=>{var t;let r=Array.from(null!=(t=e.target.files)?t:[]);r.length>0&&es(r),e.target.value=""}}),(0,a.jsx)(C.$,{type:"button",size:"icon",variant:"ghost",onClick:()=>{var e;return null==(e=F.current)?void 0:e.click()},disabled:j||z||c,title:"Прикрепить файлы (можно drag&drop или Cmd+V)",className:"h-11 w-11 shrink-0",children:j?(0,a.jsx)(h.A,{className:"h-4 w-4 animate-spin"}):(0,a.jsx)(v.A,{className:"h-4 w-4"})}),(0,a.jsx)(C.$,{type:"submit",size:"lg",disabled:!ed,variant:"stop"===eo?"destructive":"default",className:"h-11 px-6 shadow-md shrink-0",children:z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4 animate-spin"}),l]}):"stop"===eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.A,{className:"mr-2 h-4 w-4",fill:"currentColor"}),g]}):"clarify"===eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{className:"mr-2 h-4 w-4"}),m]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{className:"mr-2 h-4 w-4"}),s]})})]}),(0,a.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"Enter — отправить \xb7 Shift+Enter — новая строка \xb7 @ — упомянуть файл/заметку \xb7 `/` — команды \xb7 можно перетащить файлы или вставить из буфера"})]})}async function $(e){var t,r,a;let{cmd:n,payload:i,rootId:s,topicId:l,router:o}=e;if("help"===n.id){let e=T.map(e=>"• ".concat(e.label," — ").concat(e.description));A.oR.info("Доступные команды:\n".concat(e.join("\n")),{duration:12e3});return}if("remember"===n.id){if(!i)return void A.oR.error("Пусто — нечего запоминать. Использование: /remember <текст>");let e=await z(s,i);return void(e.ok?(A.oR.success(null!=(t=e.message)?t:"Сохранено в KB"),(0,_.$d)(_.Zi.kbChanged(s))):A.oR.error(e.error))}if("delete-topic"===n.id){if(!l)return void A.oR.error("Команда работает только внутри топика.");if(!confirm("Удалить этот топик? Это необратимо."))return;let e=await L(s,l);return void(e.ok?(A.oR.success(null!=(r=e.message)?r:"Удалено"),(0,_.$d)(_.Zi.topicsChanged(s)),e.redirectTo&&o.push(e.redirectTo)):A.oR.error(e.error))}if("util"===n.id){let e=await M(s,i);if(!e.ok)return void A.oR.error(e.error);if("redirect"===e.kind)return void o.push(e.url);let t=e.items.slice(0,8).map(e=>"• ".concat(e.name," (").concat(e.scope,"/").concat(e.id,")")).join("\n");return void A.oR.message("Несколько подходит — уточни запрос:\n".concat(t),{duration:12e3})}if("clear-project"===n.id){if(!confirm("ВНИМАНИЕ: будут удалены ВСЕ топики, виджеты и KB-файлы этого проекта. Это необратимо. Продолжить?"))return;let e=prompt("Введи фразу \xabочистить\xbb (без кавычек), чтобы подтвердить:");if((null==e?void 0:e.trim().toLowerCase())!=="очистить")return void A.oR.message("Подтверждение не прошло — отмена.");let t=await P(s);return void(t.ok?(A.oR.success(null!=(a=t.message)?a:"Проект очищен"),(0,_.$d)(_.Zi.topicsChanged(s)),(0,_.$d)(_.Zi.kbChanged(s)),t.redirectTo&&o.push(t.redirectTo)):A.oR.error(t.error))}A.oR.error("Неизвестная команда: ".concat(n.label))}function U(e){let{items:t,index:r,onPick:n,onHover:i,topicAvailable:s}=e;return(0,a.jsxs)("div",{className:"absolute bottom-full left-0 right-0 mb-2 z-50 max-h-80 overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-lg",children:[(0,a.jsx)("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground border-b",children:"Команды \xb7 Tab — вставить \xb7 ↑↓ — выбор \xb7 Esc — закрыть"}),(0,a.jsx)("ul",{children:t.map((e,t)=>{var l;let o=null!=(l=F[e.icon])?l:u.A,c="delete-topic"===e.id&&!s;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",onMouseDown:t=>{t.preventDefault(),c||n(e)},onMouseEnter:()=>i(t),disabled:c,className:(0,R.cn)("w-full flex items-start gap-2 px-3 py-2 text-left",t===r?"bg-accent":"hover:bg-accent/60",c&&"opacity-40 cursor-not-allowed"),children:[(0,a.jsx)(o,{className:(0,R.cn)("h-3.5 w-3.5 mt-0.5 shrink-0","direct"===e.kind?"text-amber-600":"text-violet-600")}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"font-mono text-xs font-medium",children:e.label}),"direct"===e.kind&&(0,a.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-amber-700",children:"прямое действие"}),e.requiresConfirm&&(0,a.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-destructive",children:"с подтверждением"})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground leading-snug mt-0.5",children:e.description}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground/80 font-mono mt-0.5",children:e.usage})]})]})},e.id)})})]})}function K(e){let{items:t,index:r,loading:n,onPick:i,onHover:s}=e;return(0,a.jsx)("div",{className:"absolute bottom-full left-0 right-0 mb-2 z-50 max-h-72 overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-lg",children:n&&0===t.length?(0,a.jsxs)("div",{className:"px-3 py-2 text-xs text-muted-foreground flex items-center gap-2",children:[(0,a.jsx)(h.A,{className:"h-3 w-3 animate-spin"})," поиск…"]}):0===t.length?(0,a.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground italic",children:"ничего не найдено"}):(0,a.jsx)("ul",{children:t.map((e,t)=>{let n="kb"===e.kind?k.A:w.A;return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",onMouseDown:t=>{t.preventDefault(),i(e)},onMouseEnter:()=>s(t),className:(0,R.cn)("w-full flex items-center gap-2 px-3 py-1.5 text-sm text-left",t===r?"bg-accent":"hover:bg-accent/60"),children:[(0,a.jsx)(n,{className:(0,R.cn)("h-3.5 w-3.5 shrink-0","kb"===e.kind?"text-primary":"text-muted-foreground")}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-mono text-xs",children:e.relPath}),e.parent&&(0,a.jsx)("div",{className:"truncate text-[10px] text-muted-foreground",children:e.parent})]}),(0,a.jsx)("span",{className:(0,R.cn)("text-[10px] uppercase tracking-wider shrink-0","kb"===e.kind?"text-primary":"text-muted-foreground"),children:e.kind})]})},e.absPath)})})})}function W(e){var t;let{attachment:r,onRemove:n}=e,i=r.mime.startsWith("image/")?y.A:w.A;return(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-1 text-[11px] max-w-[18rem]",children:[(0,a.jsx)(i,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate",title:r.name,children:r.name}),(0,a.jsx)("span",{className:"text-muted-foreground",children:(t=r.size)<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(1)," MB")}),(0,a.jsx)("button",{type:"button",onClick:n,className:"ml-0.5 text-muted-foreground hover:text-foreground",children:(0,a.jsx)(j.A,{className:"h-3 w-3"})})]})}},63514:(e,t,r)=>{r.d(t,{$d:()=>i,S9:()=>s,Zi:()=>n});var a=r(99356);let n={rootsChanged:"reflex:roots-changed",topicsChanged:e=>"reflex:topics-changed:".concat(e),kbChanged:e=>"reflex:kb-changed:".concat(e)};function i(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function s(e,t){(0,a.useEffect)(()=>{let r=e=>t(e.detail);return window.addEventListener(e,r),()=>window.removeEventListener(e,r)},[e,t])}},63602:(e,t,r)=>{r.d(t,{E:()=>i});var a=r(4624),n=r(8096);function i(e){let{label:t="Спроси Reflex",headerRight:r,children:i}=e;return(0,a.jsx)("div",{className:"border-t bg-background",children:(0,a.jsx)("div",{className:"mx-auto max-w-3xl px-6 py-5",children:(0,a.jsx)("div",{className:"reflex-gradient rounded-2xl p-[2px] shadow-[0_8px_40px_-12px_oklch(0.55_0.2_290/0.45)]",children:(0,a.jsxs)("div",{className:"rounded-[14px] bg-background/85 backdrop-blur-xl px-5 py-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"reflex-gradient inline-flex h-6 w-6 items-center justify-center rounded-full text-white shadow-sm",children:(0,a.jsx)(n.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:"text-[11px] uppercase tracking-[0.18em] text-muted-foreground",children:t}),r&&(0,a.jsx)("span",{className:"ml-auto flex items-center gap-1",children:r})]}),i]})})})})}},71651:(e,t,r)=>{r.d(t,{T:()=>i});var a=r(4624);r(99356);var n=r(13506);function i(e){let{className:t,...r}=e;return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,n.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...r})}},85253:(e,t,r)=>{r.d(t,{$:()=>o});var a=r(4624);r(99356);var n=r(60621),i=r(50362),s=r(13506);let l=(0,n.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground 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",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r="default",size:n="default",asChild:o=!1,...c}=e,d=o?i.bL:"button";return(0,a.jsx)(d,{"data-slot":"button","data-variant":r,"data-size":n,className:(0,s.cn)(l({variant:r,size:n,className:t})),...c})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{1646:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},5270:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},8583:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]])},9923:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},16329:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},23506:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]])},35285:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},35687:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]])},35994:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},40805:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},41379:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},41695:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},51587:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]])},53296:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]])},54207:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},56380:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},57308:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]])},58726:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},64681:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},69205:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},76479:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},76974:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},84630:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},85785:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},86295:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},87738:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]])},94494:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},94870:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},96447:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(45804).A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6727],{8096:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(45804).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},13561:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},39783:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(45804).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},79182:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(45804).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},86727:(e,t,r)=>{r.d(t,{UtilityIframe:()=>g});var s=r(4624),a=r(99356),l=r(79182),n=r(39783),o=r(13561),c=r(8096),i=r(3239),u=r(95265),d=r(54400),p=r.n(d),m=r(56221),h=r(7911);let x=(0,h.createServerReference)("40d75f616a66027d5730682fe19f1910b8e73402bf",h.callServer,void 0,h.findSourceMapURL,"getOrCreateUtilityHelperTopicAction"),f=(0,h.createServerReference)("6051e3107875786292470bca9b46ee55d3d1ce7bcf",h.callServer,void 0,h.findSourceMapURL,"loadHelperTranscriptAction");function y(e){let{scope:t,utilityId:r,utilityName:d,rootId:h,requestSnapshot:y,onClose:g}=e,[w,b]=(0,a.useState)(null),[j,N]=(0,a.useState)([]),[k,S]=(0,a.useState)(""),[A,M]=(0,a.useState)(null),[T,E]=(0,a.useTransition)(),[R,C]=(0,a.useState)(!1),L=(0,a.useRef)(null),H=(0,a.useRef)(null),I=(0,a.useRef)(""),[O,P]=(0,a.useState)("");(0,a.useEffect)(()=>{if(!h)return void M("Чат доступен только в project-scope утилитах.");let e=!1;return(async()=>{let t=await x({rootId:h,utilityId:r,utilityName:null!=d?d:r});if(e)return;if(!t.ok)return M(t.error);b(t.topicId);let s=await f(h,t.topicId);!e&&s.ok&&N(s.messages)})(),()=>{e=!0}},[h,r,d]),(0,a.useEffect)(()=>{if(!h||!w)return;let e=new EventSource("/api/roots/".concat(h,"/chat/").concat(w,"/stream?since=").concat(Number.MAX_SAFE_INTEGER));return H.current=e,e.addEventListener("event",e=>{try{let t=JSON.parse(e.data);"assistant-delta"===t.type&&"string"==typeof t.text?(I.current+=t.text,P(I.current),C(!0)):"turn-end"===t.type||"agent-end"===t.type?(I.current="",P(""),C(!1),(async()=>{let e=await f(h,w);e.ok&&N(e.messages)})()):t.type}catch(e){}}),e.onerror=()=>{},()=>{e.close(),H.current=null}},[h,w]),(0,a.useEffect)(()=>{let e=L.current;e&&(e.scrollTop=e.scrollHeight)},[j,O]);let q=()=>{let e=k.trim();e&&h&&w&&(S(""),N(t=>[...t,{role:"user",text:e,ts:new Date().toISOString()}]),E(async()=>{let t;try{t=await Promise.race([y(),new Promise(e=>setTimeout(()=>e(void 0),600))])}catch(e){}let r=void 0!==t?function(e,t){let r;try{r="string"==typeof t?t:JSON.stringify(t,null,2)}catch(e){r=String(t)}return r.length>4e3&&(r=r.slice(0,4e3)+"\n…[truncated]"),["[Контекст мини-приложения]",r,"[/контекст]\n",e].join("\n")}(e,t):e;try{let e=await fetch("/api/roots/".concat(h,"/chat/").concat(w,"/send"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:r})});if(!e.ok){var s;let t=await e.json().catch(()=>({}));m.oR.error(null!=(s=t.error)?s:"HTTP ".concat(e.status))}}catch(e){m.oR.error(String(e))}}))};return(0,s.jsxs)("aside",{className:"flex h-full flex-col border-l bg-card",children:[(0,s.jsxs)("header",{className:"border-b px-3 py-2 flex items-center gap-2",children:[(0,s.jsx)(l.A,{className:"h-3.5 w-3.5 text-violet-600"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:"Помощник"}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground ml-1",children:"знает контекст этого приложения"}),h&&w&&(0,s.jsx)(p(),{href:"/roots/".concat(h,"/chat/").concat(w),className:"ml-auto p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground",title:"Открыть в полном чате",children:(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"})}),g&&(0,s.jsx)("button",{type:"button",onClick:g,className:"p-1 rounded hover:bg-accent "+(h&&w?"":"ml-auto"),title:"Скрыть",children:(0,s.jsx)(o.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{ref:L,className:"flex-1 overflow-y-auto px-3 py-2 space-y-2 text-sm",children:[A&&(0,s.jsx)("p",{className:"text-xs text-red-600",children:A}),!A&&0===j.length&&!O&&(0,s.jsxs)("div",{className:"text-xs text-muted-foreground flex items-start gap-2",children:[(0,s.jsx)(c.A,{className:"h-3 w-3 mt-0.5 text-violet-600 shrink-0"}),(0,s.jsx)("span",{children:"Спроси что-нибудь про данные этого мини-приложения. Диалог сохраняется как обычный разговор — можно открыть полностью по иконке в углу."})]}),j.map((e,t)=>(0,s.jsx)(v,{role:e.role,text:e.text},t)),R&&O&&(0,s.jsx)(v,{role:"assistant",text:O,streaming:!0}),T&&!R&&(0,s.jsxs)("div",{className:"mr-6 rounded-md bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground inline-flex items-center gap-2",children:[(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}),"Reflex думает…"]})]}),(0,s.jsxs)("div",{className:"border-t px-3 py-2 flex items-end gap-1.5",children:[(0,s.jsx)("textarea",{value:k,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),q())},rows:1,placeholder:"Спроси (⌘↵)…",disabled:T||!!A||!w,className:"flex-1 resize-none rounded border bg-background px-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400 max-h-24"}),(0,s.jsx)("button",{type:"button",onClick:q,disabled:T||!k.trim()||!!A||!w,className:"inline-flex items-center justify-center rounded bg-violet-600 px-2 py-1 text-white hover:bg-violet-700 disabled:opacity-50",children:T?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(u.A,{className:"h-3 w-3"})})]})]})}function v(e){let{role:t,text:r,streaming:a}=e,l=r;return("user"===t&&(l=l.replace(/^\s*\[Контекст мини-приложения\][\s\S]*?\[\/контекст\]\s*/,"").trim()),l.trim())?(0,s.jsxs)("div",{className:"user"===t?"ml-6 rounded-md bg-violet-50 dark:bg-violet-950/30 px-2 py-1.5":"mr-6 rounded-md bg-muted/40 px-2 py-1.5 whitespace-pre-wrap",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-0.5",children:["user"===t?"Ты":"assistant"===t?"Reflex":"Система",a&&(0,s.jsx)("span",{className:"ml-1 text-violet-600",children:"●"})]}),l]}):null}function g(e){let{scope:t,id:r,rootId:n,className:o,title:c,agentChat:i,utilityName:u}=e,d=(0,a.useRef)(null),p=(0,a.useRef)(null),[m,h]=(0,a.useState)(!0),x=n?"?rootId=".concat(encodeURIComponent(n)):"",f="/api/utilities/".concat(t,"/").concat(r,"/iframe").concat(x),v="/api/utilities/".concat(t,"/").concat(r,"/host").concat(x);(0,a.useEffect)(()=>{let e=async e=>{var t,r,s,a,l,n;let o=e.data;if(!o||e.source!==(null==(t=d.current)?void 0:t.contentWindow))return;if("snapshot-payload"===o.type){let e=p.current;e&&(clearTimeout(e.timer),p.current=null,e.resolve(o.snapshot));return}if("host-rpc"!==o.type)return;let c=o.id;try{let e=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:o.method,args:o.args})}),t=await e.json();null==(s=d.current)||null==(r=s.contentWindow)||r.postMessage(t.ok?{type:"host-rpc-result",id:c,ok:!0,result:t.result}:{type:"host-rpc-result",id:c,ok:!1,error:null!=(a=t.error)?a:"HTTP ".concat(e.status)},"*")}catch(e){null==(n=d.current)||null==(l=n.contentWindow)||l.postMessage({type:"host-rpc-result",id:c,ok:!1,error:e instanceof Error?e.message:String(e)},"*")}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[v]);let g=(0,s.jsx)("iframe",{ref:d,src:f,sandbox:"allow-scripts allow-forms allow-same-origin",className:null!=o?o:"h-full w-full border-0 bg-white",title:null!=c?c:"utility-".concat(r)});return i?(0,s.jsxs)("div",{className:"flex h-full w-full",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0 relative",children:[g,!m&&(0,s.jsxs)("button",{type:"button",onClick:()=>h(!0),className:"absolute right-3 bottom-3 inline-flex items-center gap-1 rounded-full bg-violet-600 px-3 py-1.5 text-xs text-white shadow-lg hover:bg-violet-700",title:"Открыть помощника",children:[(0,s.jsx)(l.A,{className:"h-3.5 w-3.5"}),"Помощник"]})]}),m&&(0,s.jsx)("div",{className:"w-80 shrink-0",children:(0,s.jsx)(y,{scope:t,utilityId:r,...u?{utilityName:u}:{},...n?{rootId:n}:{},requestSnapshot:()=>{var e;let t=null==(e=d.current)?void 0:e.contentWindow;return t?(p.current&&(clearTimeout(p.current.timer),p.current.resolve(void 0),p.current=null),new Promise(e=>{let r=setTimeout(()=>{var t;(null==(t=p.current)?void 0:t.resolve)===e&&(p.current=null,e(void 0))},500);p.current={resolve:e,timer:r};try{t.postMessage({type:"request-snapshot"},"*")}catch(t){clearTimeout(r),p.current=null,e(void 0)}})):Promise.resolve(void 0)},onClose:()=>h(!1)})})]}):g}},95265:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(45804).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}}]);
|