skypilot-nightly 1.0.0.dev20250628__py3-none-any.whl → 1.0.0.dev20250701__py3-none-any.whl
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.
- sky/__init__.py +2 -2
- sky/adaptors/kubernetes.py +7 -0
- sky/backends/cloud_vm_ray_backend.py +3 -3
- sky/client/cli/command.py +1 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/Md3rlE87jmL5uv7gSo8mR/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/1043-1b39779691bb4030.js +1 -0
- sky/dashboard/out/_next/static/chunks/{141-fa5a20cbf401b351.js → 1141-726e5a3f00b67185.js} +2 -2
- sky/dashboard/out/_next/static/chunks/1272-1ef0bf0237faccdb.js +1 -0
- sky/dashboard/out/_next/static/chunks/1664-d65361e92b85e786.js +1 -0
- sky/dashboard/out/_next/static/chunks/{691.fd9292250ab089af.js → 1691.44e378727a41f3b5.js} +2 -2
- sky/dashboard/out/_next/static/chunks/{871-e547295e7e21399c.js → 1871-80dea41717729fa5.js} +1 -1
- sky/dashboard/out/_next/static/chunks/2544.27f70672535675ed.js +1 -0
- sky/dashboard/out/_next/static/chunks/{875.52c962183328b3f2.js → 2875.c24c6d57dc82e436.js} +1 -1
- sky/dashboard/out/_next/static/chunks/3256.7257acd01b481bed.js +11 -0
- sky/dashboard/out/_next/static/chunks/3698-52ad1ca228faa776.js +1 -0
- sky/dashboard/out/_next/static/chunks/3785.b3cc2bc1d49d2c3c.js +1 -0
- sky/dashboard/out/_next/static/chunks/3937.d7f1c55d1916c7f2.js +1 -0
- sky/dashboard/out/_next/static/chunks/{947-6620842ef80ae879.js → 3947-b059261d6fa88a1f.js} +1 -1
- sky/dashboard/out/_next/static/chunks/{697.6460bf72e760addd.js → 4697.f5421144224da9fc.js} +1 -1
- sky/dashboard/out/_next/static/chunks/4725.4c849b1e05c8e9ad.js +1 -0
- sky/dashboard/out/_next/static/chunks/5230-df791914b54d91d9.js +1 -0
- sky/dashboard/out/_next/static/chunks/{491.b3d264269613fe09.js → 5491.918ffed0ba7a5294.js} +1 -1
- sky/dashboard/out/_next/static/chunks/5739-5ea3ffa10fc884f2.js +8 -0
- sky/dashboard/out/_next/static/chunks/616-162f3033ffcd3d31.js +39 -0
- sky/dashboard/out/_next/static/chunks/6601-fcfad0ddf92ec7ab.js +1 -0
- sky/dashboard/out/_next/static/chunks/6989-6ff4e45dfb49d11d.js +1 -0
- sky/dashboard/out/_next/static/chunks/6990-d0dc765474fa0eca.js +1 -0
- sky/dashboard/out/_next/static/chunks/8969-909d53833da080cb.js +1 -0
- sky/dashboard/out/_next/static/chunks/8982.a2e214068f30a857.js +1 -0
- sky/dashboard/out/_next/static/chunks/{25.76c246239df93d50.js → 9025.a7c44babfe56ce09.js} +2 -2
- sky/dashboard/out/_next/static/chunks/{938-0a770415b5ce4649.js → 938-044ad21de8b4626b.js} +1 -1
- sky/dashboard/out/_next/static/chunks/9470-21d059a1dfa03f61.js +1 -0
- sky/dashboard/out/_next/static/chunks/9984.739ae958a066298d.js +1 -0
- sky/dashboard/out/_next/static/chunks/fd9d1056-61f2257a9cd8b32b.js +1 -0
- sky/dashboard/out/_next/static/chunks/{framework-87d061ee6ed71b28.js → framework-efc06c2733009cd3.js} +1 -1
- sky/dashboard/out/_next/static/chunks/main-app-68c028b1bc5e1b72.js +1 -0
- sky/dashboard/out/_next/static/chunks/{main-e0e2335212e72357.js → main-c0a4f1ea606d48d2.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{_app-050a9e637b057b24.js → _app-a37b06ddb64521fd.js} +2 -2
- sky/dashboard/out/_next/static/chunks/pages/_error-c72a1f77a3c0be1b.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-8135aba0712bda37.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/{[cluster]-77d4816945b04793.js → [cluster]-b8e1114e6d38218c.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters-9744c271a1642f76.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/config-a2673b256b6d416f.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/index-927ddeebe57a8ac3.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/infra/[context]-8b0809f59034d509.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/infra-ae9d2f705ce582c9.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-c4d5cfac7fbc0668.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs-5bbdc71878f0a068.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/users-cd43fb3c122eedde.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/volumes-4ebf6484f7216387.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspace/new-5629d4e551dba1ee.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-7c0187f43757a548.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspaces-06bde99155fa6292.js +1 -0
- sky/dashboard/out/_next/static/chunks/webpack-d427db53e54de9ce.js +1 -0
- sky/dashboard/out/_next/static/css/0da6afe66176678a.css +3 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/volumes.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/jobs/controller.py +4 -0
- sky/jobs/server/core.py +5 -9
- sky/jobs/state.py +820 -670
- sky/jobs/utils.py +7 -15
- sky/optimizer.py +46 -0
- sky/provision/__init__.py +14 -6
- sky/provision/kubernetes/constants.py +9 -0
- sky/provision/kubernetes/instance.py +17 -14
- sky/provision/kubernetes/volume.py +77 -15
- sky/server/common.py +1 -0
- sky/server/server.py +37 -15
- sky/setup_files/dependencies.py +2 -0
- sky/skylet/constants.py +1 -0
- sky/task.py +13 -1
- sky/utils/dag_utils.py +4 -2
- sky/utils/log_utils.py +68 -0
- sky/volumes/server/core.py +103 -78
- sky/volumes/utils.py +22 -5
- {skypilot_nightly-1.0.0.dev20250628.dist-info → skypilot_nightly-1.0.0.dev20250701.dist-info}/METADATA +4 -1
- {skypilot_nightly-1.0.0.dev20250628.dist-info → skypilot_nightly-1.0.0.dev20250701.dist-info}/RECORD +96 -94
- sky/dashboard/out/_next/static/ZYLkkWSYZjJhLVsObh20y/_buildManifest.js +0 -1
- sky/dashboard/out/_next/static/chunks/230-d6e363362017ff3a.js +0 -1
- sky/dashboard/out/_next/static/chunks/43-f38a531f6692f281.js +0 -1
- sky/dashboard/out/_next/static/chunks/470-92dd1614396389be.js +0 -1
- sky/dashboard/out/_next/static/chunks/544.110e53813fb98e2e.js +0 -1
- sky/dashboard/out/_next/static/chunks/601-111d06d9ded11d00.js +0 -1
- sky/dashboard/out/_next/static/chunks/616-50a620ac4a23deb4.js +0 -39
- sky/dashboard/out/_next/static/chunks/645.961f08e39b8ce447.js +0 -1
- sky/dashboard/out/_next/static/chunks/664-047bc03493fda379.js +0 -1
- sky/dashboard/out/_next/static/chunks/785.3446c12ffdf3d188.js +0 -1
- sky/dashboard/out/_next/static/chunks/798-c0525dc3f21e488d.js +0 -1
- sky/dashboard/out/_next/static/chunks/799-3625946b2ec2eb30.js +0 -8
- sky/dashboard/out/_next/static/chunks/937.72796f7afe54075b.js +0 -1
- sky/dashboard/out/_next/static/chunks/969-d3a0b53f728d280a.js +0 -1
- sky/dashboard/out/_next/static/chunks/982.d7bd80ed18cad4cc.js +0 -1
- sky/dashboard/out/_next/static/chunks/984.e8bac186a24e5178.js +0 -1
- sky/dashboard/out/_next/static/chunks/989-db34c16ad7ea6155.js +0 -1
- sky/dashboard/out/_next/static/chunks/990-0ad5ea1699e03ee8.js +0 -1
- sky/dashboard/out/_next/static/chunks/fd9d1056-2821b0f0cabcd8bd.js +0 -1
- sky/dashboard/out/_next/static/chunks/main-app-241eb28595532291.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-21080826c6095f21.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/clusters-65b2c90320b8afb8.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/config-6b255eae088da6a3.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/index-6b0d9e5031b70c58.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/infra/[context]-b302aea4d65766bf.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/infra-ee8cc4d449945d19.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-64bdc0b2d3a44709.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/jobs-df7407b5e37d3750.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/users-d7684eaa04c4f58f.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/volumes-476b670ef33d1ecd.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/workspace/new-5b59bce9eb208d84.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces/[name]-04e1b3ad4207b1e9.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-c470366a6179f16e.js +0 -1
- sky/dashboard/out/_next/static/chunks/webpack-75a3310ef922a299.js +0 -1
- sky/dashboard/out/_next/static/css/605ac87514049058.css +0 -3
- /sky/dashboard/out/_next/static/{ZYLkkWSYZjJhLVsObh20y → Md3rlE87jmL5uv7gSo8mR}/_ssgManifest.js +0 -0
- /sky/dashboard/out/_next/static/chunks/{804-4c9fc53aa74bc191.js → 804-9f5e98ce84d46bdd.js} +0 -0
- {skypilot_nightly-1.0.0.dev20250628.dist-info → skypilot_nightly-1.0.0.dev20250701.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250628.dist-info → skypilot_nightly-1.0.0.dev20250701.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250628.dist-info → skypilot_nightly-1.0.0.dev20250701.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250628.dist-info → skypilot_nightly-1.0.0.dev20250701.dist-info}/top_level.txt +0 -0
sky/__init__.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Optional
|
|
5
5
|
import urllib.request
|
6
6
|
|
7
7
|
# Replaced with the current commit when building the wheels.
|
8
|
-
_SKYPILOT_COMMIT_SHA = '
|
8
|
+
_SKYPILOT_COMMIT_SHA = 'ec4a6d383dc1bb39afaf344d517abf855d01bb50'
|
9
9
|
|
10
10
|
|
11
11
|
def _get_git_commit():
|
@@ -35,7 +35,7 @@ def _get_git_commit():
|
|
35
35
|
|
36
36
|
|
37
37
|
__commit__ = _get_git_commit()
|
38
|
-
__version__ = '1.0.0.
|
38
|
+
__version__ = '1.0.0.dev20250701'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/adaptors/kubernetes.py
CHANGED
@@ -162,6 +162,13 @@ def core_api(context: Optional[str] = None):
|
|
162
162
|
return kubernetes.client.CoreV1Api()
|
163
163
|
|
164
164
|
|
165
|
+
@_api_logging_decorator('urllib3', logging.ERROR)
|
166
|
+
@annotations.lru_cache(scope='request')
|
167
|
+
def storage_api(context: Optional[str] = None):
|
168
|
+
_load_config(context)
|
169
|
+
return kubernetes.client.StorageV1Api()
|
170
|
+
|
171
|
+
|
165
172
|
@_api_logging_decorator('urllib3', logging.ERROR)
|
166
173
|
@annotations.lru_cache(scope='request')
|
167
174
|
def auth_api(context: Optional[str] = None):
|
@@ -3209,9 +3209,9 @@ class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
|
|
3209
3209
|
self._open_ports(handle)
|
3210
3210
|
|
3211
3211
|
# Capture task YAML and command
|
3212
|
-
|
3212
|
+
task_config_redacted = None
|
3213
3213
|
if task is not None:
|
3214
|
-
|
3214
|
+
task_config_redacted = task.to_yaml_config(redact_secrets=True)
|
3215
3215
|
|
3216
3216
|
with timeline.Event('backend.provision.post_process'):
|
3217
3217
|
global_user_state.add_or_update_cluster(
|
@@ -3220,7 +3220,7 @@ class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
|
|
3220
3220
|
set(task.resources),
|
3221
3221
|
ready=True,
|
3222
3222
|
config_hash=config_hash,
|
3223
|
-
task_config=
|
3223
|
+
task_config=task_config_redacted,
|
3224
3224
|
)
|
3225
3225
|
usage_lib.messages.usage.update_final_cluster_status(
|
3226
3226
|
status_lib.ClusterStatus.UP)
|
sky/client/cli/command.py
CHANGED
@@ -3985,8 +3985,7 @@ def volumes_delete(names: List[str], all: bool, yes: bool, async_call: bool): #
|
|
3985
3985
|
'sky.volumes.delete')
|
3986
3986
|
except Exception as e: # pylint: disable=broad-except
|
3987
3987
|
logger.error(f'{colorama.Fore.RED}Error deleting volumes {names}: '
|
3988
|
-
f'{
|
3989
|
-
f'{colorama.Style.RESET_ALL}')
|
3988
|
+
f'{str(e)}{colorama.Style.RESET_ALL}')
|
3990
3989
|
|
3991
3990
|
|
3992
3991
|
@cli.group(cls=_NaturalOrderGroup)
|
sky/dashboard/out/404.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/dashboard/_next/static/css/0da6afe66176678a.css" as="style"/><link rel="stylesheet" href="/dashboard/_next/static/css/0da6afe66176678a.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/dashboard/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/dashboard/_next/static/chunks/webpack-d427db53e54de9ce.js" defer=""></script><script src="/dashboard/_next/static/chunks/framework-efc06c2733009cd3.js" defer=""></script><script src="/dashboard/_next/static/chunks/main-c0a4f1ea606d48d2.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_app-a37b06ddb64521fd.js" defer=""></script><script src="/dashboard/_next/static/chunks/pages/_error-c72a1f77a3c0be1b.js" defer=""></script><script src="/dashboard/_next/static/Md3rlE87jmL5uv7gSo8mR/_buildManifest.js" defer=""></script><script src="/dashboard/_next/static/Md3rlE87jmL5uv7gSo8mR/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"Md3rlE87jmL5uv7gSo8mR","assetPrefix":"/dashboard","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
@@ -0,0 +1 @@
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,f,u,n,r,i,b,d,j,k,o){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":["static/chunks/pages/index-927ddeebe57a8ac3.js"],"/_error":["static/chunks/pages/_error-c72a1f77a3c0be1b.js"],"/clusters":["static/chunks/pages/clusters-9744c271a1642f76.js"],"/clusters/[cluster]":[s,c,a,e,t,r,b,f,u,n,d,i,j,k,o,"static/chunks/1871-80dea41717729fa5.js","static/chunks/pages/clusters/[cluster]-b8e1114e6d38218c.js"],"/clusters/[cluster]/[job]":[s,c,a,e,t,f,u,n,"static/chunks/pages/clusters/[cluster]/[job]-8135aba0712bda37.js"],"/config":["static/chunks/pages/config-a2673b256b6d416f.js"],"/infra":["static/chunks/pages/infra-ae9d2f705ce582c9.js"],"/infra/[context]":["static/chunks/pages/infra/[context]-8b0809f59034d509.js"],"/jobs":["static/chunks/pages/jobs-5bbdc71878f0a068.js"],"/jobs/[job]":[s,c,a,e,t,r,f,u,n,i,"static/chunks/pages/jobs/[job]-c4d5cfac7fbc0668.js"],"/users":["static/chunks/pages/users-cd43fb3c122eedde.js"],"/volumes":["static/chunks/pages/volumes-4ebf6484f7216387.js"],"/workspace/new":["static/chunks/pages/workspace/new-5629d4e551dba1ee.js"],"/workspaces":["static/chunks/pages/workspaces-06bde99155fa6292.js"],"/workspaces/[name]":[s,c,a,e,t,r,b,f,u,n,d,i,j,k,o,"static/chunks/1141-726e5a3f00b67185.js","static/chunks/pages/workspaces/[name]-7c0187f43757a548.js"],sortedPages:["/","/_app","/_error","/clusters","/clusters/[cluster]","/clusters/[cluster]/[job]","/config","/infra","/infra/[context]","/jobs","/jobs/[job]","/users","/volumes","/workspace/new","/workspaces","/workspaces/[name]"]}}("static/chunks/616-162f3033ffcd3d31.js","static/chunks/5230-df791914b54d91d9.js","static/chunks/5739-5ea3ffa10fc884f2.js","static/chunks/1664-d65361e92b85e786.js","static/chunks/804-9f5e98ce84d46bdd.js","static/chunks/6989-6ff4e45dfb49d11d.js","static/chunks/3698-52ad1ca228faa776.js","static/chunks/9470-21d059a1dfa03f61.js","static/chunks/1272-1ef0bf0237faccdb.js","static/chunks/8969-909d53833da080cb.js","static/chunks/3947-b059261d6fa88a1f.js","static/chunks/6990-d0dc765474fa0eca.js","static/chunks/1043-1b39779691bb4030.js","static/chunks/6601-fcfad0ddf92ec7ab.js","static/chunks/938-044ad21de8b4626b.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1043],{326:function(e,t,a){a.d(t,{$N:function(){return p},Be:function(){return _},Vq:function(){return c},cN:function(){return f},cZ:function(){return d},fK:function(){return g}});var r=a(5893),s=a(7294),o=a(6327),n=a(2350),l=a(3767);let c=o.fC;o.xz;let u=o.h_;o.x8;let i=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(o.aV,{ref:t,className:(0,n.cn)("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s})});i.displayName=o.aV.displayName;let d=s.forwardRef((e,t)=>{let{className:a,children:s,...c}=e;return(0,r.jsxs)(u,{children:[(0,r.jsx)(i,{}),(0,r.jsxs)(o.VY,{ref:t,className:(0,n.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...c,children:[s,(0,r.jsxs)(o.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500",children:[(0,r.jsx)(l.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});d.displayName=o.VY.displayName;let g=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,n.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};g.displayName="DialogHeader";let f=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,n.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};f.displayName="DialogFooter";let p=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(o.Dx,{ref:t,className:(0,n.cn)("text-lg font-semibold leading-none tracking-tight",a),...s})});p.displayName=o.Dx.displayName;let _=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)(o.dk,{ref:t,className:(0,n.cn)("text-sm text-gray-500",a),...s})});_.displayName=o.dk.displayName},3266:function(e,t,a){a.d(t,{QL:function(){return g},Sl:function(){return i},getClusters:function(){return c},uR:function(){return u}});var r=a(7294),s=a(5821),o=a(7145),n=a(6378);let l={UP:"RUNNING",STOPPED:"STOPPED",INIT:"LAUNCHING",null:"TERMINATED"};async function c(){let{clusterNames:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return(await o.x.fetch("/status",{cluster_names:e,all_users:!0})).map(e=>{let t="",a=t=e.zone?e.zone:e.region;return t&&t.length>25&&(t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;if(!e||e.length<=t)return e;if(t<=3)return"...";let a=Math.floor((t-3)/2),r=a+(t-3)%2;return 0===a?e.substring(0,r)+"...":e.substring(0,r)+"..."+e.substring(e.length-a)}(t,25)),{status:l[e.status],cluster:e.name,user:e.user_name,user_hash:e.user_hash,cloud:e.cloud,region:e.region,infra:t?e.cloud+" ("+t+")":e.cloud,full_infra:a?"".concat(e.cloud," (").concat(a,")"):e.cloud,cpus:e.cpus,mem:e.memory,gpus:e.accelerators,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:new Date(1e3*e.launched_at),num_nodes:e.nodes,workspace:e.workspace,autostop:e.autostop,to_down:e.to_down,jobs:[],command:e.last_creation_command||e.last_use,task_yaml:e.last_creation_yaml||"{}",events:[{time:new Date(1e3*e.launched_at),event:"Cluster created."}]}})}catch(e){return console.error("Error fetching clusters:",e),[]}}async function u(){try{let e=await o.x.fetch("/cost_report",{days:30});console.log("Raw cluster history data:",e);let t=e.map(e=>{let t="Unknown";e.cloud?t=e.cloud:e.resources&&e.resources.cloud&&(t=e.resources.cloud);let a=e.user_name||"-";return{status:e.status?l[e.status]:"TERMINATED",cluster:e.name,user:a,user_hash:e.user_hash,cloud:t,region:"",infra:t,full_infra:t,resources_str:e.resources_str,resources_str_full:e.resources_str_full,time:e.launched_at?new Date(1e3*e.launched_at):null,num_nodes:e.num_nodes||1,duration:e.duration,total_cost:e.total_cost,workspace:e.workspace||"default",autostop:-1,to_down:!1,cluster_hash:e.cluster_hash,usage_intervals:e.usage_intervals,command:e.last_creation_command||"",task_yaml:e.last_creation_yaml||"{}",events:[{time:e.launched_at?new Date(1e3*e.launched_at):new Date,event:"Cluster created."}]}});return console.log("Processed cluster history data:",t),t}catch(e){return console.error("Error fetching cluster history:",e),[]}}async function i(e){let{clusterName:t,jobId:a,onNewLog:r,workspace:n}=e;try{await o.x.stream("/logs",{follow:!1,cluster_name:t,job_id:a,override_skypilot_config:{active_workspace:n||"default"}},r)}catch(e){console.error("Error in streamClusterJobLogs:",e),(0,s.C)("Error in streamClusterJobLogs: ".concat(e.message),"error")}}async function d(e){let{clusterName:t,workspace:a}=e;try{return(await o.x.fetch("/queue",{cluster_name:t,all_users:!0,override_skypilot_config:{active_workspace:a}})).map(e=>{let r=e.end_at?e.end_at:Date.now()/1e3,s=0,o=0;return e.submitted_at&&(s=r-e.submitted_at),e.start_at&&(o=r-e.start_at),{id:e.job_id,status:e.status,job:e.job_name,user:e.username,user_hash:e.user_hash,gpus:e.accelerators||{},submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,resources:e.resources,cluster:t,total_duration:s,job_duration:o,infra:"",logs:"",workspace:a||"default"}})}catch(e){return console.error("Error fetching cluster jobs:",e),[]}}function g(e){let{cluster:t,job:a=null}=e,[s,o]=(0,r.useState)(null),[l,u]=(0,r.useState)(null),[i,g]=(0,r.useState)(!0),[f,p]=(0,r.useState)(!0),_=(0,r.useCallback)(async()=>{if(t)try{g(!0);let e=await n.default.get(c,[{clusterNames:[t]}]);return o(e[0]),e[0]}catch(e){console.error("Error fetching cluster data:",e)}finally{g(!1)}return null},[t]),h=(0,r.useCallback)(async e=>{if(t)try{p(!0);let a=await n.default.get(d,[{clusterName:t,workspace:e||"default"}]);u(a)}catch(e){console.error("Error fetching cluster job data:",e)}finally{p(!1)}},[t]),m=(0,r.useCallback)(async()=>{n.default.invalidate(c,[{clusterNames:[t]}]);let e=await _();e&&(n.default.invalidate(d,[{clusterName:t,workspace:e.workspace||"default"}]),await h(e.workspace))},[_,h,t]),b=(0,r.useCallback)(async()=>{s&&(n.default.invalidate(d,[{clusterName:t,workspace:s.workspace||"default"}]),await h(s.workspace))},[h,s,t]);return(0,r.useEffect)(()=>{(async()=>{let e=await _();e&&h(e.workspace)})()},[t,a,_,h]),{clusterData:s,clusterJobData:l,loading:i,clusterDetailsLoading:i,clusterJobsLoading:f,refreshData:m,refreshClusterJobsOnly:b}}},2045:function(e,t,a){a.d(t,{l4:function(){return n}});var r=a(3225),s=a(7145);async function o(e,t){try{let a=[];try{let e=await s.x.get("/enabled_clouds"),t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("X-Request-ID"),r=await s.x.get("/api/get?request_id=".concat(t)),o=await r.json();a=o.return_value?JSON.parse(o.return_value):[],console.log("Enabled clouds:",a)}catch(e){console.error("Error fetching enabled clouds:",e),a=[]}let o={};r.$m.forEach(e=>{let t=a.includes(e.toLowerCase());o[e]={name:e,clusters:0,jobs:0,enabled:t}}),e.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].clusters+=1,o[t].enabled=!0)}}),t.forEach(e=>{if(e.cloud){let t=e.cloud;o[t]&&(o[t].jobs+=1,o[t].enabled=!0)}});let n=r.$m.length,l=Object.values(o).filter(e=>e.enabled).length;return{clouds:Object.values(o).filter(e=>e.enabled).sort((e,t)=>t.clusters-e.clusters||t.jobs-e.jobs),totalClouds:n,enabledClouds:l}}catch(e){return console.error("Error fetching cloud infrastructure:",e),{clouds:[],totalClouds:r.$m.length,enabledClouds:0}}}async function n(){let{getClusters:e}=await Promise.resolve().then(a.bind(a,3266)),{getManagedJobs:t}=await Promise.resolve().then(a.bind(a,8969)),r=(await Promise.resolve().then(a.bind(a,6378))).default,[s,n]=await Promise.all([r.get(e),r.get(t,[{allUsers:!0}])]),c=s||[],u=(null==n?void 0:n.jobs)||[],[i,d]=await Promise.all([l(c,u),o(c,u)]);return{gpuData:i,cloudData:d}}async function l(e,t){return await g({clusters:e||[],jobs:t||[]})}async function c(){try{let e=await s.x.post("/realtime_kubernetes_gpu_availability",{context:null,name_filter:null,quantity_filter:null});if(!e.ok)return console.error("Error fetching Kubernetes context GPUs (in getKubernetesContextGPUs): ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for Kubernetes GPU availability (in getKubernetesContextGPUs)"),[];let a=await s.x.get("/api/get?request_id=".concat(t)),r=await a.text();if(500===a.status){try{let e=JSON.parse(r);if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("[infra.jsx] getKubernetesContextGPUs: Server error detail:",t.message)}catch(t){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing server error JSON:",t,"Original error text:",e.detail.error)}}catch(e){console.error("[infra.jsx] getKubernetesContextGPUs: Error parsing 500 error response JSON:",e,"Raw text was:",r)}return[]}let o=JSON.parse(r);return o.return_value?JSON.parse(o.return_value):[]}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesContextGPUs:",e),[]}}async function u(){try{let e=await s.x.get("/all_contexts");if(!e.ok)return console.error("Error fetching all contexts: ".concat(e.status," ").concat(e.statusText)),[];let t=e.headers.get("X-Skypilot-Request-ID")||e.headers.get("x-request-id");if(!t)return console.error("No request ID returned for /all_contexts"),[];let a=await s.x.get("/api/get?request_id=".concat(t)),r=await a.json();return r.return_value?JSON.parse(r.return_value):[]}catch(e){return console.error("[infra.jsx] Error in getAllContexts:",e),[]}}async function i(e){try{let t=await s.x.post("/kubernetes_node_info",{context:e}),a=t.headers.get("X-Skypilot-Request-ID")||t.headers.get("x-request-id"),r=await s.x.get("/api/get?request_id=".concat(a));if(500===r.status){try{let e=await r.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);console.error("Error fetching Kubernetes per node GPUs:",t.message)}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{}}let o=await r.json();return(o.return_value?JSON.parse(o.return_value):{}).node_info_dict||{}}catch(t){return console.error("[infra.jsx] Error in getKubernetesPerNodeGPUs for context",e,":",t),{}}}async function d(e){try{let t=e.clusters,a=e.jobs,r={};return t.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(r[t]||(r[t]={clusters:0,jobs:0}),r[t].clusters+=1)}),a.forEach(e=>{let t=null;if("Kubernetes"===e.cloud)(t=e.region)&&(t="kubernetes/".concat(t));else if("SSH"===e.cloud&&(t=e.region)){let e=t.startsWith("ssh-")?t.substring(4):t;t="ssh/".concat(e)}t&&(r[t]||(r[t]={clusters:0,jobs:0}),r[t].jobs+=1)}),r}catch(e){return console.error("=== Error in getContextClustersAndJobs ===",e),{}}}async function g(e){try{let o=await u();if(!o||0===o.length)return console.log("No contexts found from /all_contexts endpoint."),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}};let n=await d(e),l=await c(),g=new Map;l&&l.forEach(e=>{g.set(e[0],e[1])});let f={},p={},_={};for(let e of o){p[e]||(p[e]=[]);let o=g.get(e);if(o&&o.length>0)for(let t of o){let a=t[0],r=t[1].join(", "),s=t[2],o=t[3];a in f?(f[a].gpu_total+=s,f[a].gpu_free+=o):f[a]={gpu_total:s,gpu_free:o,gpu_name:a},p[e].push({gpu_name:a,gpu_requestable_qty_per_node:r,gpu_total:s,gpu_free:o,context:e})}let n=await i(e);if(n&&Object.keys(n).length>0)for(let o in n){var t,a,r,s;let l=n[o],c=l.accelerator_type||"-",u=null!==(r=null===(t=l.total)||void 0===t?void 0:t.accelerator_count)&&void 0!==r?r:0,i=null!==(s=null===(a=l.free)||void 0===a?void 0:a.accelerators_available)&&void 0!==s?s:0;_["".concat(e,"/").concat(o)]={node_name:l.name,gpu_name:c,gpu_total:u,gpu_free:i,ip_address:l.ip_address||null,context:e},"-"===c||p[e].some(e=>e.gpu_name===c)||(c in f||(f[c]={gpu_total:0,gpu_free:0,gpu_name:c}),p[e].find(e=>e.gpu_name===c)||p[e].push({gpu_name:c,gpu_requestable_qty_per_node:"-",gpu_total:0,gpu_free:0,context:e}))}0===p[e].length&&n&&Object.keys(n).length}return{allContextNames:o.sort(),allGPUs:Object.values(f).sort((e,t)=>e.gpu_name.localeCompare(t.gpu_name)),perContextGPUs:Object.values(p).flat().sort((e,t)=>e.context.localeCompare(t.context)||e.gpu_name.localeCompare(t.gpu_name)),perNodeGPUs:Object.values(_).sort((e,t)=>e.context.localeCompare(t.context)||e.node_name.localeCompare(t.node_name)||e.gpu_name.localeCompare(t.gpu_name)),contextStats:n}}catch(e){return console.error("[infra.jsx] Outer error in getKubernetesGPUs:",e),{allContextNames:[],allGPUs:[],perContextGPUs:[],perNodeGPUs:[],contextStats:{}}}}},3081:function(e,t,a){a.d(t,{R:function(){return s}}),a(3266),a(8969);var r=a(7145);async function s(){try{let e=await r.x.get("/users");if(!e.ok)throw Error("HTTP error! status: ".concat(e.status));return(await e.json()).map(e=>({userId:e.id,username:e.name,role:e.role}))||[]}catch(e){return console.error("Failed to fetch users:",e),[]}}},9238:function(e,t,a){a.d(t,{C:function(){return s},w:function(){return o}});var r=a(7145);async function s(){try{return(await r.x.fetch("/volumes",{},"GET")).map(e=>{var t,a,r;let s=e.cloud||"";return e.region&&(s+="/".concat(e.region)),e.zone&&(s+="/".concat(e.zone)),{name:e.name,launched_at:e.launched_at,user_hash:e.user_hash,user_name:e.user_name||"-",workspace:e.workspace||"-",last_attached_at:e.last_attached_at,status:e.status,type:e.type,cloud:e.cloud,region:e.region,zone:e.zone,infra:s,size:"".concat(e.size,"Gi"),config:e.config,storage_class:(null===(t=e.config)||void 0===t?void 0:t.storage_class_name)||"-",access_mode:(null===(a=e.config)||void 0===a?void 0:a.access_mode)||"-",namespace:(null===(r=e.config)||void 0===r?void 0:r.namespace)||"-",name_on_cloud:e.name_on_cloud,usedby_pods:e.usedby_pods,usedby_clusters:e.usedby_clusters}})||[]}catch(e){return console.error("Failed to fetch volumes:",e),[]}}async function o(e){let t="";try{let a=(await r.x.post("/volumes/delete",{names:[e]})).headers.get("X-Request-ID"),s=await r.x.get("/api/get?request_id=".concat(a));if(500===s.status){try{let e=await s.json();if(e.detail&&e.detail.error)try{t=JSON.parse(e.detail.error).message}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{success:!1,msg:t}}return{success:!0}}catch(e){return console.error("Failed to delete volume:",e),{success:!1,msg:e.message}}}},6856:function(e,t,a){var r=a(6378),s=a(3266),o=a(8969),n=a(7324),l=a(3081),c=a(2045),u=a(9238);let i={base:{getClusters:{fn:s.getClusters,args:[]},getClusterHistory:{fn:s.uR,args:[]},getManagedJobs:{fn:o.getManagedJobs,args:[{allUsers:!0}]},getWorkspaces:{fn:n.fX,args:[]},getUsers:{fn:l.R,args:[]},getInfraData:{fn:c.l4,args:[]},getVolumes:{fn:u.C,args:[]}},dynamic:{getEnabledClouds:{fn:n.yz,requiresWorkspaces:!0}},pages:{clusters:["getClusters","getClusterHistory","getWorkspaces","getUsers"],jobs:["getManagedJobs","getClusters","getWorkspaces","getUsers"],infra:["getInfraData","getClusters","getManagedJobs"],workspaces:["getWorkspaces","getClusters","getManagedJobs","getEnabledClouds"],users:["getUsers","getClusters","getManagedJobs"],volumes:["getVolumes"]}};class d{async preloadForPage(e,t){let{backgroundPreload:a=!0,force:r=!1}=t||{};if(!i.pages[e]){console.warn("Unknown page: ".concat(e));return}console.log("[CachePreloader] Preloading cache for page: ".concat(e));try{await this._loadPageData(e,r),a&&this._backgroundPreloadOtherPages(e)}catch(t){console.error("[CachePreloader] Error preloading for page ".concat(e,":"),t)}}async _loadPageData(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=i.pages[e],s=[];for(let e of a)if(i.base[e]){let{fn:a,args:o}=i.base[e];t&&r.default.invalidate(a,o),s.push(r.default.get(a,o))}else"getEnabledClouds"===e&&s.push(this._loadEnabledCloudsForAllWorkspaces(t));await Promise.allSettled(s),console.log("[CachePreloader] Loaded data for page: ".concat(e))}async _loadEnabledCloudsForAllWorkspaces(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{e&&r.default.invalidate(n.fX);let t=await r.default.get(n.fX),a=Object.keys(t||{}).map(t=>(e&&r.default.invalidate(n.yz,[t]),r.default.get(n.yz,[t])));await Promise.allSettled(a)}catch(e){console.error("[CachePreloader] Error loading enabled clouds:",e)}}_backgroundPreloadOtherPages(e){if(this.isPreloading)return;this.isPreloading=!0;let t=Object.keys(i.pages).filter(t=>t!==e);console.log("[CachePreloader] Background preloading pages: ".concat(t.join(", "))),Promise.allSettled(t.map(async e=>{try{await this._loadPageData(e,!1),console.log("[CachePreloader] Background loaded: ".concat(e))}catch(t){console.error("[CachePreloader] Background load failed for ".concat(e,":"),t)}})).then(()=>{this.isPreloading=!1,console.log("[CachePreloader] Background preloading complete")})}async preloadBaseFunctions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];console.log("[CachePreloader] Preloading all base functions");let t=Object.entries(i.base).map(t=>{let[a,{fn:s,args:o}]=t;return e&&r.default.invalidate(s,o),r.default.get(s,o).catch(e=>{console.error("[CachePreloader] Failed to preload ".concat(a,":"),e)})});await Promise.allSettled(t),console.log("[CachePreloader] Base functions preloaded")}getCacheStats(){return{...r.default.getStats(),isPreloading:this.isPreloading}}clearCache(){r.default.clear(),this.isPreloading=!1,this.preloadPromises.clear(),console.log("[CachePreloader] Cache cleared")}constructor(){this.isPreloading=!1,this.preloadPromises=new Map}}let g=new d;t.ZP=g}}]);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1141],{9333:function(e,s,l){l.d(s,{Z:function(){return r}});/**
|
2
2
|
* @license lucide-react v0.407.0 - ISC
|
3
3
|
*
|
4
4
|
* This source code is licensed under the ISC license.
|
@@ -8,4 +8,4 @@
|
|
8
8
|
*
|
9
9
|
* This source code is licensed under the ISC license.
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
11
|
-
*/let r=(0,l(998).Z)("Trash",[["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"}]])},1812:function(e,s,l){l.d(s,{X:function(){return n}});var r=l(5893),a=l(7294);let t=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s},n=e=>{let{error:s,title:l="Error",onDismiss:n}=e,[c,i]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:t(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[l,":"]})," ",o]})})]}),(0,r.jsx)("button",{onClick:()=>{i(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9123:function(e,s,l){l.d(s,{g:function(){return n}});var r=l(5893),a=l(7294),t=l(2350);let n=a.forwardRef((e,s)=>{let{className:l,...a}=e;return(0,r.jsx)("textarea",{className:(0,t.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",l),ref:s,...a})});n.displayName="Textarea"},1141:function(e,s,l){l.r(s),l.d(s,{WorkspaceEditor:function(){return R}});var r=l(5893),a=l(7294),t=l(1163),n=l(7324),c=l(3266),i=l(8969);l(9470);var o=l(1664),d=l.n(o),u=l(9008),x=l.n(u),m=l(7673),h=l(803),f=l(9123),g=l(8799),p=l(282),b=l(6021),j=l(3626),y=l(8418),N=l(9333),v=l(326);let w=e=>{let{className:s="",variant:l="default",children:a,...t}=e;return(0,r.jsx)("div",{role:"alert",className:"".concat("relative w-full rounded-lg border p-4 flex items-start space-x-2"," ").concat({default:"bg-blue-50 border-blue-200 text-blue-800",destructive:"bg-red-50 border-red-200 text-red-800"}[l]," ").concat(s),...t,children:a})},k=e=>{let{className:s="",children:l,...a}=e;return(0,r.jsx)("div",{className:"text-sm leading-relaxed ".concat(s),...a,children:l})};var C=l(3850),L=l(1812),S=l(938),E=l(1272),M=l(3225),D=l(3081);let Z=e=>{let{message:s}=e;return s?(0,r.jsxs)(w,{className:"border-green-200 bg-green-50",children:[(0,r.jsx)(p.Z,{className:"h-4 w-4 text-green-600"}),(0,r.jsx)(k,{className:"text-green-800",children:s})]}):null},A=e=>{let{workspaceName:s,config:l,enabledClouds:a=[]}=e;if(!l)return null;let t="default"===s,n=0===Object.keys(l).length;if(t&&n)return(0,r.jsx)("div",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"Workspace 'default' can use all accessible infrastructure."});let c=[],i=[],o=[],d=new Set(a.map(e=>e.toLowerCase()));Object.entries(l).forEach(e=>{let[s,l]=e;if("private"===s||"allowed_users"===s)return;let a=M.MN[s.toLowerCase()]||s.toUpperCase(),t=d.has(null==a?void 0:a.toLowerCase());if((null==l?void 0:l.disabled)===!0)i.push(a);else if(l&&Object.keys(l).length>0){let e="";"gcp"===s.toLowerCase()&&l.project_id?e=" (Project ID: ".concat(l.project_id,")"):"aws"===s.toLowerCase()&&l.region&&(e=" (Region: ".concat(l.region,")")),t?c.push((0,r.jsxs)("span",{className:"block",children:[a,e," is enabled."]},"".concat(s,"-enabled"))):o.push((0,r.jsxs)("span",{className:"block text-amber-700",children:[a,e," is configured but not currently available."]},"".concat(s,"-configured-not-enabled")))}else t?c.push((0,r.jsxs)("span",{className:"block",children:[a," is enabled (using default settings)."]},"".concat(s,"-default-enabled"))):o.push((0,r.jsxs)("span",{className:"block text-amber-700",children:[a," is configured but not currently available."]},"".concat(s,"-default-not-enabled")))});let u=[];if(i.length>0){let e=i.join(" and ");u.push((0,r.jsxs)("span",{className:"block",children:[e," ",1===i.length?"is":"are"," explicitly disabled."]},"disabled-clouds"))}return(u.push(...c),u.push(...o),u.length>0)?(0,r.jsx)("div",{className:"text-sm text-gray-700 mb-3 p-3 bg-sky-50 rounded border border-sky-200",children:u}):!t&&n?(0,r.jsx)("div",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"This workspace has no specific cloud resource configurations and can use all accessible infrastructure."}):null},W=e=>{let{isPrivate:s}=e;return s?(0,r.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-amber-100 text-amber-800 border border-amber-300",children:"Private"}):(0,r.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800 border border-green-300",children:"Public"})},P=e=>{let{workspaceConfig:s,allUsers:l}=e;if(!s.private)return null;let a=s.allowed_users||[],t=(l||[]).filter(e=>"admin"===e.role).map(e=>e.username),n=[...new Set([...a,...t])];return 0===n.length?(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Allowed Users (0)"}),(0,r.jsx)("div",{className:"text-amber-600 text-xs italic p-2 bg-amber-50 rounded border border-amber-200",children:"No users configured (workspace may be inaccessible)"})]}):(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsxs)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:["Allowed Users (",n.length,")"]}),(0,r.jsx)("div",{className:"space-y-1 max-h-48 overflow-y-auto border border-gray-200 rounded",children:n.map(e=>{let s=t.includes(e);return(0,r.jsxs)("div",{className:"flex items-center justify-between text-xs p-2 bg-gray-50 hover:bg-gray-100 border-b border-gray-100 last:border-b-0",children:[(0,r.jsx)("span",{className:"font-medium text-gray-700",children:e}),s?(0,r.jsxs)("span",{className:"inline-flex items-center text-blue-600",children:[(0,r.jsx)(C.r7,{className:"w-3 h-3 mr-1"}),"Admin"]}):(0,r.jsxs)("span",{className:"inline-flex items-center text-gray-600",children:[(0,r.jsx)(b.Z,{className:"w-3 h-3 mr-1"}),"User"]})]},e)})})]})};function R(e){let{workspaceName:s,isNewWorkspace:l=!1}=e,o=(0,t.useRouter)(),[u,p]=(0,a.useState)({}),[b,w]=(0,a.useState)({}),[k,M]=(0,a.useState)(""),[R,_]=(0,a.useState)(!0),[z,O]=(0,a.useState)(!1),[T,U]=(0,a.useState)(!1),[Y,J]=(0,a.useState)(null),[I,V]=(0,a.useState)(null),[F,H]=(0,a.useState)(null),[X,B]=(0,a.useState)([]),[G,q]=(0,a.useState)({showDialog:!1,deleting:!1,error:null}),[K,Q]=(0,a.useState)({totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:[]}),[$,ee]=(0,a.useState)(!1),es=(0,a.useCallback)(async()=>{_(!0),J(null);try{let e;let[l,r]=await Promise.all([(0,n.fX)(),(0,D.R)()]),a=l[s]||{};p(a),w(a),B(r||[]),e=0===Object.keys(a).length?"".concat(s,":\n # Empty workspace configuration - uses all accessible infrastructure\n"):E.ZP.dump({[s]:a},{indent:2,lineWidth:-1,noRefs:!0,skipInvalid:!0,flowLevel:-1}),M(e)}catch(e){console.error("Error fetching workspace config:",e),J(e)}finally{_(!1)}},[s]),el=(0,a.useCallback)(async()=>{if(!l){ee(!0);try{let[e,l,r]=await Promise.all([(0,c.getClusters)(),(0,i.getManagedJobs)(),(0,n.yz)(s,!0)]),a=e.filter(e=>(e.workspace||"default")===s),t=a.filter(e=>"RUNNING"===e.status||"LAUNCHING"===e.status),o={};e.forEach(e=>{o[e.cluster]=e.workspace||"default"});let d=l.jobs||[],u=new Set(S.statusGroups.active),x=0;d.forEach(e=>{let l=e.cluster_name||e.resources&&e.resources.cluster_name;l&&o[l]===s&&u.has(e.status)&&x++}),Q({totalClusterCount:a.length,runningClusterCount:t.length,managedJobsCount:x,clouds:Array.isArray(r)?r:[]})}catch(e){console.error("Failed to fetch workspace stats:",e)}finally{ee(!1)}}},[s,l]);(0,a.useEffect)(()=>{l?(_(!1),M("".concat(s,":\n # New workspace configuration\n # Leave empty to use all accessible infrastructure\n"))):(es(),el())},[s,l,es,el]),(0,a.useEffect)(()=>{U(JSON.stringify(u)!==JSON.stringify(b))},[u,b]);let er=e=>{M(e),H(null);try{let l=E.ZP.load(e)||{},r=Object.keys(l);if(0===r.length)p({});else if(1===r.length){let e=r[0];if(e!==s){H('Workspace name cannot be changed. Expected "'.concat(s,'" but found "').concat(e,'".'));return}let a=l[s]||{};p(a)}else H("Configuration must contain only one workspace. Found: ".concat(r.join(", ")))}catch(e){H("Invalid YAML: ".concat(e.message))}},ea=async()=>{O(!0),J(null),V(null);try{if(F)throw Error("Please fix YAML errors before saving");let e=E.ZP.load(k)||{},r=Object.keys(e);if(r.length>0&&r[0]!==s)throw Error('Workspace name cannot be changed. Expected "'.concat(s,'".'));l?(await (0,n.MB)(s,u),V("Workspace created successfully!"),setTimeout(()=>{o.push("/workspaces/".concat(s))},1500)):(await (0,n.eA)(s,u),V("Workspace updated successfully!"),w(u),el())}catch(e){console.error("Error saving workspace:",e),J(e)}finally{O(!1)}},et=async()=>{q(e=>({...e,deleting:!0,error:null}));try{await (0,n.zl)(s),V("Workspace deleted successfully!"),setTimeout(()=>{o.push("/workspaces")},1500)}catch(e){console.error("Error deleting workspace:",e),q(s=>({...s,deleting:!1,error:e}))}},en=()=>{q({showDialog:!1,deleting:!1,error:null})},ec=async()=>{await Promise.all([es(),el()])};if(!o.isReady)return(0,r.jsx)("div",{children:"Loading..."});let ei=l?"Create New Workspace | SkyPilot Dashboard":"Workspace: ".concat(s," | SkyPilot Dashboard");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x(),{children:(0,r.jsx)("title",{children:ei})}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(d(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)(d(),{href:l?"/workspace/new":"/workspaces/".concat(s),className:"text-sky-blue hover:underline",children:l?"New Workspace":s}),T&&(0,r.jsx)("span",{className:"ml-3 px-2 py-1 bg-yellow-100 text-yellow-800 text-xs rounded",children:"Unsaved changes"})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(R||z||$)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(g.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:z?"Saving...":"Loading..."})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[!l&&(0,r.jsxs)("button",{onClick:ec,disabled:R||z||$,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,r.jsx)(j.Z,{className:"w-4 h-4 mr-1.5"}),"Refresh"]}),!l&&"default"!==s&&(0,r.jsxs)("button",{onClick:()=>q({...G,showDialog:!0}),disabled:G.deleting||z,className:"text-red-600 hover:text-red-700 font-medium inline-flex items-center",children:[(0,r.jsx)(y.Z,{className:"w-4 h-4 mr-1.5"}),"Delete"]})]})]})]}),R?(0,r.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,r.jsx)(g.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Loading workspace configuration..."})]}):(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(L.X,{error:Y,title:"Error",onDismiss:()=>J(null)}),(0,r.jsx)(Z,{message:I}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[!l&&(0,r.jsx)("div",{className:"lg:col-span-1",children:(0,r.jsxs)(m.Zb,{className:"h-full",children:[(0,r.jsx)(m.Ol,{children:(0,r.jsx)(m.ll,{className:"text-base font-normal",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s]}),(0,r.jsx)(W,{isPrivate:!0===b.private})]})})}),(0,r.jsxs)(m.aY,{className:"text-sm pb-2 flex-1",children:[(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(C.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,r.jsx)("span",{className:"font-normal text-gray-800",children:$?"...":"".concat(K.runningClusterCount," / ").concat(K.totalClusterCount)})]}),(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(C.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Managed Jobs"})]}),(0,r.jsx)("span",{className:"font-normal text-gray-800",children:$?"...":K.managedJobsCount})]})]}),(0,r.jsxs)("div",{className:"px-6 pb-6 text-sm pt-3",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:$?(0,r.jsx)("span",{className:"text-gray-500",children:"Loading..."}):K.clouds.length>0?K.clouds.map(e=>(0,r.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,r.jsx)(C.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,r.jsx)("span",{children:e})]},e)):(0,r.jsx)("span",{className:"text-gray-500 italic",children:"No enabled infrastructure"})}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(A,{workspaceName:s,config:b,enabledClouds:K.clouds})}),(0,r.jsx)(P,{workspaceConfig:b,allUsers:X})]})]})}),(0,r.jsx)("div",{className:l?"lg:col-span-3":"lg:col-span-2",children:(0,r.jsxs)(m.Zb,{className:"h-full flex flex-col",children:[(0,r.jsx)(m.Ol,{children:(0,r.jsx)(m.ll,{className:"text-base font-normal",children:l?"New Workspace YAML":"Edit Workspace YAML"})}),(0,r.jsx)(m.aY,{className:"flex-1 flex flex-col",children:(0,r.jsxs)("div",{className:"space-y-4 flex-1 flex flex-col",children:[F&&(0,r.jsx)(L.X,{error:F,onDismiss:()=>H(null)}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Configure infra-specific settings for this workspace. Leave empty to use all accessible infrastructure. Refer to"," ",(0,r.jsx)("a",{href:"https://docs.skypilot.co/en/latest/admin/workspaces.html#configuration",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600",children:"SkyPilot Docs"})," ","for more details."]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Example configuration:"}),(0,r.jsx)("div",{className:"p-3 bg-gray-50 border rounded-lg",children:(0,r.jsx)("pre",{className:"text-xs font-mono text-gray-600 whitespace-pre-wrap",children:"".concat(s||"my-workspace",":\n private: true\n allowed_users:\n - user1@mydomain.com\n - user2@mydomain.com\n gcp:\n project_id: xxx\n disabled: false\n kubernetes:\n allowed_contexts:\n - context-1")})})]}),(0,r.jsx)(f.g,{value:k,onChange:e=>er(e.target.value),className:"font-mono text-sm flex-1 resize-none",style:{minHeight:"350px"},spellCheck:!1,placeholder:"# Enter workspace configuration in YAML format"}),(0,r.jsx)("div",{className:"flex justify-end space-x-3 pt-3 border-gray-200",children:(0,r.jsxs)(h.z,{onClick:ea,disabled:z||F||R,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:[(0,r.jsx)(N.Z,{className:"w-4 h-4 mr-1.5"}),z?"Applying...":"Apply"]})})]})]})})]})})]})]}),(0,r.jsx)(v.Vq,{open:G.showDialog,onOpenChange:en,children:(0,r.jsxs)(v.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(v.fK,{className:"",children:[(0,r.jsx)(v.$N,{children:"Delete Workspace"}),(0,r.jsxs)(v.Be,{children:['Are you sure you want to delete workspace "',s,'"? This action cannot be undone.']})]}),G.error&&(0,r.jsx)(L.X,{error:G.error,title:"Deletion Failed",onDismiss:()=>q(e=>({...e,error:null}))}),(0,r.jsxs)(v.cN,{className:"",children:[(0,r.jsx)(h.z,{variant:"outline",onClick:en,disabled:G.deleting,children:"Cancel"}),(0,r.jsx)(h.z,{variant:"destructive",onClick:et,disabled:G.deleting,children:G.deleting?"Deleting...":"Delete"})]})]})})]})]})}}}]);
|
11
|
+
*/let r=(0,l(998).Z)("Trash",[["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"}]])},1812:function(e,s,l){l.d(s,{X:function(){return n}});var r=l(5893),a=l(7294);let t=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s},n=e=>{let{error:s,title:l="Error",onDismiss:n}=e,[c,i]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{s&&i(!1)},[s]),!s||c)return null;let o="string"==typeof s?s:t(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[l,":"]})," ",o]})})]}),(0,r.jsx)("button",{onClick:()=>{i(!0),n&&n()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},9123:function(e,s,l){l.d(s,{g:function(){return n}});var r=l(5893),a=l(7294),t=l(2350);let n=a.forwardRef((e,s)=>{let{className:l,...a}=e;return(0,r.jsx)("textarea",{className:(0,t.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",l),ref:s,...a})});n.displayName="Textarea"},1141:function(e,s,l){l.r(s),l.d(s,{WorkspaceEditor:function(){return R}});var r=l(5893),a=l(7294),t=l(1163),n=l(7324),c=l(3266),i=l(8969);l(9470);var o=l(1664),d=l.n(o),u=l(9008),x=l.n(u),m=l(7673),h=l(803),f=l(9123),g=l(5739),p=l(282),b=l(6021),j=l(3626),y=l(8418),N=l(9333),v=l(326);let w=e=>{let{className:s="",variant:l="default",children:a,...t}=e;return(0,r.jsx)("div",{role:"alert",className:"".concat("relative w-full rounded-lg border p-4 flex items-start space-x-2"," ").concat({default:"bg-blue-50 border-blue-200 text-blue-800",destructive:"bg-red-50 border-red-200 text-red-800"}[l]," ").concat(s),...t,children:a})},k=e=>{let{className:s="",children:l,...a}=e;return(0,r.jsx)("div",{className:"text-sm leading-relaxed ".concat(s),...a,children:l})};var C=l(3850),L=l(1812),S=l(938),E=l(1272),M=l(3225),D=l(3081);let Z=e=>{let{message:s}=e;return s?(0,r.jsxs)(w,{className:"border-green-200 bg-green-50",children:[(0,r.jsx)(p.Z,{className:"h-4 w-4 text-green-600"}),(0,r.jsx)(k,{className:"text-green-800",children:s})]}):null},A=e=>{let{workspaceName:s,config:l,enabledClouds:a=[]}=e;if(!l)return null;let t="default"===s,n=0===Object.keys(l).length;if(t&&n)return(0,r.jsx)("div",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"Workspace 'default' can use all accessible infrastructure."});let c=[],i=[],o=[],d=new Set(a.map(e=>e.toLowerCase()));Object.entries(l).forEach(e=>{let[s,l]=e;if("private"===s||"allowed_users"===s)return;let a=M.MN[s.toLowerCase()]||s.toUpperCase(),t=d.has(null==a?void 0:a.toLowerCase());if((null==l?void 0:l.disabled)===!0)i.push(a);else if(l&&Object.keys(l).length>0){let e="";"gcp"===s.toLowerCase()&&l.project_id?e=" (Project ID: ".concat(l.project_id,")"):"aws"===s.toLowerCase()&&l.region&&(e=" (Region: ".concat(l.region,")")),t?c.push((0,r.jsxs)("span",{className:"block",children:[a,e," is enabled."]},"".concat(s,"-enabled"))):o.push((0,r.jsxs)("span",{className:"block text-amber-700",children:[a,e," is configured but not currently available."]},"".concat(s,"-configured-not-enabled")))}else t?c.push((0,r.jsxs)("span",{className:"block",children:[a," is enabled (using default settings)."]},"".concat(s,"-default-enabled"))):o.push((0,r.jsxs)("span",{className:"block text-amber-700",children:[a," is configured but not currently available."]},"".concat(s,"-default-not-enabled")))});let u=[];if(i.length>0){let e=i.join(" and ");u.push((0,r.jsxs)("span",{className:"block",children:[e," ",1===i.length?"is":"are"," explicitly disabled."]},"disabled-clouds"))}return(u.push(...c),u.push(...o),u.length>0)?(0,r.jsx)("div",{className:"text-sm text-gray-700 mb-3 p-3 bg-sky-50 rounded border border-sky-200",children:u}):!t&&n?(0,r.jsx)("div",{className:"text-sm text-gray-500 mb-3 italic p-3 bg-sky-50 rounded border border-sky-200",children:"This workspace has no specific cloud resource configurations and can use all accessible infrastructure."}):null},W=e=>{let{isPrivate:s}=e;return s?(0,r.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-amber-100 text-amber-800 border border-amber-300",children:"Private"}):(0,r.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800 border border-green-300",children:"Public"})},P=e=>{let{workspaceConfig:s,allUsers:l}=e;if(!s.private)return null;let a=s.allowed_users||[],t=(l||[]).filter(e=>"admin"===e.role).map(e=>e.username),n=[...new Set([...a,...t])];return 0===n.length?(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Allowed Users (0)"}),(0,r.jsx)("div",{className:"text-amber-600 text-xs italic p-2 bg-amber-50 rounded border border-amber-200",children:"No users configured (workspace may be inaccessible)"})]}):(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsxs)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:["Allowed Users (",n.length,")"]}),(0,r.jsx)("div",{className:"space-y-1 max-h-48 overflow-y-auto border border-gray-200 rounded",children:n.map(e=>{let s=t.includes(e);return(0,r.jsxs)("div",{className:"flex items-center justify-between text-xs p-2 bg-gray-50 hover:bg-gray-100 border-b border-gray-100 last:border-b-0",children:[(0,r.jsx)("span",{className:"font-medium text-gray-700",children:e}),s?(0,r.jsxs)("span",{className:"inline-flex items-center text-blue-600",children:[(0,r.jsx)(C.r7,{className:"w-3 h-3 mr-1"}),"Admin"]}):(0,r.jsxs)("span",{className:"inline-flex items-center text-gray-600",children:[(0,r.jsx)(b.Z,{className:"w-3 h-3 mr-1"}),"User"]})]},e)})})]})};function R(e){let{workspaceName:s,isNewWorkspace:l=!1}=e,o=(0,t.useRouter)(),[u,p]=(0,a.useState)({}),[b,w]=(0,a.useState)({}),[k,M]=(0,a.useState)(""),[R,_]=(0,a.useState)(!0),[z,O]=(0,a.useState)(!1),[T,U]=(0,a.useState)(!1),[Y,J]=(0,a.useState)(null),[I,V]=(0,a.useState)(null),[F,H]=(0,a.useState)(null),[X,B]=(0,a.useState)([]),[G,q]=(0,a.useState)({showDialog:!1,deleting:!1,error:null}),[K,Q]=(0,a.useState)({totalClusterCount:0,runningClusterCount:0,managedJobsCount:0,clouds:[]}),[$,ee]=(0,a.useState)(!1),es=(0,a.useCallback)(async()=>{_(!0),J(null);try{let e;let[l,r]=await Promise.all([(0,n.fX)(),(0,D.R)()]),a=l[s]||{};p(a),w(a),B(r||[]),e=0===Object.keys(a).length?"".concat(s,":\n # Empty workspace configuration - uses all accessible infrastructure\n"):E.ZP.dump({[s]:a},{indent:2,lineWidth:-1,noRefs:!0,skipInvalid:!0,flowLevel:-1}),M(e)}catch(e){console.error("Error fetching workspace config:",e),J(e)}finally{_(!1)}},[s]),el=(0,a.useCallback)(async()=>{if(!l){ee(!0);try{let[e,l,r]=await Promise.all([(0,c.getClusters)(),(0,i.getManagedJobs)(),(0,n.yz)(s,!0)]),a=e.filter(e=>(e.workspace||"default")===s),t=a.filter(e=>"RUNNING"===e.status||"LAUNCHING"===e.status),o={};e.forEach(e=>{o[e.cluster]=e.workspace||"default"});let d=l.jobs||[],u=new Set(S.statusGroups.active),x=0;d.forEach(e=>{let l=e.cluster_name||e.resources&&e.resources.cluster_name;l&&o[l]===s&&u.has(e.status)&&x++}),Q({totalClusterCount:a.length,runningClusterCount:t.length,managedJobsCount:x,clouds:Array.isArray(r)?r:[]})}catch(e){console.error("Failed to fetch workspace stats:",e)}finally{ee(!1)}}},[s,l]);(0,a.useEffect)(()=>{l?(_(!1),M("".concat(s,":\n # New workspace configuration\n # Leave empty to use all accessible infrastructure\n"))):(es(),el())},[s,l,es,el]),(0,a.useEffect)(()=>{U(JSON.stringify(u)!==JSON.stringify(b))},[u,b]);let er=e=>{M(e),H(null);try{let l=E.ZP.load(e)||{},r=Object.keys(l);if(0===r.length)p({});else if(1===r.length){let e=r[0];if(e!==s){H('Workspace name cannot be changed. Expected "'.concat(s,'" but found "').concat(e,'".'));return}let a=l[s]||{};p(a)}else H("Configuration must contain only one workspace. Found: ".concat(r.join(", ")))}catch(e){H("Invalid YAML: ".concat(e.message))}},ea=async()=>{O(!0),J(null),V(null);try{if(F)throw Error("Please fix YAML errors before saving");let e=E.ZP.load(k)||{},r=Object.keys(e);if(r.length>0&&r[0]!==s)throw Error('Workspace name cannot be changed. Expected "'.concat(s,'".'));l?(await (0,n.MB)(s,u),V("Workspace created successfully!"),setTimeout(()=>{o.push("/workspaces/".concat(s))},1500)):(await (0,n.eA)(s,u),V("Workspace updated successfully!"),w(u),el())}catch(e){console.error("Error saving workspace:",e),J(e)}finally{O(!1)}},et=async()=>{q(e=>({...e,deleting:!0,error:null}));try{await (0,n.zl)(s),V("Workspace deleted successfully!"),setTimeout(()=>{o.push("/workspaces")},1500)}catch(e){console.error("Error deleting workspace:",e),q(s=>({...s,deleting:!1,error:e}))}},en=()=>{q({showDialog:!1,deleting:!1,error:null})},ec=async()=>{await Promise.all([es(),el()])};if(!o.isReady)return(0,r.jsx)("div",{children:"Loading..."});let ei=l?"Create New Workspace | SkyPilot Dashboard":"Workspace: ".concat(s," | SkyPilot Dashboard");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x(),{children:(0,r.jsx)("title",{children:ei})}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(d(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)(d(),{href:l?"/workspace/new":"/workspaces/".concat(s),className:"text-sky-blue hover:underline",children:l?"New Workspace":s}),T&&(0,r.jsx)("span",{className:"ml-3 px-2 py-1 bg-yellow-100 text-yellow-800 text-xs rounded",children:"Unsaved changes"})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(R||z||$)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(g.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:z?"Saving...":"Loading..."})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[!l&&(0,r.jsxs)("button",{onClick:ec,disabled:R||z||$,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[(0,r.jsx)(j.Z,{className:"w-4 h-4 mr-1.5"}),"Refresh"]}),!l&&"default"!==s&&(0,r.jsxs)("button",{onClick:()=>q({...G,showDialog:!0}),disabled:G.deleting||z,className:"text-red-600 hover:text-red-700 font-medium inline-flex items-center",children:[(0,r.jsx)(y.Z,{className:"w-4 h-4 mr-1.5"}),"Delete"]})]})]})]}),R?(0,r.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,r.jsx)(g.Z,{size:24,className:"mr-2"}),(0,r.jsx)("span",{className:"text-gray-500",children:"Loading workspace configuration..."})]}):(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(L.X,{error:Y,title:"Error",onDismiss:()=>J(null)}),(0,r.jsx)(Z,{message:I}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[!l&&(0,r.jsx)("div",{className:"lg:col-span-1",children:(0,r.jsxs)(m.Zb,{className:"h-full",children:[(0,r.jsx)(m.Ol,{children:(0,r.jsx)(m.ll,{className:"text-base font-normal",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:"Workspace:"})," ",s]}),(0,r.jsx)(W,{isPrivate:!0===b.private})]})})}),(0,r.jsxs)(m.aY,{className:"text-sm pb-2 flex-1",children:[(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(C.QT,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Clusters (Running / Total)"})]}),(0,r.jsx)("span",{className:"font-normal text-gray-800",children:$?"...":"".concat(K.runningClusterCount," / ").concat(K.totalClusterCount)})]}),(0,r.jsxs)("div",{className:"py-2 flex items-center justify-between border-t border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center text-gray-600",children:[(0,r.jsx)(C.Vp,{className:"w-4 h-4 mr-2 text-gray-500"}),(0,r.jsx)("span",{children:"Managed Jobs"})]}),(0,r.jsx)("span",{className:"font-normal text-gray-800",children:$?"...":K.managedJobsCount})]})]}),(0,r.jsxs)("div",{className:"px-6 pb-6 text-sm pt-3",children:[(0,r.jsx)("h4",{className:"mb-2 text-xs text-gray-500 tracking-wider",children:"Enabled Infra"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:$?(0,r.jsx)("span",{className:"text-gray-500",children:"Loading..."}):K.clouds.length>0?K.clouds.map(e=>(0,r.jsxs)("div",{className:"flex items-center text-gray-700",children:[(0,r.jsx)(C.Ye,{className:"w-3.5 h-3.5 mr-1.5 text-green-500"}),(0,r.jsx)("span",{children:e})]},e)):(0,r.jsx)("span",{className:"text-gray-500 italic",children:"No enabled infrastructure"})}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(A,{workspaceName:s,config:b,enabledClouds:K.clouds})}),(0,r.jsx)(P,{workspaceConfig:b,allUsers:X})]})]})}),(0,r.jsx)("div",{className:l?"lg:col-span-3":"lg:col-span-2",children:(0,r.jsxs)(m.Zb,{className:"h-full flex flex-col",children:[(0,r.jsx)(m.Ol,{children:(0,r.jsx)(m.ll,{className:"text-base font-normal",children:l?"New Workspace YAML":"Edit Workspace YAML"})}),(0,r.jsx)(m.aY,{className:"flex-1 flex flex-col",children:(0,r.jsxs)("div",{className:"space-y-4 flex-1 flex flex-col",children:[F&&(0,r.jsx)(L.X,{error:F,onDismiss:()=>H(null)}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Configure infra-specific settings for this workspace. Leave empty to use all accessible infrastructure. Refer to"," ",(0,r.jsx)("a",{href:"https://docs.skypilot.co/en/latest/admin/workspaces.html#configuration",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600",children:"SkyPilot Docs"})," ","for more details."]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Example configuration:"}),(0,r.jsx)("div",{className:"p-3 bg-gray-50 border rounded-lg",children:(0,r.jsx)("pre",{className:"text-xs font-mono text-gray-600 whitespace-pre-wrap",children:"".concat(s||"my-workspace",":\n private: true\n allowed_users:\n - user1@mydomain.com\n - user2@mydomain.com\n gcp:\n project_id: xxx\n disabled: false\n kubernetes:\n allowed_contexts:\n - context-1")})})]}),(0,r.jsx)(f.g,{value:k,onChange:e=>er(e.target.value),className:"font-mono text-sm flex-1 resize-none",style:{minHeight:"350px"},spellCheck:!1,placeholder:"# Enter workspace configuration in YAML format"}),(0,r.jsx)("div",{className:"flex justify-end space-x-3 pt-3 border-gray-200",children:(0,r.jsxs)(h.z,{onClick:ea,disabled:z||F||R,className:"inline-flex items-center bg-blue-600 hover:bg-blue-700 text-white",children:[(0,r.jsx)(N.Z,{className:"w-4 h-4 mr-1.5"}),z?"Applying...":"Apply"]})})]})]})})]})})]})]}),(0,r.jsx)(v.Vq,{open:G.showDialog,onOpenChange:en,children:(0,r.jsxs)(v.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(v.fK,{className:"",children:[(0,r.jsx)(v.$N,{children:"Delete Workspace"}),(0,r.jsxs)(v.Be,{children:['Are you sure you want to delete workspace "',s,'"? This action cannot be undone.']})]}),G.error&&(0,r.jsx)(L.X,{error:G.error,title:"Deletion Failed",onDismiss:()=>q(e=>({...e,error:null}))}),(0,r.jsxs)(v.cN,{className:"",children:[(0,r.jsx)(h.z,{variant:"outline",onClick:en,disabled:G.deleting,children:"Cancel"}),(0,r.jsx)(h.z,{variant:"destructive",onClick:et,disabled:G.deleting,children:G.deleting?"Deleting...":"Delete"})]})]})})]})]})}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1272],{1272:function(e,t,n){var i={isNothing:/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function(e){return null==e},isObject:function(e){return"object"==typeof e&&null!==e},repeat:function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}};function r(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function o(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}function a(e,t,n,i,r){var o="",a="",l=Math.floor(r/2)-1;return i-t>l&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return i.repeat(" ",t-e.length)+e}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.toString=function(e){return this.name+": "+r(this,e)};var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],o=[],c=-1;s=n.exec(e.buffer);)o.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&c<0&&(c=r.length-2);c<0&&(c=r.length-1);var s,u,p,f="",d=Math.min(e.line+t.linesAfter,o.length).toString().length,h=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=a(e.buffer,r[c-u],o[c-u],e.position-(r[c]-r[c-u]),h),f=i.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=a(e.buffer,r[c],o[c],e.position,h),f+=i.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n"+i.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=o.length);u++)p=a(e.buffer,r[c+u],o[c+u],e.position-(r[c]-r[c+u]),h),f+=i.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"],p=function(e,t){var n,i;if(Object.keys(t=t||{}).forEach(function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=(n=t.styleAliases||null,i={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){i[String(t)]=e})}),i),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)}),n[t]=e}),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[];if(e instanceof p)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(d.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var h=new p("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),g=new p("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),m=new p("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),y=new d({explicit:[h,g,m]}),b=new p("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),A=new p("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),v=new p("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,l=!1;if(!o)return!1;if(("-"===(r=e[a])||"+"===r)&&(r=e[++a]),"0"===r){if(a+1===o)return!0;if("b"===(r=e[++a])){for(a++;a<o;a++)if("_"!==(r=e[a])){if("0"!==r&&"1"!==r)return!1;l=!0}return l&&"_"!==r}if("x"===r){for(a++;a<o;a++)if("_"!==(r=e[a])){if(!(48<=(t=e.charCodeAt(a))&&t<=57||65<=t&&t<=70||97<=t&&t<=102))return!1;l=!0}return l&&"_"!==r}if("o"===r){for(a++;a<o;a++)if("_"!==(r=e[a])){if(!(48<=(n=e.charCodeAt(a))&&n<=55))return!1;l=!0}return l&&"_"!==r}}if("_"===r)return!1;for(;a<o;a++)if("_"!==(r=e[a])){if(!(48<=(i=e.charCodeAt(a))&&i<=57))return!1;l=!0}return!!l&&"_"!==r},construct:function(e){var t,n=e,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),("-"===(t=n[0])||"+"===t)&&("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!i.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),k=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),w=/^[-+]?[0-9]+e/,C=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return!!(null!==e&&k.test(e)&&"_"!==e[e.length-1])},construct:function(e){var t,n;return(n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t)?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),w.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),x=y.extend({implicit:[b,A,v,C]}),I=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),O=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),S=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==I.exec(e)||null!==O.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=I.exec(e))&&(t=O.exec(e)),null===t)throw Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=(60*+t[10]+ +(t[11]||0))*6e4,"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}}),j=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",N=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length;for(n=0;n<r;n++)if(!((t=T.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=0,a=[];for(t=0;t<r;t++)t%4==0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|T.indexOf(i.charAt(t));return 0==(n=r%4*6)?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18===n?(a.push(o>>10&255),a.push(o>>2&255)):12===n&&a.push(o>>4&255),new Uint8Array(a)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length;for(t=0;t<o;t++)t%3==0&&t&&(i+=T[r>>18&63]+T[r>>12&63]+T[r>>6&63]+T[63&r]),r=(r<<8)+e[t];return 0==(n=o%3)?i+=T[r>>18&63]+T[r>>12&63]+T[r>>6&63]+T[63&r]:2===n?i+=T[r>>10&63]+T[r>>4&63]+T[r<<2&63]+T[64]:1===n&&(i+=T[r>>2&63]+T[r<<4&63]+T[64]+T[64]),i}}),F=Object.prototype.hasOwnProperty,E=Object.prototype.toString,M=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[];for(t=0,n=e.length;t<n;t+=1){if(i=e[t],o=!1,"[object Object]"!==E.call(i))return!1;for(r in i)if(F.call(i,r)){if(o)return!1;o=!0}if(!o||-1!==a.indexOf(r))return!1;a.push(r)}return!0},construct:function(e){return null!==e?e:[]}}),L=Object.prototype.toString,_=new p("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){var t,n,i,r,o;if(null===e)return!0;for(t=0,o=Array(e.length),n=e.length;t<n;t+=1){if(i=e[t],"[object Object]"!==L.call(i)||1!==(r=Object.keys(i)).length)return!1;o[t]=[r[0],i[r[0]]]}return!0},construct:function(e){var t,n,i,r,o;if(null===e)return[];for(t=0,o=Array(e.length),n=e.length;t<n;t+=1)r=Object.keys(i=e[t]),o[t]=[r[0],i[r[0]]];return o}}),D=Object.prototype.hasOwnProperty,q=new p("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){var t;if(null===e)return!0;for(t in e)if(D.call(e,t)&&null!==e[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),U=x.extend({implicit:[S,j],explicit:[N,M,_,q]}),Y=Object.prototype.hasOwnProperty,R=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,B=/[\x85\u2028\u2029]/,K=/[,\[\]\{\}]/,P=/^(?:!|!!|![a-z\-]+!)$/i,W=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $(e){return Object.prototype.toString.call(e)}function G(e){return 10===e||13===e}function Z(e){return 9===e||32===e}function V(e){return 9===e||32===e||10===e||13===e}function H(e){return 44===e||91===e||93===e||123===e||125===e}function Q(e){return 48===e?"\0":97===e?"\x07":98===e?"\b":116===e?" ":9===e?" ":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"\x1b":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"\x85":95===e?"\xa0":76===e?"\u2028":80===e?"\u2029":""}for(var z=Array(256),J=Array(256),X=0;X<256;X++)z[X]=Q(X)?1:0,J[X]=Q(X);function ee(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||U,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function et(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=c(n),new o(t,n)}function en(e,t){throw et(e,t)}function ei(e,t){e.onWarning&&e.onWarning.call(null,et(e,t))}var er={YAML:function(e,t,n){var i,r,o;null!==e.version&&en(e,"duplication of %YAML directive"),1!==n.length&&en(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&en(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&en(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ei(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&en(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],P.test(i)||en(e,"ill-formed tag handle (first argument) of the TAG directive"),Y.call(e.tagMap,i)&&en(e,'there is a previously declared suffix for "'+i+'" tag handle'),W.test(r)||en(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){en(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function eo(e,t,n,i){var r,o,a,l;if(t<n){if(l=e.input.slice(t,n),i)for(r=0,o=l.length;r<o;r+=1)9===(a=l.charCodeAt(r))||32<=a&&a<=1114111||en(e,"expected valid JSON character");else R.test(l)&&en(e,"the stream contains non-printable characters");e.result+=l}}function ea(e,t,n,r){var o,a,l,c;for(i.isObject(n)||en(e,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(o=Object.keys(n)).length;l<c;l+=1)a=o[l],Y.call(t,a)||(t[a]=n[a],r[a]=!0)}function el(e,t,n,i,r,o,a,l,c){var s,u;if(Array.isArray(r))for(s=0,u=(r=Array.prototype.slice.call(r)).length;s<u;s+=1)Array.isArray(r[s])&&en(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===$(r[s])&&(r[s]="[object Object]");if("object"==typeof r&&"[object Object]"===$(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i){if(Array.isArray(o))for(s=0,u=o.length;s<u;s+=1)ea(e,t,o[s],n);else ea(e,t,o,n)}else!e.json&&!Y.call(n,r)&&Y.call(t,r)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,en(e,"duplicated mapping key")),"__proto__"===r?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[r]=o,delete n[r];return t}function ec(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):en(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function es(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;Z(r);)9===r&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&35===r)do r=e.input.charCodeAt(++e.position);while(10!==r&&13!==r&&0!==r);if(G(r))for(ec(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return -1!==n&&0!==i&&e.lineIndent<n&&ei(e,"deficient indentation"),i}function eu(e){var t,n=e.position;return!!((45===(t=e.input.charCodeAt(n))||46===t)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,0===(t=e.input.charCodeAt(n))||V(t)))}function ep(e,t){1===t?e.result+=" ":t>1&&(e.result+=i.repeat("\n",t-1))}function ef(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,en(e,"tab characters must not be used in indentation")),45===i&&V(e.input.charCodeAt(e.position+1)));){if(l=!0,e.position++,es(e,!0,-1)&&e.lineIndent<=t){a.push(null),i=e.input.charCodeAt(e.position);continue}if(n=e.line,ed(e,t,3,!1,!0),a.push(e.result),es(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)en(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return!!l&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function ed(e,t,n,r,o){var a,l,c,s,u,p,f,d,h,g=1,m=!1,y=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=c=4===n||3===n,r&&es(e,!0,-1)&&(m=!0,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)),1===g)for(;function(e){var t,n,i,r,o=!1,a=!1;if(33!==(r=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&en(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(a=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do r=e.input.charCodeAt(++e.position);while(0!==r&&62!==r);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):en(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!V(r);)33===r&&(a?en(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),P.test(n)||en(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),K.test(i)&&en(e,"tag suffix cannot contain flow indicator characters")}i&&!W.test(i)&&en(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(t){en(e,"tag name is malformed: "+i)}return o?e.tag=i:Y.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:en(e,'undeclared tag handle "'+n+'"'),!0}(e)||function(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&en(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!V(n)&&!H(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&en(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}(e);)es(e,!0,-1)?(m=!0,c=a,e.lineIndent>t?g=1:e.lineIndent===t?g=0:e.lineIndent<t&&(g=-1)):c=!1;if(c&&(c=m||o),(1===g||4===n)&&(d=1===n||2===n?t:t+1,h=e.position-e.lineStart,1===g?c&&(ef(e,h)||function(e,t,n){var i,r,o,a,l,c,s,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,g=null,m=null,y=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),s=e.input.charCodeAt(e.position);0!==s;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,en(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(63===s||58===s)&&V(i))63===s?(y&&(el(e,f,d,h,g,null,a,l,c),h=g=m=null),b=!0,y=!0,r=!0):y?(y=!1,r=!0):en(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=i;else{if(a=e.line,l=e.lineStart,c=e.position,!ed(e,n,2,!1,!0))break;if(e.line===o){for(s=e.input.charCodeAt(e.position);Z(s);)s=e.input.charCodeAt(++e.position);if(58===s)V(s=e.input.charCodeAt(++e.position))||en(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(el(e,f,d,h,g,null,a,l,c),h=g=m=null),b=!0,y=!1,r=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;en(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;en(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,c=e.position),ed(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(el(e,f,d,h,g,m,a,l,c),h=g=m=null),es(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)en(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&el(e,f,d,h,g,null,a,l,c),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,h,d))||function(e,t){var n,i,r,o,a,l,c,s,u,p,f,d,h=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(d=e.input.charCodeAt(e.position)))a=93,s=!1,o=[];else{if(123!==d)return!1;a=125,s=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),d=e.input.charCodeAt(++e.position);0!==d;){if(es(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=s?"mapping":"sequence",e.result=o,!0;h?44===d&&en(e,"expected the node content, but found ','"):en(e,"missed comma between flow collection entries"),p=u=f=null,l=c=!1,63===d&&V(e.input.charCodeAt(e.position+1))&&(l=c=!0,e.position++,es(e,!0,t)),n=e.line,i=e.lineStart,r=e.position,ed(e,t,1,!1,!0),p=e.tag,u=e.result,es(e,!0,t),d=e.input.charCodeAt(e.position),(c||e.line===n)&&58===d&&(l=!0,d=e.input.charCodeAt(++e.position),es(e,!0,t),ed(e,t,1,!1,!0),f=e.result),s?el(e,o,y,p,u,f,n,i,r):l?o.push(el(e,null,y,p,u,f,n,i,r)):o.push(u),es(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}en(e,"unexpected end of the stream within a flow collection")}(e,d)?y=!0:(l&&function(e,t){var n,r,o,a,l,c=1,s=!1,u=!1,p=t,f=0,d=!1;if(124===(l=e.input.charCodeAt(e.position)))o=!1;else{if(62!==l)return!1;o=!0}for(e.kind="scalar",e.result="";0!==l;)if(43===(l=e.input.charCodeAt(++e.position))||45===l)1===c?c=43===l?3:2:en(e,"repeat of a chomping mode identifier");else if((a=48<=(n=l)&&n<=57?n-48:-1)>=0)0===a?en(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?en(e,"repeat of an indentation width identifier"):(p=t+a-1,u=!0);else break;if(Z(l)){do l=e.input.charCodeAt(++e.position);while(Z(l));if(35===l)do l=e.input.charCodeAt(++e.position);while(!G(l)&&0!==l)}for(;0!==l;){for(ec(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!u||e.lineIndent<p)&&32===l;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>p&&(p=e.lineIndent),G(l)){f++;continue}if(e.lineIndent<p){3===c?e.result+=i.repeat("\n",s?1+f:f):1===c&&s&&(e.result+="\n");break}for(o?Z(l)?(d=!0,e.result+=i.repeat("\n",s?1+f:f)):d?(d=!1,e.result+=i.repeat("\n",f+1)):0===f?s&&(e.result+=" "):e.result+=i.repeat("\n",f):e.result+=i.repeat("\n",s?1+f:f),s=!0,u=!0,f=0,r=e.position;!G(l)&&0!==l;)l=e.input.charCodeAt(++e.position);eo(e,r,e.position,!1)}return!0}(e,d)||function(e,t){var n,i,r;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(eo(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,r=e.position}else G(n)?(eo(e,i,r,!0),ep(e,es(e,!1,t)),i=r=e.position):e.position===e.lineStart&&eu(e)?en(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);en(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var n,i,r,o,a,l,c,s;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return eo(e,n,e.position,!0),e.position++,!0;if(92===l){if(eo(e,n,e.position,!0),G(l=e.input.charCodeAt(++e.position)))es(e,!1,t);else if(l<256&&z[l])e.result+=J[l],e.position++;else if((a=120===(c=l)?2:117===c?4:85===c?8:0)>0){for(r=a,o=0;r>0;r--)(a=function(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:en(e,"expected hexadecimal character");e.result+=(s=o)<=65535?String.fromCharCode(s):String.fromCharCode((s-65536>>10)+55296,(s-65536&1023)+56320),e.position++}else en(e,"unknown escape sequence");n=i=e.position}else G(l)?(eo(e,n,i,!0),ep(e,es(e,!1,t)),n=i=e.position):e.position===e.lineStart&&eu(e)?en(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}en(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!V(i)&&!H(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&en(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Y.call(e.anchorMap,n)||en(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],es(e,!0,-1),!0}(e)?(y=!0,(null!==e.tag||null!==e.anchor)&&en(e,"alias node should not have any properties")):function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(V(u=e.input.charCodeAt(e.position))||H(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u||(63===u||45===u)&&(V(i=e.input.charCodeAt(e.position+1))||n&&H(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(V(i=e.input.charCodeAt(e.position+1))||n&&H(i))break}else if(35===u){if(V(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&eu(e)||n&&H(u))break;else if(G(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,es(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}a&&(eo(e,r,o,!1),ep(e,e.line-l),r=o=e.position,a=!1),Z(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return eo(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===n)&&(y=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&ef(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&en(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s<u;s+=1)if((f=e.implicitTypes[s]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(Y.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(s=0,f=null,u=(p=e.typeMap.multi[e.kind||"fallback"]).length;s<u;s+=1)if(e.tag.slice(0,p[s].tag.length)===p[s].tag){f=p[s];break}f||en(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&en(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):en(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function eh(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new ee(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,en(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)!function(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(es(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0)&&37===r);){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!V(r);)r=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),i=[],n.length<1&&en(e,"directive name must not be less than one character in length");0!==r;){for(;Z(r);)r=e.input.charCodeAt(++e.position);if(35===r){do r=e.input.charCodeAt(++e.position);while(0!==r&&!G(r));break}if(G(r))break;for(t=e.position;0!==r&&!V(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&ec(e),Y.call(er,n)?er[n](e,n,i):ei(e,'unknown document directive "'+n+'"')}if(es(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,es(e,!0,-1)):a&&en(e,"directives end mark is expected"),ed(e,e.lineIndent-1,4,!1,!0),es(e,!0,-1),e.checkLineBreaks&&B.test(e.input.slice(o,e.position))&&ei(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&eu(e)){46===e.input.charCodeAt(e.position)&&(e.position+=3,es(e,!0,-1));return}e.position<e.length-1&&en(e,"end of the stream or a document separator is expected")}(n);return n.documents}var eg=Object.prototype.toString,em=Object.prototype.hasOwnProperty,ey={};ey[0]="\\0",ey[7]="\\a",ey[8]="\\b",ey[9]="\\t",ey[10]="\\n",ey[11]="\\v",ey[12]="\\f",ey[13]="\\r",ey[27]="\\e",ey[34]='\\"',ey[92]="\\\\",ey[133]="\\N",ey[160]="\\_",ey[8232]="\\L",ey[8233]="\\P";var eb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],eA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ev(e){this.schema=e.schema||U,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=i.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,o,a,l,c;if(null===t)return{};for(r=0,n={},o=(i=Object.keys(t)).length;r<o;r+=1)l=String(t[a=i[r]]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&em.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ek(e,t){for(var n,r=i.repeat(" ",t),o=0,a=-1,l="",c=e.length;o<c;)-1===(a=e.indexOf("\n",o))?(n=e.slice(o),o=c):(n=e.slice(o,a+1),o=a+1),n.length&&"\n"!==n&&(l+=r),l+=n;return l}function ew(e,t){return"\n"+i.repeat(" ",e.indent*t)}function eC(e){return 32===e||9===e}function ex(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function eI(e){return ex(e)&&65279!==e&&13!==e&&10!==e}function eO(e,t,n){var i=eI(e),r=i&&!eC(e);return(n?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!r)||eI(t)&&!eC(t)&&35===e||58===t&&r}function eS(e,t){var n,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?(i-55296)*1024+n-56320+65536:i}function ej(e){return/^\n* /.test(e)}function eT(e,t){var n=ej(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function eN(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function eF(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function eE(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r<o;r+=1)a=n[r],e.replacer&&(a=e.replacer.call(n,String(r),a)),(eL(e,t+1,a,!0,!0,!1,!0)||void 0===a&&eL(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=ew(e,t)),e.dump&&10===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=c,e.dump=l||"[]"}function eM(e,t,n){var i,r,a,l,c,s;for(a=0,l=(r=n?e.explicitTypes:e.implicitTypes).length;a<l;a+=1)if(((c=r[a]).instanceOf||c.predicate)&&(!c.instanceOf||"object"==typeof t&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(n?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(s=e.styleMap[c.tag]||c.defaultStyle,"[object Function]"===eg.call(c.represent))i=c.represent(t,s);else if(em.call(c.represent,s))i=c.represent[s](t,s);else throw new o("!<"+c.tag+'> tag resolver accepts not "'+s+'" style');e.dump=i}return!0}return!1}function eL(e,t,n,r,a,l,c){e.tag=null,e.dump=n,eM(e,n,!1)||eM(e,n,!0);var s,u=eg.call(e.dump),p=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var f,d,h,g="[object Object]"===u||"[object Array]"===u;if(g&&(h=-1!==(d=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||h||2!==e.indent&&t>0)&&(a=!1),h&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(g&&h&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),"[object Object]"===u)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(r=0,a=d.length;r<a;r+=1)u="",i&&""===p||(u+=ew(e,t)),c=n[l=d[r]],e.replacer&&(c=e.replacer.call(n,l,c)),eL(e,t+1,l,!0,!0,!0)&&((s=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=ew(e,t)),eL(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",u+=e.dump,p+=u));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,a),h&&(e.dump="&ref_"+d+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i<r;i+=1)l="",""!==c&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[o=u[i]],e.replacer&&(a=e.replacer.call(n,o,a)),eL(e,t,o,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),eL(e,t,a,!1,!1)&&(l+=e.dump,c+=l));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),h&&(e.dump="&ref_"+d+" "+e.dump));else if("[object Array]"===u)r&&0!==e.dump.length?(e.noArrayIndent&&!c&&t>0?eE(e,t-1,e.dump,a):eE(e,t,e.dump,a),h&&(e.dump="&ref_"+d+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i<r;i+=1)o=n[i],e.replacer&&(o=e.replacer.call(n,String(i),o)),(eL(e,t,o,!1,!1)||void 0===o&&eL(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),h&&(e.dump="&ref_"+d+" "+e.dump));else if("[object String]"===u)"?"!==e.tag&&(s=e.dump,e.dump=function(){if(0===s.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==eb.indexOf(s)||eA.test(s)))return 2===e.quotingType?'"'+s+'"':"'"+s+"'";var n=e.indent*Math.max(1,t),r=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n);switch(function(e,t,n,i,r,o,a,l){var c,s,u,p=0,f=null,d=!1,h=!1,g=-1!==i,m=-1,y=ex(c=eS(e,0))&&65279!==c&&!eC(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&!eC(s=eS(e,e.length-1))&&58!==s;if(t||a)for(u=0;u<e.length;p>=65536?u+=2:u++){if(!ex(p=eS(e,u)))return 5;y=y&&eO(p,f,l),f=p}else{for(u=0;u<e.length;p>=65536?u+=2:u++){if(10===(p=eS(e,u)))d=!0,g&&(h=h||u-m-1>i&&" "!==e[m+1],m=u);else if(!ex(p))return 5;y=y&&eO(p,f,l),f=p}h=h||g&&u-m-1>i&&" "!==e[m+1]}return d||h?n>9&&ej(e)?5:a?2===o?5:2:h?4:3:!y||a||r(e)?2===o?5:2:1}(s,l||e.flowLevel>-1&&t>=e.flowLevel,e.indent,r,function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!l,p)){case 1:return s;case 2:return"'"+s.replace(/'/g,"''")+"'";case 3:return"|"+eT(s,e.indent)+eN(ek(s,n));case 4:return">"+eT(s,e.indent)+eN(ek(function(e,t){for(var n,i,r,o=/(\n+)([^\n]*)/g,a=(n=-1!==(n=e.indexOf("\n"))?n:e.length,o.lastIndex=n,eF(e.slice(0,n),t)),l="\n"===e[0]||" "===e[0];r=o.exec(e);){var c=r[1],s=r[2];i=" "===s[0],a+=c+(l||i||""===s?"":"\n")+eF(s,t),l=i}return a}(s,r),n));case 5:return'"'+function(e){for(var t,n="",r=0,a=0;a<e.length;r>=65536?a+=2:a++)!(t=ey[r=eS(e,a)])&&ex(r)?(n+=e[a],r>=65536&&(n+=e[a+1])):n+=t||function(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new o("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+i.repeat("0",r-t.length)+t}(r);return n}(s)+'"';default:throw new o("impossible error: invalid scalar style")}}());else{if("[object Undefined]"===u||e.skipInvalid)return!1;throw new o("unacceptable kind of an object to dump "+u)}null!==e.tag&&"?"!==e.tag&&(f=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),f="!"===e.tag[0]?"!"+f:"tag:yaml.org,2002:"===f.slice(0,18)?"!!"+f.slice(18):"!<"+f+">",e.dump=f+" "+e.dump)}return!0}function e_(e,t){return function(){throw Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var eD=e_("safeLoad","load"),eq=e_("safeLoadAll","loadAll"),eU=e_("safeDump","dump");t.ZP={Type:p,Schema:d,FAILSAFE_SCHEMA:y,JSON_SCHEMA:x,CORE_SCHEMA:x,DEFAULT_SCHEMA:U,load:function(e,t){var n=eh(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new o("expected a single document in the stream, but found more")}},loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=eh(e,n);if("function"!=typeof t)return i;for(var r=0,o=i.length;r<o;r+=1)t(i[r])},dump:function(e,t){var n=new ev(t=t||{});n.noRefs||function(e,t){var n,i,r=[],o=[];for(function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t){if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o<a;o+=1)e(t[o],n,i);else for(o=0,a=(r=Object.keys(t)).length;o<a;o+=1)e(t[r[o]],n,i)}}(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=Array(i)}(e,n);var i=e;return(n.replacer&&(i=n.replacer.call({"":i},"",i)),eL(n,0,i,!0,!0))?n.dump+"\n":""},YAMLException:o,types:{binary:N,float:C,map:m,null:b,pairs:_,set:q,timestamp:S,bool:A,int:v,merge:j,omap:M,seq:g,str:h},safeLoad:eD,safeLoadAll:eq,safeDump:eU}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1664],{6101:function(e,t){"use strict";var n,r,o,u;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return s},ACTION_NAVIGATE:function(){return f},ACTION_PREFETCH:function(){return i},ACTION_REFRESH:function(){return l},ACTION_RESTORE:function(){return a},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return p}});let l="refresh",f="navigate",a="restore",c="server-patch",i="prefetch",s="fast-refresh",d="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(o=n||(n={})).AUTO="auto",o.FULL="full",o.TEMPORARY="temporary",(u=r||(r={})).fresh="fresh",u.reusable="reusable",u.expired="expired",u.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7670:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(1297),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4116:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return O}});let r=n(260),o=n(5893),u=r._(n(7294)),l=n(9975),f=n(2712),a=n(8547),c=n(4350),i=n(8109),s=n(4494),d=n(5716),p=n(388),y=n(7670),b=n(6220),h=n(6101),v=new Set;function _(e,t,n,r,o,u){if(u||(0,f.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(v.has(o))return;v.add(o)}(async()=>u?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function C(e){return"string"==typeof e?e:(0,a.formatUrl)(e)}let O=u.default.forwardRef(function(e,t){let n,r;let{href:a,as:v,children:O,prefetch:g=null,passHref:E,replace:j,shallow:P,scroll:T,locale:M,onClick:R,onMouseEnter:m,onTouchStart:A,legacyBehavior:k=!1,...I}=e;n=O,k&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let x=u.default.useContext(s.RouterContext),L=u.default.useContext(d.AppRouterContext),S=null!=x?x:L,N=!x,U=!1!==g,w=null===g?h.PrefetchKind.AUTO:h.PrefetchKind.FULL,{href:K,as:F}=u.default.useMemo(()=>{if(!x){let e=C(a);return{href:e,as:v?C(v):e}}let[e,t]=(0,l.resolveHref)(x,a,!0);return{href:e,as:v?(0,l.resolveHref)(x,v):t||e}},[x,a,v]),H=u.default.useRef(K),D=u.default.useRef(F);k&&(r=u.default.Children.only(n));let V=k?r&&"object"==typeof r&&r.ref:t,[q,z,B]=(0,p.useIntersection)({rootMargin:"200px"}),G=u.default.useCallback(e=>{(D.current!==F||H.current!==K)&&(B(),D.current=F,H.current=K),q(e),V&&("function"==typeof V?V(e):"object"==typeof V&&(V.current=e))},[F,V,K,B,q]);u.default.useEffect(()=>{S&&z&&U&&_(S,K,F,{locale:M},{kind:w},N)},[F,K,z,M,U,null==x?void 0:x.locale,S,N,w]);let Y={ref:G,onClick(e){k||"function"!=typeof R||R(e),k&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),S&&!e.defaultPrevented&&function(e,t,n,r,o,l,a,c,i){let{nodeName:s}=e.currentTarget;if("A"===s.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!i&&!(0,f.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==a||a;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:l,locale:c,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};i?u.default.startTransition(d):d()}(e,S,K,F,j,P,T,M,N)},onMouseEnter(e){k||"function"!=typeof m||m(e),k&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),S&&(U||!N)&&_(S,K,F,{locale:M,priority:!0,bypassPrefetchedCheck:!0},{kind:w},N)},onTouchStart:function(e){k||"function"!=typeof A||A(e),k&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),S&&(U||!N)&&_(S,K,F,{locale:M,priority:!0,bypassPrefetchedCheck:!0},{kind:w},N)}};if((0,c.isAbsoluteUrl)(F))Y.href=F;else if(!k||E||"a"===r.type&&!("href"in r.props)){let e=void 0!==M?M:null==x?void 0:x.locale,t=(null==x?void 0:x.isLocaleDomain)&&(0,y.getDomainLocale)(F,e,null==x?void 0:x.locales,null==x?void 0:x.domainLocales);Y.href=t||(0,b.addBasePath)((0,i.addLocale)(F,e,null==x?void 0:x.defaultLocale))}return k?u.default.cloneElement(r,Y):(0,o.jsx)("a",{...I,...Y,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return a}});let r=n(7294),o=n(460),u="function"==typeof IntersectionObserver,l=new Map,f=[];function a(e){let{rootRef:t,rootMargin:n,disabled:a}=e,c=a||!u,[i,s]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(u){if(c||i)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:u}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=f.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=l.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},f.push(n),l.set(n,t),t}(n);return u.set(e,t),o.observe(e),function(){if(u.delete(e),o.unobserve(e),0===u.size){o.disconnect(),l.delete(r);let e=f.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&f.splice(e,1)}}}(e,e=>e&&s(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!i){let e=(0,o.requestIdleCallback)(()=>s(!0));return()=>(0,o.cancelIdleCallback)(e)}},[c,n,t,i,d.current]),[p,i,(0,r.useCallback)(()=>{s(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1664:function(e,t,n){e.exports=n(4116)}}]);
|
@@ -1,9 +1,9 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1691],{8671:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});/**
|
2
2
|
* @license lucide-react v0.407.0 - ISC
|
3
3
|
*
|
4
4
|
* This source code is licensed under the ISC license.
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
6
|
-
*/let r=(0,t(998).Z)("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"}]])},1812:function(e,s,t){"use strict";t.d(s,{X:function(){return l}});var r=t(5893),n=t(7294);let a=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s},l=e=>{let{error:s,title:t="Error",onDismiss:l}=e,[i,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{s&&o(!1)},[s]),!s||i)return null;let c="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",c]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),l&&l()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},8764:function(e,s,t){"use strict";t.d(s,{RM:function(){return o},SC:function(){return c},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return i}});var r=t(5893),n=t(7294),a=t(2350);let l=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:s,className:(0,a.cn)("w-full caption-bottom text-base",t),...n})})});l.displayName="Table";let i=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("thead",{ref:s,className:(0,a.cn)("[&_tr]:border-b",t),...n})});i.displayName="TableHeader";let o=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tbody",{ref:s,className:(0,a.cn)("[&_tr:last-child]:border-0",t),...n})});o.displayName="TableBody",n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tfoot",{ref:s,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...n})}).displayName="TableFooter";let c=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tr",{ref:s,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...n})});c.displayName="TableRow";let d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("th",{ref:s,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",t),...n})});d.displayName="TableHead";let u=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("td",{ref:s,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...n})});u.displayName="TableCell",n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("caption",{ref:s,className:(0,a.cn)("mt-4 text-base text-muted-foreground",t),...n})}).displayName="TableCaption"},1691:function(e,s,t){"use strict";t.r(s),t.d(s,{Users:function(){return B}});var r=t(5893),n=t(7294),a=t(5697),l=t.n(a),i=t(
|
6
|
+
*/let r=(0,t(998).Z)("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"}]])},1812:function(e,s,t){"use strict";t.d(s,{X:function(){return l}});var r=t(5893),n=t(7294);let a=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s},l=e=>{let{error:s,title:t="Error",onDismiss:l}=e,[i,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{s&&o(!1)},[s]),!s||i)return null;let c="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",c]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),l&&l()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},8764:function(e,s,t){"use strict";t.d(s,{RM:function(){return o},SC:function(){return c},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return i}});var r=t(5893),n=t(7294),a=t(2350);let l=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:s,className:(0,a.cn)("w-full caption-bottom text-base",t),...n})})});l.displayName="Table";let i=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("thead",{ref:s,className:(0,a.cn)("[&_tr]:border-b",t),...n})});i.displayName="TableHeader";let o=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tbody",{ref:s,className:(0,a.cn)("[&_tr:last-child]:border-0",t),...n})});o.displayName="TableBody",n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tfoot",{ref:s,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...n})}).displayName="TableFooter";let c=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tr",{ref:s,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...n})});c.displayName="TableRow";let d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("th",{ref:s,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",t),...n})});d.displayName="TableHead";let u=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("td",{ref:s,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...n})});u.displayName="TableCell",n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("caption",{ref:s,className:(0,a.cn)("mt-4 text-base text-muted-foreground",t),...n})}).displayName="TableCaption"},1691:function(e,s,t){"use strict";t.r(s),t.d(s,{Users:function(){return B}});var r=t(5893),n=t(7294),a=t(5697),l=t.n(a),i=t(5739),o=t(1664),c=t.n(o),d=t(1163),u=t(803),m=t(8764),x=t(3081),h=t(3266),p=t(8969),g=t(6378),f=t(6856),b=t(1214),j=t(4545),v=t(6989),y=t(998);/**
|
7
7
|
* @license lucide-react v0.407.0 - ISC
|
8
8
|
*
|
9
9
|
* This source code is licensed under the ISC license.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1871,430],{9037:function(e,s,t){"use strict";t.r(s),t.d(s,{ClusterTable:function(){return O},Clusters:function(){return E},Status2Actions:function(){return z},enabledActions:function(){return W},filterClustersByName:function(){return M},handleVSCodeConnection:function(){return H}});var r=t(5893),l=t(7294),a=t(1163),n=t(5739),i=t(6989),c=t(1664),o=t.n(c),u=t(803),d=t(7673),h=t(8764),m=t(3266),x=t(7324),p=t(3081),f=t(4545),j=t(3626),y=t(998);/**
|
2
2
|
* @license lucide-react v0.407.0 - ISC
|
3
3
|
*
|
4
4
|
* This source code is licensed under the ISC license.
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2544],{2350:function(n,r,t){"use strict";t.d(r,{cn:function(){return c}});var u=t(512),e=t(8388);function c(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return(0,e.m6)((0,u.W)(r))}},1163:function(n,r,t){n.exports=t(6036)}}]);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2875,430],{6409:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});/**
|
2
2
|
* @license lucide-react v0.407.0 - ISC
|
3
3
|
*
|
4
4
|
* This source code is licensed under the ISC license.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3256],{5168:function(e,t,n){n.d(t,{ZP:function(){return e_}});var r=n(7462),o=n(3366),i=n(7294),l=n(512),a=n(4780);function s(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function u(...e){return i.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{s(e,t)})},e)}var c=function(e){return"string"==typeof e},d=function(e,t=[]){if(void 0===e)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n},p=function(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},f=function(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:i,className:a}=e;if(!t){let e=(0,l.Z)(null==n?void 0:n.className,a,null==i?void 0:i.className,null==o?void 0:o.className),t=(0,r.Z)({},null==n?void 0:n.style,null==i?void 0:i.style,null==o?void 0:o.style),s=(0,r.Z)({},n,i,o);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}let s=d((0,r.Z)({},i,o)),u=p(o),c=p(i),f=t(s),h=(0,l.Z)(null==f?void 0:f.className,null==n?void 0:n.className,a,null==i?void 0:i.className,null==o?void 0:o.className),v=(0,r.Z)({},null==f?void 0:f.style,null==n?void 0:n.style,null==i?void 0:i.style,null==o?void 0:o.style),m=(0,r.Z)({},f,n,c,u);return h.length>0&&(m.className=h),Object.keys(v).length>0&&(m.style=v),{props:m,internalRef:f.ref}};let h=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];var v=function(e){var t,n;let{elementType:i,externalSlotProps:l,ownerState:a,skipResolvingSlotProps:s=!1}=e,d=(0,o.Z)(e,h),p=s?{}:"function"==typeof l?l(a,void 0):l,{props:v,internalRef:m}=f((0,r.Z)({},d,{externalSlotProps:p})),E=u(m,null==p?void 0:p.ref,null==(t=e.additionalProps)?void 0:t.ref);return n=(0,r.Z)({},v,{ref:E}),void 0===i||c(i)?n:(0,r.Z)({},n,{ownerState:(0,r.Z)({},n.ownerState,a)})},m=n(957),E=n(9733),y=function(e,t=166){let n;function r(...o){clearTimeout(n),n=setTimeout(()=>{e.apply(this,o)},t)}return r.clear=()=>{clearTimeout(n)},r};function x(e){return e&&e.ownerDocument||document}function g(e){return x(e).defaultView||window}let b={},k=[];class Z{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Z}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function R(e){if(parseInt(i.version,10)>=19){var t;return(null==e||null==(t=e.props)?void 0:t.ref)||null}return(null==e?void 0:e.ref)||null}function P(e,t){return(P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var T=n(3935),S={disabled:!1},N=i.createContext(null),w="unmounted",C="exited",O="entering",M="entered",I="exiting",j=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=C,r.appearStatus=O):o=M:o=t.unmountOnExit||t.mountOnEnter?w:C,r.state={status:o},r.nextCallback=null,r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,P(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===w?{status:C}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==O&&n!==M&&(t=O):(n===O||n===M)&&(t=I)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===O){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:T.findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===C&&this.setState({status:w})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[T.findDOMNode(this),r],i=o[0],l=o[1],a=this.getTimeouts(),s=r?a.appear:a.enter;if(!e&&!n||S.disabled){this.safeSetState({status:M},function(){t.props.onEntered(i)});return}this.props.onEnter(i,l),this.safeSetState({status:O},function(){t.props.onEntering(i,l),t.onTransitionEnd(s,function(){t.safeSetState({status:M},function(){t.props.onEntered(i,l)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:T.findDOMNode(this);if(!t||S.disabled){this.safeSetState({status:C},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:I},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:C},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:T.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],l=o[1];this.props.addEndListener(i,l)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===w)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,o.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(N.Provider,{value:null},"function"==typeof n?n(e,r):i.cloneElement(i.Children.only(n),r))},t}(i.Component);function A(){}j.contextType=N,j.propTypes={},j.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:A,onEntering:A,onEntered:A,onExit:A,onExiting:A,onExited:A},j.UNMOUNTED=w,j.EXITED=C,j.ENTERING=O,j.ENTERED=M,j.EXITING=I;var D=n(7172),L=n(1941),F=function(e=null){let t=i.useContext(L.T);return t&&0!==Object.keys(t).length?t:e};let z=(0,D.Z)();var H=n(2418),B=n(2453);function U(){let e=function(e=z){return F(e)}(H.Z);return e[B.Z]||e}let q=e=>e.scrollTop;function W(e,t){var n,r;let{timeout:o,easing:i,style:l={}}=e;return{duration:null!=(n=l.transitionDuration)?n:"number"==typeof o?o:o[t.mode]||0,easing:null!=(r=l.transitionTimingFunction)?r:"object"==typeof i?i[t.mode]:i,delay:l.transitionDelay}}var _=n(5893);let K=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function V(e){return"scale(".concat(e,", ").concat(e**2,")")}let Y={entering:{opacity:1,transform:V(1)},entered:{opacity:1,transform:"none"}},X="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),G=i.forwardRef(function(e,t){let{addEndListener:n,appear:l=!0,children:a,easing:s,in:c,onEnter:d,onEntered:p,onEntering:f,onExit:h,onExited:v,onExiting:m,style:E,timeout:y="auto",TransitionComponent:x=j}=e,g=(0,o.Z)(e,K),P=function(){var e;let t=function(e,t){let n=i.useRef(b);return n.current===b&&(n.current=e(void 0)),n}(Z.create).current;return e=t.disposeEffect,i.useEffect(e,k),t}(),T=i.useRef(),S=U(),N=i.useRef(null),w=u(N,R(a),t),C=e=>t=>{if(e){let n=N.current;void 0===t?e(n):e(n,t)}},O=C(f),M=C((e,t)=>{let n;q(e);let{duration:r,delay:o,easing:i}=W({style:E,timeout:y,easing:s},{mode:"enter"});"auto"===y?(n=S.transitions.getAutoHeightDuration(e.clientHeight),T.current=n):n=r,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:o}),S.transitions.create("transform",{duration:X?n:.666*n,delay:o,easing:i})].join(","),d&&d(e,t)}),I=C(p),A=C(m),D=C(e=>{let t;let{duration:n,delay:r,easing:o}=W({style:E,timeout:y,easing:s},{mode:"exit"});"auto"===y?(t=S.transitions.getAutoHeightDuration(e.clientHeight),T.current=t):t=n,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:r}),S.transitions.create("transform",{duration:X?t:.666*t,delay:X?r:r||.333*t,easing:o})].join(","),e.style.opacity=0,e.style.transform=V(.75),h&&h(e)}),L=C(v);return(0,_.jsx)(x,(0,r.Z)({appear:l,in:c,nodeRef:N,onEnter:M,onEntered:I,onEntering:O,onExit:D,onExited:L,onExiting:A,addEndListener:e=>{"auto"===y&&P.start(T.current||0,e),n&&n(N.current,e)},timeout:"auto"===y?null:y},g,{children:(e,t)=>i.cloneElement(a,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:V(.75),visibility:"exited"!==e||c?void 0:"hidden"},Y[e],E,a.props.style),ref:w},t))}))});function J(e){let t=[],n=[];return Array.from(e.querySelectorAll('input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])')).forEach((e,r)=>{let o=function(e){let t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1===o||e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;let t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t)),n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e)||(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Q(){return!0}G.muiSupportAuto=!0;var $=function(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:l=J,isEnabled:a=Q,open:s}=e,c=i.useRef(!1),d=i.useRef(null),p=i.useRef(null),f=i.useRef(null),h=i.useRef(null),v=i.useRef(!1),m=i.useRef(null),E=u(R(t),m),y=i.useRef(null);i.useEffect(()=>{s&&m.current&&(v.current=!n)},[n,s]),i.useEffect(()=>{if(!s||!m.current)return;let e=x(m.current);return!m.current.contains(e.activeElement)&&(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),v.current&&m.current.focus()),()=>{o||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[s]),i.useEffect(()=>{if(!s||!m.current)return;let e=x(m.current),t=t=>{y.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,p.current&&p.current.focus())},n=()=>{let t=m.current;if(null===t)return;if(!e.hasFocus()||!a()||c.current){c.current=!1;return}if(t.contains(e.activeElement)||r&&e.activeElement!==d.current&&e.activeElement!==p.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!v.current)return;let n=[];if((e.activeElement===d.current||e.activeElement===p.current)&&(n=l(m.current)),n.length>0){var o,i;let e=!!((null==(o=y.current)?void 0:o.shiftKey)&&(null==(i=y.current)?void 0:i.key)==="Tab"),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);let o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,o,a,s,l]);let g=e=>{null===f.current&&(f.current=e.relatedTarget),v.current=!0};return(0,_.jsxs)(i.Fragment,{children:[(0,_.jsx)("div",{tabIndex:s?0:-1,onFocus:g,ref:d,"data-testid":"sentinelStart"}),i.cloneElement(t,{ref:E,onFocus:e=>{null===f.current&&(f.current=e.relatedTarget),v.current=!0,h.current=e.target;let n=t.props.onFocus;n&&n(e)}}),(0,_.jsx)("div",{tabIndex:s?0:-1,onFocus:g,ref:p,"data-testid":"sentinelEnd"})]})};let ee="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,et=i.forwardRef(function(e,t){let{children:n,container:r,disablePortal:o=!1}=e,[l,a]=i.useState(null),c=u(i.isValidElement(n)?R(n):null,t);return(ee(()=>{!o&&a(("function"==typeof r?r():r)||document.body)},[r,o]),ee(()=>{if(l&&!o)return s(t,l),()=>{s(t,null)}},[t,l,o]),o)?i.isValidElement(n)?i.cloneElement(n,{ref:c}):(0,_.jsx)(i.Fragment,{children:n}):(0,_.jsx)(i.Fragment,{children:l?T.createPortal(n,l):l})}),en=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],er={entering:{opacity:1},entered:{opacity:1}},eo=i.forwardRef(function(e,t){let n=U(),l={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:c,easing:d,in:p,onEnter:f,onEntered:h,onEntering:v,onExit:m,onExited:E,onExiting:y,style:x,timeout:g=l,TransitionComponent:b=j}=e,k=(0,o.Z)(e,en),Z=i.useRef(null),P=u(Z,R(c),t),T=e=>t=>{if(e){let n=Z.current;void 0===t?e(n):e(n,t)}},S=T(v),N=T((e,t)=>{q(e);let r=W({style:x,timeout:g,easing:d},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),f&&f(e,t)}),w=T(h),C=T(y),O=T(e=>{let t=W({style:x,timeout:g,easing:d},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),m&&m(e)}),M=T(E);return(0,_.jsx)(b,(0,r.Z)({appear:s,in:p,nodeRef:Z,onEnter:N,onEntered:w,onEntering:S,onExit:O,onExited:M,onExiting:C,addEndListener:e=>{a&&a(Z.current,e)},timeout:g},k,{children:(e,t)=>i.cloneElement(c,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||p?void 0:"hidden"},er[e],x,c.props.style),ref:P},t))}))});var ei=n(1588),el=n(7621);function ea(e){return(0,el.ZP)("MuiBackdrop",e)}(0,ei.Z)("MuiBackdrop",["root","invisible"]);let es=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],eu=e=>{let{classes:t,invisible:n}=e;return(0,a.Z)({root:["root",n&&"invisible"]},ea,t)},ec=(0,m.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,r.Z)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})}),ed=i.forwardRef(function(e,t){var n,i,a;let s=(0,E.i)({props:e,name:"MuiBackdrop"}),{children:u,className:c,component:d="div",components:p={},componentsProps:f={},invisible:h=!1,open:v,slotProps:m={},slots:y={},TransitionComponent:x=eo,transitionDuration:g}=s,b=(0,o.Z)(s,es),k=(0,r.Z)({},s,{component:d,invisible:h}),Z=eu(k),R=null!=(n=m.root)?n:f.root;return(0,_.jsx)(x,(0,r.Z)({in:v,timeout:g},b,{children:(0,_.jsx)(ec,(0,r.Z)({"aria-hidden":!0},R,{as:null!=(i=null!=(a=y.root)?a:p.Root)?i:d,className:(0,l.Z)(Z.root,c,null==R?void 0:R.className),ownerState:(0,r.Z)({},k,null==R?void 0:R.ownerState),classes:Z,ref:t,children:u}))}))});var ep=function(e){let t=i.useRef(e);return ee(()=>{t.current=e}),i.useRef((...e)=>(0,t.current)(...e)).current};function ef(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function eh(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ev(e){return parseInt(g(e).getComputedStyle(e).paddingRight,10)||0}function em(e,t,n,r,o){let i=[t,n,...r];[].forEach.call(e.children,e=>{let t=-1===i.indexOf(e),n=!function(e){let t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&eh(e,o)})}function eE(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}class ey{add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&eh(e.modalRef,!1);let r=function(e){let t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);em(t,e.mount,e.modalRef,r,!0);let o=eE(this.containers,e=>e.container===t);return -1!==o?this.containers[o].modals.push(e):this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n}mount(e,t){let n=eE(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=function(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e;if(function(e){let t=x(e);return t.body===e?g(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){let e=function(e){let t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(x(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(ev(r)+e,"px");let t=x(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(ev(t)+e,"px")})}if(r.parentNode instanceof DocumentFragment)e=x(r).body;else{let t=r.parentElement,n=g(r);e=(null==t?void 0:t.nodeName)==="HTML"&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}(r,t))}remove(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=this.modals.indexOf(e);if(-1===n)return n;let r=eE(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&eh(e.modalRef,t),em(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=o.modals[o.modals.length-1];e.modalRef&&eh(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}}let ex=new ey;var eg=function(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,manager:l=ex,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:c,children:p,onClose:f,open:h,rootRef:v}=e,m=i.useRef({}),E=i.useRef(null),y=i.useRef(null),g=u(y,v),[b,k]=i.useState(!h),Z=!!p&&p.props.hasOwnProperty("in"),R=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(R=!1);let P=()=>x(E.current),T=()=>(m.current.modalRef=y.current,m.current.mount=E.current,m.current),S=()=>{l.mount(T(),{disableScrollLock:o}),y.current&&(y.current.scrollTop=0)},N=ep(()=>{let e=("function"==typeof t?t():t)||P().body;l.add(T(),e),y.current&&S()}),w=i.useCallback(()=>l.isTopModal(T()),[l]),C=ep(e=>{E.current=e,e&&(h&&w()?S():y.current&&eh(y.current,R))}),O=i.useCallback(()=>{l.remove(T(),R)},[R,l]);i.useEffect(()=>()=>{O()},[O]),i.useEffect(()=>{h?N():Z&&a||O()},[h,O,Z,a,N]);let M=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&w()&&!n&&(t.stopPropagation(),f&&f(t,"escapeKeyDown"))},I=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&f&&f(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=d(e);delete n.onTransitionEnter,delete n.onTransitionExited;let o=(0,r.Z)({},n,t);return(0,r.Z)({role:"presentation"},o,{onKeyDown:M(o),ref:g})},getBackdropProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.Z)({"aria-hidden":!0},e,{onClick:I(e),open:h})},getTransitionProps:()=>({onEnter:ef(()=>{k(!1),s&&s()},null==p?void 0:p.props.onEnter),onExited:ef(()=>{k(!0),c&&c(),a&&O()},null==p?void 0:p.props.onExited)}),rootRef:g,portalRef:C,isTopModal:w,exited:b,hasTransition:Z}};function eb(e){return(0,el.ZP)("MuiModal",e)}(0,ei.Z)("MuiModal",["root","hidden","backdrop"]);let ek=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],eZ=e=>{let{open:t,exited:n,classes:r}=e;return(0,a.Z)({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},eb,r)},eR=(0,m.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),eP=(0,m.ZP)(ed,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),eT=i.forwardRef(function(e,t){var n,a,s,u,c,d;let p=(0,E.i)({name:"MuiModal",props:e}),{BackdropComponent:f=eP,BackdropProps:h,className:m,closeAfterTransition:y=!1,children:x,container:g,component:b,components:k={},componentsProps:Z={},disableAutoFocus:R=!1,disableEnforceFocus:P=!1,disableEscapeKeyDown:T=!1,disablePortal:S=!1,disableRestoreFocus:N=!1,disableScrollLock:w=!1,hideBackdrop:C=!1,keepMounted:O=!1,onBackdropClick:M,open:I,slotProps:j,slots:A}=p,D=(0,o.Z)(p,ek),L=(0,r.Z)({},p,{closeAfterTransition:y,disableAutoFocus:R,disableEnforceFocus:P,disableEscapeKeyDown:T,disablePortal:S,disableRestoreFocus:N,disableScrollLock:w,hideBackdrop:C,keepMounted:O}),{getRootProps:F,getBackdropProps:z,getTransitionProps:H,portalRef:B,isTopModal:U,exited:q,hasTransition:W}=eg((0,r.Z)({},L,{rootRef:t})),K=(0,r.Z)({},L,{exited:q}),V=eZ(K),Y={};if(void 0===x.props.tabIndex&&(Y.tabIndex="-1"),W){let{onEnter:e,onExited:t}=H();Y.onEnter=e,Y.onExited=t}let X=null!=(n=null!=(a=null==A?void 0:A.root)?a:k.Root)?n:eR,G=null!=(s=null!=(u=null==A?void 0:A.backdrop)?u:k.Backdrop)?s:f,J=null!=(c=null==j?void 0:j.root)?c:Z.root,Q=null!=(d=null==j?void 0:j.backdrop)?d:Z.backdrop,ee=v({elementType:X,externalSlotProps:J,externalForwardedProps:D,getSlotProps:F,additionalProps:{ref:t,as:b},ownerState:K,className:(0,l.Z)(m,null==J?void 0:J.className,null==V?void 0:V.root,!K.open&&K.exited&&(null==V?void 0:V.hidden))}),en=v({elementType:G,externalSlotProps:Q,additionalProps:h,getSlotProps:e=>z((0,r.Z)({},e,{onClick:t=>{M&&M(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,l.Z)(null==Q?void 0:Q.className,null==h?void 0:h.className,null==V?void 0:V.backdrop),ownerState:K});return O||I||W&&!q?(0,_.jsx)(et,{ref:B,container:g,disablePortal:S,children:(0,_.jsxs)(X,(0,r.Z)({},ee,{children:[!C&&f?(0,_.jsx)(G,(0,r.Z)({},en)):null,(0,_.jsx)($,{disableEnforceFocus:P,disableAutoFocus:R,disableRestoreFocus:N,isEnabled:U,open:I,children:i.cloneElement(x,Y)})]}))}):null});var eS=n(2101),eN=e=>((e<1?5.11916*e**2:4.5*Math.log(e+1)+2)/100).toFixed(2);function ew(e){return(0,el.ZP)("MuiPaper",e)}(0,ei.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);let eC=["className","component","elevation","square","variant"],eO=e=>{let{square:t,elevation:n,variant:r,classes:o}=e;return(0,a.Z)({root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]},ew,o)},eM=(0,m.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})(e=>{var t;let{theme:n,ownerState:o}=e;return(0,r.Z)({backgroundColor:(n.vars||n).palette.background.paper,color:(n.vars||n).palette.text.primary,transition:n.transitions.create("box-shadow")},!o.square&&{borderRadius:n.shape.borderRadius},"outlined"===o.variant&&{border:"1px solid ".concat((n.vars||n).palette.divider)},"elevation"===o.variant&&(0,r.Z)({boxShadow:(n.vars||n).shadows[o.elevation]},!n.vars&&"dark"===n.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,eS.Fq)("#fff",eN(o.elevation)),", ").concat((0,eS.Fq)("#fff",eN(o.elevation)),")")},n.vars&&{backgroundImage:null==(t=n.vars.overlays)?void 0:t[o.elevation]}))}),eI=i.forwardRef(function(e,t){let n=(0,E.i)({props:e,name:"MuiPaper"}),{className:i,component:a="div",elevation:s=1,square:u=!1,variant:c="elevation"}=n,d=(0,o.Z)(n,eC),p=(0,r.Z)({},n,{component:a,elevation:s,square:u,variant:c}),f=eO(p);return(0,_.jsx)(eM,(0,r.Z)({as:a,ownerState:p,className:(0,l.Z)(f.root,i),ref:t},d))});function ej(e){return(0,el.ZP)("MuiPopover",e)}(0,ei.Z)("MuiPopover",["root","paper"]);let eA=["onEntering"],eD=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],eL=["slotProps"];function eF(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function ez(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function eH(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?"".concat(e,"px"):e).join(" ")}function eB(e){return"function"==typeof e?e():e}let eU=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"],paper:["paper"]},ej,t)},eq=(0,m.ZP)(eT,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eW=(0,m.ZP)(eI,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0});var e_=i.forwardRef(function(e,t){var n,a,s;let d=(0,E.i)({props:e,name:"MuiPopover"}),{action:p,anchorEl:f,anchorOrigin:h={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:b="anchorEl",children:k,className:Z,container:R,elevation:P=8,marginThreshold:T=16,open:S,PaperProps:N={},slots:w,slotProps:C,transformOrigin:O={vertical:"top",horizontal:"left"},TransitionComponent:M=G,transitionDuration:I="auto",TransitionProps:{onEntering:j}={},disableScrollLock:A=!1}=d,D=(0,o.Z)(d.TransitionProps,eA),L=(0,o.Z)(d,eD),F=null!=(n=null==C?void 0:C.paper)?n:N,z=i.useRef(),H=u(z,F.ref),B=(0,r.Z)({},d,{anchorOrigin:h,anchorReference:b,elevation:P,marginThreshold:T,externalPaperSlotProps:F,transformOrigin:O,TransitionComponent:M,transitionDuration:I,TransitionProps:D}),U=eU(B),q=i.useCallback(()=>{if("anchorPosition"===b)return m;let e=eB(f),t=(e&&1===e.nodeType?e:x(z.current).body).getBoundingClientRect();return{top:t.top+eF(t,h.vertical),left:t.left+ez(t,h.horizontal)}},[f,h.horizontal,h.vertical,m,b]),W=i.useCallback(e=>({vertical:eF(e,O.vertical),horizontal:ez(e,O.horizontal)}),[O.horizontal,O.vertical]),K=i.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=W(t);if("none"===b)return{top:null,left:null,transformOrigin:eH(n)};let r=q(),o=r.top-n.vertical,i=r.left-n.horizontal,l=o+t.height,a=i+t.width,s=g(eB(f)),u=s.innerHeight-T,c=s.innerWidth-T;if(null!==T&&o<T){let e=o-T;o-=e,n.vertical+=e}else if(null!==T&&l>u){let e=l-u;o-=e,n.vertical+=e}if(null!==T&&i<T){let e=i-T;i-=e,n.horizontal+=e}else if(a>c){let e=a-c;i-=e,n.horizontal+=e}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(i),"px"),transformOrigin:eH(n)}},[f,b,q,W,T]),[V,Y]=i.useState(S),X=i.useCallback(()=>{let e=z.current;if(!e)return;let t=K(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,Y(!0)},[K]);i.useEffect(()=>(A&&window.addEventListener("scroll",X),()=>window.removeEventListener("scroll",X)),[f,A,X]),i.useEffect(()=>{S&&X()}),i.useImperativeHandle(p,()=>S?{updatePosition:()=>{X()}}:null,[S,X]),i.useEffect(()=>{if(!S)return;let e=y(()=>{X()}),t=g(f);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[f,S,X]);let J=I;"auto"!==I||M.muiSupportAuto||(J=void 0);let Q=R||(f?x(eB(f)).body:void 0),$=null!=(a=null==w?void 0:w.root)?a:eq,ee=null!=(s=null==w?void 0:w.paper)?s:eW,et=v({elementType:ee,externalSlotProps:(0,r.Z)({},F,{style:V?F.style:(0,r.Z)({},F.style,{opacity:0})}),additionalProps:{elevation:P,ref:H},ownerState:B,className:(0,l.Z)(U.paper,null==F?void 0:F.className)}),en=v({elementType:$,externalSlotProps:(null==C?void 0:C.root)||{},externalForwardedProps:L,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:Q,open:S},ownerState:B,className:(0,l.Z)(U.root,Z)}),{slotProps:er}=en,eo=(0,o.Z)(en,eL);return(0,_.jsx)($,(0,r.Z)({},eo,!c($)&&{slotProps:er,disableScrollLock:A},{children:(0,_.jsx)(M,(0,r.Z)({appear:!0,in:S,onEntering:(e,t)=>{j&&j(e,t),X()},onExited:()=>{Y(!1)},timeout:J},D,{children:(0,_.jsx)(ee,(0,r.Z)({},et,{children:k}))}))}))})},8507:function(e,t,n){n.d(t,{Z:function(){return r}});/**
|
2
|
+
* @license lucide-react v0.407.0 - ISC
|
3
|
+
*
|
4
|
+
* This source code is licensed under the ISC license.
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
6
|
+
*/let r=(0,n(998).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},8586:function(e,t,n){n.d(t,{Z:function(){return r}});/**
|
7
|
+
* @license lucide-react v0.407.0 - ISC
|
8
|
+
*
|
9
|
+
* This source code is licensed under the ISC license.
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
11
|
+
*/let r=(0,n(998).Z)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3698],{3850:function(r,t,n){n.d(t,{E9:function(){return k},J$:function(){return x},PC:function(){return g},Ps:function(){return s},QT:function(){return w},Vp:function(){return d},W2:function(){return h},Ye:function(){return u},aD:function(){return p},eU:function(){return c},fp:function(){return l},fy:function(){return j},h0:function(){return v},mU:function(){return f},oy:function(){return y},r7:function(){return a}});var e=n(5893);n(7294);var o=n(8507),i=n(8586);function s(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"})})}function h(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function x(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("circle",{cx:"10",cy:"10",r:"8"})})}function u(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("path",{d:"M6 12l4 4 8-8"})})}function l(r){return(0,e.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("rect",{x:"6",y:"5",width:"4",height:"14",rx:"1"}),(0,e.jsx)("rect",{x:"14",y:"5",width:"4",height:"14",rx:"1"})]})}function c(r){return(0,e.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("ellipse",{cx:"12",cy:"4",rx:"8",ry:"2"}),(0,e.jsx)("ellipse",{cx:"12",cy:"20",rx:"8",ry:"2"}),(0,e.jsx)("path",{d:"M4 4v16"}),(0,e.jsx)("path",{d:"M20 4v16"}),(0,e.jsx)("path",{d:"M9 9h6"}),(0,e.jsx)("path",{d:"M9 12h6"}),(0,e.jsx)("path",{d:"M9 15h6"})]})}function w(r){return(0,e.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),(0,e.jsx)("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),(0,e.jsx)("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),(0,e.jsx)("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]})}function d(r){return(0,e.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"}),(0,e.jsx)("rect",{width:"20",height:"14",x:"2",y:"6",rx:"2"})]})}function g(r){return(0,e.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}),(0,e.jsx)("rect",{x:"9",y:"9",width:"6",height:"6"}),(0,e.jsx)("line",{x1:"9",y1:"1",x2:"9",y2:"4"}),(0,e.jsx)("line",{x1:"15",y1:"1",x2:"15",y2:"4"}),(0,e.jsx)("line",{x1:"9",y1:"20",x2:"9",y2:"23"}),(0,e.jsx)("line",{x1:"15",y1:"20",x2:"15",y2:"23"}),(0,e.jsx)("line",{x1:"20",y1:"9",x2:"23",y2:"9"}),(0,e.jsx)("line",{x1:"20",y1:"14",x2:"23",y2:"14"}),(0,e.jsx)("line",{x1:"1",y1:"9",x2:"4",y2:"9"}),(0,e.jsx)("line",{x1:"1",y1:"14",x2:"4",y2:"14"})]})}function v(r){return(0,e.jsxs)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,e.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,e.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function j(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,e.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function a(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})})}function f(r){return(0,e.jsx)("svg",{...r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:(0,e.jsx)("path",{transform:"scale(0.85) translate(1.8, 1.8)",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function k(r){return(0,e.jsx)("svg",{...r,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsxs)("g",{children:[(0,e.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,e.jsx)("path",{d:"M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5zM19 20v-3H6.5a1.5 1.5 0 0 0 0 3H19zM10 4H6a1 1 0 0 0-1 1v10.337A3.486 3.486 0 0 1 6.5 15H19V4h-2v8l-3.5-2-3.5 2V4z"})]})})}let p=o.Z,y=i.Z},3001:function(r,t,n){n.d(t,{X:function(){return o}});var e=n(7294);function o(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:768,[t,n]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let t=()=>{n(window.innerWidth<r)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[r]),t}}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785,430],{2557:function(e,s,t){"use strict";t.d(s,{I:function(){return l}});var r=t(5893),a=t(7294),n=t(2350);let l=a.forwardRef((e,s)=>{let{className:t,type:a,...l}=e;return(0,r.jsx)("input",{type:a,className:(0,n.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:s,...l})});l.displayName="Input"},6185:function(e,s,t){"use strict";t.d(s,{_:function(){return c}});var r=t(5893),a=t(7294),n=t(9102),l=t(2003),i=t(2350);let o=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.f,{ref:s,className:(0,i.cn)(o(),t),...a})});c.displayName=n.f.displayName},3785:function(e,s,t){"use strict";t.r(s),t.d(s,{NewWorkspace:function(){return b}});var r=t(5893),a=t(7294),n=t(1163),l=t(1664),i=t.n(l),o=t(5152),c=t.n(o),u=t(7324),d=t(803),f=t(2557),m=t(6185),p=t(7673);let x=c()(()=>Promise.all([t.e(616),t.e(5739),t.e(804),t.e(1272),t.e(3947),t.e(6989),t.e(3698),t.e(9470),t.e(8969),t.e(1043),t.e(6601),t.e(938),t.e(1141)]).then(t.bind(t,1141)).then(e=>e.WorkspaceEditor),{loadableGenerated:{webpack:()=>[1141]},ssr:!1});function b(){(0,n.useRouter)();let[e,s]=(0,a.useState)(""),[t,l]=(0,a.useState)(!1),[o,c]=(0,a.useState)({}),[b,h]=(0,a.useState)(!0);(0,a.useEffect)(()=>{v()},[]);let v=async()=>{try{let e=await (0,u.fX)();c(e)}catch(e){console.error("Failed to fetch existing workspaces:",e)}finally{h(!1)}},w=()=>{e.trim()&&!k&&l(!0)},k=e.trim()&&o.hasOwnProperty(e.trim()),y=e.trim()&&!k;return t?(0,r.jsx)(x,{workspaceName:e,isNewWorkspace:!0}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between mb-4 h-5",children:(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(i(),{href:"/workspaces",className:"text-sky-blue hover:underline",children:"Workspaces"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsx)("span",{className:"text-sky-blue",children:"New Workspace"})]})}),(0,r.jsxs)(p.Zb,{className:"max-w-md",children:[(0,r.jsx)(p.Ol,{children:(0,r.jsx)(p.ll,{className:"text-base font-normal",children:"Create New Workspace"})}),(0,r.jsxs)(p.aY,{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(m._,{htmlFor:"workspace-name",className:"text-sm font-normal",children:"Workspace name"}),(0,r.jsx)(f.I,{id:"workspace-name",value:e,onChange:e=>s(e.target.value),placeholder:"Enter workspace name",autoFocus:!0,onKeyPress:e=>{"Enter"===e.key&&y&&w()}}),k?(0,r.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:['Workspace "',e,'" already exists.'," ",(0,r.jsx)(i(),{href:"/workspaces/".concat(e),className:"text-blue-600 hover:underline",children:"View the workspace"})]}):(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Choose a unique name for your workspace"})]}),(0,r.jsx)(d.z,{onClick:w,disabled:!y||b,className:"w-full bg-blue-600 hover:bg-blue-700 text-white disabled:bg-gray-300 disabled:text-gray-500",children:b?"Loading...":"Next: Configure Workspace"})]})]})]})}},1163:function(e,s,t){e.exports=t(6036)},9102:function(e,s,t){"use strict";t.d(s,{f:function(){return i}});var r=t(7294),a=t(5320),n=t(5893),l=r.forwardRef((e,s)=>(0,n.jsx)(a.WV.label,{...e,ref:s,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));l.displayName="Label";var i=l},2003:function(e,s,t){"use strict";t.d(s,{j:function(){return l}});var r=t(512);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=r.W,l=(e,s)=>t=>{var r;if((null==s?void 0:s.variants)==null)return n(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:l,defaultVariants:i}=s,o=Object.keys(l).map(e=>{let s=null==t?void 0:t[e],r=null==i?void 0:i[e];if(null===s)return null;let n=a(s)||a(r);return l[e][n]}),c=t&&Object.entries(t).reduce((e,s)=>{let[t,r]=s;return void 0===r||(e[t]=r),e},{});return n(e,o,null==s?void 0:null===(r=s.compoundVariants)||void 0===r?void 0:r.reduce((e,s)=>{let{class:t,className:r,...a}=s;return Object.entries(a).every(e=>{let[s,t]=e;return Array.isArray(t)?t.includes({...i,...c}[s]):({...i,...c})[s]===t})?[...e,t,r]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}}]);
|