reflex-agent 0.13.5 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +113 -106
- package/.next/app-path-routes-manifest.json +10 -9
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +7 -7
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/agents/[agentId]/page.js +2 -2
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +2 -2
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route.js +53 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/install-archive/route.js +1 -0
- package/.next/server/app/api/utilities/install-archive/route.js.nft.json +1 -0
- package/.next/server/app/api/utilities/install-archive/route_client-reference-manifest.js +1 -0
- package/.next/server/app/audit/page.js +1 -1
- package/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page.js +3 -3
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/memory/page.js +1 -1
- package/.next/server/app/roots/[id]/memory/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/memory/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/page.js +4 -4
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/new/page.js +3 -3
- package/.next/server/app/roots/new/page.js.nft.json +1 -1
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +5 -5
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/file/page.js +2 -2
- package/.next/server/app/share/[id]/file/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/page.js +2 -2
- package/.next/server/app/share/[id]/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/page.js +2 -2
- package/.next/server/app/utilities/page.js.nft.json +1 -1
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +10 -9
- package/.next/server/chunks/1105.js +1 -1
- package/.next/server/chunks/1358.js +1 -1
- package/.next/server/chunks/1638.js +1 -0
- package/.next/server/chunks/{7239.js → 2258.js} +1 -1
- package/.next/server/chunks/285.js +19 -15
- package/.next/server/chunks/3332.js +1 -1
- package/.next/server/chunks/3377.js +1 -0
- package/.next/server/chunks/3966.js +1 -0
- package/.next/server/chunks/4201.js +3 -0
- package/.next/server/chunks/4578.js +1 -0
- package/.next/server/chunks/4812.js +1 -1
- package/.next/server/chunks/7300.js +56 -4
- package/.next/server/chunks/7358.js +12 -8
- package/.next/server/chunks/8133.js +1 -0
- package/.next/server/chunks/{7564.js → 8309.js} +2 -2
- package/.next/server/chunks/8511.js +1 -0
- package/.next/server/chunks/9098.js +1 -1
- package/.next/server/chunks/9809.js +1 -1
- package/.next/server/chunks/9861.js +57 -5
- package/.next/server/functions-config-manifest.json +4 -3
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/1JOww-AoS7M9R4-h4i1EK/_buildManifest.js +1 -0
- package/.next/static/chunks/1807-29ed83a7f19aa21e.js +1 -0
- package/.next/static/chunks/3908-7e7f22cd1d3c47ed.js +1 -0
- package/.next/static/chunks/4108.1e51cb6f9a9638b0.js +1 -0
- package/.next/static/chunks/6559-329fd074773ef4f2.js +1 -0
- package/.next/static/chunks/6560-d68897c384b289dc.js +1 -0
- package/.next/static/chunks/7037-7d9a908022d947da.js +1 -0
- package/.next/static/chunks/{8775-890699c74c28df61.js → 8775-c1985f74619ced58.js} +1 -1
- package/.next/static/chunks/{6231-d572db56a0a44f92.js → 9338-9f6c33a593b60e12.js} +3 -3
- package/.next/static/chunks/app/api/agents/[agentId]/respond/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/images/[rootId]/[file]/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/oauth/callback/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/oauth/start/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/attachments/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/send/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stop/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/dashboard/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/roots/[id]/suggestions/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/iframe/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/api/utilities/install-archive/route-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/layout-0385fc4c09255a22.js +1 -0
- package/.next/static/chunks/app/onboarding/page-e49a9a7a81bdc74e.js +1 -0
- package/.next/static/chunks/app/page-d11913f531a6920e.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-ac80b75a50880fef.js +1 -0
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-30c5a6767d469a99.js +1 -0
- package/.next/static/chunks/app/roots/[id]/layout-5d0cd3b754198853.js +1 -0
- package/.next/static/chunks/app/roots/[id]/memory/{page-495bfa5d5ccc95fc.js → page-ae9c453a059a7c48.js} +1 -1
- package/.next/static/chunks/app/roots/[id]/page-074640697b6db60a.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-6e23d0a8b8bc570b.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/page-2a7d5c4f49b41e14.js +1 -0
- package/.next/static/chunks/app/roots/new/page-530bbb61fefeadc8.js +1 -0
- package/.next/static/chunks/app/settings/page-3b79c11349d439b5.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-b5e74b24b29e3918.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-ec338e725c434ecd.js +1 -0
- package/.next/static/chunks/app/utilities/page-fb110c605c6dedb6.js +1 -0
- package/.next/static/chunks/{webpack-87d6f4f6cb0681d9.js → webpack-bf73daacb1b20997.js} +1 -1
- package/.next/static/css/eef5a7cce3f3a4b3.css +1 -0
- package/.next/trace +90 -90
- package/.next/types/app/api/utilities/install-archive/route.ts +347 -0
- package/.next/types/routes.d.ts +2 -1
- package/.next/types/validator.ts +9 -0
- package/dist/lib/reflex/agents/prompts.js +22 -0
- package/dist/lib/reflex/agents/prompts.js.map +1 -1
- package/dist/lib/reflex/prompts/defaults.js +6 -2
- package/dist/lib/reflex/prompts/defaults.js.map +1 -1
- package/package.json +2 -1
- package/.next/server/chunks/462.js +0 -3
- package/.next/server/chunks/5906.js +0 -1
- package/.next/server/chunks/9975.js +0 -1
- package/.next/static/FjPl5lLyObDgORD6F9-MK/_buildManifest.js +0 -1
- package/.next/static/chunks/1722-1f7df607ccd79308.js +0 -1
- package/.next/static/chunks/4088-7c72e188b9bde99b.js +0 -1
- package/.next/static/chunks/4108.7b6bc850cb87e9bc.js +0 -1
- package/.next/static/chunks/5757-9ae2804a278bf867.js +0 -1
- package/.next/static/chunks/6136-9bf50790263804d1.js +0 -1
- package/.next/static/chunks/7260-36ed6b2076b8a79f.js +0 -1
- package/.next/static/chunks/app/api/agents/[agentId]/respond/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/images/[rootId]/[file]/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/oauth/callback/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/oauth/start/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/attachments/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/send/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stop/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/dashboard/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/roots/[id]/suggestions/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/iframe/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/layout-0d2ea0e793b0a0da.js +0 -1
- package/.next/static/chunks/app/onboarding/page-9ebf81ad78d9173a.js +0 -1
- package/.next/static/chunks/app/page-b926895e820623de.js +0 -1
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-1868f90d718dc449.js +0 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-b112a20948212db8.js +0 -1
- package/.next/static/chunks/app/roots/[id]/layout-7e2f82a91b10b7e2.js +0 -1
- package/.next/static/chunks/app/roots/[id]/page-df2eddea266dab67.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-9dbebdc6cf006bf3.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/page-0f527d3f6b8ab4a0.js +0 -1
- package/.next/static/chunks/app/roots/new/page-c2ffb2099313f672.js +0 -1
- package/.next/static/chunks/app/settings/page-9ee28e7943ae7620.js +0 -1
- package/.next/static/chunks/app/share/[id]/page-1f5f909096557c29.js +0 -1
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-3c6c50d24b9aa8a3.js +0 -1
- package/.next/static/chunks/app/utilities/page-0944fa72a82e7a76.js +0 -1
- package/.next/static/css/6144318015aa8092.css +0 -1
- /package/.next/static/{FjPl5lLyObDgORD6F9-MK → 1JOww-AoS7M9R4-h4i1EK}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6231],{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"}]])},3239:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},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 e9=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})}}),e5=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(`
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9338],{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"}]])},3239:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},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:()=>nc,YO:()=>nU,zM:()=>nI,k5:()=>nB,eu:()=>nG,ai:()=>nT,Ik:()=>nL,Yj:()=>nd}),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 d=/^[cC][0-9a-z]{6,}$/,c=/^[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 q="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function W(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===W(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==W(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})}}),ed=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})}}),ec=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 q(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 q(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=d),eC.init(e,t)}),eq=a("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=c),eC.init(e,t)}),eW=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,d="optional"===u.optin,c="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,d,c))):ta(a,n,i,t,d,c)}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(!W(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,d)=>{r??(r=a.value);let c=u.value;return W(c)?o&&s&&d?.async===!1&&!0!==d.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
2
|
if (${n}.issues.length) {
|
|
3
3
|
if (${o} in input) {
|
|
4
4
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
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>
|
|
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,d),l)?ts([],c,u,d,r,e):u:i(u,d):(u.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),u)}});function td(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 tc=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=>td(t,r,e,i)):td(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 ed({check:"greater_than",...Q(t),value:e,inclusive:!1})}function tJ(e,t){return new ed({check:"greater_than",...Q(t),value:e,inclusive:!0})}function tF(e,t){return new ec({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 tq(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 tW(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),tW(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
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),t9=eZ(t2),t5=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)=>t5(e,t,n),e.parseAsync=async(t,n)=>t9(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 n9({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 n5({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)=>{e9.init(e,t),nd.init(e,t)}),nA=a("ZodBase64URL",(e,t)=>{e5.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)}(n9,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}),n9=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}),n5=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"}]])}}]);
|
|
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=tq({...i??{},target:a,io:t,processors:n});return tW(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;tW(i.innerType,t,r),t.seen.get(e).ref=i.innerType},tY=a("ZodISODateTime",(e,t)=>{eG.init(e,t),nc.init(e,t)}),tQ=a("ZodISODate",(e,t)=>{eK.init(e,t),nc.init(e,t)}),t0=a("ZodISOTime",(e,t)=>{eX.init(e,t),nc.init(e,t)}),t1=a("ZodISODuration",(e,t)=>{eY.init(e,t),nc.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=tq({...n,processors:t});return tW(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 nq({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 nd(e){return new nl({type:"string",...Q(e)})}let nc=a("ZodStringFormat",(e,t)=>{eC.init(e,t),nu.init(e,t)}),np=a("ZodEmail",(e,t)=>{eF.init(e,t),nc.init(e,t)}),nf=a("ZodGUID",(e,t)=>{eR.init(e,t),nc.init(e,t)}),nh=a("ZodUUID",(e,t)=>{eJ.init(e,t),nc.init(e,t)}),nm=a("ZodURL",(e,t)=>{eU.init(e,t),nc.init(e,t)}),ny=a("ZodEmoji",(e,t)=>{eD.init(e,t),nc.init(e,t)}),nv=a("ZodNanoID",(e,t)=>{eL.init(e,t),nc.init(e,t)}),ng=a("ZodCUID",(e,t)=>{eV.init(e,t),nc.init(e,t)}),n_=a("ZodCUID2",(e,t)=>{eq.init(e,t),nc.init(e,t)}),nz=a("ZodULID",(e,t)=>{eW.init(e,t),nc.init(e,t)}),nb=a("ZodXID",(e,t)=>{eB.init(e,t),nc.init(e,t)}),nk=a("ZodKSUID",(e,t)=>{eH.init(e,t),nc.init(e,t)}),nw=a("ZodIPv4",(e,t)=>{eQ.init(e,t),nc.init(e,t)}),n$=a("ZodIPv6",(e,t)=>{e0.init(e,t),nc.init(e,t)}),nx=a("ZodCIDRv4",(e,t)=>{e1.init(e,t),nc.init(e,t)}),nO=a("ZodCIDRv6",(e,t)=>{e2.init(e,t),nc.init(e,t)}),nS=a("ZodBase64",(e,t)=>{e5.init(e,t),nc.init(e,t)}),nA=a("ZodBase64URL",(e,t)=>{e9.init(e,t),nc.init(e,t)}),nZ=a("ZodE164",(e,t)=>{e6.init(e,t),nc.init(e,t)}),nE=a("ZodJWT",(e,t)=>{e8.init(e,t),nc.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 d="number"==typeof l&&l>=(i??-1/0),c="number"==typeof u&&u<=(a??1/0),p="draft-04"===t.target||"openapi-3.0"===t.target;d?p?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:"number"==typeof i&&(n.minimum=i),c?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=tW(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]=tW(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=tW(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)=>{tc.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)=>tW(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}),nq=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=tW(i.left,t,{...r,path:[...r.path,"allOf",0]}),o=tW(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)}),nW=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 nW({...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 nW({...t,checks:[],...Q(r),entries:i})}});function nB(e,t){return new nW({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=tW(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;tW(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;tW(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;tW(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;tW(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;tW(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;tW(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"}]])},50988:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(45804).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},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"}]])},95265:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(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
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
package/.next/static/chunks/app/api/roots/[id]/chat/[topicId]/stream/route-5d0cd3b754198853.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
package/.next/static/chunks/app/api/utilities/[scope]/[id]/bundle.js/route-5d0cd3b754198853.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-api.mjs/route-5d0cd3b754198853.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
package/.next/static/chunks/app/api/utilities/[scope]/[id]/host-ui.mjs/route-5d0cd3b754198853.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
package/.next/static/chunks/app/api/utilities/[scope]/[id]/style.css/route-5d0cd3b754198853.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,803,1064,1119,2047,2295,3373,4751,5618,5650,5867,6058,6062,6475,7200,7812,8818,9749],{93480:()=>{}},_=>{_.O(0,[4933,146,7358],()=>_(_.s=93480)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{13506:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var a=s(47989),r=s(55701);function n(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,r.QP)((0,a.$)(t))}},15658:(e,t,s)=>{"use strict";s.d(t,{i:()=>r});var a=s(7911);let r=(0,a.createServerReference)("007b54d3872433e92c600d6efc7d62743fc15c4ffd",a.callServer,void 0,a.findSourceMapURL,"listRootsAction")},16302:(e,t,s)=>{"use strict";s.d(t,{AppSidebar:()=>Z});var a=s(4624),r=s(99356),n=s(54400),l=s.n(n),i=s(69285),c=s(56221),o=s(49411),d=s(8096),u=s(72754),x=s(70762),h=s(69709),m=s(69205),p=s(9923),f=s(49623),g=s(3239),b=s(79182),j=s(42146),v=s(46972),N=s(90936),w=s(63514),y=s(80192),k=s(91074),A=s(85253),S=s(7911);let C=(0,S.createServerReference)("40e4efba60174266e5db5bda6d681afaa779b792a2",S.callServer,void 0,S.findSourceMapURL,"loadKbSectionsAction"),z=(0,S.createServerReference)("4069f32caf3a18a48f8d70067b1074fa8e8409d0af",S.callServer,void 0,S.findSourceMapURL,"loadTopicsAction"),R=(0,S.createServerReference)("40bbe5f66c54b92c4c005641fc8f32bc2a1a792495",S.callServer,void 0,S.findSourceMapURL,"loadSidebarMemoryAction"),I=(0,S.createServerReference)("40b15d5318f8f9018dd3fb090919046be6f0fa33ac",S.callServer,void 0,S.findSourceMapURL,"loadSidebarUtilitiesAction");var E=s(15658);let L=(0,S.createServerReference)("4015684eef8bd59c3b7e3ce3bf81d8ed6d91f83f1d",S.callServer,void 0,S.findSourceMapURL,"listAgentsAction");var U=s(39624),_=s(53296),P=s(50469),M=s(50988),T=s(63622),$=s(40805);function Z(e){let{initialRoots:t}=e,s=(0,i.usePathname)(),n=(0,o.c)("app"),[c,h]=(0,r.useState)(t),m=(0,r.useCallback)(async()=>{let e=await (0,E.i)();e.ok&&h(e.entries)},[]);return((0,w.S9)(w.Zi.rootsChanged,m),(null==s?void 0:s.startsWith("/share/"))||"/share"===s)?null:(0,a.jsxs)("aside",{className:"w-72 shrink-0 border-r bg-muted/30 flex flex-col",children:[(0,a.jsxs)("div",{className:"px-4 py-4 flex items-center gap-2 border-b",children:[(0,a.jsx)("span",{className:"reflex-gradient inline-flex h-7 w-7 items-center justify-center rounded-lg text-white shadow-sm",children:(0,a.jsx)(d.A,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"leading-tight",children:[(0,a.jsx)(l(),{href:"/",className:"text-sm font-semibold tracking-tight hover:underline",children:"Reflex"}),(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"knowledge base"})]})]}),(0,a.jsx)(y.F,{className:"flex-1",children:(0,a.jsxs)("nav",{className:"px-2 pt-3 pb-6",children:[(0,a.jsx)("div",{className:"px-2 mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:n("sidebar.spaces")}),0===c.length?(0,a.jsx)("div",{className:"px-2 py-3 text-xs text-muted-foreground",children:n("sidebar.empty")}):(0,a.jsx)("ul",{className:"space-y-0.5",children:c.map(e=>{var t;return(0,a.jsx)(D,{root:e,active:null!=(t=null==s?void 0:s.startsWith("/roots/".concat(e.id)))&&t},e.id)})}),(0,a.jsx)("div",{className:"mt-2 px-2",children:(0,a.jsx)(A.$,{asChild:!0,variant:"ghost",size:"sm",className:"h-7 w-full justify-start text-xs",children:(0,a.jsxs)(l(),{href:"/roots/new",children:[(0,a.jsx)(u.A,{className:"mr-1 h-3.5 w-3.5"})," ",n("sidebar.addSpace")]})})})]})}),(0,a.jsx)(k.Separator,{}),(0,a.jsxs)("div",{className:"px-2 py-2 space-y-0.5",children:[(0,a.jsx)(A.$,{asChild:!0,variant:"/utilities"===s||(null==s?void 0:s.startsWith("/utilities/"))?"secondary":"ghost",size:"sm",className:"w-full justify-start",children:(0,a.jsxs)(l(),{href:"/utilities",children:[(0,a.jsx)(U.A,{className:"mr-2 h-4 w-4"})," ",n("sidebar.utilities")]})}),(0,a.jsx)(A.$,{asChild:!0,variant:"/audit"===s?"secondary":"ghost",size:"sm",className:"w-full justify-start",children:(0,a.jsxs)(l(),{href:"/audit",children:[(0,a.jsx)(_.A,{className:"mr-2 h-4 w-4"})," ",n("sidebar.audit")]})}),(0,a.jsx)(A.$,{asChild:!0,variant:"/settings"===s?"secondary":"ghost",size:"sm",className:"w-full justify-start",children:(0,a.jsxs)(l(),{href:"/settings",children:[(0,a.jsx)(x.A,{className:"mr-2 h-4 w-4"})," Settings"]})})]})]})}function D(e){let{root:t,active:s}=e,n=(0,o.c)("app"),[c,d]=(0,r.useState)(s),[u,x]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1),[N,y]=(0,r.useState)(!1),[k,A]=(0,r.useState)(!1),[S,E]=(0,r.useState)(!1),[_,T]=(0,r.useState)(null),[$,Z]=(0,r.useState)(null),[D,W]=(0,r.useState)(null),[O,K]=(0,r.useState)(null),[Q,q]=(0,r.useState)(null),[H,J]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(!1),[es,ea]=(0,r.useState)(!1),[er,en]=(0,r.useState)(!1),[el,ei]=(0,r.useState)(!1),ec=(0,i.usePathname)();(0,r.useEffect)(()=>{s&&d(!0)},[s]);let eo=(0,r.useCallback)(async()=>{J(!0);let e=await C(t.id);J(!1),e.ok?T(e.sections):T([])},[t.id]),ed=(0,r.useCallback)(async()=>{ea(!0);let e=await z(t.id);ea(!1),e.ok?W(e.topics):W([])},[t.id]),eu=(0,r.useCallback)(async()=>{ei(!0);let e=await L({rootId:t.id});ei(!1),e.ok?q(e.agents):q([])},[t.id]),ex=(0,r.useCallback)(async()=>{et(!0);let e=await R(t.id);et(!1),e.ok?Z(e.files):Z([])},[t.id]),eh=(0,r.useCallback)(async()=>{en(!0);let e=await I(t.id);en(!1),e.ok?K(e.utilities):K([])},[t.id]);(0,w.S9)(w.Zi.kbChanged(t.id),()=>{u?eo():T(null)}),(0,w.S9)(w.Zi.topicsChanged(t.id),()=>{N?ed():W(null),S?eu():q(null),k?eh():K(null)}),(0,r.useEffect)(()=>{if(!S)return;let e=setInterval(()=>{eu()},3e3);return()=>clearInterval(e)},[S,eu]);let em=async()=>{let e=!u;x(e),e&&null===_&&!H&&await eo()},ep=async()=>{let e=!j;v(e),e&&null===$&&!ee&&await ex()},ef=async()=>{let e=!N;y(e),e&&null===D&&!es&&await ed()},eg=async()=>{let e=!k;A(e),e&&null===O&&!er&&await eh()},eb=async()=>{let e=!S;E(e),e&&null===Q&&!el&&await eu()},ej=function(e){var t;let s=e.split("/").filter(Boolean);return null!=(t=s[s.length-1])?t:e}(t.path);return(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex items-center group",children:[(0,a.jsx)("button",{type:"button",onClick:()=>d(e=>!e),className:"h-6 w-6 flex items-center justify-center text-muted-foreground hover:text-foreground shrink-0","aria-label":n(c?"sidebar.collapse":"sidebar.expand"),children:c?(0,a.jsx)(h.A,{className:"h-3.5 w-3.5"}):(0,a.jsx)(m.A,{className:"h-3.5 w-3.5"})}),(0,a.jsxs)(l(),{href:"/roots/".concat(t.id),className:"flex-1 min-w-0 flex items-center gap-2 px-2 py-1 rounded-md text-sm hover:bg-accent ".concat(s?"bg-accent":""),children:[(0,a.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:ej})]})]}),c&&(0,a.jsxs)("ul",{className:"ml-5 mt-0.5 space-y-0.5 border-l pl-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("button",{type:"button",onClick:em,className:"w-full flex items-center gap-1 px-2 py-1 rounded-md text-xs text-muted-foreground hover:bg-accent hover:text-foreground",children:[u?(0,a.jsx)(h.A,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)(f.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:n("sidebar.kb")}),H&&(0,a.jsx)(g.A,{className:"ml-auto h-3 w-3 animate-spin shrink-0"})]}),u&&null!==_&&(0,a.jsx)(B,{rootId:t.id,sections:_,pathname:ec})]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("button",{type:"button",onClick:ep,className:"w-full flex items-center gap-1 px-2 py-1 rounded-md text-xs text-muted-foreground hover:bg-accent hover:text-foreground",children:[j?(0,a.jsx)(h.A,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)(P.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:n("sidebar.memory")}),ee&&(0,a.jsx)(g.A,{className:"ml-auto h-3 w-3 animate-spin shrink-0"})]}),j&&null!==$&&(0,a.jsx)(X,{rootId:t.id,memory:$,pathname:ec})]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("button",{type:"button",onClick:ef,className:"w-full flex items-center gap-1 px-2 py-1 rounded-md text-xs text-muted-foreground hover:bg-accent hover:text-foreground",children:[N?(0,a.jsx)(h.A,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)(b.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:n("sidebar.topics")}),es&&(0,a.jsx)(g.A,{className:"ml-auto h-3 w-3 animate-spin shrink-0"}),null!==D&&(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:D.length})]}),N&&null!==D&&(0,a.jsx)(G,{rootId:t.id,topics:D,pathname:ec})]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("button",{type:"button",onClick:eg,className:"w-full flex items-center gap-1 px-2 py-1 rounded-md text-xs text-muted-foreground hover:bg-accent hover:text-foreground",children:[k?(0,a.jsx)(h.A,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)(U.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:n("sidebar.utilities")}),er&&(0,a.jsx)(g.A,{className:"ml-auto h-3 w-3 animate-spin shrink-0"}),null!==O&&!er&&(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:O.length})]}),k&&null!==O&&(0,a.jsx)(Y,{rootId:t.id,utilities:O,pathname:ec})]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("button",{type:"button",onClick:eb,className:"w-full flex items-center gap-1 px-2 py-1 rounded-md text-xs text-muted-foreground hover:bg-accent hover:text-foreground",children:[S?(0,a.jsx)(h.A,{className:"h-3 w-3 shrink-0"}):(0,a.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)(M.A,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:n("sidebar.agents")}),el&&(0,a.jsx)(g.A,{className:"ml-auto h-3 w-3 animate-spin shrink-0"}),null!==Q&&!el&&(0,a.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:[Q.filter(e=>V(e.status)).length,"/",Q.length]})]}),S&&null!==Q&&(0,a.jsx)(F,{agents:Q,pathname:ec})]})]})]})}function F(e){var t,s;let{agents:r,pathname:n}=e;if(0===r.length)return(0,a.jsx)(W,{});let l=new Map;for(let e of r){let s=e.parentId,a=null!=(t=l.get(s))?t:[];a.push(e),l.set(s,a)}let i=null!=(s=l.get(void 0))?s:[];return(0,a.jsx)("ul",{className:"ml-4 mt-0.5 space-y-0.5 border-l pl-1",children:i.map(e=>(0,a.jsx)(O,{agent:e,byParent:l,pathname:n,depth:0},e.id))})}function W(){let e=(0,o.c)("app");return(0,a.jsx)("div",{className:"ml-4 px-3 py-1 text-[11px] italic text-muted-foreground",children:e("sidebar.noAgents")})}function O(e){var t;let{agent:s,byParent:r,pathname:n,depth:i}=e,c=null!=(t=r.get(s.id))?t:[],o="/agents/".concat(s.id),d=n===o;return(0,a.jsxs)("li",{children:[(0,a.jsxs)(l(),{href:o,className:"flex items-center gap-1 px-2 py-1 text-[12px] rounded hover:bg-accent ".concat(d?"bg-accent":""),style:{paddingLeft:8*i+4},children:[V(s.status)?(0,a.jsx)(T.A,{className:"h-3 w-3 text-emerald-600 shrink-0 animate-pulse"}):(0,a.jsx)(M.A,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate flex-1",children:s.label}),(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground shrink-0",title:"".concat(s.harness," \xb7 ").concat(s.model),children:"claude-code"===s.harness?"claude":"ollama"===s.harness?"ollama":"codex"})]}),c.length>0&&(0,a.jsx)("ul",{className:"space-y-0.5",children:c.map(e=>(0,a.jsx)(O,{agent:e,byParent:r,pathname:n,depth:i+1},e.id))})]})}function V(e){return"starting"===e||"running"===e}function B(e){let{rootId:t,sections:s,pathname:r}=e;return 0===s.length?(0,a.jsx)(K,{}):(0,a.jsx)("ul",{className:"ml-4 mt-0.5 space-y-0.5 border-l pl-1",children:s.map(e=>e.isDir?(0,a.jsx)(Q,{rootId:t,section:e,pathname:r},e.rel):(0,a.jsx)("li",{children:(0,a.jsx)(q,{rootId:t,section:e,pathname:r})},e.rel))})}function K(){let e=(0,o.c)("app");return(0,a.jsx)("div",{className:"px-3 py-1 text-[11px] italic text-muted-foreground",children:e("sidebar.kbEmpty")})}function Q(e){let{rootId:t,section:s,pathname:n}=e,[l,i]=(0,r.useState)(!1);return(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("button",{type:"button",onClick:()=>i(e=>!e),className:"h-5 w-5 flex items-center justify-center text-muted-foreground hover:text-foreground shrink-0",children:l?(0,a.jsx)(h.A,{className:"h-3 w-3"}):(0,a.jsx)(m.A,{className:"h-3 w-3"})}),(0,a.jsx)(j.A,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-1"}),(0,a.jsx)("span",{className:"text-[12px] flex-1 truncate",children:s.label})]}),l&&s.children&&(0,a.jsx)("ul",{className:"ml-4 space-y-0.5 border-l pl-1",children:s.children.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)(q,{rootId:t,section:e,pathname:n})},e.rel))})]})}function q(e){let{rootId:t,section:s,pathname:r}=e;if(!s.fileRel)return null;let n=s.fileRel.split("/").map(encodeURIComponent).join("/"),i="/roots/".concat(t,"/kb/").concat(n),c=r===i;return(0,a.jsxs)(l(),{href:i,className:"flex items-center gap-1 px-2 py-1 text-[12px] rounded hover:bg-accent ".concat(c?"bg-accent":""),children:[(0,a.jsx)(f.A,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:s.label})]})}function G(e){let{rootId:t,topics:s,pathname:r}=e;return 0===s.length?(0,a.jsx)(H,{}):(0,a.jsx)("ul",{className:"ml-4 mt-0.5 space-y-0.5 border-l pl-1",children:s.map(e=>(0,a.jsx)(J,{rootId:t,topic:e,pathname:r},e.id))})}function H(){let e=(0,o.c)("app");return(0,a.jsx)("div",{className:"ml-4 px-3 py-1 text-[11px] italic text-muted-foreground",children:e("sidebar.noTopics")})}function J(e){let{rootId:t,topic:s,pathname:n}=e,d=(0,o.c)("app"),u="/roots/".concat(t,"/chat/").concat(s.id),x=n===u,[h,m]=(0,r.useTransition)(),p=(0,i.useRouter)();return(0,a.jsx)("li",{className:"group/topic",children:(0,a.jsxs)(l(),{href:u,className:"flex items-center gap-1 px-2 py-1 text-[12px] rounded hover:bg-accent ".concat(x?"bg-accent":""),children:[(0,a.jsx)(b.A,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:s.title}),(0,a.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),confirm(d("sidebar.deleteTopicConfirm",{title:s.title}))&&m(async()=>{let e=await (0,N.L)(t,s.id);if(!e.ok){var a;c.oR.error(null!=(a=e.error)?a:d("sidebar.deleteFailed"));return}c.oR.success(d("sidebar.topicDeleted")),(0,w.$d)(w.Zi.topicsChanged(t)),x&&p.push("/roots/".concat(t))})},disabled:h,"aria-label":d("sidebar.deleteTopic"),title:d("sidebar.deleteTopic"),className:"opacity-0 group-hover/topic:opacity-100 transition-opacity p-0.5 rounded hover:bg-destructive/15 text-muted-foreground hover:text-destructive shrink-0",children:h?(0,a.jsx)(g.A,{className:"h-3 w-3 animate-spin"}):(0,a.jsx)(v.A,{className:"h-3 w-3"})})]})})}function X(e){let{rootId:t,memory:s,pathname:r}=e,n=(0,o.c)("app"),i=s.filter(e=>!e.empty),c="/roots/".concat(t,"/memory"),d=r===c;return 0===i.length?(0,a.jsx)("div",{className:"ml-4 px-3 py-1 text-[11px] italic text-muted-foreground",children:n("sidebar.memoryEmpty")}):(0,a.jsx)("ul",{className:"ml-4 mt-0.5 space-y-0.5 border-l pl-1",children:i.map(e=>(0,a.jsx)("li",{children:(0,a.jsxs)(l(),{href:c,title:e.description,className:"flex items-center gap-1 px-2 py-1 text-[12px] rounded hover:bg-accent ".concat(d?"bg-accent":""),children:[(0,a.jsx)(P.A,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:e.file}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground shrink-0",children:e.lines})]})},e.file))})}function Y(e){let{rootId:t,utilities:s,pathname:r}=e,n=(0,o.c)("app");return 0===s.length?(0,a.jsx)("div",{className:"ml-4 px-3 py-1 text-[11px] italic text-muted-foreground",children:n("sidebar.utilitiesEmpty")}):(0,a.jsx)("ul",{className:"ml-4 mt-0.5 space-y-0.5 border-l pl-1",children:s.map(e=>(0,a.jsx)(ee,{rootId:t,utility:e,pathname:r},"".concat(e.scope,":").concat(e.id)))})}function ee(e){let{rootId:t,utility:s,pathname:n}=e,[i,c]=(0,r.useState)(!1),o="/utilities/".concat(s.scope,"/").concat(encodeURIComponent(s.id)).concat(s.rootId?"?rootId=".concat(encodeURIComponent(s.rootId)):""),d=s.threads.length>0;return(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>!e),disabled:!d,className:"h-5 w-5 flex items-center justify-center text-muted-foreground hover:text-foreground shrink-0 disabled:opacity-30",children:d?i?(0,a.jsx)(h.A,{className:"h-3 w-3"}):(0,a.jsx)(m.A,{className:"h-3 w-3"}):(0,a.jsx)("span",{className:"inline-block h-3 w-3"})}),(0,a.jsxs)(l(),{href:o,className:"flex-1 min-w-0 flex items-center gap-1 px-1 py-1 text-[12px] rounded hover:bg-accent",children:[(0,a.jsx)($.A,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate flex-1",children:s.name}),d&&(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground shrink-0",children:s.threads.length})]})]}),i&&d&&(0,a.jsx)("ul",{className:"ml-4 space-y-0.5 border-l pl-1",children:s.threads.map(e=>{let s="/roots/".concat(t,"/chat/").concat(e.id),r=n===s;return(0,a.jsx)("li",{children:(0,a.jsxs)(l(),{href:s,className:"flex items-center gap-1 px-2 py-1 text-[12px] rounded hover:bg-accent ".concat(r?"bg-accent":""),children:[(0,a.jsx)(b.A,{className:"h-3 w-3 text-muted-foreground shrink-0"}),(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:e.title})]})},e.id)})})]})}},17848:(e,t,s)=>{Promise.resolve().then(s.bind(s,16302)),Promise.resolve().then(s.t.bind(s,60290,23)),Promise.resolve().then(s.bind(s,43450)),Promise.resolve().then(s.bind(s,52713))},43450:(e,t,s)=>{"use strict";s.d(t,{Toaster:()=>u});var a=s(4624),r=s(58726),n=s(42795),l=s(85924),i=s(69259),c=s(3239),o=s(41085),d=s(56221);let u=e=>{let{...t}=e,{theme:s="system"}=(0,o.D)();return(0,a.jsx)(d.l$,{theme:s,className:"toaster group",icons:{success:(0,a.jsx)(r.A,{className:"size-4"}),info:(0,a.jsx)(n.A,{className:"size-4"}),warning:(0,a.jsx)(l.A,{className:"size-4"}),error:(0,a.jsx)(i.A,{className:"size-4"}),loading:(0,a.jsx)(c.A,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...t})}},60290:()=>{},63514:(e,t,s)=>{"use strict";s.d(t,{$d:()=>n,S9:()=>l,Zi:()=>r});var a=s(99356);let r={rootsChanged:"reflex:roots-changed",topicsChanged:e=>"reflex:topics-changed:".concat(e),kbChanged:e=>"reflex:kb-changed:".concat(e)};function n(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function l(e,t){(0,a.useEffect)(()=>{let s=e=>t(e.detail);return window.addEventListener(e,s),()=>window.removeEventListener(e,s)},[e,t])}},80192:(e,t,s)=>{"use strict";s.d(t,{F:()=>l});var a=s(4624);s(99356);var r=s(14884),n=s(13506);function l(e){let{className:t,children:s,...l}=e;return(0,a.jsxs)(r.Root,{"data-slot":"scroll-area",className:(0,n.cn)("relative",t),...l,children:[(0,a.jsx)(r.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:s}),(0,a.jsx)(i,{}),(0,a.jsx)(r.Corner,{})]})}function i(e){let{className:t,orientation:s="vertical",...l}=e;return(0,a.jsx)(r.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:s,className:(0,n.cn)("flex touch-none p-px transition-colors select-none","vertical"===s&&"h-full w-2.5 border-l border-l-transparent","horizontal"===s&&"h-2.5 flex-col border-t border-t-transparent",t),...l,children:(0,a.jsx)(r.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}},85253:(e,t,s)=>{"use strict";s.d(t,{$:()=>c});var a=s(4624);s(99356);var r=s(60621),n=s(50362),l=s(13506);let i=(0,r.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 c(e){let{className:t,variant:s="default",size:r="default",asChild:c=!1,...o}=e,d=c?n.bL:"button";return(0,a.jsx)(d,{"data-slot":"button","data-variant":s,"data-size":r,className:(0,l.cn)(i({variant:s,size:r,className:t})),...o})}},90936:(e,t,s)=>{"use strict";s.d(t,{L:()=>r});var a=s(7911);let r=(0,a.createServerReference)("604efdf4ed425affe7d832848450d5f4a97dfd8dc6",a.callServer,void 0,a.findSourceMapURL,"deleteTopicAction")},91074:(e,t,s)=>{"use strict";s.d(t,{Separator:()=>l});var a=s(4624);s(99356);var r=s(44188),n=s(13506);function l(e){let{className:t,orientation:s="horizontal",decorative:l=!0,...i}=e;return(0,a.jsx)(r.b,{"data-slot":"separator",decorative:l,orientation:s,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})}}},e=>{e.O(0,[497,4400,4678,9776,6785,9411,951,4933,146,7358],()=>e(e.s=17848)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9566],{3239:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},8096:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(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"}]])},54207:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(45804).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},58726:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(45804).A)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},69285:(e,t,s)=>{"use strict";var l=s(48849);s.o(l,"usePathname")&&s.d(t,{usePathname:function(){return l.usePathname}}),s.o(l,"useRouter")&&s.d(t,{useRouter:function(){return l.useRouter}})},77782:(e,t,s)=>{"use strict";s.d(t,{OnboardingWizard:()=>N});var l=s(4624),a=s(99356),i=s(69285),n=s(49411),c=s(8096),d=s(3239),r=s(45804);let o=(0,r.A)("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);var m=s(86790);let x=(0,r.A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);var u=s(58726);let p=(0,r.A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var h=s(54207),g=s(85924),v=s(56221),b=s(7911);let j=(0,b.createServerReference)("00825c9e087dfc7a5bfb80bbe983c67c9c0a43cbd0",b.callServer,void 0,b.findSourceMapURL,"detectEnginesAction"),f=(0,b.createServerReference)("408e1fc5784fe5e4f563c722aadceb7f7a713a693c",b.callServer,void 0,b.findSourceMapURL,"runOnboardingAction");function N(e){var t,s,r;let{templates:g,initialLanguage:b,initialName:N}=e,w=(0,n.c)("onboarding"),C=(0,i.useRouter)(),[M,L]=(0,a.useState)(0),[S,R]=(0,a.useState)(N),[z,T]=(0,a.useState)(b||"russian"),[D,E]=(0,a.useState)(""),[_,H]=(0,a.useState)("claude"),[O,P]=(0,a.useState)({loading:!0,claudeAvailable:!1,codexAvailable:!1,ollamaAvailable:!1}),[F,q]=(0,a.useState)(new Set),[V,Z]=(0,a.useTransition)();(0,a.useEffect)(()=>{try{E(Intl.DateTimeFormat().resolvedOptions().timeZone||"")}catch(e){}(async()=>{let e=await j();P({loading:!1,claudeAvailable:e.claudeCli.available,...e.claudeCli.version?{claudeVersion:e.claudeCli.version}:{},codexAvailable:e.codexCli.available,...e.codexCli.version?{codexVersion:e.codexCli.version}:{},ollamaAvailable:e.ollama.available,...void 0!==e.ollama.modelsCount?{ollamaModels:e.ollama.modelsCount}:{}}),!e.claudeCli.available&&(e.codexCli.available?H("codex"):e.ollama.available&&H("ollama"))})()},[]);let U=(0,a.useMemo)(()=>0===M?S.trim().length>0&&z.trim().length>0:1===M?"claude"===_?O.claudeAvailable:"codex"===_?O.codexAvailable:O.ollamaAvailable:2!==M||F.size>0,[M,S,z,_,O,F]),B=[w("stepTitles.0"),w("stepTitles.1"),w("stepTitles.2"),w("stepTitles.3")];return(0,l.jsx)("div",{className:"min-h-screen flex flex-col items-center px-4 py-8",children:(0,l.jsxs)("div",{className:"w-full max-w-2xl space-y-4",children:[(0,l.jsxs)("header",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,l.jsx)(c.A,{className:"h-4 w-4 text-violet-600"}),(0,l.jsx)("span",{className:"font-medium",children:w("header.welcome")}),(0,l.jsx)("span",{className:"ml-auto text-xs",children:w("header.stepCounter",{current:M+1,total:4,title:B[M]})})]}),(0,l.jsx)(y,{current:M}),0===M&&(0,l.jsxs)(k,{children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold",children:w("step0.title")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:w("step0.description")}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("label",{className:"text-xs font-medium",htmlFor:"name",children:w("step0.nameLabel")}),(0,l.jsx)("input",{id:"name",value:S,onChange:e=>R(e.target.value),autoFocus:!0,placeholder:w("step0.namePlaceholder"),className:"w-full rounded border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("label",{className:"text-xs font-medium",htmlFor:"lang",children:w("step0.languageLabel")}),(0,l.jsxs)("select",{id:"lang",value:z,onChange:e=>T(e.target.value),className:"w-full rounded border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-violet-400",children:[(0,l.jsx)("option",{value:"russian",children:w("step0.languageRu")}),(0,l.jsx)("option",{value:"english",children:w("step0.languageEn")}),(0,l.jsx)("option",{value:"espa\xf1ol",children:w("step0.languageEs")}),(0,l.jsx)("option",{value:"deutsch",children:w("step0.languageDe")}),(0,l.jsx)("option",{value:"fran\xe7ais",children:w("step0.languageFr")})]})]}),D&&(0,l.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[w("step0.timezoneDetected")," ",(0,l.jsx)("code",{className:"font-mono",children:D})]})]}),1===M&&(0,l.jsxs)(k,{children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold",children:w("step1.title")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:w("step1.description")}),O.loading?(0,l.jsxs)("p",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[(0,l.jsx)(d.A,{className:"h-4 w-4 animate-spin"}),w("step1.checking")]}):(0,l.jsxs)("div",{className:"grid gap-2",children:[(0,l.jsx)(A,{selected:"claude"===_,onSelect:()=>H("claude"),icon:(0,l.jsx)(o,{className:"h-5 w-5"}),title:w("step1.claudeTitle"),description:w("step1.claudeDescription"),installLinkLabel:w("step1.installLink"),status:O.claudeAvailable?{ok:!0,hint:null!=(t=O.claudeVersion)?t:w("step1.claudeReady")}:{ok:!1,hint:w("step1.claudeMissing"),link:"https://docs.anthropic.com/claude/docs/claude-code"}}),(0,l.jsx)(A,{selected:"codex"===_,onSelect:()=>H("codex"),icon:(0,l.jsx)(m.A,{className:"h-5 w-5"}),title:w("step1.codexTitle"),description:w("step1.codexDescription"),installLinkLabel:w("step1.installLink"),status:O.codexAvailable?{ok:!0,hint:null!=(s=O.codexVersion)?s:w("step1.codexReady")}:{ok:!1,hint:w("step1.codexMissing"),link:"https://github.com/openai/codex"}}),(0,l.jsx)(A,{selected:"ollama"===_,onSelect:()=>H("ollama"),icon:(0,l.jsx)(x,{className:"h-5 w-5"}),title:w("step1.ollamaTitle"),description:w("step1.ollamaDescription"),installLinkLabel:w("step1.installLink"),status:O.ollamaAvailable?{ok:!0,hint:w("step1.ollamaModels",{count:null!=(r=O.ollamaModels)?r:"?"})}:{ok:!1,hint:w("step1.ollamaMissing"),link:"https://ollama.com/download"}})]})]}),2===M&&(0,l.jsxs)(k,{children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold",children:w("step2.title")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:w("step2.description")}),(0,l.jsx)("ul",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:g.map(e=>{let t=F.has(e.id);return(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",onClick:()=>{let t=new Set(F);t.has(e.id)?t.delete(e.id):t.add(e.id),q(t)},className:"w-full text-left rounded-lg border p-3 transition "+(t?"border-violet-500 bg-violet-50 dark:bg-violet-950/40":"hover:bg-accent"),children:(0,l.jsxs)("div",{className:"flex items-start gap-2",children:[(0,l.jsx)("span",{className:"text-2xl leading-none",children:e.emoji}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"font-medium flex items-center gap-1",children:[e.label,t&&(0,l.jsx)(u.A,{className:"h-3.5 w-3.5 text-violet-600"})]}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground leading-snug mt-0.5",children:e.description})]})]})})},e.id)})}),(0,l.jsx)("p",{className:"text-[11px] text-muted-foreground",children:w("step2.folderHint")})]}),3===M&&(0,l.jsxs)(k,{children:[(0,l.jsx)("h1",{className:"text-2xl font-semibold",children:w("step3.title")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:w("step3.description")}),(0,l.jsxs)("ul",{className:"text-sm space-y-1",children:[(0,l.jsxs)("li",{className:"flex items-center gap-2",children:[(0,l.jsx)(u.A,{className:"h-4 w-4 text-emerald-600"}),w("step3.profileLabel")," ",(0,l.jsx)("strong",{children:S})," \xb7 ",z," \xb7 ",D||w("step3.empty")]}),(0,l.jsxs)("li",{className:"flex items-center gap-2",children:[(0,l.jsx)(u.A,{className:"h-4 w-4 text-emerald-600"}),w("step3.engineLabel")," ",(0,l.jsx)("strong",{children:"claude"===_?w("step3.engineClaude"):"codex"===_?w("step3.engineCodex"):w("step3.engineOllama")})]}),(0,l.jsxs)("li",{className:"flex items-center gap-2",children:[(0,l.jsx)(u.A,{className:"h-4 w-4 text-emerald-600"}),w("step3.spacesLabel")," ",[...F].map(e=>{var t;return null==(t=g.find(t=>t.id===e))?void 0:t.label}).filter(Boolean).join(" \xb7 ")||w("step3.empty")]})]}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:w("step3.footer")})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[M>0&&(0,l.jsxs)("button",{type:"button",onClick:()=>L(e=>e-1),className:"inline-flex items-center gap-1 rounded border px-3 py-2 text-sm hover:bg-accent",children:[(0,l.jsx)(p,{className:"h-4 w-4"}),w("nav.back")]}),(0,l.jsx)("div",{className:"ml-auto"}),M<3?(0,l.jsxs)("button",{type:"button",onClick:()=>L(e=>e+1),disabled:!U,className:"inline-flex items-center gap-1 rounded bg-violet-600 px-4 py-2 text-sm font-medium text-white hover:bg-violet-700 disabled:opacity-50",children:[w("nav.next"),(0,l.jsx)(h.A,{className:"h-4 w-4"})]}):(0,l.jsxs)("button",{type:"button",onClick:()=>{Z(async()=>{let e=await f({userName:S.trim(),language:z.trim(),timezone:D.trim(),engine:_,templates:[...F]});if(!e.ok){var t;v.oR.error(null!=(t=e.error)?t:w("errors.generic"));return}v.oR.success(w("success.created",{spaces:e.spacesCreated,widgets:e.widgetsCreated})),C.push("/")})},disabled:V,className:"inline-flex items-center gap-1 rounded bg-emerald-600 px-4 py-2 text-sm font-medium text-white hover:bg-emerald-700 disabled:opacity-50",children:[V?(0,l.jsx)(d.A,{className:"h-4 w-4 animate-spin"}):(0,l.jsx)(c.A,{className:"h-4 w-4"}),w("nav.start")]})]})]})})}function k(e){let{children:t}=e;return(0,l.jsx)("section",{className:"rounded-xl border bg-card p-6 shadow-sm space-y-4",children:t})}function y(e){let{current:t}=e;return(0,l.jsx)("div",{className:"flex items-center gap-1",children:[0,1,2,3].map(e=>(0,l.jsx)("div",{className:"h-1 flex-1 rounded-full "+(e<=t?"bg-violet-600":"bg-muted")},e))})}function A(e){let{selected:t,onSelect:s,icon:a,title:i,description:n,status:c,installLinkLabel:d}=e;return(0,l.jsxs)("button",{type:"button",onClick:s,className:"w-full text-left rounded-lg border p-3 transition flex items-start gap-3 "+(t?"border-violet-500 bg-violet-50 dark:bg-violet-950/40":"hover:bg-accent"),children:[(0,l.jsx)("div",{className:"mt-0.5 text-violet-600",children:a}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"font-medium flex items-center gap-2",children:[i,t&&(0,l.jsx)(u.A,{className:"h-3.5 w-3.5 text-violet-600"})]}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground leading-snug mt-0.5",children:n}),(0,l.jsxs)("div",{className:"mt-1.5 inline-flex items-center gap-1 text-[11px] "+(c.ok?"text-emerald-700":"text-amber-700"),children:[c.ok?(0,l.jsx)(u.A,{className:"h-3 w-3"}):(0,l.jsx)(g.A,{className:"h-3 w-3"}),(0,l.jsx)("span",{children:c.hint}),c.link&&(0,l.jsx)("a",{href:c.link,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"underline ml-1",children:d})]})]})]})}},81641:(e,t,s)=>{Promise.resolve().then(s.bind(s,77782))},85924:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(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"}]])},86790:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(45804).A)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])}},e=>{e.O(0,[9776,9411,4933,146,7358],()=>e(e.s=81641)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{43548:(e,r,n)=>{"use strict";n.d(r,{g:()=>s});var i=n(7911);let s=(0,i.createServerReference)("78bd4a9a34ab94026757e3ad90d7b1fcff5adb3ee0",i.callServer,void 0,i.findSourceMapURL,"startTopicAction")},63392:(e,r,n)=>{Promise.resolve().then(n.bind(n,89061)),Promise.resolve().then(n.bind(n,96253)),Promise.resolve().then(n.bind(n,28050)),Promise.resolve().then(n.bind(n,94904)),Promise.resolve().then(n.bind(n,13270)),Promise.resolve().then(n.bind(n,99730)),Promise.resolve().then(n.bind(n,89146)),Promise.resolve().then(n.bind(n,19078)),Promise.resolve().then(n.bind(n,67854)),Promise.resolve().then(n.bind(n,69050)),Promise.resolve().then(n.bind(n,63739)),Promise.resolve().then(n.bind(n,33976)),Promise.resolve().then(n.bind(n,12537)),Promise.resolve().then(n.bind(n,97485)),Promise.resolve().then(n.bind(n,41923)),Promise.resolve().then(n.bind(n,73868)),Promise.resolve().then(n.bind(n,53511)),Promise.resolve().then(n.bind(n,2018)),Promise.resolve().then(n.bind(n,18487)),Promise.resolve().then(n.bind(n,98346)),Promise.resolve().then(n.bind(n,14884)),Promise.resolve().then(n.bind(n,85314)),Promise.resolve().then(n.bind(n,17280)),Promise.resolve().then(n.bind(n,8855)),Promise.resolve().then(n.bind(n,86631)),Promise.resolve().then(n.bind(n,2604)),Promise.resolve().then(n.bind(n,27237)),Promise.resolve().then(n.bind(n,49455)),Promise.resolve().then(n.bind(n,39211)),Promise.resolve().then(n.bind(n,56360)),Promise.resolve().then(n.t.bind(n,54400,23))},88816:(e,r,n)=>{"use strict";n.d(r,{h:()=>s});var i=n(7911);let s=(0,i.createServerReference)("70f145662190e3745f0d75d441768f7392db3f22ea",i.callServer,void 0,i.findSourceMapURL,"generateTopicTitleAction")},89061:(e,r,n)=>{"use strict";n.d(r,{UniversalChatBar:()=>v});var i=n(4624),s=n(99356),t=n(69285),o=n(69709),l=n(95265),d=n(56221),a=n(49411),c=n(43548),m=n(88816),u=n(53063),b=n(63602),h=n(63514);function v(e){var r,n,v;let{spaces:p}=e,f=(0,t.useRouter)(),x=(0,a.c)("app"),[P,g]=(0,s.useState)(null!=(n=null==(r=p[0])?void 0:r.id)?n:""),[w,j]=(0,s.useState)(!1),[,k]=(0,s.useTransition)(),N=(0,s.useRef)(null),S=null!=(v=p.find(e=>e.id===P))?v:p[0];if((0,s.useEffect)(()=>{if(!w)return;let e=e=>{var r;(null==(r=N.current)?void 0:r.contains(e.target))||j(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[w]),!S)return(0,i.jsx)("div",{className:"border-t bg-background",children:(0,i.jsxs)("div",{className:"mx-auto max-w-3xl px-6 py-5 text-center text-xs text-muted-foreground",children:[x("universal.createFirstSpace1")," ",(0,i.jsx)("a",{href:"/onboarding?force=1",className:"underline",children:x("universal.wizardLink")})," ",x("universal.or")," ",(0,i.jsx)("a",{href:"/roots/new",className:"underline",children:x("universal.manualLink")}),"."]})});let L=p.length>1?(0,i.jsxs)("div",{className:"relative",ref:N,children:[(0,i.jsxs)("button",{type:"button",onClick:()=>j(e=>!e),className:"inline-flex items-center gap-1 rounded-full border bg-card/80 px-2 py-0.5 text-[10px] font-medium hover:bg-accent normal-case tracking-normal",title:x("universal.pickSpace"),children:[(0,i.jsx)("span",{className:"text-muted-foreground",children:x("universal.in")}),(0,i.jsx)("span",{children:S.label}),(0,i.jsx)(o.A,{className:"h-3 w-3 text-muted-foreground"})]}),w&&(0,i.jsx)("ul",{className:"absolute bottom-full right-0 mb-1 min-w-[200px] max-h-60 overflow-y-auto rounded-md border bg-popover shadow-lg z-40 py-1",children:p.map(e=>(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",onClick:()=>{g(e.id),j(!1)},className:"block w-full text-left px-3 py-1.5 text-sm hover:bg-accent "+(e.id===S.id?"font-semibold":""),children:e.label})},e.id))})]}):null,y=async e=>await new Promise(r=>{k(async()=>{let n=await (0,c.g)(S.id,e.message,e.attachments);if(!n.ok){d.oR.error(n.error),r(!1);return}(0,h.$d)(h.Zi.topicsChanged(S.id)),e.message.trim()&&(0,m.h)(S.id,n.topicId,e.message).then(e=>{e.ok&&(0,h.$d)(h.Zi.topicsChanged(S.id))}),f.push("/roots/".concat(S.id,"/chat/").concat(n.topicId)),r(!0)})});return(0,i.jsx)(b.E,{label:x("universal.label"),...L?{headerRight:L}:{},children:(0,i.jsx)(u.L,{rootId:S.id,placeholder:x("universal.placeholder"),submitLabel:x("universal.submitLabel"),pendingLabel:x("universal.pendingLabel"),SubmitIcon:l.A,onSubmit:y},S.id)})}}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,2038,6560,4933,146,7358],()=>e(e.s=63392)),_N_E=e.O()}]);
|