alchemy 2.0.0-beta.15 → 2.0.0-beta.16
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/bin/alchemy.js +1585 -707
- package/bin/alchemy.js.map +1 -1
- package/bin/alchemy.ts +2 -0
- package/bin/commands/login.ts +6 -3
- package/bin/commands/profile.ts +86 -0
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts +2 -3
- package/lib/Cloudflare/ApiToken/AccountApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/AccountApiToken.js +12 -8
- package/lib/Cloudflare/ApiToken/AccountApiToken.js.map +1 -1
- package/lib/Cloudflare/ApiToken/Common.d.ts +6 -1
- package/lib/Cloudflare/ApiToken/Common.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/Common.js.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts +2 -3
- package/lib/Cloudflare/ApiToken/UserApiToken.d.ts.map +1 -1
- package/lib/Cloudflare/ApiToken/UserApiToken.js +4 -4
- package/lib/Cloudflare/ApiToken/UserApiToken.js.map +1 -1
- package/lib/Cloudflare/Artifacts/Artifacts.d.ts +101 -0
- package/lib/Cloudflare/Artifacts/Artifacts.d.ts.map +1 -0
- package/lib/Cloudflare/Artifacts/Artifacts.js +92 -0
- package/lib/Cloudflare/Artifacts/Artifacts.js.map +1 -0
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.d.ts +83 -0
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.d.ts.map +1 -0
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.js +65 -0
- package/lib/Cloudflare/Artifacts/ArtifactsBinding.js.map +1 -0
- package/lib/Cloudflare/Artifacts/index.d.ts +3 -0
- package/lib/Cloudflare/Artifacts/index.d.ts.map +1 -0
- package/lib/Cloudflare/Artifacts/index.js +3 -0
- package/lib/Cloudflare/Artifacts/index.js.map +1 -0
- package/lib/Cloudflare/Container/ContainerBinding.d.ts +1 -1
- package/lib/Cloudflare/Providers.d.ts.map +1 -1
- package/lib/Cloudflare/Providers.js +3 -1
- package/lib/Cloudflare/Providers.js.map +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts +1 -1
- package/lib/Cloudflare/Workers/InferEnv.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/InferEnv.js +0 -1
- package/lib/Cloudflare/Workers/InferEnv.js.map +1 -1
- package/lib/Cloudflare/Workers/Worker.d.ts +2 -1
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +25 -18
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/index.d.ts +1 -0
- package/lib/Cloudflare/index.d.ts.map +1 -1
- package/lib/Cloudflare/index.js +1 -0
- package/lib/Cloudflare/index.js.map +1 -1
- package/lib/GitHub/AuthProvider.d.ts +37 -0
- package/lib/GitHub/AuthProvider.d.ts.map +1 -0
- package/lib/GitHub/AuthProvider.js +154 -0
- package/lib/GitHub/AuthProvider.js.map +1 -0
- package/lib/GitHub/Credentials.d.ts +29 -0
- package/lib/GitHub/Credentials.d.ts.map +1 -0
- package/lib/GitHub/Credentials.js +54 -0
- package/lib/GitHub/Credentials.js.map +1 -0
- package/lib/GitHub/Providers.d.ts +12 -1
- package/lib/GitHub/Providers.d.ts.map +1 -1
- package/lib/GitHub/Providers.js +13 -3
- package/lib/GitHub/Providers.js.map +1 -1
- package/lib/GitHub/Secret.d.ts +8 -10
- package/lib/GitHub/Secret.d.ts.map +1 -1
- package/lib/GitHub/Secret.js +16 -14
- package/lib/GitHub/Secret.js.map +1 -1
- package/lib/GitHub/Variable.d.ts +8 -10
- package/lib/GitHub/Variable.d.ts.map +1 -1
- package/lib/GitHub/Variable.js +12 -13
- package/lib/GitHub/Variable.js.map +1 -1
- package/lib/GitHub/index.d.ts +2 -0
- package/lib/GitHub/index.d.ts.map +1 -1
- package/lib/GitHub/index.js +2 -0
- package/lib/GitHub/index.js.map +1 -1
- package/package.json +4 -4
- package/src/Cloudflare/ApiToken/AccountApiToken.ts +21 -11
- package/src/Cloudflare/ApiToken/Common.ts +6 -1
- package/src/Cloudflare/ApiToken/UserApiToken.ts +6 -8
- package/src/Cloudflare/Artifacts/Artifacts.ts +139 -0
- package/src/Cloudflare/Artifacts/ArtifactsBinding.ts +188 -0
- package/src/Cloudflare/Artifacts/index.ts +2 -0
- package/src/Cloudflare/Providers.ts +3 -0
- package/src/Cloudflare/Workers/InferEnv.ts +5 -4
- package/src/Cloudflare/Workers/Worker.ts +12 -1
- package/src/Cloudflare/index.ts +1 -0
- package/src/GitHub/AuthProvider.ts +309 -0
- package/src/GitHub/Credentials.ts +99 -0
- package/src/GitHub/Providers.ts +23 -3
- package/src/GitHub/Secret.ts +22 -24
- package/src/GitHub/Variable.ts +16 -23
- package/src/GitHub/index.ts +2 -0
package/bin/alchemy.js
CHANGED
|
@@ -10,6 +10,7 @@ import * as Path$1 from "effect/Path";
|
|
|
10
10
|
import { Path } from "effect/Path";
|
|
11
11
|
import { PassThrough, Stream } from "node:stream";
|
|
12
12
|
import process$1, { cwd, env } from "node:process";
|
|
13
|
+
import * as NodeOs from "node:os";
|
|
13
14
|
import os from "node:os";
|
|
14
15
|
import { execFileSync } from "node:child_process";
|
|
15
16
|
import * as fs$1 from "node:fs";
|
|
@@ -25,9 +26,9 @@ import * as Schema from "effect/Schema";
|
|
|
25
26
|
import * as Argument$1 from "effect/unstable/cli/Argument";
|
|
26
27
|
import * as CliError from "effect/unstable/cli/CliError";
|
|
27
28
|
import * as Flag$1 from "effect/unstable/cli/Flag";
|
|
28
|
-
import "@clack/prompts";
|
|
29
|
+
import * as p from "@clack/prompts";
|
|
29
30
|
import * as Data from "effect/Data";
|
|
30
|
-
import "effect/unstable/process";
|
|
31
|
+
import { ChildProcess } from "effect/unstable/process";
|
|
31
32
|
import * as Auth from "@distilled.cloud/aws/Auth";
|
|
32
33
|
import * as Logger from "effect/Logger";
|
|
33
34
|
import * as Region$1 from "@distilled.cloud/aws/Region";
|
|
@@ -41,6 +42,13 @@ import * as Redacted from "effect/Redacted";
|
|
|
41
42
|
import { SingleShotGen } from "effect/Utils";
|
|
42
43
|
import { pipeArguments } from "effect/Pipeable";
|
|
43
44
|
import { Argument, Command, Flag } from "effect/unstable/cli";
|
|
45
|
+
import * as Match from "effect/Match";
|
|
46
|
+
import * as NodeCrypto from "node:crypto";
|
|
47
|
+
import crypto$1 from "node:crypto";
|
|
48
|
+
import * as cfAccounts from "@distilled.cloud/cloudflare/accounts";
|
|
49
|
+
import * as CfCredentialsModule from "@distilled.cloud/cloudflare/Credentials";
|
|
50
|
+
import * as Duration from "effect/Duration";
|
|
51
|
+
import http from "node:http";
|
|
44
52
|
import * as Stream$1 from "effect/Stream";
|
|
45
53
|
|
|
46
54
|
//#region rolldown:runtime
|
|
@@ -74,7 +82,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
74
82
|
|
|
75
83
|
//#endregion
|
|
76
84
|
//#region package.json
|
|
77
|
-
var version = "2.0.0-beta.
|
|
85
|
+
var version = "2.0.0-beta.16";
|
|
78
86
|
|
|
79
87
|
//#endregion
|
|
80
88
|
//#region src/AlchemyContext.ts
|
|
@@ -113,12 +121,12 @@ var require_react_production = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
113
121
|
this.updater = updater || ReactNoopUpdateQueue;
|
|
114
122
|
}
|
|
115
123
|
Component.prototype.isReactComponent = {};
|
|
116
|
-
Component.prototype.setState = function(partialState, callback) {
|
|
124
|
+
Component.prototype.setState = function(partialState, callback$1) {
|
|
117
125
|
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
118
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
126
|
+
this.updater.enqueueSetState(this, partialState, callback$1, "setState");
|
|
119
127
|
};
|
|
120
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
121
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
128
|
+
Component.prototype.forceUpdate = function(callback$1) {
|
|
129
|
+
this.updater.enqueueForceUpdate(this, callback$1, "forceUpdate");
|
|
122
130
|
};
|
|
123
131
|
function ComponentDummy() {}
|
|
124
132
|
ComponentDummy.prototype = Component.prototype;
|
|
@@ -184,7 +192,7 @@ var require_react_production = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
184
192
|
}
|
|
185
193
|
throw thenable;
|
|
186
194
|
}
|
|
187
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
195
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback$1) {
|
|
188
196
|
var type = typeof children;
|
|
189
197
|
if ("undefined" === type || "boolean" === type) children = null;
|
|
190
198
|
var invokeCallback = !1;
|
|
@@ -200,18 +208,18 @@ var require_react_production = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
200
208
|
case REACT_PORTAL_TYPE:
|
|
201
209
|
invokeCallback = !0;
|
|
202
210
|
break;
|
|
203
|
-
case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
|
211
|
+
case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback$1);
|
|
204
212
|
}
|
|
205
213
|
}
|
|
206
|
-
if (invokeCallback) return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
214
|
+
if (invokeCallback) return callback$1 = callback$1(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback$1) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback$1, array, escapedPrefix, "", function(c) {
|
|
207
215
|
return c;
|
|
208
|
-
})) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + invokeCallback)), array.push(callback)), 1;
|
|
216
|
+
})) : null != callback$1 && (isValidElement(callback$1) && (callback$1 = cloneAndReplaceKey(callback$1, escapedPrefix + (null == callback$1.key || children && children.key === callback$1.key ? "" : ("" + callback$1.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + invokeCallback)), array.push(callback$1)), 1;
|
|
209
217
|
invokeCallback = 0;
|
|
210
218
|
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
211
|
-
if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
212
|
-
else if (i = getIteratorFn(children), "function" === typeof i) for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
219
|
+
if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback$1);
|
|
220
|
+
else if (i = getIteratorFn(children), "function" === typeof i) for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback$1);
|
|
213
221
|
else if ("object" === type) {
|
|
214
|
-
if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
|
|
222
|
+
if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback$1);
|
|
215
223
|
array = String(children);
|
|
216
224
|
throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
|
|
217
225
|
}
|
|
@@ -389,8 +397,8 @@ var require_react_production = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
389
397
|
exports.useActionState = function(action, initialState, permalink) {
|
|
390
398
|
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
391
399
|
};
|
|
392
|
-
exports.useCallback = function(callback, deps) {
|
|
393
|
-
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
400
|
+
exports.useCallback = function(callback$1, deps) {
|
|
401
|
+
return ReactSharedInternals.H.useCallback(callback$1, deps);
|
|
394
402
|
};
|
|
395
403
|
exports.useContext = function(Context) {
|
|
396
404
|
return ReactSharedInternals.H.useContext(Context);
|
|
@@ -402,8 +410,8 @@ var require_react_production = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
402
410
|
exports.useEffect = function(create$2, deps) {
|
|
403
411
|
return ReactSharedInternals.H.useEffect(create$2, deps);
|
|
404
412
|
};
|
|
405
|
-
exports.useEffectEvent = function(callback) {
|
|
406
|
-
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
413
|
+
exports.useEffectEvent = function(callback$1) {
|
|
414
|
+
return ReactSharedInternals.H.useEffectEvent(callback$1);
|
|
407
415
|
};
|
|
408
416
|
exports.useId = function() {
|
|
409
417
|
return ReactSharedInternals.H.useId();
|
|
@@ -445,9 +453,9 @@ var require_react_production = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
445
453
|
//#region ../../node_modules/.bun/react@19.2.5/node_modules/react/cjs/react.development.js
|
|
446
454
|
var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/react@19.2.5/node_modules/react/cjs/react.development.js": ((exports, module) => {
|
|
447
455
|
"production" !== process.env.NODE_ENV && (function() {
|
|
448
|
-
function defineDeprecationWarning(methodName, info) {
|
|
456
|
+
function defineDeprecationWarning(methodName, info$1) {
|
|
449
457
|
Object.defineProperty(Component$1.prototype, methodName, { get: function() {
|
|
450
|
-
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
458
|
+
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info$1[0], info$1[1]);
|
|
451
459
|
} });
|
|
452
460
|
}
|
|
453
461
|
function getIteratorFn$1(maybeIterable) {
|
|
@@ -645,7 +653,7 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
645
653
|
}
|
|
646
654
|
throw thenable;
|
|
647
655
|
}
|
|
648
|
-
function mapIntoArray$1(children, array, escapedPrefix, nameSoFar, callback) {
|
|
656
|
+
function mapIntoArray$1(children, array, escapedPrefix, nameSoFar, callback$1) {
|
|
649
657
|
var type = typeof children;
|
|
650
658
|
if ("undefined" === type || "boolean" === type) children = null;
|
|
651
659
|
var invokeCallback = !1;
|
|
@@ -661,24 +669,24 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
661
669
|
case REACT_PORTAL_TYPE$1:
|
|
662
670
|
invokeCallback = !0;
|
|
663
671
|
break;
|
|
664
|
-
case REACT_LAZY_TYPE$1: return invokeCallback = children._init, mapIntoArray$1(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
|
672
|
+
case REACT_LAZY_TYPE$1: return invokeCallback = children._init, mapIntoArray$1(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback$1);
|
|
665
673
|
}
|
|
666
674
|
}
|
|
667
675
|
if (invokeCallback) {
|
|
668
676
|
invokeCallback = children;
|
|
669
|
-
callback = callback(invokeCallback);
|
|
677
|
+
callback$1 = callback$1(invokeCallback);
|
|
670
678
|
var childKey = "" === nameSoFar ? "." + getElementKey$1(invokeCallback, 0) : nameSoFar;
|
|
671
|
-
isArrayImpl$1(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex$1, "$&/") + "/"), mapIntoArray$1(callback, array, escapedPrefix, "", function(c) {
|
|
679
|
+
isArrayImpl$1(callback$1) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex$1, "$&/") + "/"), mapIntoArray$1(callback$1, array, escapedPrefix, "", function(c) {
|
|
672
680
|
return c;
|
|
673
|
-
})) : null != callback && (isValidElement$1(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey$1(callback, escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex$1, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement$1(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
681
|
+
})) : null != callback$1 && (isValidElement$1(callback$1) && (null != callback$1.key && (invokeCallback && invokeCallback.key === callback$1.key || checkKeyStringCoercion(callback$1.key)), escapedPrefix = cloneAndReplaceKey$1(callback$1, escapedPrefix + (null == callback$1.key || invokeCallback && invokeCallback.key === callback$1.key ? "" : ("" + callback$1.key).replace(userProvidedKeyEscapeRegex$1, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement$1(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback$1 = escapedPrefix), array.push(callback$1));
|
|
674
682
|
return 1;
|
|
675
683
|
}
|
|
676
684
|
invokeCallback = 0;
|
|
677
685
|
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
678
|
-
if (isArrayImpl$1(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = childKey + getElementKey$1(nameSoFar, i), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback);
|
|
679
|
-
else if (i = getIteratorFn$1(children), "function" === typeof i) for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = childKey + getElementKey$1(nameSoFar, i++), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback);
|
|
686
|
+
if (isArrayImpl$1(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = childKey + getElementKey$1(nameSoFar, i), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback$1);
|
|
687
|
+
else if (i = getIteratorFn$1(children), "function" === typeof i) for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = childKey + getElementKey$1(nameSoFar, i++), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback$1);
|
|
680
688
|
else if ("object" === type) {
|
|
681
|
-
if ("function" === typeof children.then) return mapIntoArray$1(resolveThenable$1(children), array, escapedPrefix, nameSoFar, callback);
|
|
689
|
+
if ("function" === typeof children.then) return mapIntoArray$1(resolveThenable$1(children), array, escapedPrefix, nameSoFar, callback$1);
|
|
682
690
|
array = String(children);
|
|
683
691
|
throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
|
|
684
692
|
}
|
|
@@ -739,10 +747,10 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
739
747
|
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
740
748
|
enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
|
|
741
749
|
} catch (_err) {
|
|
742
|
-
enqueueTaskImpl = function(callback) {
|
|
750
|
+
enqueueTaskImpl = function(callback$1) {
|
|
743
751
|
!1 === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = !0, "undefined" === typeof MessageChannel && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
744
752
|
var channel$1 = new MessageChannel();
|
|
745
|
-
channel$1.port1.onmessage = callback;
|
|
753
|
+
channel$1.port1.onmessage = callback$1;
|
|
746
754
|
channel$1.port2.postMessage(void 0);
|
|
747
755
|
};
|
|
748
756
|
}
|
|
@@ -775,17 +783,17 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
775
783
|
var i = 0;
|
|
776
784
|
try {
|
|
777
785
|
for (; i < queue.length; i++) {
|
|
778
|
-
var callback = queue[i];
|
|
786
|
+
var callback$1 = queue[i];
|
|
779
787
|
do {
|
|
780
788
|
ReactSharedInternals$1.didUsePromise = !1;
|
|
781
|
-
var continuation = callback(!1);
|
|
789
|
+
var continuation = callback$1(!1);
|
|
782
790
|
if (null !== continuation) {
|
|
783
791
|
if (ReactSharedInternals$1.didUsePromise) {
|
|
784
|
-
queue[i] = callback;
|
|
792
|
+
queue[i] = callback$1;
|
|
785
793
|
queue.splice(0, i);
|
|
786
794
|
return;
|
|
787
795
|
}
|
|
788
|
-
callback = continuation;
|
|
796
|
+
callback$1 = continuation;
|
|
789
797
|
} else break;
|
|
790
798
|
} while (1);
|
|
791
799
|
}
|
|
@@ -814,12 +822,12 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
814
822
|
}, assign$1 = Object.assign, emptyObject$1 = {};
|
|
815
823
|
Object.freeze(emptyObject$1);
|
|
816
824
|
Component$1.prototype.isReactComponent = {};
|
|
817
|
-
Component$1.prototype.setState = function(partialState, callback) {
|
|
825
|
+
Component$1.prototype.setState = function(partialState, callback$1) {
|
|
818
826
|
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
819
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
827
|
+
this.updater.enqueueSetState(this, partialState, callback$1, "setState");
|
|
820
828
|
};
|
|
821
|
-
Component$1.prototype.forceUpdate = function(callback) {
|
|
822
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
829
|
+
Component$1.prototype.forceUpdate = function(callback$1) {
|
|
830
|
+
this.updater.enqueueForceUpdate(this, callback$1, "forceUpdate");
|
|
823
831
|
};
|
|
824
832
|
var deprecatedAPIs = {
|
|
825
833
|
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
@@ -868,9 +876,9 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
868
876
|
return;
|
|
869
877
|
}
|
|
870
878
|
console.error(error);
|
|
871
|
-
}, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
|
|
879
|
+
}, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback$1) {
|
|
872
880
|
queueMicrotask(function() {
|
|
873
|
-
return queueMicrotask(callback);
|
|
881
|
+
return queueMicrotask(callback$1);
|
|
874
882
|
});
|
|
875
883
|
} : enqueueTask;
|
|
876
884
|
deprecatedAPIs = Object.freeze({
|
|
@@ -913,16 +921,16 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
913
921
|
exports.Suspense = REACT_SUSPENSE_TYPE$1;
|
|
914
922
|
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals$1;
|
|
915
923
|
exports.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
916
|
-
exports.act = function(callback) {
|
|
924
|
+
exports.act = function(callback$1) {
|
|
917
925
|
var prevActQueue = ReactSharedInternals$1.actQueue, prevActScopeDepth = actScopeDepth;
|
|
918
926
|
actScopeDepth++;
|
|
919
927
|
var queue = ReactSharedInternals$1.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = !1;
|
|
920
928
|
try {
|
|
921
|
-
var result = callback();
|
|
929
|
+
var result = callback$1();
|
|
922
930
|
} catch (error) {
|
|
923
931
|
ReactSharedInternals$1.thrownErrors.push(error);
|
|
924
932
|
}
|
|
925
|
-
if (0 < ReactSharedInternals$1.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals$1.thrownErrors), ReactSharedInternals$1.thrownErrors.length = 0, callback;
|
|
933
|
+
if (0 < ReactSharedInternals$1.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback$1 = aggregateErrors(ReactSharedInternals$1.thrownErrors), ReactSharedInternals$1.thrownErrors.length = 0, callback$1;
|
|
926
934
|
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
|
|
927
935
|
var thenable = result;
|
|
928
936
|
queueSeveralMicrotasks(function() {
|
|
@@ -957,7 +965,7 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
957
965
|
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
|
|
958
966
|
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
|
959
967
|
}), ReactSharedInternals$1.actQueue = null);
|
|
960
|
-
if (0 < ReactSharedInternals$1.thrownErrors.length) throw callback = aggregateErrors(ReactSharedInternals$1.thrownErrors), ReactSharedInternals$1.thrownErrors.length = 0, callback;
|
|
968
|
+
if (0 < ReactSharedInternals$1.thrownErrors.length) throw callback$1 = aggregateErrors(ReactSharedInternals$1.thrownErrors), ReactSharedInternals$1.thrownErrors.length = 0, callback$1;
|
|
961
969
|
return { then: function(resolve$1, reject) {
|
|
962
970
|
didAwaitActCall = !0;
|
|
963
971
|
0 === prevActScopeDepth ? (ReactSharedInternals$1.actQueue = queue, enqueueTask(function() {
|
|
@@ -1131,8 +1139,8 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
1131
1139
|
exports.useActionState = function(action, initialState, permalink) {
|
|
1132
1140
|
return resolveDispatcher().useActionState(action, initialState, permalink);
|
|
1133
1141
|
};
|
|
1134
|
-
exports.useCallback = function(callback, deps) {
|
|
1135
|
-
return resolveDispatcher().useCallback(callback, deps);
|
|
1142
|
+
exports.useCallback = function(callback$1, deps) {
|
|
1143
|
+
return resolveDispatcher().useCallback(callback$1, deps);
|
|
1136
1144
|
};
|
|
1137
1145
|
exports.useContext = function(Context) {
|
|
1138
1146
|
var dispatcher = resolveDispatcher();
|
|
@@ -1149,8 +1157,8 @@ var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
|
1149
1157
|
create$2 ?? console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
1150
1158
|
return resolveDispatcher().useEffect(create$2, deps);
|
|
1151
1159
|
};
|
|
1152
|
-
exports.useEffectEvent = function(callback) {
|
|
1153
|
-
return resolveDispatcher().useEffectEvent(callback);
|
|
1160
|
+
exports.useEffectEvent = function(callback$1) {
|
|
1161
|
+
return resolveDispatcher().useEffectEvent(callback$1);
|
|
1154
1162
|
};
|
|
1155
1163
|
exports.useId = function() {
|
|
1156
1164
|
return resolveDispatcher().useId();
|
|
@@ -1256,9 +1264,9 @@ function debounce$1(func, debounceMs, { signal, edges } = {}) {
|
|
|
1256
1264
|
|
|
1257
1265
|
//#endregion
|
|
1258
1266
|
//#region ../../node_modules/.bun/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/function/debounce.mjs
|
|
1259
|
-
function debounce(func, debounceMs = 0, options = {}) {
|
|
1260
|
-
if (typeof options !== "object") options = {};
|
|
1261
|
-
const { leading = false, trailing = true, maxWait } = options;
|
|
1267
|
+
function debounce(func, debounceMs = 0, options$2 = {}) {
|
|
1268
|
+
if (typeof options$2 !== "object") options$2 = {};
|
|
1269
|
+
const { leading = false, trailing = true, maxWait } = options$2;
|
|
1262
1270
|
const edges = Array(2);
|
|
1263
1271
|
if (leading) edges[0] = "leading";
|
|
1264
1272
|
if (trailing) edges[1] = "trailing";
|
|
@@ -1293,8 +1301,8 @@ function debounce(func, debounceMs = 0, options = {}) {
|
|
|
1293
1301
|
|
|
1294
1302
|
//#endregion
|
|
1295
1303
|
//#region ../../node_modules/.bun/es-toolkit@1.46.0/node_modules/es-toolkit/dist/compat/function/throttle.mjs
|
|
1296
|
-
function throttle(func, throttleMs = 0, options = {}) {
|
|
1297
|
-
const { leading = true, trailing = true } = options;
|
|
1304
|
+
function throttle(func, throttleMs = 0, options$2 = {}) {
|
|
1305
|
+
const { leading = true, trailing = true } = options$2;
|
|
1298
1306
|
return debounce(func, throttleMs, {
|
|
1299
1307
|
leading,
|
|
1300
1308
|
maxWait: throttleMs,
|
|
@@ -1572,14 +1580,14 @@ const consoleMethods = [
|
|
|
1572
1580
|
"warn"
|
|
1573
1581
|
];
|
|
1574
1582
|
let originalMethods = {};
|
|
1575
|
-
const patchConsole = (callback) => {
|
|
1583
|
+
const patchConsole = (callback$1) => {
|
|
1576
1584
|
const stdout = new PassThrough();
|
|
1577
1585
|
const stderr = new PassThrough();
|
|
1578
1586
|
stdout.write = (data) => {
|
|
1579
|
-
callback("stdout", data);
|
|
1587
|
+
callback$1("stdout", data);
|
|
1580
1588
|
};
|
|
1581
1589
|
stderr.write = (data) => {
|
|
1582
|
-
callback("stderr", data);
|
|
1590
|
+
callback$1("stderr", data);
|
|
1583
1591
|
};
|
|
1584
1592
|
const internalConsole = new console.Console(stdout, stderr);
|
|
1585
1593
|
for (const method of consoleMethods) {
|
|
@@ -2033,18 +2041,18 @@ var loadYoga = (() => {
|
|
|
2033
2041
|
k = !0;
|
|
2034
2042
|
break;
|
|
2035
2043
|
}
|
|
2036
|
-
var m = "void" !== b[0].name, l = f - 2, n = Array(l), p = [], r = [];
|
|
2044
|
+
var m = "void" !== b[0].name, l = f - 2, n = Array(l), p$1 = [], r = [];
|
|
2037
2045
|
return function() {
|
|
2038
2046
|
arguments.length !== l && L("function " + a + " called with " + arguments.length + " arguments, expected " + l + " args!");
|
|
2039
2047
|
r.length = 0;
|
|
2040
|
-
p.length = g ? 2 : 1;
|
|
2041
|
-
p[0] = e;
|
|
2048
|
+
p$1.length = g ? 2 : 1;
|
|
2049
|
+
p$1[0] = e;
|
|
2042
2050
|
if (g) {
|
|
2043
2051
|
var u = b[1].toWireType(r, this);
|
|
2044
|
-
p[1] = u;
|
|
2052
|
+
p$1[1] = u;
|
|
2045
2053
|
}
|
|
2046
|
-
for (var t = 0; t < l; ++t) n[t] = b[t + 2].toWireType(r, arguments[t]), p.push(n[t]);
|
|
2047
|
-
t = d.apply(null, p);
|
|
2054
|
+
for (var t = 0; t < l; ++t) n[t] = b[t + 2].toWireType(r, arguments[t]), p$1.push(n[t]);
|
|
2055
|
+
t = d.apply(null, p$1);
|
|
2048
2056
|
if (k) Wa(r);
|
|
2049
2057
|
else for (var y = g ? 1 : 2; y < b.length; y++) {
|
|
2050
2058
|
var B = 1 === y ? u : n[y - 2];
|
|
@@ -2357,9 +2365,9 @@ var loadYoga = (() => {
|
|
|
2357
2365
|
V([a], f, (g) => {
|
|
2358
2366
|
var k = {};
|
|
2359
2367
|
e.forEach((m, l) => {
|
|
2360
|
-
var n = g[l], p = m.ra, r = m.sa, u = g[l + e.length], t = m.ya, y = m.Aa;
|
|
2368
|
+
var n = g[l], p$1 = m.ra, r = m.sa, u = g[l + e.length], t = m.ya, y = m.Aa;
|
|
2361
2369
|
k[m.oa] = {
|
|
2362
|
-
read: (B) => n.fromWireType(p(r, B)),
|
|
2370
|
+
read: (B) => n.fromWireType(p$1(r, B)),
|
|
2363
2371
|
write: (B, ba) => {
|
|
2364
2372
|
var I = [];
|
|
2365
2373
|
t(y, B, u.toWireType(I, ba));
|
|
@@ -2377,10 +2385,10 @@ var loadYoga = (() => {
|
|
|
2377
2385
|
},
|
|
2378
2386
|
toWireType: function(m, l) {
|
|
2379
2387
|
for (var n in k) if (!(n in l)) throw new TypeError("Missing field: \"" + n + "\"");
|
|
2380
|
-
var p = c();
|
|
2381
|
-
for (n in k) k[n].write(p, l[n]);
|
|
2382
|
-
null !== m && m.push(d, p);
|
|
2383
|
-
return p;
|
|
2388
|
+
var p$1 = c();
|
|
2389
|
+
for (n in k) k[n].write(p$1, l[n]);
|
|
2390
|
+
null !== m && m.push(d, p$1);
|
|
2391
|
+
return p$1;
|
|
2384
2392
|
},
|
|
2385
2393
|
argPackAdvance: 8,
|
|
2386
2394
|
readValueFromPointer: Xa,
|
|
@@ -2411,12 +2419,12 @@ var loadYoga = (() => {
|
|
|
2411
2419
|
V: null
|
|
2412
2420
|
});
|
|
2413
2421
|
},
|
|
2414
|
-
f: function(a, b, c, d, e, f, g, k, m, l, n, p, r) {
|
|
2422
|
+
f: function(a, b, c, d, e, f, g, k, m, l, n, p$1, r) {
|
|
2415
2423
|
n = N(n);
|
|
2416
2424
|
f = Z(e, f);
|
|
2417
2425
|
k && (k = Z(g, k));
|
|
2418
2426
|
l && (l = Z(m, l));
|
|
2419
|
-
r = Z(p, r);
|
|
2427
|
+
r = Z(p$1, r);
|
|
2420
2428
|
var u = Aa(n);
|
|
2421
2429
|
bb(u, function() {
|
|
2422
2430
|
nb("Cannot construct " + n + " due to unbound types", [d]);
|
|
@@ -2467,11 +2475,11 @@ var loadYoga = (() => {
|
|
|
2467
2475
|
m = m[0];
|
|
2468
2476
|
var n = m.name + "." + b;
|
|
2469
2477
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2470
|
-
var p = m.N.constructor;
|
|
2471
|
-
void 0 === p[b] ? (l.Z = c - 1, p[b] = l) : (ab(p, b, n), p[b].S[c - 1] = l);
|
|
2478
|
+
var p$1 = m.N.constructor;
|
|
2479
|
+
void 0 === p$1[b] ? (l.Z = c - 1, p$1[b] = l) : (ab(p$1, b, n), p$1[b].S[c - 1] = l);
|
|
2472
2480
|
V([], k, function(r) {
|
|
2473
2481
|
r = ob(n, [r[0], null].concat(r.slice(1)), null, f, g);
|
|
2474
|
-
void 0 === p[b].S ? (r.Z = c - 1, p[b] = r) : p[b].S[c - 1] = r;
|
|
2482
|
+
void 0 === p$1[b].S ? (r.Z = c - 1, p$1[b] = r) : p$1[b].S[c - 1] = r;
|
|
2475
2483
|
return [];
|
|
2476
2484
|
});
|
|
2477
2485
|
return [];
|
|
@@ -2503,16 +2511,16 @@ var loadYoga = (() => {
|
|
|
2503
2511
|
f = Z(e, f);
|
|
2504
2512
|
V([], [a], function(l) {
|
|
2505
2513
|
function n() {
|
|
2506
|
-
nb("Cannot call " + p + " due to unbound types", m);
|
|
2514
|
+
nb("Cannot call " + p$1 + " due to unbound types", m);
|
|
2507
2515
|
}
|
|
2508
2516
|
l = l[0];
|
|
2509
|
-
var p = l.name + "." + b;
|
|
2517
|
+
var p$1 = l.name + "." + b;
|
|
2510
2518
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2511
2519
|
k && l.N.ja.push(b);
|
|
2512
2520
|
var r = l.N.X, u = r[b];
|
|
2513
|
-
void 0 === u || void 0 === u.S && u.className !== l.name && u.Z === c - 2 ? (n.Z = c - 2, n.className = l.name, r[b] = n) : (ab(r, b, p), r[b].S[c - 2] = n);
|
|
2521
|
+
void 0 === u || void 0 === u.S && u.className !== l.name && u.Z === c - 2 ? (n.Z = c - 2, n.className = l.name, r[b] = n) : (ab(r, b, p$1), r[b].S[c - 2] = n);
|
|
2514
2522
|
V([], m, function(t) {
|
|
2515
|
-
t = ob(p, t, l, f, g);
|
|
2523
|
+
t = ob(p$1, t, l, f, g);
|
|
2516
2524
|
void 0 === r[b].S ? (t.Z = c - 2, r[b] = t) : r[b].S[c - 2] = t;
|
|
2517
2525
|
return [];
|
|
2518
2526
|
});
|
|
@@ -2644,8 +2652,8 @@ var loadYoga = (() => {
|
|
|
2644
2652
|
for (var l = 0; l < e.length; ++l) {
|
|
2645
2653
|
var n = e.charCodeAt(l);
|
|
2646
2654
|
if (55296 <= n && 57343 >= n) {
|
|
2647
|
-
var p = e.charCodeAt(++l);
|
|
2648
|
-
n = 65536 + ((n & 1023) << 10) | p & 1023;
|
|
2655
|
+
var p$1 = e.charCodeAt(++l);
|
|
2656
|
+
n = 65536 + ((n & 1023) << 10) | p$1 & 1023;
|
|
2649
2657
|
}
|
|
2650
2658
|
if (127 >= n) {
|
|
2651
2659
|
if (g >= m) break;
|
|
@@ -2694,20 +2702,20 @@ var loadYoga = (() => {
|
|
|
2694
2702
|
W(a, {
|
|
2695
2703
|
name: c,
|
|
2696
2704
|
fromWireType: function(m) {
|
|
2697
|
-
for (var l = E[m >> 2], n = g(), p, r = m + 4, u = 0; u <= l; ++u) {
|
|
2705
|
+
for (var l = E[m >> 2], n = g(), p$1, r = m + 4, u = 0; u <= l; ++u) {
|
|
2698
2706
|
var t = m + 4 + u * b;
|
|
2699
|
-
if (u == l || 0 == n[t >> k]) r = d(r, t - r), void 0 === p ? p = r : (p += String.fromCharCode(0), p += r), r = t + b;
|
|
2707
|
+
if (u == l || 0 == n[t >> k]) r = d(r, t - r), void 0 === p$1 ? p$1 = r : (p$1 += String.fromCharCode(0), p$1 += r), r = t + b;
|
|
2700
2708
|
}
|
|
2701
2709
|
S(m);
|
|
2702
|
-
return p;
|
|
2710
|
+
return p$1;
|
|
2703
2711
|
},
|
|
2704
2712
|
toWireType: function(m, l) {
|
|
2705
2713
|
"string" != typeof l && L("Cannot pass non-string to C++ string type " + c);
|
|
2706
|
-
var n = f(l), p = Ib(4 + n + b);
|
|
2707
|
-
E[p >> 2] = n >> k;
|
|
2708
|
-
e(l, p + 4, n + b);
|
|
2709
|
-
null !== m && m.push(S, p);
|
|
2710
|
-
return p;
|
|
2714
|
+
var n = f(l), p$1 = Ib(4 + n + b);
|
|
2715
|
+
E[p$1 >> 2] = n >> k;
|
|
2716
|
+
e(l, p$1 + 4, n + b);
|
|
2717
|
+
null !== m && m.push(S, p$1);
|
|
2718
|
+
return p$1;
|
|
2711
2719
|
},
|
|
2712
2720
|
argPackAdvance: 8,
|
|
2713
2721
|
readValueFromPointer: Xa,
|
|
@@ -2769,9 +2777,9 @@ var loadYoga = (() => {
|
|
|
2769
2777
|
if (void 0 !== e) return e;
|
|
2770
2778
|
var f = Array(a - 1);
|
|
2771
2779
|
e = Cb((g, k, m, l) => {
|
|
2772
|
-
for (var n = 0, p = 0; p < a - 1; ++p) f[p] = c[p + 1].readValueFromPointer(l + n), n += c[p + 1].argPackAdvance;
|
|
2780
|
+
for (var n = 0, p$1 = 0; p$1 < a - 1; ++p$1) f[p$1] = c[p$1 + 1].readValueFromPointer(l + n), n += c[p$1 + 1].argPackAdvance;
|
|
2773
2781
|
g = g[k].apply(g, f);
|
|
2774
|
-
for (p = 0; p < a - 1; ++p) c[p + 1].ma && c[p + 1].ma(f[p]);
|
|
2782
|
+
for (p$1 = 0; p$1 < a - 1; ++p$1) c[p$1 + 1].ma && c[p$1 + 1].ma(f[p$1]);
|
|
2775
2783
|
if (!d.va) return d.toWireType(m, g);
|
|
2776
2784
|
});
|
|
2777
2785
|
return Eb[b] = e;
|
|
@@ -3988,9 +3996,9 @@ var require_emoji_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/
|
|
|
3988
3996
|
var import_emoji_regex = /* @__PURE__ */ __toESM(require_emoji_regex(), 1);
|
|
3989
3997
|
const segmenter$2 = new Intl.Segmenter();
|
|
3990
3998
|
const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
3991
|
-
function stringWidth$1(string, options = {}) {
|
|
3999
|
+
function stringWidth$1(string, options$2 = {}) {
|
|
3992
4000
|
if (typeof string !== "string" || string.length === 0) return 0;
|
|
3993
|
-
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
4001
|
+
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options$2;
|
|
3994
4002
|
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
3995
4003
|
if (string.length === 0) return 0;
|
|
3996
4004
|
let width = 0;
|
|
@@ -4233,27 +4241,27 @@ const stringVisibleTrimSpacesRight = (string) => {
|
|
|
4233
4241
|
if (last === words.length) return string;
|
|
4234
4242
|
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
4235
4243
|
};
|
|
4236
|
-
const exec$1 = (string, columns, options = {}) => {
|
|
4237
|
-
if (options.trim !== false && string.trim() === "") return "";
|
|
4244
|
+
const exec$1 = (string, columns, options$2 = {}) => {
|
|
4245
|
+
if (options$2.trim !== false && string.trim() === "") return "";
|
|
4238
4246
|
let returnValue = "";
|
|
4239
4247
|
let escapeCode;
|
|
4240
4248
|
let escapeUrl;
|
|
4241
4249
|
const lengths = wordLengths(string);
|
|
4242
4250
|
let rows = [""];
|
|
4243
4251
|
for (const [index, word] of string.split(" ").entries()) {
|
|
4244
|
-
if (options.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
4252
|
+
if (options$2.trim !== false) rows[rows.length - 1] = rows.at(-1).trimStart();
|
|
4245
4253
|
let rowLength = stringWidth$1(rows.at(-1));
|
|
4246
4254
|
if (index !== 0) {
|
|
4247
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
4255
|
+
if (rowLength >= columns && (options$2.wordWrap === false || options$2.trim === false)) {
|
|
4248
4256
|
rows.push("");
|
|
4249
4257
|
rowLength = 0;
|
|
4250
4258
|
}
|
|
4251
|
-
if (rowLength > 0 || options.trim === false) {
|
|
4259
|
+
if (rowLength > 0 || options$2.trim === false) {
|
|
4252
4260
|
rows[rows.length - 1] += " ";
|
|
4253
4261
|
rowLength++;
|
|
4254
4262
|
}
|
|
4255
4263
|
}
|
|
4256
|
-
if (options.hard && lengths[index] > columns) {
|
|
4264
|
+
if (options$2.hard && lengths[index] > columns) {
|
|
4257
4265
|
const remainingColumns = columns - rowLength;
|
|
4258
4266
|
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
4259
4267
|
if (Math.floor((lengths[index] - 1) / columns) < breaksStartingThisLine) rows.push("");
|
|
@@ -4261,19 +4269,19 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
4261
4269
|
continue;
|
|
4262
4270
|
}
|
|
4263
4271
|
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
4264
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
4272
|
+
if (options$2.wordWrap === false && rowLength < columns) {
|
|
4265
4273
|
wrapWord(rows, word, columns);
|
|
4266
4274
|
continue;
|
|
4267
4275
|
}
|
|
4268
4276
|
rows.push("");
|
|
4269
4277
|
}
|
|
4270
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
4278
|
+
if (rowLength + lengths[index] > columns && options$2.wordWrap === false) {
|
|
4271
4279
|
wrapWord(rows, word, columns);
|
|
4272
4280
|
continue;
|
|
4273
4281
|
}
|
|
4274
4282
|
rows[rows.length - 1] += word;
|
|
4275
4283
|
}
|
|
4276
|
-
if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
4284
|
+
if (options$2.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
4277
4285
|
const preString = rows.join("\n");
|
|
4278
4286
|
const pre = [...preString];
|
|
4279
4287
|
let preStringIndex = 0;
|
|
@@ -4298,8 +4306,8 @@ const exec$1 = (string, columns, options = {}) => {
|
|
|
4298
4306
|
}
|
|
4299
4307
|
return returnValue;
|
|
4300
4308
|
};
|
|
4301
|
-
function wrapAnsi(string, columns, options) {
|
|
4302
|
-
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec$1(line, columns, options)).join("\n");
|
|
4309
|
+
function wrapAnsi(string, columns, options$2) {
|
|
4310
|
+
return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec$1(line, columns, options$2)).join("\n");
|
|
4303
4311
|
}
|
|
4304
4312
|
|
|
4305
4313
|
//#endregion
|
|
@@ -4477,11 +4485,11 @@ var require_scheduler_production = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
4477
4485
|
b: {
|
|
4478
4486
|
advanceTimers(currentTime);
|
|
4479
4487
|
for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost());) {
|
|
4480
|
-
var callback = currentTask.callback;
|
|
4481
|
-
if ("function" === typeof callback) {
|
|
4488
|
+
var callback$1 = currentTask.callback;
|
|
4489
|
+
if ("function" === typeof callback$1) {
|
|
4482
4490
|
currentTask.callback = null;
|
|
4483
4491
|
currentPriorityLevel = currentTask.priorityLevel;
|
|
4484
|
-
var continuationCallback = callback(currentTask.expirationTime <= currentTime);
|
|
4492
|
+
var continuationCallback = callback$1(currentTask.expirationTime <= currentTime);
|
|
4485
4493
|
currentTime = exports.unstable_now();
|
|
4486
4494
|
if ("function" === typeof continuationCallback) {
|
|
4487
4495
|
currentTask.callback = continuationCallback;
|
|
@@ -4525,9 +4533,9 @@ var require_scheduler_production = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
4525
4533
|
} else schedulePerformWorkUntilDeadline = function() {
|
|
4526
4534
|
localSetTimeout(performWorkUntilDeadline, 0);
|
|
4527
4535
|
};
|
|
4528
|
-
function requestHostTimeout(callback, ms) {
|
|
4536
|
+
function requestHostTimeout(callback$1, ms) {
|
|
4529
4537
|
taskTimeoutID = localSetTimeout(function() {
|
|
4530
|
-
callback(exports.unstable_now());
|
|
4538
|
+
callback$1(exports.unstable_now());
|
|
4531
4539
|
}, ms);
|
|
4532
4540
|
}
|
|
4533
4541
|
exports.unstable_IdlePriority = 5;
|
|
@@ -4582,9 +4590,9 @@ var require_scheduler_production = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
4582
4590
|
currentPriorityLevel = previousPriorityLevel;
|
|
4583
4591
|
}
|
|
4584
4592
|
};
|
|
4585
|
-
exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
|
|
4593
|
+
exports.unstable_scheduleCallback = function(priorityLevel, callback$1, options$2) {
|
|
4586
4594
|
var currentTime = exports.unstable_now();
|
|
4587
|
-
"object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
|
|
4595
|
+
"object" === typeof options$2 && null !== options$2 ? (options$2 = options$2.delay, options$2 = "number" === typeof options$2 && 0 < options$2 ? currentTime + options$2 : currentTime) : options$2 = currentTime;
|
|
4588
4596
|
switch (priorityLevel) {
|
|
4589
4597
|
case 1:
|
|
4590
4598
|
var timeout = -1;
|
|
@@ -4600,26 +4608,26 @@ var require_scheduler_production = /* @__PURE__ */ __commonJS({ "../../node_modu
|
|
|
4600
4608
|
break;
|
|
4601
4609
|
default: timeout = 5e3;
|
|
4602
4610
|
}
|
|
4603
|
-
timeout = options + timeout;
|
|
4611
|
+
timeout = options$2 + timeout;
|
|
4604
4612
|
priorityLevel = {
|
|
4605
4613
|
id: taskIdCounter++,
|
|
4606
|
-
callback,
|
|
4614
|
+
callback: callback$1,
|
|
4607
4615
|
priorityLevel,
|
|
4608
|
-
startTime: options,
|
|
4616
|
+
startTime: options$2,
|
|
4609
4617
|
expirationTime: timeout,
|
|
4610
4618
|
sortIndex: -1
|
|
4611
4619
|
};
|
|
4612
|
-
options > currentTime ? (priorityLevel.sortIndex = options, push$1(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = !0, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push$1(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline())));
|
|
4620
|
+
options$2 > currentTime ? (priorityLevel.sortIndex = options$2, push$1(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = !0, requestHostTimeout(handleTimeout, options$2 - currentTime))) : (priorityLevel.sortIndex = timeout, push$1(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline())));
|
|
4613
4621
|
return priorityLevel;
|
|
4614
4622
|
};
|
|
4615
4623
|
exports.unstable_shouldYield = shouldYieldToHost;
|
|
4616
|
-
exports.unstable_wrapCallback = function(callback) {
|
|
4624
|
+
exports.unstable_wrapCallback = function(callback$1) {
|
|
4617
4625
|
var parentPriorityLevel = currentPriorityLevel;
|
|
4618
4626
|
return function() {
|
|
4619
4627
|
var previousPriorityLevel = currentPriorityLevel;
|
|
4620
4628
|
currentPriorityLevel = parentPriorityLevel;
|
|
4621
4629
|
try {
|
|
4622
|
-
return callback.apply(this, arguments);
|
|
4630
|
+
return callback$1.apply(this, arguments);
|
|
4623
4631
|
} finally {
|
|
4624
4632
|
currentPriorityLevel = previousPriorityLevel;
|
|
4625
4633
|
}
|
|
@@ -4647,11 +4655,11 @@ var require_scheduler_development = /* @__PURE__ */ __commonJS({ "../../node_mod
|
|
|
4647
4655
|
b: {
|
|
4648
4656
|
advanceTimers$1(currentTime);
|
|
4649
4657
|
for (currentTask$1 = peek$1(taskQueue$1); null !== currentTask$1 && !(currentTask$1.expirationTime > currentTime && shouldYieldToHost$1());) {
|
|
4650
|
-
var callback = currentTask$1.callback;
|
|
4651
|
-
if ("function" === typeof callback) {
|
|
4658
|
+
var callback$1 = currentTask$1.callback;
|
|
4659
|
+
if ("function" === typeof callback$1) {
|
|
4652
4660
|
currentTask$1.callback = null;
|
|
4653
4661
|
currentPriorityLevel$1 = currentTask$1.priorityLevel;
|
|
4654
|
-
var continuationCallback = callback(currentTask$1.expirationTime <= currentTime);
|
|
4662
|
+
var continuationCallback = callback$1(currentTask$1.expirationTime <= currentTime);
|
|
4655
4663
|
currentTime = exports.unstable_now();
|
|
4656
4664
|
if ("function" === typeof continuationCallback) {
|
|
4657
4665
|
currentTask$1.callback = continuationCallback;
|
|
@@ -4732,9 +4740,9 @@ var require_scheduler_development = /* @__PURE__ */ __commonJS({ "../../node_mod
|
|
|
4732
4740
|
function shouldYieldToHost$1() {
|
|
4733
4741
|
return needsPaint$1 ? !0 : exports.unstable_now() - startTime$1 < frameInterval$1 ? !1 : !0;
|
|
4734
4742
|
}
|
|
4735
|
-
function requestHostTimeout$1(callback, ms) {
|
|
4743
|
+
function requestHostTimeout$1(callback$1, ms) {
|
|
4736
4744
|
taskTimeoutID$1 = localSetTimeout$1(function() {
|
|
4737
|
-
callback(exports.unstable_now());
|
|
4745
|
+
callback$1(exports.unstable_now());
|
|
4738
4746
|
}, ms);
|
|
4739
4747
|
}
|
|
4740
4748
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
@@ -4815,9 +4823,9 @@ var require_scheduler_development = /* @__PURE__ */ __commonJS({ "../../node_mod
|
|
|
4815
4823
|
currentPriorityLevel$1 = previousPriorityLevel;
|
|
4816
4824
|
}
|
|
4817
4825
|
};
|
|
4818
|
-
exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
|
|
4826
|
+
exports.unstable_scheduleCallback = function(priorityLevel, callback$1, options$2) {
|
|
4819
4827
|
var currentTime = exports.unstable_now();
|
|
4820
|
-
"object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
|
|
4828
|
+
"object" === typeof options$2 && null !== options$2 ? (options$2 = options$2.delay, options$2 = "number" === typeof options$2 && 0 < options$2 ? currentTime + options$2 : currentTime) : options$2 = currentTime;
|
|
4821
4829
|
switch (priorityLevel) {
|
|
4822
4830
|
case 1:
|
|
4823
4831
|
var timeout = -1;
|
|
@@ -4833,26 +4841,26 @@ var require_scheduler_development = /* @__PURE__ */ __commonJS({ "../../node_mod
|
|
|
4833
4841
|
break;
|
|
4834
4842
|
default: timeout = 5e3;
|
|
4835
4843
|
}
|
|
4836
|
-
timeout = options + timeout;
|
|
4844
|
+
timeout = options$2 + timeout;
|
|
4837
4845
|
priorityLevel = {
|
|
4838
4846
|
id: taskIdCounter$1++,
|
|
4839
|
-
callback,
|
|
4847
|
+
callback: callback$1,
|
|
4840
4848
|
priorityLevel,
|
|
4841
|
-
startTime: options,
|
|
4849
|
+
startTime: options$2,
|
|
4842
4850
|
expirationTime: timeout,
|
|
4843
4851
|
sortIndex: -1
|
|
4844
4852
|
};
|
|
4845
|
-
options > currentTime ? (priorityLevel.sortIndex = options, push$2(timerQueue$1, priorityLevel), null === peek$1(taskQueue$1) && priorityLevel === peek$1(timerQueue$1) && (isHostTimeoutScheduled$1 ? (localClearTimeout$1(taskTimeoutID$1), taskTimeoutID$1 = -1) : isHostTimeoutScheduled$1 = !0, requestHostTimeout$1(handleTimeout$1, options - currentTime))) : (priorityLevel.sortIndex = timeout, push$2(taskQueue$1, priorityLevel), isHostCallbackScheduled$1 || isPerformingWork$1 || (isHostCallbackScheduled$1 = !0, isMessageLoopRunning$1 || (isMessageLoopRunning$1 = !0, schedulePerformWorkUntilDeadline$1())));
|
|
4853
|
+
options$2 > currentTime ? (priorityLevel.sortIndex = options$2, push$2(timerQueue$1, priorityLevel), null === peek$1(taskQueue$1) && priorityLevel === peek$1(timerQueue$1) && (isHostTimeoutScheduled$1 ? (localClearTimeout$1(taskTimeoutID$1), taskTimeoutID$1 = -1) : isHostTimeoutScheduled$1 = !0, requestHostTimeout$1(handleTimeout$1, options$2 - currentTime))) : (priorityLevel.sortIndex = timeout, push$2(taskQueue$1, priorityLevel), isHostCallbackScheduled$1 || isPerformingWork$1 || (isHostCallbackScheduled$1 = !0, isMessageLoopRunning$1 || (isMessageLoopRunning$1 = !0, schedulePerformWorkUntilDeadline$1())));
|
|
4846
4854
|
return priorityLevel;
|
|
4847
4855
|
};
|
|
4848
4856
|
exports.unstable_shouldYield = shouldYieldToHost$1;
|
|
4849
|
-
exports.unstable_wrapCallback = function(callback) {
|
|
4857
|
+
exports.unstable_wrapCallback = function(callback$1) {
|
|
4850
4858
|
var parentPriorityLevel = currentPriorityLevel$1;
|
|
4851
4859
|
return function() {
|
|
4852
4860
|
var previousPriorityLevel = currentPriorityLevel$1;
|
|
4853
4861
|
currentPriorityLevel$1 = parentPriorityLevel;
|
|
4854
4862
|
try {
|
|
4855
|
-
return callback.apply(this, arguments);
|
|
4863
|
+
return callback$1.apply(this, arguments);
|
|
4856
4864
|
} finally {
|
|
4857
4865
|
currentPriorityLevel$1 = previousPriorityLevel;
|
|
4858
4866
|
}
|
|
@@ -5329,11 +5337,11 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
5329
5337
|
}
|
|
5330
5338
|
function getStackByFiberInDevAndProd(workInProgress$1) {
|
|
5331
5339
|
try {
|
|
5332
|
-
var info = "", previous = null;
|
|
5340
|
+
var info$1 = "", previous = null;
|
|
5333
5341
|
do
|
|
5334
|
-
info += describeFiber(workInProgress$1, previous), previous = workInProgress$1, workInProgress$1 = workInProgress$1.return;
|
|
5342
|
+
info$1 += describeFiber(workInProgress$1, previous), previous = workInProgress$1, workInProgress$1 = workInProgress$1.return;
|
|
5335
5343
|
while (workInProgress$1);
|
|
5336
|
-
return info;
|
|
5344
|
+
return info$1;
|
|
5337
5345
|
} catch (x) {
|
|
5338
5346
|
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
|
5339
5347
|
}
|
|
@@ -6336,9 +6344,9 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
6336
6344
|
workInProgress$jscomp$0.memoizedState = newState;
|
|
6337
6345
|
}
|
|
6338
6346
|
}
|
|
6339
|
-
function callCallback(callback, context) {
|
|
6340
|
-
if ("function" !== typeof callback) throw Error(formatProdErrorMessage(191, callback));
|
|
6341
|
-
callback.call(context);
|
|
6347
|
+
function callCallback(callback$1, context) {
|
|
6348
|
+
if ("function" !== typeof callback$1) throw Error(formatProdErrorMessage(191, callback$1));
|
|
6349
|
+
callback$1.call(context);
|
|
6342
6350
|
}
|
|
6343
6351
|
function commitCallbacks(updateQueue, context) {
|
|
6344
6352
|
var callbacks = updateQueue.callbacks;
|
|
@@ -6956,11 +6964,11 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
6956
6964
|
null === events ? componentUpdateQueue.events = [payload] : events.push(payload);
|
|
6957
6965
|
}
|
|
6958
6966
|
}
|
|
6959
|
-
function updateEvent(callback) {
|
|
6967
|
+
function updateEvent(callback$1) {
|
|
6960
6968
|
var ref$1 = updateWorkInProgressHook().memoizedState;
|
|
6961
6969
|
useEffectEventImpl({
|
|
6962
6970
|
ref: ref$1,
|
|
6963
|
-
nextImpl: callback
|
|
6971
|
+
nextImpl: callback$1
|
|
6964
6972
|
});
|
|
6965
6973
|
return function() {
|
|
6966
6974
|
if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));
|
|
@@ -6990,13 +6998,13 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
6990
6998
|
updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create$2, ref$1), deps);
|
|
6991
6999
|
}
|
|
6992
7000
|
function mountDebugValue() {}
|
|
6993
|
-
function updateCallback(callback, deps) {
|
|
7001
|
+
function updateCallback(callback$1, deps) {
|
|
6994
7002
|
var hook = updateWorkInProgressHook();
|
|
6995
7003
|
deps = void 0 === deps ? null : deps;
|
|
6996
7004
|
var prevState = hook.memoizedState;
|
|
6997
7005
|
if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0];
|
|
6998
|
-
hook.memoizedState = [callback, deps];
|
|
6999
|
-
return callback;
|
|
7006
|
+
hook.memoizedState = [callback$1, deps];
|
|
7007
|
+
return callback$1;
|
|
7000
7008
|
}
|
|
7001
7009
|
function updateMemo(nextCreate, deps) {
|
|
7002
7010
|
var hook = updateWorkInProgressHook();
|
|
@@ -7032,14 +7040,14 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
7032
7040
|
workInProgressRootSkippedLanes |= hook;
|
|
7033
7041
|
return prevValue;
|
|
7034
7042
|
}
|
|
7035
|
-
function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
|
7043
|
+
function startTransition(fiber, queue, pendingState, finishedState, callback$1) {
|
|
7036
7044
|
var previousPriority = getCurrentUpdatePriority();
|
|
7037
7045
|
setCurrentUpdatePriority(0 !== previousPriority && 8 > previousPriority ? previousPriority : 8);
|
|
7038
7046
|
var prevTransition = ReactSharedInternals$1.T, currentTransition = {};
|
|
7039
7047
|
ReactSharedInternals$1.T = currentTransition;
|
|
7040
7048
|
dispatchOptimisticSetState(fiber, !1, queue, pendingState);
|
|
7041
7049
|
try {
|
|
7042
|
-
var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals$1.S;
|
|
7050
|
+
var returnValue = callback$1(), onStartTransitionFinish = ReactSharedInternals$1.S;
|
|
7043
7051
|
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
7044
7052
|
if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) dispatchSetStateInternal(fiber, queue, chainThenableValue(returnValue, finishedState), requestUpdateLane(fiber));
|
|
7045
7053
|
else dispatchSetStateInternal(fiber, queue, finishedState, requestUpdateLane(fiber));
|
|
@@ -10162,8 +10170,8 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10162
10170
|
null !== retryCache && retryCache.delete(wakeable);
|
|
10163
10171
|
retryTimedOutBoundary(boundaryFiber, retryLane);
|
|
10164
10172
|
}
|
|
10165
|
-
function scheduleCallback(priorityLevel, callback) {
|
|
10166
|
-
return scheduleCallback$3(priorityLevel, callback);
|
|
10173
|
+
function scheduleCallback(priorityLevel, callback$1) {
|
|
10174
|
+
return scheduleCallback$3(priorityLevel, callback$1);
|
|
10167
10175
|
}
|
|
10168
10176
|
function FiberNode(tag, pendingProps, key, mode) {
|
|
10169
10177
|
this.tag = tag;
|
|
@@ -10337,13 +10345,13 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10337
10345
|
component = null !== component ? findCurrentHostFiberImpl(component) : null;
|
|
10338
10346
|
return null === component ? null : getPublicInstance(component.stateNode);
|
|
10339
10347
|
}
|
|
10340
|
-
function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
|
|
10348
|
+
function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback$1) {
|
|
10341
10349
|
parentComponent = getContextForSubtree(parentComponent);
|
|
10342
10350
|
null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
|
|
10343
10351
|
container = createUpdate(lane);
|
|
10344
10352
|
container.payload = { element };
|
|
10345
|
-
callback = void 0 === callback ? null : callback;
|
|
10346
|
-
null !== callback && (container.callback = callback);
|
|
10353
|
+
callback$1 = void 0 === callback$1 ? null : callback$1;
|
|
10354
|
+
null !== callback$1 && (container.callback = callback$1);
|
|
10347
10355
|
element = enqueueUpdate(rootFiber, container, lane);
|
|
10348
10356
|
null !== element && (scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
|
|
10349
10357
|
}
|
|
@@ -10481,9 +10489,9 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10481
10489
|
var HooksDispatcherOnMount = {
|
|
10482
10490
|
readContext,
|
|
10483
10491
|
use,
|
|
10484
|
-
useCallback: function(callback, deps) {
|
|
10485
|
-
mountWorkInProgressHook().memoizedState = [callback, void 0 === deps ? null : deps];
|
|
10486
|
-
return callback;
|
|
10492
|
+
useCallback: function(callback$1, deps) {
|
|
10493
|
+
mountWorkInProgressHook().memoizedState = [callback$1, void 0 === deps ? null : deps];
|
|
10494
|
+
return callback$1;
|
|
10487
10495
|
},
|
|
10488
10496
|
useContext: readContext,
|
|
10489
10497
|
useEffect: mountEffect,
|
|
@@ -10614,8 +10622,8 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10614
10622
|
useCacheRefresh: function() {
|
|
10615
10623
|
return mountWorkInProgressHook().memoizedState = refreshCache.bind(null, currentlyRenderingFiber);
|
|
10616
10624
|
},
|
|
10617
|
-
useEffectEvent: function(callback) {
|
|
10618
|
-
var hook = mountWorkInProgressHook(), ref$1 = { impl: callback };
|
|
10625
|
+
useEffectEvent: function(callback$1) {
|
|
10626
|
+
var hook = mountWorkInProgressHook(), ref$1 = { impl: callback$1 };
|
|
10619
10627
|
hook.memoizedState = ref$1;
|
|
10620
10628
|
return function() {
|
|
10621
10629
|
if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));
|
|
@@ -10697,30 +10705,30 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10697
10705
|
};
|
|
10698
10706
|
HooksDispatcherOnRerender.useEffectEvent = updateEvent;
|
|
10699
10707
|
var classComponentUpdater = {
|
|
10700
|
-
enqueueSetState: function(inst, payload, callback) {
|
|
10708
|
+
enqueueSetState: function(inst, payload, callback$1) {
|
|
10701
10709
|
inst = inst._reactInternals;
|
|
10702
10710
|
var lane = requestUpdateLane(), update = createUpdate(lane);
|
|
10703
10711
|
update.payload = payload;
|
|
10704
|
-
void 0 !== callback && null !== callback && (update.callback = callback);
|
|
10712
|
+
void 0 !== callback$1 && null !== callback$1 && (update.callback = callback$1);
|
|
10705
10713
|
payload = enqueueUpdate(inst, update, lane);
|
|
10706
10714
|
null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
|
|
10707
10715
|
},
|
|
10708
|
-
enqueueReplaceState: function(inst, payload, callback) {
|
|
10716
|
+
enqueueReplaceState: function(inst, payload, callback$1) {
|
|
10709
10717
|
inst = inst._reactInternals;
|
|
10710
10718
|
var lane = requestUpdateLane(), update = createUpdate(lane);
|
|
10711
10719
|
update.tag = 1;
|
|
10712
10720
|
update.payload = payload;
|
|
10713
|
-
void 0 !== callback && null !== callback && (update.callback = callback);
|
|
10721
|
+
void 0 !== callback$1 && null !== callback$1 && (update.callback = callback$1);
|
|
10714
10722
|
payload = enqueueUpdate(inst, update, lane);
|
|
10715
10723
|
null !== payload && (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
|
|
10716
10724
|
},
|
|
10717
|
-
enqueueForceUpdate: function(inst, callback) {
|
|
10725
|
+
enqueueForceUpdate: function(inst, callback$1) {
|
|
10718
10726
|
inst = inst._reactInternals;
|
|
10719
10727
|
var lane = requestUpdateLane(), update = createUpdate(lane);
|
|
10720
10728
|
update.tag = 2;
|
|
10721
|
-
void 0 !== callback && null !== callback && (update.callback = callback);
|
|
10722
|
-
callback = enqueueUpdate(inst, update, lane);
|
|
10723
|
-
null !== callback && (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
|
|
10729
|
+
void 0 !== callback$1 && null !== callback$1 && (update.callback = callback$1);
|
|
10730
|
+
callback$1 = enqueueUpdate(inst, update, lane);
|
|
10731
|
+
null !== callback$1 && (scheduleUpdateOnFiber(callback$1, inst, lane), entangleTransitions(callback$1, inst, lane));
|
|
10724
10732
|
}
|
|
10725
10733
|
}, SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1, SUSPENDED_MARKER = {
|
|
10726
10734
|
dehydrated: null,
|
|
@@ -10802,18 +10810,18 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10802
10810
|
value: selectors
|
|
10803
10811
|
};
|
|
10804
10812
|
};
|
|
10805
|
-
exports$1.createHydrationContainer = function(initialChildren, callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, transitionCallbacks, formState) {
|
|
10813
|
+
exports$1.createHydrationContainer = function(initialChildren, callback$1, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, transitionCallbacks, formState) {
|
|
10806
10814
|
initialChildren = createFiberRoot(containerInfo, tag, !0, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator);
|
|
10807
10815
|
initialChildren.context = getContextForSubtree(null);
|
|
10808
10816
|
containerInfo = initialChildren.current;
|
|
10809
10817
|
tag = requestUpdateLane();
|
|
10810
10818
|
tag = getBumpedLaneForHydrationByLane(tag);
|
|
10811
10819
|
hydrationCallbacks = createUpdate(tag);
|
|
10812
|
-
hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null;
|
|
10820
|
+
hydrationCallbacks.callback = void 0 !== callback$1 && null !== callback$1 ? callback$1 : null;
|
|
10813
10821
|
enqueueUpdate(containerInfo, hydrationCallbacks, tag);
|
|
10814
|
-
callback = tag;
|
|
10815
|
-
initialChildren.current.lanes = callback;
|
|
10816
|
-
markRootUpdated$1(initialChildren, callback);
|
|
10822
|
+
callback$1 = tag;
|
|
10823
|
+
initialChildren.current.lanes = callback$1;
|
|
10824
|
+
markRootUpdated$1(initialChildren, callback$1);
|
|
10817
10825
|
ensureRootIsScheduled(initialChildren);
|
|
10818
10826
|
return initialChildren;
|
|
10819
10827
|
};
|
|
@@ -10839,10 +10847,10 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10839
10847
|
value: id
|
|
10840
10848
|
};
|
|
10841
10849
|
};
|
|
10842
|
-
exports$1.createTextSelector = function(text) {
|
|
10850
|
+
exports$1.createTextSelector = function(text$1) {
|
|
10843
10851
|
return {
|
|
10844
10852
|
$$typeof: TEXT_TYPE,
|
|
10845
|
-
value: text
|
|
10853
|
+
value: text$1
|
|
10846
10854
|
};
|
|
10847
10855
|
};
|
|
10848
10856
|
exports$1.defaultOnCaughtError = function(error) {
|
|
@@ -10983,10 +10991,10 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
10983
10991
|
exports$1.isAlreadyRendering = function() {
|
|
10984
10992
|
return 0 !== (executionContext & 6);
|
|
10985
10993
|
};
|
|
10986
|
-
exports$1.observeVisibleRects = function(hostRoot, selectors, callback, options) {
|
|
10994
|
+
exports$1.observeVisibleRects = function(hostRoot, selectors, callback$1, options$2) {
|
|
10987
10995
|
if (!supportsTestSelectors) throw Error(formatProdErrorMessage(363));
|
|
10988
10996
|
hostRoot = findAllNodes(hostRoot, selectors);
|
|
10989
|
-
var disconnect = setupIntersectionObserver(hostRoot, callback, options).disconnect;
|
|
10997
|
+
var disconnect = setupIntersectionObserver(hostRoot, callback$1, options$2).disconnect;
|
|
10990
10998
|
return { disconnect: function() {
|
|
10991
10999
|
disconnect();
|
|
10992
11000
|
} };
|
|
@@ -11007,13 +11015,13 @@ var require_react_reconciler_production = /* @__PURE__ */ __commonJS({ "../../no
|
|
|
11007
11015
|
return action(formData);
|
|
11008
11016
|
});
|
|
11009
11017
|
};
|
|
11010
|
-
exports$1.updateContainer = function(element, container, parentComponent, callback) {
|
|
11018
|
+
exports$1.updateContainer = function(element, container, parentComponent, callback$1) {
|
|
11011
11019
|
var current = container.current, lane = requestUpdateLane();
|
|
11012
|
-
updateContainerImpl(current, lane, element, container, parentComponent, callback);
|
|
11020
|
+
updateContainerImpl(current, lane, element, container, parentComponent, callback$1);
|
|
11013
11021
|
return lane;
|
|
11014
11022
|
};
|
|
11015
|
-
exports$1.updateContainerSync = function(element, container, parentComponent, callback) {
|
|
11016
|
-
updateContainerImpl(container.current, 2, element, container, parentComponent, callback);
|
|
11023
|
+
exports$1.updateContainerSync = function(element, container, parentComponent, callback$1) {
|
|
11024
|
+
updateContainerImpl(container.current, 2, element, container, parentComponent, callback$1);
|
|
11017
11025
|
return 2;
|
|
11018
11026
|
};
|
|
11019
11027
|
return exports$1;
|
|
@@ -11956,14 +11964,14 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
11956
11964
|
}
|
|
11957
11965
|
function getStackByFiberInDevAndProd(workInProgress$1) {
|
|
11958
11966
|
try {
|
|
11959
|
-
var info = "", previous = null;
|
|
11967
|
+
var info$1 = "", previous = null;
|
|
11960
11968
|
do {
|
|
11961
|
-
info += describeFiber(workInProgress$1, previous);
|
|
11969
|
+
info$1 += describeFiber(workInProgress$1, previous);
|
|
11962
11970
|
var debugInfo = workInProgress$1._debugInfo;
|
|
11963
11971
|
if (debugInfo) for (var i = debugInfo.length - 1; 0 <= i; i--) {
|
|
11964
11972
|
var entry = debugInfo[i];
|
|
11965
11973
|
if ("string" === typeof entry.name) {
|
|
11966
|
-
var JSCompiler_temp_const = info;
|
|
11974
|
+
var JSCompiler_temp_const = info$1;
|
|
11967
11975
|
a: {
|
|
11968
11976
|
var name = entry.name, env$2 = entry.env, location = entry.debugLocation;
|
|
11969
11977
|
if (null != location) {
|
|
@@ -11975,13 +11983,13 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
11975
11983
|
}
|
|
11976
11984
|
JSCompiler_inline_result = describeBuiltInComponentFrame(name + (env$2 ? " [" + env$2 + "]" : ""));
|
|
11977
11985
|
}
|
|
11978
|
-
info = JSCompiler_temp_const + JSCompiler_inline_result;
|
|
11986
|
+
info$1 = JSCompiler_temp_const + JSCompiler_inline_result;
|
|
11979
11987
|
}
|
|
11980
11988
|
}
|
|
11981
11989
|
previous = workInProgress$1;
|
|
11982
11990
|
workInProgress$1 = workInProgress$1.return;
|
|
11983
11991
|
} while (workInProgress$1);
|
|
11984
|
-
return info;
|
|
11992
|
+
return info$1;
|
|
11985
11993
|
} catch (x) {
|
|
11986
11994
|
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
|
11987
11995
|
}
|
|
@@ -12278,30 +12286,30 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
12278
12286
|
if (null === current) return "";
|
|
12279
12287
|
var workInProgress$1 = current;
|
|
12280
12288
|
try {
|
|
12281
|
-
var info = "";
|
|
12289
|
+
var info$1 = "";
|
|
12282
12290
|
6 === workInProgress$1.tag && (workInProgress$1 = workInProgress$1.return);
|
|
12283
12291
|
switch (workInProgress$1.tag) {
|
|
12284
12292
|
case 26:
|
|
12285
12293
|
case 27:
|
|
12286
12294
|
case 5:
|
|
12287
|
-
info += describeBuiltInComponentFrame(workInProgress$1.type);
|
|
12295
|
+
info$1 += describeBuiltInComponentFrame(workInProgress$1.type);
|
|
12288
12296
|
break;
|
|
12289
12297
|
case 13:
|
|
12290
|
-
info += describeBuiltInComponentFrame("Suspense");
|
|
12298
|
+
info$1 += describeBuiltInComponentFrame("Suspense");
|
|
12291
12299
|
break;
|
|
12292
12300
|
case 19:
|
|
12293
|
-
info += describeBuiltInComponentFrame("SuspenseList");
|
|
12301
|
+
info$1 += describeBuiltInComponentFrame("SuspenseList");
|
|
12294
12302
|
break;
|
|
12295
12303
|
case 31:
|
|
12296
|
-
info += describeBuiltInComponentFrame("Activity");
|
|
12304
|
+
info$1 += describeBuiltInComponentFrame("Activity");
|
|
12297
12305
|
break;
|
|
12298
12306
|
case 30:
|
|
12299
12307
|
case 0:
|
|
12300
12308
|
case 15:
|
|
12301
12309
|
case 1:
|
|
12302
|
-
workInProgress$1._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(workInProgress$1.type));
|
|
12310
|
+
workInProgress$1._debugOwner || "" !== info$1 || (info$1 += describeFunctionComponentFrameWithoutLineNumber(workInProgress$1.type));
|
|
12303
12311
|
break;
|
|
12304
|
-
case 11: workInProgress$1._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(workInProgress$1.type.render));
|
|
12312
|
+
case 11: workInProgress$1._debugOwner || "" !== info$1 || (info$1 += describeFunctionComponentFrameWithoutLineNumber(workInProgress$1.type.render));
|
|
12305
12313
|
}
|
|
12306
12314
|
for (; workInProgress$1;) if ("number" === typeof workInProgress$1.tag) {
|
|
12307
12315
|
var fiber = workInProgress$1;
|
|
@@ -12309,23 +12317,23 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
12309
12317
|
var debugStack = fiber._debugStack;
|
|
12310
12318
|
if (workInProgress$1 && debugStack) {
|
|
12311
12319
|
var formattedStack = formatOwnerStack(debugStack);
|
|
12312
|
-
"" !== formattedStack && (info += "\n" + formattedStack);
|
|
12320
|
+
"" !== formattedStack && (info$1 += "\n" + formattedStack);
|
|
12313
12321
|
}
|
|
12314
12322
|
} else if (null != workInProgress$1.debugStack) {
|
|
12315
12323
|
var ownerStack = workInProgress$1.debugStack;
|
|
12316
|
-
(workInProgress$1 = workInProgress$1.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
|
|
12324
|
+
(workInProgress$1 = workInProgress$1.owner) && ownerStack && (info$1 += "\n" + formatOwnerStack(ownerStack));
|
|
12317
12325
|
} else break;
|
|
12318
|
-
var JSCompiler_inline_result = info;
|
|
12326
|
+
var JSCompiler_inline_result = info$1;
|
|
12319
12327
|
} catch (x) {
|
|
12320
12328
|
JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack;
|
|
12321
12329
|
}
|
|
12322
12330
|
return JSCompiler_inline_result;
|
|
12323
12331
|
}
|
|
12324
|
-
function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
|
|
12332
|
+
function runWithFiberInDEV(fiber, callback$1, arg0, arg1, arg2, arg3, arg4) {
|
|
12325
12333
|
var previousFiber = current;
|
|
12326
12334
|
setCurrentFiber(fiber);
|
|
12327
12335
|
try {
|
|
12328
|
-
return null !== fiber && fiber._debugTask ? fiber._debugTask.run(callback.bind(null, arg0, arg1, arg2, arg3, arg4)) : callback(arg0, arg1, arg2, arg3, arg4);
|
|
12336
|
+
return null !== fiber && fiber._debugTask ? fiber._debugTask.run(callback$1.bind(null, arg0, arg1, arg2, arg3, arg4)) : callback$1(arg0, arg1, arg2, arg3, arg4);
|
|
12329
12337
|
} finally {
|
|
12330
12338
|
setCurrentFiber(previousFiber);
|
|
12331
12339
|
}
|
|
@@ -13628,9 +13636,9 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
13628
13636
|
}
|
|
13629
13637
|
currentlyProcessingQueue = null;
|
|
13630
13638
|
}
|
|
13631
|
-
function callCallback(callback, context) {
|
|
13632
|
-
if ("function" !== typeof callback) throw Error("Invalid argument passed as callback. Expected a function. Instead received: " + callback);
|
|
13633
|
-
callback.call(context);
|
|
13639
|
+
function callCallback(callback$1, context) {
|
|
13640
|
+
if ("function" !== typeof callback$1) throw Error("Invalid argument passed as callback. Expected a function. Instead received: " + callback$1);
|
|
13641
|
+
callback$1.call(context);
|
|
13634
13642
|
}
|
|
13635
13643
|
function commitHiddenCallbacks(updateQueue, context) {
|
|
13636
13644
|
var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
|
|
@@ -14388,19 +14396,19 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
14388
14396
|
null === events ? componentUpdateQueue.events = [payload] : events.push(payload);
|
|
14389
14397
|
}
|
|
14390
14398
|
}
|
|
14391
|
-
function mountEvent(callback) {
|
|
14392
|
-
var hook = mountWorkInProgressHook(), ref$1 = { impl: callback };
|
|
14399
|
+
function mountEvent(callback$1) {
|
|
14400
|
+
var hook = mountWorkInProgressHook(), ref$1 = { impl: callback$1 };
|
|
14393
14401
|
hook.memoizedState = ref$1;
|
|
14394
14402
|
return function() {
|
|
14395
14403
|
if ((executionContext & RenderContext) !== NoContext) throw Error("A function wrapped in useEffectEvent can't be called during rendering.");
|
|
14396
14404
|
return ref$1.impl.apply(void 0, arguments);
|
|
14397
14405
|
};
|
|
14398
14406
|
}
|
|
14399
|
-
function updateEvent(callback) {
|
|
14407
|
+
function updateEvent(callback$1) {
|
|
14400
14408
|
var ref$1 = updateWorkInProgressHook().memoizedState;
|
|
14401
14409
|
useEffectEventImpl({
|
|
14402
14410
|
ref: ref$1,
|
|
14403
|
-
nextImpl: callback
|
|
14411
|
+
nextImpl: callback$1
|
|
14404
14412
|
});
|
|
14405
14413
|
return function() {
|
|
14406
14414
|
if ((executionContext & RenderContext) !== NoContext) throw Error("A function wrapped in useEffectEvent can't be called during rendering.");
|
|
@@ -14436,17 +14444,17 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
14436
14444
|
deps = null !== deps && void 0 !== deps ? deps.concat([ref$1]) : null;
|
|
14437
14445
|
updateEffectImpl(4, Layout, imperativeHandleEffect.bind(null, create$2, ref$1), deps);
|
|
14438
14446
|
}
|
|
14439
|
-
function mountCallback(callback, deps) {
|
|
14440
|
-
mountWorkInProgressHook().memoizedState = [callback, void 0 === deps ? null : deps];
|
|
14441
|
-
return callback;
|
|
14447
|
+
function mountCallback(callback$1, deps) {
|
|
14448
|
+
mountWorkInProgressHook().memoizedState = [callback$1, void 0 === deps ? null : deps];
|
|
14449
|
+
return callback$1;
|
|
14442
14450
|
}
|
|
14443
|
-
function updateCallback(callback, deps) {
|
|
14451
|
+
function updateCallback(callback$1, deps) {
|
|
14444
14452
|
var hook = updateWorkInProgressHook();
|
|
14445
14453
|
deps = void 0 === deps ? null : deps;
|
|
14446
14454
|
var prevState = hook.memoizedState;
|
|
14447
14455
|
if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0];
|
|
14448
|
-
hook.memoizedState = [callback, deps];
|
|
14449
|
-
return callback;
|
|
14456
|
+
hook.memoizedState = [callback$1, deps];
|
|
14457
|
+
return callback$1;
|
|
14450
14458
|
}
|
|
14451
14459
|
function mountMemo(nextCreate, deps) {
|
|
14452
14460
|
var hook = mountWorkInProgressHook();
|
|
@@ -14510,7 +14518,7 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
14510
14518
|
function releaseAsyncTransition() {
|
|
14511
14519
|
ReactSharedInternals$1.asyncTransitions--;
|
|
14512
14520
|
}
|
|
14513
|
-
function startTransition(fiber, queue, pendingState, finishedState, callback) {
|
|
14521
|
+
function startTransition(fiber, queue, pendingState, finishedState, callback$1) {
|
|
14514
14522
|
var previousPriority = getCurrentUpdatePriority();
|
|
14515
14523
|
setCurrentUpdatePriority(0 !== previousPriority && 8 > previousPriority ? previousPriority : 8);
|
|
14516
14524
|
var prevTransition = ReactSharedInternals$1.T, currentTransition = {};
|
|
@@ -14518,7 +14526,7 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
14518
14526
|
ReactSharedInternals$1.T = currentTransition;
|
|
14519
14527
|
dispatchOptimisticSetState(fiber, !1, queue, pendingState);
|
|
14520
14528
|
try {
|
|
14521
|
-
var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals$1.S;
|
|
14529
|
+
var returnValue = callback$1(), onStartTransitionFinish = ReactSharedInternals$1.S;
|
|
14522
14530
|
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
14523
14531
|
if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
|
|
14524
14532
|
ReactSharedInternals$1.asyncTransitions++;
|
|
@@ -14705,10 +14713,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
14705
14713
|
markRootEntangled(root$1, lane);
|
|
14706
14714
|
}
|
|
14707
14715
|
}
|
|
14708
|
-
function warnOnInvalidCallback(callback) {
|
|
14709
|
-
if (null !== callback && "function" !== typeof callback) {
|
|
14710
|
-
var key = String(callback);
|
|
14711
|
-
didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.", callback));
|
|
14716
|
+
function warnOnInvalidCallback(callback$1) {
|
|
14717
|
+
if (null !== callback$1 && "function" !== typeof callback$1) {
|
|
14718
|
+
var key = String(callback$1);
|
|
14719
|
+
didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.", callback$1));
|
|
14712
14720
|
}
|
|
14713
14721
|
}
|
|
14714
14722
|
function applyDerivedStateFromProps(workInProgress$1, ctor, getDerivedStateFromProps, nextProps) {
|
|
@@ -18374,9 +18382,9 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
18374
18382
|
addFiberToLanesMap(root$1, schedulingFiber, lanes);
|
|
18375
18383
|
});
|
|
18376
18384
|
}
|
|
18377
|
-
function scheduleCallback(priorityLevel, callback) {
|
|
18385
|
+
function scheduleCallback(priorityLevel, callback$1) {
|
|
18378
18386
|
var actQueue = ReactSharedInternals$1.actQueue;
|
|
18379
|
-
return null !== actQueue ? (actQueue.push(callback), fakeActCallbackNode) : scheduleCallback$3(priorityLevel, callback);
|
|
18387
|
+
return null !== actQueue ? (actQueue.push(callback$1), fakeActCallbackNode) : scheduleCallback$3(priorityLevel, callback$1);
|
|
18380
18388
|
}
|
|
18381
18389
|
function warnIfUpdatesNotWrappedWithActDEV(fiber) {
|
|
18382
18390
|
isConcurrentActEnvironment() && null === ReactSharedInternals$1.actQueue && runWithFiberInDEV(fiber, function() {
|
|
@@ -18655,11 +18663,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
18655
18663
|
parentComponent = emptyContextObject;
|
|
18656
18664
|
return parentComponent;
|
|
18657
18665
|
}
|
|
18658
|
-
function updateContainerSync(element, container, parentComponent, callback) {
|
|
18659
|
-
updateContainerImpl(container.current, 2, element, container, parentComponent, callback);
|
|
18666
|
+
function updateContainerSync(element, container, parentComponent, callback$1) {
|
|
18667
|
+
updateContainerImpl(container.current, 2, element, container, parentComponent, callback$1);
|
|
18660
18668
|
return 2;
|
|
18661
18669
|
}
|
|
18662
|
-
function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
|
|
18670
|
+
function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback$1) {
|
|
18663
18671
|
if (injectedHook && "function" === typeof injectedHook.onScheduleFiberRoot) try {
|
|
18664
18672
|
injectedHook.onScheduleFiberRoot(rendererID, container, element);
|
|
18665
18673
|
} catch (err) {
|
|
@@ -18670,8 +18678,8 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
18670
18678
|
isRendering && null !== current && !didWarnAboutNestedUpdates && (didWarnAboutNestedUpdates = !0, console.error("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.", getComponentNameFromFiber(current) || "Unknown"));
|
|
18671
18679
|
container = createUpdate(lane);
|
|
18672
18680
|
container.payload = { element };
|
|
18673
|
-
callback = void 0 === callback ? null : callback;
|
|
18674
|
-
null !== callback && ("function" !== typeof callback && console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.", callback), container.callback = callback);
|
|
18681
|
+
callback$1 = void 0 === callback$1 ? null : callback$1;
|
|
18682
|
+
null !== callback$1 && ("function" !== typeof callback$1 && console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.", callback$1), container.callback = callback$1);
|
|
18675
18683
|
element = enqueueUpdate(rootFiber, container, lane);
|
|
18676
18684
|
null !== element && (startUpdateTimerByLane(lane, "root.render()", null), scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
|
|
18677
18685
|
}
|
|
@@ -19016,11 +19024,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19016
19024
|
return readContext(context);
|
|
19017
19025
|
},
|
|
19018
19026
|
use,
|
|
19019
|
-
useCallback: function(callback, deps) {
|
|
19027
|
+
useCallback: function(callback$1, deps) {
|
|
19020
19028
|
currentHookNameInDev = "useCallback";
|
|
19021
19029
|
mountHookTypesDev();
|
|
19022
19030
|
checkDepsAreArrayDev(deps);
|
|
19023
|
-
return mountCallback(callback, deps);
|
|
19031
|
+
return mountCallback(callback$1, deps);
|
|
19024
19032
|
},
|
|
19025
19033
|
useContext: function(context) {
|
|
19026
19034
|
currentHookNameInDev = "useContext";
|
|
@@ -19137,10 +19145,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19137
19145
|
mountHookTypesDev();
|
|
19138
19146
|
return mountRefresh();
|
|
19139
19147
|
},
|
|
19140
|
-
useEffectEvent: function(callback) {
|
|
19148
|
+
useEffectEvent: function(callback$1) {
|
|
19141
19149
|
currentHookNameInDev = "useEffectEvent";
|
|
19142
19150
|
mountHookTypesDev();
|
|
19143
|
-
return mountEvent(callback);
|
|
19151
|
+
return mountEvent(callback$1);
|
|
19144
19152
|
}
|
|
19145
19153
|
};
|
|
19146
19154
|
HooksDispatcherOnMountWithHookTypesInDEV = {
|
|
@@ -19148,10 +19156,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19148
19156
|
return readContext(context);
|
|
19149
19157
|
},
|
|
19150
19158
|
use,
|
|
19151
|
-
useCallback: function(callback, deps) {
|
|
19159
|
+
useCallback: function(callback$1, deps) {
|
|
19152
19160
|
currentHookNameInDev = "useCallback";
|
|
19153
19161
|
updateHookTypesDev();
|
|
19154
|
-
return mountCallback(callback, deps);
|
|
19162
|
+
return mountCallback(callback$1, deps);
|
|
19155
19163
|
},
|
|
19156
19164
|
useContext: function(context) {
|
|
19157
19165
|
currentHookNameInDev = "useContext";
|
|
@@ -19263,10 +19271,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19263
19271
|
updateHookTypesDev();
|
|
19264
19272
|
return mountRefresh();
|
|
19265
19273
|
},
|
|
19266
|
-
useEffectEvent: function(callback) {
|
|
19274
|
+
useEffectEvent: function(callback$1) {
|
|
19267
19275
|
currentHookNameInDev = "useEffectEvent";
|
|
19268
19276
|
updateHookTypesDev();
|
|
19269
|
-
return mountEvent(callback);
|
|
19277
|
+
return mountEvent(callback$1);
|
|
19270
19278
|
}
|
|
19271
19279
|
};
|
|
19272
19280
|
HooksDispatcherOnUpdateInDEV = {
|
|
@@ -19274,10 +19282,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19274
19282
|
return readContext(context);
|
|
19275
19283
|
},
|
|
19276
19284
|
use,
|
|
19277
|
-
useCallback: function(callback, deps) {
|
|
19285
|
+
useCallback: function(callback$1, deps) {
|
|
19278
19286
|
currentHookNameInDev = "useCallback";
|
|
19279
19287
|
updateHookTypesDev();
|
|
19280
|
-
return updateCallback(callback, deps);
|
|
19288
|
+
return updateCallback(callback$1, deps);
|
|
19281
19289
|
},
|
|
19282
19290
|
useContext: function(context) {
|
|
19283
19291
|
currentHookNameInDev = "useContext";
|
|
@@ -19389,10 +19397,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19389
19397
|
updateHookTypesDev();
|
|
19390
19398
|
return updateWorkInProgressHook().memoizedState;
|
|
19391
19399
|
},
|
|
19392
|
-
useEffectEvent: function(callback) {
|
|
19400
|
+
useEffectEvent: function(callback$1) {
|
|
19393
19401
|
currentHookNameInDev = "useEffectEvent";
|
|
19394
19402
|
updateHookTypesDev();
|
|
19395
|
-
return updateEvent(callback);
|
|
19403
|
+
return updateEvent(callback$1);
|
|
19396
19404
|
}
|
|
19397
19405
|
};
|
|
19398
19406
|
HooksDispatcherOnRerenderInDEV = {
|
|
@@ -19400,10 +19408,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19400
19408
|
return readContext(context);
|
|
19401
19409
|
},
|
|
19402
19410
|
use,
|
|
19403
|
-
useCallback: function(callback, deps) {
|
|
19411
|
+
useCallback: function(callback$1, deps) {
|
|
19404
19412
|
currentHookNameInDev = "useCallback";
|
|
19405
19413
|
updateHookTypesDev();
|
|
19406
|
-
return updateCallback(callback, deps);
|
|
19414
|
+
return updateCallback(callback$1, deps);
|
|
19407
19415
|
},
|
|
19408
19416
|
useContext: function(context) {
|
|
19409
19417
|
currentHookNameInDev = "useContext";
|
|
@@ -19515,10 +19523,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19515
19523
|
updateHookTypesDev();
|
|
19516
19524
|
return updateWorkInProgressHook().memoizedState;
|
|
19517
19525
|
},
|
|
19518
|
-
useEffectEvent: function(callback) {
|
|
19526
|
+
useEffectEvent: function(callback$1) {
|
|
19519
19527
|
currentHookNameInDev = "useEffectEvent";
|
|
19520
19528
|
updateHookTypesDev();
|
|
19521
|
-
return updateEvent(callback);
|
|
19529
|
+
return updateEvent(callback$1);
|
|
19522
19530
|
}
|
|
19523
19531
|
};
|
|
19524
19532
|
InvalidNestedHooksDispatcherOnMountInDEV = {
|
|
@@ -19530,11 +19538,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19530
19538
|
warnInvalidHookAccess();
|
|
19531
19539
|
return use(usable);
|
|
19532
19540
|
},
|
|
19533
|
-
useCallback: function(callback, deps) {
|
|
19541
|
+
useCallback: function(callback$1, deps) {
|
|
19534
19542
|
currentHookNameInDev = "useCallback";
|
|
19535
19543
|
warnInvalidHookAccess();
|
|
19536
19544
|
mountHookTypesDev();
|
|
19537
|
-
return mountCallback(callback, deps);
|
|
19545
|
+
return mountCallback(callback$1, deps);
|
|
19538
19546
|
},
|
|
19539
19547
|
useContext: function(context) {
|
|
19540
19548
|
currentHookNameInDev = "useContext";
|
|
@@ -19665,11 +19673,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19665
19673
|
mountHookTypesDev();
|
|
19666
19674
|
return mountRefresh();
|
|
19667
19675
|
},
|
|
19668
|
-
useEffectEvent: function(callback) {
|
|
19676
|
+
useEffectEvent: function(callback$1) {
|
|
19669
19677
|
currentHookNameInDev = "useEffectEvent";
|
|
19670
19678
|
warnInvalidHookAccess();
|
|
19671
19679
|
mountHookTypesDev();
|
|
19672
|
-
return mountEvent(callback);
|
|
19680
|
+
return mountEvent(callback$1);
|
|
19673
19681
|
}
|
|
19674
19682
|
};
|
|
19675
19683
|
InvalidNestedHooksDispatcherOnUpdateInDEV = {
|
|
@@ -19681,11 +19689,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19681
19689
|
warnInvalidHookAccess();
|
|
19682
19690
|
return use(usable);
|
|
19683
19691
|
},
|
|
19684
|
-
useCallback: function(callback, deps) {
|
|
19692
|
+
useCallback: function(callback$1, deps) {
|
|
19685
19693
|
currentHookNameInDev = "useCallback";
|
|
19686
19694
|
warnInvalidHookAccess();
|
|
19687
19695
|
updateHookTypesDev();
|
|
19688
|
-
return updateCallback(callback, deps);
|
|
19696
|
+
return updateCallback(callback$1, deps);
|
|
19689
19697
|
},
|
|
19690
19698
|
useContext: function(context) {
|
|
19691
19699
|
currentHookNameInDev = "useContext";
|
|
@@ -19816,11 +19824,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19816
19824
|
updateHookTypesDev();
|
|
19817
19825
|
return updateWorkInProgressHook().memoizedState;
|
|
19818
19826
|
},
|
|
19819
|
-
useEffectEvent: function(callback) {
|
|
19827
|
+
useEffectEvent: function(callback$1) {
|
|
19820
19828
|
currentHookNameInDev = "useEffectEvent";
|
|
19821
19829
|
warnInvalidHookAccess();
|
|
19822
19830
|
updateHookTypesDev();
|
|
19823
|
-
return updateEvent(callback);
|
|
19831
|
+
return updateEvent(callback$1);
|
|
19824
19832
|
}
|
|
19825
19833
|
};
|
|
19826
19834
|
InvalidNestedHooksDispatcherOnRerenderInDEV = {
|
|
@@ -19832,11 +19840,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19832
19840
|
warnInvalidHookAccess();
|
|
19833
19841
|
return use(usable);
|
|
19834
19842
|
},
|
|
19835
|
-
useCallback: function(callback, deps) {
|
|
19843
|
+
useCallback: function(callback$1, deps) {
|
|
19836
19844
|
currentHookNameInDev = "useCallback";
|
|
19837
19845
|
warnInvalidHookAccess();
|
|
19838
19846
|
updateHookTypesDev();
|
|
19839
|
-
return updateCallback(callback, deps);
|
|
19847
|
+
return updateCallback(callback$1, deps);
|
|
19840
19848
|
},
|
|
19841
19849
|
useContext: function(context) {
|
|
19842
19850
|
currentHookNameInDev = "useContext";
|
|
@@ -19967,11 +19975,11 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19967
19975
|
updateHookTypesDev();
|
|
19968
19976
|
return updateWorkInProgressHook().memoizedState;
|
|
19969
19977
|
},
|
|
19970
|
-
useEffectEvent: function(callback) {
|
|
19978
|
+
useEffectEvent: function(callback$1) {
|
|
19971
19979
|
currentHookNameInDev = "useEffectEvent";
|
|
19972
19980
|
warnInvalidHookAccess();
|
|
19973
19981
|
updateHookTypesDev();
|
|
19974
|
-
return updateEvent(callback);
|
|
19982
|
+
return updateEvent(callback$1);
|
|
19975
19983
|
}
|
|
19976
19984
|
};
|
|
19977
19985
|
var fakeInternalInstance = {};
|
|
@@ -19987,30 +19995,30 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
19987
19995
|
var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
|
|
19988
19996
|
Object.freeze(fakeInternalInstance);
|
|
19989
19997
|
var classComponentUpdater = {
|
|
19990
|
-
enqueueSetState: function(inst, payload, callback) {
|
|
19998
|
+
enqueueSetState: function(inst, payload, callback$1) {
|
|
19991
19999
|
inst = inst._reactInternals;
|
|
19992
20000
|
var lane = requestUpdateLane(inst), update = createUpdate(lane);
|
|
19993
20001
|
update.payload = payload;
|
|
19994
|
-
void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
|
|
20002
|
+
void 0 !== callback$1 && null !== callback$1 && (warnOnInvalidCallback(callback$1), update.callback = callback$1);
|
|
19995
20003
|
payload = enqueueUpdate(inst, update, lane);
|
|
19996
20004
|
null !== payload && (startUpdateTimerByLane(lane, "this.setState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
|
|
19997
20005
|
},
|
|
19998
|
-
enqueueReplaceState: function(inst, payload, callback) {
|
|
20006
|
+
enqueueReplaceState: function(inst, payload, callback$1) {
|
|
19999
20007
|
inst = inst._reactInternals;
|
|
20000
20008
|
var lane = requestUpdateLane(inst), update = createUpdate(lane);
|
|
20001
20009
|
update.tag = ReplaceState;
|
|
20002
20010
|
update.payload = payload;
|
|
20003
|
-
void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
|
|
20011
|
+
void 0 !== callback$1 && null !== callback$1 && (warnOnInvalidCallback(callback$1), update.callback = callback$1);
|
|
20004
20012
|
payload = enqueueUpdate(inst, update, lane);
|
|
20005
20013
|
null !== payload && (startUpdateTimerByLane(lane, "this.replaceState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
|
|
20006
20014
|
},
|
|
20007
|
-
enqueueForceUpdate: function(inst, callback) {
|
|
20015
|
+
enqueueForceUpdate: function(inst, callback$1) {
|
|
20008
20016
|
inst = inst._reactInternals;
|
|
20009
20017
|
var lane = requestUpdateLane(inst), update = createUpdate(lane);
|
|
20010
20018
|
update.tag = ForceUpdate;
|
|
20011
|
-
void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
|
|
20012
|
-
callback = enqueueUpdate(inst, update, lane);
|
|
20013
|
-
null !== callback && (startUpdateTimerByLane(lane, "this.forceUpdate()", inst), scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
|
|
20019
|
+
void 0 !== callback$1 && null !== callback$1 && (warnOnInvalidCallback(callback$1), update.callback = callback$1);
|
|
20020
|
+
callback$1 = enqueueUpdate(inst, update, lane);
|
|
20021
|
+
null !== callback$1 && (startUpdateTimerByLane(lane, "this.forceUpdate()", inst), scheduleUpdateOnFiber(callback$1, inst, lane), entangleTransitions(callback$1, inst, lane));
|
|
20014
20022
|
}
|
|
20015
20023
|
}, componentName = null, errorBoundaryName = null, SelectiveHydrationException = Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."), didReceiveUpdate = !1;
|
|
20016
20024
|
var didWarnAboutBadClass = {};
|
|
@@ -20162,19 +20170,19 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
20162
20170
|
value: selectors
|
|
20163
20171
|
};
|
|
20164
20172
|
};
|
|
20165
|
-
exports$1.createHydrationContainer = function(initialChildren, callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, transitionCallbacks, formState) {
|
|
20173
|
+
exports$1.createHydrationContainer = function(initialChildren, callback$1, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, transitionCallbacks, formState) {
|
|
20166
20174
|
initialChildren = createFiberRoot(containerInfo, tag, !0, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator);
|
|
20167
20175
|
initialChildren.context = getContextForSubtree(null);
|
|
20168
20176
|
containerInfo = initialChildren.current;
|
|
20169
20177
|
tag = requestUpdateLane(containerInfo);
|
|
20170
20178
|
tag = getBumpedLaneForHydrationByLane(tag);
|
|
20171
20179
|
hydrationCallbacks = createUpdate(tag);
|
|
20172
|
-
hydrationCallbacks.callback = void 0 !== callback && null !== callback ? callback : null;
|
|
20180
|
+
hydrationCallbacks.callback = void 0 !== callback$1 && null !== callback$1 ? callback$1 : null;
|
|
20173
20181
|
enqueueUpdate(containerInfo, hydrationCallbacks, tag);
|
|
20174
20182
|
startUpdateTimerByLane(tag, "hydrateRoot()", null);
|
|
20175
|
-
callback = tag;
|
|
20176
|
-
initialChildren.current.lanes = callback;
|
|
20177
|
-
markRootUpdated$1(initialChildren, callback);
|
|
20183
|
+
callback$1 = tag;
|
|
20184
|
+
initialChildren.current.lanes = callback$1;
|
|
20185
|
+
markRootUpdated$1(initialChildren, callback$1);
|
|
20178
20186
|
ensureRootIsScheduled(initialChildren);
|
|
20179
20187
|
return initialChildren;
|
|
20180
20188
|
};
|
|
@@ -20207,10 +20215,10 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
20207
20215
|
value: id
|
|
20208
20216
|
};
|
|
20209
20217
|
};
|
|
20210
|
-
exports$1.createTextSelector = function(text) {
|
|
20218
|
+
exports$1.createTextSelector = function(text$1) {
|
|
20211
20219
|
return {
|
|
20212
20220
|
$$typeof: TEXT_TYPE,
|
|
20213
|
-
value: text
|
|
20221
|
+
value: text$1
|
|
20214
20222
|
};
|
|
20215
20223
|
};
|
|
20216
20224
|
exports$1.defaultOnCaughtError = function(error) {
|
|
@@ -20382,7 +20390,7 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
20382
20390
|
return injectInternals(internals);
|
|
20383
20391
|
};
|
|
20384
20392
|
exports$1.isAlreadyRendering = isAlreadyRendering;
|
|
20385
|
-
exports$1.observeVisibleRects = function(hostRoot, selectors, callback, options) {
|
|
20393
|
+
exports$1.observeVisibleRects = function(hostRoot, selectors, callback$1, options$2) {
|
|
20386
20394
|
function commitHook() {
|
|
20387
20395
|
var nextInstanceRoots = findAllNodes(hostRoot, selectors);
|
|
20388
20396
|
instanceRoots.forEach(function(target) {
|
|
@@ -20394,8 +20402,8 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
20394
20402
|
}
|
|
20395
20403
|
if (!supportsTestSelectors) throw Error("Test selector API is not supported by this renderer.");
|
|
20396
20404
|
var instanceRoots = findAllNodes(hostRoot, selectors);
|
|
20397
|
-
callback = setupIntersectionObserver(instanceRoots, callback, options);
|
|
20398
|
-
var disconnect = callback.disconnect, observe = callback.observe, unobserve = callback.unobserve;
|
|
20405
|
+
callback$1 = setupIntersectionObserver(instanceRoots, callback$1, options$2);
|
|
20406
|
+
var disconnect = callback$1.disconnect, observe = callback$1.observe, unobserve = callback$1.unobserve;
|
|
20399
20407
|
commitHooks.push(commitHook);
|
|
20400
20408
|
return { disconnect: function() {
|
|
20401
20409
|
var index = commitHooks.indexOf(commitHook);
|
|
@@ -20421,9 +20429,9 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJS({ "../../n
|
|
|
20421
20429
|
return action(formData);
|
|
20422
20430
|
});
|
|
20423
20431
|
};
|
|
20424
|
-
exports$1.updateContainer = function(element, container, parentComponent, callback) {
|
|
20432
|
+
exports$1.updateContainer = function(element, container, parentComponent, callback$1) {
|
|
20425
20433
|
var current$1 = container.current, lane = requestUpdateLane(current$1);
|
|
20426
|
-
updateContainerImpl(current$1, lane, element, container, parentComponent, callback);
|
|
20434
|
+
updateContainerImpl(current$1, lane, element, container, parentComponent, callback$1);
|
|
20427
20435
|
return lane;
|
|
20428
20436
|
};
|
|
20429
20437
|
exports$1.updateContainerSync = updateContainerSync;
|
|
@@ -20479,9 +20487,9 @@ function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
|
|
|
20479
20487
|
}
|
|
20480
20488
|
return extra;
|
|
20481
20489
|
}
|
|
20482
|
-
function stringWidth(input, options = {}) {
|
|
20490
|
+
function stringWidth(input, options$2 = {}) {
|
|
20483
20491
|
if (typeof input !== "string" || input.length === 0) return 0;
|
|
20484
|
-
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
20492
|
+
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options$2;
|
|
20485
20493
|
let string = input;
|
|
20486
20494
|
if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes(""))) string = stripAnsi(string);
|
|
20487
20495
|
if (string.length === 0) return 0;
|
|
@@ -20512,18 +20520,18 @@ function widestLine(string) {
|
|
|
20512
20520
|
//#endregion
|
|
20513
20521
|
//#region ../../node_modules/.bun/ink@6.8.0+4d40c05051311df7/node_modules/ink/build/measure-text.js
|
|
20514
20522
|
const cache$1 = /* @__PURE__ */ new Map();
|
|
20515
|
-
const measureText = (text) => {
|
|
20516
|
-
if (text.length === 0) return {
|
|
20523
|
+
const measureText = (text$1) => {
|
|
20524
|
+
if (text$1.length === 0) return {
|
|
20517
20525
|
width: 0,
|
|
20518
20526
|
height: 0
|
|
20519
20527
|
};
|
|
20520
|
-
const cachedDimensions = cache$1.get(text);
|
|
20528
|
+
const cachedDimensions = cache$1.get(text$1);
|
|
20521
20529
|
if (cachedDimensions) return cachedDimensions;
|
|
20522
20530
|
const dimensions = {
|
|
20523
|
-
width: widestLine(text),
|
|
20524
|
-
height: text.split("\n").length
|
|
20531
|
+
width: widestLine(text$1),
|
|
20532
|
+
height: text$1.split("\n").length
|
|
20525
20533
|
};
|
|
20526
|
-
cache$1.set(text, dimensions);
|
|
20534
|
+
cache$1.set(text$1, dimensions);
|
|
20527
20535
|
return dimensions;
|
|
20528
20536
|
};
|
|
20529
20537
|
var measure_text_default = measureText;
|
|
@@ -21215,14 +21223,14 @@ function getIndexOfNearestSpace(string, wantedIndex, shouldSearchRight) {
|
|
|
21215
21223
|
}
|
|
21216
21224
|
return wantedIndex;
|
|
21217
21225
|
}
|
|
21218
|
-
function cliTruncate(text, columns, options = {}) {
|
|
21219
|
-
const { position = "end", space = false, preferTruncationOnSpace = false } = options;
|
|
21220
|
-
let { truncationCharacter = "…" } = options;
|
|
21221
|
-
if (typeof text !== "string") throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`);
|
|
21226
|
+
function cliTruncate(text$1, columns, options$2 = {}) {
|
|
21227
|
+
const { position = "end", space = false, preferTruncationOnSpace = false } = options$2;
|
|
21228
|
+
let { truncationCharacter = "…" } = options$2;
|
|
21229
|
+
if (typeof text$1 !== "string") throw new TypeError(`Expected \`input\` to be a string, got ${typeof text$1}`);
|
|
21222
21230
|
if (typeof columns !== "number") throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`);
|
|
21223
21231
|
if (columns < 1) return "";
|
|
21224
|
-
const length = stringWidth(text);
|
|
21225
|
-
if (length <= columns) return text;
|
|
21232
|
+
const length = stringWidth(text$1);
|
|
21233
|
+
if (length <= columns) return text$1;
|
|
21226
21234
|
if (columns === 1) return truncationCharacter;
|
|
21227
21235
|
const ANSI = {
|
|
21228
21236
|
ESC: 27,
|
|
@@ -21268,27 +21276,27 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
21268
21276
|
}
|
|
21269
21277
|
if (position === "start") {
|
|
21270
21278
|
if (preferTruncationOnSpace) {
|
|
21271
|
-
const right$1 = sliceAnsi(text, getIndexOfNearestSpace(text, length - columns + 1, true), length).trim();
|
|
21279
|
+
const right$1 = sliceAnsi(text$1, getIndexOfNearestSpace(text$1, length - columns + 1, true), length).trim();
|
|
21272
21280
|
return prependWithInheritedStyleFromStart(truncationCharacter, right$1);
|
|
21273
21281
|
}
|
|
21274
21282
|
if (space) truncationCharacter += " ";
|
|
21275
|
-
const right = sliceAnsi(text, length - columns + stringWidth(truncationCharacter), length);
|
|
21283
|
+
const right = sliceAnsi(text$1, length - columns + stringWidth(truncationCharacter), length);
|
|
21276
21284
|
return prependWithInheritedStyleFromStart(truncationCharacter, right);
|
|
21277
21285
|
}
|
|
21278
21286
|
if (position === "middle") {
|
|
21279
21287
|
if (space) truncationCharacter = ` ${truncationCharacter} `;
|
|
21280
21288
|
const half = Math.floor(columns / 2);
|
|
21281
21289
|
if (preferTruncationOnSpace) {
|
|
21282
|
-
const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half);
|
|
21283
|
-
const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true);
|
|
21284
|
-
return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim();
|
|
21290
|
+
const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text$1, half);
|
|
21291
|
+
const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text$1, length - (columns - half) + 1, true);
|
|
21292
|
+
return sliceAnsi(text$1, 0, spaceNearFirstBreakPoint) + truncationCharacter + sliceAnsi(text$1, spaceNearSecondBreakPoint, length).trim();
|
|
21285
21293
|
}
|
|
21286
|
-
return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length);
|
|
21294
|
+
return sliceAnsi(text$1, 0, half) + truncationCharacter + sliceAnsi(text$1, length - (columns - half) + stringWidth(truncationCharacter), length);
|
|
21287
21295
|
}
|
|
21288
21296
|
if (position === "end") {
|
|
21289
|
-
if (preferTruncationOnSpace) return appendWithInheritedStyleFromEnd(sliceAnsi(text, 0, getIndexOfNearestSpace(text, columns - 1)), truncationCharacter);
|
|
21297
|
+
if (preferTruncationOnSpace) return appendWithInheritedStyleFromEnd(sliceAnsi(text$1, 0, getIndexOfNearestSpace(text$1, columns - 1)), truncationCharacter);
|
|
21290
21298
|
if (space) truncationCharacter = ` ${truncationCharacter}`;
|
|
21291
|
-
return appendWithInheritedStyleFromEnd(sliceAnsi(text, 0, columns - stringWidth(truncationCharacter)), truncationCharacter);
|
|
21299
|
+
return appendWithInheritedStyleFromEnd(sliceAnsi(text$1, 0, columns - stringWidth(truncationCharacter)), truncationCharacter);
|
|
21292
21300
|
}
|
|
21293
21301
|
throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`);
|
|
21294
21302
|
}
|
|
@@ -21296,12 +21304,12 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
21296
21304
|
//#endregion
|
|
21297
21305
|
//#region ../../node_modules/.bun/ink@6.8.0+4d40c05051311df7/node_modules/ink/build/wrap-text.js
|
|
21298
21306
|
const cache = {};
|
|
21299
|
-
const wrapText = (text, maxWidth, wrapType) => {
|
|
21300
|
-
const cacheKey = text + String(maxWidth) + String(wrapType);
|
|
21307
|
+
const wrapText = (text$1, maxWidth, wrapType) => {
|
|
21308
|
+
const cacheKey = text$1 + String(maxWidth) + String(wrapType);
|
|
21301
21309
|
const cachedText = cache[cacheKey];
|
|
21302
21310
|
if (cachedText) return cachedText;
|
|
21303
|
-
let wrappedText = text;
|
|
21304
|
-
if (wrapType === "wrap") wrappedText = wrapAnsi(text, maxWidth, {
|
|
21311
|
+
let wrappedText = text$1;
|
|
21312
|
+
if (wrapType === "wrap") wrappedText = wrapAnsi(text$1, maxWidth, {
|
|
21305
21313
|
trim: false,
|
|
21306
21314
|
hard: true
|
|
21307
21315
|
});
|
|
@@ -21309,7 +21317,7 @@ const wrapText = (text, maxWidth, wrapType) => {
|
|
|
21309
21317
|
let position = "end";
|
|
21310
21318
|
if (wrapType === "truncate-middle") position = "middle";
|
|
21311
21319
|
if (wrapType === "truncate-start") position = "start";
|
|
21312
|
-
wrappedText = cliTruncate(text, maxWidth, { position });
|
|
21320
|
+
wrappedText = cliTruncate(text$1, maxWidth, { position });
|
|
21313
21321
|
}
|
|
21314
21322
|
cache[cacheKey] = wrappedText;
|
|
21315
21323
|
return wrappedText;
|
|
@@ -21351,22 +21359,22 @@ const isC1ControlCharacter = (character) => {
|
|
|
21351
21359
|
const codePoint = character.codePointAt(0);
|
|
21352
21360
|
return codePoint !== void 0 && codePoint >= 128 && codePoint <= 159;
|
|
21353
21361
|
};
|
|
21354
|
-
const readCsiSequence = (text, fromIndex) => {
|
|
21362
|
+
const readCsiSequence = (text$1, fromIndex) => {
|
|
21355
21363
|
let index = fromIndex;
|
|
21356
|
-
while (index < text.length) {
|
|
21357
|
-
const character = text[index];
|
|
21364
|
+
while (index < text$1.length) {
|
|
21365
|
+
const character = text$1[index];
|
|
21358
21366
|
if (!isCsiParameterCharacter(character)) break;
|
|
21359
21367
|
index++;
|
|
21360
21368
|
}
|
|
21361
|
-
const parameterString = text.slice(fromIndex, index);
|
|
21369
|
+
const parameterString = text$1.slice(fromIndex, index);
|
|
21362
21370
|
const intermediateStartIndex = index;
|
|
21363
|
-
while (index < text.length) {
|
|
21364
|
-
const character = text[index];
|
|
21371
|
+
while (index < text$1.length) {
|
|
21372
|
+
const character = text$1[index];
|
|
21365
21373
|
if (!isCsiIntermediateCharacter(character)) break;
|
|
21366
21374
|
index++;
|
|
21367
21375
|
}
|
|
21368
|
-
const intermediateString = text.slice(intermediateStartIndex, index);
|
|
21369
|
-
const finalCharacter = text[index];
|
|
21376
|
+
const intermediateString = text$1.slice(intermediateStartIndex, index);
|
|
21377
|
+
const finalCharacter = text$1[index];
|
|
21370
21378
|
if (finalCharacter === void 0 || !isCsiFinalCharacter(finalCharacter)) return;
|
|
21371
21379
|
return {
|
|
21372
21380
|
endIndex: index + 1,
|
|
@@ -21375,13 +21383,13 @@ const readCsiSequence = (text, fromIndex) => {
|
|
|
21375
21383
|
finalCharacter
|
|
21376
21384
|
};
|
|
21377
21385
|
};
|
|
21378
|
-
const findControlStringTerminatorIndex = (text, fromIndex, allowBellTerminator) => {
|
|
21379
|
-
for (let index = fromIndex; index < text.length; index++) {
|
|
21380
|
-
const character = text[index];
|
|
21386
|
+
const findControlStringTerminatorIndex = (text$1, fromIndex, allowBellTerminator) => {
|
|
21387
|
+
for (let index = fromIndex; index < text$1.length; index++) {
|
|
21388
|
+
const character = text$1[index];
|
|
21381
21389
|
if (allowBellTerminator && character === bellCharacter) return index + 1;
|
|
21382
21390
|
if (character === stringTerminatorCharacter) return index + 1;
|
|
21383
21391
|
if (character === escapeCharacter) {
|
|
21384
|
-
const followingCharacter = text[index + 1];
|
|
21392
|
+
const followingCharacter = text$1[index + 1];
|
|
21385
21393
|
if (followingCharacter === escapeCharacter) {
|
|
21386
21394
|
index++;
|
|
21387
21395
|
continue;
|
|
@@ -21390,15 +21398,15 @@ const findControlStringTerminatorIndex = (text, fromIndex, allowBellTerminator)
|
|
|
21390
21398
|
}
|
|
21391
21399
|
}
|
|
21392
21400
|
};
|
|
21393
|
-
const readEscapeSequence = (text, fromIndex) => {
|
|
21401
|
+
const readEscapeSequence = (text$1, fromIndex) => {
|
|
21394
21402
|
let index = fromIndex;
|
|
21395
|
-
while (index < text.length) {
|
|
21396
|
-
const character = text[index];
|
|
21403
|
+
while (index < text$1.length) {
|
|
21404
|
+
const character = text$1[index];
|
|
21397
21405
|
if (!isEscapeIntermediateCharacter(character)) break;
|
|
21398
21406
|
index++;
|
|
21399
21407
|
}
|
|
21400
|
-
const intermediateString = text.slice(fromIndex, index);
|
|
21401
|
-
const finalCharacter = text[index];
|
|
21408
|
+
const intermediateString = text$1.slice(fromIndex, index);
|
|
21409
|
+
const finalCharacter = text$1[index];
|
|
21402
21410
|
if (finalCharacter === void 0 || !isEscapeFinalCharacter(finalCharacter)) return;
|
|
21403
21411
|
return {
|
|
21404
21412
|
endIndex: index + 1,
|
|
@@ -21456,45 +21464,45 @@ const getControlStringFromC1Introducer = (character) => {
|
|
|
21456
21464
|
default: return;
|
|
21457
21465
|
}
|
|
21458
21466
|
};
|
|
21459
|
-
const hasAnsiControlCharacters = (text) => {
|
|
21460
|
-
if (text.includes(escapeCharacter)) return true;
|
|
21461
|
-
for (const character of text) if (isC1ControlCharacter(character)) return true;
|
|
21467
|
+
const hasAnsiControlCharacters = (text$1) => {
|
|
21468
|
+
if (text$1.includes(escapeCharacter)) return true;
|
|
21469
|
+
for (const character of text$1) if (isC1ControlCharacter(character)) return true;
|
|
21462
21470
|
return false;
|
|
21463
21471
|
};
|
|
21464
|
-
const malformedFromIndex = (tokens, text, textStartIndex, fromIndex) => {
|
|
21472
|
+
const malformedFromIndex = (tokens, text$1, textStartIndex, fromIndex) => {
|
|
21465
21473
|
if (fromIndex > textStartIndex) tokens.push({
|
|
21466
21474
|
type: "text",
|
|
21467
|
-
value: text.slice(textStartIndex, fromIndex)
|
|
21475
|
+
value: text$1.slice(textStartIndex, fromIndex)
|
|
21468
21476
|
});
|
|
21469
21477
|
tokens.push({
|
|
21470
21478
|
type: "invalid",
|
|
21471
|
-
value: text.slice(fromIndex)
|
|
21479
|
+
value: text$1.slice(fromIndex)
|
|
21472
21480
|
});
|
|
21473
21481
|
return tokens;
|
|
21474
21482
|
};
|
|
21475
|
-
const tokenizeAnsi = (text) => {
|
|
21476
|
-
if (!hasAnsiControlCharacters(text)) return [{
|
|
21483
|
+
const tokenizeAnsi = (text$1) => {
|
|
21484
|
+
if (!hasAnsiControlCharacters(text$1)) return [{
|
|
21477
21485
|
type: "text",
|
|
21478
|
-
value: text
|
|
21486
|
+
value: text$1
|
|
21479
21487
|
}];
|
|
21480
21488
|
const tokens = [];
|
|
21481
21489
|
let textStartIndex = 0;
|
|
21482
|
-
for (let index = 0; index < text.length;) {
|
|
21483
|
-
const character = text[index];
|
|
21490
|
+
for (let index = 0; index < text$1.length;) {
|
|
21491
|
+
const character = text$1[index];
|
|
21484
21492
|
if (character === void 0) break;
|
|
21485
21493
|
if (character === escapeCharacter) {
|
|
21486
|
-
const followingCharacter = text[index + 1];
|
|
21487
|
-
if (followingCharacter === void 0) return malformedFromIndex(tokens, text, textStartIndex, index);
|
|
21494
|
+
const followingCharacter = text$1[index + 1];
|
|
21495
|
+
if (followingCharacter === void 0) return malformedFromIndex(tokens, text$1, textStartIndex, index);
|
|
21488
21496
|
if (followingCharacter === "[") {
|
|
21489
|
-
const csiSequence = readCsiSequence(text, index + 2);
|
|
21490
|
-
if (csiSequence === void 0) return malformedFromIndex(tokens, text, textStartIndex, index);
|
|
21497
|
+
const csiSequence = readCsiSequence(text$1, index + 2);
|
|
21498
|
+
if (csiSequence === void 0) return malformedFromIndex(tokens, text$1, textStartIndex, index);
|
|
21491
21499
|
if (index > textStartIndex) tokens.push({
|
|
21492
21500
|
type: "text",
|
|
21493
|
-
value: text.slice(textStartIndex, index)
|
|
21501
|
+
value: text$1.slice(textStartIndex, index)
|
|
21494
21502
|
});
|
|
21495
21503
|
tokens.push({
|
|
21496
21504
|
type: "csi",
|
|
21497
|
-
value: text.slice(index, csiSequence.endIndex),
|
|
21505
|
+
value: text$1.slice(index, csiSequence.endIndex),
|
|
21498
21506
|
parameterString: csiSequence.parameterString,
|
|
21499
21507
|
intermediateString: csiSequence.intermediateString,
|
|
21500
21508
|
finalCharacter: csiSequence.finalCharacter
|
|
@@ -21505,26 +21513,26 @@ const tokenizeAnsi = (text) => {
|
|
|
21505
21513
|
}
|
|
21506
21514
|
const escapeControlString = getControlStringFromEscapeIntroducer(followingCharacter);
|
|
21507
21515
|
if (escapeControlString !== void 0) {
|
|
21508
|
-
const controlStringTerminatorIndex = findControlStringTerminatorIndex(text, index + 2, escapeControlString.allowBellTerminator);
|
|
21509
|
-
if (controlStringTerminatorIndex === void 0) return malformedFromIndex(tokens, text, textStartIndex, index);
|
|
21516
|
+
const controlStringTerminatorIndex = findControlStringTerminatorIndex(text$1, index + 2, escapeControlString.allowBellTerminator);
|
|
21517
|
+
if (controlStringTerminatorIndex === void 0) return malformedFromIndex(tokens, text$1, textStartIndex, index);
|
|
21510
21518
|
if (index > textStartIndex) tokens.push({
|
|
21511
21519
|
type: "text",
|
|
21512
|
-
value: text.slice(textStartIndex, index)
|
|
21520
|
+
value: text$1.slice(textStartIndex, index)
|
|
21513
21521
|
});
|
|
21514
21522
|
tokens.push({
|
|
21515
21523
|
type: escapeControlString.type,
|
|
21516
|
-
value: text.slice(index, controlStringTerminatorIndex)
|
|
21524
|
+
value: text$1.slice(index, controlStringTerminatorIndex)
|
|
21517
21525
|
});
|
|
21518
21526
|
index = controlStringTerminatorIndex;
|
|
21519
21527
|
textStartIndex = index;
|
|
21520
21528
|
continue;
|
|
21521
21529
|
}
|
|
21522
|
-
const escapeSequence = readEscapeSequence(text, index + 1);
|
|
21530
|
+
const escapeSequence = readEscapeSequence(text$1, index + 1);
|
|
21523
21531
|
if (escapeSequence === void 0) {
|
|
21524
|
-
if (isEscapeIntermediateCharacter(followingCharacter)) return malformedFromIndex(tokens, text, textStartIndex, index);
|
|
21532
|
+
if (isEscapeIntermediateCharacter(followingCharacter)) return malformedFromIndex(tokens, text$1, textStartIndex, index);
|
|
21525
21533
|
if (index > textStartIndex) tokens.push({
|
|
21526
21534
|
type: "text",
|
|
21527
|
-
value: text.slice(textStartIndex, index)
|
|
21535
|
+
value: text$1.slice(textStartIndex, index)
|
|
21528
21536
|
});
|
|
21529
21537
|
index++;
|
|
21530
21538
|
textStartIndex = index;
|
|
@@ -21532,11 +21540,11 @@ const tokenizeAnsi = (text) => {
|
|
|
21532
21540
|
}
|
|
21533
21541
|
if (index > textStartIndex) tokens.push({
|
|
21534
21542
|
type: "text",
|
|
21535
|
-
value: text.slice(textStartIndex, index)
|
|
21543
|
+
value: text$1.slice(textStartIndex, index)
|
|
21536
21544
|
});
|
|
21537
21545
|
tokens.push({
|
|
21538
21546
|
type: "esc",
|
|
21539
|
-
value: text.slice(index, escapeSequence.endIndex),
|
|
21547
|
+
value: text$1.slice(index, escapeSequence.endIndex),
|
|
21540
21548
|
intermediateString: escapeSequence.intermediateString,
|
|
21541
21549
|
finalCharacter: escapeSequence.finalCharacter
|
|
21542
21550
|
});
|
|
@@ -21545,15 +21553,15 @@ const tokenizeAnsi = (text) => {
|
|
|
21545
21553
|
continue;
|
|
21546
21554
|
}
|
|
21547
21555
|
if (character === csiCharacter) {
|
|
21548
|
-
const csiSequence = readCsiSequence(text, index + 1);
|
|
21549
|
-
if (csiSequence === void 0) return malformedFromIndex(tokens, text, textStartIndex, index);
|
|
21556
|
+
const csiSequence = readCsiSequence(text$1, index + 1);
|
|
21557
|
+
if (csiSequence === void 0) return malformedFromIndex(tokens, text$1, textStartIndex, index);
|
|
21550
21558
|
if (index > textStartIndex) tokens.push({
|
|
21551
21559
|
type: "text",
|
|
21552
|
-
value: text.slice(textStartIndex, index)
|
|
21560
|
+
value: text$1.slice(textStartIndex, index)
|
|
21553
21561
|
});
|
|
21554
21562
|
tokens.push({
|
|
21555
21563
|
type: "csi",
|
|
21556
|
-
value: text.slice(index, csiSequence.endIndex),
|
|
21564
|
+
value: text$1.slice(index, csiSequence.endIndex),
|
|
21557
21565
|
parameterString: csiSequence.parameterString,
|
|
21558
21566
|
intermediateString: csiSequence.intermediateString,
|
|
21559
21567
|
finalCharacter: csiSequence.finalCharacter
|
|
@@ -21564,15 +21572,15 @@ const tokenizeAnsi = (text) => {
|
|
|
21564
21572
|
}
|
|
21565
21573
|
const c1ControlString = getControlStringFromC1Introducer(character);
|
|
21566
21574
|
if (c1ControlString !== void 0) {
|
|
21567
|
-
const controlStringTerminatorIndex = findControlStringTerminatorIndex(text, index + 1, c1ControlString.allowBellTerminator);
|
|
21568
|
-
if (controlStringTerminatorIndex === void 0) return malformedFromIndex(tokens, text, textStartIndex, index);
|
|
21575
|
+
const controlStringTerminatorIndex = findControlStringTerminatorIndex(text$1, index + 1, c1ControlString.allowBellTerminator);
|
|
21576
|
+
if (controlStringTerminatorIndex === void 0) return malformedFromIndex(tokens, text$1, textStartIndex, index);
|
|
21569
21577
|
if (index > textStartIndex) tokens.push({
|
|
21570
21578
|
type: "text",
|
|
21571
|
-
value: text.slice(textStartIndex, index)
|
|
21579
|
+
value: text$1.slice(textStartIndex, index)
|
|
21572
21580
|
});
|
|
21573
21581
|
tokens.push({
|
|
21574
21582
|
type: c1ControlString.type,
|
|
21575
|
-
value: text.slice(index, controlStringTerminatorIndex)
|
|
21583
|
+
value: text$1.slice(index, controlStringTerminatorIndex)
|
|
21576
21584
|
});
|
|
21577
21585
|
index = controlStringTerminatorIndex;
|
|
21578
21586
|
textStartIndex = index;
|
|
@@ -21581,7 +21589,7 @@ const tokenizeAnsi = (text) => {
|
|
|
21581
21589
|
if (character === stringTerminatorCharacter) {
|
|
21582
21590
|
if (index > textStartIndex) tokens.push({
|
|
21583
21591
|
type: "text",
|
|
21584
|
-
value: text.slice(textStartIndex, index)
|
|
21592
|
+
value: text$1.slice(textStartIndex, index)
|
|
21585
21593
|
});
|
|
21586
21594
|
tokens.push({
|
|
21587
21595
|
type: "st",
|
|
@@ -21594,7 +21602,7 @@ const tokenizeAnsi = (text) => {
|
|
|
21594
21602
|
if (isC1ControlCharacter(character)) {
|
|
21595
21603
|
if (index > textStartIndex) tokens.push({
|
|
21596
21604
|
type: "text",
|
|
21597
|
-
value: text.slice(textStartIndex, index)
|
|
21605
|
+
value: text$1.slice(textStartIndex, index)
|
|
21598
21606
|
});
|
|
21599
21607
|
tokens.push({
|
|
21600
21608
|
type: "c1",
|
|
@@ -21606,9 +21614,9 @@ const tokenizeAnsi = (text) => {
|
|
|
21606
21614
|
}
|
|
21607
21615
|
index++;
|
|
21608
21616
|
}
|
|
21609
|
-
if (textStartIndex < text.length) tokens.push({
|
|
21617
|
+
if (textStartIndex < text$1.length) tokens.push({
|
|
21610
21618
|
type: "text",
|
|
21611
|
-
value: text.slice(textStartIndex)
|
|
21619
|
+
value: text$1.slice(textStartIndex)
|
|
21612
21620
|
});
|
|
21613
21621
|
return tokens;
|
|
21614
21622
|
};
|
|
@@ -21616,10 +21624,10 @@ const tokenizeAnsi = (text) => {
|
|
|
21616
21624
|
//#endregion
|
|
21617
21625
|
//#region ../../node_modules/.bun/ink@6.8.0+4d40c05051311df7/node_modules/ink/build/sanitize-ansi.js
|
|
21618
21626
|
const sgrParametersRegex = /^[\d:;]*$/;
|
|
21619
|
-
const sanitizeAnsi = (text) => {
|
|
21620
|
-
if (!hasAnsiControlCharacters(text)) return text;
|
|
21627
|
+
const sanitizeAnsi = (text$1) => {
|
|
21628
|
+
if (!hasAnsiControlCharacters(text$1)) return text$1;
|
|
21621
21629
|
let output = "";
|
|
21622
|
-
for (const token of tokenizeAnsi(text)) {
|
|
21630
|
+
for (const token of tokenizeAnsi(text$1)) {
|
|
21623
21631
|
if (token.type === "text" || token.type === "osc") {
|
|
21624
21632
|
output += token.value;
|
|
21625
21633
|
continue;
|
|
@@ -21633,7 +21641,7 @@ var sanitize_ansi_default = sanitizeAnsi;
|
|
|
21633
21641
|
//#endregion
|
|
21634
21642
|
//#region ../../node_modules/.bun/ink@6.8.0+4d40c05051311df7/node_modules/ink/build/squash-text-nodes.js
|
|
21635
21643
|
const squashTextNodes = (node) => {
|
|
21636
|
-
let text = "";
|
|
21644
|
+
let text$1 = "";
|
|
21637
21645
|
for (let index = 0; index < node.childNodes.length; index++) {
|
|
21638
21646
|
const childNode = node.childNodes[index];
|
|
21639
21647
|
if (childNode === void 0) continue;
|
|
@@ -21643,9 +21651,9 @@ const squashTextNodes = (node) => {
|
|
|
21643
21651
|
if (childNode.nodeName === "ink-text" || childNode.nodeName === "ink-virtual-text") nodeText = squashTextNodes(childNode);
|
|
21644
21652
|
if (nodeText.length > 0 && typeof childNode.internal_transform === "function") nodeText = childNode.internal_transform(nodeText, index);
|
|
21645
21653
|
}
|
|
21646
|
-
text += nodeText;
|
|
21654
|
+
text$1 += nodeText;
|
|
21647
21655
|
}
|
|
21648
|
-
return sanitize_ansi_default(text);
|
|
21656
|
+
return sanitize_ansi_default(text$1);
|
|
21649
21657
|
};
|
|
21650
21658
|
var squash_text_nodes_default = squashTextNodes;
|
|
21651
21659
|
|
|
@@ -21701,23 +21709,23 @@ const setAttribute = (node, key, value) => {
|
|
|
21701
21709
|
const setStyle = (node, style) => {
|
|
21702
21710
|
node.style = style;
|
|
21703
21711
|
};
|
|
21704
|
-
const createTextNode = (text) => {
|
|
21712
|
+
const createTextNode = (text$1) => {
|
|
21705
21713
|
const node = {
|
|
21706
21714
|
nodeName: "#text",
|
|
21707
|
-
nodeValue: text,
|
|
21715
|
+
nodeValue: text$1,
|
|
21708
21716
|
yogaNode: void 0,
|
|
21709
21717
|
parentNode: void 0,
|
|
21710
21718
|
style: {}
|
|
21711
21719
|
};
|
|
21712
|
-
setTextNodeValue(node, text);
|
|
21720
|
+
setTextNodeValue(node, text$1);
|
|
21713
21721
|
return node;
|
|
21714
21722
|
};
|
|
21715
21723
|
const measureTextNode = function(node, width) {
|
|
21716
|
-
const text = node.nodeName === "#text" ? node.nodeValue : squash_text_nodes_default(node);
|
|
21717
|
-
const dimensions = measure_text_default(text);
|
|
21724
|
+
const text$1 = node.nodeName === "#text" ? node.nodeValue : squash_text_nodes_default(node);
|
|
21725
|
+
const dimensions = measure_text_default(text$1);
|
|
21718
21726
|
if (dimensions.width <= width) return dimensions;
|
|
21719
21727
|
if (dimensions.width >= 1 && width > 0 && width < 1) return dimensions;
|
|
21720
|
-
return measure_text_default(wrap_text_default(text, width, node.style?.textWrap ?? "wrap"));
|
|
21728
|
+
return measure_text_default(wrap_text_default(text$1, width, node.style?.textWrap ?? "wrap"));
|
|
21721
21729
|
};
|
|
21722
21730
|
const findClosestYogaNode = (node) => {
|
|
21723
21731
|
if (!node?.parentNode) return;
|
|
@@ -21726,9 +21734,9 @@ const findClosestYogaNode = (node) => {
|
|
|
21726
21734
|
const markNodeAsDirty = (node) => {
|
|
21727
21735
|
findClosestYogaNode(node)?.markDirty();
|
|
21728
21736
|
};
|
|
21729
|
-
const setTextNodeValue = (node, text) => {
|
|
21730
|
-
if (typeof text !== "string") text = String(text);
|
|
21731
|
-
node.nodeValue = text;
|
|
21737
|
+
const setTextNodeValue = (node, text$1) => {
|
|
21738
|
+
if (typeof text$1 !== "string") text$1 = String(text$1);
|
|
21739
|
+
node.nodeValue = text$1;
|
|
21732
21740
|
markNodeAsDirty(node);
|
|
21733
21741
|
};
|
|
21734
21742
|
|
|
@@ -22059,8 +22067,8 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22059
22067
|
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
|
|
22060
22068
|
* inflate
|
|
22061
22069
|
*/
|
|
22062
|
-
constructor(options) {
|
|
22063
|
-
this._options = options || {};
|
|
22070
|
+
constructor(options$2) {
|
|
22071
|
+
this._options = options$2 || {};
|
|
22064
22072
|
this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
|
|
22065
22073
|
this._maxPayload = this._options.maxPayload | 0;
|
|
22066
22074
|
this._isServer = !!this._options.isServer;
|
|
@@ -22113,10 +22121,10 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22113
22121
|
this._inflate = null;
|
|
22114
22122
|
}
|
|
22115
22123
|
if (this._deflate) {
|
|
22116
|
-
const callback = this._deflate[kCallback];
|
|
22124
|
+
const callback$1 = this._deflate[kCallback];
|
|
22117
22125
|
this._deflate.close();
|
|
22118
22126
|
this._deflate = null;
|
|
22119
|
-
if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
|
|
22127
|
+
if (callback$1) callback$1(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
|
|
22120
22128
|
}
|
|
22121
22129
|
}
|
|
22122
22130
|
/**
|
|
@@ -22194,11 +22202,11 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22194
22202
|
* @param {Function} callback Callback
|
|
22195
22203
|
* @public
|
|
22196
22204
|
*/
|
|
22197
|
-
decompress(data, fin, callback) {
|
|
22205
|
+
decompress(data, fin, callback$1) {
|
|
22198
22206
|
zlibLimiter.add((done) => {
|
|
22199
22207
|
this._decompress(data, fin, (err, result) => {
|
|
22200
22208
|
done();
|
|
22201
|
-
callback(err, result);
|
|
22209
|
+
callback$1(err, result);
|
|
22202
22210
|
});
|
|
22203
22211
|
});
|
|
22204
22212
|
}
|
|
@@ -22210,11 +22218,11 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22210
22218
|
* @param {Function} callback Callback
|
|
22211
22219
|
* @public
|
|
22212
22220
|
*/
|
|
22213
|
-
compress(data, fin, callback) {
|
|
22221
|
+
compress(data, fin, callback$1) {
|
|
22214
22222
|
zlibLimiter.add((done) => {
|
|
22215
22223
|
this._compress(data, fin, (err, result) => {
|
|
22216
22224
|
done();
|
|
22217
|
-
callback(err, result);
|
|
22225
|
+
callback$1(err, result);
|
|
22218
22226
|
});
|
|
22219
22227
|
});
|
|
22220
22228
|
}
|
|
@@ -22226,7 +22234,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22226
22234
|
* @param {Function} callback Callback
|
|
22227
22235
|
* @private
|
|
22228
22236
|
*/
|
|
22229
|
-
_decompress(data, fin, callback) {
|
|
22237
|
+
_decompress(data, fin, callback$1) {
|
|
22230
22238
|
const endpoint = this._isServer ? "client" : "server";
|
|
22231
22239
|
if (!this._inflate) {
|
|
22232
22240
|
const key = `${endpoint}_max_window_bits`;
|
|
@@ -22241,7 +22249,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22241
22249
|
this._inflate.on("error", inflateOnError);
|
|
22242
22250
|
this._inflate.on("data", inflateOnData);
|
|
22243
22251
|
}
|
|
22244
|
-
this._inflate[kCallback] = callback;
|
|
22252
|
+
this._inflate[kCallback] = callback$1;
|
|
22245
22253
|
this._inflate.write(data);
|
|
22246
22254
|
if (fin) this._inflate.write(TRAILER);
|
|
22247
22255
|
this._inflate.flush(() => {
|
|
@@ -22249,7 +22257,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22249
22257
|
if (err) {
|
|
22250
22258
|
this._inflate.close();
|
|
22251
22259
|
this._inflate = null;
|
|
22252
|
-
callback(err);
|
|
22260
|
+
callback$1(err);
|
|
22253
22261
|
return;
|
|
22254
22262
|
}
|
|
22255
22263
|
const data$1 = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]);
|
|
@@ -22261,7 +22269,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22261
22269
|
this._inflate[kBuffers] = [];
|
|
22262
22270
|
if (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset();
|
|
22263
22271
|
}
|
|
22264
|
-
callback(null, data$1);
|
|
22272
|
+
callback$1(null, data$1);
|
|
22265
22273
|
});
|
|
22266
22274
|
}
|
|
22267
22275
|
/**
|
|
@@ -22272,7 +22280,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22272
22280
|
* @param {Function} callback Callback
|
|
22273
22281
|
* @private
|
|
22274
22282
|
*/
|
|
22275
|
-
_compress(data, fin, callback) {
|
|
22283
|
+
_compress(data, fin, callback$1) {
|
|
22276
22284
|
const endpoint = this._isServer ? "server" : "client";
|
|
22277
22285
|
if (!this._deflate) {
|
|
22278
22286
|
const key = `${endpoint}_max_window_bits`;
|
|
@@ -22285,7 +22293,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22285
22293
|
this._deflate[kBuffers] = [];
|
|
22286
22294
|
this._deflate.on("data", deflateOnData);
|
|
22287
22295
|
}
|
|
22288
|
-
this._deflate[kCallback] = callback;
|
|
22296
|
+
this._deflate[kCallback] = callback$1;
|
|
22289
22297
|
this._deflate.write(data);
|
|
22290
22298
|
this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
|
|
22291
22299
|
if (!this._deflate) return;
|
|
@@ -22295,7 +22303,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
22295
22303
|
this._deflate[kTotalLength] = 0;
|
|
22296
22304
|
this._deflate[kBuffers] = [];
|
|
22297
22305
|
if (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset();
|
|
22298
|
-
callback(null, data$1);
|
|
22306
|
+
callback$1(null, data$1);
|
|
22299
22307
|
});
|
|
22300
22308
|
}
|
|
22301
22309
|
};
|
|
@@ -22580,14 +22588,14 @@ var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@
|
|
|
22580
22588
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
22581
22589
|
* not to skip UTF-8 validation for text and close messages
|
|
22582
22590
|
*/
|
|
22583
|
-
constructor(options = {}) {
|
|
22591
|
+
constructor(options$2 = {}) {
|
|
22584
22592
|
super();
|
|
22585
|
-
this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true;
|
|
22586
|
-
this._binaryType = options.binaryType || BINARY_TYPES$1[0];
|
|
22587
|
-
this._extensions = options.extensions || {};
|
|
22588
|
-
this._isServer = !!options.isServer;
|
|
22589
|
-
this._maxPayload = options.maxPayload | 0;
|
|
22590
|
-
this._skipUTF8Validation = !!options.skipUTF8Validation;
|
|
22593
|
+
this._allowSynchronousEvents = options$2.allowSynchronousEvents !== void 0 ? options$2.allowSynchronousEvents : true;
|
|
22594
|
+
this._binaryType = options$2.binaryType || BINARY_TYPES$1[0];
|
|
22595
|
+
this._extensions = options$2.extensions || {};
|
|
22596
|
+
this._isServer = !!options$2.isServer;
|
|
22597
|
+
this._maxPayload = options$2.maxPayload | 0;
|
|
22598
|
+
this._skipUTF8Validation = !!options$2.skipUTF8Validation;
|
|
22591
22599
|
this[kWebSocket$3] = void 0;
|
|
22592
22600
|
this._bufferedBytes = 0;
|
|
22593
22601
|
this._buffers = [];
|
|
@@ -23055,14 +23063,14 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23055
23063
|
* @return {(Buffer|String)[]} The framed data
|
|
23056
23064
|
* @public
|
|
23057
23065
|
*/
|
|
23058
|
-
static frame(data, options) {
|
|
23066
|
+
static frame(data, options$2) {
|
|
23059
23067
|
let mask;
|
|
23060
23068
|
let merge = false;
|
|
23061
23069
|
let offset = 2;
|
|
23062
23070
|
let skipMasking = false;
|
|
23063
|
-
if (options.mask) {
|
|
23064
|
-
mask = options.maskBuffer || maskBuffer;
|
|
23065
|
-
if (options.generateMask) options.generateMask(mask);
|
|
23071
|
+
if (options$2.mask) {
|
|
23072
|
+
mask = options$2.maskBuffer || maskBuffer;
|
|
23073
|
+
if (options$2.generateMask) options$2.generateMask(mask);
|
|
23066
23074
|
else {
|
|
23067
23075
|
if (randomPoolPointer === RANDOM_POOL_SIZE) {
|
|
23068
23076
|
/* istanbul ignore else */
|
|
@@ -23079,14 +23087,14 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23079
23087
|
offset = 6;
|
|
23080
23088
|
}
|
|
23081
23089
|
let dataLength;
|
|
23082
|
-
if (typeof data === "string") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength];
|
|
23090
|
+
if (typeof data === "string") if ((!options$2.mask || skipMasking) && options$2[kByteLength] !== void 0) dataLength = options$2[kByteLength];
|
|
23083
23091
|
else {
|
|
23084
23092
|
data = Buffer.from(data);
|
|
23085
23093
|
dataLength = data.length;
|
|
23086
23094
|
}
|
|
23087
23095
|
else {
|
|
23088
23096
|
dataLength = data.length;
|
|
23089
|
-
merge = options.mask && options.readOnly && !skipMasking;
|
|
23097
|
+
merge = options$2.mask && options$2.readOnly && !skipMasking;
|
|
23090
23098
|
}
|
|
23091
23099
|
let payloadLength = dataLength;
|
|
23092
23100
|
if (dataLength >= 65536) {
|
|
@@ -23097,15 +23105,15 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23097
23105
|
payloadLength = 126;
|
|
23098
23106
|
}
|
|
23099
23107
|
const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
|
|
23100
|
-
target[0] = options.fin ? options.opcode | 128 : options.opcode;
|
|
23101
|
-
if (options.rsv1) target[0] |= 64;
|
|
23108
|
+
target[0] = options$2.fin ? options$2.opcode | 128 : options$2.opcode;
|
|
23109
|
+
if (options$2.rsv1) target[0] |= 64;
|
|
23102
23110
|
target[1] = payloadLength;
|
|
23103
23111
|
if (payloadLength === 126) target.writeUInt16BE(dataLength, 2);
|
|
23104
23112
|
else if (payloadLength === 127) {
|
|
23105
23113
|
target[2] = target[3] = 0;
|
|
23106
23114
|
target.writeUIntBE(dataLength, 4, 6);
|
|
23107
23115
|
}
|
|
23108
|
-
if (!options.mask) return [target, data];
|
|
23116
|
+
if (!options$2.mask) return [target, data];
|
|
23109
23117
|
target[1] |= 128;
|
|
23110
23118
|
target[offset - 4] = mask[0];
|
|
23111
23119
|
target[offset - 3] = mask[1];
|
|
@@ -23143,7 +23151,7 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23143
23151
|
if (typeof data === "string") buf.write(data, 2);
|
|
23144
23152
|
else buf.set(data, 2);
|
|
23145
23153
|
}
|
|
23146
|
-
const options = {
|
|
23154
|
+
const options$2 = {
|
|
23147
23155
|
[kByteLength]: buf.length,
|
|
23148
23156
|
fin: true,
|
|
23149
23157
|
generateMask: this._generateMask,
|
|
@@ -23157,10 +23165,10 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23157
23165
|
this.dispatch,
|
|
23158
23166
|
buf,
|
|
23159
23167
|
false,
|
|
23160
|
-
options,
|
|
23168
|
+
options$2,
|
|
23161
23169
|
cb
|
|
23162
23170
|
]);
|
|
23163
|
-
else this.sendFrame(Sender$2.frame(buf, options), cb);
|
|
23171
|
+
else this.sendFrame(Sender$2.frame(buf, options$2), cb);
|
|
23164
23172
|
}
|
|
23165
23173
|
/**
|
|
23166
23174
|
* Sends a ping message to the other peer.
|
|
@@ -23185,7 +23193,7 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23185
23193
|
readOnly = toBuffer$1.readOnly;
|
|
23186
23194
|
}
|
|
23187
23195
|
if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes");
|
|
23188
|
-
const options = {
|
|
23196
|
+
const options$2 = {
|
|
23189
23197
|
[kByteLength]: byteLength,
|
|
23190
23198
|
fin: true,
|
|
23191
23199
|
generateMask: this._generateMask,
|
|
@@ -23199,18 +23207,18 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23199
23207
|
this.getBlobData,
|
|
23200
23208
|
data,
|
|
23201
23209
|
false,
|
|
23202
|
-
options,
|
|
23210
|
+
options$2,
|
|
23203
23211
|
cb
|
|
23204
23212
|
]);
|
|
23205
|
-
else this.getBlobData(data, false, options, cb);
|
|
23213
|
+
else this.getBlobData(data, false, options$2, cb);
|
|
23206
23214
|
else if (this._state !== DEFAULT) this.enqueue([
|
|
23207
23215
|
this.dispatch,
|
|
23208
23216
|
data,
|
|
23209
23217
|
false,
|
|
23210
|
-
options,
|
|
23218
|
+
options$2,
|
|
23211
23219
|
cb
|
|
23212
23220
|
]);
|
|
23213
|
-
else this.sendFrame(Sender$2.frame(data, options), cb);
|
|
23221
|
+
else this.sendFrame(Sender$2.frame(data, options$2), cb);
|
|
23214
23222
|
}
|
|
23215
23223
|
/**
|
|
23216
23224
|
* Sends a pong message to the other peer.
|
|
@@ -23235,7 +23243,7 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23235
23243
|
readOnly = toBuffer$1.readOnly;
|
|
23236
23244
|
}
|
|
23237
23245
|
if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes");
|
|
23238
|
-
const options = {
|
|
23246
|
+
const options$2 = {
|
|
23239
23247
|
[kByteLength]: byteLength,
|
|
23240
23248
|
fin: true,
|
|
23241
23249
|
generateMask: this._generateMask,
|
|
@@ -23249,18 +23257,18 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23249
23257
|
this.getBlobData,
|
|
23250
23258
|
data,
|
|
23251
23259
|
false,
|
|
23252
|
-
options,
|
|
23260
|
+
options$2,
|
|
23253
23261
|
cb
|
|
23254
23262
|
]);
|
|
23255
|
-
else this.getBlobData(data, false, options, cb);
|
|
23263
|
+
else this.getBlobData(data, false, options$2, cb);
|
|
23256
23264
|
else if (this._state !== DEFAULT) this.enqueue([
|
|
23257
23265
|
this.dispatch,
|
|
23258
23266
|
data,
|
|
23259
23267
|
false,
|
|
23260
|
-
options,
|
|
23268
|
+
options$2,
|
|
23261
23269
|
cb
|
|
23262
23270
|
]);
|
|
23263
|
-
else this.sendFrame(Sender$2.frame(data, options), cb);
|
|
23271
|
+
else this.sendFrame(Sender$2.frame(data, options$2), cb);
|
|
23264
23272
|
}
|
|
23265
23273
|
/**
|
|
23266
23274
|
* Sends a data message to the other peer.
|
|
@@ -23278,10 +23286,10 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23278
23286
|
* @param {Function} [cb] Callback
|
|
23279
23287
|
* @public
|
|
23280
23288
|
*/
|
|
23281
|
-
send(data, options, cb) {
|
|
23289
|
+
send(data, options$2, cb) {
|
|
23282
23290
|
const perMessageDeflate = this._extensions[PerMessageDeflate$3.extensionName];
|
|
23283
|
-
let opcode = options.binary ? 2 : 1;
|
|
23284
|
-
let rsv1 = options.compress;
|
|
23291
|
+
let opcode = options$2.binary ? 2 : 1;
|
|
23292
|
+
let rsv1 = options$2.compress;
|
|
23285
23293
|
let byteLength;
|
|
23286
23294
|
let readOnly;
|
|
23287
23295
|
if (typeof data === "string") {
|
|
@@ -23303,12 +23311,12 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23303
23311
|
rsv1 = false;
|
|
23304
23312
|
opcode = 0;
|
|
23305
23313
|
}
|
|
23306
|
-
if (options.fin) this._firstFragment = true;
|
|
23314
|
+
if (options$2.fin) this._firstFragment = true;
|
|
23307
23315
|
const opts = {
|
|
23308
23316
|
[kByteLength]: byteLength,
|
|
23309
|
-
fin: options.fin,
|
|
23317
|
+
fin: options$2.fin,
|
|
23310
23318
|
generateMask: this._generateMask,
|
|
23311
|
-
mask: options.mask,
|
|
23319
|
+
mask: options$2.mask,
|
|
23312
23320
|
maskBuffer: this._maskBuffer,
|
|
23313
23321
|
opcode,
|
|
23314
23322
|
readOnly,
|
|
@@ -23354,8 +23362,8 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23354
23362
|
* @param {Function} [cb] Callback
|
|
23355
23363
|
* @private
|
|
23356
23364
|
*/
|
|
23357
|
-
getBlobData(blob, compress, options, cb) {
|
|
23358
|
-
this._bufferedBytes += options[kByteLength];
|
|
23365
|
+
getBlobData(blob, compress, options$2, cb) {
|
|
23366
|
+
this._bufferedBytes += options$2[kByteLength];
|
|
23359
23367
|
this._state = GET_BLOB_DATA;
|
|
23360
23368
|
blob.arrayBuffer().then((arrayBuffer) => {
|
|
23361
23369
|
if (this._socket.destroyed) {
|
|
@@ -23363,13 +23371,13 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23363
23371
|
process.nextTick(callCallbacks, this, err, cb);
|
|
23364
23372
|
return;
|
|
23365
23373
|
}
|
|
23366
|
-
this._bufferedBytes -= options[kByteLength];
|
|
23374
|
+
this._bufferedBytes -= options$2[kByteLength];
|
|
23367
23375
|
const data = toBuffer$1(arrayBuffer);
|
|
23368
23376
|
if (!compress) {
|
|
23369
23377
|
this._state = DEFAULT;
|
|
23370
|
-
this.sendFrame(Sender$2.frame(data, options), cb);
|
|
23378
|
+
this.sendFrame(Sender$2.frame(data, options$2), cb);
|
|
23371
23379
|
this.dequeue();
|
|
23372
|
-
} else this.dispatch(data, compress, options, cb);
|
|
23380
|
+
} else this.dispatch(data, compress, options$2, cb);
|
|
23373
23381
|
}).catch((err) => {
|
|
23374
23382
|
process.nextTick(onError, this, err, cb);
|
|
23375
23383
|
});
|
|
@@ -23397,23 +23405,23 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23397
23405
|
* @param {Function} [cb] Callback
|
|
23398
23406
|
* @private
|
|
23399
23407
|
*/
|
|
23400
|
-
dispatch(data, compress, options, cb) {
|
|
23408
|
+
dispatch(data, compress, options$2, cb) {
|
|
23401
23409
|
if (!compress) {
|
|
23402
|
-
this.sendFrame(Sender$2.frame(data, options), cb);
|
|
23410
|
+
this.sendFrame(Sender$2.frame(data, options$2), cb);
|
|
23403
23411
|
return;
|
|
23404
23412
|
}
|
|
23405
23413
|
const perMessageDeflate = this._extensions[PerMessageDeflate$3.extensionName];
|
|
23406
|
-
this._bufferedBytes += options[kByteLength];
|
|
23414
|
+
this._bufferedBytes += options$2[kByteLength];
|
|
23407
23415
|
this._state = DEFLATING;
|
|
23408
|
-
perMessageDeflate.compress(data, options.fin, (_, buf) => {
|
|
23416
|
+
perMessageDeflate.compress(data, options$2.fin, (_, buf) => {
|
|
23409
23417
|
if (this._socket.destroyed) {
|
|
23410
23418
|
callCallbacks(this, /* @__PURE__ */ new Error("The socket was closed while data was being compressed"), cb);
|
|
23411
23419
|
return;
|
|
23412
23420
|
}
|
|
23413
|
-
this._bufferedBytes -= options[kByteLength];
|
|
23421
|
+
this._bufferedBytes -= options$2[kByteLength];
|
|
23414
23422
|
this._state = DEFAULT;
|
|
23415
|
-
options.readOnly = false;
|
|
23416
|
-
this.sendFrame(Sender$2.frame(buf, options), cb);
|
|
23423
|
+
options$2.readOnly = false;
|
|
23424
|
+
this.sendFrame(Sender$2.frame(buf, options$2), cb);
|
|
23417
23425
|
this.dequeue();
|
|
23418
23426
|
});
|
|
23419
23427
|
}
|
|
@@ -23468,8 +23476,8 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
23468
23476
|
if (typeof cb === "function") cb(err);
|
|
23469
23477
|
for (let i = 0; i < sender._queue.length; i++) {
|
|
23470
23478
|
const params = sender._queue[i];
|
|
23471
|
-
const callback = params[params.length - 1];
|
|
23472
|
-
if (typeof callback === "function") callback(err);
|
|
23479
|
+
const callback$1 = params[params.length - 1];
|
|
23480
|
+
if (typeof callback$1 === "function") callback$1(err);
|
|
23473
23481
|
}
|
|
23474
23482
|
}
|
|
23475
23483
|
/**
|
|
@@ -23546,11 +23554,11 @@ var require_event_target = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun
|
|
|
23546
23554
|
* @param {Boolean} [options.wasClean=false] Indicates whether or not the
|
|
23547
23555
|
* connection was cleanly closed
|
|
23548
23556
|
*/
|
|
23549
|
-
constructor(type, options = {}) {
|
|
23557
|
+
constructor(type, options$2 = {}) {
|
|
23550
23558
|
super(type);
|
|
23551
|
-
this[kCode] = options.code === void 0 ? 0 : options.code;
|
|
23552
|
-
this[kReason] = options.reason === void 0 ? "" : options.reason;
|
|
23553
|
-
this[kWasClean] = options.wasClean === void 0 ? false : options.wasClean;
|
|
23559
|
+
this[kCode] = options$2.code === void 0 ? 0 : options$2.code;
|
|
23560
|
+
this[kReason] = options$2.reason === void 0 ? "" : options$2.reason;
|
|
23561
|
+
this[kWasClean] = options$2.wasClean === void 0 ? false : options$2.wasClean;
|
|
23554
23562
|
}
|
|
23555
23563
|
/**
|
|
23556
23564
|
* @type {Number}
|
|
@@ -23589,10 +23597,10 @@ var require_event_target = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun
|
|
|
23589
23597
|
* @param {*} [options.error=null] The error that generated this event
|
|
23590
23598
|
* @param {String} [options.message=''] The error message
|
|
23591
23599
|
*/
|
|
23592
|
-
constructor(type, options = {}) {
|
|
23600
|
+
constructor(type, options$2 = {}) {
|
|
23593
23601
|
super(type);
|
|
23594
|
-
this[kError] = options.error === void 0 ? null : options.error;
|
|
23595
|
-
this[kMessage] = options.message === void 0 ? "" : options.message;
|
|
23602
|
+
this[kError] = options$2.error === void 0 ? null : options$2.error;
|
|
23603
|
+
this[kMessage] = options$2.message === void 0 ? "" : options$2.message;
|
|
23596
23604
|
}
|
|
23597
23605
|
/**
|
|
23598
23606
|
* @type {*}
|
|
@@ -23623,9 +23631,9 @@ var require_event_target = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun
|
|
|
23623
23631
|
* attributes via object members of the same name
|
|
23624
23632
|
* @param {*} [options.data=null] The message content
|
|
23625
23633
|
*/
|
|
23626
|
-
constructor(type, options = {}) {
|
|
23634
|
+
constructor(type, options$2 = {}) {
|
|
23627
23635
|
super(type);
|
|
23628
|
-
this[kData] = options.data === void 0 ? null : options.data;
|
|
23636
|
+
this[kData] = options$2.data === void 0 ? null : options$2.data;
|
|
23629
23637
|
}
|
|
23630
23638
|
/**
|
|
23631
23639
|
* @type {*}
|
|
@@ -23642,8 +23650,8 @@ var require_event_target = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun
|
|
|
23642
23650
|
* @mixin
|
|
23643
23651
|
*/
|
|
23644
23652
|
const EventTarget = {
|
|
23645
|
-
addEventListener(type, handler, options = {}) {
|
|
23646
|
-
for (const listener of this.listeners(type)) if (!options[kForOnEventAttribute$1] && listener[kListener$1] === handler && !listener[kForOnEventAttribute$1]) return;
|
|
23653
|
+
addEventListener(type, handler, options$2 = {}) {
|
|
23654
|
+
for (const listener of this.listeners(type)) if (!options$2[kForOnEventAttribute$1] && listener[kListener$1] === handler && !listener[kForOnEventAttribute$1]) return;
|
|
23647
23655
|
let wrapper;
|
|
23648
23656
|
if (type === "message") wrapper = function onMessage(data, isBinary) {
|
|
23649
23657
|
const event = new MessageEvent("message", { data: isBinary ? data : data.toString() });
|
|
@@ -23673,9 +23681,9 @@ var require_event_target = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun
|
|
|
23673
23681
|
callListener(handler, this, event);
|
|
23674
23682
|
};
|
|
23675
23683
|
else return;
|
|
23676
|
-
wrapper[kForOnEventAttribute$1] = !!options[kForOnEventAttribute$1];
|
|
23684
|
+
wrapper[kForOnEventAttribute$1] = !!options$2[kForOnEventAttribute$1];
|
|
23677
23685
|
wrapper[kListener$1] = handler;
|
|
23678
|
-
if (options.once) this.once(type, wrapper);
|
|
23686
|
+
if (options$2.once) this.once(type, wrapper);
|
|
23679
23687
|
else this.on(type, wrapper);
|
|
23680
23688
|
},
|
|
23681
23689
|
removeEventListener(type, handler) {
|
|
@@ -23855,7 +23863,7 @@ var require_extension = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
23855
23863
|
var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/websocket.js": ((exports, module) => {
|
|
23856
23864
|
const EventEmitter$2 = __require("events");
|
|
23857
23865
|
const https = __require("https");
|
|
23858
|
-
const http$
|
|
23866
|
+
const http$2 = __require("http");
|
|
23859
23867
|
const net = __require("net");
|
|
23860
23868
|
const tls = __require("tls");
|
|
23861
23869
|
const { randomBytes, createHash: createHash$1 } = __require("crypto");
|
|
@@ -23891,7 +23899,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
23891
23899
|
* @param {(String|String[])} [protocols] The subprotocols
|
|
23892
23900
|
* @param {Object} [options] Connection options
|
|
23893
23901
|
*/
|
|
23894
|
-
constructor(address, protocols, options) {
|
|
23902
|
+
constructor(address, protocols, options$2) {
|
|
23895
23903
|
super();
|
|
23896
23904
|
this._binaryType = BINARY_TYPES[0];
|
|
23897
23905
|
this._closeCode = 1006;
|
|
@@ -23913,13 +23921,13 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
23913
23921
|
this._redirects = 0;
|
|
23914
23922
|
if (protocols === void 0) protocols = [];
|
|
23915
23923
|
else if (!Array.isArray(protocols)) if (typeof protocols === "object" && protocols !== null) {
|
|
23916
|
-
options = protocols;
|
|
23924
|
+
options$2 = protocols;
|
|
23917
23925
|
protocols = [];
|
|
23918
23926
|
} else protocols = [protocols];
|
|
23919
|
-
initAsClient(this, address, protocols, options);
|
|
23927
|
+
initAsClient(this, address, protocols, options$2);
|
|
23920
23928
|
} else {
|
|
23921
|
-
this._autoPong = options.autoPong;
|
|
23922
|
-
this._closeTimeout = options.closeTimeout;
|
|
23929
|
+
this._autoPong = options$2.autoPong;
|
|
23930
|
+
this._closeTimeout = options$2.closeTimeout;
|
|
23923
23931
|
this._isServer = true;
|
|
23924
23932
|
}
|
|
23925
23933
|
}
|
|
@@ -24018,16 +24026,16 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24018
24026
|
* not to skip UTF-8 validation for text and close messages
|
|
24019
24027
|
* @private
|
|
24020
24028
|
*/
|
|
24021
|
-
setSocket(socket, head, options) {
|
|
24029
|
+
setSocket(socket, head, options$2) {
|
|
24022
24030
|
const receiver = new Receiver$1({
|
|
24023
|
-
allowSynchronousEvents: options.allowSynchronousEvents,
|
|
24031
|
+
allowSynchronousEvents: options$2.allowSynchronousEvents,
|
|
24024
24032
|
binaryType: this.binaryType,
|
|
24025
24033
|
extensions: this._extensions,
|
|
24026
24034
|
isServer: this._isServer,
|
|
24027
|
-
maxPayload: options.maxPayload,
|
|
24028
|
-
skipUTF8Validation: options.skipUTF8Validation
|
|
24035
|
+
maxPayload: options$2.maxPayload,
|
|
24036
|
+
skipUTF8Validation: options$2.skipUTF8Validation
|
|
24029
24037
|
});
|
|
24030
|
-
const sender = new Sender$1(socket, this._extensions, options.generateMask);
|
|
24038
|
+
const sender = new Sender$1(socket, this._extensions, options$2.generateMask);
|
|
24031
24039
|
this._receiver = receiver;
|
|
24032
24040
|
this._sender = sender;
|
|
24033
24041
|
this._socket = socket;
|
|
@@ -24190,11 +24198,11 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24190
24198
|
* @param {Function} [cb] Callback which is executed when data is written out
|
|
24191
24199
|
* @public
|
|
24192
24200
|
*/
|
|
24193
|
-
send(data, options, cb) {
|
|
24201
|
+
send(data, options$2, cb) {
|
|
24194
24202
|
if (this.readyState === WebSocket$2.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
|
|
24195
|
-
if (typeof options === "function") {
|
|
24196
|
-
cb = options;
|
|
24197
|
-
options = {};
|
|
24203
|
+
if (typeof options$2 === "function") {
|
|
24204
|
+
cb = options$2;
|
|
24205
|
+
options$2 = {};
|
|
24198
24206
|
}
|
|
24199
24207
|
if (typeof data === "number") data = data.toString();
|
|
24200
24208
|
if (this.readyState !== WebSocket$2.OPEN) {
|
|
@@ -24206,7 +24214,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24206
24214
|
mask: !this._isServer,
|
|
24207
24215
|
compress: true,
|
|
24208
24216
|
fin: true,
|
|
24209
|
-
...options
|
|
24217
|
+
...options$2
|
|
24210
24218
|
};
|
|
24211
24219
|
if (!this._extensions[PerMessageDeflate$2.extensionName]) opts.compress = false;
|
|
24212
24220
|
this._sender.send(data || EMPTY_BUFFER, opts, cb);
|
|
@@ -24364,7 +24372,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24364
24372
|
* not to skip UTF-8 validation for text and close messages
|
|
24365
24373
|
* @private
|
|
24366
24374
|
*/
|
|
24367
|
-
function initAsClient(websocket, address, protocols, options) {
|
|
24375
|
+
function initAsClient(websocket, address, protocols, options$2) {
|
|
24368
24376
|
const opts = {
|
|
24369
24377
|
allowSynchronousEvents: true,
|
|
24370
24378
|
autoPong: true,
|
|
@@ -24375,7 +24383,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24375
24383
|
perMessageDeflate: true,
|
|
24376
24384
|
followRedirects: false,
|
|
24377
24385
|
maxRedirects: 10,
|
|
24378
|
-
...options,
|
|
24386
|
+
...options$2,
|
|
24379
24387
|
socketPath: void 0,
|
|
24380
24388
|
hostname: void 0,
|
|
24381
24389
|
protocol: void 0,
|
|
@@ -24414,7 +24422,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24414
24422
|
}
|
|
24415
24423
|
const defaultPort = isSecure ? 443 : 80;
|
|
24416
24424
|
const key = randomBytes(16).toString("base64");
|
|
24417
|
-
const request = isSecure ? https.request : http$
|
|
24425
|
+
const request = isSecure ? https.request : http$2.request;
|
|
24418
24426
|
const protocolSet = /* @__PURE__ */ new Set();
|
|
24419
24427
|
let perMessageDeflate;
|
|
24420
24428
|
opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
|
|
@@ -24459,12 +24467,12 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24459
24467
|
websocket._originalIpc = isIpcUrl;
|
|
24460
24468
|
websocket._originalSecure = isSecure;
|
|
24461
24469
|
websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
|
|
24462
|
-
const headers = options && options.headers;
|
|
24463
|
-
options = {
|
|
24464
|
-
...options,
|
|
24470
|
+
const headers = options$2 && options$2.headers;
|
|
24471
|
+
options$2 = {
|
|
24472
|
+
...options$2,
|
|
24465
24473
|
headers: {}
|
|
24466
24474
|
};
|
|
24467
|
-
if (headers) for (const [key$1, value] of Object.entries(headers)) options.headers[key$1.toLowerCase()] = value;
|
|
24475
|
+
if (headers) for (const [key$1, value] of Object.entries(headers)) options$2.headers[key$1.toLowerCase()] = value;
|
|
24468
24476
|
} else if (websocket.listenerCount("redirect") === 0) {
|
|
24469
24477
|
const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
|
|
24470
24478
|
if (!isSameHost || websocket._originalSecure && !isSecure) {
|
|
@@ -24474,7 +24482,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24474
24482
|
opts.auth = void 0;
|
|
24475
24483
|
}
|
|
24476
24484
|
}
|
|
24477
|
-
if (opts.auth && !options.headers.authorization) options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
|
|
24485
|
+
if (opts.auth && !options$2.headers.authorization) options$2.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
|
|
24478
24486
|
req = websocket._req = request(opts);
|
|
24479
24487
|
if (websocket._redirects) websocket.emit("redirect", websocket.url, req);
|
|
24480
24488
|
} else req = websocket._req = request(opts);
|
|
@@ -24502,7 +24510,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24502
24510
|
emitErrorAndClose(websocket, /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`));
|
|
24503
24511
|
return;
|
|
24504
24512
|
}
|
|
24505
|
-
initAsClient(websocket, addr, protocols, options);
|
|
24513
|
+
initAsClient(websocket, addr, protocols, options$2);
|
|
24506
24514
|
} else if (!websocket.emit("unexpected-response", req, res)) abortHandshake$1(websocket, req, `Unexpected server response: ${res.statusCode}`);
|
|
24507
24515
|
});
|
|
24508
24516
|
req.on("upgrade", (res, socket, head) => {
|
|
@@ -24586,9 +24594,9 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24586
24594
|
* @return {net.Socket} The newly created socket used to start the connection
|
|
24587
24595
|
* @private
|
|
24588
24596
|
*/
|
|
24589
|
-
function netConnect(options) {
|
|
24590
|
-
options.path = options.socketPath;
|
|
24591
|
-
return net.connect(options);
|
|
24597
|
+
function netConnect(options$2) {
|
|
24598
|
+
options$2.path = options$2.socketPath;
|
|
24599
|
+
return net.connect(options$2);
|
|
24592
24600
|
}
|
|
24593
24601
|
/**
|
|
24594
24602
|
* Create a `tls.TLSSocket` and initiate a connection.
|
|
@@ -24597,10 +24605,10 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws
|
|
|
24597
24605
|
* @return {tls.TLSSocket} The newly created socket used to start the connection
|
|
24598
24606
|
* @private
|
|
24599
24607
|
*/
|
|
24600
|
-
function tlsConnect(options) {
|
|
24601
|
-
options.path = void 0;
|
|
24602
|
-
if (!options.servername && options.servername !== "") options.servername = net.isIP(options.host) ? "" : options.host;
|
|
24603
|
-
return tls.connect(options);
|
|
24608
|
+
function tlsConnect(options$2) {
|
|
24609
|
+
options$2.path = void 0;
|
|
24610
|
+
if (!options$2.servername && options$2.servername !== "") options$2.servername = net.isIP(options$2.host) ? "" : options$2.host;
|
|
24611
|
+
return tls.connect(options$2);
|
|
24604
24612
|
}
|
|
24605
24613
|
/**
|
|
24606
24614
|
* Abort the handshake and emit an error.
|
|
@@ -24867,10 +24875,10 @@ var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
24867
24875
|
* @return {Duplex} The duplex stream
|
|
24868
24876
|
* @public
|
|
24869
24877
|
*/
|
|
24870
|
-
function createWebSocketStream$1(ws, options) {
|
|
24878
|
+
function createWebSocketStream$1(ws, options$2) {
|
|
24871
24879
|
let terminateOnDestroy = true;
|
|
24872
24880
|
const duplex = new Duplex$1({
|
|
24873
|
-
...options,
|
|
24881
|
+
...options$2,
|
|
24874
24882
|
autoDestroy: false,
|
|
24875
24883
|
emitClose: false,
|
|
24876
24884
|
objectMode: false,
|
|
@@ -24889,37 +24897,37 @@ var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
24889
24897
|
if (duplex.destroyed) return;
|
|
24890
24898
|
duplex.push(null);
|
|
24891
24899
|
});
|
|
24892
|
-
duplex._destroy = function(err, callback) {
|
|
24900
|
+
duplex._destroy = function(err, callback$1) {
|
|
24893
24901
|
if (ws.readyState === ws.CLOSED) {
|
|
24894
|
-
callback(err);
|
|
24902
|
+
callback$1(err);
|
|
24895
24903
|
process.nextTick(emitClose$1, duplex);
|
|
24896
24904
|
return;
|
|
24897
24905
|
}
|
|
24898
24906
|
let called = false;
|
|
24899
24907
|
ws.once("error", function error(err$1) {
|
|
24900
24908
|
called = true;
|
|
24901
|
-
callback(err$1);
|
|
24909
|
+
callback$1(err$1);
|
|
24902
24910
|
});
|
|
24903
24911
|
ws.once("close", function close() {
|
|
24904
|
-
if (!called) callback(err);
|
|
24912
|
+
if (!called) callback$1(err);
|
|
24905
24913
|
process.nextTick(emitClose$1, duplex);
|
|
24906
24914
|
});
|
|
24907
24915
|
if (terminateOnDestroy) ws.terminate();
|
|
24908
24916
|
};
|
|
24909
|
-
duplex._final = function(callback) {
|
|
24917
|
+
duplex._final = function(callback$1) {
|
|
24910
24918
|
if (ws.readyState === ws.CONNECTING) {
|
|
24911
24919
|
ws.once("open", function open() {
|
|
24912
|
-
duplex._final(callback);
|
|
24920
|
+
duplex._final(callback$1);
|
|
24913
24921
|
});
|
|
24914
24922
|
return;
|
|
24915
24923
|
}
|
|
24916
24924
|
if (ws._socket === null) return;
|
|
24917
24925
|
if (ws._socket._writableState.finished) {
|
|
24918
|
-
callback();
|
|
24926
|
+
callback$1();
|
|
24919
24927
|
if (duplex._readableState.endEmitted) duplex.destroy();
|
|
24920
24928
|
} else {
|
|
24921
24929
|
ws._socket.once("finish", function finish() {
|
|
24922
|
-
callback();
|
|
24930
|
+
callback$1();
|
|
24923
24931
|
});
|
|
24924
24932
|
ws.close();
|
|
24925
24933
|
}
|
|
@@ -24927,14 +24935,14 @@ var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.
|
|
|
24927
24935
|
duplex._read = function() {
|
|
24928
24936
|
if (ws.isPaused) ws.resume();
|
|
24929
24937
|
};
|
|
24930
|
-
duplex._write = function(chunk, encoding, callback) {
|
|
24938
|
+
duplex._write = function(chunk, encoding, callback$1) {
|
|
24931
24939
|
if (ws.readyState === ws.CONNECTING) {
|
|
24932
24940
|
ws.once("open", function open() {
|
|
24933
|
-
duplex._write(chunk, encoding, callback);
|
|
24941
|
+
duplex._write(chunk, encoding, callback$1);
|
|
24934
24942
|
});
|
|
24935
24943
|
return;
|
|
24936
24944
|
}
|
|
24937
|
-
ws.send(chunk, callback);
|
|
24945
|
+
ws.send(chunk, callback$1);
|
|
24938
24946
|
};
|
|
24939
24947
|
duplex.on("end", duplexOnEnd);
|
|
24940
24948
|
duplex.on("error", duplexOnError);
|
|
@@ -24987,7 +24995,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/
|
|
|
24987
24995
|
//#region ../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/websocket-server.js
|
|
24988
24996
|
var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/ws@8.20.0/node_modules/ws/lib/websocket-server.js": ((exports, module) => {
|
|
24989
24997
|
const EventEmitter$1 = __require("events");
|
|
24990
|
-
const http = __require("http");
|
|
24998
|
+
const http$1 = __require("http");
|
|
24991
24999
|
const { Duplex } = __require("stream");
|
|
24992
25000
|
const { createHash } = __require("crypto");
|
|
24993
25001
|
const extension$1 = require_extension();
|
|
@@ -25039,9 +25047,9 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
25039
25047
|
* class to use. It must be the `WebSocket` class or class that extends it
|
|
25040
25048
|
* @param {Function} [callback] A listener for the `listening` event
|
|
25041
25049
|
*/
|
|
25042
|
-
constructor(options, callback) {
|
|
25050
|
+
constructor(options$2, callback$1) {
|
|
25043
25051
|
super();
|
|
25044
|
-
options = {
|
|
25052
|
+
options$2 = {
|
|
25045
25053
|
allowSynchronousEvents: true,
|
|
25046
25054
|
autoPong: true,
|
|
25047
25055
|
maxPayload: 100 * 1024 * 1024,
|
|
@@ -25058,20 +25066,20 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
25058
25066
|
path: null,
|
|
25059
25067
|
port: null,
|
|
25060
25068
|
WebSocket: WebSocket$1,
|
|
25061
|
-
...options
|
|
25069
|
+
...options$2
|
|
25062
25070
|
};
|
|
25063
|
-
if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified");
|
|
25064
|
-
if (options.port != null) {
|
|
25065
|
-
this._server = http.createServer((req, res) => {
|
|
25066
|
-
const body = http.STATUS_CODES[426];
|
|
25071
|
+
if (options$2.port == null && !options$2.server && !options$2.noServer || options$2.port != null && (options$2.server || options$2.noServer) || options$2.server && options$2.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified");
|
|
25072
|
+
if (options$2.port != null) {
|
|
25073
|
+
this._server = http$1.createServer((req, res) => {
|
|
25074
|
+
const body = http$1.STATUS_CODES[426];
|
|
25067
25075
|
res.writeHead(426, {
|
|
25068
25076
|
"Content-Length": body.length,
|
|
25069
25077
|
"Content-Type": "text/plain"
|
|
25070
25078
|
});
|
|
25071
25079
|
res.end(body);
|
|
25072
25080
|
});
|
|
25073
|
-
this._server.listen(options.port, options.host, options.backlog, callback);
|
|
25074
|
-
} else if (options.server) this._server = options.server;
|
|
25081
|
+
this._server.listen(options$2.port, options$2.host, options$2.backlog, callback$1);
|
|
25082
|
+
} else if (options$2.server) this._server = options$2.server;
|
|
25075
25083
|
if (this._server) {
|
|
25076
25084
|
const emitConnection = this.emit.bind(this, "connection");
|
|
25077
25085
|
this._removeListeners = addListeners(this._server, {
|
|
@@ -25082,12 +25090,12 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
25082
25090
|
}
|
|
25083
25091
|
});
|
|
25084
25092
|
}
|
|
25085
|
-
if (options.perMessageDeflate === true) options.perMessageDeflate = {};
|
|
25086
|
-
if (options.clientTracking) {
|
|
25093
|
+
if (options$2.perMessageDeflate === true) options$2.perMessageDeflate = {};
|
|
25094
|
+
if (options$2.clientTracking) {
|
|
25087
25095
|
this.clients = /* @__PURE__ */ new Set();
|
|
25088
25096
|
this._shouldEmitClose = false;
|
|
25089
25097
|
}
|
|
25090
|
-
this.options = options;
|
|
25098
|
+
this.options = options$2;
|
|
25091
25099
|
this._state = RUNNING;
|
|
25092
25100
|
}
|
|
25093
25101
|
/**
|
|
@@ -25215,19 +25223,19 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
25215
25223
|
}
|
|
25216
25224
|
}
|
|
25217
25225
|
if (this.options.verifyClient) {
|
|
25218
|
-
const info = {
|
|
25226
|
+
const info$1 = {
|
|
25219
25227
|
origin: req.headers[`${version$1 === 8 ? "sec-websocket-origin" : "origin"}`],
|
|
25220
25228
|
secure: !!(req.socket.authorized || req.socket.encrypted),
|
|
25221
25229
|
req
|
|
25222
25230
|
};
|
|
25223
25231
|
if (this.options.verifyClient.length === 2) {
|
|
25224
|
-
this.options.verifyClient(info, (verified, code, message, headers) => {
|
|
25232
|
+
this.options.verifyClient(info$1, (verified, code, message, headers) => {
|
|
25225
25233
|
if (!verified) return abortHandshake(socket, code || 401, message, headers);
|
|
25226
25234
|
this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
|
|
25227
25235
|
});
|
|
25228
25236
|
return;
|
|
25229
25237
|
}
|
|
25230
|
-
if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
|
|
25238
|
+
if (!this.options.verifyClient(info$1)) return abortHandshake(socket, 401);
|
|
25231
25239
|
}
|
|
25232
25240
|
this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
|
|
25233
25241
|
}
|
|
@@ -25331,7 +25339,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
25331
25339
|
* @private
|
|
25332
25340
|
*/
|
|
25333
25341
|
function abortHandshake(socket, code, message, headers) {
|
|
25334
|
-
message = message || http.STATUS_CODES[code];
|
|
25342
|
+
message = message || http$1.STATUS_CODES[code];
|
|
25335
25343
|
headers = {
|
|
25336
25344
|
Connection: "close",
|
|
25337
25345
|
"Content-Type": "text/html",
|
|
@@ -25339,7 +25347,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
25339
25347
|
...headers
|
|
25340
25348
|
};
|
|
25341
25349
|
socket.once("finish", socket.destroy);
|
|
25342
|
-
socket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message);
|
|
25350
|
+
socket.end(`HTTP/1.1 ${code} ${http$1.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message);
|
|
25343
25351
|
}
|
|
25344
25352
|
/**
|
|
25345
25353
|
* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
|
|
@@ -25575,17 +25583,17 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
25575
25583
|
}
|
|
25576
25584
|
throw Error("An unsupported type was passed to use(): " + String(usable));
|
|
25577
25585
|
},
|
|
25578
|
-
useCallback: function useCallback$2(callback) {
|
|
25586
|
+
useCallback: function useCallback$2(callback$1) {
|
|
25579
25587
|
var hook = nextHook();
|
|
25580
25588
|
hookLog.push({
|
|
25581
25589
|
displayName: null,
|
|
25582
25590
|
primitive: "Callback",
|
|
25583
25591
|
stackError: Error(),
|
|
25584
|
-
value: null !== hook ? hook.memoizedState[0] : callback,
|
|
25592
|
+
value: null !== hook ? hook.memoizedState[0] : callback$1,
|
|
25585
25593
|
debugInfo: null,
|
|
25586
25594
|
dispatcherHookName: "Callback"
|
|
25587
25595
|
});
|
|
25588
|
-
return callback;
|
|
25596
|
+
return callback$1;
|
|
25589
25597
|
},
|
|
25590
25598
|
useContext: function useContext$11(context) {
|
|
25591
25599
|
var value = readContext(context);
|
|
@@ -25877,17 +25885,17 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
25877
25885
|
});
|
|
25878
25886
|
return function() {};
|
|
25879
25887
|
},
|
|
25880
|
-
useEffectEvent: function useEffectEvent(callback) {
|
|
25888
|
+
useEffectEvent: function useEffectEvent(callback$1) {
|
|
25881
25889
|
nextHook();
|
|
25882
25890
|
hookLog.push({
|
|
25883
25891
|
displayName: null,
|
|
25884
25892
|
primitive: "EffectEvent",
|
|
25885
25893
|
stackError: Error(),
|
|
25886
|
-
value: callback,
|
|
25894
|
+
value: callback$1,
|
|
25887
25895
|
debugInfo: null,
|
|
25888
25896
|
dispatcherHookName: "EffectEvent"
|
|
25889
25897
|
});
|
|
25890
|
-
return callback;
|
|
25898
|
+
return callback$1;
|
|
25891
25899
|
}
|
|
25892
25900
|
}, DispatcherProxy = "undefined" === typeof Proxy ? Dispatcher : new Proxy(Dispatcher, { get: function get(target, prop) {
|
|
25893
25901
|
if (target.hasOwnProperty(prop)) return target[prop];
|
|
@@ -26131,12 +26139,12 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26131
26139
|
this.updater = updater || ReactNoopUpdateQueue$1;
|
|
26132
26140
|
}
|
|
26133
26141
|
Component$1.prototype.isReactComponent = {};
|
|
26134
|
-
Component$1.prototype.setState = function(partialState, callback) {
|
|
26142
|
+
Component$1.prototype.setState = function(partialState, callback$1) {
|
|
26135
26143
|
if ("object" !== _typeof(partialState) && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
26136
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
26144
|
+
this.updater.enqueueSetState(this, partialState, callback$1, "setState");
|
|
26137
26145
|
};
|
|
26138
|
-
Component$1.prototype.forceUpdate = function(callback) {
|
|
26139
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
26146
|
+
Component$1.prototype.forceUpdate = function(callback$1) {
|
|
26147
|
+
this.updater.enqueueForceUpdate(this, callback$1, "forceUpdate");
|
|
26140
26148
|
};
|
|
26141
26149
|
function ComponentDummy$1() {}
|
|
26142
26150
|
ComponentDummy$1.prototype = Component$1.prototype;
|
|
@@ -26203,7 +26211,7 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26203
26211
|
}
|
|
26204
26212
|
throw thenable;
|
|
26205
26213
|
}
|
|
26206
|
-
function mapIntoArray$1(children, array, escapedPrefix, nameSoFar, callback) {
|
|
26214
|
+
function mapIntoArray$1(children, array, escapedPrefix, nameSoFar, callback$1) {
|
|
26207
26215
|
var type = _typeof(children);
|
|
26208
26216
|
if ("undefined" === type || "boolean" === type) children = null;
|
|
26209
26217
|
var invokeCallback = !1;
|
|
@@ -26219,18 +26227,18 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26219
26227
|
case REACT_PORTAL_TYPE$1:
|
|
26220
26228
|
invokeCallback = !0;
|
|
26221
26229
|
break;
|
|
26222
|
-
case REACT_LAZY_TYPE$1: return invokeCallback = children._init, mapIntoArray$1(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
|
26230
|
+
case REACT_LAZY_TYPE$1: return invokeCallback = children._init, mapIntoArray$1(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback$1);
|
|
26223
26231
|
}
|
|
26224
26232
|
}
|
|
26225
|
-
if (invokeCallback) return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey$1(children, 0) : nameSoFar, isArrayImpl$1(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex$1, "$&/") + "/"), mapIntoArray$1(callback, array, escapedPrefix, "", function(c) {
|
|
26233
|
+
if (invokeCallback) return callback$1 = callback$1(children), invokeCallback = "" === nameSoFar ? "." + getElementKey$1(children, 0) : nameSoFar, isArrayImpl$1(callback$1) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex$1, "$&/") + "/"), mapIntoArray$1(callback$1, array, escapedPrefix, "", function(c) {
|
|
26226
26234
|
return c;
|
|
26227
|
-
})) : null != callback && (isValidElement$1(callback) && (callback = cloneAndReplaceKey$1(callback, escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex$1, "$&/") + "/") + invokeCallback)), array.push(callback)), 1;
|
|
26235
|
+
})) : null != callback$1 && (isValidElement$1(callback$1) && (callback$1 = cloneAndReplaceKey$1(callback$1, escapedPrefix + (null == callback$1.key || children && children.key === callback$1.key ? "" : ("" + callback$1.key).replace(userProvidedKeyEscapeRegex$1, "$&/") + "/") + invokeCallback)), array.push(callback$1)), 1;
|
|
26228
26236
|
invokeCallback = 0;
|
|
26229
26237
|
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
26230
|
-
if (isArrayImpl$1(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey$1(nameSoFar, i), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback);
|
|
26231
|
-
else if (i = getIteratorFn$1(children), "function" === typeof i) for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey$1(nameSoFar, i++), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback);
|
|
26238
|
+
if (isArrayImpl$1(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey$1(nameSoFar, i), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback$1);
|
|
26239
|
+
else if (i = getIteratorFn$1(children), "function" === typeof i) for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey$1(nameSoFar, i++), invokeCallback += mapIntoArray$1(nameSoFar, array, escapedPrefix, type, callback$1);
|
|
26232
26240
|
else if ("object" === type) {
|
|
26233
|
-
if ("function" === typeof children.then) return mapIntoArray$1(resolveThenable$1(children), array, escapedPrefix, nameSoFar, callback);
|
|
26241
|
+
if ("function" === typeof children.then) return mapIntoArray$1(resolveThenable$1(children), array, escapedPrefix, nameSoFar, callback$1);
|
|
26234
26242
|
array = String(children);
|
|
26235
26243
|
throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
|
|
26236
26244
|
}
|
|
@@ -26429,7 +26437,7 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26429
26437
|
reason.$$typeof = REACT_POSTPONE_TYPE;
|
|
26430
26438
|
throw reason;
|
|
26431
26439
|
};
|
|
26432
|
-
exports$1.unstable_startGestureTransition = function(provider, scope, options) {
|
|
26440
|
+
exports$1.unstable_startGestureTransition = function(provider, scope, options$2) {
|
|
26433
26441
|
if (null == provider) throw Error("A Timeline is required as the first argument to startGestureTransition.");
|
|
26434
26442
|
var prevTransition = ReactSharedInternals$1.T, currentTransition = { types: null };
|
|
26435
26443
|
currentTransition.gesture = provider;
|
|
@@ -26437,7 +26445,7 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26437
26445
|
try {
|
|
26438
26446
|
scope();
|
|
26439
26447
|
var onStartGestureTransitionFinish = ReactSharedInternals$1.G;
|
|
26440
|
-
if (null !== onStartGestureTransitionFinish) return onStartGestureTransitionFinish(currentTransition, provider, options);
|
|
26448
|
+
if (null !== onStartGestureTransitionFinish) return onStartGestureTransitionFinish(currentTransition, provider, options$2);
|
|
26441
26449
|
} catch (error) {
|
|
26442
26450
|
reportGlobalError$1(error);
|
|
26443
26451
|
} finally {
|
|
@@ -26454,8 +26462,8 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26454
26462
|
exports$1.useActionState = function(action, initialState, permalink) {
|
|
26455
26463
|
return ReactSharedInternals$1.H.useActionState(action, initialState, permalink);
|
|
26456
26464
|
};
|
|
26457
|
-
exports$1.useCallback = function(callback, deps) {
|
|
26458
|
-
return ReactSharedInternals$1.H.useCallback(callback, deps);
|
|
26465
|
+
exports$1.useCallback = function(callback$1, deps) {
|
|
26466
|
+
return ReactSharedInternals$1.H.useCallback(callback$1, deps);
|
|
26459
26467
|
};
|
|
26460
26468
|
exports$1.useContext = function(Context) {
|
|
26461
26469
|
return ReactSharedInternals$1.H.useContext(Context);
|
|
@@ -26467,8 +26475,8 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26467
26475
|
exports$1.useEffect = function(create$2, deps) {
|
|
26468
26476
|
return ReactSharedInternals$1.H.useEffect(create$2, deps);
|
|
26469
26477
|
};
|
|
26470
|
-
exports$1.useEffectEvent = function(callback) {
|
|
26471
|
-
return ReactSharedInternals$1.H.useEffectEvent(callback);
|
|
26478
|
+
exports$1.useEffectEvent = function(callback$1) {
|
|
26479
|
+
return ReactSharedInternals$1.H.useEffectEvent(callback$1);
|
|
26472
26480
|
};
|
|
26473
26481
|
exports$1.useId = function() {
|
|
26474
26482
|
return ReactSharedInternals$1.H.useId();
|
|
@@ -26691,20 +26699,20 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
26691
26699
|
return 1;
|
|
26692
26700
|
};
|
|
26693
26701
|
var LRUCache = /* @__PURE__ */ function() {
|
|
26694
|
-
function LRUCache$1(options) {
|
|
26702
|
+
function LRUCache$1(options$2) {
|
|
26695
26703
|
_classCallCheck(this, LRUCache$1);
|
|
26696
|
-
if (typeof options === "number") options = { max: options };
|
|
26697
|
-
if (!options) options = {};
|
|
26698
|
-
if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number");
|
|
26699
|
-
this[MAX] = options.max || Infinity;
|
|
26700
|
-
var lc = options.length || naiveLength;
|
|
26704
|
+
if (typeof options$2 === "number") options$2 = { max: options$2 };
|
|
26705
|
+
if (!options$2) options$2 = {};
|
|
26706
|
+
if (options$2.max && (typeof options$2.max !== "number" || options$2.max < 0)) throw new TypeError("max must be a non-negative number");
|
|
26707
|
+
this[MAX] = options$2.max || Infinity;
|
|
26708
|
+
var lc = options$2.length || naiveLength;
|
|
26701
26709
|
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
|
|
26702
|
-
this[ALLOW_STALE] = options.stale || false;
|
|
26703
|
-
if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
26704
|
-
this[MAX_AGE] = options.maxAge || 0;
|
|
26705
|
-
this[DISPOSE] = options.dispose;
|
|
26706
|
-
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
26707
|
-
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
26710
|
+
this[ALLOW_STALE] = options$2.stale || false;
|
|
26711
|
+
if (options$2.maxAge && typeof options$2.maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
26712
|
+
this[MAX_AGE] = options$2.maxAge || 0;
|
|
26713
|
+
this[DISPOSE] = options$2.dispose;
|
|
26714
|
+
this[NO_DISPOSE_ON_SET] = options$2.noDisposeOnSet || false;
|
|
26715
|
+
this[UPDATE_AGE_ON_GET] = options$2.updateAgeOnGet || false;
|
|
26708
26716
|
this.reset();
|
|
26709
26717
|
}
|
|
26710
26718
|
return _createClass(LRUCache$1, [
|
|
@@ -27140,9 +27148,9 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
27140
27148
|
function _capitalize(str) {
|
|
27141
27149
|
return str.charAt(0).toUpperCase() + str.substring(1);
|
|
27142
27150
|
}
|
|
27143
|
-
function _getter(p) {
|
|
27151
|
+
function _getter(p$1) {
|
|
27144
27152
|
return function() {
|
|
27145
|
-
return this[p];
|
|
27153
|
+
return this[p$1];
|
|
27146
27154
|
};
|
|
27147
27155
|
}
|
|
27148
27156
|
var booleanProps = [
|
|
@@ -27213,26 +27221,26 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
27213
27221
|
};
|
|
27214
27222
|
for (var i = 0; i < booleanProps.length; i++) {
|
|
27215
27223
|
StackFrame.prototype["get" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
|
|
27216
|
-
StackFrame.prototype["set" + _capitalize(booleanProps[i])] = function(p) {
|
|
27224
|
+
StackFrame.prototype["set" + _capitalize(booleanProps[i])] = function(p$1) {
|
|
27217
27225
|
return function(v) {
|
|
27218
|
-
this[p] = Boolean(v);
|
|
27226
|
+
this[p$1] = Boolean(v);
|
|
27219
27227
|
};
|
|
27220
27228
|
}(booleanProps[i]);
|
|
27221
27229
|
}
|
|
27222
27230
|
for (var j = 0; j < numericProps.length; j++) {
|
|
27223
27231
|
StackFrame.prototype["get" + _capitalize(numericProps[j])] = _getter(numericProps[j]);
|
|
27224
|
-
StackFrame.prototype["set" + _capitalize(numericProps[j])] = function(p) {
|
|
27232
|
+
StackFrame.prototype["set" + _capitalize(numericProps[j])] = function(p$1) {
|
|
27225
27233
|
return function(v) {
|
|
27226
|
-
if (!_isNumber(v)) throw new TypeError(p + " must be a Number");
|
|
27227
|
-
this[p] = Number(v);
|
|
27234
|
+
if (!_isNumber(v)) throw new TypeError(p$1 + " must be a Number");
|
|
27235
|
+
this[p$1] = Number(v);
|
|
27228
27236
|
};
|
|
27229
27237
|
}(numericProps[j]);
|
|
27230
27238
|
}
|
|
27231
27239
|
for (var k = 0; k < stringProps.length; k++) {
|
|
27232
27240
|
StackFrame.prototype["get" + _capitalize(stringProps[k])] = _getter(stringProps[k]);
|
|
27233
|
-
StackFrame.prototype["set" + _capitalize(stringProps[k])] = function(p) {
|
|
27241
|
+
StackFrame.prototype["set" + _capitalize(stringProps[k])] = function(p$1) {
|
|
27234
27242
|
return function(v) {
|
|
27235
|
-
this[p] = String(v);
|
|
27243
|
+
this[p$1] = String(v);
|
|
27236
27244
|
};
|
|
27237
27245
|
}(stringProps[k]);
|
|
27238
27246
|
}
|
|
@@ -27292,13 +27300,13 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
27292
27300
|
function Generator() {}
|
|
27293
27301
|
function GeneratorFunction() {}
|
|
27294
27302
|
function GeneratorFunctionPrototype() {}
|
|
27295
|
-
var p = {};
|
|
27296
|
-
define$1(p, a, function() {
|
|
27303
|
+
var p$1 = {};
|
|
27304
|
+
define$1(p$1, a, function() {
|
|
27297
27305
|
return this;
|
|
27298
27306
|
});
|
|
27299
27307
|
var d = Object.getPrototypeOf, v = d && d(d(values([])));
|
|
27300
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
27301
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
27308
|
+
v && v !== r && n.call(v, a) && (p$1 = v);
|
|
27309
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p$1);
|
|
27302
27310
|
function defineIteratorMethods(t$1) {
|
|
27303
27311
|
[
|
|
27304
27312
|
"next",
|
|
@@ -27363,15 +27371,15 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
27363
27371
|
n$1.dispatchException(n$1.arg);
|
|
27364
27372
|
} else "return" === n$1.method && n$1.abrupt("return", n$1.arg);
|
|
27365
27373
|
o$1 = f;
|
|
27366
|
-
var p$
|
|
27367
|
-
if ("normal" === p$
|
|
27368
|
-
if (o$1 = n$1.done ? s : l, p$
|
|
27374
|
+
var p$2 = tryCatch(e$1, r$1, n$1);
|
|
27375
|
+
if ("normal" === p$2.type) {
|
|
27376
|
+
if (o$1 = n$1.done ? s : l, p$2.arg === y) continue;
|
|
27369
27377
|
return {
|
|
27370
|
-
value: p$
|
|
27378
|
+
value: p$2.arg,
|
|
27371
27379
|
done: n$1.done
|
|
27372
27380
|
};
|
|
27373
27381
|
}
|
|
27374
|
-
"throw" === p$
|
|
27382
|
+
"throw" === p$2.type && (o$1 = s, n$1.method = "throw", n$1.arg = p$2.arg);
|
|
27375
27383
|
}
|
|
27376
27384
|
};
|
|
27377
27385
|
}
|
|
@@ -27753,9 +27761,9 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
27753
27761
|
var head = this.head;
|
|
27754
27762
|
var tail = this.tail;
|
|
27755
27763
|
for (var walker = head; walker !== null; walker = walker.prev) {
|
|
27756
|
-
var p = walker.prev;
|
|
27764
|
+
var p$1 = walker.prev;
|
|
27757
27765
|
walker.prev = walker.next;
|
|
27758
|
-
walker.next = p;
|
|
27766
|
+
walker.next = p$1;
|
|
27759
27767
|
}
|
|
27760
27768
|
this.head = tail;
|
|
27761
27769
|
this.tail = head;
|
|
@@ -29967,21 +29975,21 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
29967
29975
|
});
|
|
29968
29976
|
});
|
|
29969
29977
|
}
|
|
29970
|
-
function drawLabel(context, rect, text, color) {
|
|
29978
|
+
function drawLabel(context, rect, text$1, color) {
|
|
29971
29979
|
var left = rect.left, top = rect.top;
|
|
29972
29980
|
context.font = "10px monospace";
|
|
29973
29981
|
context.textBaseline = "middle";
|
|
29974
29982
|
context.textAlign = "center";
|
|
29975
29983
|
var padding = 2;
|
|
29976
29984
|
var textHeight = 14;
|
|
29977
|
-
var backgroundWidth = context.measureText(text).width + padding * 2;
|
|
29985
|
+
var backgroundWidth = context.measureText(text$1).width + padding * 2;
|
|
29978
29986
|
var backgroundHeight = textHeight;
|
|
29979
29987
|
var labelX = left;
|
|
29980
29988
|
var labelY = top - backgroundHeight;
|
|
29981
29989
|
context.fillStyle = color;
|
|
29982
29990
|
context.fillRect(labelX, labelY, backgroundWidth, backgroundHeight);
|
|
29983
29991
|
context.fillStyle = "#000000";
|
|
29984
|
-
context.fillText(text, labelX + backgroundWidth / 2, labelY + backgroundHeight / 2);
|
|
29992
|
+
context.fillText(text$1, labelX + backgroundWidth / 2, labelY + backgroundHeight / 2);
|
|
29985
29993
|
}
|
|
29986
29994
|
function destroyNative(agent$1) {
|
|
29987
29995
|
agent$1.emit("disableTraceUpdates");
|
|
@@ -30180,12 +30188,12 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
30180
30188
|
Object.defineProperty(subClass, "prototype", { writable: false });
|
|
30181
30189
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
30182
30190
|
}
|
|
30183
|
-
function _setPrototypeOf(o, p) {
|
|
30184
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$1(o$1, p$
|
|
30185
|
-
o$1.__proto__ = p$
|
|
30191
|
+
function _setPrototypeOf(o, p$1) {
|
|
30192
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$1(o$1, p$2) {
|
|
30193
|
+
o$1.__proto__ = p$2;
|
|
30186
30194
|
return o$1;
|
|
30187
30195
|
};
|
|
30188
|
-
return _setPrototypeOf(o, p);
|
|
30196
|
+
return _setPrototypeOf(o, p$1);
|
|
30189
30197
|
}
|
|
30190
30198
|
function bridge_defineProperty(obj, key, value) {
|
|
30191
30199
|
key = bridge_toPropertyKey(key);
|
|
@@ -30425,12 +30433,12 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
30425
30433
|
Object.defineProperty(subClass, "prototype", { writable: false });
|
|
30426
30434
|
if (superClass) agent_setPrototypeOf(subClass, superClass);
|
|
30427
30435
|
}
|
|
30428
|
-
function agent_setPrototypeOf(o, p) {
|
|
30429
|
-
agent_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$1(o$1, p$
|
|
30430
|
-
o$1.__proto__ = p$
|
|
30436
|
+
function agent_setPrototypeOf(o, p$1) {
|
|
30437
|
+
agent_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$1(o$1, p$2) {
|
|
30438
|
+
o$1.__proto__ = p$2;
|
|
30431
30439
|
return o$1;
|
|
30432
30440
|
};
|
|
30433
|
-
return agent_setPrototypeOf(o, p);
|
|
30441
|
+
return agent_setPrototypeOf(o, p$1);
|
|
30434
30442
|
}
|
|
30435
30443
|
function agent_defineProperty(obj, key, value) {
|
|
30436
30444
|
key = agent_toPropertyKey(key);
|
|
@@ -31326,17 +31334,17 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
31326
31334
|
}
|
|
31327
31335
|
function getOwnerStackByComponentInfoInDev(componentInfo) {
|
|
31328
31336
|
try {
|
|
31329
|
-
var info = "";
|
|
31337
|
+
var info$1 = "";
|
|
31330
31338
|
if (!componentInfo.owner && typeof componentInfo.name === "string") return describeBuiltInComponentFrame(componentInfo.name);
|
|
31331
31339
|
var owner = componentInfo;
|
|
31332
31340
|
while (owner) {
|
|
31333
31341
|
var ownerStack = owner.debugStack;
|
|
31334
31342
|
if (ownerStack != null) {
|
|
31335
31343
|
owner = owner.owner;
|
|
31336
|
-
if (owner) info += "\n" + formatOwnerStack(ownerStack);
|
|
31344
|
+
if (owner) info$1 += "\n" + formatOwnerStack(ownerStack);
|
|
31337
31345
|
} else break;
|
|
31338
31346
|
}
|
|
31339
|
-
return info;
|
|
31347
|
+
return info$1;
|
|
31340
31348
|
} catch (x) {
|
|
31341
31349
|
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
|
31342
31350
|
}
|
|
@@ -31790,26 +31798,26 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
31790
31798
|
}
|
|
31791
31799
|
function getStackByFiberInDevAndProd(workTagMap, workInProgress, currentDispatcherRef) {
|
|
31792
31800
|
try {
|
|
31793
|
-
var info = "";
|
|
31801
|
+
var info$1 = "";
|
|
31794
31802
|
var node = workInProgress;
|
|
31795
31803
|
do {
|
|
31796
|
-
info += describeFiber(workTagMap, node, currentDispatcherRef);
|
|
31804
|
+
info$1 += describeFiber(workTagMap, node, currentDispatcherRef);
|
|
31797
31805
|
var debugInfo = node._debugInfo;
|
|
31798
31806
|
if (debugInfo) for (var i = debugInfo.length - 1; i >= 0; i--) {
|
|
31799
31807
|
var entry = debugInfo[i];
|
|
31800
|
-
if (typeof entry.name === "string") info += describeDebugInfoFrame(entry.name, entry.env);
|
|
31808
|
+
if (typeof entry.name === "string") info$1 += describeDebugInfoFrame(entry.name, entry.env);
|
|
31801
31809
|
}
|
|
31802
31810
|
node = node.return;
|
|
31803
31811
|
} while (node);
|
|
31804
|
-
return info;
|
|
31812
|
+
return info$1;
|
|
31805
31813
|
} catch (x) {
|
|
31806
31814
|
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
|
31807
31815
|
}
|
|
31808
31816
|
}
|
|
31809
31817
|
function getSourceLocationByFiber(workTagMap, fiber, currentDispatcherRef) {
|
|
31810
31818
|
try {
|
|
31811
|
-
var info = describeFiber(workTagMap, fiber, currentDispatcherRef);
|
|
31812
|
-
if (info !== "") return info.slice(1);
|
|
31819
|
+
var info$1 = describeFiber(workTagMap, fiber, currentDispatcherRef);
|
|
31820
|
+
if (info$1 !== "") return info$1.slice(1);
|
|
31813
31821
|
} catch (x) {
|
|
31814
31822
|
console.error(x);
|
|
31815
31823
|
}
|
|
@@ -31824,25 +31832,25 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
31824
31832
|
function getOwnerStackByFiberInDev(workTagMap, workInProgress, currentDispatcherRef) {
|
|
31825
31833
|
var HostHoistable = workTagMap.HostHoistable, HostSingleton = workTagMap.HostSingleton, HostText = workTagMap.HostText, HostComponent = workTagMap.HostComponent, SuspenseComponent = workTagMap.SuspenseComponent, SuspenseListComponent = workTagMap.SuspenseListComponent, ViewTransitionComponent = workTagMap.ViewTransitionComponent, ActivityComponent = workTagMap.ActivityComponent;
|
|
31826
31834
|
try {
|
|
31827
|
-
var info = "";
|
|
31835
|
+
var info$1 = "";
|
|
31828
31836
|
if (workInProgress.tag === HostText) workInProgress = workInProgress.return;
|
|
31829
31837
|
switch (workInProgress.tag) {
|
|
31830
31838
|
case HostHoistable:
|
|
31831
31839
|
case HostSingleton:
|
|
31832
31840
|
case HostComponent:
|
|
31833
|
-
info += describeBuiltInComponentFrame(workInProgress.type);
|
|
31841
|
+
info$1 += describeBuiltInComponentFrame(workInProgress.type);
|
|
31834
31842
|
break;
|
|
31835
31843
|
case SuspenseComponent:
|
|
31836
|
-
info += describeBuiltInComponentFrame("Suspense");
|
|
31844
|
+
info$1 += describeBuiltInComponentFrame("Suspense");
|
|
31837
31845
|
break;
|
|
31838
31846
|
case SuspenseListComponent:
|
|
31839
|
-
info += describeBuiltInComponentFrame("SuspenseList");
|
|
31847
|
+
info$1 += describeBuiltInComponentFrame("SuspenseList");
|
|
31840
31848
|
break;
|
|
31841
31849
|
case ViewTransitionComponent:
|
|
31842
|
-
info += describeBuiltInComponentFrame("ViewTransition");
|
|
31850
|
+
info$1 += describeBuiltInComponentFrame("ViewTransition");
|
|
31843
31851
|
break;
|
|
31844
31852
|
case ActivityComponent:
|
|
31845
|
-
info += describeBuiltInComponentFrame("Activity");
|
|
31853
|
+
info$1 += describeBuiltInComponentFrame("Activity");
|
|
31846
31854
|
break;
|
|
31847
31855
|
}
|
|
31848
31856
|
var owner = workInProgress;
|
|
@@ -31852,14 +31860,14 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
31852
31860
|
var debugStack = fiber._debugStack;
|
|
31853
31861
|
if (owner && debugStack) {
|
|
31854
31862
|
if (typeof debugStack !== "string") debugStack = formatOwnerStack(debugStack);
|
|
31855
|
-
if (debugStack !== "") info += "\n" + debugStack;
|
|
31863
|
+
if (debugStack !== "") info$1 += "\n" + debugStack;
|
|
31856
31864
|
}
|
|
31857
31865
|
} else if (owner.debugStack != null) {
|
|
31858
31866
|
var ownerStack = owner.debugStack;
|
|
31859
31867
|
owner = owner.owner;
|
|
31860
|
-
if (owner && ownerStack) info += "\n" + formatOwnerStack(ownerStack);
|
|
31868
|
+
if (owner && ownerStack) info$1 += "\n" + formatOwnerStack(ownerStack);
|
|
31861
31869
|
} else break;
|
|
31862
|
-
return info;
|
|
31870
|
+
return info$1;
|
|
31863
31871
|
} catch (x) {
|
|
31864
31872
|
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
|
31865
31873
|
}
|
|
@@ -37996,8 +38004,8 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
37996
38004
|
}
|
|
37997
38005
|
var PREFIX_REGEX = /\s{4}(in|at)\s{1}/;
|
|
37998
38006
|
var ROW_COLUMN_NUMBER_REGEX = /:\d+:\d+(\n|$)/;
|
|
37999
|
-
function isStringComponentStack(text) {
|
|
38000
|
-
return PREFIX_REGEX.test(text) || ROW_COLUMN_NUMBER_REGEX.test(text);
|
|
38007
|
+
function isStringComponentStack(text$1) {
|
|
38008
|
+
return PREFIX_REGEX.test(text$1) || ROW_COLUMN_NUMBER_REGEX.test(text$1);
|
|
38001
38009
|
}
|
|
38002
38010
|
var frameDiffs = / \(\<anonymous\>\)$|\@unknown\:0\:0$|\(|\)|\[|\]/gm;
|
|
38003
38011
|
function areStackTracesEqual(a, b) {
|
|
@@ -38151,8 +38159,8 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
38151
38159
|
for (var _i = 0, _consoleMethodsToOver = consoleMethodsToOverrideForStrictMode; _i < _consoleMethodsToOver.length; _i++) _loop();
|
|
38152
38160
|
}
|
|
38153
38161
|
function unpatchConsoleForStrictMode() {
|
|
38154
|
-
unpatchConsoleCallbacks.forEach(function(callback) {
|
|
38155
|
-
return callback();
|
|
38162
|
+
unpatchConsoleCallbacks.forEach(function(callback$1) {
|
|
38163
|
+
return callback$1();
|
|
38156
38164
|
});
|
|
38157
38165
|
unpatchConsoleCallbacks.length = 0;
|
|
38158
38166
|
}
|
|
@@ -38656,17 +38664,17 @@ var require_backend = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/reac
|
|
|
38656
38664
|
var profilingSettings = arguments.length > 2 ? arguments[2] : void 0;
|
|
38657
38665
|
installHook(window, maybeSettingsOrSettingsPromise, shouldStartProfilingNow, profilingSettings);
|
|
38658
38666
|
}
|
|
38659
|
-
function connectToDevTools(options) {
|
|
38667
|
+
function connectToDevTools(options$2) {
|
|
38660
38668
|
var hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
38661
38669
|
if (hook == null) return;
|
|
38662
|
-
var _ref = options || {}, _ref$host = _ref.host, host = _ref$host === void 0 ? "localhost" : _ref$host, nativeStyleEditorValidAttributes = _ref.nativeStyleEditorValidAttributes, _ref$useHttps = _ref.useHttps, useHttps = _ref$useHttps === void 0 ? false : _ref$useHttps, _ref$port = _ref.port, port$1 = _ref$port === void 0 ? 8097 : _ref$port, websocket = _ref.websocket, _ref$resolveRNStyle = _ref.resolveRNStyle, resolveRNStyle = _ref$resolveRNStyle === void 0 ? null : _ref$resolveRNStyle, _ref$retryConnectionD = _ref.retryConnectionDelay, retryConnectionDelay = _ref$retryConnectionD === void 0 ? 2e3 : _ref$retryConnectionD, _ref$isAppActive = _ref.isAppActive, isAppActive = _ref$isAppActive === void 0 ? function() {
|
|
38670
|
+
var _ref = options$2 || {}, _ref$host = _ref.host, host = _ref$host === void 0 ? "localhost" : _ref$host, nativeStyleEditorValidAttributes = _ref.nativeStyleEditorValidAttributes, _ref$useHttps = _ref.useHttps, useHttps = _ref$useHttps === void 0 ? false : _ref$useHttps, _ref$port = _ref.port, port$1 = _ref$port === void 0 ? 8097 : _ref$port, websocket = _ref.websocket, _ref$resolveRNStyle = _ref.resolveRNStyle, resolveRNStyle = _ref$resolveRNStyle === void 0 ? null : _ref$resolveRNStyle, _ref$retryConnectionD = _ref.retryConnectionDelay, retryConnectionDelay = _ref$retryConnectionD === void 0 ? 2e3 : _ref$retryConnectionD, _ref$isAppActive = _ref.isAppActive, isAppActive = _ref$isAppActive === void 0 ? function() {
|
|
38663
38671
|
return true;
|
|
38664
38672
|
} : _ref$isAppActive, onSettingsUpdated = _ref.onSettingsUpdated, _ref$isReloadAndProfi = _ref.isReloadAndProfileSupported, isReloadAndProfileSupported = _ref$isReloadAndProfi === void 0 ? getIsReloadAndProfileSupported() : _ref$isReloadAndProfi, isProfiling = _ref.isProfiling, onReloadAndProfile = _ref.onReloadAndProfile, onReloadAndProfileFlagsReset = _ref.onReloadAndProfileFlagsReset;
|
|
38665
38673
|
var protocol = useHttps ? "wss" : "ws";
|
|
38666
38674
|
var retryTimeoutID = null;
|
|
38667
38675
|
function scheduleRetry() {
|
|
38668
38676
|
if (retryTimeoutID === null) retryTimeoutID = setTimeout(function() {
|
|
38669
|
-
return connectToDevTools(options);
|
|
38677
|
+
return connectToDevTools(options$2);
|
|
38670
38678
|
}, retryConnectionDelay);
|
|
38671
38679
|
}
|
|
38672
38680
|
if (!isAppActive()) {
|
|
@@ -38915,16 +38923,16 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
38915
38923
|
}
|
|
38916
38924
|
return node;
|
|
38917
38925
|
},
|
|
38918
|
-
createTextInstance(text, _root, hostContext) {
|
|
38919
|
-
if (!hostContext.isInsideText) throw new Error(`Text string "${text}" must be rendered inside <Text> component`);
|
|
38920
|
-
return createTextNode(text);
|
|
38926
|
+
createTextInstance(text$1, _root, hostContext) {
|
|
38927
|
+
if (!hostContext.isInsideText) throw new Error(`Text string "${text$1}" must be rendered inside <Text> component`);
|
|
38928
|
+
return createTextNode(text$1);
|
|
38921
38929
|
},
|
|
38922
38930
|
resetTextContent() {},
|
|
38923
38931
|
hideTextInstance(node) {
|
|
38924
38932
|
setTextNodeValue(node, "");
|
|
38925
38933
|
},
|
|
38926
|
-
unhideTextInstance(node, text) {
|
|
38927
|
-
setTextNodeValue(node, text);
|
|
38934
|
+
unhideTextInstance(node, text$1) {
|
|
38935
|
+
setTextNodeValue(node, text$1);
|
|
38928
38936
|
},
|
|
38929
38937
|
getPublicInstance: (instance) => instance,
|
|
38930
38938
|
hideInstance(node) {
|
|
@@ -39032,8 +39040,8 @@ var reconciler_default = (0, import_react_reconciler.default)({
|
|
|
39032
39040
|
|
|
39033
39041
|
//#endregion
|
|
39034
39042
|
//#region ../../node_modules/.bun/indent-string@5.0.0/node_modules/indent-string/index.js
|
|
39035
|
-
function indentString(string, count = 1, options = {}) {
|
|
39036
|
-
const { indent = " ", includeEmptyLines = false } = options;
|
|
39043
|
+
function indentString(string, count = 1, options$2 = {}) {
|
|
39044
|
+
const { indent = " ", includeEmptyLines = false } = options$2;
|
|
39037
39045
|
if (typeof string !== "string") throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof string}\``);
|
|
39038
39046
|
if (typeof count !== "number") throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof count}\``);
|
|
39039
39047
|
if (count < 0) throw new RangeError(`Expected \`count\` to be at least 0, got \`${count}\``);
|
|
@@ -39390,10 +39398,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
39390
39398
|
if ("COLORTERM" in env$1) return 1;
|
|
39391
39399
|
return min;
|
|
39392
39400
|
}
|
|
39393
|
-
function createSupportsColor(stream, options = {}) {
|
|
39401
|
+
function createSupportsColor(stream, options$2 = {}) {
|
|
39394
39402
|
return translateLevel(_supportsColor(stream, {
|
|
39395
39403
|
streamIsTTY: stream && stream.isTTY,
|
|
39396
|
-
...options
|
|
39404
|
+
...options$2
|
|
39397
39405
|
}));
|
|
39398
39406
|
}
|
|
39399
39407
|
const supportsColor = {
|
|
@@ -39444,19 +39452,19 @@ const levelMapping = [
|
|
|
39444
39452
|
"ansi16m"
|
|
39445
39453
|
];
|
|
39446
39454
|
const styles = Object.create(null);
|
|
39447
|
-
const applyOptions = (object, options = {}) => {
|
|
39448
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
|
|
39455
|
+
const applyOptions = (object, options$2 = {}) => {
|
|
39456
|
+
if (options$2.level && !(Number.isInteger(options$2.level) && options$2.level >= 0 && options$2.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
|
|
39449
39457
|
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
39450
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
39458
|
+
object.level = options$2.level === void 0 ? colorLevel : options$2.level;
|
|
39451
39459
|
};
|
|
39452
|
-
const chalkFactory = (options) => {
|
|
39460
|
+
const chalkFactory = (options$2) => {
|
|
39453
39461
|
const chalk$1 = (...strings) => strings.join(" ");
|
|
39454
|
-
applyOptions(chalk$1, options);
|
|
39462
|
+
applyOptions(chalk$1, options$2);
|
|
39455
39463
|
Object.setPrototypeOf(chalk$1, createChalk.prototype);
|
|
39456
39464
|
return chalk$1;
|
|
39457
39465
|
};
|
|
39458
|
-
function createChalk(options) {
|
|
39459
|
-
return chalkFactory(options);
|
|
39466
|
+
function createChalk(options$2) {
|
|
39467
|
+
return chalkFactory(options$2);
|
|
39460
39468
|
}
|
|
39461
39469
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
39462
39470
|
for (const [styleName, style] of Object.entries(ansi_styles_default$1)) styles[styleName] = { get() {
|
|
@@ -39647,17 +39655,17 @@ var render_background_default = renderBackground;
|
|
|
39647
39655
|
|
|
39648
39656
|
//#endregion
|
|
39649
39657
|
//#region ../../node_modules/.bun/ink@6.8.0+4d40c05051311df7/node_modules/ink/build/render-node-to-output.js
|
|
39650
|
-
const applyPaddingToText = (node, text) => {
|
|
39658
|
+
const applyPaddingToText = (node, text$1) => {
|
|
39651
39659
|
const yogaNode = node.childNodes[0]?.yogaNode;
|
|
39652
39660
|
if (yogaNode) {
|
|
39653
39661
|
const offsetX = yogaNode.getComputedLeft();
|
|
39654
39662
|
const offsetY = yogaNode.getComputedTop();
|
|
39655
|
-
text = "\n".repeat(offsetY) + indentString(text, offsetX);
|
|
39663
|
+
text$1 = "\n".repeat(offsetY) + indentString(text$1, offsetX);
|
|
39656
39664
|
}
|
|
39657
|
-
return text;
|
|
39665
|
+
return text$1;
|
|
39658
39666
|
};
|
|
39659
|
-
const renderNodeToScreenReaderOutput = (node, options = {}) => {
|
|
39660
|
-
if (options.skipStaticElements && node.internal_static) return "";
|
|
39667
|
+
const renderNodeToScreenReaderOutput = (node, options$2 = {}) => {
|
|
39668
|
+
if (options$2.skipStaticElements && node.internal_static) return "";
|
|
39661
39669
|
if (node.yogaNode?.getDisplay() === src_default.DISPLAY_NONE) return "";
|
|
39662
39670
|
let output = "";
|
|
39663
39671
|
if (node.nodeName === "ink-text") output = squash_text_nodes_default(node);
|
|
@@ -39666,7 +39674,7 @@ const renderNodeToScreenReaderOutput = (node, options = {}) => {
|
|
|
39666
39674
|
output = (node.style.flexDirection === "row-reverse" || node.style.flexDirection === "column-reverse" ? [...node.childNodes].reverse() : [...node.childNodes]).map((childNode) => {
|
|
39667
39675
|
return renderNodeToScreenReaderOutput(childNode, {
|
|
39668
39676
|
parentRole: node.internal_accessibility?.role,
|
|
39669
|
-
skipStaticElements: options.skipStaticElements
|
|
39677
|
+
skipStaticElements: options$2.skipStaticElements
|
|
39670
39678
|
});
|
|
39671
39679
|
}).filter(Boolean).join(separator);
|
|
39672
39680
|
}
|
|
@@ -39676,12 +39684,12 @@ const renderNodeToScreenReaderOutput = (node, options = {}) => {
|
|
|
39676
39684
|
const stateDescription = Object.keys(state).filter((key) => state[key]).join(", ");
|
|
39677
39685
|
if (stateDescription) output = `(${stateDescription}) ${output}`;
|
|
39678
39686
|
}
|
|
39679
|
-
if (role && role !== options.parentRole) output = `${role}: ${output}`;
|
|
39687
|
+
if (role && role !== options$2.parentRole) output = `${role}: ${output}`;
|
|
39680
39688
|
}
|
|
39681
39689
|
return output;
|
|
39682
39690
|
};
|
|
39683
|
-
const renderNodeToOutput = (node, output, options) => {
|
|
39684
|
-
const { offsetX = 0, offsetY = 0, transformers = [], skipStaticElements } = options;
|
|
39691
|
+
const renderNodeToOutput = (node, output, options$2) => {
|
|
39692
|
+
const { offsetX = 0, offsetY = 0, transformers = [], skipStaticElements } = options$2;
|
|
39685
39693
|
if (skipStaticElements && node.internal_static) return;
|
|
39686
39694
|
const { yogaNode } = node;
|
|
39687
39695
|
if (yogaNode) {
|
|
@@ -39691,16 +39699,16 @@ const renderNodeToOutput = (node, output, options) => {
|
|
|
39691
39699
|
let newTransformers = transformers;
|
|
39692
39700
|
if (typeof node.internal_transform === "function") newTransformers = [node.internal_transform, ...transformers];
|
|
39693
39701
|
if (node.nodeName === "ink-text") {
|
|
39694
|
-
let text = squash_text_nodes_default(node);
|
|
39695
|
-
if (text.length > 0) {
|
|
39696
|
-
const currentWidth = widestLine(text);
|
|
39702
|
+
let text$1 = squash_text_nodes_default(node);
|
|
39703
|
+
if (text$1.length > 0) {
|
|
39704
|
+
const currentWidth = widestLine(text$1);
|
|
39697
39705
|
const maxWidth = get_max_width_default(yogaNode);
|
|
39698
39706
|
if (currentWidth > maxWidth) {
|
|
39699
39707
|
const textWrap = node.style.textWrap ?? "wrap";
|
|
39700
|
-
text = wrap_text_default(text, maxWidth, textWrap);
|
|
39708
|
+
text$1 = wrap_text_default(text$1, maxWidth, textWrap);
|
|
39701
39709
|
}
|
|
39702
|
-
text = applyPaddingToText(node, text);
|
|
39703
|
-
output.write(x, y, text, { transformers: newTransformers });
|
|
39710
|
+
text$1 = applyPaddingToText(node, text$1);
|
|
39711
|
+
output.write(x, y, text$1, { transformers: newTransformers });
|
|
39704
39712
|
}
|
|
39705
39713
|
return;
|
|
39706
39714
|
}
|
|
@@ -39968,21 +39976,21 @@ var OutputCaches = class {
|
|
|
39968
39976
|
}
|
|
39969
39977
|
return cached;
|
|
39970
39978
|
}
|
|
39971
|
-
getStringWidth(text) {
|
|
39972
|
-
let cached = this.widths.get(text);
|
|
39979
|
+
getStringWidth(text$1) {
|
|
39980
|
+
let cached = this.widths.get(text$1);
|
|
39973
39981
|
if (cached === void 0) {
|
|
39974
|
-
cached = stringWidth(text);
|
|
39975
|
-
this.widths.set(text, cached);
|
|
39982
|
+
cached = stringWidth(text$1);
|
|
39983
|
+
this.widths.set(text$1, cached);
|
|
39976
39984
|
}
|
|
39977
39985
|
return cached;
|
|
39978
39986
|
}
|
|
39979
|
-
getWidestLine(text) {
|
|
39980
|
-
let cached = this.blockWidths.get(text);
|
|
39987
|
+
getWidestLine(text$1) {
|
|
39988
|
+
let cached = this.blockWidths.get(text$1);
|
|
39981
39989
|
if (cached === void 0) {
|
|
39982
39990
|
let lineWidth = 0;
|
|
39983
|
-
for (const line of text.split("\n")) lineWidth = Math.max(lineWidth, this.getStringWidth(line));
|
|
39991
|
+
for (const line of text$1.split("\n")) lineWidth = Math.max(lineWidth, this.getStringWidth(line));
|
|
39984
39992
|
cached = lineWidth;
|
|
39985
|
-
this.blockWidths.set(text, cached);
|
|
39993
|
+
this.blockWidths.set(text$1, cached);
|
|
39986
39994
|
}
|
|
39987
39995
|
return cached;
|
|
39988
39996
|
}
|
|
@@ -39992,19 +40000,19 @@ var Output = class {
|
|
|
39992
40000
|
height;
|
|
39993
40001
|
operations = [];
|
|
39994
40002
|
caches = new OutputCaches();
|
|
39995
|
-
constructor(options) {
|
|
39996
|
-
const { width, height } = options;
|
|
40003
|
+
constructor(options$2) {
|
|
40004
|
+
const { width, height } = options$2;
|
|
39997
40005
|
this.width = width;
|
|
39998
40006
|
this.height = height;
|
|
39999
40007
|
}
|
|
40000
|
-
write(x, y, text, options) {
|
|
40001
|
-
const { transformers } = options;
|
|
40002
|
-
if (!text) return;
|
|
40008
|
+
write(x, y, text$1, options$2) {
|
|
40009
|
+
const { transformers } = options$2;
|
|
40010
|
+
if (!text$1) return;
|
|
40003
40011
|
this.operations.push({
|
|
40004
40012
|
type: "write",
|
|
40005
40013
|
x,
|
|
40006
40014
|
y,
|
|
40007
|
-
text,
|
|
40015
|
+
text: text$1,
|
|
40008
40016
|
transformers
|
|
40009
40017
|
});
|
|
40010
40018
|
}
|
|
@@ -40034,15 +40042,15 @@ var Output = class {
|
|
|
40034
40042
|
if (operation.type === "clip") clips.push(operation.clip);
|
|
40035
40043
|
if (operation.type === "unclip") clips.pop();
|
|
40036
40044
|
if (operation.type === "write") {
|
|
40037
|
-
const { text, transformers } = operation;
|
|
40045
|
+
const { text: text$1, transformers } = operation;
|
|
40038
40046
|
let { x, y } = operation;
|
|
40039
|
-
let lines = text.split("\n");
|
|
40047
|
+
let lines = text$1.split("\n");
|
|
40040
40048
|
const clip = clips.at(-1);
|
|
40041
40049
|
if (clip) {
|
|
40042
40050
|
const clipHorizontally = typeof clip?.x1 === "number" && typeof clip?.x2 === "number";
|
|
40043
40051
|
const clipVertically = typeof clip?.y1 === "number" && typeof clip?.y2 === "number";
|
|
40044
40052
|
if (clipHorizontally) {
|
|
40045
|
-
const width = this.caches.getWidestLine(text);
|
|
40053
|
+
const width = this.caches.getWidestLine(text$1);
|
|
40046
40054
|
if (x + width < clip.x1 || x > clip.x2) continue;
|
|
40047
40055
|
}
|
|
40048
40056
|
if (clipVertically) {
|
|
@@ -40155,7 +40163,7 @@ var require_mimic_fn = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/mim
|
|
|
40155
40163
|
var require_onetime = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/onetime@5.1.2/node_modules/onetime/index.js": ((exports, module) => {
|
|
40156
40164
|
const mimicFn = require_mimic_fn();
|
|
40157
40165
|
const calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
40158
|
-
const onetime$1 = (function_, options = {}) => {
|
|
40166
|
+
const onetime$1 = (function_, options$2 = {}) => {
|
|
40159
40167
|
if (typeof function_ !== "function") throw new TypeError("Expected a function");
|
|
40160
40168
|
let returnValue;
|
|
40161
40169
|
let callCount = 0;
|
|
@@ -40165,7 +40173,7 @@ var require_onetime = /* @__PURE__ */ __commonJS({ "../../node_modules/.bun/onet
|
|
|
40165
40173
|
if (callCount === 1) {
|
|
40166
40174
|
returnValue = function_.apply(this, arguments_);
|
|
40167
40175
|
function_ = null;
|
|
40168
|
-
} else if (options.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
40176
|
+
} else if (options$2.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
40169
40177
|
return returnValue;
|
|
40170
40178
|
};
|
|
40171
40179
|
mimicFn(onetime$2, function_);
|
|
@@ -40871,13 +40879,13 @@ const generateLineNumbers = (line, around) => {
|
|
|
40871
40879
|
for (let lineNumber = min; lineNumber <= max; lineNumber++) lineNumbers.push(lineNumber);
|
|
40872
40880
|
return lineNumbers;
|
|
40873
40881
|
};
|
|
40874
|
-
const codeExcerpt = (source, line, options = {}) => {
|
|
40882
|
+
const codeExcerpt = (source, line, options$2 = {}) => {
|
|
40875
40883
|
var _a;
|
|
40876
40884
|
if (typeof source !== "string") throw new TypeError("Source code is missing.");
|
|
40877
40885
|
if (!line || line < 1) throw new TypeError("Line number must start from `1`.");
|
|
40878
40886
|
const lines = dist_default$2(source).split(/\r?\n/);
|
|
40879
40887
|
if (line > lines.length) return;
|
|
40880
|
-
return generateLineNumbers(line, (_a = options.around) !== null && _a !== void 0 ? _a : 3).filter((line$1) => lines[line$1 - 1] !== void 0).map((line$1) => ({
|
|
40888
|
+
return generateLineNumbers(line, (_a = options$2.around) !== null && _a !== void 0 ? _a : 3).filter((line$1) => lines[line$1 - 1] !== void 0).map((line$1) => ({
|
|
40881
40889
|
line: line$1,
|
|
40882
40890
|
value: lines[line$1 - 1]
|
|
40883
40891
|
}));
|
|
@@ -41409,14 +41417,14 @@ var Ink = class {
|
|
|
41409
41417
|
hasPendingThrottledRender = false;
|
|
41410
41418
|
kittyProtocolEnabled = false;
|
|
41411
41419
|
cancelKittyDetection;
|
|
41412
|
-
constructor(options) {
|
|
41420
|
+
constructor(options$2) {
|
|
41413
41421
|
autoBind(this);
|
|
41414
|
-
this.options = options;
|
|
41422
|
+
this.options = options$2;
|
|
41415
41423
|
this.rootNode = createNode("ink-root");
|
|
41416
41424
|
this.rootNode.onComputeLayout = this.calculateLayout;
|
|
41417
|
-
this.isScreenReaderEnabled = options.isScreenReaderEnabled ?? process$1.env["INK_SCREEN_READER"] === "true";
|
|
41418
|
-
const unthrottled = options.debug || this.isScreenReaderEnabled;
|
|
41419
|
-
const maxFps = options.maxFps ?? 30;
|
|
41425
|
+
this.isScreenReaderEnabled = options$2.isScreenReaderEnabled ?? process$1.env["INK_SCREEN_READER"] === "true";
|
|
41426
|
+
const unthrottled = options$2.debug || this.isScreenReaderEnabled;
|
|
41427
|
+
const maxFps = options$2.maxFps ?? 30;
|
|
41420
41428
|
const renderThrottleMs = maxFps > 0 ? Math.max(1, Math.ceil(1e3 / maxFps)) : 0;
|
|
41421
41429
|
if (unthrottled) {
|
|
41422
41430
|
this.rootNode.onRender = this.onRender;
|
|
@@ -41433,7 +41441,7 @@ var Ink = class {
|
|
|
41433
41441
|
this.throttledOnRender = throttled;
|
|
41434
41442
|
}
|
|
41435
41443
|
this.rootNode.onImmediateRender = this.onRender;
|
|
41436
|
-
this.log = log_update_default.create(options.stdout, { incremental: options.incrementalRendering });
|
|
41444
|
+
this.log = log_update_default.create(options$2.stdout, { incremental: options$2.incrementalRendering });
|
|
41437
41445
|
this.cursorPosition = void 0;
|
|
41438
41446
|
this.throttledLog = unthrottled ? this.log : throttle((output) => {
|
|
41439
41447
|
const shouldWrite = this.log.willRender(output);
|
|
@@ -41447,21 +41455,21 @@ var Ink = class {
|
|
|
41447
41455
|
});
|
|
41448
41456
|
this.isUnmounted = false;
|
|
41449
41457
|
this.isUnmounting = false;
|
|
41450
|
-
this.isConcurrent = options.concurrent ?? false;
|
|
41458
|
+
this.isConcurrent = options$2.concurrent ?? false;
|
|
41451
41459
|
this.lastOutput = "";
|
|
41452
41460
|
this.lastOutputToRender = "";
|
|
41453
41461
|
this.lastOutputHeight = 0;
|
|
41454
41462
|
this.lastTerminalWidth = this.getTerminalWidth();
|
|
41455
41463
|
this.fullStaticOutput = "";
|
|
41456
|
-
const rootTag = options.concurrent ? import_constants$1.ConcurrentRoot : import_constants$1.LegacyRoot;
|
|
41464
|
+
const rootTag = options$2.concurrent ? import_constants$1.ConcurrentRoot : import_constants$1.LegacyRoot;
|
|
41457
41465
|
this.container = reconciler_default.createContainer(this.rootNode, rootTag, null, false, null, "id", () => {}, () => {}, () => {}, () => {});
|
|
41458
41466
|
this.unsubscribeExit = (0, import_signal_exit.default)(this.unmount, { alwaysLast: false });
|
|
41459
41467
|
if (isDev()) reconciler_default.injectIntoDevTools();
|
|
41460
|
-
if (options.patchConsole) this.patchConsole();
|
|
41468
|
+
if (options$2.patchConsole) this.patchConsole();
|
|
41461
41469
|
if (!is_in_ci_default) {
|
|
41462
|
-
options.stdout.on("resize", this.resized);
|
|
41470
|
+
options$2.stdout.on("resize", this.resized);
|
|
41463
41471
|
this.unsubscribeResize = () => {
|
|
41464
|
-
options.stdout.off("resize", this.resized);
|
|
41472
|
+
options$2.stdout.off("resize", this.resized);
|
|
41465
41473
|
};
|
|
41466
41474
|
}
|
|
41467
41475
|
this.initKittyKeyboard();
|
|
@@ -41760,7 +41768,7 @@ var Ink = class {
|
|
|
41760
41768
|
/**
|
|
41761
41769
|
Mount a component and render the output.
|
|
41762
41770
|
*/
|
|
41763
|
-
const render = (node, options) => {
|
|
41771
|
+
const render = (node, options$2) => {
|
|
41764
41772
|
const inkOptions = {
|
|
41765
41773
|
stdout: process$1.stdout,
|
|
41766
41774
|
stdin: process$1.stdin,
|
|
@@ -41771,7 +41779,7 @@ const render = (node, options) => {
|
|
|
41771
41779
|
maxFps: 30,
|
|
41772
41780
|
incrementalRendering: false,
|
|
41773
41781
|
concurrent: false,
|
|
41774
|
-
...getOptions(options)
|
|
41782
|
+
...getOptions(options$2)
|
|
41775
41783
|
};
|
|
41776
41784
|
const instance = getInstance(inkOptions.stdout, () => new Ink(inkOptions), inkOptions.concurrent ?? false);
|
|
41777
41785
|
instance.render(node);
|
|
@@ -42065,8 +42073,8 @@ const parseKittyKeypress = (s) => {
|
|
|
42065
42073
|
const eventType = match[3] ? parseInt(match[3], 10) : 1;
|
|
42066
42074
|
const textField = match[4];
|
|
42067
42075
|
if (!isValidCodepoint(codepoint)) return null;
|
|
42068
|
-
let text;
|
|
42069
|
-
if (textField) text = textField.split(":").map((cp) => safeFromCodePoint(parseInt(cp, 10))).join("");
|
|
42076
|
+
let text$1;
|
|
42077
|
+
if (textField) text$1 = textField.split(":").map((cp) => safeFromCodePoint(parseInt(cp, 10))).join("");
|
|
42070
42078
|
let name;
|
|
42071
42079
|
let isPrintable;
|
|
42072
42080
|
if (codepoint === 32) {
|
|
@@ -42085,7 +42093,7 @@ const parseKittyKeypress = (s) => {
|
|
|
42085
42093
|
name = safeFromCodePoint(codepoint).toLowerCase();
|
|
42086
42094
|
isPrintable = true;
|
|
42087
42095
|
}
|
|
42088
|
-
if (isPrintable && !text) text = safeFromCodePoint(codepoint);
|
|
42096
|
+
if (isPrintable && !text$1) text$1 = safeFromCodePoint(codepoint);
|
|
42089
42097
|
return {
|
|
42090
42098
|
name,
|
|
42091
42099
|
...parseKittyModifiers(modifiers),
|
|
@@ -42094,7 +42102,7 @@ const parseKittyKeypress = (s) => {
|
|
|
42094
42102
|
raw: s,
|
|
42095
42103
|
isKittyProtocol: true,
|
|
42096
42104
|
isPrintable,
|
|
42097
|
-
text
|
|
42105
|
+
text: text$1
|
|
42098
42106
|
};
|
|
42099
42107
|
};
|
|
42100
42108
|
const parseKittySpecialKey = (s) => {
|
|
@@ -42231,17 +42239,17 @@ return …
|
|
|
42231
42239
|
};
|
|
42232
42240
|
```
|
|
42233
42241
|
*/
|
|
42234
|
-
const useInput = (inputHandler, options = {}) => {
|
|
42242
|
+
const useInput = (inputHandler, options$2 = {}) => {
|
|
42235
42243
|
const { stdin, setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = use_stdin_default();
|
|
42236
42244
|
(0, import_react.useEffect)(() => {
|
|
42237
|
-
if (options.isActive === false) return;
|
|
42245
|
+
if (options$2.isActive === false) return;
|
|
42238
42246
|
setRawMode(true);
|
|
42239
42247
|
return () => {
|
|
42240
42248
|
setRawMode(false);
|
|
42241
42249
|
};
|
|
42242
|
-
}, [options.isActive, setRawMode]);
|
|
42250
|
+
}, [options$2.isActive, setRawMode]);
|
|
42243
42251
|
(0, import_react.useEffect)(() => {
|
|
42244
|
-
if (options.isActive === false) return;
|
|
42252
|
+
if (options$2.isActive === false) return;
|
|
42245
42253
|
const handleData = (data) => {
|
|
42246
42254
|
const keypress = parse_keypress_default(data);
|
|
42247
42255
|
const key = {
|
|
@@ -42285,7 +42293,7 @@ const useInput = (inputHandler, options = {}) => {
|
|
|
42285
42293
|
internal_eventEmitter?.removeListener("input", handleData);
|
|
42286
42294
|
};
|
|
42287
42295
|
}, [
|
|
42288
|
-
options.isActive,
|
|
42296
|
+
options$2.isActive,
|
|
42289
42297
|
stdin,
|
|
42290
42298
|
internal_exitOnCtrlC,
|
|
42291
42299
|
inputHandler
|
|
@@ -43152,9 +43160,9 @@ const PlatformServices = Effect.promise(async () => {
|
|
|
43152
43160
|
return Layer.merge(NodeServices.layer, NodeSocket.layerWebSocketConstructor);
|
|
43153
43161
|
}
|
|
43154
43162
|
}).pipe(Layer.unwrap);
|
|
43155
|
-
const runMain = (effect, options) => {
|
|
43156
|
-
if (isBun) import("@effect/platform-bun/BunRuntime").then((BunRuntime) => BunRuntime.runMain(effect, options));
|
|
43157
|
-
else import("@effect/platform-node/NodeRuntime").then((NodeRuntime) => NodeRuntime.runMain(effect, options));
|
|
43163
|
+
const runMain = (effect, options$2) => {
|
|
43164
|
+
if (isBun) import("@effect/platform-bun/BunRuntime").then((BunRuntime) => BunRuntime.runMain(effect, options$2));
|
|
43165
|
+
else import("@effect/platform-node/NodeRuntime").then((NodeRuntime) => NodeRuntime.runMain(effect, options$2));
|
|
43158
43166
|
};
|
|
43159
43167
|
|
|
43160
43168
|
//#endregion
|
|
@@ -43164,11 +43172,72 @@ var AuthError = class extends Schema.TaggedErrorClass()("AuthError", {
|
|
|
43164
43172
|
cause: Schema.optional(Schema.Defect)
|
|
43165
43173
|
}) {};
|
|
43166
43174
|
var AuthProviders = class extends EffectContext.Service()("AuthProviders") {};
|
|
43175
|
+
const AuthProvider = () => (name, impl) => Effect.gen(function* () {
|
|
43176
|
+
const ctx = yield* Effect.context();
|
|
43177
|
+
const providers = yield* AuthProviders;
|
|
43178
|
+
const service = yield* Effect.isEffect(impl) ? impl : Effect.succeed(impl);
|
|
43179
|
+
return yield* Effect.sync(() => providers[name] = {
|
|
43180
|
+
kind: "AuthProvider",
|
|
43181
|
+
name,
|
|
43182
|
+
...Object.fromEntries(Object.entries(service).map(([name$1, fn]) => [name$1, (...args) => fn(...args).pipe(Effect.provideContext(ctx))]))
|
|
43183
|
+
});
|
|
43184
|
+
});
|
|
43185
|
+
/**
|
|
43186
|
+
* Build a Layer that registers an AuthProvider into the {@link AuthProviders}
|
|
43187
|
+
* registry when its parent layer is built. Use this from a provider's
|
|
43188
|
+
* top-level `providers()` Layer so that `alchemy login` can discover the
|
|
43189
|
+
* provider via the registry without forcing credential resolution.
|
|
43190
|
+
*/
|
|
43191
|
+
const AuthProviderLayer = () => (name, impl) => Layer.effectDiscard(AuthProvider()(name, impl));
|
|
43167
43192
|
|
|
43168
43193
|
//#endregion
|
|
43169
43194
|
//#region src/Util/Clank.ts
|
|
43170
43195
|
var PromptCancelled = class extends Data.TaggedError("PromptCancelled") {};
|
|
43171
43196
|
const retryIfCancelled = Effect.retry({ while: (e) => e instanceof PromptCancelled });
|
|
43197
|
+
/**
|
|
43198
|
+
* Wraps a clack prompt (which returns a `Promise<T | symbol>` where the
|
|
43199
|
+
* symbol indicates user cancellation) in an Effect.
|
|
43200
|
+
*
|
|
43201
|
+
* Returns `undefined` if the user cancels (Ctrl+C / Escape).
|
|
43202
|
+
*
|
|
43203
|
+
* Uses `Effect.callback` so fiber interruption propagates via the abort
|
|
43204
|
+
* signal to any async resources we own; the clack prompt itself is left
|
|
43205
|
+
* to resolve — its result is ignored after interruption.
|
|
43206
|
+
*/
|
|
43207
|
+
const prompt = (fn) => Effect.callback((resume$1, signal) => {
|
|
43208
|
+
let settled = false;
|
|
43209
|
+
fn().then((result) => {
|
|
43210
|
+
if (settled || signal.aborted) return;
|
|
43211
|
+
settled = true;
|
|
43212
|
+
if (p.isCancel(result)) resume$1(Effect.fail(new PromptCancelled()));
|
|
43213
|
+
else resume$1(Effect.succeed(result));
|
|
43214
|
+
}, (err) => {
|
|
43215
|
+
if (settled || signal.aborted) return;
|
|
43216
|
+
settled = true;
|
|
43217
|
+
resume$1(Effect.die(err));
|
|
43218
|
+
});
|
|
43219
|
+
});
|
|
43220
|
+
const success = (str) => Effect.sync(() => p.log.success(str));
|
|
43221
|
+
const warn = (str) => Effect.sync(() => p.log.warn(str));
|
|
43222
|
+
const info = (str) => Effect.sync(() => p.log.info(str));
|
|
43223
|
+
const text = (opts) => prompt(() => p.text(opts));
|
|
43224
|
+
const password = (opts) => prompt(() => p.password(opts));
|
|
43225
|
+
const select = (opts) => prompt(() => p.select(opts));
|
|
43226
|
+
const confirm = (opts) => prompt(() => p.confirm(opts));
|
|
43227
|
+
const multiselect = (opts) => prompt(() => p.multiselect(opts));
|
|
43228
|
+
/**
|
|
43229
|
+
* Open a URL in the user's default browser.
|
|
43230
|
+
*
|
|
43231
|
+
* On Windows, uses rundll32's FileProtocolHandler — a built-in shim that
|
|
43232
|
+
* opens URLs in the default browser. It accepts the URL as a direct
|
|
43233
|
+
* argument (no shell, no quoting of `&`). cmd.exe `start` would treat
|
|
43234
|
+
* `&` in OAuth URLs as a command separator, and `explorer.exe` treats
|
|
43235
|
+
* its arg as a path.
|
|
43236
|
+
*/
|
|
43237
|
+
const openUrl = (url) => Effect.gen(function* () {
|
|
43238
|
+
const [cmd, args] = process.platform === "win32" ? ["rundll32.exe", ["url.dll,FileProtocolHandler", url]] : process.platform === "darwin" ? ["open", [url]] : ["xdg-open", [url]];
|
|
43239
|
+
yield* (yield* ChildProcess.make(cmd, [...args], { shell: false })).exitCode;
|
|
43240
|
+
}).pipe(Effect.scoped);
|
|
43172
43241
|
|
|
43173
43242
|
//#endregion
|
|
43174
43243
|
//#region bin/commands/_shared.ts
|
|
@@ -43230,7 +43299,7 @@ const TAIL_COLORS = [
|
|
|
43230
43299
|
];
|
|
43231
43300
|
const TAIL_RESET = "\x1B[0m";
|
|
43232
43301
|
const formatLocalTimestamp = (date) => {
|
|
43233
|
-
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}:${String(date.getSeconds()).padStart(2, "0")}.${String(date.getMilliseconds()).padStart(3, "0")} ${new Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).formatToParts(date).find((p) => p.type === "timeZoneName")?.value ?? ""}`;
|
|
43302
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}:${String(date.getSeconds()).padStart(2, "0")}.${String(date.getMilliseconds()).padStart(3, "0")} ${new Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).formatToParts(date).find((p$1) => p$1.type === "timeZoneName")?.value ?? ""}`;
|
|
43234
43303
|
};
|
|
43235
43304
|
const parseResourceFilter = (filter) => {
|
|
43236
43305
|
if (filter === void 0) return void 0;
|
|
@@ -43666,20 +43735,20 @@ const taggedFunction = (tag, fn) => {
|
|
|
43666
43735
|
|
|
43667
43736
|
//#endregion
|
|
43668
43737
|
//#region src/Stack.ts
|
|
43669
|
-
const Stack = Object.assign(taggedFunction(EffectContext.Service()("Stack"), (stackName, options, eff) => eff.pipe(make$1({
|
|
43738
|
+
const Stack = Object.assign(taggedFunction(EffectContext.Service()("Stack"), (stackName, options$2, eff) => eff.pipe(make$1({
|
|
43670
43739
|
name: stackName,
|
|
43671
|
-
...options
|
|
43740
|
+
...options$2
|
|
43672
43741
|
}), (eff$1) => Object.assign(eff$1, { stage: new Proxy({}, { get: (_, stage$1) => ref({
|
|
43673
43742
|
stack: stackName,
|
|
43674
43743
|
stage: stage$1,
|
|
43675
43744
|
id: stackName
|
|
43676
43745
|
}) }) }))));
|
|
43677
43746
|
const StackName = Stack.use((stack) => Effect.succeed(stack.name));
|
|
43678
|
-
const make$1 = (options) => (effect) => Effect.scope.pipe(Effect.flatMap((scope) => {
|
|
43679
|
-
if (options.state == null) return Effect.die(/* @__PURE__ */ new Error(`Stack "${options.name}" is missing a state store. Add a \`state\` layer to the stack options, e.g.:\n Alchemy.Stack("${options.name}", {\n providers: Cloudflare.providers(),\n state: Cloudflare.state(), // <-- required\n }, ...)\nSee https://alchemy.run/concepts/state-store for available state stores.`));
|
|
43680
|
-
if (options.providers == null) return Effect.die(/* @__PURE__ */ new Error(`Stack "${options.name}" is missing a providers layer. Add a \`providers\` layer to the stack options, e.g.:\n Alchemy.Stack("${options.name}", {\n providers: Cloudflare.providers(), // <-- required\n state: Cloudflare.state(),\n }, ...)`));
|
|
43681
|
-
return options.providers.pipe(Layer.provideMerge(options.state), Layer.provideMerge(Layer.effect(Stack, Stage.asEffect().pipe(Effect.map((stage$1) => options.stack ?? {
|
|
43682
|
-
name: options.name,
|
|
43747
|
+
const make$1 = (options$2) => (effect) => Effect.scope.pipe(Effect.flatMap((scope) => {
|
|
43748
|
+
if (options$2.state == null) return Effect.die(/* @__PURE__ */ new Error(`Stack "${options$2.name}" is missing a state store. Add a \`state\` layer to the stack options, e.g.:\n Alchemy.Stack("${options$2.name}", {\n providers: Cloudflare.providers(),\n state: Cloudflare.state(), // <-- required\n }, ...)\nSee https://alchemy.run/concepts/state-store for available state stores.`));
|
|
43749
|
+
if (options$2.providers == null) return Effect.die(/* @__PURE__ */ new Error(`Stack "${options$2.name}" is missing a providers layer. Add a \`providers\` layer to the stack options, e.g.:\n Alchemy.Stack("${options$2.name}", {\n providers: Cloudflare.providers(), // <-- required\n state: Cloudflare.state(),\n }, ...)`));
|
|
43750
|
+
return options$2.providers.pipe(Layer.provideMerge(options$2.state), Layer.provideMerge(Layer.effect(Stack, Stage.asEffect().pipe(Effect.map((stage$1) => options$2.stack ?? {
|
|
43751
|
+
name: options$2.name,
|
|
43683
43752
|
stage: stage$1,
|
|
43684
43753
|
resources: {},
|
|
43685
43754
|
bindings: {}
|
|
@@ -44808,19 +44877,19 @@ let _lazyMatch = () => {
|
|
|
44808
44877
|
const n = [];
|
|
44809
44878
|
for (; r <= e;) n.push(r++);
|
|
44810
44879
|
return n;
|
|
44811
|
-
}, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: false }).join("")), ur = (r) => {
|
|
44880
|
+
}, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p$1 = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: false }).join("")), ur = (r) => {
|
|
44812
44881
|
const e = {};
|
|
44813
44882
|
return (n) => e[n] ?? (e[n] = r(n));
|
|
44814
|
-
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), fr = l([i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), i(/^(!!)+/, "")]), j = l([
|
|
44883
|
+
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p$1), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p$1), fr = l([i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), i(/^(!!)+/, "")]), j = l([
|
|
44815
44884
|
i(/\/(\*\*\/)+/, "(?:/.+/|/)"),
|
|
44816
44885
|
i(/^(\*\*\/)+/, "(?:^|.*/)"),
|
|
44817
44886
|
i(/\/(\*\*)$/, "(?:/.*|$)"),
|
|
44818
44887
|
i(/\*\*/, ".*")
|
|
44819
|
-
]), N = l([i(/\*\/(?!\*\*\/)/, "[^/]*/"), i(/\*/, "[^/]*")]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Er = l([
|
|
44888
|
+
]), N = l([i(/\*\/(?!\*\*\/)/, "[^/]*/"), i(/\*/, "[^/]*")]), k = i("?", "[^/]"), $r = i("[", p$1), wr = i("]", p$1), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p$1), Er = l([
|
|
44820
44889
|
y,
|
|
44821
44890
|
i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`),
|
|
44822
44891
|
br,
|
|
44823
|
-
i(/[^\]]/, p)
|
|
44892
|
+
i(/[^\]]/, p$1)
|
|
44824
44893
|
]), B = x([
|
|
44825
44894
|
$r,
|
|
44826
44895
|
tr(Ar),
|
|
@@ -44834,7 +44903,7 @@ let _lazyMatch = () => {
|
|
|
44834
44903
|
i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase())
|
|
44835
44904
|
]),
|
|
44836
44905
|
Or
|
|
44837
|
-
]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), F = x([
|
|
44906
|
+
]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p$1), F = x([
|
|
44838
44907
|
kr,
|
|
44839
44908
|
f(l([
|
|
44840
44909
|
j,
|
|
@@ -44863,7 +44932,7 @@ let _lazyMatch = () => {
|
|
|
44863
44932
|
y,
|
|
44864
44933
|
pr,
|
|
44865
44934
|
vr
|
|
44866
|
-
]))), Tr = i(/\\./, p), qr = i(/./, p), Yr = z(f(l([
|
|
44935
|
+
]))), Tr = i(/\\./, p$1), qr = i(/./, p$1), Yr = z(f(l([
|
|
44867
44936
|
Tr,
|
|
44868
44937
|
i(/\*\*\*+/, "*"),
|
|
44869
44938
|
i(/([^/{[(!])\*\*/, (r, e) => `${e}*`),
|
|
@@ -45001,15 +45070,15 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
45001
45070
|
}
|
|
45002
45071
|
return res;
|
|
45003
45072
|
}
|
|
45004
|
-
const isAbsolute = function(p) {
|
|
45005
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
45073
|
+
const isAbsolute = function(p$1) {
|
|
45074
|
+
return _IS_ABSOLUTE_RE.test(p$1);
|
|
45006
45075
|
};
|
|
45007
|
-
const toNamespacedPath = function(p) {
|
|
45008
|
-
return normalizeWindowsPath(p);
|
|
45076
|
+
const toNamespacedPath = function(p$1) {
|
|
45077
|
+
return normalizeWindowsPath(p$1);
|
|
45009
45078
|
};
|
|
45010
|
-
const extname = function(p) {
|
|
45011
|
-
if (p === "..") return "";
|
|
45012
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
45079
|
+
const extname = function(p$1) {
|
|
45080
|
+
if (p$1 === "..") return "";
|
|
45081
|
+
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p$1));
|
|
45013
45082
|
return match && match[1] || "";
|
|
45014
45083
|
};
|
|
45015
45084
|
const relative = function(from, to) {
|
|
@@ -45024,22 +45093,22 @@ const relative = function(from, to) {
|
|
|
45024
45093
|
}
|
|
45025
45094
|
return [..._from.map(() => ".."), ..._to].join("/");
|
|
45026
45095
|
};
|
|
45027
|
-
const dirname = function(p) {
|
|
45028
|
-
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
45096
|
+
const dirname = function(p$1) {
|
|
45097
|
+
const segments = normalizeWindowsPath(p$1).replace(/\/$/, "").split("/").slice(0, -1);
|
|
45029
45098
|
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
45030
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
45099
|
+
return segments.join("/") || (isAbsolute(p$1) ? "/" : ".");
|
|
45031
45100
|
};
|
|
45032
|
-
const format = function(p) {
|
|
45033
|
-
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
45101
|
+
const format = function(p$1) {
|
|
45102
|
+
const ext = p$1.ext ? p$1.ext.startsWith(".") ? p$1.ext : `.${p$1.ext}` : "";
|
|
45034
45103
|
const segments = [
|
|
45035
|
-
p.root,
|
|
45036
|
-
p.dir,
|
|
45037
|
-
p.base ?? (p.name ?? "") + ext
|
|
45104
|
+
p$1.root,
|
|
45105
|
+
p$1.dir,
|
|
45106
|
+
p$1.base ?? (p$1.name ?? "") + ext
|
|
45038
45107
|
].filter(Boolean);
|
|
45039
|
-
return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
|
|
45108
|
+
return normalizeWindowsPath(p$1.root ? resolve(...segments) : segments.join("/"));
|
|
45040
45109
|
};
|
|
45041
|
-
const basename = function(p, extension$2) {
|
|
45042
|
-
const segments = normalizeWindowsPath(p).split("/");
|
|
45110
|
+
const basename = function(p$1, extension$2) {
|
|
45111
|
+
const segments = normalizeWindowsPath(p$1).split("/");
|
|
45043
45112
|
let lastSegment = "";
|
|
45044
45113
|
for (let i = segments.length - 1; i >= 0; i--) {
|
|
45045
45114
|
const val = segments[i];
|
|
@@ -45050,13 +45119,13 @@ const basename = function(p, extension$2) {
|
|
|
45050
45119
|
}
|
|
45051
45120
|
return extension$2 && lastSegment.endsWith(extension$2) ? lastSegment.slice(0, -extension$2.length) : lastSegment;
|
|
45052
45121
|
};
|
|
45053
|
-
const parse = function(p) {
|
|
45054
|
-
const root$1 = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
45055
|
-
const base = basename(p);
|
|
45122
|
+
const parse = function(p$1) {
|
|
45123
|
+
const root$1 = _PATH_ROOT_RE.exec(p$1)?.[0]?.replace(/\\/g, "/") || "";
|
|
45124
|
+
const base = basename(p$1);
|
|
45056
45125
|
const extension$2 = extname(base);
|
|
45057
45126
|
return {
|
|
45058
45127
|
root: root$1,
|
|
45059
|
-
dir: dirname(p),
|
|
45128
|
+
dir: dirname(p$1),
|
|
45060
45129
|
base,
|
|
45061
45130
|
ext: extension$2,
|
|
45062
45131
|
name: base.slice(0, base.length - extension$2.length)
|
|
@@ -45148,7 +45217,7 @@ const asEffect = (effect) => Effect.isEffect(effect) ? effect : Effect.succeed(e
|
|
|
45148
45217
|
|
|
45149
45218
|
//#endregion
|
|
45150
45219
|
//#region src/Plan.ts
|
|
45151
|
-
const make = (stack, options = {}) => Effect.gen(function* () {
|
|
45220
|
+
const make = (stack, options$2 = {}) => Effect.gen(function* () {
|
|
45152
45221
|
const state = yield* State;
|
|
45153
45222
|
const resources = Object.values(stack.resources);
|
|
45154
45223
|
const stackName = stack.name;
|
|
@@ -45286,7 +45355,7 @@ const make = (stack, options = {}) => Effect.gen(function* () {
|
|
|
45286
45355
|
news,
|
|
45287
45356
|
oldBindings,
|
|
45288
45357
|
newBindings
|
|
45289
|
-
}).pipe(providePlanScope(fqn, oldState.instanceId))).pipe(Effect.map((diff$2) => diff$2 ?? { action: havePropsChanged(oldProps, news) || bindingDiffs.some((b) => b.action !== "noop") ? "update" : "noop" }), Effect.map((diff$2) => options.force && diff$2.action === "noop" ? { action: "update" } : diff$2));
|
|
45358
|
+
}).pipe(providePlanScope(fqn, oldState.instanceId))).pipe(Effect.map((diff$2) => diff$2 ?? { action: havePropsChanged(oldProps, news) || bindingDiffs.some((b) => b.action !== "noop") ? "update" : "noop" }), Effect.map((diff$2) => options$2.force && diff$2.action === "noop" ? { action: "update" } : diff$2));
|
|
45290
45359
|
if (oldState.status === "creating") if (diff$1.action === "noop") return Node$1({
|
|
45291
45360
|
action: "create",
|
|
45292
45361
|
props: news,
|
|
@@ -45543,7 +45612,7 @@ const loginCommand = Command.make("login", {
|
|
|
45543
45612
|
const authProviders = {};
|
|
45544
45613
|
const services$1 = Layer.mergeAll(Layer.succeed(AuthProviders, authProviders), ConfigProvider.layer(withProfileOverride(yield* loadConfigProvider(envFile$1), profile$1)), Logger.layer([fileLogger("out")]), Layer.succeed(Stage, stage$1), localState());
|
|
45545
45614
|
yield* Effect.gen(function* () {
|
|
45546
|
-
yield* stackEffect;
|
|
45615
|
+
yield* Effect.catchCause(stackEffect, (cause) => Console.warn(`Ignoring error while building stack for login (likely due to missing or broken credentials):\n${Cause.pretty(cause)}`));
|
|
45547
45616
|
const ci = yield* Config.boolean("CI").pipe(Config.withDefault(false));
|
|
45548
45617
|
const providers = Object.values(authProviders);
|
|
45549
45618
|
if (providers.length === 0) {
|
|
@@ -45637,6 +45706,814 @@ const logsCommand = Command.make("logs", {
|
|
|
45637
45706
|
}).pipe(Effect.provide(services$1));
|
|
45638
45707
|
}));
|
|
45639
45708
|
|
|
45709
|
+
//#endregion
|
|
45710
|
+
//#region src/Auth/Credentials.ts
|
|
45711
|
+
const credentialsDirPath = posix.join(rootDir, "credentials");
|
|
45712
|
+
const credentialsFilePath = (profile$1, provider) => posix.join(credentialsDirPath, profile$1, `${provider}.json`);
|
|
45713
|
+
const readCredentials = Effect.fnUntraced(function* (profile$1, provider) {
|
|
45714
|
+
const data = yield* (yield* FileSystem.FileSystem).readFileString(credentialsFilePath(profile$1, provider)).pipe(Effect.catch(() => Effect.succeed(void 0)));
|
|
45715
|
+
if (data === void 0) return void 0;
|
|
45716
|
+
try {
|
|
45717
|
+
return JSON.parse(data);
|
|
45718
|
+
} catch {
|
|
45719
|
+
return;
|
|
45720
|
+
}
|
|
45721
|
+
});
|
|
45722
|
+
const writeCredentials = Effect.fnUntraced(function* (profile$1, provider, credentials) {
|
|
45723
|
+
const fs$2 = yield* FileSystem.FileSystem;
|
|
45724
|
+
const filePath = credentialsFilePath(profile$1, provider);
|
|
45725
|
+
yield* fs$2.makeDirectory(posix.dirname(filePath), { recursive: true });
|
|
45726
|
+
yield* fs$2.writeFileString(filePath, JSON.stringify(credentials, null, 2));
|
|
45727
|
+
});
|
|
45728
|
+
const deleteCredentials = Effect.fnUntraced(function* (profile$1, provider) {
|
|
45729
|
+
yield* (yield* FileSystem.FileSystem).remove(credentialsFilePath(profile$1, provider)).pipe(Effect.catch(() => Effect.void));
|
|
45730
|
+
});
|
|
45731
|
+
function displayRedacted(r, visibleChars = 4) {
|
|
45732
|
+
const raw = Redacted.value(r);
|
|
45733
|
+
if (raw.length <= visibleChars) return "****";
|
|
45734
|
+
return `${raw.slice(0, visibleChars)}****`;
|
|
45735
|
+
}
|
|
45736
|
+
|
|
45737
|
+
//#endregion
|
|
45738
|
+
//#region src/Auth/Env.ts
|
|
45739
|
+
const getEnv = (key) => Config.string(key).asEffect().pipe(Effect.orElseSucceed(() => void 0));
|
|
45740
|
+
const getEnvRequired = (key) => Config.string(key).asEffect().pipe(Effect.catch(() => Effect.fail(new AuthError({ message: `Missing required env: ${key}` }))));
|
|
45741
|
+
const getEnvRedacted = (key) => Config.redacted(key).asEffect().pipe(Effect.orElseSucceed(() => void 0));
|
|
45742
|
+
const getEnvRedactedRequired = (key) => Config.redacted(key).asEffect().pipe(Effect.catch(() => Effect.fail(new AuthError({ message: `Missing required env: ${key}` }))));
|
|
45743
|
+
const retryOnce = (self$1) => self$1.pipe(Effect.retry({
|
|
45744
|
+
times: 1,
|
|
45745
|
+
while: (e) => e instanceof PromptCancelled
|
|
45746
|
+
}), Effect.mapError((e) => new AuthError({
|
|
45747
|
+
message: "User cancelled prompt",
|
|
45748
|
+
cause: e
|
|
45749
|
+
})));
|
|
45750
|
+
|
|
45751
|
+
//#endregion
|
|
45752
|
+
//#region src/AWS/AuthProvider.ts
|
|
45753
|
+
const AWS_AUTH_PROVIDER_NAME = "AWS";
|
|
45754
|
+
/**
|
|
45755
|
+
* Layer that registers the AWS {@link AuthProvider} into the
|
|
45756
|
+
* {@link AuthProviders} registry when built. Include this in the AWS
|
|
45757
|
+
* `providers()` layer so `alchemy login` can discover it.
|
|
45758
|
+
*/
|
|
45759
|
+
const AwsAuth = AuthProviderLayer()(AWS_AUTH_PROVIDER_NAME, {
|
|
45760
|
+
configure: (profileName, ctx) => configureCredentials$1(profileName, ctx),
|
|
45761
|
+
login: (profileName, config) => login$1(profileName, config),
|
|
45762
|
+
logout: (profileName, config) => logout$1(profileName, config),
|
|
45763
|
+
prettyPrint: (profileName, config) => prettyPrint$1(profileName, config),
|
|
45764
|
+
read: (profileName, config) => resolveCredentials$1(profileName, config)
|
|
45765
|
+
});
|
|
45766
|
+
const options$1 = [
|
|
45767
|
+
{
|
|
45768
|
+
value: "sso",
|
|
45769
|
+
label: "SSO",
|
|
45770
|
+
hint: "aws sso login — credentials loaded from AWS SSO cache"
|
|
45771
|
+
},
|
|
45772
|
+
{
|
|
45773
|
+
value: "env",
|
|
45774
|
+
label: "Environment Variables",
|
|
45775
|
+
hint: "AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY"
|
|
45776
|
+
},
|
|
45777
|
+
{
|
|
45778
|
+
value: "stored",
|
|
45779
|
+
label: "Stored",
|
|
45780
|
+
hint: "stored in ~/.alchemy/credentials"
|
|
45781
|
+
}
|
|
45782
|
+
];
|
|
45783
|
+
const runSsoCommand = (command, ssoProfile) => Effect.gen(function* () {
|
|
45784
|
+
const exit = yield* (yield* ChildProcess.make("aws", [
|
|
45785
|
+
"sso",
|
|
45786
|
+
command,
|
|
45787
|
+
"--profile",
|
|
45788
|
+
ssoProfile
|
|
45789
|
+
], {
|
|
45790
|
+
shell: false,
|
|
45791
|
+
stdin: "inherit",
|
|
45792
|
+
stdout: "inherit",
|
|
45793
|
+
stderr: "inherit"
|
|
45794
|
+
})).exitCode;
|
|
45795
|
+
if (exit !== 0) yield* Effect.fail(new AuthError({ message: `aws sso ${command} exited with code ${exit}` }));
|
|
45796
|
+
}).pipe(Effect.scoped);
|
|
45797
|
+
const resolveCredentials$1 = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, Effect.fnUntraced(function* () {
|
|
45798
|
+
return {
|
|
45799
|
+
accessKeyId: yield* getEnvRedactedRequired("AWS_ACCESS_KEY_ID"),
|
|
45800
|
+
secretAccessKey: yield* getEnvRedactedRequired("AWS_SECRET_ACCESS_KEY"),
|
|
45801
|
+
sessionToken: yield* getEnvRedacted("AWS_SESSION_TOKEN"),
|
|
45802
|
+
region: yield* getEnv("AWS_REGION") ?? getEnv("AWS_DEFAULT_REGION") ?? void 0,
|
|
45803
|
+
source: { type: "env" }
|
|
45804
|
+
};
|
|
45805
|
+
})), Match.when({ method: "stored" }, () => readCredentials(profileName, "aws").pipe(Effect.flatMap((creds) => creds == null ? Effect.fail(new AuthError({ message: "AWS stored credentials not found. Run: alchemy-effect login --configure" })) : Effect.succeed({
|
|
45806
|
+
accessKeyId: Redacted.make(creds.accessKeyId),
|
|
45807
|
+
secretAccessKey: Redacted.make(creds.secretAccessKey),
|
|
45808
|
+
sessionToken: creds.sessionToken ? Redacted.make(creds.sessionToken) : void 0,
|
|
45809
|
+
region: creds.region,
|
|
45810
|
+
source: { type: "stored" }
|
|
45811
|
+
})))), Match.when({ method: "sso" }, (config$1) => Effect.gen(function* () {
|
|
45812
|
+
const auth = yield* Auth.Default;
|
|
45813
|
+
const creds = yield* auth.loadProfileCredentials(config$1.ssoProfile).pipe(Effect.mapError((e) => new AuthError({
|
|
45814
|
+
message: "failed to load credentials",
|
|
45815
|
+
cause: e
|
|
45816
|
+
})));
|
|
45817
|
+
const profile$1 = yield* auth.loadProfile(config$1.ssoProfile).pipe(Effect.catch(() => Effect.succeed(void 0)));
|
|
45818
|
+
return {
|
|
45819
|
+
accessKeyId: creds.accessKeyId,
|
|
45820
|
+
secretAccessKey: creds.secretAccessKey,
|
|
45821
|
+
sessionToken: creds.sessionToken,
|
|
45822
|
+
region: profile$1?.region,
|
|
45823
|
+
source: {
|
|
45824
|
+
type: "sso",
|
|
45825
|
+
details: config$1.ssoProfile
|
|
45826
|
+
}
|
|
45827
|
+
};
|
|
45828
|
+
})), Match.exhaustive).pipe(Effect.mapError((e) => new AuthError({
|
|
45829
|
+
message: "login failed",
|
|
45830
|
+
cause: e
|
|
45831
|
+
})));
|
|
45832
|
+
const prettyPrint$1 = (profileName, config) => resolveCredentials$1(profileName, config).pipe(Effect.tap((creds) => Effect.all([
|
|
45833
|
+
Console.log(` accessKeyId: ${displayRedacted(creds.accessKeyId)}`),
|
|
45834
|
+
Console.log(` secretAccessKey: ${displayRedacted(creds.secretAccessKey)}`),
|
|
45835
|
+
creds.sessionToken ? Console.log(` sessionToken: ${displayRedacted(creds.sessionToken)}`) : Effect.void,
|
|
45836
|
+
creds.region ? Console.log(` region: ${creds.region}`) : Effect.void,
|
|
45837
|
+
Console.log(` source: ${creds.source.details ? `${creds.source.type} - ${creds.source.details}` : creds.source.type}`)
|
|
45838
|
+
])), Effect.catch((e) => Console.error(` Failed to retrieve credentials: ${e}`)));
|
|
45839
|
+
/**
|
|
45840
|
+
* `aws sso logout` only clears AWS CLI's own caches — it does not know about the
|
|
45841
|
+
* `<sha1(sso_session)>.credentials.json` file that `@distilled.cloud/aws`
|
|
45842
|
+
* writes alongside the SSO token. Without this cleanup, `loadProfileCredentials`
|
|
45843
|
+
* short-circuits on the stale distilled cache file after logout and appears to
|
|
45844
|
+
* stay logged in until the role creds hit their TTL.
|
|
45845
|
+
*/
|
|
45846
|
+
const clearDistilledSsoCache = (ssoProfile) => Effect.gen(function* () {
|
|
45847
|
+
const ssoSession = (yield* (yield* Auth.Default).loadProfile(ssoProfile)).sso_session;
|
|
45848
|
+
if (!ssoSession) return;
|
|
45849
|
+
const fs$2 = yield* FileSystem.FileSystem;
|
|
45850
|
+
const path = yield* Path$1.Path;
|
|
45851
|
+
const hash = NodeCrypto.createHash("sha1").update(ssoSession).digest("hex");
|
|
45852
|
+
const cacheFile = path.join(NodeOs.homedir(), ".aws", "sso", "cache", `${hash}.credentials.json`);
|
|
45853
|
+
yield* fs$2.remove(cacheFile).pipe(Effect.catch(() => Effect.void));
|
|
45854
|
+
}).pipe(Effect.catch(() => Effect.void));
|
|
45855
|
+
const logout$1 = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, () => Effect.void), Match.when({ method: "sso" }, (config$1) => info(`AWS: running 'aws sso logout --profile ${config$1.ssoProfile}'...`).pipe(Effect.zip(runSsoCommand("logout", config$1.ssoProfile)), Effect.zip(clearDistilledSsoCache(config$1.ssoProfile)), Effect.match({
|
|
45856
|
+
onSuccess: () => success("AWS: SSO logout complete"),
|
|
45857
|
+
onFailure: (e) => warn(`AWS: SSO logout failed: \`${e.message}\``)
|
|
45858
|
+
}))), Match.when({ method: "stored" }, () => deleteCredentials(profileName, "aws").pipe(Effect.andThen(success("AWS: stored credentials removed")))), Match.exhaustive);
|
|
45859
|
+
const login$1 = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, () => Effect.void), Match.when({ method: "sso" }, (config$1) => Auth.loadProfileCredentials(config$1.ssoProfile).pipe(Effect.matchEffect({
|
|
45860
|
+
onSuccess: () => info(`AWS: SSO profile '${config$1.ssoProfile}' already has valid credentials`),
|
|
45861
|
+
onFailure: () => loginSSO(config$1)
|
|
45862
|
+
}))), Match.when({ method: "stored" }, () => readCredentials(profileName, "aws").pipe(Effect.flatMap((creds) => creds == null ? loginStored$1(profileName) : Effect.void))), Match.exhaustive).pipe(Effect.mapError((e) => new AuthError({
|
|
45863
|
+
message: "login failed",
|
|
45864
|
+
cause: e
|
|
45865
|
+
})));
|
|
45866
|
+
const configureCredentials$1 = (profileName, ctx) => Effect.gen(function* () {
|
|
45867
|
+
if (ctx.ci) return { method: "env" };
|
|
45868
|
+
return yield* configureInteractive$1(profileName);
|
|
45869
|
+
}).pipe(Effect.mapError((e) => new AuthError({
|
|
45870
|
+
message: "failed to configure credentials",
|
|
45871
|
+
cause: e
|
|
45872
|
+
})));
|
|
45873
|
+
const configureInteractive$1 = (profileName) => select({
|
|
45874
|
+
message: "AWS authentication method",
|
|
45875
|
+
options: options$1
|
|
45876
|
+
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("sso", () => Effect.gen(function* () {
|
|
45877
|
+
const config = {
|
|
45878
|
+
method: "sso",
|
|
45879
|
+
ssoProfile: (yield* text({
|
|
45880
|
+
message: "AWS profile name (from ~/.aws/config)",
|
|
45881
|
+
placeholder: "default",
|
|
45882
|
+
defaultValue: "default"
|
|
45883
|
+
})) ?? "default"
|
|
45884
|
+
};
|
|
45885
|
+
yield* loginSSO(config);
|
|
45886
|
+
return config;
|
|
45887
|
+
})), Match.when("stored", () => loginStored$1(profileName)), Match.exhaustive)));
|
|
45888
|
+
const loginSSO = (config) => info(`AWS SSO: running 'aws sso login --profile ${config.ssoProfile}'...`).pipe(Effect.andThen(runSsoCommand("login", config.ssoProfile)), Effect.matchEffect({
|
|
45889
|
+
onSuccess: () => success("AWS SSO: login complete"),
|
|
45890
|
+
onFailure: (e) => warn(`AWS SSO: login faield: \`${e.message}\``)
|
|
45891
|
+
}));
|
|
45892
|
+
const loginStored$1 = Effect.fnUntraced(function* (profileName) {
|
|
45893
|
+
yield* writeCredentials(profileName, "aws", {
|
|
45894
|
+
accessKeyId: yield* text({
|
|
45895
|
+
message: "AWS Access Key ID",
|
|
45896
|
+
validate: (v) => v.length === 0 ? "Required" : void 0
|
|
45897
|
+
}).pipe(retryOnce),
|
|
45898
|
+
secretAccessKey: yield* password({
|
|
45899
|
+
message: "AWS Secret Access Key",
|
|
45900
|
+
validate: (v) => v.length === 0 ? "Required" : void 0
|
|
45901
|
+
}).pipe(retryOnce),
|
|
45902
|
+
sessionToken: yield* text({
|
|
45903
|
+
message: "AWS Session Token (optional — press Enter or Esc to skip)",
|
|
45904
|
+
placeholder: "(none)"
|
|
45905
|
+
}).pipe(Effect.catch(() => Effect.succeed(""))),
|
|
45906
|
+
region: yield* text({
|
|
45907
|
+
message: "AWS Region",
|
|
45908
|
+
placeholder: "us-east-1",
|
|
45909
|
+
defaultValue: "us-east-1"
|
|
45910
|
+
}).pipe(retryOnce)
|
|
45911
|
+
});
|
|
45912
|
+
yield* success("AWS credentials saved.");
|
|
45913
|
+
return { method: "stored" };
|
|
45914
|
+
});
|
|
45915
|
+
|
|
45916
|
+
//#endregion
|
|
45917
|
+
//#region src/Cloudflare/Auth/OAuthClient.ts
|
|
45918
|
+
var OAuthError = class extends Data.TaggedError("OAuthError") {};
|
|
45919
|
+
function generateState(length = 32) {
|
|
45920
|
+
return crypto$1.randomBytes(length).toString("base64url");
|
|
45921
|
+
}
|
|
45922
|
+
function generatePKCE(length = 96) {
|
|
45923
|
+
const verifier = crypto$1.randomBytes(length).toString("base64url");
|
|
45924
|
+
return {
|
|
45925
|
+
verifier,
|
|
45926
|
+
challenge: crypto$1.createHash("sha256").update(verifier).digest("base64url")
|
|
45927
|
+
};
|
|
45928
|
+
}
|
|
45929
|
+
function extractCredentials(json) {
|
|
45930
|
+
return {
|
|
45931
|
+
type: "oauth",
|
|
45932
|
+
access: json.access_token,
|
|
45933
|
+
refresh: json.refresh_token,
|
|
45934
|
+
expires: Date.now() + json.expires_in * 1e3,
|
|
45935
|
+
scopes: json.scope.split(" ")
|
|
45936
|
+
};
|
|
45937
|
+
}
|
|
45938
|
+
const tokenRequest = (body) => Effect.gen(function* () {
|
|
45939
|
+
const res = yield* Effect.tryPromise({
|
|
45940
|
+
try: () => fetch(OAUTH_ENDPOINTS.token, {
|
|
45941
|
+
method: "POST",
|
|
45942
|
+
headers: {
|
|
45943
|
+
Accept: "application/json",
|
|
45944
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
45945
|
+
},
|
|
45946
|
+
body: new URLSearchParams(body).toString()
|
|
45947
|
+
}),
|
|
45948
|
+
catch: (err) => new OAuthError({
|
|
45949
|
+
error: "network_error",
|
|
45950
|
+
errorDescription: `Token request failed: ${err}`
|
|
45951
|
+
})
|
|
45952
|
+
});
|
|
45953
|
+
if (!res.ok) {
|
|
45954
|
+
const json = yield* Effect.tryPromise({
|
|
45955
|
+
try: () => res.json(),
|
|
45956
|
+
catch: () => new OAuthError({
|
|
45957
|
+
error: "parse_error",
|
|
45958
|
+
errorDescription: `Token endpoint returned ${res.status}`
|
|
45959
|
+
})
|
|
45960
|
+
});
|
|
45961
|
+
return yield* new OAuthError({
|
|
45962
|
+
error: json.error,
|
|
45963
|
+
errorDescription: json.error_description
|
|
45964
|
+
});
|
|
45965
|
+
}
|
|
45966
|
+
return extractCredentials(yield* Effect.tryPromise({
|
|
45967
|
+
try: () => res.json(),
|
|
45968
|
+
catch: () => new OAuthError({
|
|
45969
|
+
error: "parse_error",
|
|
45970
|
+
errorDescription: "Failed to parse token response"
|
|
45971
|
+
})
|
|
45972
|
+
}));
|
|
45973
|
+
});
|
|
45974
|
+
/**
|
|
45975
|
+
* Generate an authorization URL with PKCE for the given scopes.
|
|
45976
|
+
*/
|
|
45977
|
+
function authorize(scopes) {
|
|
45978
|
+
const state = generateState();
|
|
45979
|
+
const pkce = generatePKCE();
|
|
45980
|
+
const url = new URL(OAUTH_ENDPOINTS.authorize);
|
|
45981
|
+
url.searchParams.set("client_id", OAUTH_CLIENT_ID);
|
|
45982
|
+
url.searchParams.set("redirect_uri", OAUTH_REDIRECT_URI);
|
|
45983
|
+
url.searchParams.set("response_type", "code");
|
|
45984
|
+
url.searchParams.set("scope", scopes.join(" "));
|
|
45985
|
+
url.searchParams.set("state", state);
|
|
45986
|
+
url.searchParams.set("code_challenge", pkce.challenge);
|
|
45987
|
+
url.searchParams.set("code_challenge_method", "S256");
|
|
45988
|
+
return {
|
|
45989
|
+
url: url.toString(),
|
|
45990
|
+
state,
|
|
45991
|
+
verifier: pkce.verifier
|
|
45992
|
+
};
|
|
45993
|
+
}
|
|
45994
|
+
/**
|
|
45995
|
+
* Exchange an authorization code for OAuth credentials.
|
|
45996
|
+
*/
|
|
45997
|
+
const exchange = (code, verifier) => tokenRequest({
|
|
45998
|
+
grant_type: "authorization_code",
|
|
45999
|
+
code,
|
|
46000
|
+
code_verifier: verifier,
|
|
46001
|
+
client_id: OAUTH_CLIENT_ID,
|
|
46002
|
+
redirect_uri: OAUTH_REDIRECT_URI
|
|
46003
|
+
});
|
|
46004
|
+
/**
|
|
46005
|
+
* Refresh expired OAuth credentials.
|
|
46006
|
+
*/
|
|
46007
|
+
const refresh = (credentials) => tokenRequest({
|
|
46008
|
+
grant_type: "refresh_token",
|
|
46009
|
+
refresh_token: credentials.refresh,
|
|
46010
|
+
client_id: OAUTH_CLIENT_ID,
|
|
46011
|
+
redirect_uri: OAUTH_REDIRECT_URI
|
|
46012
|
+
});
|
|
46013
|
+
/**
|
|
46014
|
+
* Revoke OAuth credentials.
|
|
46015
|
+
*/
|
|
46016
|
+
const revoke = (credentials) => Effect.gen(function* () {
|
|
46017
|
+
yield* Effect.tryPromise({
|
|
46018
|
+
try: () => fetch(OAUTH_ENDPOINTS.revoke, {
|
|
46019
|
+
method: "POST",
|
|
46020
|
+
headers: {
|
|
46021
|
+
Accept: "application/json",
|
|
46022
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
46023
|
+
},
|
|
46024
|
+
body: new URLSearchParams({
|
|
46025
|
+
refresh_token: credentials.refresh,
|
|
46026
|
+
client_id: OAUTH_CLIENT_ID,
|
|
46027
|
+
redirect_uri: OAUTH_REDIRECT_URI
|
|
46028
|
+
}).toString()
|
|
46029
|
+
}),
|
|
46030
|
+
catch: (err) => new OAuthError({
|
|
46031
|
+
error: "network_error",
|
|
46032
|
+
errorDescription: `Revoke request failed: ${err}`
|
|
46033
|
+
})
|
|
46034
|
+
});
|
|
46035
|
+
});
|
|
46036
|
+
/**
|
|
46037
|
+
* Start a local HTTP server to listen for the OAuth callback, exchange
|
|
46038
|
+
* the authorization code, and return the credentials.
|
|
46039
|
+
*
|
|
46040
|
+
* Times out after 5 minutes.
|
|
46041
|
+
*/
|
|
46042
|
+
const callback = (authorization) => Effect.tryPromise({
|
|
46043
|
+
try: () => callbackPromise(authorization),
|
|
46044
|
+
catch: (err) => {
|
|
46045
|
+
if (err instanceof OAuthError) return err;
|
|
46046
|
+
return new OAuthError({
|
|
46047
|
+
error: "callback_error",
|
|
46048
|
+
errorDescription: `OAuth callback failed: ${err}`
|
|
46049
|
+
});
|
|
46050
|
+
}
|
|
46051
|
+
});
|
|
46052
|
+
function callbackPromise(authorization) {
|
|
46053
|
+
const { pathname, port: port$1 } = new URL(OAUTH_REDIRECT_URI);
|
|
46054
|
+
return new Promise((resolve$1, reject) => {
|
|
46055
|
+
const server = http.createServer(async (req, res) => {
|
|
46056
|
+
const url = new URL(req.url ?? "/", `http://${req.headers.host}`);
|
|
46057
|
+
if (url.pathname !== pathname) {
|
|
46058
|
+
res.statusCode = 404;
|
|
46059
|
+
res.end("Not Found");
|
|
46060
|
+
return;
|
|
46061
|
+
}
|
|
46062
|
+
const error = url.searchParams.get("error");
|
|
46063
|
+
const errorDescription = url.searchParams.get("error_description");
|
|
46064
|
+
if (error) {
|
|
46065
|
+
res.writeHead(302, { Location: "https://alchemy.run/auth/error" });
|
|
46066
|
+
res.end();
|
|
46067
|
+
cleanup();
|
|
46068
|
+
reject(new OAuthError({
|
|
46069
|
+
error,
|
|
46070
|
+
errorDescription: errorDescription ?? "An unknown error occurred."
|
|
46071
|
+
}));
|
|
46072
|
+
return;
|
|
46073
|
+
}
|
|
46074
|
+
const code = url.searchParams.get("code");
|
|
46075
|
+
const state = url.searchParams.get("state");
|
|
46076
|
+
if (!code || !state) {
|
|
46077
|
+
res.writeHead(302, { Location: "https://alchemy.run/auth/error" });
|
|
46078
|
+
res.end();
|
|
46079
|
+
cleanup();
|
|
46080
|
+
reject(new OAuthError({
|
|
46081
|
+
error: "invalid_request",
|
|
46082
|
+
errorDescription: "Missing code or state"
|
|
46083
|
+
}));
|
|
46084
|
+
return;
|
|
46085
|
+
}
|
|
46086
|
+
if (state !== authorization.state) {
|
|
46087
|
+
res.writeHead(302, { Location: "https://alchemy.run/auth/error" });
|
|
46088
|
+
res.end();
|
|
46089
|
+
cleanup();
|
|
46090
|
+
reject(new OAuthError({
|
|
46091
|
+
error: "invalid_request",
|
|
46092
|
+
errorDescription: "Invalid state"
|
|
46093
|
+
}));
|
|
46094
|
+
return;
|
|
46095
|
+
}
|
|
46096
|
+
try {
|
|
46097
|
+
const credentials = await Effect.runPromise(exchange(code, authorization.verifier));
|
|
46098
|
+
res.writeHead(302, { Location: "https://alchemy.run/auth/success" });
|
|
46099
|
+
res.end();
|
|
46100
|
+
cleanup();
|
|
46101
|
+
resolve$1(credentials);
|
|
46102
|
+
} catch (err) {
|
|
46103
|
+
res.writeHead(302, { Location: "https://alchemy.run/auth/error" });
|
|
46104
|
+
res.end();
|
|
46105
|
+
cleanup();
|
|
46106
|
+
reject(err);
|
|
46107
|
+
}
|
|
46108
|
+
});
|
|
46109
|
+
const timeout = setTimeout(() => {
|
|
46110
|
+
cleanup();
|
|
46111
|
+
reject(new OAuthError({
|
|
46112
|
+
error: "timeout",
|
|
46113
|
+
errorDescription: "The authorization process timed out."
|
|
46114
|
+
}));
|
|
46115
|
+
}, 300 * 1e3);
|
|
46116
|
+
function cleanup() {
|
|
46117
|
+
clearTimeout(timeout);
|
|
46118
|
+
server.close();
|
|
46119
|
+
}
|
|
46120
|
+
server.on("error", (err) => {
|
|
46121
|
+
cleanup();
|
|
46122
|
+
reject(new OAuthError({
|
|
46123
|
+
error: "server_error",
|
|
46124
|
+
errorDescription: `Failed to start callback server: ${err.message}`
|
|
46125
|
+
}));
|
|
46126
|
+
});
|
|
46127
|
+
server.listen(Number(port$1));
|
|
46128
|
+
});
|
|
46129
|
+
}
|
|
46130
|
+
|
|
46131
|
+
//#endregion
|
|
46132
|
+
//#region src/Cloudflare/Auth/AuthProvider.ts
|
|
46133
|
+
const options = [
|
|
46134
|
+
{
|
|
46135
|
+
value: "oauth",
|
|
46136
|
+
label: "OAuth",
|
|
46137
|
+
hint: "recommended — browser-based login with automatic token refresh"
|
|
46138
|
+
},
|
|
46139
|
+
{
|
|
46140
|
+
value: "env",
|
|
46141
|
+
label: "Environment Variables",
|
|
46142
|
+
hint: "CLOUDFLARE_API_TOKEN or CLOUDFLARE_API_KEY + CLOUDFLARE_EMAIL"
|
|
46143
|
+
},
|
|
46144
|
+
{
|
|
46145
|
+
value: "stored",
|
|
46146
|
+
label: "API Token or API Key",
|
|
46147
|
+
hint: "enter credentials interactively, stored in ~/.alchemy/credentials"
|
|
46148
|
+
}
|
|
46149
|
+
];
|
|
46150
|
+
const CLOUDFLARE_AUTH_PROVIDER_NAME = "Cloudflare";
|
|
46151
|
+
/**
|
|
46152
|
+
* Layer that registers the Cloudflare {@link AuthProvider} into the
|
|
46153
|
+
* {@link AuthProviders} registry when built. Include this in the Cloudflare
|
|
46154
|
+
* `providers()` layer so `alchemy login` can discover it.
|
|
46155
|
+
*/
|
|
46156
|
+
const CloudflareAuth = AuthProviderLayer()(CLOUDFLARE_AUTH_PROVIDER_NAME, {
|
|
46157
|
+
configure: (profileName, ctx) => configureCredentials(profileName, ctx),
|
|
46158
|
+
logout: (profileName, config) => logout(profileName, config),
|
|
46159
|
+
login: (profileName, config) => login(profileName, config),
|
|
46160
|
+
prettyPrint: (profileName, config) => prettyPrint(profileName, config),
|
|
46161
|
+
read: (profileName, config) => resolveCredentials(profileName, config)
|
|
46162
|
+
});
|
|
46163
|
+
const resolveCredentials = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, Effect.fnUntraced(function* () {
|
|
46164
|
+
const accountId = yield* getEnvRequired("CLOUDFLARE_ACCOUNT_ID");
|
|
46165
|
+
const apiToken = yield* getEnvRedacted("CLOUDFLARE_API_TOKEN");
|
|
46166
|
+
if (apiToken) return {
|
|
46167
|
+
type: "apiToken",
|
|
46168
|
+
apiToken,
|
|
46169
|
+
accountId,
|
|
46170
|
+
source: { type: "env" }
|
|
46171
|
+
};
|
|
46172
|
+
const apiKey = yield* getEnvRedacted("CLOUDFLARE_API_KEY");
|
|
46173
|
+
const email = yield* getEnvRedacted("CLOUDFLARE_EMAIL");
|
|
46174
|
+
if (apiKey && email) return {
|
|
46175
|
+
type: "apiKey",
|
|
46176
|
+
apiKey,
|
|
46177
|
+
email,
|
|
46178
|
+
accountId,
|
|
46179
|
+
source: { type: "env" }
|
|
46180
|
+
};
|
|
46181
|
+
return yield* new AuthError({ message: "Cloudflare env credentials not found. Set CLOUDFLARE_API_TOKEN or CLOUDFLARE_API_KEY + CLOUDFLARE_EMAIL." });
|
|
46182
|
+
})), Match.when({ method: "stored" }, () => readCredentials(profileName, "cf-stored").pipe(Effect.flatMap((creds) => creds == null ? Effect.fail(new AuthError({ message: "Cloudflare stored credentials not found. Run: alchemy-effect login --configure" })) : Effect.succeed(Match.value(creds).pipe(Match.when({ type: "apiToken" }, (c) => ({
|
|
46183
|
+
type: "apiToken",
|
|
46184
|
+
apiToken: Redacted.make(c.apiToken),
|
|
46185
|
+
accountId: c.accountId,
|
|
46186
|
+
source: { type: "stored" }
|
|
46187
|
+
})), Match.when({ type: "apiKey" }, (c) => ({
|
|
46188
|
+
type: "apiKey",
|
|
46189
|
+
apiKey: Redacted.make(c.apiKey),
|
|
46190
|
+
email: Redacted.make(c.email),
|
|
46191
|
+
accountId: c.accountId,
|
|
46192
|
+
source: { type: "stored" }
|
|
46193
|
+
})), Match.exhaustive))))), Match.when({ method: "oauth" }, (cfg) => Effect.gen(function* () {
|
|
46194
|
+
const creds = yield* readCredentials(profileName, "cf-oauth");
|
|
46195
|
+
if (creds == null || creds.type !== "oauth") return yield* Effect.fail(new AuthError({ message: "Cloudflare OAuth credentials not found. Run: alchemy login" }));
|
|
46196
|
+
const fresh = creds.expires > Date.now() + 1e4 ? creds : yield* refresh(creds).pipe(Effect.tap((refreshed) => writeCredentials(profileName, "cf-oauth", refreshed)), Effect.mapError((e) => new AuthError({
|
|
46197
|
+
message: "Cloudflare OAuth refresh failed. Run: alchemy login",
|
|
46198
|
+
cause: e
|
|
46199
|
+
})));
|
|
46200
|
+
return {
|
|
46201
|
+
type: "oauth",
|
|
46202
|
+
accessToken: Redacted.make(fresh.access),
|
|
46203
|
+
expires: fresh.expires,
|
|
46204
|
+
accountId: cfg.accountId,
|
|
46205
|
+
source: { type: "oauth" }
|
|
46206
|
+
};
|
|
46207
|
+
})), Match.exhaustive);
|
|
46208
|
+
const logout = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, () => Effect.void), Match.when({ method: "stored" }, () => deleteCredentials(profileName, "cf-stored").pipe(Effect.andThen(success("Cloudflare: stored credentials removed")))), Match.when({ method: "oauth" }, () => readCredentials(profileName, "cf-oauth").pipe(Effect.tap((creds) => creds?.type === "oauth" ? revoke(creds).pipe(Effect.catchTag("OAuthError", (err) => warn(`Cloudflare: could not revoke OAuth token: ${err.errorDescription}`))) : Effect.void), Effect.andThen(deleteCredentials(profileName, "cf-oauth")), Effect.andThen(success("Cloudflare: OAuth credentials removed.")))), Match.exhaustive);
|
|
46209
|
+
const login = (profileName, config) => Match.value(config).pipe(Match.when({ method: "env" }, () => Effect.void), Match.when({ method: "stored" }, () => readCredentials(profileName, "cf-stored").pipe(Effect.flatMap((creds) => creds == null ? loginStored(profileName) : Effect.void))), Match.when({ method: "oauth" }, (c) => Effect.gen(function* () {
|
|
46210
|
+
const creds = yield* readCredentials(profileName, "cf-oauth");
|
|
46211
|
+
if (creds?.type === "oauth" && creds.expires > Date.now() + 1e4) {
|
|
46212
|
+
yield* info("Cloudflare: OAuth credentials are still valid.");
|
|
46213
|
+
return;
|
|
46214
|
+
}
|
|
46215
|
+
if (creds?.type === "oauth") {
|
|
46216
|
+
yield* info("Cloudflare: refreshing OAuth credentials...");
|
|
46217
|
+
yield* refresh(creds).pipe(Effect.flatMap((refreshed) => writeCredentials(profileName, "cf-oauth", refreshed).pipe(Effect.andThen(success("Cloudflare: OAuth credentials refreshed.")))), Effect.catchTag("OAuthError", () => oauthLogin(profileName, c.scopes).pipe(Effect.asVoid)));
|
|
46218
|
+
return;
|
|
46219
|
+
}
|
|
46220
|
+
yield* oauthLogin(profileName, c.scopes);
|
|
46221
|
+
})), Match.exhaustive).pipe(Effect.mapError((e) => new AuthError({
|
|
46222
|
+
message: "login failed",
|
|
46223
|
+
cause: e
|
|
46224
|
+
})));
|
|
46225
|
+
const configureCredentials = (profileName, ctx) => Effect.gen(function* () {
|
|
46226
|
+
if (ctx.ci) return { method: "env" };
|
|
46227
|
+
return yield* configureInteractive(profileName);
|
|
46228
|
+
}).pipe(Effect.mapError((e) => new AuthError({
|
|
46229
|
+
message: "failed to configure credentials",
|
|
46230
|
+
cause: e
|
|
46231
|
+
})));
|
|
46232
|
+
const configureInteractive = (profileName) => select({
|
|
46233
|
+
message: "Cloudflare authentication method",
|
|
46234
|
+
options
|
|
46235
|
+
}).pipe(Effect.flatMap((method) => Match.value(method).pipe(Match.when("env", () => Effect.succeed({ method: "env" })), Match.when("oauth", () => configureOAuth(profileName)), Match.when("stored", () => loginStored(profileName)), Match.exhaustive)));
|
|
46236
|
+
const configureOAuth = Effect.fnUntraced(function* (profileName) {
|
|
46237
|
+
const scopes = yield* promptOAuthScopes();
|
|
46238
|
+
return {
|
|
46239
|
+
method: "oauth",
|
|
46240
|
+
scopes,
|
|
46241
|
+
accountId: yield* selectAccount((yield* oauthLogin(profileName, scopes)).access).pipe(Effect.mapError((e) => new AuthError({
|
|
46242
|
+
message: "Cloudflare: could not list accounts",
|
|
46243
|
+
cause: e
|
|
46244
|
+
})))
|
|
46245
|
+
};
|
|
46246
|
+
});
|
|
46247
|
+
const loginStored = Effect.fnUntraced(function* (profileName) {
|
|
46248
|
+
const credentialType = yield* select({
|
|
46249
|
+
message: "Cloudflare credential type",
|
|
46250
|
+
options: [{
|
|
46251
|
+
value: "apiToken",
|
|
46252
|
+
label: "API Token",
|
|
46253
|
+
hint: "recommended"
|
|
46254
|
+
}, {
|
|
46255
|
+
value: "apiKey",
|
|
46256
|
+
label: "API Key + Email"
|
|
46257
|
+
}]
|
|
46258
|
+
}).pipe(retryOnce);
|
|
46259
|
+
return yield* Match.value(credentialType).pipe(Match.when("apiToken", () => Effect.gen(function* () {
|
|
46260
|
+
yield* writeCredentials(profileName, "cf-stored", {
|
|
46261
|
+
type: "apiToken",
|
|
46262
|
+
apiToken: yield* password({
|
|
46263
|
+
message: "Cloudflare API Token",
|
|
46264
|
+
validate: (v) => v.length === 0 ? "Required" : void 0
|
|
46265
|
+
}).pipe(retryOnce),
|
|
46266
|
+
accountId: yield* promptAccountId()
|
|
46267
|
+
});
|
|
46268
|
+
yield* success("Cloudflare: credentials saved.");
|
|
46269
|
+
return {
|
|
46270
|
+
method: "stored",
|
|
46271
|
+
credentialType: "apiToken"
|
|
46272
|
+
};
|
|
46273
|
+
})), Match.when("apiKey", () => Effect.gen(function* () {
|
|
46274
|
+
yield* writeCredentials(profileName, "cf-stored", {
|
|
46275
|
+
type: "apiKey",
|
|
46276
|
+
apiKey: yield* text({
|
|
46277
|
+
message: "Cloudflare API Key",
|
|
46278
|
+
validate: (v) => v.length === 0 ? "Required" : void 0
|
|
46279
|
+
}).pipe(retryOnce),
|
|
46280
|
+
email: yield* text({
|
|
46281
|
+
message: "Cloudflare Email",
|
|
46282
|
+
validate: (v) => v.length === 0 ? "Required" : void 0
|
|
46283
|
+
}).pipe(retryOnce),
|
|
46284
|
+
accountId: yield* promptAccountId()
|
|
46285
|
+
});
|
|
46286
|
+
yield* success("Cloudflare: credentials saved.");
|
|
46287
|
+
return {
|
|
46288
|
+
method: "stored",
|
|
46289
|
+
credentialType: "apiKey"
|
|
46290
|
+
};
|
|
46291
|
+
})), Match.exhaustive);
|
|
46292
|
+
});
|
|
46293
|
+
const oauthLogin = (profileName, scopes) => Effect.gen(function* () {
|
|
46294
|
+
const authorization = authorize([...scopes, "offline_access"]);
|
|
46295
|
+
yield* info("Cloudflare: opening browser for OAuth login...");
|
|
46296
|
+
yield* info(authorization.url);
|
|
46297
|
+
yield* openUrl(authorization.url).pipe(Effect.catch(() => warn("Cloudflare: could not open browser automatically. Please open the URL above manually.")));
|
|
46298
|
+
yield* info("Cloudflare: waiting for authorization (up to 5 minutes)...");
|
|
46299
|
+
const credentials = yield* callback(authorization);
|
|
46300
|
+
yield* writeCredentials(profileName, "cf-oauth", credentials);
|
|
46301
|
+
yield* success("Cloudflare: OAuth credentials saved.");
|
|
46302
|
+
return credentials;
|
|
46303
|
+
});
|
|
46304
|
+
const promptAccountId = () => getEnv("CLOUDFLARE_ACCOUNT_ID").pipe(Effect.flatMap((envAccountId) => text({
|
|
46305
|
+
message: "Cloudflare Account ID (Enter to skip)",
|
|
46306
|
+
placeholder: envAccountId ?? "",
|
|
46307
|
+
defaultValue: envAccountId ?? ""
|
|
46308
|
+
}).pipe(retryOnce)));
|
|
46309
|
+
const promptOAuthScopes = () => confirm({
|
|
46310
|
+
message: "Customize OAuth scopes? (default covers typical use cases)",
|
|
46311
|
+
initialValue: false
|
|
46312
|
+
}).pipe(retryOnce, Effect.flatMap((customize) => {
|
|
46313
|
+
if (!customize) return Effect.succeed([...DEFAULT_SCOPES]);
|
|
46314
|
+
return multiselect({
|
|
46315
|
+
message: "Select OAuth scopes",
|
|
46316
|
+
initialValues: DEFAULT_SCOPES,
|
|
46317
|
+
options: Object.entries(ALL_SCOPES).map(([value, hint]) => ({
|
|
46318
|
+
value,
|
|
46319
|
+
label: value,
|
|
46320
|
+
hint
|
|
46321
|
+
})),
|
|
46322
|
+
required: true
|
|
46323
|
+
}).pipe(Effect.map((s) => s), retryOnce);
|
|
46324
|
+
}));
|
|
46325
|
+
const withOAuthCredentials = (accessToken, effect) => Effect.provide(effect, Layer.mergeAll(CfCredentialsModule.fromOAuth({
|
|
46326
|
+
load: Effect.succeed({ accessToken }),
|
|
46327
|
+
refresh: () => Effect.die("refresh not expected during account selection")
|
|
46328
|
+
}), FetchHttpClient.layer));
|
|
46329
|
+
const selectAccount = (accessToken) => Effect.gen(function* () {
|
|
46330
|
+
const accounts = (yield* (yield* cfAccounts.listAccounts)({})).result;
|
|
46331
|
+
if (accounts.length === 0) yield* new AuthError({ message: "Cloudflare: no accounts found for this credential." });
|
|
46332
|
+
if (accounts.length === 1) {
|
|
46333
|
+
const account = accounts[0];
|
|
46334
|
+
yield* info(`Cloudflare: using account: ${account.name} (${account.id})`);
|
|
46335
|
+
return account.id;
|
|
46336
|
+
}
|
|
46337
|
+
return yield* select({
|
|
46338
|
+
message: "Select a Cloudflare account",
|
|
46339
|
+
options: accounts.map((a) => ({
|
|
46340
|
+
value: a.id,
|
|
46341
|
+
label: a.name,
|
|
46342
|
+
hint: a.id
|
|
46343
|
+
}))
|
|
46344
|
+
}).pipe(retryOnce);
|
|
46345
|
+
}).pipe((e) => withOAuthCredentials(accessToken, e));
|
|
46346
|
+
const prettyPrint = (profileName, config) => resolveCredentials(profileName, config).pipe(Effect.tap((creds) => {
|
|
46347
|
+
const sourceStr = creds.source.details ? `${creds.source.type} - ${creds.source.details}` : creds.source.type;
|
|
46348
|
+
return Match.value(creds).pipe(Match.when({ type: "apiToken" }, (c) => Effect.all([
|
|
46349
|
+
Console.log(` apiToken: ${displayRedacted(c.apiToken, 9)}`),
|
|
46350
|
+
Console.log(` accountId: ${c.accountId}`),
|
|
46351
|
+
Console.log(` source: ${sourceStr}`)
|
|
46352
|
+
])), Match.when({ type: "apiKey" }, (c) => Effect.all([
|
|
46353
|
+
Console.log(` apiKey: ${displayRedacted(c.apiKey)}`),
|
|
46354
|
+
Console.log(` email: ${displayRedacted(c.email)}`),
|
|
46355
|
+
Console.log(` accountId: ${c.accountId}`),
|
|
46356
|
+
Console.log(` source: ${sourceStr}`)
|
|
46357
|
+
])), Match.when({ type: "oauth" }, (c) => {
|
|
46358
|
+
const remainingMs = c.expires - Date.now();
|
|
46359
|
+
const expiresAt = new Date(c.expires).toISOString();
|
|
46360
|
+
const expiresStr = remainingMs <= 0 ? `expired (${expiresAt})` : `in ${Duration.format(Duration.millis(remainingMs))} (${expiresAt})`;
|
|
46361
|
+
return Effect.all([
|
|
46362
|
+
Console.log(` accessToken: ${displayRedacted(c.accessToken)}`),
|
|
46363
|
+
Console.log(` expires: ${expiresStr}`),
|
|
46364
|
+
Console.log(` accountId: ${c.accountId}`),
|
|
46365
|
+
Console.log(` source: ${sourceStr}`)
|
|
46366
|
+
]);
|
|
46367
|
+
}), Match.exhaustive);
|
|
46368
|
+
}), Effect.catch((e) => Console.error(` Failed to retrieve credentials: ${e}`)));
|
|
46369
|
+
const ALL_SCOPES = {
|
|
46370
|
+
"access:read": "See Cloudflare Access data such as zones, applications, certificates, device postures, groups, identity providers, login counts, organizations, policies, service tokens, and users",
|
|
46371
|
+
"access:write": "See and change Cloudflare Access data such as zones, applications, certificates, device postures, groups, identity providers, login counts, organizations, policies, service tokens, and users",
|
|
46372
|
+
"account:read": "See your account info such as account details, analytics, and memberships",
|
|
46373
|
+
"agw:read": "Grants read level access to Agents Gateway",
|
|
46374
|
+
"agw:run": "Grants run level access to Agents Gateway",
|
|
46375
|
+
"agw:write": "Grants read and write level access to Agents Gateway",
|
|
46376
|
+
"ai:read": "Grants read level access to Workers AI",
|
|
46377
|
+
"ai:write": "Grants write level access to Workers AI",
|
|
46378
|
+
"aiaudit:read": "Grants read level access to AI Audit",
|
|
46379
|
+
"aiaudit:write": "Grants write level access to AI Audit",
|
|
46380
|
+
"aig:read": "Grants read level access to AI Gateway",
|
|
46381
|
+
"aig:write": "Grants write level access to AI Gateway",
|
|
46382
|
+
"auditlogs:read": "View Cloudflare Account Audit Logs",
|
|
46383
|
+
"browser:read": "Grants read level access to Browser Rendering",
|
|
46384
|
+
"browser:write": "Grants write level access to Browser Rendering",
|
|
46385
|
+
"cfone:read": "Grants read level access to Cloudforce One data",
|
|
46386
|
+
"cfone:write": "Grants write level access to Cloudforce One data",
|
|
46387
|
+
"cloudchamber:write": "See and make changes to Cloudchamber",
|
|
46388
|
+
"connectivity:admin": "See, change, and bind to Connectivity Directory services, including creating services targeting Cloudflare Tunnel",
|
|
46389
|
+
"connectivity:bind": "read, list, and bind to Connectivity Directory services, as well as read and list Cloudflare Tunnels",
|
|
46390
|
+
"connectivity:read": "See Connectivity Directory services and Cloudflare Tunnels",
|
|
46391
|
+
"constellation:write": "Grants write access to Constellation configuration and models",
|
|
46392
|
+
"containers:write": "See and make changes to Workers Containers",
|
|
46393
|
+
"d1:write": "See and make changes to D1",
|
|
46394
|
+
"dex:read": "Grants read level access to Cloudflare DEX",
|
|
46395
|
+
"dex:write": "Grants write level access to Cloudflare DEX",
|
|
46396
|
+
"dns_analytics:read": "Grants read level access to Cloudflare DNS Analytics",
|
|
46397
|
+
"dns_records:edit": "Grants edit level access to dns records",
|
|
46398
|
+
"dns_records:read": "Grants read level access to dns records",
|
|
46399
|
+
"dns_settings:read": "Grants read level access to Cloudflare DNS Settings",
|
|
46400
|
+
"firstpartytags:write": "Can see, edit and publish Google tag gateway configuration.",
|
|
46401
|
+
"lb:edit": "Grants edit level access to lb and lb pools",
|
|
46402
|
+
"lb:read": "Grants read level access to lb and lb pools",
|
|
46403
|
+
"logpush:read": "See Cloudflare Logpush data",
|
|
46404
|
+
"logpush:write": "See and change Cloudflare Logpush data",
|
|
46405
|
+
"notification:read": "View Cloudflare Notifications",
|
|
46406
|
+
"notification:write": "View and Modify Cloudflare Notifications",
|
|
46407
|
+
"pages:read": "See Cloudflare Pages projects, settings and deployments",
|
|
46408
|
+
"pages:write": "See and change Cloudflare Pages projects, settings and deployments",
|
|
46409
|
+
"pipelines:read": "Grants read level access to Cloudflare Pipelines",
|
|
46410
|
+
"pipelines:setup": "Grants permission to generate R2 tokens for Workers Pipelines",
|
|
46411
|
+
"pipelines:write": "Grants write level access to Cloudflare Pipelines",
|
|
46412
|
+
"query_cache:write": "See and make changes to Hyperdrive",
|
|
46413
|
+
"queues:write": "See and change Cloudflare Queues settings and data",
|
|
46414
|
+
"r2_catalog:write": "Grants write level access to R2 Data Catalog",
|
|
46415
|
+
"radar:read": "Grants access to read Cloudflare Radar data",
|
|
46416
|
+
"ai-search:read": "Grants read level access to AI Search",
|
|
46417
|
+
"ai-search:write": "Grants write level access to AI Search",
|
|
46418
|
+
"ai-search:run": "Grants run level access to AI Search",
|
|
46419
|
+
"secrets_store:read": "Grants read level access to Secrets Store",
|
|
46420
|
+
"secrets_store:write": "Grants write level access to Secrets Store",
|
|
46421
|
+
"ssl_certs:write": "Grants read and write access to SSL MTLS certificates or Certificate Store",
|
|
46422
|
+
"sso-connector:read": "See Cloudflare SSO connectors",
|
|
46423
|
+
"sso-connector:write": "See Cloudflare SSO connectors to toggle activation and deactivation of SSO",
|
|
46424
|
+
"teams:pii": "See personally identifiable Cloudflare Teams data",
|
|
46425
|
+
"teams:read": "See Cloudflare Teams data such as zones, gateway, and argo tunnel details",
|
|
46426
|
+
"teams:secure_location": "See all DNS Location data but can only change secure DNS Locations",
|
|
46427
|
+
"teams:write": "See and change Cloudflare Teams data such as zones, gateway, and argo tunnel details",
|
|
46428
|
+
"url_scanner:read": "Grants read level access to URL Scanner",
|
|
46429
|
+
"url_scanner:write": "Grants write level access to URL Scanner",
|
|
46430
|
+
"user:read": "See your user info such as name, email address, and account memberships",
|
|
46431
|
+
"vectorize:write": "See and make changes to Vectorize",
|
|
46432
|
+
"workers:read": "See Cloudflare Workers data such as zones, KV storage, R2 storage, scripts, and routes",
|
|
46433
|
+
"workers:write": "See and change Cloudflare Workers data such as zones, KV storage, R2 storage, scripts, and routes",
|
|
46434
|
+
"workers_builds:read": "See Cloudflare Workers Builds data such as builds, build configuration, and build logs",
|
|
46435
|
+
"workers_builds:write": "See and change Cloudflare Workers Builds data such as builds, build configuration, and build logs",
|
|
46436
|
+
"workers_kv:write": "See and change Cloudflare Workers KV Storage data such as keys and namespaces",
|
|
46437
|
+
"workers_observability:read": "Grants read access to Cloudflare Workers Observability",
|
|
46438
|
+
"workers_observability_telemetry:write": "Grants write access to Cloudflare Workers Observability Telemetry API",
|
|
46439
|
+
"workers_routes:write": "See and change Cloudflare Workers data such as filters and routes",
|
|
46440
|
+
"workers_scripts:write": "See and change Cloudflare Workers scripts, durable objects, subdomains, triggers, and tail data",
|
|
46441
|
+
"workers_tail:read": "See Cloudflare Workers tail and script data",
|
|
46442
|
+
"zone:read": "Grants read level access to account zone"
|
|
46443
|
+
};
|
|
46444
|
+
const DEFAULT_SCOPES = [
|
|
46445
|
+
"account:read",
|
|
46446
|
+
"ai-search:write",
|
|
46447
|
+
"ai-search:run",
|
|
46448
|
+
"ai:write",
|
|
46449
|
+
"cloudchamber:write",
|
|
46450
|
+
"connectivity:admin",
|
|
46451
|
+
"containers:write",
|
|
46452
|
+
"d1:write",
|
|
46453
|
+
"pages:write",
|
|
46454
|
+
"pipelines:write",
|
|
46455
|
+
"queues:write",
|
|
46456
|
+
"secrets_store:write",
|
|
46457
|
+
"ssl_certs:write",
|
|
46458
|
+
"user:read",
|
|
46459
|
+
"vectorize:write",
|
|
46460
|
+
"workers_kv:write",
|
|
46461
|
+
"workers_routes:write",
|
|
46462
|
+
"workers_scripts:write",
|
|
46463
|
+
"workers_tail:read",
|
|
46464
|
+
"workers:write",
|
|
46465
|
+
"zone:read"
|
|
46466
|
+
];
|
|
46467
|
+
const OAUTH_CLIENT_ID = "6d8c2255-0773-45f6-b376-2914632e6f91";
|
|
46468
|
+
const OAUTH_REDIRECT_URI = "http://localhost:9976/auth/callback";
|
|
46469
|
+
const OAUTH_ENDPOINTS = {
|
|
46470
|
+
authorize: "https://dash.cloudflare.com/oauth2/authorize",
|
|
46471
|
+
token: "https://dash.cloudflare.com/oauth2/token",
|
|
46472
|
+
revoke: "https://dash.cloudflare.com/oauth2/revoke"
|
|
46473
|
+
};
|
|
46474
|
+
|
|
46475
|
+
//#endregion
|
|
46476
|
+
//#region bin/commands/profile.ts
|
|
46477
|
+
const showCommand = Command.make("show", {
|
|
46478
|
+
profile,
|
|
46479
|
+
envFile
|
|
46480
|
+
}, Effect.fnUntraced(function* ({ profile: profile$1, envFile: envFile$1 }) {
|
|
46481
|
+
const stored = yield* getProfile(profile$1);
|
|
46482
|
+
if (stored == null) {
|
|
46483
|
+
const config = yield* readConfig;
|
|
46484
|
+
const names = Object.keys(config.profiles);
|
|
46485
|
+
yield* Console.log(`Profile '${profile$1}' not found.`);
|
|
46486
|
+
if (names.length > 0) yield* Console.log(`Available profiles: ${names.sort().join(", ")}`);
|
|
46487
|
+
else yield* Console.log("No profiles configured. Run `alchemy login`.");
|
|
46488
|
+
return;
|
|
46489
|
+
}
|
|
46490
|
+
yield* Console.log(`Profile: ${profile$1}`);
|
|
46491
|
+
const providerNames = Object.keys(stored).sort();
|
|
46492
|
+
if (providerNames.length === 0) {
|
|
46493
|
+
yield* Console.log("(no providers configured)");
|
|
46494
|
+
return;
|
|
46495
|
+
}
|
|
46496
|
+
const authProviders = {};
|
|
46497
|
+
const authRegistry = Layer.succeed(AuthProviders, authProviders);
|
|
46498
|
+
const services$1 = Layer.mergeAll(authRegistry, ConfigProvider.layer(withProfileOverride(yield* loadConfigProvider(envFile$1), profile$1)), Logger.layer([fileLogger("out")]), Layer.provide(Layer.mergeAll(CloudflareAuth, AwsAuth), authRegistry));
|
|
46499
|
+
yield* Effect.gen(function* () {
|
|
46500
|
+
for (const name of providerNames) {
|
|
46501
|
+
const cfg = stored[name];
|
|
46502
|
+
yield* Console.log("");
|
|
46503
|
+
yield* Console.log(`── ${name} ──`);
|
|
46504
|
+
const provider = authProviders[name];
|
|
46505
|
+
if (provider == null) {
|
|
46506
|
+
yield* Console.log(`method: ${cfg.method}`);
|
|
46507
|
+
const { method: _method,...rest } = cfg;
|
|
46508
|
+
for (const [k, v] of Object.entries(rest)) yield* Console.log(`${k}: ${typeof v === "string" ? v : JSON.stringify(v)}`);
|
|
46509
|
+
continue;
|
|
46510
|
+
}
|
|
46511
|
+
yield* provider.prettyPrint(profile$1, cfg);
|
|
46512
|
+
}
|
|
46513
|
+
}).pipe(Effect.provide(services$1));
|
|
46514
|
+
}));
|
|
46515
|
+
const profileCommand = Command.make("profile", {}).pipe(Command.withSubcommands([showCommand]));
|
|
46516
|
+
|
|
45640
46517
|
//#endregion
|
|
45641
46518
|
//#region bin/commands/state.ts
|
|
45642
46519
|
/**
|
|
@@ -45856,6 +46733,7 @@ const root = Command$1.make("alchemy", {}).pipe(Command$1.withSubcommands([
|
|
|
45856
46733
|
tailCommand,
|
|
45857
46734
|
logsCommand,
|
|
45858
46735
|
loginCommand,
|
|
46736
|
+
profileCommand,
|
|
45859
46737
|
stateCommand
|
|
45860
46738
|
]));
|
|
45861
46739
|
const cli = Command$1.run(root, { version });
|