@spaceandtimelabs/makeinfinite-ui 0.60.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +49 -17
- package/dist/makeinfinite-ui.es.js +85 -102
- package/dist/makeinfinite-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -160,23 +160,24 @@ export declare const APIHandler: (baseUrl: string) => {
|
|
|
160
160
|
initializeProject: (projectName: string) => Promise<Response>;
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
export declare const APIProxyHandler: (baseUrl: string) => {
|
|
163
|
+
export declare const APIProxyHandler: (baseUrl: string, projectHmac?: string) => {
|
|
164
164
|
getSecrets: () => Promise<Response>;
|
|
165
165
|
putSecret: (secretReference: string, secret: Omit<Secret, "creator_user_id" | "secret_reference">) => Promise<Response>;
|
|
166
166
|
getSecret: (secretReference: string) => Promise<Response>;
|
|
167
167
|
deleteSecret: (secretReference: string) => Promise<Response>;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
168
|
+
getAllTierKeyMaps: () => Promise<Response>;
|
|
169
|
+
getTierKeyMap: (miniappName: string, customHmac?: string) => Promise<Response>;
|
|
170
|
+
putTierKeyMap: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
|
|
171
|
+
getTierKeyMapForTier: (miniappName: string, tier: string, customHmac?: string) => Promise<Response>;
|
|
172
|
+
deleteTierKeyMap: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
|
|
173
|
+
getTierAssignments: (miniappName: string, customHmac?: string) => Promise<Response>;
|
|
174
|
+
putTierAssignment: (miniappName: string, userId: string, tier: string, customHmac?: string) => Promise<Response>;
|
|
175
|
+
getTierAssignment: (miniappName: string, userId: string, customHmac?: string) => Promise<Response>;
|
|
176
|
+
deleteTierAssignment: (miniappName: string, userId: string, customHmac?: string) => Promise<Response>;
|
|
177
|
+
getRateLimits: (miniappName: string, customHmac?: string) => Promise<Response>;
|
|
178
|
+
putRateLimit: (miniappName: string, tier: string, secretReference: string, rateLimit: Pick<RateLimit, "window_ms" | "limit">, customHmac?: string) => Promise<Response>;
|
|
179
|
+
getRateLimit: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
|
|
180
|
+
deleteRateLimit: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
|
|
180
181
|
createProxyFetch: (config: ProxyFetchConfig) => (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
181
182
|
createProxyGetView: (config: ProxyGetViewConfig) => (schema: string, viewName: string, parameters?: {
|
|
182
183
|
[key: string]: string | number | boolean;
|
|
@@ -868,6 +869,12 @@ inset?: boolean;
|
|
|
868
869
|
|
|
869
870
|
declare const DropdownMenuTrigger: ForwardRefExoticComponent<DropdownMenu_2.DropdownMenuTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
870
871
|
|
|
872
|
+
export declare type FetchProjectResponse = {
|
|
873
|
+
status: string;
|
|
874
|
+
projects: Project[];
|
|
875
|
+
time_taken: string;
|
|
876
|
+
};
|
|
877
|
+
|
|
871
878
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
872
879
|
|
|
873
880
|
declare const FormControl: ForwardRefExoticComponent<Omit<SlotProps & RefAttributes<HTMLElement>, "ref"> & RefAttributes<HTMLElement>>;
|
|
@@ -1030,6 +1037,16 @@ declare const PopoverTrigger: ForwardRefExoticComponent<Popover_2.PopoverTrigger
|
|
|
1030
1037
|
|
|
1031
1038
|
declare const Progress: ForwardRefExoticComponent<Omit<Progress_2.ProgressProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1032
1039
|
|
|
1040
|
+
export declare type Project = {
|
|
1041
|
+
clone_url: string;
|
|
1042
|
+
project_name: string;
|
|
1043
|
+
creator_sxt_uuid: string;
|
|
1044
|
+
created_at_s: number;
|
|
1045
|
+
updated_at_s: number;
|
|
1046
|
+
hmac: string;
|
|
1047
|
+
extra_meta?: string | null;
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1033
1050
|
export declare const ProjectProvider: (props: {
|
|
1034
1051
|
config: any;
|
|
1035
1052
|
metadata?: any;
|
|
@@ -1037,12 +1054,12 @@ export declare const ProjectProvider: (props: {
|
|
|
1037
1054
|
}) => JSX_2.Element;
|
|
1038
1055
|
|
|
1039
1056
|
/** Configuration for the proxy fetch client */
|
|
1040
|
-
declare type ProxyFetchConfig = {
|
|
1057
|
+
export declare type ProxyFetchConfig = {
|
|
1041
1058
|
miniappName: string;
|
|
1042
1059
|
};
|
|
1043
1060
|
|
|
1044
1061
|
/** Configuration for the proxy getView client */
|
|
1045
|
-
declare type ProxyGetViewConfig = {
|
|
1062
|
+
export declare type ProxyGetViewConfig = {
|
|
1046
1063
|
miniappName: string;
|
|
1047
1064
|
gwProxyUrl: string;
|
|
1048
1065
|
};
|
|
@@ -1052,7 +1069,7 @@ declare const RadioGroup: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroup
|
|
|
1052
1069
|
declare const RadioGroupItem: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroupItemProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
1053
1070
|
|
|
1054
1071
|
/** Represents rate limit configuration for a tier */
|
|
1055
|
-
declare type RateLimit = {
|
|
1072
|
+
export declare type RateLimit = {
|
|
1056
1073
|
miniapp_name: string;
|
|
1057
1074
|
secret_reference: string;
|
|
1058
1075
|
tier: string;
|
|
@@ -1145,7 +1162,7 @@ declare const ScrollArea: ForwardRefExoticComponent<Omit<ScrollArea_2.ScrollArea
|
|
|
1145
1162
|
declare const ScrollBar: ForwardRefExoticComponent<Omit<ScrollArea_2.ScrollAreaScrollbarProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
1146
1163
|
|
|
1147
1164
|
/** Represents a secret configuration for API access */
|
|
1148
|
-
declare type Secret = {
|
|
1165
|
+
export declare type Secret = {
|
|
1149
1166
|
creator_user_id: string;
|
|
1150
1167
|
api_domain: string;
|
|
1151
1168
|
api_path_prefix: string;
|
|
@@ -1307,6 +1324,21 @@ declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<
|
|
|
1307
1324
|
declare interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
1308
1325
|
}
|
|
1309
1326
|
|
|
1327
|
+
/** Represents a tier assignment for a user */
|
|
1328
|
+
export declare type TierAssignment = {
|
|
1329
|
+
miniapp_name: string;
|
|
1330
|
+
user_id: string;
|
|
1331
|
+
tier: string;
|
|
1332
|
+
};
|
|
1333
|
+
|
|
1334
|
+
/** Represents a mapping between a miniapp tier and a secret */
|
|
1335
|
+
export declare type TierMapping = {
|
|
1336
|
+
miniapp_name: string;
|
|
1337
|
+
creator_id: string;
|
|
1338
|
+
secret_reference: string;
|
|
1339
|
+
tier: string;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1310
1342
|
declare const Toaster: ({ ...props }: ToasterProps) => JSX_2.Element;
|
|
1311
1343
|
|
|
1312
1344
|
declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
|
|
@@ -89294,177 +89294,160 @@ const cke = (e) => {
|
|
|
89294
89294
|
}
|
|
89295
89295
|
})
|
|
89296
89296
|
};
|
|
89297
|
-
}, _fe = (e) => {
|
|
89298
|
-
const
|
|
89297
|
+
}, _fe = (e, t) => {
|
|
89298
|
+
const n = e, r = (S = !1, C) => {
|
|
89299
|
+
const I = {
|
|
89300
|
+
"Content-Type": "application/json"
|
|
89301
|
+
};
|
|
89302
|
+
if (S) {
|
|
89303
|
+
const A = C || t;
|
|
89304
|
+
A && (I["x-sxt-project-hmac"] = A);
|
|
89305
|
+
}
|
|
89306
|
+
return I;
|
|
89307
|
+
};
|
|
89299
89308
|
return {
|
|
89300
89309
|
// Secrets
|
|
89301
|
-
getSecrets: async () => await fetch(`${
|
|
89310
|
+
getSecrets: async () => await fetch(`${n}/config/secrets`, {
|
|
89302
89311
|
method: "GET",
|
|
89303
|
-
headers:
|
|
89304
|
-
"Content-Type": "application/json"
|
|
89305
|
-
}
|
|
89312
|
+
headers: r(!1)
|
|
89306
89313
|
}),
|
|
89307
|
-
putSecret: async (
|
|
89314
|
+
putSecret: async (S, C) => await fetch(`${n}/config/secrets/${S}`, {
|
|
89308
89315
|
method: "PUT",
|
|
89309
|
-
headers:
|
|
89310
|
-
|
|
89311
|
-
},
|
|
89312
|
-
body: JSON.stringify(k)
|
|
89316
|
+
headers: r(!1),
|
|
89317
|
+
body: JSON.stringify(C)
|
|
89313
89318
|
}),
|
|
89314
|
-
getSecret: async (
|
|
89319
|
+
getSecret: async (S) => await fetch(`${n}/config/secrets/${S}`, {
|
|
89315
89320
|
method: "GET",
|
|
89316
|
-
headers:
|
|
89317
|
-
"Content-Type": "application/json"
|
|
89318
|
-
}
|
|
89321
|
+
headers: r(!1)
|
|
89319
89322
|
}),
|
|
89320
|
-
deleteSecret: async (
|
|
89323
|
+
deleteSecret: async (S) => await fetch(`${n}/config/secrets/${S}`, {
|
|
89321
89324
|
method: "DELETE",
|
|
89322
|
-
headers:
|
|
89323
|
-
"Content-Type": "application/json"
|
|
89324
|
-
}
|
|
89325
|
+
headers: r(!1)
|
|
89325
89326
|
}),
|
|
89326
89327
|
// Tier-Key Mappings
|
|
89327
|
-
|
|
89328
|
-
`${
|
|
89328
|
+
getAllTierKeyMaps: async () => await fetch(
|
|
89329
|
+
`${n}/config/miniapps/*/tier-key-map`,
|
|
89329
89330
|
{
|
|
89330
89331
|
method: "GET",
|
|
89331
|
-
headers:
|
|
89332
|
-
|
|
89333
|
-
|
|
89332
|
+
headers: r(!1)
|
|
89333
|
+
// No HMAC needed for wildcard
|
|
89334
|
+
}
|
|
89335
|
+
),
|
|
89336
|
+
getTierKeyMap: async (S, C) => await fetch(
|
|
89337
|
+
`${n}/config/miniapps/${S}/tier-key-map`,
|
|
89338
|
+
{
|
|
89339
|
+
method: "GET",
|
|
89340
|
+
headers: r(!0, C)
|
|
89334
89341
|
}
|
|
89335
89342
|
),
|
|
89336
|
-
putTierKeyMap: async (
|
|
89337
|
-
`${
|
|
89343
|
+
putTierKeyMap: async (S, C, I, A) => await fetch(
|
|
89344
|
+
`${n}/config/miniapps/${S}/tier-key-map/${C}`,
|
|
89338
89345
|
{
|
|
89339
89346
|
method: "PUT",
|
|
89340
|
-
headers:
|
|
89341
|
-
|
|
89342
|
-
},
|
|
89343
|
-
body: JSON.stringify({ secret_reference: x })
|
|
89347
|
+
headers: r(!0, A),
|
|
89348
|
+
body: JSON.stringify({ secret_reference: I })
|
|
89344
89349
|
}
|
|
89345
89350
|
),
|
|
89346
|
-
getTierKeyMapForTier: async (
|
|
89347
|
-
`${
|
|
89351
|
+
getTierKeyMapForTier: async (S, C, I) => await fetch(
|
|
89352
|
+
`${n}/config/miniapps/${S}/tier-key-map/${C}`,
|
|
89348
89353
|
{
|
|
89349
89354
|
method: "GET",
|
|
89350
|
-
headers:
|
|
89351
|
-
"Content-Type": "application/json"
|
|
89352
|
-
}
|
|
89355
|
+
headers: r(!0, I)
|
|
89353
89356
|
}
|
|
89354
89357
|
),
|
|
89355
|
-
deleteTierKeyMap: async (
|
|
89356
|
-
`${
|
|
89358
|
+
deleteTierKeyMap: async (S, C, I, A) => await fetch(
|
|
89359
|
+
`${n}/config/miniapps/${S}/tier-key-map/${C}/${I}`,
|
|
89357
89360
|
{
|
|
89358
89361
|
method: "DELETE",
|
|
89359
|
-
headers:
|
|
89360
|
-
"Content-Type": "application/json"
|
|
89361
|
-
}
|
|
89362
|
+
headers: r(!0, A)
|
|
89362
89363
|
}
|
|
89363
89364
|
),
|
|
89364
89365
|
// Tier Assignments
|
|
89365
|
-
getTierAssignments: async (
|
|
89366
|
-
`${
|
|
89366
|
+
getTierAssignments: async (S, C) => await fetch(
|
|
89367
|
+
`${n}/config/miniapps/${S}/assignments`,
|
|
89367
89368
|
{
|
|
89368
89369
|
method: "GET",
|
|
89369
|
-
headers:
|
|
89370
|
-
"Content-Type": "application/json"
|
|
89371
|
-
}
|
|
89370
|
+
headers: r(!0, C)
|
|
89372
89371
|
}
|
|
89373
89372
|
),
|
|
89374
|
-
putTierAssignment: async (
|
|
89375
|
-
`${
|
|
89373
|
+
putTierAssignment: async (S, C, I, A) => await fetch(
|
|
89374
|
+
`${n}/config/miniapps/${S}/assignments/${C}`,
|
|
89376
89375
|
{
|
|
89377
89376
|
method: "PUT",
|
|
89378
|
-
headers:
|
|
89379
|
-
|
|
89380
|
-
},
|
|
89381
|
-
body: JSON.stringify({ tier: x })
|
|
89377
|
+
headers: r(!0, A),
|
|
89378
|
+
body: JSON.stringify({ tier: I })
|
|
89382
89379
|
}
|
|
89383
89380
|
),
|
|
89384
|
-
getTierAssignment: async (
|
|
89385
|
-
`${
|
|
89381
|
+
getTierAssignment: async (S, C, I) => await fetch(
|
|
89382
|
+
`${n}/config/miniapps/${S}/assignments/${C}`,
|
|
89386
89383
|
{
|
|
89387
89384
|
method: "GET",
|
|
89388
|
-
headers:
|
|
89389
|
-
"Content-Type": "application/json"
|
|
89390
|
-
}
|
|
89385
|
+
headers: r(!0, I)
|
|
89391
89386
|
}
|
|
89392
89387
|
),
|
|
89393
|
-
deleteTierAssignment: async (
|
|
89394
|
-
`${
|
|
89388
|
+
deleteTierAssignment: async (S, C, I) => await fetch(
|
|
89389
|
+
`${n}/config/miniapps/${S}/assignments/${C}`,
|
|
89395
89390
|
{
|
|
89396
89391
|
method: "DELETE",
|
|
89397
|
-
headers:
|
|
89398
|
-
"Content-Type": "application/json"
|
|
89399
|
-
}
|
|
89392
|
+
headers: r(!0, I)
|
|
89400
89393
|
}
|
|
89401
89394
|
),
|
|
89402
89395
|
// Rate Limits
|
|
89403
|
-
getRateLimits: async (
|
|
89404
|
-
`${
|
|
89396
|
+
getRateLimits: async (S, C) => await fetch(
|
|
89397
|
+
`${n}/config/miniapps/${S}/rate-limits`,
|
|
89405
89398
|
{
|
|
89406
89399
|
method: "GET",
|
|
89407
|
-
headers:
|
|
89408
|
-
"Content-Type": "application/json"
|
|
89409
|
-
}
|
|
89400
|
+
headers: r(!0, C)
|
|
89410
89401
|
}
|
|
89411
89402
|
),
|
|
89412
|
-
putRateLimit: async (
|
|
89413
|
-
`${
|
|
89403
|
+
putRateLimit: async (S, C, I, A, T) => await fetch(
|
|
89404
|
+
`${n}/config/miniapps/${S}/rate-limits/${C}/${I}`,
|
|
89414
89405
|
{
|
|
89415
89406
|
method: "PUT",
|
|
89416
|
-
headers:
|
|
89417
|
-
|
|
89418
|
-
},
|
|
89419
|
-
body: JSON.stringify(S)
|
|
89407
|
+
headers: r(!0, T),
|
|
89408
|
+
body: JSON.stringify(A)
|
|
89420
89409
|
}
|
|
89421
89410
|
),
|
|
89422
|
-
getRateLimit: async (
|
|
89423
|
-
`${
|
|
89411
|
+
getRateLimit: async (S, C, I, A) => await fetch(
|
|
89412
|
+
`${n}/config/miniapps/${S}/rate-limits/${C}/${I}`,
|
|
89424
89413
|
{
|
|
89425
89414
|
method: "GET",
|
|
89426
|
-
headers:
|
|
89427
|
-
"Content-Type": "application/json"
|
|
89428
|
-
}
|
|
89415
|
+
headers: r(!0, A)
|
|
89429
89416
|
}
|
|
89430
89417
|
),
|
|
89431
|
-
deleteRateLimit: async (
|
|
89432
|
-
`${
|
|
89418
|
+
deleteRateLimit: async (S, C, I, A) => await fetch(
|
|
89419
|
+
`${n}/config/miniapps/${S}/rate-limits/${C}/${I}`,
|
|
89433
89420
|
{
|
|
89434
89421
|
method: "DELETE",
|
|
89435
|
-
headers:
|
|
89436
|
-
"Content-Type": "application/json"
|
|
89437
|
-
}
|
|
89422
|
+
headers: r(!0, A)
|
|
89438
89423
|
}
|
|
89439
89424
|
),
|
|
89440
89425
|
// Proxy
|
|
89441
|
-
createProxyFetch: (
|
|
89442
|
-
const
|
|
89426
|
+
createProxyFetch: (S) => async (C, I) => {
|
|
89427
|
+
const A = C instanceof URL ? C : new URL(C.toString());
|
|
89443
89428
|
return await fetch(
|
|
89444
|
-
`${
|
|
89445
|
-
|
|
89429
|
+
`${n}/proxy/${S.miniappName}/${A.host}${A.pathname}${A.search}${A.hash}`,
|
|
89430
|
+
I
|
|
89446
89431
|
);
|
|
89447
89432
|
},
|
|
89448
|
-
createProxyGetView: (
|
|
89449
|
-
const
|
|
89450
|
-
return async (
|
|
89451
|
-
let
|
|
89452
|
-
|
|
89453
|
-
const
|
|
89454
|
-
`${
|
|
89433
|
+
createProxyGetView: (S) => {
|
|
89434
|
+
const C = new URL(S.gwProxyUrl).hostname;
|
|
89435
|
+
return async (I, A, T = {}) => {
|
|
89436
|
+
let P = `SELECT * FROM ${I}.${A}`;
|
|
89437
|
+
T && Object.keys(T).length > 0 && (P += `(${Object.entries(T).map(([R, $]) => `'${R}=${$}'`).join(",")})`);
|
|
89438
|
+
const E = await fetch(
|
|
89439
|
+
`${n}/proxy/${S.miniappName}/${C}/v1/sql/no-injected-authz`,
|
|
89455
89440
|
{
|
|
89456
89441
|
method: "POST",
|
|
89457
|
-
headers:
|
|
89458
|
-
"Content-Type": "application/json"
|
|
89459
|
-
},
|
|
89442
|
+
headers: r(!1),
|
|
89460
89443
|
body: JSON.stringify({
|
|
89461
|
-
sqlText:
|
|
89444
|
+
sqlText: P
|
|
89462
89445
|
})
|
|
89463
89446
|
}
|
|
89464
89447
|
);
|
|
89465
|
-
if (!
|
|
89466
|
-
throw new Error(`Failed to fetch view: ${
|
|
89467
|
-
return await
|
|
89448
|
+
if (!E.ok)
|
|
89449
|
+
throw new Error(`Failed to fetch view: ${E.statusText}`);
|
|
89450
|
+
return await E.json();
|
|
89468
89451
|
};
|
|
89469
89452
|
}
|
|
89470
89453
|
};
|
|
@@ -89495,7 +89478,7 @@ const b7t = (e) => {
|
|
|
89495
89478
|
}), [i, o] = Mt(
|
|
89496
89479
|
() => mfe(e.config.GW_BASE_URL)
|
|
89497
89480
|
), [s, l] = Mt(!1), [c, u] = Mt(""), [d, h] = Mt(""), [f, p] = Mt(""), [v, y] = Mt(gfe()), g = w7t(e.config.API_BASE_URL), m = cke(e.config.API_BASE_URL), _ = g || m, [b, k] = Mt(
|
|
89498
|
-
() => _fe(e.config.PROXY_API_BASE_URL)
|
|
89481
|
+
() => _fe(e.config.PROXY_API_BASE_URL, t == null ? void 0 : t.projectHmac)
|
|
89499
89482
|
), [x, S] = Mt(null), [C, I] = Mt(null), A = () => {
|
|
89500
89483
|
y(gfe());
|
|
89501
89484
|
};
|
|
@@ -89509,7 +89492,7 @@ const b7t = (e) => {
|
|
|
89509
89492
|
return;
|
|
89510
89493
|
}
|
|
89511
89494
|
o(mfe(r.GW_BASE_URL)), k((T) => {
|
|
89512
|
-
const P = _fe(r.PROXY_API_BASE_URL), E = P.createProxyFetch({
|
|
89495
|
+
const P = _fe(r.PROXY_API_BASE_URL, t == null ? void 0 : t.projectHmac), E = P.createProxyFetch({
|
|
89513
89496
|
miniappName: t.projectName
|
|
89514
89497
|
}), N = async (B, F) => E(B, F);
|
|
89515
89498
|
S(() => N);
|
|
@@ -8072,7 +8072,7 @@ object-assign
|
|
|
8072
8072
|
*/var Mr=typeof Symbol=="function"&&Symbol.for,_Q=Mr?Symbol.for("react.element"):60103,wQ=Mr?Symbol.for("react.portal"):60106,mj=Mr?Symbol.for("react.fragment"):60107,_j=Mr?Symbol.for("react.strict_mode"):60108,wj=Mr?Symbol.for("react.profiler"):60114,bj=Mr?Symbol.for("react.provider"):60109,kj=Mr?Symbol.for("react.context"):60110,bQ=Mr?Symbol.for("react.async_mode"):60111,xj=Mr?Symbol.for("react.concurrent_mode"):60111,Sj=Mr?Symbol.for("react.forward_ref"):60112,Mj=Mr?Symbol.for("react.suspense"):60113,Git=Mr?Symbol.for("react.suspense_list"):60120,Cj=Mr?Symbol.for("react.memo"):60115,Nj=Mr?Symbol.for("react.lazy"):60116,Wit=Mr?Symbol.for("react.block"):60121,Uit=Mr?Symbol.for("react.fundamental"):60117,Yit=Mr?Symbol.for("react.responder"):60118,Xit=Mr?Symbol.for("react.scope"):60119;function Ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _Q:switch(e=e.type,e){case bQ:case xj:case mj:case wj:case _j:case Mj:return e;default:switch(e=e&&e.$$typeof,e){case kj:case Sj:case Nj:case Cj:case bj:return e;default:return t}}case wQ:return t}}}function R_e(e){return Ja(e)===xj}pn.AsyncMode=bQ,pn.ConcurrentMode=xj,pn.ContextConsumer=kj,pn.ContextProvider=bj,pn.Element=_Q,pn.ForwardRef=Sj,pn.Fragment=mj,pn.Lazy=Nj,pn.Memo=Cj,pn.Portal=wQ,pn.Profiler=wj,pn.StrictMode=_j,pn.Suspense=Mj,pn.isAsyncMode=function(e){return R_e(e)||Ja(e)===bQ},pn.isConcurrentMode=R_e,pn.isContextConsumer=function(e){return Ja(e)===kj},pn.isContextProvider=function(e){return Ja(e)===bj},pn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_Q},pn.isForwardRef=function(e){return Ja(e)===Sj},pn.isFragment=function(e){return Ja(e)===mj},pn.isLazy=function(e){return Ja(e)===Nj},pn.isMemo=function(e){return Ja(e)===Cj},pn.isPortal=function(e){return Ja(e)===wQ},pn.isProfiler=function(e){return Ja(e)===wj},pn.isStrictMode=function(e){return Ja(e)===_j},pn.isSuspense=function(e){return Ja(e)===Mj},pn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===mj||e===xj||e===wj||e===_j||e===Mj||e===Git||typeof e=="object"&&e!==null&&(e.$$typeof===Nj||e.$$typeof===Cj||e.$$typeof===bj||e.$$typeof===kj||e.$$typeof===Sj||e.$$typeof===Uit||e.$$typeof===Yit||e.$$typeof===Xit||e.$$typeof===Wit)},pn.typeOf=Ja,P_e.exports=pn;var kQ=P_e.exports;function Zit(e){function t(ee,H,te,ce,Q){for(var he=0,Z=0,se=0,fe=0,oe,ae,X=0,U=0,le,me=le=oe=0,_e=0,Y=0,ie=0,de=0,Ie=te.length,ye=Ie-1,xe,Le="",Fe="",Tt="",j="",E;_e<Ie;){if(ae=te.charCodeAt(_e),_e===ye&&Z+fe+se+he!==0&&(Z!==0&&(ae=Z===47?10:47),fe=se=he=0,Ie++,ye++),Z+fe+se+he===0){if(_e===ye&&(0<Y&&(Le=Le.replace(h,"")),0<Le.trim().length)){switch(ae){case 32:case 9:case 59:case 13:case 10:break;default:Le+=te.charAt(_e)}ae=59}switch(ae){case 123:for(Le=Le.trim(),oe=Le.charCodeAt(0),le=1,de=++_e;_e<Ie;){switch(ae=te.charCodeAt(_e)){case 123:le++;break;case 125:le--;break;case 47:switch(ae=te.charCodeAt(_e+1)){case 42:case 47:e:{for(me=_e+1;me<ye;++me)switch(te.charCodeAt(me)){case 47:if(ae===42&&te.charCodeAt(me-1)===42&&_e+2!==me){_e=me+1;break e}break;case 10:if(ae===47){_e=me+1;break e}}_e=me}}break;case 91:ae++;case 40:ae++;case 34:case 39:for(;_e++<ye&&te.charCodeAt(_e)!==ae;);}if(le===0)break;_e++}switch(le=te.substring(de,_e),oe===0&&(oe=(Le=Le.replace(d,"").trim()).charCodeAt(0)),oe){case 64:switch(0<Y&&(Le=Le.replace(h,"")),ae=Le.charCodeAt(1),ae){case 100:case 109:case 115:case 45:Y=H;break;default:Y=z}if(le=t(H,Y,le,ae,Q+1),de=le.length,0<B&&(Y=n(z,Le,ie),E=s(3,le,Y,H,T,R,de,ae,Q,ce),Le=Y.join(""),E!==void 0&&(de=(le=E.trim()).length)===0&&(ae=0,le="")),0<de)switch(ae){case 115:Le=Le.replace(x,o);case 100:case 109:case 45:le=Le+"{"+le+"}";break;case 107:Le=Le.replace(m,"$1 $2"),le=Le+"{"+le+"}",le=$===1||$===2&&i("@"+le,3)?"@-webkit-"+le+"@"+le:"@"+le;break;default:le=Le+le,ce===112&&(le=(Fe+=le,""))}else le="";break;default:le=t(H,n(H,Le,ie),le,ce,Q+1)}Tt+=le,le=ie=Y=me=oe=0,Le="",ae=te.charCodeAt(++_e);break;case 125:case 59:if(Le=(0<Y?Le.replace(h,""):Le).trim(),1<(de=Le.length))switch(me===0&&(oe=Le.charCodeAt(0),oe===45||96<oe&&123>oe)&&(de=(Le=Le.replace(" ",":")).length),0<B&&(E=s(1,Le,H,ee,T,R,Fe.length,ce,Q,ce))!==void 0&&(de=(Le=E.trim()).length)===0&&(Le="\0\0"),oe=Le.charCodeAt(0),ae=Le.charCodeAt(1),oe){case 0:break;case 64:if(ae===105||ae===99){j+=Le+te.charAt(_e);break}default:Le.charCodeAt(de-1)!==58&&(Fe+=a(Le,oe,ae,Le.charCodeAt(2)))}ie=Y=me=oe=0,Le="",ae=te.charCodeAt(++_e)}}switch(ae){case 13:case 10:Z===47?Z=0:1+oe===0&&ce!==107&&0<Le.length&&(Y=1,Le+="\0"),0<B*G&&s(0,Le,H,ee,T,R,Fe.length,ce,Q,ce),R=1,T++;break;case 59:case 125:if(Z+fe+se+he===0){R++;break}default:switch(R++,xe=te.charAt(_e),ae){case 9:case 32:if(fe+he+Z===0)switch(X){case 44:case 58:case 9:case 32:xe="";break;default:ae!==32&&(xe=" ")}break;case 0:xe="\\0";break;case 12:xe="\\f";break;case 11:xe="\\v";break;case 38:fe+Z+he===0&&(Y=ie=1,xe="\f"+xe);break;case 108:if(fe+Z+he+P===0&&0<me)switch(_e-me){case 2:X===112&&te.charCodeAt(_e-3)===58&&(P=X);case 8:U===111&&(P=U)}break;case 58:fe+Z+he===0&&(me=_e);break;case 44:Z+se+fe+he===0&&(Y=1,xe+="\r");break;case 34:case 39:Z===0&&(fe=fe===ae?0:fe===0?ae:fe);break;case 91:fe+Z+se===0&&he++;break;case 93:fe+Z+se===0&&he--;break;case 41:fe+Z+he===0&&se--;break;case 40:if(fe+Z+he===0){if(oe===0)switch(2*X+3*U){case 533:break;default:oe=1}se++}break;case 64:Z+se+fe+he+me+le===0&&(le=1);break;case 42:case 47:if(!(0<fe+he+se))switch(Z){case 0:switch(2*ae+3*te.charCodeAt(_e+1)){case 235:Z=47;break;case 220:de=_e,Z=42}break;case 42:ae===47&&X===42&&de+2!==_e&&(te.charCodeAt(de+2)===33&&(Fe+=te.substring(de,_e+1)),xe="",Z=0)}}Z===0&&(Le+=xe)}U=X,X=ae,_e++}if(de=Fe.length,0<de){if(Y=H,0<B&&(E=s(2,Fe,Y,ee,T,R,de,ce,Q,ce),E!==void 0&&(Fe=E).length===0))return j+Fe+Tt;if(Fe=Y.join(",")+"{"+Fe+"}",$*P!==0){switch($!==2||i(Fe,2)||(P=0),P){case 111:Fe=Fe.replace(b,":-moz-$1")+Fe;break;case 112:Fe=Fe.replace(_,"::-webkit-input-$1")+Fe.replace(_,"::-moz-$1")+Fe.replace(_,":-ms-input-$1")+Fe}P=0}}return j+Fe+Tt}function n(ee,H,te){var ce=H.trim().split(y);H=ce;var Q=ce.length,he=ee.length;switch(he){case 0:case 1:var Z=0;for(ee=he===0?"":ee[0]+" ";Z<Q;++Z)H[Z]=r(ee,H[Z],te).trim();break;default:var se=Z=0;for(H=[];Z<Q;++Z)for(var fe=0;fe<he;++fe)H[se++]=r(ee[fe]+" ",ce[Z],te).trim()}return H}function r(ee,H,te){var ce=H.charCodeAt(0);switch(33>ce&&(ce=(H=H.trim()).charCodeAt(0)),ce){case 38:return H.replace(g,"$1"+ee.trim());case 58:return ee.trim()+H.replace(g,"$1"+ee.trim());default:if(0<1*te&&0<H.indexOf("\f"))return H.replace(g,(ee.charCodeAt(0)===58?"":"$1")+ee.trim())}return ee+H}function a(ee,H,te,ce){var Q=ee+";",he=2*H+3*te+4*ce;if(he===944){ee=Q.indexOf(":",9)+1;var Z=Q.substring(ee,Q.length-1).trim();return Z=Q.substring(0,ee).trim()+Z+";",$===1||$===2&&i(Z,1)?"-webkit-"+Z+Z:Z}if($===0||$===2&&!i(Q,1))return Q;switch(he){case 1015:return Q.charCodeAt(10)===97?"-webkit-"+Q+Q:Q;case 951:return Q.charCodeAt(3)===116?"-webkit-"+Q+Q:Q;case 963:return Q.charCodeAt(5)===110?"-webkit-"+Q+Q:Q;case 1009:if(Q.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+Q+Q;case 978:return"-webkit-"+Q+"-moz-"+Q+Q;case 1019:case 983:return"-webkit-"+Q+"-moz-"+Q+"-ms-"+Q+Q;case 883:if(Q.charCodeAt(8)===45)return"-webkit-"+Q+Q;if(0<Q.indexOf("image-set(",11))return Q.replace(A,"$1-webkit-$2")+Q;break;case 932:if(Q.charCodeAt(4)===45)switch(Q.charCodeAt(5)){case 103:return"-webkit-box-"+Q.replace("-grow","")+"-webkit-"+Q+"-ms-"+Q.replace("grow","positive")+Q;case 115:return"-webkit-"+Q+"-ms-"+Q.replace("shrink","negative")+Q;case 98:return"-webkit-"+Q+"-ms-"+Q.replace("basis","preferred-size")+Q}return"-webkit-"+Q+"-ms-"+Q+Q;case 964:return"-webkit-"+Q+"-ms-flex-"+Q+Q;case 1023:if(Q.charCodeAt(8)!==99)break;return Z=Q.substring(Q.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+Z+"-webkit-"+Q+"-ms-flex-pack"+Z+Q;case 1005:return p.test(Q)?Q.replace(f,":-webkit-")+Q.replace(f,":-moz-")+Q:Q;case 1e3:switch(Z=Q.substring(13).trim(),H=Z.indexOf("-")+1,Z.charCodeAt(0)+Z.charCodeAt(H)){case 226:Z=Q.replace(k,"tb");break;case 232:Z=Q.replace(k,"tb-rl");break;case 220:Z=Q.replace(k,"lr");break;default:return Q}return"-webkit-"+Q+"-ms-"+Z+Q;case 1017:if(Q.indexOf("sticky",9)===-1)break;case 975:switch(H=(Q=ee).length-10,Z=(Q.charCodeAt(H)===33?Q.substring(0,H):Q).substring(ee.indexOf(":",7)+1).trim(),he=Z.charCodeAt(0)+(Z.charCodeAt(7)|0)){case 203:if(111>Z.charCodeAt(8))break;case 115:Q=Q.replace(Z,"-webkit-"+Z)+";"+Q;break;case 207:case 102:Q=Q.replace(Z,"-webkit-"+(102<he?"inline-":"")+"box")+";"+Q.replace(Z,"-webkit-"+Z)+";"+Q.replace(Z,"-ms-"+Z+"box")+";"+Q}return Q+";";case 938:if(Q.charCodeAt(5)===45)switch(Q.charCodeAt(6)){case 105:return Z=Q.replace("-items",""),"-webkit-"+Q+"-webkit-box-"+Z+"-ms-flex-"+Z+Q;case 115:return"-webkit-"+Q+"-ms-flex-item-"+Q.replace(C,"")+Q;default:return"-webkit-"+Q+"-ms-flex-line-pack"+Q.replace("align-content","").replace(C,"")+Q}break;case 973:case 989:if(Q.charCodeAt(3)!==45||Q.charCodeAt(4)===122)break;case 931:case 953:if(L.test(ee)===!0)return(Z=ee.substring(ee.indexOf(":")+1)).charCodeAt(0)===115?a(ee.replace("stretch","fill-available"),H,te,ce).replace(":fill-available",":stretch"):Q.replace(Z,"-webkit-"+Z)+Q.replace(Z,"-moz-"+Z.replace("fill-",""))+Q;break;case 962:if(Q="-webkit-"+Q+(Q.charCodeAt(5)===102?"-ms-"+Q:"")+Q,te+ce===211&&Q.charCodeAt(13)===105&&0<Q.indexOf("transform",10))return Q.substring(0,Q.indexOf(";",27)+1).replace(v,"$1-webkit-$2")+Q}return Q}function i(ee,H){var te=ee.indexOf(H===1?":":"{"),ce=ee.substring(0,H!==3?te:10);return te=ee.substring(te+1,ee.length-1),q(H!==2?ce:ce.replace(N,"$1"),te,H)}function o(ee,H){var te=a(H,H.charCodeAt(0),H.charCodeAt(1),H.charCodeAt(2));return te!==H+";"?te.replace(S," or ($1)").substring(4):"("+H+")"}function s(ee,H,te,ce,Q,he,Z,se,fe,oe){for(var ae=0,X=H,U;ae<B;++ae)switch(U=V[ae].call(u,ee,X,te,ce,Q,he,Z,se,fe,oe)){case void 0:case!1:case!0:case null:break;default:X=U}if(X!==H)return X}function c(ee){switch(ee){case void 0:case null:B=V.length=0;break;default:if(typeof ee=="function")V[B++]=ee;else if(typeof ee=="object")for(var H=0,te=ee.length;H<te;++H)c(ee[H]);else G=!!ee|0}return c}function l(ee){return ee=ee.prefix,ee!==void 0&&(q=null,ee?typeof ee!="function"?$=1:($=2,q=ee):$=0),l}function u(ee,H){var te=ee;if(33>te.charCodeAt(0)&&(te=te.trim()),W=te,te=[W],0<B){var ce=s(-1,H,te,te,T,R,0,0,0,0);ce!==void 0&&typeof ce=="string"&&(H=ce)}var Q=t(z,te,H,0,0);return 0<B&&(ce=s(-2,Q,te,te,T,R,Q.length,0,0,0),ce!==void 0&&(Q=ce)),W="",P=0,R=T=1,Q}var d=/^\0+/g,h=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,v=/([,: ])(transform)/g,y=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,_=/::(place)/g,b=/:(read-only)/g,k=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,C=/-self|flex-/g,N=/[^]*?(:[rp][el]a[\w-]+)[^]*/,L=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,R=1,T=1,P=0,$=1,z=[],V=[],B=0,q=null,G=0,W="";return u.use=c,u.set=l,e!==void 0&&l(e),u}var Kit={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Jit(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Qit=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,$_e=Jit(function(e){return Qit.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),xQ=kQ,eot={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tot={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},not={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},O_e={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},SQ={};SQ[xQ.ForwardRef]=not,SQ[xQ.Memo]=O_e;function z_e(e){return xQ.isMemo(e)?O_e:SQ[e.$$typeof]||eot}var rot=Object.defineProperty,aot=Object.getOwnPropertyNames,F_e=Object.getOwnPropertySymbols,iot=Object.getOwnPropertyDescriptor,oot=Object.getPrototypeOf,B_e=Object.prototype;function V_e(e,t,n){if(typeof t!="string"){if(B_e){var r=oot(t);r&&r!==B_e&&V_e(e,r,n)}var a=aot(t);F_e&&(a=a.concat(F_e(t)));for(var i=z_e(e),o=z_e(t),s=0;s<a.length;++s){var c=a[s];if(!tot[c]&&!(n&&n[c])&&!(o&&o[c])&&!(i&&i[c])){var l=iot(t,c);try{rot(e,c,l)}catch{}}}}return e}var sot=V_e;const cot=Py(sot);function gc(){return(gc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var j_e=function(e,t){for(var n=[e[0]],r=0,a=t.length;r<a;r+=1)n.push(t[r],e[r+1]);return n},MQ=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!kQ.typeOf(e)},Ij=Object.freeze([]),Al=Object.freeze({});function pm(e){return typeof e=="function"}function H_e(e){return e.displayName||e.name||"Component"}function CQ(e){return e&&typeof e.styledComponentId=="string"}var E0=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",NQ=typeof window<"u"&&"HTMLElement"in window,lot=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""&&process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY));function vm(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var uot=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,a=0;a<n;a++)r+=this.groupSizes[a];return r},t.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var a=this.groupSizes,i=a.length,o=i;n>=o;)(o<<=1)<0&&vm(16,""+n);this.groupSizes=new Uint32Array(o),this.groupSizes.set(a),this.length=o;for(var s=i;s<o;s++)this.groupSizes[s]=0}for(var c=this.indexOfGroup(n+1),l=0,u=r.length;l<u;l++)this.tag.insertRule(c,r[l])&&(this.groupSizes[n]++,c++)},t.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],a=this.indexOfGroup(n),i=a+r;this.groupSizes[n]=0;for(var o=a;o<i;o++)this.tag.deleteRule(a)}},t.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var a=this.groupSizes[n],i=this.indexOfGroup(n),o=i+a,s=i;s<o;s++)r+=this.tag.getRule(s)+`/*!sc*/
|
|
8073
8073
|
`;return r},e}(),Lj=new Map,Aj=new Map,ym=1,Tj=function(e){if(Lj.has(e))return Lj.get(e);for(;Aj.has(ym);)ym++;var t=ym++;return Lj.set(e,t),Aj.set(t,e),t},dot=function(e){return Aj.get(e)},hot=function(e,t){t>=ym&&(ym=t+1),Lj.set(e,t),Aj.set(t,e)},fot="style["+E0+'][data-styled-version="5.3.11"]',pot=new RegExp("^"+E0+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),vot=function(e,t,n){for(var r,a=n.split(","),i=0,o=a.length;i<o;i++)(r=a[i])&&e.registerName(t,r)},yot=function(e,t){for(var n=(t.textContent||"").split(`/*!sc*/
|
|
8074
8074
|
`),r=[],a=0,i=n.length;a<i;a++){var o=n[a].trim();if(o){var s=o.match(pot);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(hot(l,c),vot(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},got=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},q_e=function(e){var t=document.head,n=e||t,r=document.createElement("style"),a=function(s){for(var c=s.childNodes,l=c.length;l>=0;l--){var u=c[l];if(u&&u.nodeType===1&&u.hasAttribute(E0))return u}}(n),i=a!==void 0?a.nextSibling:null;r.setAttribute(E0,"active"),r.setAttribute("data-styled-version","5.3.11");var o=got();return o&&r.setAttribute("nonce",o),n.insertBefore(r,i),r},mot=function(){function e(n){var r=this.element=q_e(n);r.appendChild(document.createTextNode("")),this.sheet=function(a){if(a.sheet)return a.sheet;for(var i=document.styleSheets,o=0,s=i.length;o<s;o++){var c=i[o];if(c.ownerNode===a)return c}vm(17)}(r),this.length=0}var t=e.prototype;return t.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},e}(),_ot=function(){function e(n){var r=this.element=q_e(n);this.nodes=r.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(n,r){if(n<=this.length&&n>=0){var a=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(a,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},e}(),wot=function(){function e(n){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},e}(),G_e=NQ,bot={isServer:!NQ,useCSSOMInjection:!lot},W_e=function(){function e(n,r,a){n===void 0&&(n=Al),r===void 0&&(r={}),this.options=gc({},bot,{},n),this.gs=r,this.names=new Map(a),this.server=!!n.isServer,!this.server&&NQ&&G_e&&(G_e=!1,function(i){for(var o=document.querySelectorAll(fot),s=0,c=o.length;s<c;s++){var l=o[s];l&&l.getAttribute(E0)!=="active"&&(yot(i,l),l.parentNode&&l.parentNode.removeChild(l))}}(this))}e.registerId=function(n){return Tj(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new e(gc({},this.options,{},n),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(a=(r=this.options).isServer,i=r.useCSSOMInjection,o=r.target,n=a?new wot(o):i?new mot(o):new _ot(o),new uot(n)));var n,r,a,i,o},t.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},t.registerName=function(n,r){if(Tj(n),this.names.has(n))this.names.get(n).add(r);else{var a=new Set;a.add(r),this.names.set(n,a)}},t.insertRules=function(n,r,a){this.registerName(n,r),this.getTag().insertRules(Tj(n),a)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(Tj(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var r=n.getTag(),a=r.length,i="",o=0;o<a;o++){var s=dot(o);if(s!==void 0){var c=n.names.get(s),l=r.getGroup(o);if(c&&l&&c.size){var u=E0+".g"+o+'[id="'+s+'"]',d="";c!==void 0&&c.forEach(function(h){h.length>0&&(d+=h+",")}),i+=""+l+u+'{content:"'+d+`"}/*!sc*/
|
|
8075
|
-
`}}}return i}(this)},e}(),kot=/(a)(d)/gi,U_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function IQ(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=U_e(t%52)+n;return(U_e(t%52)+n).replace(kot,"$1-$2")}var D0=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y_e=function(e){return D0(5381,e)};function xot(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(pm(n)&&!CQ(n))return!1}return!0}var Sot=Y_e("5.3.11"),Mot=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&xot(t),this.componentId=n,this.baseHash=D0(Sot,n),this.baseStyle=r,W_e.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var a=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(a,this.staticRulesId))i.push(this.staticRulesId);else{var o=P0(this.rules,t,n,r).join(""),s=IQ(D0(this.baseHash,o)>>>0);if(!n.hasNameForId(a,s)){var c=r(o,"."+s,void 0,a);n.insertRules(a,s,c)}i.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,u=D0(this.baseHash,r.hash),d="",h=0;h<l;h++){var f=this.rules[h];if(typeof f=="string")d+=f;else if(f){var p=P0(f,t,n,r),v=Array.isArray(p)?p.join(""):p;u=D0(u,v+h),d+=v}}if(d){var y=IQ(u>>>0);if(!n.hasNameForId(a,y)){var g=r(d,"."+y,void 0,a);n.insertRules(a,y,g)}i.push(y)}}return i.join(" ")},e}(),Cot=/^\s*\/\/.*$/gm,Not=[":","[",".","#"];function Iot(e){var t,n,r,a,i=Al,o=i.options,s=o===void 0?Al:o,c=i.plugins,l=c===void 0?Ij:c,u=new Zit(s),d=[],h=function(v){function y(g){if(g)try{v(g+"}")}catch{}}return function(g,m,_,b,k,x,S,C,N,L){switch(g){case 1:if(N===0&&m.charCodeAt(0)===64)return v(m+";"),"";break;case 2:if(C===0)return m+"/*|*/";break;case 3:switch(C){case 102:case 112:return v(_[0]+m),"";default:return m+(L===0?"/*|*/":"")}case-2:m.split("/*|*/}").forEach(y)}}}(function(v){d.push(v)}),f=function(v,y,g){return y===0&&Not.indexOf(g[n.length])!==-1||g.match(a)?v:"."+t};function p(v,y,g,m){m===void 0&&(m="&");var _=v.replace(Cot,""),b=y&&g?g+" "+y+" { "+_+" }":_;return t=m,n=y,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),u(g||!y?"":y,b)}return u.use([].concat(l,[function(v,y,g){v===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,f))},h,function(v){if(v===-2){var y=d;return d=[],y}}])),p.hash=l.length?l.reduce(function(v,y){return y.name||vm(15),D0(v,y.name)},5381).toString():"",p}var X_e=D.createContext();X_e.Consumer;var Z_e=D.createContext(),Lot=(Z_e.Consumer,new W_e),LQ=Iot();function Aot(){return D.useContext(X_e)||Lot}function Tot(){return D.useContext(Z_e)||LQ}var Eot=function(){function e(t,n){var r=this;this.inject=function(a,i){i===void 0&&(i=LQ);var o=r.name+i.hash;a.hasNameForId(r.id,o)||a.insertRules(r.id,o,i(r.rules,o,"@keyframes"))},this.toString=function(){return vm(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=LQ),this.name+t.hash},e}(),Dot=/([A-Z])/,Pot=/([A-Z])/g,Rot=/^ms-/,$ot=function(e){return"-"+e.toLowerCase()};function K_e(e){return Dot.test(e)?e.replace(Pot,$ot).replace(Rot,"-ms-"):e}var J_e=function(e){return e==null||e===!1||e===""};function P0(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,s=e.length;o<s;o+=1)(a=P0(e[o],t,n,r))!==""&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(J_e(e))return"";if(CQ(e))return"."+e.styledComponentId;if(pm(e)){if(typeof(l=e)!="function"||l.prototype&&l.prototype.isReactComponent||!t)return e;var c=e(t);return P0(c,t,n,r)}var l;return e instanceof Eot?n?(e.inject(n,r),e.getName(r)):e:MQ(e)?function u(d,h){var f,p,v=[];for(var y in d)d.hasOwnProperty(y)&&!J_e(d[y])&&(Array.isArray(d[y])&&d[y].isCss||pm(d[y])?v.push(K_e(y)+":",d[y],";"):MQ(d[y])?v.push.apply(v,u(d[y],y)):v.push(K_e(y)+": "+(f=y,(p=d[y])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||f in Kit||f.startsWith("--")?String(p).trim():p+"px")+";"));return h?[h+" {"].concat(v,["}"]):v}(e):e.toString()}var Q_e=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Oot(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return pm(e)||MQ(e)?Q_e(P0(j_e(Ij,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Q_e(P0(j_e(e,n)))}var zot=function(e,t,n){return n===void 0&&(n=Al),e.theme!==n.theme&&e.theme||t||n.theme},Fot=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Bot=/(^-|-$)/g;function AQ(e){return e.replace(Fot,"-").replace(Bot,"")}var Vot=function(e){return IQ(Y_e(e)>>>0)};function Ej(e){return typeof e=="string"&&!0}var TQ=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},jot=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function Hot(e,t,n){var r=e[n];TQ(t)&&TQ(r)?ewe(r,t):e[n]=t}function ewe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(TQ(o))for(var s in o)jot(s)&&Hot(e,o[s],s)}return e}var twe=D.createContext();twe.Consumer;var EQ={};function nwe(e,t,n){var r=CQ(e),a=!Ej(e),i=t.attrs,o=i===void 0?Ij:i,s=t.componentId,c=s===void 0?function(m,_){var b=typeof m!="string"?"sc":AQ(m);EQ[b]=(EQ[b]||0)+1;var k=b+"-"+Vot("5.3.11"+b+EQ[b]);return _?_+"-"+k:k}(t.displayName,t.parentComponentId):s,l=t.displayName,u=l===void 0?function(m){return Ej(m)?"styled."+m:"Styled("+H_e(m)+")"}(e):l,d=t.displayName&&t.componentId?AQ(t.displayName)+"-"+t.componentId:t.componentId||c,h=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,f=t.shouldForwardProp;r&&e.shouldForwardProp&&(f=t.shouldForwardProp?function(m,_,b){return e.shouldForwardProp(m,_,b)&&t.shouldForwardProp(m,_,b)}:e.shouldForwardProp);var p,v=new Mot(n,d,r?e.componentStyle:void 0),y=v.isStatic&&o.length===0,g=function(m,_){return function(b,k,x,S){var C=b.attrs,N=b.componentStyle,L=b.defaultProps,A=b.foldedComponentIds,R=b.shouldForwardProp,T=b.styledComponentId,P=b.target,$=function(ce,Q,he){ce===void 0&&(ce=Al);var Z=gc({},Q,{theme:ce}),se={};return he.forEach(function(fe){var oe,ae,X,U=fe;for(oe in pm(U)&&(U=U(Z)),U)Z[oe]=se[oe]=oe==="className"?(ae=se[oe],X=U[oe],ae&&X?ae+" "+X:ae||X):U[oe]}),[Z,se]}(zot(k,D.useContext(twe),L)||Al,k,C),z=$[0],V=$[1],B=function(ce,Q,he,Z){var se=Aot(),fe=Tot(),oe=Q?ce.generateAndInjectStyles(Al,se,fe):ce.generateAndInjectStyles(he,se,fe);return oe}(N,S,z),q=x,G=V.$as||k.$as||V.as||k.as||P,W=Ej(G),ee=V!==k?gc({},k,{},V):k,H={};for(var te in ee)te[0]!=="$"&&te!=="as"&&(te==="forwardedAs"?H.as=ee[te]:(R?R(te,$_e,G):!W||$_e(te))&&(H[te]=ee[te]));return k.style&&V.style!==k.style&&(H.style=gc({},k.style,{},V.style)),H.className=Array.prototype.concat(A,T,B!==T?B:null,k.className,V.className).filter(Boolean).join(" "),H.ref=q,D.createElement(G,H)}(p,m,_,y)};return g.displayName=u,(p=D.forwardRef(g)).attrs=h,p.componentStyle=v,p.displayName=u,p.shouldForwardProp=f,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Ij,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(m){var _=t.componentId,b=function(x,S){if(x==null)return{};var C,N,L={},A=Object.keys(x);for(N=0;N<A.length;N++)C=A[N],S.indexOf(C)>=0||(L[C]=x[C]);return L}(t,["componentId"]),k=_&&_+"-"+(Ej(m)?m:AQ(H_e(m)));return nwe(m,gc({},b,{attrs:h,componentId:k}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(m){this._foldedDefaultProps=r?ewe({},e.defaultProps,m):m}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),a&&cot(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Tl=function(e){return function t(n,r,a){if(a===void 0&&(a=Al),!kQ.isValidElementType(r))return vm(1,String(r));var i=function(){return n(r,a,Oot.apply(void 0,arguments))};return i.withConfig=function(o){return t(n,r,gc({},a,{},o))},i.attrs=function(o){return t(n,r,gc({},a,{attrs:Array.prototype.concat(a.attrs,o).filter(Boolean)}))},i}(nwe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Tl[e]=Tl(e)});const rwe=D.createContext(null),awe=()=>{const e=D.useContext(rwe);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},qot=({children:e})=>{const[t,n]=D.useState(0),r=D.useCallback(async i=>{n(o=>o+1);try{return await i}finally{n(o=>Math.max(0,o-1))}},[]),a=D.useCallback(async(i,o)=>(n(s=>s+1),new Promise((s,c)=>{const l=i(),u=()=>{n(d=>Math.max(0,d-1))};l.addEventListener("load",()=>{if(u(),l.status>=200&&l.status<300)try{const d=o(l);s(d)}catch(d){c(d)}else c(new Error(`Request failed with status ${l.status}`))}),l.addEventListener("error",()=>{u(),c(new Error("Network error occurred"))}),l.addEventListener("abort",()=>{u(),c(new Error("Request cancelled"))})})),[]);return M.jsx(rwe.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:a},children:e})},iwe=D.createContext(null),DQ=()=>{const e=D.useContext(iwe);if(!e)throw new Error("useRGContext must be used within a RGProvider");return e},owe=e=>{const{children:t}=e,[n,r]=D.useState({w:1,h:1}),a=o=>{r(o)},i=()=>{r({w:1,h:1})};return M.jsx(iwe.Provider,{value:{activeCompDimension:n,onDragStart:a,onDragStop:i},children:t})};for(var zr=[],PQ=0;PQ<256;++PQ)zr.push((PQ+256).toString(16).slice(1));function Got(e,t=0){return(zr[e[t+0]]+zr[e[t+1]]+zr[e[t+2]]+zr[e[t+3]]+"-"+zr[e[t+4]]+zr[e[t+5]]+"-"+zr[e[t+6]]+zr[e[t+7]]+"-"+zr[e[t+8]]+zr[e[t+9]]+"-"+zr[e[t+10]]+zr[e[t+11]]+zr[e[t+12]]+zr[e[t+13]]+zr[e[t+14]]+zr[e[t+15]]).toLowerCase()}var Dj,Wot=new Uint8Array(16);function Uot(){if(!Dj&&(Dj=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dj))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dj(Wot)}var Yot=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const swe={randomUUID:Yot};function cwe(e,t,n){if(swe.randomUUID&&!e)return swe.randomUUID();e=e||{};var r=e.random||(e.rng||Uot)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Got(r)}const RQ=e=>{const t=e;return{createProject:async(P,$,z)=>{if(z){const V=new FormData;return V.append("description",P),V.append("theme",$),V.append("background_image",z),await fetch(`${t}/create_project`,{method:"POST",body:V})}else{const V={description:P,theme:$};return await fetch(`${t}/create_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})}},createBlankProject:async(P,$,z)=>{if(z){const V=new FormData;return V.append("description",P),V.append("theme",$),V.append("background_image",z),await fetch(`${t}/create_blank_project`,{method:"POST",body:V})}else{const V={description:P,theme:$};return await fetch(`${t}/create_blank_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})}},getProjects:async()=>await fetch(`${t}/fetch_projects`,{method:"GET",headers:{"Content-Type":"application/json"}}),getProjectMetadata:async P=>await fetch(`${t}/project/${P}`,{method:"GET",headers:{"Content-Type":"application/json"}}),getSubdomains:async P=>await fetch(`${t}/subdomains?project_name=${P}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(P,$)=>{const z={project_name:P,subdomain:$};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},updateSubdomain:async(P,$)=>{const z={project_name:P,subdomain:$};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},releaseSubdomain:async(P,$)=>{const z={project_name:P,subdomain:$};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},publishProject:async(P,$)=>{const z={project_name:P,git_ref:$};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},unpublishProject:async P=>{const $={project_name:P};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},tagCommit:async(P,$,z)=>{const V={project_name:P,commit_hash:$,tag_name:z};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(P,$,z,V)=>{const B={project_name:P,component_namespace:$,component_name:z,layout_metadata:V};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)})},addProjectChart:async(P,$,z)=>{const V={project_name:P,visual_id:$,layout_metadata:z};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateProjectComponentLayoutMetadata:async(P,$,z)=>{const V={project_name:P,component_id:$,layout_metadata:z};return await fetch(`${t}/update_project_component_layout_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateProjectComponentSourceCode:async(P,$,z)=>{const V={project_name:P,component_id:$,source_code:z};return await fetch(`${t}/update_project_component_source_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateApplicationMetadata:async(P,$,z,V)=>{const B={project_name:P,application_name:$,application_description:z,application_category:V};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)})},updateApplicationSettings:async(P,$=null,z=null)=>{const V={project_name:P,application_login_enabled:$,default_deployment_chain_reference:z};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateProjectFile:async(P,$,z,V)=>{const B={file_path:P,project_name:$,source_code:z};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B),signal:V})},updateProjectFiles:async(P,$)=>{const z=P.map(V=>({project_name:V.projectName,file_path:V.filePath,source_code:V.fileContent}));return await fetch(`${t}/update_project_files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z),signal:$})},deleteProjectComponent:async(P,$)=>{const z={project_name:P,file_path:$};return await fetch(`${t}/delete_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},deleteProjectFile:async(P,$)=>{const z={project_name:P,file_path:$};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},resetProjectFile:async(P,$,z,V,B)=>{let q={project_name:P,file_path:$,git_ref:z};return V&&(q.prune=V),B&&(q.extra_metadata=B),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})},deleteProject:async P=>{const $={projects:[P]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},requestErrorCorrection:async(P,$,z)=>{const V={project_name:P,component_id:$,error_message:z};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},addImage:async P=>await fetch(`${t}/add_image`,{method:"POST",body:P}),editElement:async P=>{const $={project_name:P.projectName,component_id:P.componentId,element_xpath:P.elementXPath,style_request:P.styleRequest||null,text_request:P.textRequest||null,background_image_request:P.backgroundImageRequest||null,dom_tree_repr:P.domTreeRepr};return await fetch(`${t}/edit_element`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},initializeProject:async P=>await fetch(`${t}/initialize_project/${P}`,{method:"POST",headers:{"Content-Type":"application/json"}})}},lwe=e=>{const t=e;return{getQueryContent:async i=>await fetch(`${t}/v1/public/sql/content-queries`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queryId:i,biscuits:[]})}),getVisuals:async(i,o,s,c,l,u,d,h)=>{const f=new URLSearchParams({pageNo:i.toString(),pageSize:o.toString(),scope:s,searchPattern:c,sortBy:l,sortOrder:u,visibility:d,visualType:h}).toString();return await fetch(`${t}/v2/content/visuals?${f}`,{method:"GET",headers:{"Content-Type":"application/json"}})},getSubscription:async()=>await fetch(`${t}/v1/subscription`,{method:"GET",headers:{"Content-Type":"application/json"}})}},$Q=e=>{const t=e;return{getSecrets:async()=>await fetch(`${t}/config/secrets`,{method:"GET",headers:{"Content-Type":"application/json"}}),putSecret:async(b,k)=>await fetch(`${t}/config/secrets/${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),getSecret:async b=>await fetch(`${t}/config/secrets/${b}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteSecret:async b=>await fetch(`${t}/config/secrets/${b}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getTierKeyMap:async b=>await fetch(`${t}/config/miniapps/${b}/tier-key-map`,{method:"GET",headers:{"Content-Type":"application/json"}}),putTierKeyMap:async(b,k,x)=>await fetch(`${t}/config/miniapps/${b}/tier-key-map/${k}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret_reference:x})}),getTierKeyMapForTier:async(b,k)=>await fetch(`${t}/config/miniapps/${b}/tier-key-map/${k}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteTierKeyMap:async(b,k)=>await fetch(`${t}/config/miniapps/${b}/tier-key-map/${k}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getTierAssignments:async b=>await fetch(`${t}/config/miniapps/${b}/assignments`,{method:"GET",headers:{"Content-Type":"application/json"}}),putTierAssignment:async(b,k,x)=>await fetch(`${t}/config/miniapps/${b}/assignments/${k}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tier:x})}),getTierAssignment:async(b,k)=>await fetch(`${t}/config/miniapps/${b}/assignments/${k}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteTierAssignment:async(b,k)=>await fetch(`${t}/config/miniapps/${b}/assignments/${k}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),getRateLimits:async b=>await fetch(`${t}/config/miniapps/${b}/rate-limits`,{method:"GET",headers:{"Content-Type":"application/json"}}),putRateLimit:async(b,k,x,S)=>await fetch(`${t}/config/miniapps/${b}/rate-limits/${k}/${x}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),getRateLimit:async(b,k,x)=>await fetch(`${t}/config/miniapps/${b}/rate-limits/${k}/${x}`,{method:"GET",headers:{"Content-Type":"application/json"}}),deleteRateLimit:async(b,k,x)=>await fetch(`${t}/config/miniapps/${b}/rate-limits/${k}/${x}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),createProxyFetch:b=>async(k,x)=>{const S=k instanceof URL?k:new URL(k.toString());return await fetch(`${t}/proxy/${b.miniappName}/${S.host}${S.pathname}${S.search}${S.hash}`,x)},createProxyGetView:b=>{const k=new URL(b.gwProxyUrl).hostname;return async(x,S,C={})=>{let N=`SELECT * FROM ${x}.${S}`;C&&Object.keys(C).length>0&&(N+=`(${Object.entries(C).map(([R,T])=>`'${R}=${T}'`).join(",")})`);const L=await fetch(`${t}/proxy/${b.miniappName}/${k}/v1/sql/no-injected-authz`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sqlText:N})});if(!L.ok)throw new Error(`Failed to fetch view: ${L.statusText}`);return await L.json()}}}};function Xot(e){return typeof e=="function"}const Zot=e=>{const{wrapAPICall:t}=awe(),n=RQ(e);return new Proxy(n,{get:(a,i)=>{const o=a[i];return Xot(o)?(...s)=>t(o.apply(a,s)):o}})},OQ=D.createContext(null);OQ.Consumer;const Kot=e=>{const[t,n]=D.useState({projectName:null,projectURL:null}),[r,a]=D.useState({API_BASE_URL:null,WS_BASE_URL:null,GW_BASE_URL:null,GW_PROXY_URL:null,PROXY_API_BASE_URL:null}),[i,o]=D.useState(()=>lwe(e.config.GW_BASE_URL)),[s,c]=D.useState(!1),[l,u]=D.useState(""),[d,h]=D.useState(""),[f,p]=D.useState(""),[v,y]=D.useState(cwe()),g=Zot(e.config.API_BASE_URL),m=RQ(e.config.API_BASE_URL),_=g||m,[b,k]=D.useState(()=>$Q(e.config.PROXY_API_BASE_URL)),[x,S]=D.useState(null),[C,N]=D.useState(null),L=()=>{y(cwe())};return D.useEffect(()=>{a(e==null?void 0:e.config)},[e.config]),D.useEffect(()=>{n(e==null?void 0:e.metadata)},[e.metadata]),D.useEffect(()=>{if(!(r!=null&&r.PROXY_API_BASE_URL)||!(r!=null&&r.GW_PROXY_URL)||!(t!=null&&t.projectName)){console.log("Missing required config for proxy setup");return}o(lwe(r.GW_BASE_URL)),k(A=>{const R=$Q(r.PROXY_API_BASE_URL),T=R.createProxyFetch({miniappName:t.projectName}),P=async(V,B)=>T(V,B);S(()=>P);const $=R.createProxyGetView({miniappName:t.projectName,gwProxyUrl:r.GW_PROXY_URL}),z=async(V,B,q={})=>{if(typeof V!="string"||typeof B!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof V}, viewName: ${typeof B}`);return $(V,B,q)};return N(()=>z),R})},[r,t]),M.jsx(OQ.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,syncToken:v,setSyncToken:L,selectedComponentId:l,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:h,selectedComponentHTML:f,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:c,APIHandler:_,gwAPIHandler:i,proxyHandler:b,proxyFetch:x,proxyGetView:C},children:e.children})},Jot=e=>M.jsx(qot,{children:M.jsx(owe,{children:M.jsx(Kot,{...e})})}),zQ=()=>{const e=D.useContext(OQ);if(e===null)throw new Error("Invalid project context.");return{...e}},Qot=Tl.div`
|
|
8075
|
+
`}}}return i}(this)},e}(),kot=/(a)(d)/gi,U_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function IQ(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=U_e(t%52)+n;return(U_e(t%52)+n).replace(kot,"$1-$2")}var D0=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y_e=function(e){return D0(5381,e)};function xot(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(pm(n)&&!CQ(n))return!1}return!0}var Sot=Y_e("5.3.11"),Mot=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&xot(t),this.componentId=n,this.baseHash=D0(Sot,n),this.baseStyle=r,W_e.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var a=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(a,this.staticRulesId))i.push(this.staticRulesId);else{var o=P0(this.rules,t,n,r).join(""),s=IQ(D0(this.baseHash,o)>>>0);if(!n.hasNameForId(a,s)){var c=r(o,"."+s,void 0,a);n.insertRules(a,s,c)}i.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,u=D0(this.baseHash,r.hash),d="",h=0;h<l;h++){var f=this.rules[h];if(typeof f=="string")d+=f;else if(f){var p=P0(f,t,n,r),v=Array.isArray(p)?p.join(""):p;u=D0(u,v+h),d+=v}}if(d){var y=IQ(u>>>0);if(!n.hasNameForId(a,y)){var g=r(d,"."+y,void 0,a);n.insertRules(a,y,g)}i.push(y)}}return i.join(" ")},e}(),Cot=/^\s*\/\/.*$/gm,Not=[":","[",".","#"];function Iot(e){var t,n,r,a,i=Al,o=i.options,s=o===void 0?Al:o,c=i.plugins,l=c===void 0?Ij:c,u=new Zit(s),d=[],h=function(v){function y(g){if(g)try{v(g+"}")}catch{}}return function(g,m,_,b,k,x,S,C,N,L){switch(g){case 1:if(N===0&&m.charCodeAt(0)===64)return v(m+";"),"";break;case 2:if(C===0)return m+"/*|*/";break;case 3:switch(C){case 102:case 112:return v(_[0]+m),"";default:return m+(L===0?"/*|*/":"")}case-2:m.split("/*|*/}").forEach(y)}}}(function(v){d.push(v)}),f=function(v,y,g){return y===0&&Not.indexOf(g[n.length])!==-1||g.match(a)?v:"."+t};function p(v,y,g,m){m===void 0&&(m="&");var _=v.replace(Cot,""),b=y&&g?g+" "+y+" { "+_+" }":_;return t=m,n=y,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),u(g||!y?"":y,b)}return u.use([].concat(l,[function(v,y,g){v===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,f))},h,function(v){if(v===-2){var y=d;return d=[],y}}])),p.hash=l.length?l.reduce(function(v,y){return y.name||vm(15),D0(v,y.name)},5381).toString():"",p}var X_e=D.createContext();X_e.Consumer;var Z_e=D.createContext(),Lot=(Z_e.Consumer,new W_e),LQ=Iot();function Aot(){return D.useContext(X_e)||Lot}function Tot(){return D.useContext(Z_e)||LQ}var Eot=function(){function e(t,n){var r=this;this.inject=function(a,i){i===void 0&&(i=LQ);var o=r.name+i.hash;a.hasNameForId(r.id,o)||a.insertRules(r.id,o,i(r.rules,o,"@keyframes"))},this.toString=function(){return vm(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=LQ),this.name+t.hash},e}(),Dot=/([A-Z])/,Pot=/([A-Z])/g,Rot=/^ms-/,$ot=function(e){return"-"+e.toLowerCase()};function K_e(e){return Dot.test(e)?e.replace(Pot,$ot).replace(Rot,"-ms-"):e}var J_e=function(e){return e==null||e===!1||e===""};function P0(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,s=e.length;o<s;o+=1)(a=P0(e[o],t,n,r))!==""&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(J_e(e))return"";if(CQ(e))return"."+e.styledComponentId;if(pm(e)){if(typeof(l=e)!="function"||l.prototype&&l.prototype.isReactComponent||!t)return e;var c=e(t);return P0(c,t,n,r)}var l;return e instanceof Eot?n?(e.inject(n,r),e.getName(r)):e:MQ(e)?function u(d,h){var f,p,v=[];for(var y in d)d.hasOwnProperty(y)&&!J_e(d[y])&&(Array.isArray(d[y])&&d[y].isCss||pm(d[y])?v.push(K_e(y)+":",d[y],";"):MQ(d[y])?v.push.apply(v,u(d[y],y)):v.push(K_e(y)+": "+(f=y,(p=d[y])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||f in Kit||f.startsWith("--")?String(p).trim():p+"px")+";"));return h?[h+" {"].concat(v,["}"]):v}(e):e.toString()}var Q_e=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Oot(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return pm(e)||MQ(e)?Q_e(P0(j_e(Ij,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Q_e(P0(j_e(e,n)))}var zot=function(e,t,n){return n===void 0&&(n=Al),e.theme!==n.theme&&e.theme||t||n.theme},Fot=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Bot=/(^-|-$)/g;function AQ(e){return e.replace(Fot,"-").replace(Bot,"")}var Vot=function(e){return IQ(Y_e(e)>>>0)};function Ej(e){return typeof e=="string"&&!0}var TQ=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},jot=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function Hot(e,t,n){var r=e[n];TQ(t)&&TQ(r)?ewe(r,t):e[n]=t}function ewe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(TQ(o))for(var s in o)jot(s)&&Hot(e,o[s],s)}return e}var twe=D.createContext();twe.Consumer;var EQ={};function nwe(e,t,n){var r=CQ(e),a=!Ej(e),i=t.attrs,o=i===void 0?Ij:i,s=t.componentId,c=s===void 0?function(m,_){var b=typeof m!="string"?"sc":AQ(m);EQ[b]=(EQ[b]||0)+1;var k=b+"-"+Vot("5.3.11"+b+EQ[b]);return _?_+"-"+k:k}(t.displayName,t.parentComponentId):s,l=t.displayName,u=l===void 0?function(m){return Ej(m)?"styled."+m:"Styled("+H_e(m)+")"}(e):l,d=t.displayName&&t.componentId?AQ(t.displayName)+"-"+t.componentId:t.componentId||c,h=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,f=t.shouldForwardProp;r&&e.shouldForwardProp&&(f=t.shouldForwardProp?function(m,_,b){return e.shouldForwardProp(m,_,b)&&t.shouldForwardProp(m,_,b)}:e.shouldForwardProp);var p,v=new Mot(n,d,r?e.componentStyle:void 0),y=v.isStatic&&o.length===0,g=function(m,_){return function(b,k,x,S){var C=b.attrs,N=b.componentStyle,L=b.defaultProps,A=b.foldedComponentIds,R=b.shouldForwardProp,T=b.styledComponentId,P=b.target,$=function(ce,Q,he){ce===void 0&&(ce=Al);var Z=gc({},Q,{theme:ce}),se={};return he.forEach(function(fe){var oe,ae,X,U=fe;for(oe in pm(U)&&(U=U(Z)),U)Z[oe]=se[oe]=oe==="className"?(ae=se[oe],X=U[oe],ae&&X?ae+" "+X:ae||X):U[oe]}),[Z,se]}(zot(k,D.useContext(twe),L)||Al,k,C),z=$[0],V=$[1],B=function(ce,Q,he,Z){var se=Aot(),fe=Tot(),oe=Q?ce.generateAndInjectStyles(Al,se,fe):ce.generateAndInjectStyles(he,se,fe);return oe}(N,S,z),q=x,G=V.$as||k.$as||V.as||k.as||P,W=Ej(G),ee=V!==k?gc({},k,{},V):k,H={};for(var te in ee)te[0]!=="$"&&te!=="as"&&(te==="forwardedAs"?H.as=ee[te]:(R?R(te,$_e,G):!W||$_e(te))&&(H[te]=ee[te]));return k.style&&V.style!==k.style&&(H.style=gc({},k.style,{},V.style)),H.className=Array.prototype.concat(A,T,B!==T?B:null,k.className,V.className).filter(Boolean).join(" "),H.ref=q,D.createElement(G,H)}(p,m,_,y)};return g.displayName=u,(p=D.forwardRef(g)).attrs=h,p.componentStyle=v,p.displayName=u,p.shouldForwardProp=f,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Ij,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(m){var _=t.componentId,b=function(x,S){if(x==null)return{};var C,N,L={},A=Object.keys(x);for(N=0;N<A.length;N++)C=A[N],S.indexOf(C)>=0||(L[C]=x[C]);return L}(t,["componentId"]),k=_&&_+"-"+(Ej(m)?m:AQ(H_e(m)));return nwe(m,gc({},b,{attrs:h,componentId:k}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(m){this._foldedDefaultProps=r?ewe({},e.defaultProps,m):m}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),a&&cot(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Tl=function(e){return function t(n,r,a){if(a===void 0&&(a=Al),!kQ.isValidElementType(r))return vm(1,String(r));var i=function(){return n(r,a,Oot.apply(void 0,arguments))};return i.withConfig=function(o){return t(n,r,gc({},a,{},o))},i.attrs=function(o){return t(n,r,gc({},a,{attrs:Array.prototype.concat(a.attrs,o).filter(Boolean)}))},i}(nwe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Tl[e]=Tl(e)});const rwe=D.createContext(null),awe=()=>{const e=D.useContext(rwe);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},qot=({children:e})=>{const[t,n]=D.useState(0),r=D.useCallback(async i=>{n(o=>o+1);try{return await i}finally{n(o=>Math.max(0,o-1))}},[]),a=D.useCallback(async(i,o)=>(n(s=>s+1),new Promise((s,c)=>{const l=i(),u=()=>{n(d=>Math.max(0,d-1))};l.addEventListener("load",()=>{if(u(),l.status>=200&&l.status<300)try{const d=o(l);s(d)}catch(d){c(d)}else c(new Error(`Request failed with status ${l.status}`))}),l.addEventListener("error",()=>{u(),c(new Error("Network error occurred"))}),l.addEventListener("abort",()=>{u(),c(new Error("Request cancelled"))})})),[]);return M.jsx(rwe.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:a},children:e})},iwe=D.createContext(null),DQ=()=>{const e=D.useContext(iwe);if(!e)throw new Error("useRGContext must be used within a RGProvider");return e},owe=e=>{const{children:t}=e,[n,r]=D.useState({w:1,h:1}),a=o=>{r(o)},i=()=>{r({w:1,h:1})};return M.jsx(iwe.Provider,{value:{activeCompDimension:n,onDragStart:a,onDragStop:i},children:t})};for(var zr=[],PQ=0;PQ<256;++PQ)zr.push((PQ+256).toString(16).slice(1));function Got(e,t=0){return(zr[e[t+0]]+zr[e[t+1]]+zr[e[t+2]]+zr[e[t+3]]+"-"+zr[e[t+4]]+zr[e[t+5]]+"-"+zr[e[t+6]]+zr[e[t+7]]+"-"+zr[e[t+8]]+zr[e[t+9]]+"-"+zr[e[t+10]]+zr[e[t+11]]+zr[e[t+12]]+zr[e[t+13]]+zr[e[t+14]]+zr[e[t+15]]).toLowerCase()}var Dj,Wot=new Uint8Array(16);function Uot(){if(!Dj&&(Dj=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dj))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dj(Wot)}var Yot=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const swe={randomUUID:Yot};function cwe(e,t,n){if(swe.randomUUID&&!e)return swe.randomUUID();e=e||{};var r=e.random||(e.rng||Uot)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Got(r)}const RQ=e=>{const t=e;return{createProject:async(P,$,z)=>{if(z){const V=new FormData;return V.append("description",P),V.append("theme",$),V.append("background_image",z),await fetch(`${t}/create_project`,{method:"POST",body:V})}else{const V={description:P,theme:$};return await fetch(`${t}/create_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})}},createBlankProject:async(P,$,z)=>{if(z){const V=new FormData;return V.append("description",P),V.append("theme",$),V.append("background_image",z),await fetch(`${t}/create_blank_project`,{method:"POST",body:V})}else{const V={description:P,theme:$};return await fetch(`${t}/create_blank_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})}},getProjects:async()=>await fetch(`${t}/fetch_projects`,{method:"GET",headers:{"Content-Type":"application/json"}}),getProjectMetadata:async P=>await fetch(`${t}/project/${P}`,{method:"GET",headers:{"Content-Type":"application/json"}}),getSubdomains:async P=>await fetch(`${t}/subdomains?project_name=${P}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(P,$)=>{const z={project_name:P,subdomain:$};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},updateSubdomain:async(P,$)=>{const z={project_name:P,subdomain:$};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},releaseSubdomain:async(P,$)=>{const z={project_name:P,subdomain:$};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},publishProject:async(P,$)=>{const z={project_name:P,git_ref:$};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},unpublishProject:async P=>{const $={project_name:P};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},tagCommit:async(P,$,z)=>{const V={project_name:P,commit_hash:$,tag_name:z};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(P,$,z,V)=>{const B={project_name:P,component_namespace:$,component_name:z,layout_metadata:V};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)})},addProjectChart:async(P,$,z)=>{const V={project_name:P,visual_id:$,layout_metadata:z};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateProjectComponentLayoutMetadata:async(P,$,z)=>{const V={project_name:P,component_id:$,layout_metadata:z};return await fetch(`${t}/update_project_component_layout_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateProjectComponentSourceCode:async(P,$,z)=>{const V={project_name:P,component_id:$,source_code:z};return await fetch(`${t}/update_project_component_source_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateApplicationMetadata:async(P,$,z,V)=>{const B={project_name:P,application_name:$,application_description:z,application_category:V};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)})},updateApplicationSettings:async(P,$=null,z=null)=>{const V={project_name:P,application_login_enabled:$,default_deployment_chain_reference:z};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},updateProjectFile:async(P,$,z,V)=>{const B={file_path:P,project_name:$,source_code:z};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B),signal:V})},updateProjectFiles:async(P,$)=>{const z=P.map(V=>({project_name:V.projectName,file_path:V.filePath,source_code:V.fileContent}));return await fetch(`${t}/update_project_files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z),signal:$})},deleteProjectComponent:async(P,$)=>{const z={project_name:P,file_path:$};return await fetch(`${t}/delete_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},deleteProjectFile:async(P,$)=>{const z={project_name:P,file_path:$};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})},resetProjectFile:async(P,$,z,V,B)=>{let q={project_name:P,file_path:$,git_ref:z};return V&&(q.prune=V),B&&(q.extra_metadata=B),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})},deleteProject:async P=>{const $={projects:[P]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},requestErrorCorrection:async(P,$,z)=>{const V={project_name:P,component_id:$,error_message:z};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)})},addImage:async P=>await fetch(`${t}/add_image`,{method:"POST",body:P}),editElement:async P=>{const $={project_name:P.projectName,component_id:P.componentId,element_xpath:P.elementXPath,style_request:P.styleRequest||null,text_request:P.textRequest||null,background_image_request:P.backgroundImageRequest||null,dom_tree_repr:P.domTreeRepr};return await fetch(`${t}/edit_element`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})},initializeProject:async P=>await fetch(`${t}/initialize_project/${P}`,{method:"POST",headers:{"Content-Type":"application/json"}})}},lwe=e=>{const t=e;return{getQueryContent:async i=>await fetch(`${t}/v1/public/sql/content-queries`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queryId:i,biscuits:[]})}),getVisuals:async(i,o,s,c,l,u,d,h)=>{const f=new URLSearchParams({pageNo:i.toString(),pageSize:o.toString(),scope:s,searchPattern:c,sortBy:l,sortOrder:u,visibility:d,visualType:h}).toString();return await fetch(`${t}/v2/content/visuals?${f}`,{method:"GET",headers:{"Content-Type":"application/json"}})},getSubscription:async()=>await fetch(`${t}/v1/subscription`,{method:"GET",headers:{"Content-Type":"application/json"}})}},$Q=(e,t)=>{const n=e,r=(S=!1,C)=>{const N={"Content-Type":"application/json"};if(S){const L=C||t;L&&(N["x-sxt-project-hmac"]=L)}return N};return{getSecrets:async()=>await fetch(`${n}/config/secrets`,{method:"GET",headers:r(!1)}),putSecret:async(S,C)=>await fetch(`${n}/config/secrets/${S}`,{method:"PUT",headers:r(!1),body:JSON.stringify(C)}),getSecret:async S=>await fetch(`${n}/config/secrets/${S}`,{method:"GET",headers:r(!1)}),deleteSecret:async S=>await fetch(`${n}/config/secrets/${S}`,{method:"DELETE",headers:r(!1)}),getAllTierKeyMaps:async()=>await fetch(`${n}/config/miniapps/*/tier-key-map`,{method:"GET",headers:r(!1)}),getTierKeyMap:async(S,C)=>await fetch(`${n}/config/miniapps/${S}/tier-key-map`,{method:"GET",headers:r(!0,C)}),putTierKeyMap:async(S,C,N,L)=>await fetch(`${n}/config/miniapps/${S}/tier-key-map/${C}`,{method:"PUT",headers:r(!0,L),body:JSON.stringify({secret_reference:N})}),getTierKeyMapForTier:async(S,C,N)=>await fetch(`${n}/config/miniapps/${S}/tier-key-map/${C}`,{method:"GET",headers:r(!0,N)}),deleteTierKeyMap:async(S,C,N,L)=>await fetch(`${n}/config/miniapps/${S}/tier-key-map/${C}/${N}`,{method:"DELETE",headers:r(!0,L)}),getTierAssignments:async(S,C)=>await fetch(`${n}/config/miniapps/${S}/assignments`,{method:"GET",headers:r(!0,C)}),putTierAssignment:async(S,C,N,L)=>await fetch(`${n}/config/miniapps/${S}/assignments/${C}`,{method:"PUT",headers:r(!0,L),body:JSON.stringify({tier:N})}),getTierAssignment:async(S,C,N)=>await fetch(`${n}/config/miniapps/${S}/assignments/${C}`,{method:"GET",headers:r(!0,N)}),deleteTierAssignment:async(S,C,N)=>await fetch(`${n}/config/miniapps/${S}/assignments/${C}`,{method:"DELETE",headers:r(!0,N)}),getRateLimits:async(S,C)=>await fetch(`${n}/config/miniapps/${S}/rate-limits`,{method:"GET",headers:r(!0,C)}),putRateLimit:async(S,C,N,L,A)=>await fetch(`${n}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"PUT",headers:r(!0,A),body:JSON.stringify(L)}),getRateLimit:async(S,C,N,L)=>await fetch(`${n}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"GET",headers:r(!0,L)}),deleteRateLimit:async(S,C,N,L)=>await fetch(`${n}/config/miniapps/${S}/rate-limits/${C}/${N}`,{method:"DELETE",headers:r(!0,L)}),createProxyFetch:S=>async(C,N)=>{const L=C instanceof URL?C:new URL(C.toString());return await fetch(`${n}/proxy/${S.miniappName}/${L.host}${L.pathname}${L.search}${L.hash}`,N)},createProxyGetView:S=>{const C=new URL(S.gwProxyUrl).hostname;return async(N,L,A={})=>{let R=`SELECT * FROM ${N}.${L}`;A&&Object.keys(A).length>0&&(R+=`(${Object.entries(A).map(([$,z])=>`'${$}=${z}'`).join(",")})`);const T=await fetch(`${n}/proxy/${S.miniappName}/${C}/v1/sql/no-injected-authz`,{method:"POST",headers:r(!1),body:JSON.stringify({sqlText:R})});if(!T.ok)throw new Error(`Failed to fetch view: ${T.statusText}`);return await T.json()}}}};function Xot(e){return typeof e=="function"}const Zot=e=>{const{wrapAPICall:t}=awe(),n=RQ(e);return new Proxy(n,{get:(a,i)=>{const o=a[i];return Xot(o)?(...s)=>t(o.apply(a,s)):o}})},OQ=D.createContext(null);OQ.Consumer;const Kot=e=>{const[t,n]=D.useState({projectName:null,projectURL:null}),[r,a]=D.useState({API_BASE_URL:null,WS_BASE_URL:null,GW_BASE_URL:null,GW_PROXY_URL:null,PROXY_API_BASE_URL:null}),[i,o]=D.useState(()=>lwe(e.config.GW_BASE_URL)),[s,c]=D.useState(!1),[l,u]=D.useState(""),[d,h]=D.useState(""),[f,p]=D.useState(""),[v,y]=D.useState(cwe()),g=Zot(e.config.API_BASE_URL),m=RQ(e.config.API_BASE_URL),_=g||m,[b,k]=D.useState(()=>$Q(e.config.PROXY_API_BASE_URL,t==null?void 0:t.projectHmac)),[x,S]=D.useState(null),[C,N]=D.useState(null),L=()=>{y(cwe())};return D.useEffect(()=>{a(e==null?void 0:e.config)},[e.config]),D.useEffect(()=>{n(e==null?void 0:e.metadata)},[e.metadata]),D.useEffect(()=>{if(!(r!=null&&r.PROXY_API_BASE_URL)||!(r!=null&&r.GW_PROXY_URL)||!(t!=null&&t.projectName)){console.log("Missing required config for proxy setup");return}o(lwe(r.GW_BASE_URL)),k(A=>{const R=$Q(r.PROXY_API_BASE_URL,t==null?void 0:t.projectHmac),T=R.createProxyFetch({miniappName:t.projectName}),P=async(V,B)=>T(V,B);S(()=>P);const $=R.createProxyGetView({miniappName:t.projectName,gwProxyUrl:r.GW_PROXY_URL}),z=async(V,B,q={})=>{if(typeof V!="string"||typeof B!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof V}, viewName: ${typeof B}`);return $(V,B,q)};return N(()=>z),R})},[r,t]),M.jsx(OQ.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,syncToken:v,setSyncToken:L,selectedComponentId:l,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:h,selectedComponentHTML:f,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:c,APIHandler:_,gwAPIHandler:i,proxyHandler:b,proxyFetch:x,proxyGetView:C},children:e.children})},Jot=e=>M.jsx(qot,{children:M.jsx(owe,{children:M.jsx(Kot,{...e})})}),zQ=()=>{const e=D.useContext(OQ);if(e===null)throw new Error("Invalid project context.");return{...e}},Qot=Tl.div`
|
|
8076
8076
|
position: fixed;
|
|
8077
8077
|
top: 0;
|
|
8078
8078
|
left: 0;
|