@plitzi/sdk-runtime 0.0.0-stage → 0.39.3
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/CHANGELOG.md +18 -0
- package/README.md +84 -2
- package/dist/chunks/service-DDDJomiH.mjs +2322 -0
- package/dist/contract/runtime.d.ts +3 -0
- package/dist/functions-api.d.ts +724 -0
- package/dist/host/host.d.ts +42 -0
- package/dist/host/index.d.ts +3 -0
- package/dist/host/index.mjs +107 -0
- package/dist/host/runner.d.ts +11 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.mjs +5 -0
- package/dist/prelude.js +1 -0
- package/dist/runner/cpuMeter.d.ts +35 -0
- package/dist/runner/driver.d.ts +37 -0
- package/dist/runner/guest/bytes.d.ts +27 -0
- package/dist/runner/guest/crypto.d.ts +47 -0
- package/dist/runner/guest/events.d.ts +152 -0
- package/dist/runner/guest/fetch.d.ts +305 -0
- package/dist/runner/guest/install.d.ts +23 -0
- package/dist/runner/guest/types.d.ts +38 -0
- package/dist/runner/index.d.ts +6 -0
- package/dist/runner/index.mjs +1 -0
- package/dist/runner/isolate.d.ts +65 -0
- package/dist/runner/memoryGuard.d.ts +25 -0
- package/dist/runner/prelude.d.ts +10 -0
- package/dist/runner/service.d.ts +76 -0
- package/dist/runner/turns.d.ts +12 -0
- package/package.json +64 -3
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SpaceRuntime } from '@plitzi/sdk-shared/functions';
|
|
2
|
+
import { AddressInfo } from 'node:net';
|
|
3
|
+
/** What the platform reads of a started runtime: its functions' manifest, and the paths it answers itself. */
|
|
4
|
+
export type SpaceRuntimeDescription = {
|
|
5
|
+
functions: Record<string, unknown>;
|
|
6
|
+
endpoints: string[];
|
|
7
|
+
};
|
|
8
|
+
export type SpaceRuntimeHostOptions = {
|
|
9
|
+
runtime: SpaceRuntime;
|
|
10
|
+
/** What the platform presents — `Authorization: Bearer <secret>` — on its calls and on the requests it forwards. */
|
|
11
|
+
secret: string;
|
|
12
|
+
port?: number;
|
|
13
|
+
host?: string;
|
|
14
|
+
/** The runtime's variables. */
|
|
15
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
16
|
+
/** Where people reach the space. */
|
|
17
|
+
publicUrl: string;
|
|
18
|
+
/**
|
|
19
|
+
* Where the space is reached from inside the network this runtime runs in — the platform's ingress, over plain HTTP.
|
|
20
|
+
* Given, the runtime's requests to its own space go there rather than out to the edge and back (`reachSpaceInside`).
|
|
21
|
+
*/
|
|
22
|
+
insideUrl?: string | undefined;
|
|
23
|
+
/** How it stops: out of rotation for `announceMs`, then what it runs has `graceMs` to end (the runner service's). */
|
|
24
|
+
shutdown?: {
|
|
25
|
+
announceMs?: number;
|
|
26
|
+
graceMs?: number;
|
|
27
|
+
};
|
|
28
|
+
/** The version its stats say it runs: the platform's that launched it. */
|
|
29
|
+
version?: string;
|
|
30
|
+
};
|
|
31
|
+
export type SpaceRuntimeHost = {
|
|
32
|
+
address: () => AddressInfo;
|
|
33
|
+
close: () => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* A space runtime, started and served: its tasks and routes over the functions runners' protocol (the platform invokes
|
|
37
|
+
* them and answers every `ctx` call), and its endpoints as plain HTTP the platform forwards — both behind one secret,
|
|
38
|
+
* since the only caller is the platform. The process is the space's alone: what its code can reach is this process
|
|
39
|
+
* and the network it is given, never the platform's database or keys. It says nothing of itself: its caller knows which
|
|
40
|
+
* space it is, and says so once it answers.
|
|
41
|
+
*/
|
|
42
|
+
export declare const startSpaceRuntime: ({ runtime, secret, port, host, env, publicUrl, insideUrl, shutdown, version }: SpaceRuntimeHostOptions) => Promise<SpaceRuntimeHost>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { c as describeFunctions, n as startFunctionsRunnerService, s as createFunctionsDriver } from "../chunks/service-DDDJomiH.mjs";
|
|
2
|
+
import { ActionRefusal, FunctionFailure, PLATFORM_HEADERS, RUNTIME_DESCRIBE_PATH, changeKv, changeListEntry, endpointFor, endpointProblem, isActionRefusal, requestFromWire, responseOf, wireResponseFrom, wireResponseOf } from "@plitzi/sdk-shared/functions";
|
|
3
|
+
import { webRequestOf, writeWebResponse } from "@plitzi/sdk-kernel/http";
|
|
4
|
+
import { reachSpaceInside } from "@plitzi/sdk-kernel/outbound";
|
|
5
|
+
// src/host/runner.ts
|
|
6
|
+
/** A refusal, however it was made: the platform's class, or a bundle's own copy of it — known by its name. */
|
|
7
|
+
/**
|
|
8
|
+
* A runtime's functions as a runner: the same protocol as the sandbox's, answered by code loaded in this process. The
|
|
9
|
+
* driver is the sandbox's own (`createFunctionsDriver`), so a task behaves the same in both — its `ctx` is calls to the
|
|
10
|
+
* platform, `ctx.kv.change` the same loop, a refusal the same answer. What it does not share is the isolate: there are
|
|
11
|
+
* no limits here but the platform's clock, since this process is the space's alone — and a route's answer streams.
|
|
12
|
+
*
|
|
13
|
+
* The bundle a request names is not asked for: the code is the one this runtime was started with.
|
|
14
|
+
*/
|
|
15
|
+
var createRuntimeRunner = (definition = {}) => ({
|
|
16
|
+
describe: () => Promise.resolve(describeFunctions(definition)),
|
|
17
|
+
invoke: async ({ invocation, answer, signal }) => {
|
|
18
|
+
const driver = createFunctionsDriver({
|
|
19
|
+
call: answer,
|
|
20
|
+
signal,
|
|
21
|
+
responseOf: (wire) => responseOf(wireResponseFrom(wire)),
|
|
22
|
+
requestOf: requestFromWire,
|
|
23
|
+
wireOfResponse: async (response) => {
|
|
24
|
+
if (!(response instanceof Response)) return;
|
|
25
|
+
if (!response.body) return wireResponseOf(response);
|
|
26
|
+
return {
|
|
27
|
+
streamed: true,
|
|
28
|
+
status: response.status,
|
|
29
|
+
statusText: response.statusText,
|
|
30
|
+
headers: [...response.headers],
|
|
31
|
+
body: response.body
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
changeKv,
|
|
35
|
+
changeListEntry,
|
|
36
|
+
refusal: (message) => new ActionRefusal(message)
|
|
37
|
+
});
|
|
38
|
+
try {
|
|
39
|
+
return await driver.invoke(definition, invocation);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
if (isActionRefusal(error)) throw new FunctionFailure("refused", error.message);
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// src/host/host.ts
|
|
47
|
+
/**
|
|
48
|
+
* A space runtime, started and served: its tasks and routes over the functions runners' protocol (the platform invokes
|
|
49
|
+
* them and answers every `ctx` call), and its endpoints as plain HTTP the platform forwards — both behind one secret,
|
|
50
|
+
* since the only caller is the platform. The process is the space's alone: what its code can reach is this process
|
|
51
|
+
* and the network it is given, never the platform's database or keys. It says nothing of itself: its caller knows which
|
|
52
|
+
* space it is, and says so once it answers.
|
|
53
|
+
*/
|
|
54
|
+
var startSpaceRuntime = async ({ runtime, secret, port = 8791, host = "0.0.0.0", env, publicUrl, insideUrl, shutdown, version }) => {
|
|
55
|
+
if (insideUrl) await reachSpaceInside({
|
|
56
|
+
publicUrl,
|
|
57
|
+
insideUrl
|
|
58
|
+
});
|
|
59
|
+
const parts = await runtime.start({
|
|
60
|
+
env,
|
|
61
|
+
publicUrl
|
|
62
|
+
});
|
|
63
|
+
const endpoints = parts.endpoints ?? {};
|
|
64
|
+
const paths = Object.keys(endpoints);
|
|
65
|
+
const problems = paths.flatMap((path) => endpointProblem(path) ?? []);
|
|
66
|
+
if (problems.length > 0) {
|
|
67
|
+
await parts.close?.();
|
|
68
|
+
throw new Error(problems.join("; "));
|
|
69
|
+
}
|
|
70
|
+
const description = {
|
|
71
|
+
functions: describeFunctions(parts.functions ?? {}),
|
|
72
|
+
endpoints: paths
|
|
73
|
+
};
|
|
74
|
+
const service = await startFunctionsRunnerService({
|
|
75
|
+
secret,
|
|
76
|
+
port,
|
|
77
|
+
host,
|
|
78
|
+
announce: false,
|
|
79
|
+
stats: { pool: "runtime" },
|
|
80
|
+
...version ? { version } : {},
|
|
81
|
+
...shutdown ? { shutdown } : {},
|
|
82
|
+
runner: createRuntimeRunner(parts.functions),
|
|
83
|
+
http: async (req, res) => {
|
|
84
|
+
const url = new URL(req.url ?? "/", publicUrl);
|
|
85
|
+
if (req.method === "GET" && url.pathname === RUNTIME_DESCRIBE_PATH) {
|
|
86
|
+
res.writeHead(200, { "content-type": "application/json" });
|
|
87
|
+
res.end(JSON.stringify(description));
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
const endpoint = endpointFor(paths, url.pathname);
|
|
91
|
+
const answer = endpoint ? endpoints[endpoint] : void 0;
|
|
92
|
+
if (!answer) return false;
|
|
93
|
+
const left = new AbortController();
|
|
94
|
+
res.once("close", () => left.abort());
|
|
95
|
+
await writeWebResponse(res, await answer(await webRequestOf(req, url.href, PLATFORM_HEADERS)), left.signal);
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
address: service.address,
|
|
101
|
+
close: async () => {
|
|
102
|
+
await service.close();
|
|
103
|
+
await parts.close?.();
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export { createRuntimeRunner, startSpaceRuntime };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FunctionsDefinition, FunctionRunner } from '@plitzi/sdk-shared/functions';
|
|
2
|
+
/** A refusal, however it was made: the platform's class, or a bundle's own copy of it — known by its name. */
|
|
3
|
+
/**
|
|
4
|
+
* A runtime's functions as a runner: the same protocol as the sandbox's, answered by code loaded in this process. The
|
|
5
|
+
* driver is the sandbox's own (`createFunctionsDriver`), so a task behaves the same in both — its `ctx` is calls to the
|
|
6
|
+
* platform, `ctx.kv.change` the same loop, a refusal the same answer. What it does not share is the isolate: there are
|
|
7
|
+
* no limits here but the platform's clock, since this process is the space's alone — and a route's answer streams.
|
|
8
|
+
*
|
|
9
|
+
* The bundle a request names is not asked for: the code is the one this runtime was started with.
|
|
10
|
+
*/
|
|
11
|
+
export declare const createRuntimeRunner: (definition?: FunctionsDefinition) => FunctionRunner;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@plitzi/sdk-runtime`: the contract a space's own code is written against, and what runs it with no access (RFC 0032).
|
|
3
|
+
*
|
|
4
|
+
* The root is the contract alone — what a space's functions and its runtime import, the same file whether a self-hosted
|
|
5
|
+
* server loads it natively or the platform runs it in its sandbox:
|
|
6
|
+
*
|
|
7
|
+
* - `defineFunctions`, `ActionRefusal` and the `ctx` they are handed;
|
|
8
|
+
* - `defineRuntime`, for a space's code that runs as a process of its own.
|
|
9
|
+
*
|
|
10
|
+
* What runs it is in its own entries, so the code a space writes loads none of it:
|
|
11
|
+
*
|
|
12
|
+
* - `./runner`: the functions runner service and its isolates;
|
|
13
|
+
* - `./host`: the host a space's runtime runs in.
|
|
14
|
+
*/
|
|
15
|
+
export { ActionRefusal, defineFunctions } from '@plitzi/sdk-shared/functions';
|
|
16
|
+
export { defineRuntime } from './contract/runtime';
|
|
17
|
+
export type { FunctionContext, FunctionFetch, FunctionFetchInit, FunctionJob, FunctionJobHandle, FunctionJobs, FunctionJobStop, FunctionOAuth, FunctionOAuthOwner, FunctionOAuthStatus, FunctionOAuthToken, FunctionRoute, FunctionRouteContext, FunctionsDefinition, FunctionTask, FunctionUser } from '@plitzi/sdk-shared/functions';
|
|
18
|
+
export type { SpaceRuntime, SpaceRuntimeContext, SpaceRuntimeEndpoint, SpaceRuntimeParts } from '@plitzi/sdk-shared/functions';
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ActionRefusal, defineFunctions } from "@plitzi/sdk-shared/functions";
|
|
2
|
+
// src/contract/runtime.ts
|
|
3
|
+
/** Declares a space runtime — an identity, for the types: `export default defineRuntime({ start: … })`. */
|
|
4
|
+
var defineRuntime = (runtime) => runtime;
|
|
5
|
+
export { ActionRefusal, defineFunctions, defineRuntime };
|
package/dist/prelude.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var jp=Object.create;var cu=Object.defineProperty;var kp=Object.getOwnPropertyDescriptor;var Gp=Object.getOwnPropertyNames;var Hp=Object.getPrototypeOf,$p=Object.prototype.hasOwnProperty;var s=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Vp=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Gp(e))!$p.call(r,n)&&n!==t&&cu(r,n,{get:()=>e[n],enumerable:!(a=kp(e,n))||a.enumerable});return r};var Pr=(r,e,t)=>(t=r!=null?jp(Hp(r)):{},Vp(e||!r||!r.__esModule?cu(t,"default",{value:r,enumerable:!0}):t,r));var b=s((sx,vu)=>{"use strict";var oa=typeof document=="object"&&document.all;vu.exports=typeof oa>"u"&&oa!==void 0?function(r){return typeof r=="function"||r===oa}:function(r){return typeof r=="function"}});var y=s((ox,fu)=>{"use strict";fu.exports=function(r){try{return!!r()}catch{return!0}}});var R=s((cx,lu)=>{"use strict";var zp=y();lu.exports=!zp(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var E=s((ca,hu)=>{"use strict";var Yr=function(r){return r&&r.Math===Math&&r};hu.exports=Yr(typeof globalThis=="object"&&globalThis)||Yr(typeof window=="object"&&window)||Yr(typeof self=="object"&&self)||Yr(typeof global=="object"&&global)||Yr(typeof ca=="object"&&ca)||(function(){return this})()||Function("return this")()});var C=s((vx,pu)=>{"use strict";var Kp=b();pu.exports=function(r){return typeof r=="object"?r!==null:Kp(r)}});var Ue=s((fx,du)=>{"use strict";var Wp=E(),gu=C(),va=Wp.document,Yp=gu(va)&&gu(va.createElement);du.exports=function(r){return Yp?va.createElement(r):{}}});var fa=s((lx,qu)=>{"use strict";var Xp=R(),Qp=y(),Jp=Ue();qu.exports=!Xp&&!Qp(function(){return Object.defineProperty(Jp("div"),"a",{get:function(){return 7}}).a!==7})});var la=s((hx,yu)=>{"use strict";var Zp=R(),rg=y();yu.exports=Zp&&rg(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var U=s((px,Eu)=>{"use strict";var eg=C(),tg=String,ag=TypeError;Eu.exports=function(r){if(eg(r))return r;throw new ag(tg(r)+" is not an object")}});var Be=s((gx,Su)=>{"use strict";var ng=y();Su.exports=!ng(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var A=s((dx,mu)=>{"use strict";var ig=Be(),je=Function.prototype.call;mu.exports=ig?je.bind(je):function(){return je.apply(je,arguments)}});var _=s((qx,Ru)=>{"use strict";var ha=E(),ug=b(),sg=function(r){return ug(r)?r:void 0};Ru.exports=function(r,e){return arguments.length<2?sg(ha[r]):ha[r]&&ha[r][e]}});var d=s((yx,Iu)=>{"use strict";var bu=Be(),Ou=Function.prototype,pa=Ou.call,og=bu&&Ou.bind.bind(pa,pa);Iu.exports=bu?og:function(r){return function(){return pa.apply(r,arguments)}}});var Xr=s((Ex,xu)=>{"use strict";var cg=d();xu.exports=cg({}.isPrototypeOf)});var ga=s((Sx,Pu)=>{"use strict";var vg=E(),Tu=vg.navigator,wu=Tu&&Tu.userAgent;Pu.exports=wu?String(wu):""});var qa=s((mx,Lu)=>{"use strict";var Du=E(),da=ga(),Au=Du.process,Fu=Du.Deno,Cu=Au&&Au.versions||Fu&&Fu.version,_u=Cu&&Cu.v8,W,ke;_u&&(W=_u.split("."),ke=W[0]>0&&W[0]<4?1:+(W[0]+W[1]));!ke&&da&&(W=da.match(/Edge\/(\d+)/),(!W||W[1]>=74)&&(W=da.match(/Chrome\/(\d+)/),W&&(ke=+W[1])));Lu.exports=ke});var ya=s((Rx,Mu)=>{"use strict";var Nu=qa(),fg=y(),lg=E(),hg=lg.String;Mu.exports=!!Object.getOwnPropertySymbols&&!fg(function(){var r=Symbol("symbol detection");return!hg(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Nu&&Nu<41})});var Ea=s((bx,Uu)=>{"use strict";var pg=ya();Uu.exports=pg&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ge=s((Ox,Bu)=>{"use strict";var gg=_(),dg=b(),qg=Xr(),yg=Ea(),Eg=Object;Bu.exports=yg?function(r){return typeof r=="symbol"}:function(r){var e=gg("Symbol");return dg(e)&&qg(e.prototype,Eg(r))}});var He=s((Ix,ju)=>{"use strict";var Sg=String;ju.exports=function(r){try{return Sg(r)}catch{return"Object"}}});var $e=s((xx,ku)=>{"use strict";var mg=b(),Rg=He(),bg=TypeError;ku.exports=function(r){if(mg(r))return r;throw new bg(Rg(r)+" is not a function")}});var pr=s((Tx,Gu)=>{"use strict";Gu.exports=function(r){return r==null}});var Ve=s((wx,Hu)=>{"use strict";var Og=$e(),Ig=pr();Hu.exports=function(r,e){var t=r[e];return Ig(t)?void 0:Og(t)}});var Vu=s((Px,$u)=>{"use strict";var Sa=A(),ma=b(),Ra=C(),xg=TypeError;$u.exports=function(r,e){var t,a;if(e==="string"&&ma(t=r.toString)&&!Ra(a=Sa(t,r))||ma(t=r.valueOf)&&!Ra(a=Sa(t,r))||e!=="string"&&ma(t=r.toString)&&!Ra(a=Sa(t,r)))return a;throw new xg("Can't convert object to primitive value")}});var er=s((Ax,zu)=>{"use strict";zu.exports=!1});var ze=s((Fx,Wu)=>{"use strict";var Ku=E(),Tg=Object.defineProperty;Wu.exports=function(r,e){try{Tg(Ku,r,{value:e,configurable:!0,writable:!0})}catch{Ku[r]=e}return e}});var Ke=s((Cx,Qu)=>{"use strict";var wg=er(),Pg=E(),Ag=ze(),Yu="__core-js_shared__",Xu=Qu.exports=Pg[Yu]||Ag(Yu,{});(Xu.versions||(Xu.versions=[])).push({version:"3.51.0",mode:wg?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.51.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var ba=s((_x,Zu)=>{"use strict";var Ju=Ke(),Fg=Object.create||Object;Zu.exports=function(r,e){return Ju[r]||(Ju[r]=e||Fg(null))}});var Qr=s((Dx,rs)=>{"use strict";var Cg=pr(),_g=TypeError;rs.exports=function(r){if(Cg(r))throw new _g("Can't call method on "+r);return r}});var Ar=s((Lx,es)=>{"use strict";var Dg=Qr(),Lg=Object;es.exports=function(r){return Lg(Dg(r))}});var I=s((Nx,ts)=>{"use strict";var Ng=d(),Mg=Ar(),Ug=Ng({}.hasOwnProperty);ts.exports=Object.hasOwn||function(e,t){return Ug(Mg(e),t)}});var Jr=s((Mx,as)=>{"use strict";var Bg=d(),jg=0,kg=Math.random(),Gg=Bg(1.1.toString);as.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Gg(++jg+kg,36)}});var D=s((Ux,is)=>{"use strict";var Hg=E(),$g=ba(),ns=I(),Vg=Jr(),zg=ya(),Kg=Ea(),Fr=Hg.Symbol,Oa=$g("wks"),Wg=Kg?Fr.for||Fr:Fr&&Fr.withoutSetter||Vg;is.exports=function(r){return ns(Oa,r)||(Oa[r]=zg&&ns(Fr,r)?Fr[r]:Wg("Symbol."+r)),Oa[r]}});var cs=s((Bx,os)=>{"use strict";var Yg=A(),us=C(),ss=Ge(),Xg=Ve(),Qg=Vu(),Jg=D(),Zg=TypeError,rd=Jg("toPrimitive");os.exports=function(r,e){if(!us(r)||ss(r))return r;var t=Xg(r,rd),a;if(t){if(e===void 0&&(e="default"),a=Yg(t,r,e),!us(a)||ss(a))return a;throw new Zg("Can't convert object to primitive value")}return e===void 0&&(e="number"),Qg(r,e)}});var Ia=s((jx,vs)=>{"use strict";var ed=cs(),td=Ge();vs.exports=function(r){var e=ed(r,"string");return td(e)?e:e+""}});var j=s(ls=>{"use strict";var ad=R(),nd=fa(),id=la(),We=U(),fs=Ia(),ud=TypeError,xa=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,Ta="enumerable",wa="configurable",Pa="writable";ls.f=ad?id?function(e,t,a){if(We(e),t=fs(t),We(a),typeof e=="function"&&t==="prototype"&&"value"in a&&Pa in a&&!a[Pa]){var n=sd(e,t);n&&n[Pa]&&(e[t]=a.value,a={configurable:wa in a?a[wa]:n[wa],enumerable:Ta in a?a[Ta]:n[Ta],writable:!1})}return xa(e,t,a)}:xa:function(e,t,a){if(We(e),t=fs(t),We(a),nd)try{return xa(e,t,a)}catch{}if("get"in a||"set"in a)throw new ud("Accessors not supported");return"value"in a&&(e[t]=a.value),e}});var Ca=s((Gx,ps)=>{"use strict";var Aa=R(),od=I(),hs=Function.prototype,cd=Aa&&Object.getOwnPropertyDescriptor,Fa=od(hs,"name"),vd=Fa&&function(){}.name==="something",fd=Fa&&(!Aa||Aa&&cd(hs,"name").configurable);ps.exports={EXISTS:Fa,PROPER:vd,CONFIGURABLE:fd}});var Da=s((Hx,gs)=>{"use strict";var ld=d(),hd=b(),_a=Ke(),pd=ld(Function.toString);hd(_a.inspectSource)||(_a.inspectSource=function(r){return pd(r)});gs.exports=_a.inspectSource});var ys=s(($x,qs)=>{"use strict";var gd=E(),dd=b(),ds=gd.WeakMap;qs.exports=dd(ds)&&/native code/.test(String(ds))});var tr=s((Vx,Es)=>{"use strict";Es.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var Cr=s((zx,Ss)=>{"use strict";var qd=R(),yd=j(),Ed=tr();Ss.exports=qd?function(r,e,t){return yd.f(r,e,Ed(1,t))}:function(r,e,t){return r[e]=t,r}});var Ye=s((Kx,Rs)=>{"use strict";var Sd=ba(),md=Jr(),ms=Sd("keys");Rs.exports=function(r){return ms[r]||(ms[r]=md(r))}});var Zr=s((Wx,bs)=>{"use strict";bs.exports={}});var cr=s((Yx,xs)=>{"use strict";var Rd=ys(),Is=E(),bd=C(),Od=Cr(),La=I(),Na=Ke(),Id=Ye(),xd=Zr(),Os="Object already initialized",Ma=Is.TypeError,Td=Is.WeakMap,Xe,re,Qe,wd=function(r){return Qe(r)?re(r):Xe(r,{})},Pd=function(r){return function(e){var t;if(!bd(e)||(t=re(e)).type!==r)throw new Ma("Incompatible receiver, "+r+" required");return t}};Rd||Na.state?(Y=Na.state||(Na.state=new Td),Y.get=Y.get,Y.has=Y.has,Y.set=Y.set,Xe=function(r,e){if(Y.has(r))throw new Ma(Os);return e.facade=r,Y.set(r,e),e},re=function(r){return Y.get(r)||{}},Qe=function(r){return Y.has(r)}):(gr=Id("state"),xd[gr]=!0,Xe=function(r,e){if(La(r,gr))throw new Ma(Os);return e.facade=r,Od(r,gr,e),e},re=function(r){return La(r,gr)?r[gr]:{}},Qe=function(r){return La(r,gr)});var Y,gr;xs.exports={set:Xe,get:re,has:Qe,enforce:wd,getterFor:Pd}});var ja=s((Xx,Ps)=>{"use strict";var Ba=d(),Ad=y(),Fd=b(),Je=I(),Ua=R(),Cd=Ca().CONFIGURABLE,_d=Da(),ws=cr(),Dd=ws.enforce,Ld=ws.get,Ts=String,Ze=Object.defineProperty,Nd=Ba("".slice),Md=Ba("".replace),Ud=Ba([].join),Bd=Ua&&!Ad(function(){return Ze(function(){},"length",{value:8}).length!==8}),jd=String(String).split("String"),kd=Ps.exports=function(r,e,t){Nd(Ts(e),0,7)==="Symbol("&&(e="["+Md(Ts(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Je(r,"name")||Cd&&r.name!==e)&&(Ua?Ze(r,"name",{value:e,configurable:!0}):r.name=e),Bd&&t&&Je(t,"arity")&&r.length!==t.arity&&Ze(r,"length",{value:t.arity});try{t&&Je(t,"constructor")&&t.constructor?Ua&&Ze(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch{}var a=Dd(r);return Je(a,"source")||(a.source=Ud(jd,typeof e=="string"?e:"")),r};Function.prototype.toString=kd(function(){return Fd(this)&&Ld(this).source||_d(this)},"toString")});var k=s((Qx,As)=>{"use strict";var Gd=b(),Hd=j(),$d=ja(),Vd=ze();As.exports=function(r,e,t,a){a||(a={});var n=a.enumerable,i=a.name!==void 0?a.name:e;if(Gd(t)&&$d(t,i,a),a.global)n?r[e]=t:Vd(e,t);else{try{a.unsafe?r[e]&&(n=!0):delete r[e]}catch{}n?r[e]=t:Hd.f(r,e,{value:t,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return r}});var rt=s((Jx,Cs)=>{"use strict";var zd=D(),Kd=zd("toStringTag"),Fs={};Fs[Kd]="z";Cs.exports=String(Fs)==="[object z]"});var ar=s((Zx,Ds)=>{"use strict";var _s=d(),Wd=_s({}.toString),Yd=_s("".slice);Ds.exports=function(r){return Yd(Wd(r),8,-1)}});var _r=s((rT,Ls)=>{"use strict";var Xd=rt(),Qd=b(),et=ar(),Jd=D(),Zd=Jd("toStringTag"),rq=Object,eq=et((function(){return arguments})())==="Arguments",tq=function(r,e){try{return r[e]}catch{}};Ls.exports=Xd?et:function(r){var e,t,a;return r===void 0?"Undefined":r===null?"Null":typeof(t=tq(e=rq(r),Zd))=="string"?t:eq?et(e):(a=et(e))==="Object"&&Qd(e.callee)?"Arguments":a}});var H=s((eT,Ns)=>{"use strict";var aq=_r(),nq=String;Ns.exports=function(r){if(aq(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return nq(r)}});var tt=s((tT,Ms)=>{"use strict";var iq=H();Ms.exports=function(r,e){return r===void 0?arguments.length<2?"":e:iq(r)}});var ka=s((aT,Bs)=>{"use strict";var uq=R(),sq=y(),oq=U(),Us=tt(),at=Error.prototype.toString,cq=sq(function(){if(uq){var r=Object.create(Object.defineProperty({},"name",{get:function(){return this===r}}));if(at.call(r)!=="true")return!0}return at.call({message:1,name:2})!=="2: 1"||at.call({})!=="Error"});Bs.exports=cq?function(){var e=oq(this),t=Us(e.name,"Error"),a=Us(e.message);return t?a?t+": "+a:t:a}:at});var ee=s(()=>{"use strict";var vq=k(),js=ka(),ks=Error.prototype;ks.toString!==js&&vq(ks,"toString",js)});var Ga=s($s=>{"use strict";var Gs={}.propertyIsEnumerable,Hs=Object.getOwnPropertyDescriptor,fq=Hs&&!Gs.call({1:2},1);$s.f=fq?function(e){var t=Hs(this,e);return!!t&&t.enumerable}:Gs});var $a=s((sT,Vs)=>{"use strict";var lq=d(),hq=y(),pq=ar(),Ha=Object,gq=lq("".split);Vs.exports=hq(function(){return!Ha("z").propertyIsEnumerable(0)})?function(r){return pq(r)==="String"?gq(r,""):Ha(r)}:Ha});var dr=s((oT,zs)=>{"use strict";var dq=$a(),qq=Qr();zs.exports=function(r){return dq(qq(r))}});var Va=s(Ws=>{"use strict";var yq=R(),Eq=A(),Sq=Ga(),mq=tr(),Rq=dr(),bq=Ia(),Oq=I(),Iq=fa(),Ks=Object.getOwnPropertyDescriptor;Ws.f=yq?Ks:function(e,t){if(e=Rq(e),t=bq(t),Iq)try{return Ks(e,t)}catch{}if(Oq(e,t))return mq(!Eq(Sq.f,e,t),e[t])}});var Xs=s((vT,Ys)=>{"use strict";var xq=Math.ceil,Tq=Math.floor;Ys.exports=Math.trunc||function(e){var t=+e;return(t>0?Tq:xq)(t)}});var nt=s((fT,Qs)=>{"use strict";var wq=Xs();Qs.exports=function(r){var e=+r;return e!==e||e===0?0:wq(e)}});var za=s((lT,Js)=>{"use strict";var Pq=nt(),Aq=Math.max,Fq=Math.min;Js.exports=function(r,e){var t=Pq(r);return t<0?Aq(t+e,0):Fq(t,e)}});var ro=s((hT,Zs)=>{"use strict";var Cq=nt(),_q=Math.min;Zs.exports=function(r){var e=Cq(r);return e>0?_q(e,9007199254740991):0}});var te=s((pT,eo)=>{"use strict";var Dq=ro();eo.exports=function(r){return Dq(r.length)}});var no=s((gT,ao)=>{"use strict";var Lq=dr(),Nq=za(),Mq=te(),to=function(r){return function(e,t,a){var n=Lq(e),i=Mq(n);if(i===0)return!r&&-1;var u=Nq(a,i),c;if(r&&t!==t){for(;i>u;)if(c=n[u++],c!==c)return!0}else for(;i>u;u++)if((r||u in n)&&n[u]===t)return r||u||0;return!r&&-1}};ao.exports={includes:to(!0),indexOf:to(!1)}});var Wa=s((dT,uo)=>{"use strict";var Uq=d(),Ka=I(),Bq=dr(),jq=no().indexOf,kq=Zr(),io=Uq([].push);uo.exports=function(r,e){var t=Bq(r),a=0,n=[],i;for(i in t)!Ka(kq,i)&&Ka(t,i)&&io(n,i);for(;e.length>a;)Ka(t,i=e[a++])&&(~jq(n,i)||io(n,i));return n}});var it=s((qT,so)=>{"use strict";so.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var ut=s(oo=>{"use strict";var Gq=Wa(),Hq=it(),$q=Hq.concat("length","prototype");oo.f=Object.getOwnPropertyNames||function(e){return Gq(e,$q)}});var Ya=s(co=>{"use strict";co.f=Object.getOwnPropertySymbols});var fo=s((ST,vo)=>{"use strict";var Vq=_(),zq=d(),Kq=ut(),Wq=Ya(),Yq=U(),Xq=zq([].concat);vo.exports=Vq("Reflect","ownKeys")||function(e){var t=Kq.f(Yq(e)),a=Wq.f;return a?Xq(t,a(e)):t}});var po=s((mT,ho)=>{"use strict";var lo=I(),Qq=fo(),Jq=Va(),Zq=j();ho.exports=function(r,e,t){for(var a=Qq(e),n=Zq.f,i=Jq.f,u=0;u<a.length;u++){var c=a[u];!lo(r,c)&&!(t&&lo(t,c))&&n(r,c,i(e,c))}}});var Xa=s((RT,go)=>{"use strict";var ry=y(),ey=b(),ty=/#|\.prototype\./,ae=function(r,e){var t=ny[ay(r)];return t===uy?!0:t===iy?!1:ey(e)?ry(e):!!e},ay=ae.normalize=function(r){return String(r).replace(ty,".").toLowerCase()},ny=ae.data={},iy=ae.NATIVE="N",uy=ae.POLYFILL="P";go.exports=ae});var F=s((bT,qo)=>{"use strict";var st=E(),sy=Va().f,oy=Cr(),cy=k(),vy=ze(),fy=po(),ly=Xa();qo.exports=function(r,e){var t=r.target,a=r.global,n=r.stat,i,u,c,v,f,l;if(a?u=st:n?u=st[t]||vy(t,{}):u=st[t]&&st[t].prototype,u)for(c in e){if(f=e[c],r.dontCallGetSet?(l=sy(u,c),v=l&&l.value):v=u[c],i=ly(a?c:t+(n?".":"#")+c,r.forced),!i&&v!==void 0){if(typeof f==typeof v)continue;fy(f,v)}(r.sham||v&&v.sham)&&oy(f,"sham",!0),cy(u,c,f,r)}}});var Qa=s((OT,yo)=>{"use strict";var ne=E(),hy=ga(),py=ar(),ot=function(r){return hy.slice(0,r.length)===r};yo.exports=(function(){return ot("Bun/")?"BUN":ot("Cloudflare-Workers")?"CLOUDFLARE":ot("Deno/")?"DENO":ot("Node.js/")?"NODE":ne.Bun&&typeof Bun.version=="string"?"BUN":ne.Deno&&typeof Deno.version=="object"?"DENO":py(ne.process)==="process"?"NODE":ne.window&&ne.document?"BROWSER":"REST"})()});var So=s((IT,Eo)=>{"use strict";var gy=Qa();Eo.exports=gy==="NODE"});var Ja=s((xT,mo)=>{"use strict";var dy=E(),qy=So();mo.exports=function(r){if(qy){try{return dy.process.getBuiltinModule(r)}catch{}try{return Function('return require("'+r+'")')()}catch{}}}});var ct=s((TT,Ro)=>{"use strict";var yy=Wa(),Ey=it();Ro.exports=Object.keys||function(e){return yy(e,Ey)}});var Oo=s(bo=>{"use strict";var Sy=R(),my=la(),Ry=j(),by=U(),Oy=dr(),Iy=ct();bo.f=Sy&&!my?Object.defineProperties:function(e,t){by(e);for(var a=Oy(t),n=Iy(t),i=n.length,u=0,c;i>u;)Ry.f(e,c=n[u++],a[c]);return e}});var xo=s((PT,Io)=>{"use strict";var xy=_();Io.exports=xy("document","documentElement")});var qr=s((AT,_o)=>{"use strict";var Ty=U(),wy=Oo(),To=it(),Py=Zr(),Ay=xo(),Fy=Ue(),Cy=Ye(),wo=">",Po="<",rn="prototype",en="script",Fo=Cy("IE_PROTO"),Za=function(){},Co=function(r){return Po+en+wo+r+Po+"/"+en+wo},Ao=function(r){r.write(Co("")),r.close();var e=r.parentWindow.Object;return r=null,e},_y=function(){var r=Fy("iframe"),e="java"+en+":",t;return r.style.display="none",Ay.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(Co("document.F=Object")),t.close(),t.F},vt,ft=function(){try{vt=new ActiveXObject("htmlfile")}catch{}ft=typeof document<"u"?document.domain&&vt?Ao(vt):_y():Ao(vt);for(var r=To.length;r--;)delete ft[rn][To[r]];return ft()};Py[Fo]=!0;_o.exports=Object.create||function(e,t){var a;return e!==null?(Za[rn]=Ty(e),a=new Za,Za[rn]=null,a[Fo]=e):a=ft(),t===void 0?a:wy.f(a,t)}});var yr=s((FT,Lo)=>{"use strict";var Do=ja(),Dy=j();Lo.exports=function(r,e,t){return t.get&&Do(t.get,e,{getter:!0}),t.set&&Do(t.set,e,{setter:!0}),Dy.f(r,e,t)}});var Er=s((CT,No)=>{"use strict";var Ly=Xr(),Ny=TypeError;No.exports=function(r,e){if(Ly(e,r))return r;throw new Ny("Incorrect invocation")}});var tn=s((_T,Mo)=>{"use strict";Mo.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}});var an=s((DT,jo)=>{"use strict";var My=d(),Uo=Error,Uy=My("".replace),By=(function(r){return String(new Uo(r).stack)})("zxcasd"),Bo=/\n\s*at [^:]*:[^\n]*/,jy=Bo.test(By);jo.exports=function(r,e){if(jy&&typeof r=="string"&&!Uo.prepareStackTrace)for(;e--;)r=Uy(r,Bo,"");return r}});var oe=s(()=>{"use strict";var ky=F(),pt=_(),Gy=Ja(),vn=y(),Hy=qr(),fn=tr(),gt=j().f,$y=k(),lt=yr(),ht=I(),Vy=Er(),zy=U(),Ho=ka(),ko=tt(),Dr=tn(),Ky=an(),$o=cr(),ln=R(),Vo=er(),Lr="DOMException",cn="DATA_CLONE_ERR",qt=pt("Error"),nr=pt(Lr)||(function(){try{var r=pt("MessageChannel")||Gy("worker_threads").MessageChannel;new r().port1.postMessage(new WeakMap)}catch(e){if(e.name===cn&&e.code===25)return e.constructor}})(),Wy=nr&&nr.prototype,zo=qt.prototype,Yy=$o.set,Xy=$o.getterFor(Lr),Qy="stack"in new qt(Lr),Ko=function(r){return ht(Dr,r)&&Dr[r].m?Dr[r].c:0},hn=function(){Vy(this,ue);var e=arguments.length,t=ko(e<1?void 0:arguments[0]),a=ko(e<2?void 0:arguments[1],"Error"),n=Ko(a);if(Yy(this,{type:Lr,name:a,message:t,code:n}),ln||(this.name=a,this.message=t,this.code=n),Qy){var i=new qt(t);i.name=Lr,gt(this,"stack",fn(1,Ky(i.stack,1)))}},ue=hn.prototype=Hy(zo),Wo=function(r){return{enumerable:!0,configurable:!0,get:r}},nn=function(r){return Wo(function(){return Xy(this)[r]})};ln&&(lt(ue,"code",nn("code")),lt(ue,"message",nn("message")),lt(ue,"name",nn("name")));gt(ue,"constructor",fn(1,hn));var yt=vn(function(){return!(new nr instanceof qt)}),Yo=yt||vn(function(){return zo.toString!==Ho||String(new nr(1,2))!=="2: 1"}),Xo=yt||vn(function(){return new nr(1,"DataCloneError").code!==25}),Jy=yt||nr[cn]!==25||Wy[cn]!==25,Go=Vo?Yo||Xo||Jy:yt;ky({global:!0,constructor:!0,forced:Go},{DOMException:Go?hn:nr});var se=pt(Lr),dt=se.prototype;Yo&&(Vo||nr===se)&&$y(dt,"toString",Ho);Xo&&ln&&nr===se&<(dt,"code",Wo(function(){return Ko(zy(this).name)}));for(un in Dr)ht(Dr,un)&&(sn=Dr[un],ie=sn.s,on=fn(6,sn.c),ht(se,ie)||gt(se,ie,on),ht(dt,ie)||gt(dt,ie,on));var sn,ie,on,un});var Jo=s((MT,Qo)=>{"use strict";var Zy=d(),rE=$e();Qo.exports=function(r,e,t){try{return Zy(rE(Object.getOwnPropertyDescriptor(r,e)[t]))}catch{}}});var rc=s((UT,Zo)=>{"use strict";var eE=C();Zo.exports=function(r){return eE(r)||r===null}});var tc=s((BT,ec)=>{"use strict";var tE=rc(),aE=String,nE=TypeError;ec.exports=function(r){if(tE(r))return r;throw new nE("Can't set "+aE(r)+" as a prototype")}});var pn=s((jT,ac)=>{"use strict";var iE=Jo(),uE=C(),sE=Qr(),oE=tc();ac.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var r=!1,e={},t;try{t=iE(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch{}return function(n,i){return sE(n),oE(i),uE(n)&&(r?t(n,i):n.__proto__=i),n}})():void 0)});var gn=s((kT,ic)=>{"use strict";var cE=b(),vE=C(),nc=pn();ic.exports=function(r,e,t){var a,n;return nc&&cE(a=e.constructor)&&a!==t&&vE(n=a.prototype)&&n!==t.prototype&&nc(r,n),r}});var le=s(()=>{"use strict";var fE=F(),lE=E(),bn=_(),mn=tr(),Rn=j().f,uc=I(),hE=Er(),pE=gn(),sc=tt(),dn=tn(),gE=an(),dE=R(),vc=er(),ve="DOMException",fc=bn("Error"),fe=bn(ve),On=function(){hE(this,qE);var e=arguments.length,t=sc(e<1?void 0:arguments[0]),a=sc(e<2?void 0:arguments[1],"Error"),n=new fe(t,a),i=new fc(t);return i.name=ve,Rn(n,"stack",mn(1,gE(i.stack,1))),pE(n,this,On),n},qE=On.prototype=fe.prototype,yE="stack"in new fc(ve),EE="stack"in new fe(1,2),qn=fe&&dE&&Object.getOwnPropertyDescriptor(lE,ve),SE=!!qn&&!(qn.writable&&qn.configurable),oc=yE&&!SE&&!EE;fE({global:!0,constructor:!0,forced:vc||oc},{DOMException:oc?On:fe});var ce=bn(ve),cc=ce.prototype;if(cc.constructor!==ce){vc||Rn(cc,"constructor",mn(1,ce));for(yn in dn)uc(dn,yn)&&(En=dn[yn],Sn=En.s,uc(ce,Sn)||Rn(ce,Sn,mn(6,En.c)))}var En,Sn,yn});var vr=s(($T,hc)=>{"use strict";var mE=j().f,RE=I(),bE=D(),lc=bE("toStringTag");hc.exports=function(r,e,t){r&&!t&&(r=r.prototype),r&&!RE(r,lc)&&mE(r,lc,{configurable:!0,value:e})}});var he=s(()=>{"use strict";var OE=_(),IE=vr(),pc="DOMException";IE(OE(pc),pc)});var Sr=s((KT,gc)=>{"use strict";var xE=E();gc.exports=xE});var qc=s((WT,dc)=>{"use strict";ee();oe();le();he();var TE=Sr();dc.exports=TE.DOMException});var Ec=s((YT,yc)=>{"use strict";var wE=qc();yc.exports=wE});var mc=s((XT,Sc)=>{"use strict";var PE=D(),AE=qr(),FE=j().f,In=PE("unscopables"),xn=Array.prototype;xn[In]===void 0&&FE(xn,In,{configurable:!0,value:AE(null)});Sc.exports=function(r){xn[In][r]=!0}});var pe=s((QT,Rc)=>{"use strict";Rc.exports=Object.create?Object.create(null):{}});var Oc=s((JT,bc)=>{"use strict";var CE=y();bc.exports=!CE(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var wn=s((ZT,xc)=>{"use strict";var _E=I(),DE=b(),LE=Ar(),NE=Ye(),ME=Oc(),Ic=NE("IE_PROTO"),Tn=Object,UE=Tn.prototype;xc.exports=ME?Tn.getPrototypeOf:function(r){var e=LE(r);if(_E(e,Ic))return e[Ic];var t=e.constructor;return DE(t)&&e instanceof t?t.prototype:e instanceof Tn?UE:null}});var Cn=s((rw,Pc)=>{"use strict";var BE=y(),jE=b(),kE=C(),GE=qr(),Tc=wn(),HE=k(),$E=D(),VE=er(),Fn=$E("iterator"),wc=!1,ir,Pn,An;[].keys&&(An=[].keys(),"next"in An?(Pn=Tc(Tc(An)),Pn!==Object.prototype&&(ir=Pn)):wc=!0);var zE=!kE(ir)||BE(function(){var r={};return ir[Fn].call(r)!==r});zE?ir={}:VE&&(ir=GE(ir));jE(ir[Fn])||HE(ir,Fn,function(){return this});Pc.exports={IteratorPrototype:ir,BUGGY_SAFARI_ITERATORS:wc}});var _n=s((ew,Ac)=>{"use strict";var KE=Cn().IteratorPrototype,WE=qr(),YE=tr(),XE=vr(),QE=pe(),JE=function(){return this};Ac.exports=function(r,e,t,a){var n=e+" Iterator";return r.prototype=WE(KE,{next:YE(+!a,t)}),XE(r,n,!1,!0),QE[n]=JE,r}});var mt=s((tw,jc)=>{"use strict";var ZE=F(),r0=A(),Et=er(),Uc=Ca(),e0=b(),t0=_n(),Fc=wn(),Cc=pn(),a0=vr(),n0=Cr(),Dn=k(),i0=D(),_c=pe(),Bc=Cn(),u0=Uc.PROPER,s0=Uc.CONFIGURABLE,Dc=Bc.IteratorPrototype,St=Bc.BUGGY_SAFARI_ITERATORS,ge=i0("iterator"),Lc="keys",de="values",Nc="entries",Mc=function(){return this};jc.exports=function(r,e,t,a,n,i,u){t0(t,e,a);var c=function(q){if(q===n&&h)return h;if(!St&&q&&q in l)return l[q];switch(q){case Lc:return function(){return new t(this,q)};case de:return function(){return new t(this,q)};case Nc:return function(){return new t(this,q)}}return function(){return new t(this)}},v=e+" Iterator",f=!1,l=r.prototype,o=l[ge]||l["@@iterator"]||n&&l[n],h=!St&&o||c(n),p=e==="Array"&&l.entries||o,g,S,w;if(p&&(g=Fc(p.call(new r)),g!==Object.prototype&&g.next&&(!Et&&Fc(g)!==Dc&&(Cc?Cc(g,Dc):e0(g[ge])||Dn(g,ge,Mc)),a0(g,v,!0,!0),Et&&(_c[v]=Mc))),u0&&n===de&&o&&o.name!==de&&(!Et&&s0?n0(l,"name",de):(f=!0,h=function(){return r0(o,this)})),n)if(S={values:c(de),keys:i?h:c(Lc),entries:c(Nc)},u)for(w in S)(St||f||!(w in l))&&Dn(l,w,S[w]);else ZE({target:e,proto:!0,forced:St||f},S);return(!Et||u)&&l[ge]!==h&&Dn(l,ge,h,{name:n}),_c[e]=h,S}});var qe=s((aw,kc)=>{"use strict";kc.exports=function(r,e){return{value:r,done:e}}});var bt=s((nw,zc)=>{"use strict";var o0=dr(),Ln=mc(),Gc=pe(),$c=cr(),c0=j().f,v0=mt(),Rt=qe(),f0=er(),l0=R(),Vc="Array Iterator",h0=$c.set,p0=$c.getterFor(Vc);zc.exports=v0(Array,"Array",function(r,e){h0(this,{type:Vc,target:o0(r),index:0,kind:e})},function(){var r=p0(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=null,Rt(void 0,!0);switch(r.kind){case"keys":return Rt(t,!1);case"values":return Rt(e[t],!1)}return Rt([t,e[t]],!1)},"values");var Hc=Gc.Arguments=Gc.Array;Ln("keys");Ln("values");Ln("entries");if(!f0&&l0&&Hc.name!=="values")try{c0(Hc,"name",{value:"values"})}catch{}});var Yc=s((iw,Wc)=>{"use strict";var Kc=E(),g0=R(),d0=Object.getOwnPropertyDescriptor;Wc.exports=function(r){if(!g0)return Kc[r];var e=d0(Kc,r);return e&&e.value}});var ye=s((uw,Qc)=>{"use strict";var q0=y(),y0=D(),E0=R(),Xc=er(),S0=y0("iterator");Qc.exports=!q0(function(){var r=new URL("b?a=1&b=2&c=3","https://a"),e=r.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),a="";return r.pathname="c%20d",e.forEach(function(n,i){e.delete("b"),a+=i+n}),t.delete("a",2),t.delete("b",void 0),Xc&&(!r.toJSON||!t.has("a",1)||t.has("a",2)||!t.has("a",void 0)||t.has("b"))||!e.size&&(Xc||!E0)||!e.sort||r.href!=="https://a/c%20d?a=1&c=3"||e.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!e[S0]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||a!=="a1c3"||new URL("https://x",void 0).host!=="x"})});var rv=s(()=>{"use strict";var m0=F(),R0=d(),b0=za(),O0=RangeError,Jc=String.fromCharCode,Zc=String.fromCodePoint,I0=R0([].join),x0=!!Zc&&Zc.length!==1;m0({target:"String",stat:!0,arity:1,forced:x0},{fromCodePoint:function(e){for(var t=[],a=arguments.length,n=0,i;a>n;){if(i=+arguments[n],b0(i,1114111)!==i)throw new O0(i+" is not a valid code point");t[n++]=i<65536?Jc(i):Jc(((i-=65536)>>10)+55296,i%1024+56320)}return I0(t,"")}})});var Mn=s((cw,av)=>{"use strict";rv();var T0=_(),Ee=d(),w0=String.fromCharCode,P0=T0("String","fromCodePoint"),ev=encodeURIComponent,A0=parseInt,Nn=Ee("".charAt),F0=Ee([].push),C0=Ee("".replace),_0=Ee("".slice),D0=Ee(/./.exec),Ot="\uFFFD",L0=/^[0-9a-f]+$/i,N0=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,tv=function(r,e){var t=_0(r,e,e+2);return D0(L0,t)?A0(t,16):NaN},M0=function(r){for(var e=0,t=128;t>0&&(r&t)!==0;t>>=1)e++;return e},U0=function(r){var e=null,t=r.length;switch(t){case 1:e=r[0];break;case 2:e=(r[0]&31)<<6|r[1]&63;break;case 3:e=(r[0]&15)<<12|(r[1]&63)<<6|r[2]&63;break;case 4:e=(r[0]&7)<<18|(r[1]&63)<<12|(r[2]&63)<<6|r[3]&63;break}return e===null||e>1114111||e>=55296&&e<=57343||e<(t>3?65536:t>2?2048:t>1?128:0)?null:e},B0=function(r){return r.length===2?r:Ot},j0=function(r){for(var e=r.length,t="",a=0;a<e;){var n=Nn(r,a);if(n==="%"){if(Nn(r,a+1)==="%"||a+3>e){t+="%",a++;continue}var i=tv(r,a+1);if(i!==i){t+=n,a++;continue}a+=2;var u=M0(i);if(u===0)n=w0(i);else{if(u===1||u>4){t+=Ot,a++;continue}for(var c=[i],v=1;v<u&&(a++,!(a+3>e||Nn(r,a)!=="%"));){var f=tv(r,a+1);if(f!==f||f>191||f<128||v===1&&(i===224&&f<160||i===237&&f>159||i===240&&f<144||i===244&&f>143))break;F0(c,f),a+=2,v++}if(c.length!==u){t+=Ot;continue}var l=U0(c);if(l===null){for(var o=0;o<u;o++)t+=Ot;a++;continue}else n=P0(l)}}t+=n,a++}return t},k0=function(r){try{return ev(r)}catch{return ev(C0(r,N0,B0))}};av.exports={decode:j0,encode:k0}});var Un=s((vw,nv)=>{"use strict";var G0=k();nv.exports=function(r,e,t){for(var a in e)G0(r,a,e[a],t);return r}});var uv=s((fw,iv)=>{"use strict";var H0=ar(),$0=d();iv.exports=function(r){if(H0(r)==="Function")return $0(r)}});var Nr=s((lw,ov)=>{"use strict";var sv=uv(),V0=$e(),z0=Be(),K0=sv(sv.bind);ov.exports=function(r,e){return V0(r),e===void 0?r:z0?K0(r,e):function(){return r.apply(e,arguments)}}});var Se=s((hw,fv)=>{"use strict";var W0=ar(),Y0=pr(),cv=Ve(),X0=D(),vv=X0("iterator"),Q0=Array.prototype;fv.exports=function(r){if(!Y0(r))return cv(r,vv)||cv(r,"@@iterator")||(W0(r)==="Arguments"?Q0[vv]:void 0)}});var It=s((pw,lv)=>{"use strict";var J0=A(),Z0=b(),rS=U(),eS=He(),tS=Se(),aS=TypeError;lv.exports=function(r,e){var t=arguments.length<2?tS(r):e;if(Z0(t))return rS(J0(t,r));throw new aS(eS(r)+" is not iterable")}});var J=s((gw,hv)=>{"use strict";var nS=TypeError;hv.exports=function(r,e){if(r<e)throw new nS("Not enough arguments");return r}});var xt=s((dw,pv)=>{"use strict";var iS=d();pv.exports=iS([].slice)});var qv=s((qw,dv)=>{"use strict";var gv=xt(),uS=Math.floor,Bn=function(r,e){var t=r.length;if(t<8)for(var a=1,n,i;a<t;){for(i=a,n=r[a];i&&e(r[i-1],n)>0;)r[i]=r[--i];i!==a++&&(r[i]=n)}else for(var u=uS(t/2),c=Bn(gv(r,0,u),e),v=Bn(gv(r,u),e),f=c.length,l=v.length,o=0,h=0;o<f||h<l;)r[o+h]=o<f&&h<l?e(c[o],v[h])<=0?c[o++]:v[h++]:o<f?c[o++]:v[h++];return r};dv.exports=Bn});var Kn=s((yw,Uv)=>{"use strict";bt();var $n=F(),sS=E(),Vn=Yc(),Tt=A(),Z=d(),me=R(),Pv=ye(),Av=Mn(),Fv=k(),oS=yr(),cS=Un(),vS=vr(),fS=_n(),zn=cr(),Cv=Er(),jn=b(),lS=I(),hS=Nr(),pS=_r(),gS=U(),_v=C(),L=H(),dS=qr(),yv=tr(),Ev=It(),qS=Se(),wt=qe(),Mr=J(),yS=D(),ES=qv(),SS=yS("iterator"),Br="URLSearchParams",Dv=Br+"Iterator",Lv=zn.set,$=zn.getterFor(Br),mS=zn.getterFor(Dv),RS=Av.decode,bS=Av.encode,Sv=Vn("fetch"),At=Vn("Request"),Re=Vn("Headers"),kn=At&&At.prototype,mv=Re&&Re.prototype,OS=sS.TypeError,IS=Z("".charAt),Rv=Z([].join),mr=Z([].push),Nv=Z("".replace),xS=Z([].shift),bv=Z([].splice),Ov=Z("".split),TS=Z("".slice),wS=/\+/g,Iv=function(r){return RS(Nv(r,wS," "))},PS=/[!'()~]|%20/g,AS={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},FS=function(r){return AS[r]},xv=function(r){return Nv(bS(r),PS,FS)},Gn=fS(function(e,t){Lv(this,{type:Dv,target:$(e).entries,index:0,kind:t})},Br,function(){var e=mS(this),t=e.target,a=e.index++;if(!t||a>=t.length)return e.target=null,wt(void 0,!0);var n=t[a];switch(e.kind){case"keys":return wt(n.key,!1);case"values":return wt(n.value,!1)}return wt([n.key,n.value],!1)},!0),Mv=function(r){this.entries=[],this.url=null,r!==void 0&&(_v(r)?this.parseObject(r):this.parseQuery(typeof r=="string"?IS(r,0)==="?"?TS(r,1):r:L(r)))};Mv.prototype={type:Br,bindURL:function(r){this.url=r,this.update()},parseObject:function(r){var e=this.entries,t=qS(r),a,n,i,u,c,v,f;if(t)for(a=Ev(r,t),n=a.next;!(i=Tt(n,a)).done;){if(u=Ev(gS(i.value)),c=u.next,(v=Tt(c,u)).done||(f=Tt(c,u)).done||!Tt(c,u).done)throw new OS("Expected sequence with length 2");mr(e,{key:L(v.value),value:L(f.value)})}else for(var l in r)lS(r,l)&&mr(e,{key:l,value:L(r[l])})},parseQuery:function(r){if(r)for(var e=this.entries,t=Ov(r,"&"),a=0,n,i;a<t.length;)n=t[a++],n.length&&(i=Ov(n,"="),mr(e,{key:Iv(xS(i)),value:Iv(Rv(i,"="))}))},serialize:function(){for(var r=this.entries,e=[],t=0,a;t<r.length;)a=r[t++],mr(e,xv(a.key)+"="+xv(a.value));return Rv(e,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ft=function(){Cv(this,Ur);var e=arguments.length>0?arguments[0]:void 0,t=Lv(this,new Mv(e));me||(this.size=t.entries.length)},Ur=Ft.prototype;cS(Ur,{append:function(e,t){var a=$(this);Mr(arguments.length,2),mr(a.entries,{key:L(e),value:L(t)}),me||this.size++,a.updateURL()},delete:function(r){for(var e=$(this),t=Mr(arguments.length,1),a=e.entries,n=L(r),i=t<2?void 0:arguments[1],u=i===void 0?i:L(i),c=0;c<a.length;){var v=a[c];v.key===n&&(u===void 0||v.value===u)?bv(a,c,1):c++}me||(this.size=a.length),e.updateURL()},get:function(e){var t=$(this).entries;Mr(arguments.length,1);for(var a=L(e),n=0;n<t.length;n++)if(t[n].key===a)return t[n].value;return null},getAll:function(e){var t=$(this).entries;Mr(arguments.length,1);for(var a=L(e),n=[],i=0;i<t.length;i++)t[i].key===a&&mr(n,t[i].value);return n},has:function(e){for(var t=$(this).entries,a=Mr(arguments.length,1),n=L(e),i=a<2?void 0:arguments[1],u=i===void 0?i:L(i),c=0;c<t.length;){var v=t[c++];if(v.key===n&&(u===void 0||v.value===u))return!0}return!1},set:function(e,t){var a=$(this);Mr(arguments.length,2);for(var n=a.entries,i=!1,u=L(e),c=L(t),v=0,f;v<n.length;v++)f=n[v],f.key===u&&(i?bv(n,v--,1):(i=!0,f.value=c));i||mr(n,{key:u,value:c}),me||(this.size=n.length),a.updateURL()},sort:function(){var e=$(this);ES(e.entries,function(t,a){return t.key>a.key?1:-1}),e.updateURL()},forEach:function(e){for(var t=$(this).entries,a=hS(e,arguments.length>1?arguments[1]:void 0),n=0,i;n<t.length;)i=t[n++],a(i.value,i.key,this)},keys:function(){return new Gn(this,"keys")},values:function(){return new Gn(this,"values")},entries:function(){return new Gn(this,"entries")}},{enumerable:!0});Fv(Ur,SS,Ur.entries,{name:"entries"});Fv(Ur,"toString",function(){return $(this).serialize()},{enumerable:!0});me&&oS(Ur,"size",{get:function(){return $(this).entries.length},configurable:!0,enumerable:!0});vS(Ft,Br);$n({global:!0,constructor:!0,forced:!Pv},{URLSearchParams:Ft});!Pv&&jn(Re)&&(Tv=Z(mv.has),wv=Z(mv.set),Hn=function(r){if(_v(r)){var e=r.body,t;if(pS(e)===Br)return t=r.headers?new Re(r.headers):new Re,Tv(t,"content-type")||wv(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),dS(r,{body:yv(0,L(e)),headers:yv(0,t)})}return r},jn(Sv)&&$n({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Sv(e,arguments.length>1?Hn(arguments[1]):{})}}),jn(At)&&(Pt=function(e){return Cv(this,kn),new At(e,arguments.length>1?Hn(arguments[1]):{})},kn.constructor=Pt,Pt.prototype=kn,$n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Pt})));var Tv,wv,Hn,Pt;Uv.exports={URLSearchParams:Ft,getState:$}});var Bv=s(()=>{"use strict";Kn()});var Hv=s(()=>{"use strict";var CS=k(),Ct=d(),jv=H(),_S=J(),Gv=URLSearchParams,_t=Gv.prototype,DS=Ct(_t.append),kv=Ct(_t.delete),LS=Ct(_t.forEach),NS=Ct([].push),Wn=new Gv("a=1&a=2&b=3");Wn.delete("a",1);Wn.delete("b",void 0);Wn+""!="a=2"&&CS(_t,"delete",function(r){var e=arguments.length,t=e<2?void 0:arguments[1];if(e&&t===void 0)return kv(this,r);var a=[];LS(this,function(f,l){NS(a,{key:l,value:f})}),_S(e,1);for(var n=jv(r),i=jv(t),u=0,c=a.length,v;u<c;)v=a[u],kv(this,v.key),u++;for(u=0;u<c;)v=a[u++],v.key===n&&v.value===i||DS(this,v.key,v.value)},{enumerable:!0,unsafe:!0})});var Kv=s(()=>{"use strict";var MS=k(),Vv=d(),US=H(),BS=J(),zv=URLSearchParams,Yn=zv.prototype,jS=Vv(Yn.getAll),kS=Vv(Yn.has),$v=new zv("a=1");($v.has("a",2)||!$v.has("a",void 0))&&MS(Yn,"has",function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&a===void 0)return kS(this,e);var n=jS(this,e);BS(t,1);for(var i=US(a),u=0;u<n.length;)if(n[u++]===i)return!0;return!1},{enumerable:!0,unsafe:!0})});var Wv=s(()=>{"use strict";var GS=R(),HS=d(),$S=yr(),Xn=URLSearchParams.prototype,VS=HS(Xn.forEach);GS&&!("size"in Xn)&&$S(Xn,"size",{get:function(){var e=0;return VS(this,function(){e++}),e},configurable:!0,enumerable:!0})});var Qn=s((Tw,Yv)=>{"use strict";Bv();Hv();Kv();Wv();var zS=Sr();Yv.exports=zS.URLSearchParams});var Zn=s((ww,Jv)=>{"use strict";var Jn=d(),KS=nt(),WS=H(),YS=Qr(),XS=Jn("".charAt),Xv=Jn("".charCodeAt),QS=Jn("".slice),Qv=function(r){return function(e,t){var a=WS(YS(e)),n=KS(t),i=a.length,u,c;return n<0||n>=i?r?"":void 0:(u=Xv(a,n),u<55296||u>56319||n+1===i||(c=Xv(a,n+1))<56320||c>57343?r?XS(a,n):u:r?QS(a,n,n+2):(u-55296<<10)+(c-56320)+65536)}};Jv.exports={codeAt:Qv(!1),charAt:Qv(!0)}});var tf=s(()=>{"use strict";var JS=Zn().charAt,ZS=H(),rf=cr(),rm=mt(),Zv=qe(),ef="String Iterator",em=rf.set,tm=rf.getterFor(ef);rm(String,"String",function(r){em(this,{type:ef,string:ZS(r),index:0})},function(){var e=tm(this),t=e.string,a=e.index,n;return a>=t.length?Zv(void 0,!0):(n=JS(t,a),e.index+=n.length,Zv(n,!1))})});var sf=s((Fw,uf)=>{"use strict";var af=R(),am=d(),nm=A(),im=y(),ri=ct(),um=Ya(),sm=Ga(),om=Ar(),cm=$a(),jr=Object.assign,nf=Object.defineProperty,vm=am([].concat);uf.exports=!jr||im(function(){if(af&&jr({b:1},jr(nf({},"a",{enumerable:!0,get:function(){nf(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},e={},t=Symbol("assign detection"),a="abcdefghijklmnopqrst";return r[t]=7,a.split("").forEach(function(n){e[n]=n}),jr({},r)[t]!==7||ri(jr({},e)).join("")!==a})?function(e,t){for(var a=om(e),n=arguments.length,i=1,u=um.f,c=sm.f;n>i;)for(var v=cm(arguments[i++]),f=u?vm(ri(v),u(v)):ri(v),l=f.length,o=0,h;l>o;)h=f[o++],(!af||nm(c,v,h))&&(a[h]=v[h]);return a}:jr});var Dt=s((Cw,cf)=>{"use strict";var fm=A(),of=U(),lm=Ve();cf.exports=function(r,e,t){var a,n;of(r);try{if(a=lm(r,"return"),!a){if(e==="throw")throw t;return t}a=fm(a,r)}catch(i){n=!0,a=i}if(e==="throw")throw t;if(n)throw a;return of(a),t}});var ff=s((_w,vf)=>{"use strict";var hm=U(),pm=Dt();vf.exports=function(r,e,t,a){try{return a?e(hm(t)[0],t[1]):e(t)}catch(n){pm(r,"throw",n)}}});var ei=s((Dw,lf)=>{"use strict";var gm=D(),dm=pe(),qm=gm("iterator"),ym=Array.prototype;lf.exports=function(r){return r!==void 0&&(dm.Array===r||ym[qm]===r)}});var ai=s((Lw,qf)=>{"use strict";var Em=d(),Sm=y(),hf=b(),mm=_r(),Rm=_(),bm=Da(),pf=function(){},gf=Rm("Reflect","construct"),ti=/^\s*(?:class|function)\b/,Om=Em(ti.exec),Im=!ti.test(pf),be=function(e){if(!hf(e))return!1;try{return gf(pf,[],e),!0}catch{return!1}},df=function(e){if(!hf(e))return!1;switch(mm(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Im||!!Om(ti,bm(e))}catch{return!0}};df.sham=!0;qf.exports=!gf||Sm(function(){var r;return be(be.call)||!be(Object)||!be(function(){r=!0})||r})?df:be});var ni=s((Nw,yf)=>{"use strict";var xm=R(),Tm=j(),wm=tr();yf.exports=function(r,e,t){xm?Tm.f(r,e,wm(0,t)):r[e]=t}});var Sf=s((Mw,Ef)=>{"use strict";var Pm=ar();Ef.exports=Array.isArray||function(e){return Pm(e)==="Array"}});var Rf=s((Uw,mf)=>{"use strict";var Am=R(),Fm=Sf(),Cm=TypeError,_m=Object.getOwnPropertyDescriptor,Dm=Am&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}})();mf.exports=Dm?function(r,e){if(Fm(r)&&!_m(r,"length").writable)throw new Cm("Cannot set read only .length");return r.length=e}:function(r,e){return r.length=e}});var Of=s((Bw,bf)=>{"use strict";var Lm=TypeError,Nm=9007199254740991;bf.exports=function(r){if(r>Nm)throw new Lm("Maximum allowed index exceeded");return r}});var Pf=s((jw,wf)=>{"use strict";var Mm=Nr(),Um=A(),Bm=Ar(),jm=ff(),km=ei(),Gm=ai(),Hm=te(),If=ni(),$m=Rf(),Vm=It(),zm=Se(),xf=Dt(),Km=Of(),Tf=Array;wf.exports=function(e){var t=Gm(this),a=arguments.length,n=a>1?arguments[1]:void 0,i=n!==void 0;i&&(n=Mm(n,a>2?arguments[2]:void 0));var u=Bm(e),c=zm(u),v=0,f,l,o,h,p,g;if(c&&!(this===Tf&&km(c)))for(l=t?new this:[],h=Vm(u,c),p=h.next;!(o=Um(p,h)).done;v++){try{Km(v)}catch(S){xf(h,"throw",S)}g=i?jm(h,n,[o.value,v],!0):o.value;try{If(l,v,g)}catch(S){xf(h,"throw",S)}}else for(f=Hm(u),l=t?new this(f):Tf(f);f>v;v++)g=i?n(u[v],v):u[v],If(l,v,g);return $m(l,v),l}});var Uf=s((kw,Mf)=>{"use strict";var Rr=d(),ii=2147483647,Oe=36,Df=1,oi=26,Wm=38,Ym=700,Xm=72,Qm=128,Jm="-",Zm=/[^\0-\u007E]/,Lf=/[.\u3002\uFF0E\uFF61]/g,Af="Overflow: input needs wider integers to process",ui=Oe-Df,Ff=RangeError,rR=Rr(Lf.exec),kr=Math.floor,si=String.fromCharCode,Cf=Rr("".charCodeAt),Nf=Rr([].join),fr=Rr([].push),eR=Rr("".replace),tR=Rr("".split),aR=Rr("".toLowerCase),nR=function(r){for(var e=[],t=0,a=r.length;t<a;){var n=Cf(r,t++);if(n>=55296&&n<=56319&&t<a){var i=Cf(r,t++);(i&64512)===56320?fr(e,((n&1023)<<10)+(i&1023)+65536):(fr(e,n),t--)}else fr(e,n)}return e},_f=function(r){return r+22+75*(r<26)},iR=function(r,e,t){var a=0;for(r=t?kr(r/Ym):r>>1,r+=kr(r/e);r>ui*oi>>1;)r=kr(r/ui),a+=Oe;return kr(a+(ui+1)*r/(r+Wm))},uR=function(r){var e=[];r=nR(r);var t=r.length,a=Qm,n=0,i=Xm,u,c;for(u=0;u<r.length;u++)c=r[u],c<128&&fr(e,si(c));var v=e.length,f=v;for(v&&fr(e,Jm);f<t;){var l=ii;for(u=0;u<r.length;u++)c=r[u],c>=a&&c<l&&(l=c);var o=f+1;if(l-a>kr((ii-n)/o))throw new Ff(Af);for(n+=(l-a)*o,a=l,u=0;u<r.length;u++){if(c=r[u],c<a&&++n>ii)throw new Ff(Af);if(c===a){for(var h=n,p=Oe;;){var g=p<=i?Df:p>=i+oi?oi:p-i;if(h<g)break;var S=h-g,w=Oe-g;fr(e,si(_f(g+S%w))),h=kr(S/w),p+=Oe}fr(e,si(_f(h))),i=iR(n,o,f===v),n=0,f++}}n++,a++}return Nf(e,"")};Mf.exports=function(r){var e=[],t=tR(eR(aR(r),Lf,"."),"."),a,n;for(a=0;a<t.length;a++)n=t[a],fr(e,rR(Zm,n)?"xn--"+uR(n):n);return Nf(e,".")}});var cl=s(()=>{"use strict";tf();var sR=F(),Oi=R(),oR=ye(),Ii=E(),Bf=Nr(),G=d(),Ut=k(),V=yr(),cR=Er(),Bt=I(),Pe=sf(),Ir=Pf(),X=xt(),Qf=Zn().codeAt,jf=Uf(),Jf=Mn(),sr=H(),vR=vr(),fR=J(),Zf=Kn(),rl=cr(),lR=rl.set,jt=rl.getterFor("URL"),hR=Zf.URLSearchParams,pR=Zf.getState,gR=Jf.decode,dR=Jf.encode,Ie=Ii.URL,Ri=Ii.TypeError,kt=Ii.parseInt,qR=Math.floor,kf=Math.pow,el=String.fromCharCode,Q=G("".charAt),M=G(/./.exec),Te=G([].join),yR=G(1.1.toString),ER=G([].pop),Hr=G([].push),ci=G("".replace),SR=G([].shift),tl=G("".split),mR=G("".indexOf),$r=G("".slice),Gt=G("".toLowerCase),RR=G([].unshift),bR="Invalid authority",vi="Invalid scheme",br="Invalid host",Gf="Invalid port",al=/[a-z]/i,OR=/[\d+\-.a-z]/i,bi=/\d/,nl=/^0x/i,IR=/^[0-7]+$/,il=/^\d+$/,xi=/^[\da-f]+$/i,xR=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,TR=/[\0\t\n\r #/:<>?@[\\\]^|]/,wR=/^[\u0000-\u0020]+/,PR=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,AR=/[\t\n\r]/g,FR=/[^\u0000-\u007F]/,CR="\xA8\xAF\xB4\xB8\u02D8\u02D9\u02DA\u02DB\u02DC\u02DD\u037A\u0384\u0385\u1FBD\u1FBF\u1FC0\u1FC1\u1FCD\u1FCE\u1FCF\u1FDD\u1FDE\u1FDF\u1FED\u1FEE\u1FFD\u1FFE\u2017\u203E\u2047\u2048\u2049\u2100\u2101\u2105\u2106\u2A74\u309B\u309C\uFC5E\uFC5F\uFC60\uFC61\uFC62\uFC63\uFDFA\uFDFB\uFE13\uFE16\uFE47\uFE48\uFE49\uFE4A\uFE4B\uFE4C\uFE55\uFE56\uFE5F\uFE64\uFE65\uFE68\uFE6A\uFE6B\uFE70\uFE72\uFE74\uFE76\uFE78\uFE7A\uFE7C\uFE7E\uFFE3",z,_R=function(r){return r===173||r===847||r===8203||r===12644||r===65279||r===65440||r>=4447&&r<=4448||r>=6068&&r<=6069||r>=6155&&r<=6159||r>=8288&&r<=8292||r>=8298&&r<=8303||r>=65024&&r<=65039||r>=917760&&r<=917999},DR=function(r){return r===65533||r>=55296&&r<=57343||r>=128&&r<=159||r>=8206&&r<=8207||r>=8232&&r<=8233||r>=8234&&r<=8238||r>=8293&&r<=8297||r>=64976&&r<=65007||(r&65534)===65534||r>=57344&&r<=63743||r>=983040&&r<=1114109},LR=function(r){return r>=65281&&r<=65374?r-65248:r===160||r===5760||r===8239||r===8287||r===12288||r>=8192&&r<=8202||r<=65535&&mR(CR,el(r))>-1?32:r},NR=function(r){if(!M(FR,r))return r===""?null:jf(r);var e=Ir(r),t="",a,n,i;for(a=0;a<e.length;a++){if(n=Qf(e[a],0),DR(n))return null;_R(n)||(i=LR(n),t+=i===n?e[a]:el(i))}return t===""?null:jf(t)},MR=function(r){var e=tl(r,"."),t,a;if(e[e.length-1]===""){if(e.length===1)return!1;e.length--}return t=e[e.length-1],M(il,t)?!0:M(nl,t)?(a=$r(t,2),a===""||!!M(xi,a)):!1},UR=function(r){var e=tl(r,"."),t,a,n,i,u,c,v;if(e.length&&e[e.length-1]===""&&e.length--,t=e.length,t>4)return null;for(a=[],n=0;n<t;n++){if(i=e[n],i==="")return null;if(u=10,i.length>1&&Q(i,0)==="0"&&(u=M(nl,i)?16:8,i=$r(i,u===8?1:2)),i==="")c=0;else{if(!M(u===10?il:u===8?IR:xi,i))return null;c=kt(i,u)}Hr(a,c)}for(n=0;n<t;n++)if(c=a[n],n===t-1){if(c>=kf(256,5-t))return null}else if(c>255)return null;for(v=ER(a),n=0;n<a.length;n++)v+=a[n]*kf(256,3-n);return v},BR=function(r){var e=[0,0,0,0,0,0,0,0],t=0,a=null,n=0,i,u,c,v,f,l,o,h=function(){return Q(r,n)};if(h()===":"){if(Q(r,1)!==":")return;n+=2,t++,a=t}for(;h();){if(t===8)return;if(h()===":"){if(a!==null)return;n++,t++,a=t;continue}for(i=u=0;u<4&&M(xi,h());)i=i*16+kt(h(),16),n++,u++;if(h()==="."){if(u===0||(n-=u,t>6))return;for(c=0;h();){if(v=null,c>0)if(h()==="."&&c<4)n++;else return;if(!M(bi,h()))return;for(;M(bi,h());){if(f=kt(h(),10),v===null)v=f;else{if(v===0)return;v=v*10+f}if(v>255)return;n++}e[t]=e[t]*256+v,c++,(c===2||c===4)&&t++}if(c!==4)return;break}else if(h()===":"){if(n++,!h())return}else if(h())return;e[t++]=i}if(a!==null)for(l=t-a,t=7;t!==0&&l>0;)o=e[t],e[t--]=e[a+l-1],e[a+--l]=o;else if(t!==8)return;return e},jR=function(r){for(var e=null,t=1,a=null,n=0,i=0;i<8;i++)r[i]!==0?(n>t&&(e=a,t=n),a=null,n=0):(a===null&&(a=i),++n);return n>t?a:e},xe=function(r){var e,t,a,n;if(typeof r=="number"){for(e=[],t=0;t<4;t++)RR(e,r%256),r=qR(r/256);return Te(e,".")}if(typeof r=="object"){for(e="",a=jR(r),t=0;t<8;t++)n&&r[t]===0||(n&&(n=!1),a===t?(e+=t?":":"::",n=!0):(e+=yR(r[t],16),t<7&&(e+=":")));return"["+e+"]"}return r},Ht={},ul=Pe({},Ht,{" ":1,'"':1,"#":1,"<":1,">":1}),kR=Pe({},ul,{"'":1}),sl=Pe({},Ht,{" ":1,'"':1,"<":1,">":1,"`":1}),ol=Pe({},sl,{"#":1,"?":1,"{":1,"}":1,"^":1}),fi=Pe({},ol,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),lr=function(r,e){var t=Qf(r,0);return t>=32&&t<127&&!Bt(e,r)?r:r==="'"&&Bt(e,r)?"%27":dR(r)},Lt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},we=function(r,e){var t;return r.length===2&&M(al,Q(r,0))&&((t=Q(r,1))===":"||!e&&t==="|")},Hf=function(r){var e;return r.length>1&&we($r(r,0,2))&&(r.length===2||(e=Q(r,2))==="/"||e==="\\"||e==="?"||e==="#")},GR=function(r){return r==="."||Gt(r)==="%2e"},HR=function(r){return r=Gt(r),r===".."||r==="%2e."||r===".%2e"||r==="%2e%2e"},li={},$f={},hi={},Vf={},zf={},pi={},Kf={},Wf={},Nt={},Mt={},gi={},di={},qi={},yi={},Yf={},Ei={},Gr={},rr={},Xf={},Or={},ur={},Ti=function(r,e,t){var a=sr(r),n,i,u;if(e){if(i=this.parse(a),i)throw new Ri(i);this.searchParams=null}else{if(t!==void 0&&(n=new Ti(t,!0)),i=this.parse(a,null,n),i)throw new Ri(i);u=pR(new hR),u.bindURL(this),this.searchParams=u}};Ti.prototype={type:"URL",parse:function(r,e,t){var a=this,n=e||li,i=0,u="",c=!1,v=!1,f=!1,l,o,h,p;for(r=sr(r),e||(a.scheme="",a.username="",a.password="",a.host=null,a.port=null,a.path=[],a.query=null,a.fragment=null,a.cannotBeABaseURL=!1,r=ci(r,wR,""),r=ci(r,PR,"$1")),r=ci(r,AR,""),l=Ir(r);i<=l.length;){switch(o=l[i],n){case li:if(o&&M(al,o))u+=Gt(o),n=$f;else{if(e)return vi;n=hi;continue}break;case $f:if(o&&M(OR,o))u+=Gt(o);else if(o===":"){if(e&&(a.isSpecial()!==Bt(Lt,u)||u==="file"&&(a.includesCredentials()||a.port!==null)||a.scheme==="file"&&a.host===""))return;if(a.scheme=u,e){a.isSpecial()&&Lt[a.scheme]===a.port&&(a.port=null);return}u="",a.scheme==="file"?n=yi:a.isSpecial()&&t&&t.scheme===a.scheme?n=Vf:a.isSpecial()?n=Wf:l[i+1]==="/"?(n=zf,i++):(a.cannotBeABaseURL=!0,Hr(a.path,""),n=Xf)}else{if(e)return vi;u="",n=hi,i=0;continue}break;case hi:if(!t||t.cannotBeABaseURL&&o!=="#")return vi;if(t.cannotBeABaseURL&&o==="#"){a.scheme=t.scheme,a.path=X(t.path),a.query=t.query,a.fragment="",a.cannotBeABaseURL=!0,n=ur;break}n=t.scheme==="file"?yi:pi;continue;case Vf:if(o==="/"&&l[i+1]==="/")n=Nt,i++;else{n=pi;continue}break;case zf:if(o==="/"){n=Mt;break}else{n=rr;continue}case pi:if(a.scheme=t.scheme,o===z)a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=X(t.path),a.query=t.query;else if(o==="/"||o==="\\"&&a.isSpecial())n=Kf;else if(o==="?")a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=X(t.path),a.query="",n=Or;else if(o==="#")a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=X(t.path),a.query=t.query,a.fragment="",n=ur;else{a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=X(t.path),a.path.length&&a.path.length--,n=rr;continue}break;case Kf:if(a.isSpecial()&&(o==="/"||o==="\\"))n=Nt;else if(o==="/")n=Mt;else{a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,n=rr;continue}break;case Wf:if(n=Nt,o!=="/"||l[i+1]!=="/")continue;i++;break;case Nt:if(o!=="/"&&o!=="\\"){n=Mt;continue}break;case Mt:if(o==="@"){c&&(u="%40"+u),c=!0,h=Ir(u);for(var g=0;g<h.length;g++){var S=h[g];if(S===":"&&!f){f=!0;continue}var w=lr(S,fi);f?a.password+=w:a.username+=w}u=""}else if(o===z||o==="/"||o==="?"||o==="#"||o==="\\"&&a.isSpecial()){if(c&&u==="")return bR;i-=Ir(u).length+1,u="",n=gi}else u+=o;break;case gi:case di:if(e&&a.scheme==="file"){n=Ei;continue}else if(o===":"&&!v){if(u==="")return br;if(e===di)return;if(p=a.parseHost(u),p)return p;u="",n=qi}else if(o===z||o==="/"||o==="?"||o==="#"||o==="\\"&&a.isSpecial()){if(a.isSpecial()&&u==="")return br;if(e&&u===""&&(a.includesCredentials()||a.port!==null))return;if(p=a.parseHost(u),p)return p;if(u="",n=Gr,e)return;continue}else o==="["?v=!0:o==="]"&&(v=!1),u+=o;break;case qi:if(M(bi,o))u+=o;else if(o===z||o==="/"||o==="?"||o==="#"||o==="\\"&&a.isSpecial()||e){if(u!==""){var q=kt(u,10);if(q>65535)return Gf;a.port=a.isSpecial()&&q===Lt[a.scheme]?null:q,u=""}if(e)return;n=Gr;continue}else return Gf;break;case yi:if(a.scheme="file",a.host="",o==="/"||o==="\\")n=Yf;else if(t&&t.scheme==="file")switch(o){case z:a.host=t.host,a.path=X(t.path),a.query=t.query;break;case"?":a.host=t.host,a.path=X(t.path),a.query="",n=Or;break;case"#":a.host=t.host,a.path=X(t.path),a.query=t.query,a.fragment="",n=ur;break;default:a.host=t.host,Hf(Te(X(l,i),""))||(a.path=X(t.path),a.shortenPath()),n=rr;continue}else{n=rr;continue}break;case Yf:if(o==="/"||o==="\\"){n=Ei;break}t&&t.scheme==="file"&&(a.host=t.host,!Hf(Te(X(l,i),""))&&we(t.path[0],!0)&&Hr(a.path,t.path[0])),n=rr;continue;case Ei:if(o===z||o==="/"||o==="\\"||o==="?"||o==="#"){if(!e&&we(u))n=rr;else if(u===""){if(a.host="",e)return;n=Gr}else{if(p=a.parseHost(u),p)return p;if(a.host==="localhost"&&(a.host=""),e)return;u="",n=Gr}continue}else u+=o;break;case Gr:if(a.isSpecial()){if(n=rr,o!=="/"&&o!=="\\")continue}else if(!e&&o==="?")a.query="",n=Or;else if(!e&&o==="#")a.fragment="",n=ur;else if(o!==z&&(n=rr,o!=="/"))continue;break;case rr:if(o===z||o==="/"||o==="\\"&&a.isSpecial()||!e&&(o==="?"||o==="#")){if(HR(u)?(a.shortenPath(),o!=="/"&&!(o==="\\"&&a.isSpecial())&&Hr(a.path,"")):GR(u)?o!=="/"&&!(o==="\\"&&a.isSpecial())&&Hr(a.path,""):(a.scheme==="file"&&!a.path.length&&we(u)&&(a.host!==null&&a.host!==""&&(a.host=""),u=Q(u,0)+":"),Hr(a.path,u)),u="",a.scheme==="file"&&(o===z||o==="?"||o==="#"))for(;a.path.length>1&&a.path[0]==="";)SR(a.path);o==="?"?(a.query="",n=Or):o==="#"&&(a.fragment="",n=ur)}else u+=lr(o,ol);break;case Xf:o==="?"?(a.query="",n=Or):o==="#"?(a.fragment="",n=ur):o!==z&&(o===" "?a.path[0]+=l[i+1]==="?"||l[i+1]==="#"?"%20":" ":a.path[0]+=lr(o,Ht));break;case Or:!e&&o==="#"?(a.fragment="",n=ur):o!==z&&(a.query+=lr(o,a.isSpecial()?kR:ul));break;case ur:o!==z&&(a.fragment+=lr(o,sl));break}i++}},parseHost:function(r){var e,t,a;if(Q(r,0)==="["){if(Q(r,r.length-1)!=="]"||(e=BR($r(r,1,-1)),!e))return br;this.host=e}else if(this.isSpecial()){if(r=NR(gR(r)),r===null||M(xR,r))return br;if(MR(r)){if(e=UR(r),e===null)return br;this.host=e}else this.host=r}else{if(M(TR,r))return br;for(e="",t=Ir(r),a=0;a<t.length;a++)e+=lr(t[a],Ht);this.host=e}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return Bt(Lt,this.scheme)},shortenPath:function(){var r=this.path,e=r.length;e&&(this.scheme!=="file"||e!==1||!we(r[0],!0))&&r.length--},serialize:function(){var r=this,e=r.scheme,t=r.username,a=r.password,n=r.host,i=r.port,u=r.path,c=r.query,v=r.fragment,f=e+":";return n!==null?(f+="//",r.includesCredentials()&&(f+=t+(a?":"+a:"")+"@"),f+=xe(n),i!==null&&(f+=":"+i)):e==="file"&&(f+="//"),n===null&&!r.cannotBeABaseURL&&u.length>1&&u[0]===""&&(f+="/."),f+=r.cannotBeABaseURL?u[0]:u.length?"/"+Te(u,"/"):"",c!==null&&(f+="?"+c),v!==null&&(f+="#"+v),f},setHref:function(r){var e=this.parse(r);if(e)throw new Ri(e);this.searchParams.update()},getOrigin:function(){var r=this.scheme,e=this.port;if(r==="blob")try{return new Vr(this.path[0]).origin}catch{return"null"}return r==="file"||!this.isSpecial()?"null":r+"://"+xe(this.host)+(e!==null?":"+e:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(r){this.parse(sr(r)+":",li)},getUsername:function(){return this.username},setUsername:function(r){var e=Ir(sr(r));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var t=0;t<e.length;t++)this.username+=lr(e[t],fi)}},getPassword:function(){return this.password},setPassword:function(r){var e=Ir(sr(r));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var t=0;t<e.length;t++)this.password+=lr(e[t],fi)}},getHost:function(){var r=this.host,e=this.port;return r===null?"":e===null?xe(r):xe(r)+":"+e},setHost:function(r){this.cannotBeABaseURL||this.parse(r,gi)},getHostname:function(){var r=this.host;return r===null?"":xe(r)},setHostname:function(r){this.cannotBeABaseURL||this.parse(r,di)},getPort:function(){var r=this.port;return r===null?"":sr(r)},setPort:function(r){this.cannotHaveUsernamePasswordPort()||(r=sr(r),r===""?this.port=null:this.parse(r,qi))},getPathname:function(){var r=this.path;return this.cannotBeABaseURL?r[0]:r.length?"/"+Te(r,"/"):""},setPathname:function(r){this.cannotBeABaseURL||(this.path=[],this.parse(r,Gr))},getSearch:function(){var r=this.query;return r?"?"+r:""},setSearch:function(r){r=sr(r),r===""?this.query=null:(Q(r,0)==="?"&&(r=$r(r,1)),this.query="",this.parse(r,Or)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var r=this.fragment;return r?"#"+r:""},setHash:function(r){if(r=sr(r),r===""){this.fragment=null;return}Q(r,0)==="#"&&(r=$r(r,1)),this.fragment="",this.parse(r,ur)},update:function(){this.query=this.searchParams.serialize()||null}};var Vr=function(e){var t=cR(this,N),a=fR(arguments.length,1)>1?arguments[1]:void 0,n=lR(t,new Ti(e,!1,a));Oi||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},N=Vr.prototype,K=function(r,e){return{get:function(){return jt(this)[r]()},set:e&&function(t){return jt(this)[e](t)},configurable:!0,enumerable:!0}};Oi&&(V(N,"href",K("serialize","setHref")),V(N,"origin",K("getOrigin")),V(N,"protocol",K("getProtocol","setProtocol")),V(N,"username",K("getUsername","setUsername")),V(N,"password",K("getPassword","setPassword")),V(N,"host",K("getHost","setHost")),V(N,"hostname",K("getHostname","setHostname")),V(N,"port",K("getPort","setPort")),V(N,"pathname",K("getPathname","setPathname")),V(N,"search",K("getSearch","setSearch")),V(N,"searchParams",K("getSearchParams")),V(N,"hash",K("getHash","setHash")));Ut(N,"toJSON",function(){return jt(this).serialize()},{enumerable:!0});Ut(N,"toString",function(){return jt(this).serialize()},{enumerable:!0});Ie&&(Si=Ie.createObjectURL,mi=Ie.revokeObjectURL,Si&&Ut(Vr,"createObjectURL",Bf(Si,Ie)),mi&&Ut(Vr,"revokeObjectURL",Bf(mi,Ie)));var Si,mi;vR(Vr,"URL");sR({global:!0,constructor:!0,forced:!oR,sham:!Oi},{URL:Vr})});var vl=s(()=>{"use strict";cl()});var hl=s(()=>{"use strict";var $R=F(),VR=_(),ll=y(),zR=J(),fl=H(),KR=ye(),wi=VR("URL"),WR=KR&&ll(function(){wi.canParse()}),YR=ll(function(){return wi.canParse.length!==1});$R({target:"URL",stat:!0,forced:!WR||YR},{canParse:function(e){var t=zR(arguments.length,1),a=fl(e),n=t<2||arguments[1]===void 0?void 0:fl(arguments[1]);try{return!!new wi(a,n)}catch{return!1}}})});var gl=s(()=>{"use strict";var XR=F(),QR=_(),JR=J(),pl=H(),ZR=ye(),rb=QR("URL");XR({target:"URL",stat:!0,forced:!ZR},{parse:function(e){var t=JR(arguments.length,1),a=pl(e),n=t<2||arguments[1]===void 0?void 0:pl(arguments[1]);try{return new rb(a,n)}catch{return null}}})});var ql=s((Xw,dl)=>{"use strict";var eb=E();dl.exports=function(r,e){var t=eb[r],a=t&&t.prototype;return a&&a[e]}});var yl=s(()=>{"use strict";var tb=F(),ab=A(),nb=ql(),ib=nb("URL","toString");tb({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return ab(ib,this)}})});var Sl=s((Zw,El)=>{"use strict";Qn();vl();hl();gl();yl();var ub=Sr();El.exports=ub.URL});var Rl=s((rP,ml)=>{"use strict";var sb=Sl();ml.exports=sb});var Ol=s((eP,bl)=>{"use strict";var ob=Rl();bl.exports=ob});var xl=s((tP,Il)=>{"use strict";Il.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var Pl=s((aP,wl)=>{"use strict";var cb=Ue(),Pi=cb("span").classList,Tl=Pi&&Pi.constructor&&Pi.constructor.prototype;wl.exports=Tl===Object.prototype?void 0:Tl});var Dl=s(()=>{"use strict";var Al=E(),Cl=xl(),vb=Pl(),Ae=bt(),Fl=Cr(),fb=vr(),lb=D(),Ai=lb("iterator"),Fi=Ae.values,_l=function(r,e){if(r){if(r[Ai]!==Fi)try{Fl(r,Ai,Fi)}catch{r[Ai]=Fi}if(fb(r,e,!0),Cl[e]){for(var t in Ae)if(r[t]!==Ae[t])try{Fl(r,t,Ae[t])}catch{r[t]=Ae[t]}}}};for($t in Cl)_l(Al[$t]&&Al[$t].prototype,$t);var $t;_l(vb,"DOMTokenList")});var Nl=s((uP,Ll)=>{"use strict";var hb=Qn();Dl();Ll.exports=hb});var Ul=s((sP,Ml)=>{"use strict";var pb=Nl();Ml.exports=pb});var jl=s(()=>{"use strict";var gb=F(),db=Ar(),Bl=ct(),qb=y(),yb=qb(function(){Bl(1)});gb({target:"Object",stat:!0,forced:yb},{keys:function(e){return Bl(db(e))}})});var Gl=s((vP,kl)=>{"use strict";var Eb=rt(),Sb=_r();kl.exports=Eb?{}.toString:function(){return"[object "+Sb(this)+"]"}});var Vt=s(()=>{"use strict";var mb=rt(),Rb=k(),bb=Gl();mb||Rb(Object.prototype,"toString",bb,{unsafe:!0})});var zl=s((hP,Vl)=>{"use strict";var Ob=ar(),Ib=dr(),Hl=ut().f,xb=xt(),$l=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tb=function(r){try{return Hl(r)}catch{return xb($l)}};Vl.exports.f=function(e){return $l&&Ob(e)==="Window"?Tb(e):Hl(Ib(e))}});var Wl=s((pP,Kl)=>{"use strict";var wb=y();Kl.exports=wb(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}})});var Ql=s((gP,Xl)=>{"use strict";var Pb=y(),Ab=C(),Fb=ar(),Yl=Wl(),zt=Object.isExtensible,Cb=Pb(function(){zt(1)});Xl.exports=Cb||Yl?function(e){return!Ab(e)||Yl&&Fb(e)==="ArrayBuffer"?!1:zt?zt(e):!0}:zt});var Zl=s((dP,Jl)=>{"use strict";var _b=y();Jl.exports=!_b(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Li=s((qP,th)=>{"use strict";var Db=F(),Lb=d(),Nb=Zr(),Mb=C(),Ci=I(),Ub=j().f,rh=ut(),Bb=zl(),_i=Ql(),jb=Jr(),kb=Zl(),eh=!1,or=jb("meta"),Gb=0,Di=function(r){Ub(r,or,{value:{objectID:"O"+Gb++,weakData:{}}})},Hb=function(r,e){if(!Mb(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!Ci(r,or)){if(!_i(r))return"F";if(!e)return"E";Di(r)}return r[or].objectID},$b=function(r,e){if(!Ci(r,or)){if(!_i(r))return!0;if(!e)return!1;Di(r)}return r[or].weakData},Vb=function(r){return kb&&eh&&_i(r)&&!Ci(r,or)&&Di(r),r},zb=function(){Kb.enable=function(){},eh=!0;var r=rh.f,e=Lb([].splice),t={};t[or]=1,r(t).length&&(rh.f=function(a){for(var n=r(a),i=0,u=n.length;i<u;i++)if(n[i]===or){e(n,i,1);break}return n},Db({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Bb.f}))},Kb=th.exports={enable:zb,fastKey:Hb,getWeakData:$b,onFreeze:Vb};Nb[or]=!0});var Wt=s((yP,uh)=>{"use strict";var Wb=Nr(),Yb=A(),Xb=U(),Qb=He(),Jb=ei(),Zb=te(),ah=Xr(),rO=It(),eO=Se(),nh=Dt(),tO=TypeError,Kt=function(r,e){this.stopped=r,this.result=e},ih=Kt.prototype;uh.exports=function(r,e,t){var a=t&&t.that,n=!!(t&&t.AS_ENTRIES),i=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),c=!!(t&&t.INTERRUPTED),v=Wb(e,a),f,l,o,h,p,g,S,w=function(m){var P=f;return f=void 0,P&&nh(P,"normal"),new Kt(!0,m)},q=function(m){return n?(Xb(m),c?v(m[0],m[1],w):v(m[0],m[1])):c?v(m,w):v(m)};if(i)f=r.iterator;else if(u)f=r;else{if(l=eO(r),!l)throw new tO(Qb(r)+" is not iterable");if(Jb(l)){for(o=0,h=Zb(r);h>o;o++)if(p=q(r[o]),p&&ah(ih,p))return p;return new Kt(!1)}f=rO(r,l)}for(g=i?r.next:f.next;!(S=Yb(g,f)).done;){var O=S.value;try{p=q(O)}catch(m){if(f)nh(f,"throw",m);else throw m}if(typeof p=="object"&&p&&ah(ih,p))return p}return new Kt(!1)}});var fh=s((EP,vh)=>{"use strict";var aO=D(),oh=aO("iterator"),ch=!1;try{sh=0,Ni={next:function(){return{done:!!sh++}},return:function(){ch=!0}},Ni[oh]=function(){return this},Array.from(Ni,function(){throw 2})}catch{}var sh,Ni;vh.exports=function(r,e){try{if(!e&&!ch)return!1}catch{return!1}var t=!1;try{var a={};a[oh]=function(){return{next:function(){return{done:t=!0}}}},r(a)}catch{}return t}});var Bi=s((SP,hh)=>{"use strict";var nO=F(),iO=E(),uO=d(),lh=Xa(),sO=k(),oO=Li(),cO=Wt(),vO=Er(),fO=b(),lO=pr(),Mi=C(),Ui=y(),hO=fh(),pO=vr(),gO=gn();hh.exports=function(r,e,t){var a=r.indexOf("Map")!==-1,n=r.indexOf("Weak")!==-1,i=a?"set":"add",u=iO[r],c=u&&u.prototype,v=u,f={},l=function(q){var O=uO(c[q]);sO(c,q,q==="add"?function(P){return O(this,P===0?0:P),this}:q==="delete"?function(m){return n&&!Mi(m)?!1:O(this,m===0?0:m)}:q==="get"?function(P){return n&&!Mi(P)?void 0:O(this,P===0?0:P)}:q==="has"?function(P){return n&&!Mi(P)?!1:O(this,P===0?0:P)}:function(P,Bp){return O(this,P===0?0:P,Bp),this})},o=lh(r,!fO(u)||!(n||c.forEach&&!Ui(function(){new u().entries().next()})));if(o)v=t.getConstructor(e,r,a,i),oO.enable();else if(lh(r,!0)){var h=new v,p=h[i](n?{}:-0,1)!==h,g=Ui(function(){h.has(1)}),S=hO(function(q){new u(q)}),w=!n&&Ui(function(){for(var q=new u,O=5;O--;)q[i](O,O);return!q.has(-0)});S||(v=e(function(q,O){vO(q,c);var m=gO(new u,q,v);return lO(O)||cO(O,m[i],{that:m,AS_ENTRIES:a}),m}),v.prototype=c,c.constructor=v),(g||w)&&(l("delete"),l("has"),a&&l("get")),(w||p)&&l(i),n&&c.clear&&delete c.clear}return f[r]=v,nO({global:!0,constructor:!0,forced:v!==u},f),pO(v,r),n||t.setStrong(v,r,a),v}});var dh=s((mP,gh)=>{"use strict";var dO=_(),qO=yr(),yO=D(),EO=R(),ph=yO("species");gh.exports=function(r){var e=dO(r);EO&&e&&!e[ph]&&qO(e,ph,{configurable:!0,get:function(){return this}})}});var ki=s((RP,Rh)=>{"use strict";var qh=qr(),SO=yr(),yh=Un(),mO=Nr(),RO=Er(),bO=pr(),OO=Wt(),IO=mt(),Yt=qe(),xO=dh(),Fe=R(),Eh=Li().fastKey,mh=cr(),Sh=mh.set,ji=mh.getterFor;Rh.exports={getConstructor:function(r,e,t,a){var n=r(function(f,l){RO(f,i),Sh(f,{type:e,index:qh(null),first:null,last:null,size:0}),Fe||(f.size=0),bO(l)||OO(l,f[a],{that:f,AS_ENTRIES:t})}),i=n.prototype,u=ji(e),c=function(f,l,o){var h=u(f),p=v(f,l),g,S;return p?p.value=o:(h.last=p={index:S=Eh(l,!0),key:l,value:o,previous:g=h.last,next:null,removed:!1},h.first||(h.first=p),g&&(g.next=p),Fe?h.size++:f.size++,S!=="F"&&(h.index[S]=p)),f},v=function(f,l){var o=u(f),h=Eh(l),p;if(h!=="F")return o.index[h];for(p=o.first;p;p=p.next)if(p.key===l)return p};return yh(i,{clear:function(){for(var l=this,o=u(l),h=o.first;h;)h.removed=!0,h.previous&&(h.previous=h.previous.next=null),h=h.next;o.first=o.last=null,o.index=qh(null),Fe?o.size=0:l.size=0},delete:function(f){var l=this,o=u(l),h=v(l,f);if(h){var p=h.next,g=h.previous;delete o.index[h.index],h.removed=!0,g&&(g.next=p),p&&(p.previous=g),o.first===h&&(o.first=p),o.last===h&&(o.last=g),Fe?o.size--:l.size--}return!!h},forEach:function(l){for(var o=u(this),h=mO(l,arguments.length>1?arguments[1]:void 0),p;p=p?p.next:o.first;)for(h(p.value,p.key,this);p&&p.removed;)p=p.previous},has:function(l){return!!v(this,l)}}),yh(i,t?{get:function(l){var o=v(this,l);return o&&o.value},set:function(l,o){return c(this,l===0?0:l,o)}}:{add:function(l){return c(this,l=l===0?0:l,l)}}),Fe&&SO(i,"size",{configurable:!0,get:function(){return u(this).size}}),n},setStrong:function(r,e,t){var a=e+" Iterator",n=ji(e),i=ji(a);IO(r,e,function(u,c){Sh(this,{type:a,target:u,state:n(u),kind:c,last:null})},function(){for(var u=i(this),c=u.kind,v=u.last;v&&v.removed;)v=v.previous;return!u.target||!(u.last=v=v?v.next:u.state.first)?(u.target=null,Yt(void 0,!0)):Yt(c==="keys"?v.key:c==="values"?v.value:[v.key,v.value],!1)},t?"entries":"values",!t,!0),xO(e)}}});var bh=s(()=>{"use strict";var TO=Bi(),wO=ki();TO("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},wO)});var Oh=s(()=>{"use strict";bh()});var Ih=s(()=>{"use strict";var PO=Bi(),AO=ki();PO("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},AO)});var xh=s(()=>{"use strict";Ih()});var Ph=s((FP,wh)=>{"use strict";var FO=E(),CO=y(),Th=FO.RegExp,_O=!CO(function(){var r=!0;try{Th(".","d")}catch{r=!1}var e={},t="",a=r?"dgimsy":"gimsy",n=function(v,f){Object.defineProperty(e,v,{get:function(){return t+=f,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};r&&(i.hasIndices="d");for(var u in i)n(u,i[u]);var c=Object.getOwnPropertyDescriptor(Th.prototype,"flags").get.call(e);return c!==a||t!==a});wh.exports={correct:_O}});var Fh=s((CP,Ah)=>{"use strict";var DO=U();Ah.exports=function(){var r=DO(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Dh=s((_P,_h)=>{"use strict";var LO=A(),NO=I(),MO=Xr(),Ch=Ph(),UO=Fh(),BO=RegExp.prototype;_h.exports=Ch.correct?function(r){return r.flags}:function(r){return!Ch.correct&&MO(BO,r)&&!NO(r,"flags")?LO(UO,r):r.flags}});var Nh=s((DP,Lh)=>{"use strict";var Xt=d(),Ce=Map.prototype;Lh.exports={Map,set:Xt(Ce.set),get:Xt(Ce.get),has:Xt(Ce.has),remove:Xt(Ce.delete),proto:Ce}});var Hi=s((LP,Mh)=>{"use strict";var Gi=d(),Qt=Set.prototype;Mh.exports={Set,add:Gi(Qt.add),has:Gi(Qt.has),remove:Gi(Qt.delete),proto:Qt}});var Bh=s((NP,Uh)=>{"use strict";var jO=A();Uh.exports=function(r,e,t){for(var a=t?r:r.iterator,n=r.next,i,u;!(i=jO(n,a)).done;)if(u=e(i.value),u!==void 0)return u}});var Vh=s((MP,$h)=>{"use strict";var jh=d(),kO=Bh(),kh=Hi(),GO=kh.Set,Gh=kh.proto,HO=jh(Gh.forEach),Hh=jh(Gh.keys),$O=Hh(new GO).next;$h.exports=function(r,e,t){return t?kO({iterator:Hh(r),next:$O},e):HO(r,e)}});var zi=s((UP,Kh)=>{"use strict";var VO=E(),zO=y(),$i=qa(),Vi=Qa(),zh=VO.structuredClone;Kh.exports=!!zh&&!zO(function(){if(Vi==="DENO"&&$i>92||Vi==="NODE"&&$i>94||Vi==="BROWSER"&&$i>97)return!1;var r=new ArrayBuffer(8),e=zh(r,{transfer:[r]});return r.byteLength!==0||e.byteLength!==8})});var Qh=s((BP,Xh)=>{"use strict";var Xi=E(),KO=Ja(),WO=zi(),YO=Xi.structuredClone,Wh=Xi.ArrayBuffer,Jt=Xi.MessageChannel,Yi=!1,Ki,Yh,Zt,Wi;if(WO)Yi=function(r){YO(r,{transfer:[r]})};else if(Wh)try{Jt||(Ki=KO("worker_threads"),Ki&&(Jt=Ki.MessageChannel)),Jt&&(Yh=new Jt,Zt=new Wh(2),Wi=function(r){Yh.port1.postMessage(null,[r])},Zt.byteLength===2&&(Wi(Zt),Zt.byteLength===0&&(Yi=Wi)))}catch{}Xh.exports=Yi});var Zh=s((jP,Jh)=>{"use strict";var XO=y(),QO=tr();Jh.exports=!XO(function(){var r=new Error("a");return"stack"in r?(Object.defineProperty(r,"stack",QO(1,7)),r.stack!==7):!0})});var vp=s(()=>{"use strict";var JO=er(),ZO=F(),T=E(),De=_(),Ne=d(),tu=y(),rI=Jr(),zr=b(),eI=ai(),tI=pr(),na=C(),aI=Ge(),nI=Wt(),tp=U(),ta=_r(),iI=I(),uI=ni(),Qi=Cr(),ra=te(),sI=J(),oI=Dh(),ia=Nh(),au=Hi(),cI=Vh(),rp=Qh(),vI=Zh(),nu=zi(),_e=T.Object,fI=T.Array,ap=T.Date,np=T.Error,lI=T.TypeError,hI=T.PerformanceMark,Tr=De("DOMException"),ru=ia.Map,iu=ia.has,ip=ia.get,aa=ia.set,up=au.Set,sp=au.add,pI=au.has,gI=De("Object","keys"),dI=Ne([].push),qI=Ne((!0).valueOf),yI=Ne(1.1.valueOf),EI=Ne("".valueOf),SI=Ne(ap.prototype.getTime),eu=rI("structuredClone"),Le="DataCloneError",ea="Transferring",op=function(r){return!tu(function(){var e=new T.Set([7]),t=r(e),a=r(_e(7));return t===e||!t.has(7)||!na(a)||+a!=7})&&r},ep=function(r,e){return!tu(function(){var t=new e,a=r({a:t,b:t});return!(a&&a.a===a.b&&a.a instanceof e&&a.a.stack===t.stack)})},mI=function(r){return!tu(function(){var e=r(new T.AggregateError([1],eu,{cause:3}));return e.name!=="AggregateError"||e.errors[0]!==1||e.message!==eu||e.cause!==3})},xr=T.structuredClone,RI=JO||!ep(xr,np)||!ep(xr,Tr)||!mI(xr),bI=!xr&&op(function(r){return new hI(eu,{detail:r}).detail}),hr=op(xr)||bI,Ji=function(r){throw new Tr("Uncloneable type: "+r,Le)},B=function(r,e){throw new Tr((e||"Cloning")+" of "+r+" cannot be properly polyfilled in this engine",Le)},Zi=function(r,e){return hr||B(e),hr(r)},OI=function(){var r;try{r=new T.DataTransfer}catch{try{r=new T.ClipboardEvent("").clipboardData}catch{}}return r&&r.items&&r.files?r:null},cp=function(r,e,t){if(iu(e,r))return ip(e,r);var a=t||ta(r),n,i,u,c,v,f;if(a==="SharedArrayBuffer")hr?n=hr(r):n=r;else{var l=T.DataView;!l&&!zr(r.slice)&&B("ArrayBuffer");try{if(zr(r.slice)&&!r.resizable)n=r.slice(0);else for(i=r.byteLength,u=("maxByteLength"in r)?{maxByteLength:r.maxByteLength}:void 0,n=new ArrayBuffer(i,u),c=new l(r),v=new l(n),f=0;f<i;f++)v.setUint8(f,c.getUint8(f))}catch{throw new Tr("ArrayBuffer is detached",Le)}}return aa(e,r,n),n},II=function(r,e,t,a,n){var i=T[e];return na(i)||B(e),new i(cp(r.buffer,n),t,a)},x=function(r,e){if(aI(r)&&Ji("Symbol"),!na(r))return r;if(e){if(iu(e,r))return ip(e,r)}else e=new ru;var t=ta(r),a,n,i,u,c,v,f,l;switch(t){case"Array":i=fI(ra(r));break;case"Object":i={};break;case"Map":i=new ru;break;case"Set":i=new up;break;case"RegExp":i=new RegExp(r.source,oI(r));break;case"Error":switch(n=r.name,n){case"AggregateError":i=new(De(n))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":i=new(De(n));break;case"CompileError":case"LinkError":case"RuntimeError":i=new(De("WebAssembly",n));break;default:i=new np}break;case"DOMException":i=new Tr(r.message,r.name);break;case"ArrayBuffer":case"SharedArrayBuffer":i=cp(r,e,t);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":v=t==="DataView"?r.byteLength:r.length,i=II(r,t,r.byteOffset,v,e);break;case"DOMQuad":try{i=new DOMQuad(x(r.p1,e),x(r.p2,e),x(r.p3,e),x(r.p4,e))}catch{i=Zi(r,t)}break;case"File":if(hr)try{i=hr(r),ta(i)!==t&&(i=void 0)}catch{}if(!i)try{i=new File([r],r.name,r)}catch{}i||B(t);break;case"FileList":if(u=OI(),u){for(c=0,v=ra(r);c<v;c++)u.items.add(x(r[c],e));i=u.files}else i=Zi(r,t);break;case"ImageData":try{i=new ImageData(x(r.data,e),r.width,r.height,{colorSpace:r.colorSpace})}catch{i=Zi(r,t)}break;default:if(hr)i=hr(r);else switch(t){case"BigInt":i=_e(r.valueOf());break;case"Boolean":i=_e(qI(r));break;case"Number":i=_e(yI(r));break;case"String":i=_e(EI(r));break;case"Date":i=new ap(SI(r));break;case"Blob":try{i=r.slice(0,r.size,r.type)}catch{B(t)}break;case"DOMPoint":case"DOMPointReadOnly":a=T[t];try{i=a.fromPoint?a.fromPoint(r):new a(r.x,r.y,r.z,r.w)}catch{B(t)}break;case"DOMRect":case"DOMRectReadOnly":a=T[t];try{i=a.fromRect?a.fromRect(r):new a(r.x,r.y,r.width,r.height)}catch{B(t)}break;case"DOMMatrix":case"DOMMatrixReadOnly":a=T[t];try{i=a.fromMatrix?a.fromMatrix(r):new a(r)}catch{B(t)}break;case"AudioData":case"VideoFrame":zr(r.clone)||B(t);try{i=r.clone()}catch{Ji(t)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":B(t);default:Ji(t)}}switch(aa(e,r,i),t){case"Array":case"Object":for(f=gI(r),c=0,v=ra(f);c<v;c++)l=f[c],uI(i,l,x(r[l],e));break;case"Map":r.forEach(function(o,h){aa(i,x(h,e),x(o,e))});break;case"Set":r.forEach(function(o){sp(i,x(o,e))});break;case"Error":Qi(i,"message",x(r.message,e)),iI(r,"cause")&&Qi(i,"cause",x(r.cause,e)),n==="AggregateError"?i.errors=x(r.errors,e):n==="SuppressedError"&&(i.error=x(r.error,e),i.suppressed=x(r.suppressed,e));case"DOMException":vI&&Qi(i,"stack",x(r.stack,e))}return i},xI=function(r,e){if(!na(r))throw new lI("Transfer option cannot be converted to a sequence");var t=[];nI(r,function(h){dI(t,tp(h))});for(var a=0,n=ra(t),i=new up,u,c,v,f,l,o;a<n;){if(u=t[a++],c=ta(u),f=void 0,c==="ArrayBuffer"?pI(i,u):iu(e,u))throw new Tr("Duplicate transferable",Le);if(c==="ArrayBuffer"){sp(i,u);continue}if(nu)f=xr(u,{transfer:[u]});else switch(c){case"ImageBitmap":v=T.OffscreenCanvas,eI(v)||B(c,ea);try{l=new v(u.width,u.height),o=l.getContext("bitmaprenderer"),o.transferFromImageBitmap(u),f=l.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":(!zr(u.clone)||!zr(u.close))&&B(c,ea);try{f=u.clone(),u.close()}catch{}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":B(c,ea)}if(f===void 0)throw new Tr("This object cannot be transferred: "+c,Le);aa(e,u,f)}return i},TI=function(r){cI(r,function(e){nu?xr(e,{transfer:[e]}):zr(e.transfer)?e.transfer():rp?rp(e):B("ArrayBuffer",ea)})};ZO({global:!0,enumerable:!0,sham:!nu,forced:RI},{structuredClone:function(e){var t=sI(arguments.length,1)>1&&!tI(arguments[1])?tp(arguments[1]):void 0,a=t?t.transfer:void 0,n,i;a!==void 0&&(n=new ru,i=xI(a,n));var u=x(e,n);return i&&TI(i),u}})});var lp=s((HP,fp)=>{"use strict";ee();bt();jl();Vt();Oh();xh();oe();le();he();vp();var wI=Sr();fp.exports=wI.structuredClone});var pp=s(($P,hp)=>{"use strict";var PI=lp();hp.exports=PI});var uu=s((VP,Ep)=>{"use strict";var yp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",gp=yp+"+/",dp=yp+"-_",qp=function(r){for(var e={},t=0;t<64;t++)e[r.charAt(t)]=t;return e};Ep.exports={i2c:gp,c2i:qp(gp),i2cUrl:dp,c2iUrl:qp(dp)}});var xp=s(()=>{"use strict";var AI=F(),FI=E(),Rp=_(),ua=d(),CI=A(),sa=y(),_I=H(),DI=J(),Sp=uu().c2i,bp=/[^\d+/a-z]/i,LI=/[\t\n\f\r ]+/g,NI=/[=]{1,2}$/,wr=Rp("atob"),MI=Array,UI=String.fromCharCode,BI=ua("".charAt),mp=ua("".replace),jI=ua([].join),kI=ua(bp.exec),Kr=!!wr&&!sa(function(){return wr("aGk=")!=="hi"}),Op=Kr&&sa(function(){return wr(" ")!==""}),Ip=Kr&&!sa(function(){wr("a")}),GI=Kr&&!sa(function(){wr()}),HI=Kr&&wr.length!==1,$I=!Kr||Op||Ip||GI||HI;AI({global:!0,bind:!0,enumerable:!0,forced:$I},{atob:function(e){if(DI(arguments.length,1),Kr&&!Op&&!Ip)return CI(wr,FI,e);var t=mp(_I(e),LI,""),a=0,n=0,i,u,c;t.length&3||(t=mp(t,NI,"")),i=t.length;var v=i&3;if(v===1||kI(bp,t))throw new(Rp("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var f=new MI((i>>2)*3+(v?v-1:0)),l=0;a<i;)u=BI(t,a++),c=n&3?(c<<6)+Sp[u]:Sp[u],n++&3&&(f[l++]=UI(255&c>>(-2*n&6)));return jI(f,"")}})});var wp=s((WP,Tp)=>{"use strict";ee();Vt();xp();oe();le();he();var VI=Sr();Tp.exports=VI.atob});var Ap=s((YP,Pp)=>{"use strict";var zI=wp();Pp.exports=zI});var Dp=s(()=>{"use strict";var KI=F(),WI=E(),_p=_(),su=d(),YI=A(),ou=y(),Fp=H(),XI=J(),QI=uu().i2c,Wr=_p("btoa"),JI=Array,ZI=su([].join),Cp=su("".charAt),rx=su("".charCodeAt),Me=!!Wr&&!ou(function(){return Wr("hi")!=="aGk="}),ex=Me&&!ou(function(){Wr()}),tx=Me&&ou(function(){return Wr(null)!=="bnVsbA=="}),ax=Me&&Wr.length!==1;KI({global:!0,bind:!0,enumerable:!0,forced:!Me||ex||tx||ax},{btoa:function(e){if(XI(arguments.length,1),Me)return YI(Wr,WI,Fp(e));for(var t=Fp(e),a=new JI((t.length+2)/3<<2),n=0,i=0,u=QI,c,v;Cp(t,i)||(u="=",i%1);){if(v=rx(t,i+=3/4),v>255)throw new(_p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");c=c<<8|v,a[n++]=Cp(u,63&c>>8-i%1*8)}return ZI(a,"")}})});var Np=s((JP,Lp)=>{"use strict";ee();Vt();Dp();oe();le();he();var nx=Sr();Lp.exports=nx.btoa});var Up=s((ZP,Mp)=>{"use strict";var ix=Np();Mp.exports=ix});var rA=Pr(Ec()),eA=Pr(Ol()),tA=Pr(Ul()),aA=Pr(pp()),nA=Pr(Ap()),iA=Pr(Up());})();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** What one isolate is charged of the process's CPU, read as it runs, and its end. */
|
|
2
|
+
export type MeteredIsolate = {
|
|
3
|
+
/** The CPU charged to it so far, in ms: its own, never another's wait for a core. */
|
|
4
|
+
charged: () => number;
|
|
5
|
+
/** It ended: its last slice charged, and it is no longer looked at. */
|
|
6
|
+
end: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type CpuMeter = {
|
|
9
|
+
/** Starts charging an isolate whose measured CPU `read` answers, in ms — from what it reads now. */
|
|
10
|
+
meter: (read: () => number) => MeteredIsolate;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The CPU the isolates' threads took, as the system counts it, in ms: the process's, every thread on a core, less its
|
|
14
|
+
* main thread's — making isolates, compiling bundles, speaking to the platform is the runner's work, and counted with
|
|
15
|
+
* theirs it let a running isolate be charged what V8 measured while the main thread was busy.
|
|
16
|
+
*/
|
|
17
|
+
export declare const isolatesCpuMs: () => number;
|
|
18
|
+
/** The CPU the runner's main thread took, in ms: what its cores held that no isolate had. */
|
|
19
|
+
export declare const mainThreadCpuMs: () => number;
|
|
20
|
+
/**
|
|
21
|
+
* The CPU the isolates' threads took, shared out between the isolates that ran.
|
|
22
|
+
*
|
|
23
|
+
* V8 measures an isolate's CPU as the time it spent running JavaScript — on a core, or ready and waiting for one — so
|
|
24
|
+
* beside more threads than cores each is measured as if it had a core of its own: a 5 ms route was measured past its
|
|
25
|
+
* 100 ms limit under load, and a ceiling on how much a limit may grow for it let code that spun go on, or stopped light
|
|
26
|
+
* code, depending on the burst. Each look, what the isolates were measured at is scaled down, in proportion, to the
|
|
27
|
+
* most they can have taken together, by whichever bound is lower: what their threads took as the system counts it, and
|
|
28
|
+
* the cores for the time the look spans less what the main thread took of them — V8's collector and the runner's helper
|
|
29
|
+
* threads take CPU nobody is measured at, and on the threads' count alone a measure inflated in those moments went
|
|
30
|
+
* through whole. The cores are the container's quota (`cpuLimitCores`): over the window it holds every thread to it, and
|
|
31
|
+
* an isolate whose thread the main one took the core from — a thousand sockets under load — is measured by V8 as if it
|
|
32
|
+
* ran: on the machine's cores, a 5 ms route was charged past its 100 ms limit. Code that spins alone is charged all it
|
|
33
|
+
* took; code beside others, never the cores it waited for.
|
|
34
|
+
*/
|
|
35
|
+
export declare const createCpuMeter: (everyMs: number, cores: number, readProcess?: () => number, readMain?: () => number) => CpuMeter;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { changeKv, changeListEntry } from '@plitzi/sdk-shared/functions';
|
|
2
|
+
/**
|
|
3
|
+
* What a driver needs of where it runs: the way to the platform, and that place's own `Request` and `Response`.
|
|
4
|
+
*/
|
|
5
|
+
export type FunctionsDriverEnvironment = {
|
|
6
|
+
/** A call to the platform (a `FunctionCall`): its value, or it throws what the platform said. */
|
|
7
|
+
call: (message: Record<string, unknown>) => Promise<unknown>;
|
|
8
|
+
/** Aborted when the invocation is: `ctx.signal`, this environment's own `AbortSignal`, handed through untouched. */
|
|
9
|
+
signal: unknown;
|
|
10
|
+
/** What `ctx.fetch` was answered, as this environment's `Response`. */
|
|
11
|
+
responseOf: (wire: Record<string, unknown>) => unknown;
|
|
12
|
+
/** A route's request, as this environment's `Request`. */
|
|
13
|
+
requestOf: (wire: Record<string, unknown>) => unknown;
|
|
14
|
+
/** What a route answered, as the wire carries it — `undefined` when it is not this environment's `Response`. */
|
|
15
|
+
wireOfResponse: (response: unknown) => Promise<Record<string, unknown> | undefined>;
|
|
16
|
+
changeKv: typeof changeKv;
|
|
17
|
+
changeListEntry: typeof changeListEntry;
|
|
18
|
+
/** The error a refusal is: what the code throws to tell whoever asked, not a fault. */
|
|
19
|
+
refusal: (message: string) => Error;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* What a definition declares, as the platform reads a manifest (`readManifest`) — nothing of it trusted there. Printed
|
|
23
|
+
* into the sandbox's guest and imported by a space runtime, like the driver below: self-contained for that.
|
|
24
|
+
*/
|
|
25
|
+
export declare const describeFunctions: (definition: unknown) => Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* A space's functions, driven: one invocation of a definition — a task or a route, with a `ctx` whose every method is
|
|
28
|
+
* a call to the platform.
|
|
29
|
+
*
|
|
30
|
+
* The one driver there is. The sandbox's guest is handed this function's SOURCE and runs it inside the isolate
|
|
31
|
+
* (`isolate.ts`), and a space runtime imports it and runs it in its own process — so code behaves the same in both, down
|
|
32
|
+
* to `ctx`. Self-contained by contract for that: no import, nothing of this module's, only what `environment` brings.
|
|
33
|
+
*/
|
|
34
|
+
export declare const createFunctionsDriver: (environment: FunctionsDriverEnvironment) => {
|
|
35
|
+
invoke: (definition: unknown, invocation: Record<string, unknown>) => Promise<unknown>;
|
|
36
|
+
log: (...values: unknown[]) => void;
|
|
37
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Bytes } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Text and bytes, as the guest reads them: UTF-8 both ways, base64, copies — and `TextEncoder`/`TextDecoder`.
|
|
4
|
+
*
|
|
5
|
+
* Printed into the isolate on its own, as the guest is (`isolate.ts`): it may use nothing but its parameters.
|
|
6
|
+
*/
|
|
7
|
+
export declare const guestBytes: () => {
|
|
8
|
+
isRecord: (value: unknown) => value is Record<string, unknown>;
|
|
9
|
+
encodeUtf8: (text: string) => Bytes;
|
|
10
|
+
decodeUtf8: (bytes: Uint8Array) => string;
|
|
11
|
+
bytesToBase64: (bytes: Uint8Array) => string;
|
|
12
|
+
base64ToBytes: (base64: string) => Bytes;
|
|
13
|
+
copyBytes: (view: ArrayBufferView | ArrayBuffer) => Bytes;
|
|
14
|
+
GuestTextEncoder: {
|
|
15
|
+
new (): {
|
|
16
|
+
readonly encoding: "utf-8";
|
|
17
|
+
encode(text?: unknown): Bytes;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
GuestTextDecoder: {
|
|
21
|
+
new (label?: string): {
|
|
22
|
+
readonly encoding: "utf-8";
|
|
23
|
+
decode(input?: ArrayBufferView | ArrayBuffer): string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type GuestBytes = ReturnType<typeof guestBytes>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GuestBytes } from './bytes';
|
|
2
|
+
import { Bytes, GuestHost } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* `crypto`: random values from the runner's CSPRNG, and a `crypto.subtle` of digests, HMAC and PBKDF2 the runner computes.
|
|
5
|
+
*
|
|
6
|
+
* Printed into the isolate on its own, as the guest is (`isolate.ts`): it may use nothing but its parameters.
|
|
7
|
+
*/
|
|
8
|
+
export declare const guestCrypto: (host: Pick<GuestHost, "random" | "crypto">, { isRecord, bytesToBase64, base64ToBytes, copyBytes }: GuestBytes) => {
|
|
9
|
+
getRandomValues: <T extends ArrayBufferView>(array: T) => T;
|
|
10
|
+
randomUUID: () => string;
|
|
11
|
+
subtle: {
|
|
12
|
+
digest: (algorithm: unknown, data: unknown) => Promise<ArrayBuffer>;
|
|
13
|
+
importKey: (format: string, keyData: unknown, algorithm: unknown, extractable: boolean, usages: string[]) => Promise<{
|
|
14
|
+
readonly type: "secret";
|
|
15
|
+
readonly algorithm: {
|
|
16
|
+
name: "HMAC";
|
|
17
|
+
hash: {
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
name: "PBKDF2";
|
|
22
|
+
};
|
|
23
|
+
readonly extractable: boolean;
|
|
24
|
+
readonly usages: string[];
|
|
25
|
+
readonly raw: Bytes;
|
|
26
|
+
}>;
|
|
27
|
+
sign: (_algorithm: unknown, key: unknown, data: unknown) => Promise<ArrayBuffer>;
|
|
28
|
+
verify: (_algorithm: unknown, key: unknown, signature: unknown, data: unknown) => Promise<boolean>;
|
|
29
|
+
deriveBits: (algorithm: unknown, baseKey: unknown, length: unknown) => Promise<ArrayBuffer>;
|
|
30
|
+
/** Derives an HMAC key — the one other kind this runtime has. */
|
|
31
|
+
deriveKey: (algorithm: unknown, baseKey: unknown, derivedKeyAlgorithm: unknown, extractable: boolean, usages: string[]) => Promise<{
|
|
32
|
+
readonly type: "secret";
|
|
33
|
+
readonly algorithm: {
|
|
34
|
+
name: "HMAC";
|
|
35
|
+
hash: {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
name: "PBKDF2";
|
|
40
|
+
};
|
|
41
|
+
readonly extractable: boolean;
|
|
42
|
+
readonly usages: string[];
|
|
43
|
+
readonly raw: Bytes;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type GuestCrypto = ReturnType<typeof guestCrypto>;
|