From 413bc9c37e8742a3befb17b61a40b32992880746 Mon Sep 17 00:00:00 2001 From: Martin Domajnko <35891136+martines3000@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:45:51 +0100 Subject: [PATCH] feat: update handling of OIDC auth requests (dynamic presentation submission creation) (#658) --- .changeset/fast-rats-change.md | 6 + .changeset/shaggy-humans-bake.md | 5 + libs/oidc/client-plugin/package.json | 4 +- .../client-plugin/src/agent/client-plugin.ts | 199 +- .../src/types/IOIDCClientPlugin.ts | 4 +- package.json | 5 +- packages/dapp/src/messages/en.json | 1 + packages/snap/package.json | 8 +- packages/snap/snap.manifest.json | 3 +- packages/snap/src/veramo/Veramo.service.ts | 26 +- patches/@astronautlabs__jsonpath.patch | 531 ++ patches/escodegen.patch | 5431 +++++++++++++++++ pnpm-lock.yaml | 1757 +++--- 13 files changed, 6968 insertions(+), 1012 deletions(-) create mode 100644 .changeset/fast-rats-change.md create mode 100644 .changeset/shaggy-humans-bake.md create mode 100644 patches/@astronautlabs__jsonpath.patch create mode 100644 patches/escodegen.patch diff --git a/.changeset/fast-rats-change.md b/.changeset/fast-rats-change.md new file mode 100644 index 000000000..76b1cdb62 --- /dev/null +++ b/.changeset/fast-rats-change.md @@ -0,0 +1,6 @@ +--- +"@blockchain-lab-um/oidc-client-plugin": minor +"@blockchain-lab-um/masca": minor +--- + +Update handling of oidc auth requests. diff --git a/.changeset/shaggy-humans-bake.md b/.changeset/shaggy-humans-bake.md new file mode 100644 index 000000000..3c9728335 --- /dev/null +++ b/.changeset/shaggy-humans-bake.md @@ -0,0 +1,5 @@ +--- +"@blockchain-lab-um/dapp": patch +--- + +Resolve missing intl translation diff --git a/libs/oidc/client-plugin/package.json b/libs/oidc/client-plugin/package.json index f1ba4b43a..da161ba8e 100644 --- a/libs/oidc/client-plugin/package.json +++ b/libs/oidc/client-plugin/package.json @@ -22,7 +22,7 @@ "dependencies": { "@blockchain-lab-um/oidc-types": "0.1.0-beta.0", "@blockchain-lab-um/utils": "1.4.0-beta.1", - "@sphereon/pex": "^2.0.1", + "@sphereon/pex": "^3.3.3", "@veramo/core": "6.0.0", "@veramo/utils": "6.0.0", "cross-fetch": "^4.0.0", @@ -31,7 +31,7 @@ "qs": "^6.11.2" }, "devDependencies": { - "@sphereon/ssi-types": "^0.11.0", + "@sphereon/ssi-types": "0.22.0", "@types/qs": "^6.9.12", "@vitest/coverage-v8": "1.6.0", "jest-extended": "4.0.2", diff --git a/libs/oidc/client-plugin/src/agent/client-plugin.ts b/libs/oidc/client-plugin/src/agent/client-plugin.ts index f174dd9cc..5b1bb3769 100644 --- a/libs/oidc/client-plugin/src/agent/client-plugin.ts +++ b/libs/oidc/client-plugin/src/agent/client-plugin.ts @@ -14,12 +14,14 @@ import { type Result, ResultObject, qsCustomDecoder, - uint8ArrayToHex, } from '@blockchain-lab-um/utils'; -import { PEX } from '@sphereon/pex'; -import type { IVerifiableCredential } from '@sphereon/ssi-types'; +import { PEX, PresentationSubmissionLocation } from '@sphereon/pex'; +import type { + IVerifiableCredential, + OriginalVerifiableCredential, +} from '@sphereon/ssi-types'; import type { IAgentPlugin } from '@veramo/core'; -import { bytesToBase64url } from '@veramo/utils'; +import { bytesToBase64url, decodeCredentialToObject } from '@veramo/utils'; import { fetch } from 'cross-fetch'; import { sha256 } from 'ethereum-cryptography/sha256.js'; import { decodeJwt } from 'jose'; @@ -75,7 +77,6 @@ export class OIDCClientPlugin implements IAgentPlugin { codeVerifier: null, }; - // FIXME: Set proxy to masca.io public proxyUrl = 'https://masca.io/api/proxy/oidc'; readonly methods: IOIDCClientPlugin = { @@ -520,9 +521,9 @@ export class OIDCClientPlugin implements IAgentPlugin { return ResultObject.error('Nonce is required'); } - if (authorizationRequest.scope !== 'openid') { - return ResultObject.error('Only openid scope is supported'); - } + // if (authorizationRequest.scope !== 'openid') { + // return ResultObject.error('Only openid scope is supported'); + // } if (!authorizationRequest.client_id) { return ResultObject.error('Client id is required'); @@ -564,20 +565,13 @@ export class OIDCClientPlugin implements IAgentPlugin { authorizationRequest.presentation_definition = presentationDefinition; this.current.presentationDefinition = presentationDefinition; } else { - this.current.presentationDefinition = JSON.parse( - authorizationRequest.presentation_definition as unknown as string - ) as unknown as PresentationDefinition; + this.current.presentationDefinition = + typeof authorizationRequest.presentation_definition === 'string' + ? (JSON.parse( + authorizationRequest.presentation_definition as unknown as string + ) as unknown as PresentationDefinition) + : (authorizationRequest.presentation_definition as unknown as PresentationDefinition); } - - // This is only if we combine the specs with SIOPv2 - // if ( - // authorizationRequest.id_token_type && - // authorizationRequest.id_token_type !== 'subject_signed' - // ) { - // return ResultObject.error( - // 'Only subject_signed id token type is supported' - // ); - // } } this.current.authorizationRequest = authorizationRequest; @@ -593,7 +587,7 @@ export class OIDCClientPlugin implements IAgentPlugin { public async selectCredentials( args: SelectCredentialsArgs - ): Promise> { + ): Promise> { const { credentials } = args; if (!credentials) { @@ -607,54 +601,40 @@ export class OIDCClientPlugin implements IAgentPlugin { return ResultObject.error('Presentation definition not found'); } - const map = new Map(); - - const errors: string[] = []; - - // FIXME: Workaround, because PEX doesn't work correctly with multiple input descriptors - presentationDefinition.input_descriptors.forEach((inputDescriptor) => { - const presentationDefinitionSplit: PresentationDefinition = { - id: presentationDefinition.id, - format: presentationDefinition.format, - input_descriptors: [inputDescriptor], - }; - - const { verifiableCredential } = pex.selectFrom( - presentationDefinitionSplit, - credentials - ); - - if (!verifiableCredential || verifiableCredential.length === 0) { - errors.push(inputDescriptor.id); - } else { - // Add credentials to hash map (unique by hash) - for (const credential of verifiableCredential) { - const hash = uint8ArrayToHex( - sha256(Buffer.from(JSON.stringify(credential))) + // NOTE: We filter out `JwtDecodedVerifiableCredential` | `SdJwtDecodedVerifiableCredential` types + const decodedCredentials = ( + credentials + .map((credential) => + typeof credential === 'string' + ? (decodeCredentialToObject(credential) as IVerifiableCredential) + : credential + ) + .filter((credential) => { + const castCredentialToVerifiableCredential = + credential as IVerifiableCredential; + + return ( + castCredentialToVerifiableCredential.proof !== undefined && + (Array.isArray(castCredentialToVerifiableCredential.proof) + ? castCredentialToVerifiableCredential.proof[0].jwt !== undefined + : castCredentialToVerifiableCredential.proof.jwt !== undefined) ); + }) as IVerifiableCredential[] + ).map((credential: any) => + Array.isArray(credential.proof) + ? (credential.proof[0].jwt as string) + : (credential.proof.jwt as string) + ); - if (!map.has(hash)) { - map.set(hash, credential); - } - } - } - }); + const result = pex.selectFrom(presentationDefinition, decodedCredentials); - if (errors.length > 0) { + if (result.areRequiredCredentialsPresent === 'error') { return ResultObject.error( - `Failed to select credentials for input descriptors: ${errors.join( - ', ' - )}` + 'Not all credential requests could be satisfied' ); } - const verifiableCredential = Array.from(map.values()); - - if (!verifiableCredential) { - return ResultObject.error('Failed to select credentials'); - } - - return ResultObject.success(verifiableCredential); + return ResultObject.success(result.verifiableCredential ?? []); } public async createPresentationSubmission( @@ -673,92 +653,13 @@ export class OIDCClientPlugin implements IAgentPlugin { return ResultObject.error('Presentation definition not found'); } - // FIXME: Pex doesn't work even with workarounds - // Hardcoded to work with EBSI Conformance Tests - const presentationSubmission: PresentationSubmission = { - id: window.crypto.randomUUID(), - definition_id: presentationDefinition.id, - descriptor_map: [ - { - id: 'same-device-in-time-credential', - path: '$', - format: 'jwt_vp', - path_nested: { - id: 'same-device-in-time-credential', - format: 'jwt_vc', - path: `$.verifiableCredential[${credentials.findIndex( - (credential: any) => - credential.type.includes('CTWalletSameInTime') - )}]`, - }, - }, - { - id: 'cross-device-in-time-credential', - path: '$', - format: 'jwt_vp', - path_nested: { - id: 'cross-device-in-time-credential', - format: 'jwt_vc', - path: `$.verifiableCredential[${credentials.findIndex( - (credential: any) => - credential.type.includes('CTWalletCrossInTime') - )}]`, - }, - }, - { - id: 'same-device-deferred-credential', - path: '$', - format: 'jwt_vp', - path_nested: { - id: 'same-device-deferred-credential', - format: 'jwt_vc', - path: `$.verifiableCredential[${credentials.findIndex( - (credential: any) => - credential.type.includes('CTWalletSameDeferred') - )}]`, - }, - }, - { - id: 'cross-device-deferred-credential', - path: '$', - format: 'jwt_vp', - path_nested: { - id: 'cross-device-deferred-credential', - format: 'jwt_vc', - path: `$.verifiableCredential[${credentials.findIndex( - (credential: any) => - credential.type.includes('CTWalletCrossDeferred') - )}]`, - }, - }, - { - id: 'same-device-pre_authorised-credential', - path: '$', - format: 'jwt_vp', - path_nested: { - id: 'same-device-pre_authorised-credential', - format: 'jwt_vc', - path: `$.verifiableCredential[${credentials.findIndex( - (credential: any) => - credential.type.includes('CTWalletSamePreAuthorised') - )}]`, - }, - }, - { - id: 'cross-device-pre_authorised-credential', - path: '$', - format: 'jwt_vp', - path_nested: { - id: 'cross-device-pre_authorised-credential', - format: 'jwt_vc', - path: `$.verifiableCredential[${credentials.findIndex( - (credential: any) => - credential.type.includes('CTWalletCrossPreAuthorised') - )}]`, - }, - }, - ], - }; + const presentationSubmission = pex.presentationSubmissionFrom( + presentationDefinition, + credentials, + { + presentationSubmissionLocation: PresentationSubmissionLocation.EXTERNAL, + } + ); return ResultObject.success(presentationSubmission); } diff --git a/libs/oidc/client-plugin/src/types/IOIDCClientPlugin.ts b/libs/oidc/client-plugin/src/types/IOIDCClientPlugin.ts index 9eabbcc7a..7eb81bc6b 100644 --- a/libs/oidc/client-plugin/src/types/IOIDCClientPlugin.ts +++ b/libs/oidc/client-plugin/src/types/IOIDCClientPlugin.ts @@ -8,7 +8,7 @@ import type { TokenResponse, } from '@blockchain-lab-um/oidc-types'; import type { Result } from '@blockchain-lab-um/utils'; -import type { IVerifiableCredential } from '@sphereon/ssi-types'; +import type { OriginalVerifiableCredential } from '@sphereon/ssi-types'; import type { IAgentContext, IPluginMethodMap, IResolver } from '@veramo/core'; import type { @@ -45,7 +45,7 @@ export interface IOIDCClientPlugin extends IPluginMethodMap { ): Promise>; selectCredentials( args: SelectCredentialsArgs - ): Promise>; + ): Promise>; createPresentationSubmission( args: CreatePresentationSubmissionArgs ): Promise>; diff --git a/package.json b/package.json index dd869d8d3..df45b091b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "email": "blockchain-lab@um.si", "url": "https://blockchain-lab.um.si" }, - "scripts": { "build": "pnpm nx run-many --target=build", "build:docker": "./scripts/build-docker.sh", @@ -80,7 +79,9 @@ "did-jwt@6.11.6": "patches/did-jwt@6.11.6.patch", "@iden3/js-jsonld-merklization@1.2.0": "patches/@iden3__js-jsonld-merklization@1.2.0.patch", "did-jwt@8.0.4": "patches/did-jwt@8.0.4.patch", - "@metamask/snaps-sdk": "patches/@metamask__snaps-sdk.patch" + "@metamask/snaps-sdk": "patches/@metamask__snaps-sdk.patch", + "@astronautlabs/jsonpath": "patches/@astronautlabs__jsonpath.patch", + "escodegen": "patches/escodegen.patch" }, "allowNonAppliedPatches": false } diff --git a/packages/dapp/src/messages/en.json b/packages/dapp/src/messages/en.json index 6d37707da..d22404772 100644 --- a/packages/dapp/src/messages/en.json +++ b/packages/dapp/src/messages/en.json @@ -485,6 +485,7 @@ "title": "Modify Credential" }, "OIDCAuthView": { + "start": "Start OIDC Authorization Request", "error": "Failed to finish OIDC Authorization Request!", "finished": "Authorization Request finished", "new-scan": "Scan New Code", diff --git a/packages/snap/package.json b/packages/snap/package.json index aec434599..068e8c070 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -71,6 +71,7 @@ "@metamask/providers": "17.1.2", "@metamask/snaps-sdk": "6.9.0", "@metamask/utils": "9.3.0", + "@sphereon/pex": "3.3.3", "@veramo/core": "6.0.0", "@veramo/credential-eip712": "6.0.0", "@veramo/credential-ld": "6.0.0", @@ -101,20 +102,21 @@ }, "devDependencies": { "@ceramicnetwork/streamid": "2.17.0", - "@metamask/snaps-cli": "6.5.0", + "@metamask/snaps-cli": "6.6.0", "@metamask/snaps-utils": "8.4.1", + "@sphereon/ssi-types": "0.22.0", "@types/elliptic": "^6.4.18", "@types/jsonpath": "^0.2.4", "@types/lodash.clonedeep": "^4.5.9", "@types/qs": "^6.9.12", + "@types/react": "18.2.14", + "@types/react-dom": "18.2.4", "@vitest/coverage-v8": "1.6.0", "desm": "^1.3.1", "esbuild": "0.21.1", "jest-extended": "^4.0.2", "jose": "^5.2.2", "node-stdlib-browser": "^1.2.0", - "@types/react": "18.2.14", - "@types/react-dom": "18.2.4", "vite": "^5.2.11", "vite-tsconfig-paths": "^4.3.2", "vitest": "1.6.0" diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index 17198a328..a144915f2 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -26,7 +26,7 @@ "./files/circuits/credentialAtomicQuerySigV2/circuit_final.zkey", "./files/circuits/credentialAtomicQuerySigV2/verification_key.json" ], - "shasum": "8z+x2k7IWORaxqEwcU2DDZZDy0IhYelIz+P/nqeRBso=" + "shasum": "JodjqtKp5wf+vGLtAv3BWt+r8rflH91hTOkJBq4U+WU=" }, "initialPermissions": { "endowment:ethereum-provider": {}, @@ -40,5 +40,6 @@ "snap_manageState": {}, "endowment:webassembly": {} }, + "platformVersion": "6.9.0", "manifestVersion": "0.1" } diff --git a/packages/snap/src/veramo/Veramo.service.ts b/packages/snap/src/veramo/Veramo.service.ts index c9a475d2c..255c675b8 100644 --- a/packages/snap/src/veramo/Veramo.service.ts +++ b/packages/snap/src/veramo/Veramo.service.ts @@ -83,6 +83,7 @@ import { } from '@veramo/key-manager'; import { KeyManagementSystem } from '@veramo/kms-local'; import { decodeCredentialToObject } from '@veramo/utils'; +import type { IVerifiableCredential } from '@sphereon/ssi-types'; import { type DIDResolutionResult, Resolver } from 'did-resolver'; import { type ProviderConfiguration, @@ -767,12 +768,14 @@ class VeramoService { const { sendOIDCAuthorizationResponseArgs } = handleAuthorizationRequestResult; - const sendAuthorizationResponseResult = - await VeramoService.sendAuthorizationResponse( + const authorizationResponseResult = + await VeramoService.instance.sendOIDCAuthorizationResponse( sendOIDCAuthorizationResponseArgs ); - throw new Error('Not implemented'); + if (isError(authorizationResponseResult)) { + throw new Error(authorizationResponseResult.error); + } } // FIXME: This is a temporary solution (we need to refactor this) @@ -824,7 +827,6 @@ class VeramoService { throw new Error('presentation_definition is required'); } - // if(!credentials) { const store = ['snap'] as AvailableCredentialStores[]; const queryResults = await VeramoService.queryCredentials({ @@ -833,6 +835,7 @@ class VeramoService { const queriedCredentials: any = queryResults.map((result) => result.data); + // NOTE: We filter out `JwtDecodedVerifiableCredential` | `SdJwtDecodedVerifiableCredential` types const selectCredentialsResult = await VeramoService.instance.selectCredentials({ credentials: queriedCredentials, @@ -842,13 +845,9 @@ class VeramoService { throw new Error(selectCredentialsResult.error); } - const decodedCredentials = selectCredentialsResult.data.map( - (credential) => decodeCredentialToObject(credential) - ); - const createPresentationSubmissionResult = await VeramoService.instance.createPresentationSubmission({ - credentials: decodedCredentials as any, + credentials: selectCredentialsResult.data, }); if (isError(createPresentationSubmissionResult)) { @@ -861,9 +860,9 @@ class VeramoService { await VeramoService.instance.createVerifiablePresentation({ presentation: { holder: did, - verifiableCredential: decodedCredentials.map( - (credential) => credential.proof.jwt - ), + // NOTE: We make an assumption that the first proof is the one we want and that it is a JWT proof + verifiableCredential: + selectCredentialsResult.data as W3CVerifiableCredential[], }, proofFormat: 'jwt', }); @@ -874,7 +873,8 @@ class VeramoService { '@context': context, holder, type, - verifiableCredential: decodedCredentials, + verifiableCredential: + selectCredentialsResult.data as W3CVerifiableCredential[], }; const createVpTokenResult = await VeramoService.instance.createVpToken({ diff --git a/patches/@astronautlabs__jsonpath.patch b/patches/@astronautlabs__jsonpath.patch new file mode 100644 index 000000000..1891b758e --- /dev/null +++ b/patches/@astronautlabs__jsonpath.patch @@ -0,0 +1,531 @@ +diff --git a/dist/assert.js b/dist/assert.js +deleted file mode 100644 +index 946a2b1c4affc6718161bcdaa4c5ad1053df0b91..0000000000000000000000000000000000000000 +diff --git a/dist/assert_1.js b/dist/assert_1.js +new file mode 100644 +index 0000000000000000000000000000000000000000..76fcde03970e5b733150d85ec22b99007a8c2438 +--- /dev/null ++++ b/dist/assert_1.js +@@ -0,0 +1,18 @@ ++"use strict"; ++ ++exports.assert_1 = void 0; ++var assert_1 = /** @class */ (function () { ++ function assert_1() { ++ } ++ assert_1.ok = function (predicate, message) { ++ if (!predicate) ++ throw new Error(message); ++ }; ++ assert_1.equal = function (value, expected, message) { ++ if (value !== expected) ++ throw new Error(message); ++ }; ++ return assert_1; ++}()); ++exports.assert_1 = assert_1; ++ +diff --git a/dist/esprima.js b/dist/esprima.js +index 4e0adb50fb8f085fd60f6802f81f1b29e2c41892..75847d9a92ab266d797c9c89dd1aae29fe82d721 100644 +--- a/dist/esprima.js ++++ b/dist/esprima.js +@@ -31,7 +31,7 @@ + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + exports.version = exports.parse = exports.tokenize = exports.Syntax = void 0; + /*jslint bitwise:true plusplus:true */ + /*global esprima:true, define:true, exports:true, window: true, +diff --git a/dist/grammar.js b/dist/grammar.js +index 41797e63e4af2703ae6688673e9d08a9f6f63cb8..0e64786e5964c2da82c8dffc6030682f3d7aeed3 100644 +--- a/dist/grammar.js ++++ b/dist/grammar.js +@@ -22,7 +22,7 @@ var __importStar = (this && this.__importStar) || function (mod) { + __setModuleDefault(result, mod); + return result; + }; +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + exports.GRAMMAR = void 0; + var tokens_1 = require("./tokens"); + var fs = __importStar(require("fs")); +diff --git a/dist/handlers.js b/dist/handlers.js +index 1bdba4bfda77dcf87e099429db1f973160bde834..d3d2e7da8ae6f68ce8ff84d81d5a0e5c44d87fe0 100644 +--- a/dist/handlers.js ++++ b/dist/handlers.js +@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) { + var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + exports.Handlers = void 0; + var aesprim = __importStar(require("./esprima")); + var slice_1 = require("./slice"); +diff --git a/dist/index.js b/dist/index.js +index e416bf91bb14f69b586323ca79e4ce88940d206a..b9735f709b47bd8a7a4d829f37e88913920d3b57 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -13,6 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi + var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); + }; +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + __exportStar(require("./jsonpath"), exports); + //# sourceMappingURL=index.js.map +diff --git a/dist/jsonpath.js b/dist/jsonpath.js +index c412e76d670b3d7b8002fef17378a29fe5139e62..44035343d6190d6c3ba0e2bee3abeaef5bbc5dd1 100644 +--- a/dist/jsonpath.js ++++ b/dist/jsonpath.js +@@ -1,28 +1,28 @@ + "use strict"; +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + exports.JSONPath = void 0; + var handlers_1 = require("./handlers"); + var tokens_1 = require("./tokens"); + var parser_1 = require("./parser"); +-var assert_1 = require("./assert"); ++var assert_1 = require("./assert_1"); + var JSONPath = /** @class */ (function () { + function JSONPath() { + } + JSONPath.parse = function (string) { +- assert_1.assert.ok(typeof string === 'string', "we need a path"); ++ assert_1.assert_1.ok(typeof string === 'string', "we need a path"); + return new parser_1.Parser().parse(string); + }; + JSONPath.parent = function (obj, string) { +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(string, "we need a path"); ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(string, "we need a path"); + var node = this.nodes(obj, string)[0]; + var key = node.path.pop(); /* jshint unused:false */ + return this.value(obj, node.path); + }; +- JSONPath.apply = function (obj, string, fn) { +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(string, "we need a path"); +- assert_1.assert.equal(typeof fn, "function", "fn needs to be function"); ++ JSONPath.apply_1 = function (obj, string, fn) { ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(string, "we need a path"); ++ assert_1.assert_1.equal(typeof fn, "function", "fn needs to be function"); + var nodes = this.nodes(obj, string).sort(function (a, b) { + // sort nodes so we apply from the bottom up + return b.path.length - a.path.length; +@@ -36,8 +36,8 @@ var JSONPath = /** @class */ (function () { + return nodes; + }; + JSONPath.value = function (obj, path, value) { +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(path, "we need a path"); ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(path, "we need a path"); + if (value !== undefined) { + var node = this.nodes(obj, path).shift(); + if (!node) +@@ -50,8 +50,8 @@ var JSONPath = /** @class */ (function () { + }; + JSONPath._vivify = function (obj, string, value) { + var self = this; +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(string, "we need a path"); ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(string, "we need a path"); + var path = new parser_1.Parser().parse(string) + .map(function (component) { return component.expression.value; }); + var setValue = function (path, value) { +@@ -67,22 +67,22 @@ var JSONPath = /** @class */ (function () { + return this.query(obj, string)[0]; + }; + JSONPath.query = function (obj, string, count) { +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(typeof string === 'string', "we need a path"); ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(typeof string === 'string', "we need a path"); + var results = this.nodes(obj, string, count) + .map(function (r) { return r.value; }); + return results; + }; + JSONPath.paths = function (obj, string, count) { +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(string, "we need a path"); ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(string, "we need a path"); + var results = this.nodes(obj, string, count) + .map(function (r) { return r.path; }); + return results; + }; + JSONPath.nodes = function (obj, string, count) { +- assert_1.assert.ok(obj instanceof Object, "obj needs to be an object"); +- assert_1.assert.ok(string, "we need a path"); ++ assert_1.assert_1.ok(obj instanceof Object, "obj needs to be an object"); ++ assert_1.assert_1.ok(string, "we need a path"); + if (count === 0) + return []; + var path = new parser_1.Parser().parse(string); +@@ -116,7 +116,7 @@ var JSONPath = /** @class */ (function () { + return count ? matches.slice(0, count) : matches; + }; + JSONPath.stringify = function (path) { +- assert_1.assert.ok(path, "we need a path"); ++ assert_1.assert_1.ok(path, "we need a path"); + var string = '$'; + var templates = { + 'descendant-member': '..{{value}}', +@@ -144,7 +144,7 @@ var JSONPath = /** @class */ (function () { + return string; + }; + JSONPath._normalize = function (path) { +- assert_1.assert.ok(path, "we need a path"); ++ assert_1.assert_1.ok(path, "we need a path"); + if (typeof path == "string") { + return new parser_1.Parser().parse(path); + } +diff --git a/dist/parser.js b/dist/parser.js +index 5be61f375bcb1d0ede33869057f9b859424e1033..1918d4e6ff56e5966cdf26c566fca0cdcdbd99f0 100644 +--- a/dist/parser.js ++++ b/dist/parser.js +@@ -22,7 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) { + __setModuleDefault(result, mod); + return result; + }; +-Object.defineProperty(exports, "__esModule", { value: true }); + exports.Parser = void 0; + var gparser = __importStar(require("../generated/parser")); + /** +@@ -42,3 +41,5 @@ function Parser() { + } + exports.Parser = Parser; + //# sourceMappingURL=parser.js.map ++ ++ +diff --git a/dist/slice.js b/dist/slice.js +index fe3896bac49d2a1301dbe9a867e442edcb7d70f6..07bd18f9d5284f7b23bac25f561d6d380c04a85e 100644 +--- a/dist/slice.js ++++ b/dist/slice.js +@@ -1,5 +1,5 @@ + "use strict"; +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + exports.slice = void 0; + /** + * @internal +diff --git a/dist/tokens.js b/dist/tokens.js +index e9a3d6b8ceb7d73adc511bd9230256dede307cc5..9c047519ab4d7e708f758f298c6665d60f661b19 100644 +--- a/dist/tokens.js ++++ b/dist/tokens.js +@@ -1,5 +1,5 @@ + "use strict"; +-Object.defineProperty(exports, "__esModule", { value: true }); ++ + exports.TOKENS = void 0; + /** + * Defines the token types of JSONPath by regular expression. +diff --git a/dist.esm/assert.d.ts b/dist.esm/assert.d.ts +deleted file mode 100644 +index d9f845d04c8db3773559d1c83ac01ad0bbea0f39..0000000000000000000000000000000000000000 +diff --git a/dist.esm/assert.js b/dist.esm/assert.js +deleted file mode 100644 +index ca8d7c47fa3f2f3472ff2af25bfdd07bb9c6a889..0000000000000000000000000000000000000000 +diff --git a/dist.esm/assert.js.map b/dist.esm/assert.js.map +deleted file mode 100644 +index d51b9a6ef6e3affc86b39fd352395e0e4cb57da8..0000000000000000000000000000000000000000 +diff --git a/dist.esm/esprima.d.ts b/dist.esm/esprima.d.ts +deleted file mode 100644 +index 51096db61699b4d8b01d16b986db7d6f4bf7022d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/esprima.js b/dist.esm/esprima.js +deleted file mode 100644 +index 3ea39950f34c61b42bfc6304c237188c2a0bccb2..0000000000000000000000000000000000000000 +diff --git a/dist.esm/esprima.js.map b/dist.esm/esprima.js.map +deleted file mode 100644 +index c15e7139fa1fb6f11e8e6c03e2ad90599d6d9bd3..0000000000000000000000000000000000000000 +diff --git a/dist.esm/grammar.d.ts b/dist.esm/grammar.d.ts +deleted file mode 100644 +index d3e331b9e1fb597441345e4d51b8d71960340b68..0000000000000000000000000000000000000000 +diff --git a/dist.esm/grammar.js b/dist.esm/grammar.js +deleted file mode 100644 +index 1e51d53c0189221d30ba086128e55cf44ba05444..0000000000000000000000000000000000000000 +diff --git a/dist.esm/grammar.js.map b/dist.esm/grammar.js.map +deleted file mode 100644 +index 07c04162e518ec960d82a254272b8279150d05c2..0000000000000000000000000000000000000000 +diff --git a/dist.esm/handlers.d.ts b/dist.esm/handlers.d.ts +deleted file mode 100644 +index 954ecc55a0213f408bd2630c116b1356cae2af8b..0000000000000000000000000000000000000000 +diff --git a/dist.esm/handlers.js b/dist.esm/handlers.js +deleted file mode 100644 +index e4e52ce58a711c00f4d9080271688d3d594f7122..0000000000000000000000000000000000000000 +diff --git a/dist.esm/handlers.js.map b/dist.esm/handlers.js.map +deleted file mode 100644 +index 9c609af7b0477ceead3467f52cb23ff604c560cc..0000000000000000000000000000000000000000 +diff --git a/dist.esm/index.d.ts b/dist.esm/index.d.ts +deleted file mode 100644 +index a3ebeb41249e24a7fa54814be018021b560d6b5d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/index.js b/dist.esm/index.js +deleted file mode 100644 +index 1046945cc281b4c5469adaf25d41664521ba1e24..0000000000000000000000000000000000000000 +diff --git a/dist.esm/index.js.map b/dist.esm/index.js.map +deleted file mode 100644 +index cccb902e883d95edab147d2104ccc3935dc62b7c..0000000000000000000000000000000000000000 +diff --git a/dist.esm/jsonpath.d.ts b/dist.esm/jsonpath.d.ts +deleted file mode 100644 +index 85949460b2f5501f8112d48d19868cdfa92f308d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/jsonpath.js b/dist.esm/jsonpath.js +deleted file mode 100644 +index 85d8a517243f0f3f48e7b08f746778e3526ce3c3..0000000000000000000000000000000000000000 +diff --git a/dist.esm/jsonpath.js.map b/dist.esm/jsonpath.js.map +deleted file mode 100644 +index 415407a245e0aa29fadb261ca844fb48f9efad82..0000000000000000000000000000000000000000 +diff --git a/dist.esm/lessons.test.d.ts b/dist.esm/lessons.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/lessons.test.js b/dist.esm/lessons.test.js +deleted file mode 100644 +index 2a9fe1f5b592793d65378ae946591e342870da94..0000000000000000000000000000000000000000 +diff --git a/dist.esm/lessons.test.js.map b/dist.esm/lessons.test.js.map +deleted file mode 100644 +index 8cf5fa788d5eb41a052eb1a4960058337494c8bd..0000000000000000000000000000000000000000 +diff --git a/dist.esm/parse.test.d.ts b/dist.esm/parse.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/parse.test.js b/dist.esm/parse.test.js +deleted file mode 100644 +index 1d6df5b748b54e243f0a6ef907c16ab92c311e8c..0000000000000000000000000000000000000000 +diff --git a/dist.esm/parse.test.js.map b/dist.esm/parse.test.js.map +deleted file mode 100644 +index 2c77eb04d32d7697f0510bb6ebde177e7a47fc28..0000000000000000000000000000000000000000 +diff --git a/dist.esm/parser.d.ts b/dist.esm/parser.d.ts +deleted file mode 100644 +index 019070ca2fe15c46583213b12c5f386139f99954..0000000000000000000000000000000000000000 +diff --git a/dist.esm/parser.js b/dist.esm/parser.js +deleted file mode 100644 +index a97ae8a529a0861331a502dc2fc6f2a648c9f3a1..0000000000000000000000000000000000000000 +diff --git a/dist.esm/parser.js.map b/dist.esm/parser.js.map +deleted file mode 100644 +index f8d55d25b6bc06b607b13f244e0ec1da55a7a0e3..0000000000000000000000000000000000000000 +diff --git a/dist.esm/query.test.d.ts b/dist.esm/query.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/query.test.js b/dist.esm/query.test.js +deleted file mode 100644 +index da07b16503daa94d16338ab558294232ffb30c29..0000000000000000000000000000000000000000 +diff --git a/dist.esm/query.test.js.map b/dist.esm/query.test.js.map +deleted file mode 100644 +index 358c875554b8f2e1be158b1c497cc86c0172521c..0000000000000000000000000000000000000000 +diff --git a/dist.esm/slice.d.ts b/dist.esm/slice.d.ts +deleted file mode 100644 +index 84166baeb633c76e081ba049095e43b929343383..0000000000000000000000000000000000000000 +diff --git a/dist.esm/slice.js b/dist.esm/slice.js +deleted file mode 100644 +index 63a0e9b5263dc52588eda4f4e161637c4b2887a9..0000000000000000000000000000000000000000 +diff --git a/dist.esm/slice.js.map b/dist.esm/slice.js.map +deleted file mode 100644 +index 17699c7b52ef5663cbdbc43803db777cd47d38e1..0000000000000000000000000000000000000000 +diff --git a/dist.esm/slice.test.d.ts b/dist.esm/slice.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/slice.test.js b/dist.esm/slice.test.js +deleted file mode 100644 +index 453adeba7ae1276effbb093207ddea1d82129452..0000000000000000000000000000000000000000 +diff --git a/dist.esm/slice.test.js.map b/dist.esm/slice.test.js.map +deleted file mode 100644 +index 5ffe5304dbbd2b6f3cfd86e47e72019477c2905f..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/assert.d.ts b/dist.esm/src/assert.d.ts +deleted file mode 100644 +index d9f845d04c8db3773559d1c83ac01ad0bbea0f39..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/assert.js b/dist.esm/src/assert.js +deleted file mode 100644 +index ca8d7c47fa3f2f3472ff2af25bfdd07bb9c6a889..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/assert.js.map b/dist.esm/src/assert.js.map +deleted file mode 100644 +index a4c6ecd617e93d1b9bb2abe4d66a68f2630fda88..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/grammar.d.ts b/dist.esm/src/grammar.d.ts +deleted file mode 100644 +index d3e331b9e1fb597441345e4d51b8d71960340b68..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/grammar.js b/dist.esm/src/grammar.js +deleted file mode 100644 +index 1e51d53c0189221d30ba086128e55cf44ba05444..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/grammar.js.map b/dist.esm/src/grammar.js.map +deleted file mode 100644 +index f1a402e1fbfb89e7b954c64b106798ed7a4f5755..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/handlers.d.ts b/dist.esm/src/handlers.d.ts +deleted file mode 100644 +index 954ecc55a0213f408bd2630c116b1356cae2af8b..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/handlers.js b/dist.esm/src/handlers.js +deleted file mode 100644 +index 28e0161823f95462360e680f7d3b3ff42a913f98..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/handlers.js.map b/dist.esm/src/handlers.js.map +deleted file mode 100644 +index b5a4a80315b55c027d77c153e8f6ffd160bdf017..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/index.d.ts b/dist.esm/src/index.d.ts +deleted file mode 100644 +index a3ebeb41249e24a7fa54814be018021b560d6b5d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/index.js b/dist.esm/src/index.js +deleted file mode 100644 +index 1046945cc281b4c5469adaf25d41664521ba1e24..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/index.js.map b/dist.esm/src/index.js.map +deleted file mode 100644 +index 030d79500bf070444fba511c876c243c0c721737..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/jsonpath.d.ts b/dist.esm/src/jsonpath.d.ts +deleted file mode 100644 +index 85949460b2f5501f8112d48d19868cdfa92f308d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/jsonpath.js b/dist.esm/src/jsonpath.js +deleted file mode 100644 +index 85d8a517243f0f3f48e7b08f746778e3526ce3c3..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/jsonpath.js.map b/dist.esm/src/jsonpath.js.map +deleted file mode 100644 +index edf3d04b710354bea2a8aaee7dea88b8dcedddb8..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/lessons.test.d.ts b/dist.esm/src/lessons.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/lessons.test.js b/dist.esm/src/lessons.test.js +deleted file mode 100644 +index 2a9fe1f5b592793d65378ae946591e342870da94..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/lessons.test.js.map b/dist.esm/src/lessons.test.js.map +deleted file mode 100644 +index 40bd6bbf5ed28f78f5673b723f89dc0f1ff24da2..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/parse.test.d.ts b/dist.esm/src/parse.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/parse.test.js b/dist.esm/src/parse.test.js +deleted file mode 100644 +index 1d6df5b748b54e243f0a6ef907c16ab92c311e8c..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/parse.test.js.map b/dist.esm/src/parse.test.js.map +deleted file mode 100644 +index 10765b1b198ebf0098af2673e49ff1f61ab54213..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/parser.d.ts b/dist.esm/src/parser.d.ts +deleted file mode 100644 +index 019070ca2fe15c46583213b12c5f386139f99954..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/parser.js b/dist.esm/src/parser.js +deleted file mode 100644 +index a97ae8a529a0861331a502dc2fc6f2a648c9f3a1..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/parser.js.map b/dist.esm/src/parser.js.map +deleted file mode 100644 +index 6a483a5713d60e6a76a1cadd36f593aa1e4060e5..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/query.test.d.ts b/dist.esm/src/query.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/query.test.js b/dist.esm/src/query.test.js +deleted file mode 100644 +index da07b16503daa94d16338ab558294232ffb30c29..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/query.test.js.map b/dist.esm/src/query.test.js.map +deleted file mode 100644 +index 4227f4a773283b25b01babe1f08821e9655edc86..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/slice.d.ts b/dist.esm/src/slice.d.ts +deleted file mode 100644 +index 84166baeb633c76e081ba049095e43b929343383..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/slice.js b/dist.esm/src/slice.js +deleted file mode 100644 +index 63a0e9b5263dc52588eda4f4e161637c4b2887a9..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/slice.js.map b/dist.esm/src/slice.js.map +deleted file mode 100644 +index 153b83bd0138d9492595ce35bceddf9ab0edea27..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/slice.test.d.ts b/dist.esm/src/slice.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/slice.test.js b/dist.esm/src/slice.test.js +deleted file mode 100644 +index 453adeba7ae1276effbb093207ddea1d82129452..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/slice.test.js.map b/dist.esm/src/slice.test.js.map +deleted file mode 100644 +index da40e3e46397f7cf93ce7f3d0a565f20635f3628..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/stringify.test.d.ts b/dist.esm/src/stringify.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/stringify.test.js b/dist.esm/src/stringify.test.js +deleted file mode 100644 +index ac3643923a5b12ed49bb7ee2bce312ce6420787c..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/stringify.test.js.map b/dist.esm/src/stringify.test.js.map +deleted file mode 100644 +index a862c4e493f2d0b19da088c6aa9add05b38a082a..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/sugar.test.d.ts b/dist.esm/src/sugar.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/sugar.test.js b/dist.esm/src/sugar.test.js +deleted file mode 100644 +index f5ad9c9723017f64e0a50cd0e6852ccf5abf1205..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/sugar.test.js.map b/dist.esm/src/sugar.test.js.map +deleted file mode 100644 +index ca661b374c2005e5710bc8e4a1b2534e82c20e5a..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/test.d.ts b/dist.esm/src/test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/test.js b/dist.esm/src/test.js +deleted file mode 100644 +index ce7c55bfd733fd20753a157f50ca68831bbbd103..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/test.js.map b/dist.esm/src/test.js.map +deleted file mode 100644 +index b42893df530ceb65a41a9b9a76c5c2e17183c050..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/tokens.d.ts b/dist.esm/src/tokens.d.ts +deleted file mode 100644 +index 4f093f08101bf2fa6fdcf23fa7eb6283a905f44e..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/tokens.js b/dist.esm/src/tokens.js +deleted file mode 100644 +index 9ad627ff9b3c6ed8d9d4078735069dc960355e78..0000000000000000000000000000000000000000 +diff --git a/dist.esm/src/tokens.js.map b/dist.esm/src/tokens.js.map +deleted file mode 100644 +index 549927a54e52a405ff52ba978a04dc612c0fa2dd..0000000000000000000000000000000000000000 +diff --git a/dist.esm/stringify.test.d.ts b/dist.esm/stringify.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/stringify.test.js b/dist.esm/stringify.test.js +deleted file mode 100644 +index ac3643923a5b12ed49bb7ee2bce312ce6420787c..0000000000000000000000000000000000000000 +diff --git a/dist.esm/stringify.test.js.map b/dist.esm/stringify.test.js.map +deleted file mode 100644 +index ac8a14e401ff5f0adc1787734917afd7c05fd35d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/sugar.test.d.ts b/dist.esm/sugar.test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/sugar.test.js b/dist.esm/sugar.test.js +deleted file mode 100644 +index f5ad9c9723017f64e0a50cd0e6852ccf5abf1205..0000000000000000000000000000000000000000 +diff --git a/dist.esm/sugar.test.js.map b/dist.esm/sugar.test.js.map +deleted file mode 100644 +index 64b2ab90f92c0f771e9f448b2944e0ac383a6c03..0000000000000000000000000000000000000000 +diff --git a/dist.esm/test.d.ts b/dist.esm/test.d.ts +deleted file mode 100644 +index 509db1866f4b5fbb3046d4c04b51ccb638e79c80..0000000000000000000000000000000000000000 +diff --git a/dist.esm/test.js b/dist.esm/test.js +deleted file mode 100644 +index ce7c55bfd733fd20753a157f50ca68831bbbd103..0000000000000000000000000000000000000000 +diff --git a/dist.esm/test.js.map b/dist.esm/test.js.map +deleted file mode 100644 +index c6ce70bb1a28df4186862becc212c09110f0b741..0000000000000000000000000000000000000000 +diff --git a/dist.esm/tokens.d.ts b/dist.esm/tokens.d.ts +deleted file mode 100644 +index 4f093f08101bf2fa6fdcf23fa7eb6283a905f44e..0000000000000000000000000000000000000000 +diff --git a/dist.esm/tokens.js b/dist.esm/tokens.js +deleted file mode 100644 +index 9ad627ff9b3c6ed8d9d4078735069dc960355e78..0000000000000000000000000000000000000000 +diff --git a/dist.esm/tokens.js.map b/dist.esm/tokens.js.map +deleted file mode 100644 +index d547ae8b0de0e63bc21cbd5f5aaef5ee308614c8..0000000000000000000000000000000000000000 +diff --git a/dist.esm/upstream/aesprim.d.ts b/dist.esm/upstream/aesprim.d.ts +deleted file mode 100644 +index 51096db61699b4d8b01d16b986db7d6f4bf7022d..0000000000000000000000000000000000000000 +diff --git a/dist.esm/upstream/aesprim.js b/dist.esm/upstream/aesprim.js +deleted file mode 100644 +index c370b9cedfd18a9b130c484157c6213809131947..0000000000000000000000000000000000000000 +diff --git a/dist.esm/upstream/aesprim.js.map b/dist.esm/upstream/aesprim.js.map +deleted file mode 100644 +index 4f3339206763c112aecee4aa2211bd990e4fdc76..0000000000000000000000000000000000000000 +diff --git a/generated/parser.js b/generated/parser.js +index bf791e7eb5826bde485b7eebee9391ceb5d03320..3a1fe3f3f69a7b30b9f5b49ddca21c3ec0db8e79 100644 +--- a/generated/parser.js ++++ b/generated/parser.js +@@ -715,9 +715,6 @@ return new Parser; + })(); + + +-if (typeof require !== 'undefined' && typeof exports !== 'undefined') { + exports.parser = parser; + exports.Parser = parser.Parser; + exports.parse = function () { return parser.parse.apply(parser, arguments); }; +- +-} diff --git a/patches/escodegen.patch b/patches/escodegen.patch new file mode 100644 index 000000000..bb553921d --- /dev/null +++ b/patches/escodegen.patch @@ -0,0 +1,5431 @@ +diff --git a/escodegen.js b/escodegen.js +index 4c055b8857a98da01a21b1cc3eaa3d6a76803aba..beaa08e4e51e74ac280fdec843c439cdaa03e123 100644 +--- a/escodegen.js ++++ b/escodegen.js +@@ -34,2593 +34,2977 @@ + */ + + /*global exports:true, require:true, global:true*/ +-(function () { +- 'use strict'; +- +- var Syntax, +- Precedence, +- BinaryPrecedence, +- SourceNode, +- estraverse, +- esutils, +- base, +- indent, +- json, +- renumber, +- hexadecimal, +- quotes, +- escapeless, +- newline, +- space, +- parentheses, +- semicolons, +- safeConcatenation, +- directive, +- extra, +- parse, +- sourceMap, +- sourceCode, +- preserveBlankLines, +- FORMAT_MINIFY, +- FORMAT_DEFAULTS; +- +- estraverse = require('estraverse'); +- esutils = require('esutils'); +- +- Syntax = estraverse.Syntax; +- +- // Generation is done by generateExpression. +- function isExpression(node) { +- return CodeGenerator.Expression.hasOwnProperty(node.type); +- } +- +- // Generation is done by generateStatement. +- function isStatement(node) { +- return CodeGenerator.Statement.hasOwnProperty(node.type); +- } +- +- Precedence = { +- Sequence: 0, +- Yield: 1, +- Assignment: 1, +- Conditional: 2, +- ArrowFunction: 2, +- LogicalOR: 3, +- LogicalAND: 4, +- BitwiseOR: 5, +- BitwiseXOR: 6, +- BitwiseAND: 7, +- Equality: 8, +- Relational: 9, +- BitwiseSHIFT: 10, +- Additive: 11, +- Multiplicative: 12, +- Exponentiation: 13, +- Await: 14, +- Unary: 14, +- Postfix: 15, +- Call: 16, +- New: 17, +- TaggedTemplate: 18, +- Member: 19, +- Primary: 20 +- }; +- +- BinaryPrecedence = { +- '||': Precedence.LogicalOR, +- '&&': Precedence.LogicalAND, +- '|': Precedence.BitwiseOR, +- '^': Precedence.BitwiseXOR, +- '&': Precedence.BitwiseAND, +- '==': Precedence.Equality, +- '!=': Precedence.Equality, +- '===': Precedence.Equality, +- '!==': Precedence.Equality, +- 'is': Precedence.Equality, +- 'isnt': Precedence.Equality, +- '<': Precedence.Relational, +- '>': Precedence.Relational, +- '<=': Precedence.Relational, +- '>=': Precedence.Relational, +- 'in': Precedence.Relational, +- 'instanceof': Precedence.Relational, +- '<<': Precedence.BitwiseSHIFT, +- '>>': Precedence.BitwiseSHIFT, +- '>>>': Precedence.BitwiseSHIFT, +- '+': Precedence.Additive, +- '-': Precedence.Additive, +- '*': Precedence.Multiplicative, +- '%': Precedence.Multiplicative, +- '/': Precedence.Multiplicative, +- '**': Precedence.Exponentiation ++(() => { ++ var Syntax, ++ Precedence, ++ BinaryPrecedence, ++ SourceNode, ++ estraverse, ++ esutils, ++ base, ++ indent, ++ json, ++ renumber, ++ hexadecimal, ++ quotes, ++ escapeless, ++ newline, ++ space, ++ parentheses, ++ semicolons, ++ safeConcatenation, ++ directive, ++ extra, ++ parse, ++ sourceMap, ++ sourceCode, ++ preserveBlankLines, ++ FORMAT_MINIFY, ++ FORMAT_DEFAULTS; ++ ++ estraverse = require('estraverse'); ++ esutils = require('esutils'); ++ ++ Syntax = estraverse.Syntax; ++ ++ // Generation is done by generateExpression. ++ function isExpression(node) { ++ return CodeGenerator.Expression.hasOwnProperty(node.type); ++ } ++ ++ // Generation is done by generateStatement. ++ function isStatement(node) { ++ return CodeGenerator.Statement.hasOwnProperty(node.type); ++ } ++ ++ Precedence = { ++ Sequence: 0, ++ Yield: 1, ++ Assignment: 1, ++ Conditional: 2, ++ ArrowFunction: 2, ++ LogicalOR: 3, ++ LogicalAND: 4, ++ BitwiseOR: 5, ++ BitwiseXOR: 6, ++ BitwiseAND: 7, ++ Equality: 8, ++ Relational: 9, ++ BitwiseSHIFT: 10, ++ Additive: 11, ++ Multiplicative: 12, ++ Exponentiation: 13, ++ Await: 14, ++ Unary: 14, ++ Postfix: 15, ++ Call: 16, ++ New: 17, ++ TaggedTemplate: 18, ++ Member: 19, ++ Primary: 20, ++ }; ++ ++ BinaryPrecedence = { ++ '||': Precedence.LogicalOR, ++ '&&': Precedence.LogicalAND, ++ '|': Precedence.BitwiseOR, ++ '^': Precedence.BitwiseXOR, ++ '&': Precedence.BitwiseAND, ++ '==': Precedence.Equality, ++ '!=': Precedence.Equality, ++ '===': Precedence.Equality, ++ '!==': Precedence.Equality, ++ is: Precedence.Equality, ++ isnt: Precedence.Equality, ++ '<': Precedence.Relational, ++ '>': Precedence.Relational, ++ '<=': Precedence.Relational, ++ '>=': Precedence.Relational, ++ in: Precedence.Relational, ++ instanceof: Precedence.Relational, ++ '<<': Precedence.BitwiseSHIFT, ++ '>>': Precedence.BitwiseSHIFT, ++ '>>>': Precedence.BitwiseSHIFT, ++ '+': Precedence.Additive, ++ '-': Precedence.Additive, ++ '*': Precedence.Multiplicative, ++ '%': Precedence.Multiplicative, ++ '/': Precedence.Multiplicative, ++ '**': Precedence.Exponentiation, ++ }; ++ ++ //Flags ++ var F_ALLOW_IN = 1, ++ F_ALLOW_CALL = 1 << 1, ++ F_ALLOW_UNPARATH_NEW = 1 << 2, ++ F_FUNC_BODY = 1 << 3, ++ F_DIRECTIVE_CTX = 1 << 4, ++ F_SEMICOLON_OPT = 1 << 5; ++ ++ //Expression flag sets ++ //NOTE: Flag order: ++ // F_ALLOW_IN ++ // F_ALLOW_CALL ++ // F_ALLOW_UNPARATH_NEW ++ var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, ++ E_TTF = F_ALLOW_IN | F_ALLOW_CALL, ++ E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, ++ E_TFF = F_ALLOW_IN, ++ E_FFT = F_ALLOW_UNPARATH_NEW, ++ E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW; ++ ++ //Statement flag sets ++ //NOTE: Flag order: ++ // F_ALLOW_IN ++ // F_FUNC_BODY ++ // F_DIRECTIVE_CTX ++ // F_SEMICOLON_OPT ++ var S_TFFF = F_ALLOW_IN, ++ S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT, ++ S_FFFF = 0x00, ++ S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX, ++ S_TTFF = F_ALLOW_IN | F_FUNC_BODY; ++ ++ function getDefaultOptions() { ++ // default options ++ return { ++ indent: null, ++ base: null, ++ parse: null, ++ comment: false, ++ format: { ++ indent: { ++ style: ' ', ++ base: 0, ++ adjustMultilineComment: false, ++ }, ++ newline: '\n', ++ space: ' ', ++ json: false, ++ renumber: false, ++ hexadecimal: false, ++ quotes: 'single', ++ escapeless: false, ++ compact: false, ++ parentheses: true, ++ semicolons: true, ++ safeConcatenation: false, ++ preserveBlankLines: false, ++ }, ++ moz: { ++ comprehensionExpressionStartsWithAssignment: false, ++ starlessGenerator: false, ++ }, ++ sourceMap: null, ++ sourceMapRoot: null, ++ sourceMapWithCode: false, ++ directive: false, ++ raw: true, ++ verbatim: null, ++ sourceCode: null, + }; ++ } + +- //Flags +- var F_ALLOW_IN = 1, +- F_ALLOW_CALL = 1 << 1, +- F_ALLOW_UNPARATH_NEW = 1 << 2, +- F_FUNC_BODY = 1 << 3, +- F_DIRECTIVE_CTX = 1 << 4, +- F_SEMICOLON_OPT = 1 << 5; +- +- //Expression flag sets +- //NOTE: Flag order: +- // F_ALLOW_IN +- // F_ALLOW_CALL +- // F_ALLOW_UNPARATH_NEW +- var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, +- E_TTF = F_ALLOW_IN | F_ALLOW_CALL, +- E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, +- E_TFF = F_ALLOW_IN, +- E_FFT = F_ALLOW_UNPARATH_NEW, +- E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW; +- +- //Statement flag sets +- //NOTE: Flag order: +- // F_ALLOW_IN +- // F_FUNC_BODY +- // F_DIRECTIVE_CTX +- // F_SEMICOLON_OPT +- var S_TFFF = F_ALLOW_IN, +- S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT, +- S_FFFF = 0x00, +- S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX, +- S_TTFF = F_ALLOW_IN | F_FUNC_BODY; +- +- function getDefaultOptions() { +- // default options +- return { +- indent: null, +- base: null, +- parse: null, +- comment: false, +- format: { +- indent: { +- style: ' ', +- base: 0, +- adjustMultilineComment: false +- }, +- newline: '\n', +- space: ' ', +- json: false, +- renumber: false, +- hexadecimal: false, +- quotes: 'single', +- escapeless: false, +- compact: false, +- parentheses: true, +- semicolons: true, +- safeConcatenation: false, +- preserveBlankLines: false +- }, +- moz: { +- comprehensionExpressionStartsWithAssignment: false, +- starlessGenerator: false +- }, +- sourceMap: null, +- sourceMapRoot: null, +- sourceMapWithCode: false, +- directive: false, +- raw: true, +- verbatim: null, +- sourceCode: null +- }; +- } +- +- function stringRepeat(str, num) { +- var result = ''; +- +- for (num |= 0; num > 0; num >>>= 1, str += str) { +- if (num & 1) { +- result += str; +- } +- } ++ function stringRepeat(str, num) { ++ var result = ''; + +- return result; ++ for (num |= 0; num > 0; num >>>= 1, str += str) { ++ if (num & 1) { ++ result += str; ++ } + } + +- function hasLineTerminator(str) { +- return (/[\r\n]/g).test(str); +- } ++ return result; ++ } + +- function endsWithLineTerminator(str) { +- var len = str.length; +- return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1)); ++ function hasLineTerminator(str) { ++ return /[\r\n]/g.test(str); ++ } ++ ++ function endsWithLineTerminator(str) { ++ var len = str.length; ++ return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1)); ++ } ++ ++ function merge(target, override) { ++ var key; ++ for (key in override) { ++ if (override.hasOwnProperty(key)) { ++ target[key] = override[key]; ++ } ++ } ++ return target; ++ } ++ ++ function updateDeeply(target, override) { ++ var key, val; ++ ++ function isHashObject(target) { ++ return ( ++ typeof target === 'object' && ++ target instanceof Object && ++ !(target instanceof RegExp) ++ ); + } + +- function merge(target, override) { +- var key; +- for (key in override) { +- if (override.hasOwnProperty(key)) { +- target[key] = override[key]; +- } ++ for (key in override) { ++ if (override.hasOwnProperty(key)) { ++ val = override[key]; ++ if (isHashObject(val)) { ++ if (isHashObject(target[key])) { ++ updateDeeply(target[key], val); ++ } else { ++ target[key] = updateDeeply({}, val); ++ } ++ } else { ++ target[key] = val; + } +- return target; ++ } + } ++ return target; ++ } + +- function updateDeeply(target, override) { +- var key, val; ++ function generateNumber(value) { ++ var result, point, temp, exponent, pos; + +- function isHashObject(target) { +- return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); +- } ++ if (value !== value) { ++ throw new Error('Numeric literal whose value is NaN'); ++ } ++ if (value < 0 || (value === 0 && 1 / value < 0)) { ++ throw new Error('Numeric literal whose value is negative'); ++ } + +- for (key in override) { +- if (override.hasOwnProperty(key)) { +- val = override[key]; +- if (isHashObject(val)) { +- if (isHashObject(target[key])) { +- updateDeeply(target[key], val); +- } else { +- target[key] = updateDeeply({}, val); +- } +- } else { +- target[key] = val; +- } +- } +- } +- return target; ++ if (value === 1 / 0) { ++ return json ? 'null' : renumber ? '1e400' : '1e+400'; + } + +- function generateNumber(value) { +- var result, point, temp, exponent, pos; ++ result = '' + value; ++ if (!renumber || result.length < 3) { ++ return result; ++ } + +- if (value !== value) { +- throw new Error('Numeric literal whose value is NaN'); +- } +- if (value < 0 || (value === 0 && 1 / value < 0)) { +- throw new Error('Numeric literal whose value is negative'); +- } ++ point = result.indexOf('.'); ++ if (!json && result.charCodeAt(0) === 0x30 /* 0 */ && point === 1) { ++ point = 0; ++ result = result.slice(1); ++ } ++ temp = result; ++ result = result.replace('e+', 'e'); ++ exponent = 0; ++ if ((pos = temp.indexOf('e')) > 0) { ++ exponent = +temp.slice(pos + 1); ++ temp = temp.slice(0, pos); ++ } ++ if (point >= 0) { ++ exponent -= temp.length - point - 1; ++ temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; ++ } ++ pos = 0; ++ while (temp.charCodeAt(temp.length + pos - 1) === 0x30 /* 0 */) { ++ --pos; ++ } ++ if (pos !== 0) { ++ exponent -= pos; ++ temp = temp.slice(0, pos); ++ } ++ if (exponent !== 0) { ++ temp += 'e' + exponent; ++ } ++ if ( ++ (temp.length < result.length || ++ (hexadecimal && ++ value > 1e12 && ++ Math.floor(value) === value && ++ (temp = '0x' + value.toString(16)).length < result.length)) && ++ +temp === value ++ ) { ++ result = temp; ++ } + +- if (value === 1 / 0) { +- return json ? 'null' : renumber ? '1e400' : '1e+400'; +- } ++ return result; ++ } ++ ++ // Generate valid RegExp expression. ++ // This function is based on https://github.com/Constellation/iv Engine ++ ++ function escapeRegExpCharacter(ch, previousIsBackslash) { ++ // not handling '\' and handling \u2028 or \u2029 to unicode escape sequence ++ if ((ch & ~1) === 0x2028) { ++ return ( ++ (previousIsBackslash ? 'u' : '\\u') + (ch === 0x2028 ? '2028' : '2029') ++ ); ++ } else if (ch === 10 || ch === 13) { ++ // \n, \r ++ return (previousIsBackslash ? '' : '\\') + (ch === 10 ? 'n' : 'r'); ++ } ++ return String.fromCharCode(ch); ++ } + +- result = '' + value; +- if (!renumber || result.length < 3) { +- return result; +- } ++ function generateRegExp(reg) { ++ var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash; + +- point = result.indexOf('.'); +- if (!json && result.charCodeAt(0) === 0x30 /* 0 */ && point === 1) { +- point = 0; +- result = result.slice(1); +- } +- temp = result; +- result = result.replace('e+', 'e'); +- exponent = 0; +- if ((pos = temp.indexOf('e')) > 0) { +- exponent = +temp.slice(pos + 1); +- temp = temp.slice(0, pos); +- } +- if (point >= 0) { +- exponent -= temp.length - point - 1; +- temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; +- } +- pos = 0; +- while (temp.charCodeAt(temp.length + pos - 1) === 0x30 /* 0 */) { +- --pos; +- } +- if (pos !== 0) { +- exponent -= pos; +- temp = temp.slice(0, pos); +- } +- if (exponent !== 0) { +- temp += 'e' + exponent; +- } +- if ((temp.length < result.length || +- (hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) && +- +temp === value) { +- result = temp; +- } ++ result = reg.toString(); + ++ if (reg.source) { ++ // extract flag from toString result ++ match = result.match(/\/([^/]*)$/); ++ if (!match) { + return result; ++ } ++ ++ flags = match[1]; ++ result = ''; ++ ++ characterInBrack = false; ++ previousIsBackslash = false; ++ for (i = 0, iz = reg.source.length; i < iz; ++i) { ++ ch = reg.source.charCodeAt(i); ++ ++ if (!previousIsBackslash) { ++ if (characterInBrack) { ++ if (ch === 93) { ++ // ] ++ characterInBrack = false; ++ } ++ } else { ++ if (ch === 47) { ++ // / ++ result += '\\'; ++ } else if (ch === 91) { ++ // [ ++ characterInBrack = true; ++ } ++ } ++ result += escapeRegExpCharacter(ch, previousIsBackslash); ++ previousIsBackslash = ch === 92; // \ ++ } else { ++ // if new RegExp("\\\n') is provided, create /\n/ ++ result += escapeRegExpCharacter(ch, previousIsBackslash); ++ // prevent like /\\[/]/ ++ previousIsBackslash = false; ++ } ++ } ++ ++ return '/' + result + '/' + flags; + } + +- // Generate valid RegExp expression. +- // This function is based on https://github.com/Constellation/iv Engine ++ return result; ++ } + +- function escapeRegExpCharacter(ch, previousIsBackslash) { +- // not handling '\' and handling \u2028 or \u2029 to unicode escape sequence +- if ((ch & ~1) === 0x2028) { +- return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029'); +- } else if (ch === 10 || ch === 13) { // \n, \r +- return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r'); +- } +- return String.fromCharCode(ch); +- } ++ function escapeAllowedCharacter(code, next) { ++ var hex; + +- function generateRegExp(reg) { +- var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash; ++ if (code === 0x08 /* \b */) { ++ return '\\b'; ++ } + +- result = reg.toString(); ++ if (code === 0x0c /* \f */) { ++ return '\\f'; ++ } + +- if (reg.source) { +- // extract flag from toString result +- match = result.match(/\/([^/]*)$/); +- if (!match) { +- return result; +- } ++ if (code === 0x09 /* \t */) { ++ return '\\t'; ++ } + +- flags = match[1]; +- result = ''; +- +- characterInBrack = false; +- previousIsBackslash = false; +- for (i = 0, iz = reg.source.length; i < iz; ++i) { +- ch = reg.source.charCodeAt(i); +- +- if (!previousIsBackslash) { +- if (characterInBrack) { +- if (ch === 93) { // ] +- characterInBrack = false; +- } +- } else { +- if (ch === 47) { // / +- result += '\\'; +- } else if (ch === 91) { // [ +- characterInBrack = true; +- } +- } +- result += escapeRegExpCharacter(ch, previousIsBackslash); +- previousIsBackslash = ch === 92; // \ +- } else { +- // if new RegExp("\\\n') is provided, create /\n/ +- result += escapeRegExpCharacter(ch, previousIsBackslash); +- // prevent like /\\[/]/ +- previousIsBackslash = false; +- } +- } ++ hex = code.toString(16).toUpperCase(); ++ if (json || code > 0xff) { ++ return '\\u' + '0000'.slice(hex.length) + hex; ++ } else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) { ++ return '\\0'; ++ } else if (code === 0x000b /* \v */) { ++ // '\v' ++ return '\\x0B'; ++ } else { ++ return '\\x' + '00'.slice(hex.length) + hex; ++ } ++ } + +- return '/' + result + '/' + flags; +- } ++ function escapeDisallowedCharacter(code) { ++ if (code === 0x5c /* \ */) { ++ return '\\\\'; ++ } + +- return result; ++ if (code === 0x0a /* \n */) { ++ return '\\n'; + } + +- function escapeAllowedCharacter(code, next) { +- var hex; ++ if (code === 0x0d /* \r */) { ++ return '\\r'; ++ } + +- if (code === 0x08 /* \b */) { +- return '\\b'; +- } ++ if (code === 0x2028) { ++ return '\\u2028'; ++ } + +- if (code === 0x0C /* \f */) { +- return '\\f'; +- } ++ if (code === 0x2029) { ++ return '\\u2029'; ++ } + +- if (code === 0x09 /* \t */) { +- return '\\t'; +- } ++ throw new Error('Incorrectly classified character'); ++ } ++ ++ function escapeDirective(str) { ++ var i, iz, code, quote; ++ ++ quote = quotes === 'double' ? '"' : "'"; ++ for (i = 0, iz = str.length; i < iz; ++i) { ++ code = str.charCodeAt(i); ++ if (code === 0x27 /* ' */) { ++ quote = '"'; ++ break; ++ } else if (code === 0x22 /* " */) { ++ quote = "'"; ++ break; ++ } else if (code === 0x5c /* \ */) { ++ ++i; ++ } ++ } + +- hex = code.toString(16).toUpperCase(); +- if (json || code > 0xFF) { +- return '\\u' + '0000'.slice(hex.length) + hex; +- } else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) { +- return '\\0'; +- } else if (code === 0x000B /* \v */) { // '\v' +- return '\\x0B'; +- } else { +- return '\\x' + '00'.slice(hex.length) + hex; +- } ++ return quote + str + quote; ++ } ++ ++ function escapeString(str) { ++ var result = '', ++ i, ++ len, ++ code, ++ singleQuotes = 0, ++ doubleQuotes = 0, ++ single, ++ quote; ++ ++ for (i = 0, len = str.length; i < len; ++i) { ++ code = str.charCodeAt(i); ++ if (code === 0x27 /* ' */) { ++ ++singleQuotes; ++ } else if (code === 0x22 /* " */) { ++ ++doubleQuotes; ++ } else if (code === 0x2f /* / */ && json) { ++ result += '\\'; ++ } else if (esutils.code.isLineTerminator(code) || code === 0x5c /* \ */) { ++ result += escapeDisallowedCharacter(code); ++ continue; ++ } else if ( ++ !esutils.code.isIdentifierPartES5(code) && ++ ((json && code < 0x20) /* SP */ || ++ (!json && ++ !escapeless && ++ (code < 0x20 /* SP */ || code > 0x7e))) /* ~ */ ++ ) { ++ result += escapeAllowedCharacter(code, str.charCodeAt(i + 1)); ++ continue; ++ } ++ result += String.fromCharCode(code); + } + +- function escapeDisallowedCharacter(code) { +- if (code === 0x5C /* \ */) { +- return '\\\\'; +- } ++ single = !( ++ quotes === 'double' || ++ (quotes === 'auto' && doubleQuotes < singleQuotes) ++ ); ++ quote = single ? "'" : '"'; + +- if (code === 0x0A /* \n */) { +- return '\\n'; +- } ++ if (!(single ? singleQuotes : doubleQuotes)) { ++ return quote + result + quote; ++ } + +- if (code === 0x0D /* \r */) { +- return '\\r'; +- } ++ str = result; ++ result = quote; ++ ++ for (i = 0, len = str.length; i < len; ++i) { ++ code = str.charCodeAt(i); ++ if ( ++ (code === 0x27 /* ' */ && single) || ++ (code === 0x22 /* " */ && !single) ++ ) { ++ result += '\\'; ++ } ++ result += String.fromCharCode(code); ++ } + +- if (code === 0x2028) { +- return '\\u2028'; +- } ++ return result + quote; ++ } ++ ++ /** ++ * flatten an array to a string, where the array can contain ++ * either strings or nested arrays ++ */ ++ function flattenToString(arr) { ++ var i, ++ iz, ++ elem, ++ result = ''; ++ for (i = 0, iz = arr.length; i < iz; ++i) { ++ elem = arr[i]; ++ result += Array.isArray(elem) ? flattenToString(elem) : elem; ++ } ++ return result; ++ } ++ ++ /** ++ * convert generated to a SourceNode when source maps are enabled. ++ */ ++ function toSourceNodeWhenNeeded(generated, node) { ++ if (!sourceMap) { ++ // with no source maps, generated is either an ++ // array or a string. if an array, flatten it. ++ // if a string, just return it ++ if (Array.isArray(generated)) { ++ return flattenToString(generated); ++ } else { ++ return generated; ++ } ++ } ++ if (node == null) { ++ if (generated instanceof SourceNode) { ++ return generated; ++ } else { ++ node = {}; ++ } ++ } ++ if (node.loc == null) { ++ return new SourceNode( ++ null, ++ null, ++ sourceMap, ++ generated, ++ node.name || null ++ ); ++ } ++ return new SourceNode( ++ node.loc.start.line, ++ node.loc.start.column, ++ sourceMap === true ? node.loc.source || null : sourceMap, ++ generated, ++ node.name || null ++ ); ++ } ++ ++ function noEmptySpace() { ++ return space ? space : ' '; ++ } ++ ++ function join(left, right) { ++ var leftSource, rightSource, leftCharCode, rightCharCode; ++ ++ leftSource = toSourceNodeWhenNeeded(left).toString(); ++ if (leftSource.length === 0) { ++ return [right]; ++ } + +- if (code === 0x2029) { +- return '\\u2029'; +- } ++ rightSource = toSourceNodeWhenNeeded(right).toString(); ++ if (rightSource.length === 0) { ++ return [left]; ++ } + +- throw new Error('Incorrectly classified character'); ++ leftCharCode = leftSource.charCodeAt(leftSource.length - 1); ++ rightCharCode = rightSource.charCodeAt(0); ++ ++ if ( ++ ((leftCharCode === 0x2b /* + */ || leftCharCode === 0x2d) /* - */ && ++ leftCharCode === rightCharCode) || ++ (esutils.code.isIdentifierPartES5(leftCharCode) && ++ esutils.code.isIdentifierPartES5(rightCharCode)) || ++ (leftCharCode === 0x2f /* / */ && rightCharCode === 0x69) /* i */ ++ ) { ++ // infix word operators all start with `i` ++ return [left, noEmptySpace(), right]; ++ } else if ( ++ esutils.code.isWhiteSpace(leftCharCode) || ++ esutils.code.isLineTerminator(leftCharCode) || ++ esutils.code.isWhiteSpace(rightCharCode) || ++ esutils.code.isLineTerminator(rightCharCode) ++ ) { ++ return [left, right]; ++ } ++ return [left, space, right]; ++ } ++ ++ function addIndent(stmt) { ++ return [base, stmt]; ++ } ++ ++ function withIndent(fn) { ++ var previousBase; ++ previousBase = base; ++ base += indent; ++ fn(base); ++ base = previousBase; ++ } ++ ++ function calculateSpaces(str) { ++ var i; ++ for (i = str.length - 1; i >= 0; --i) { ++ if (esutils.code.isLineTerminator(str.charCodeAt(i))) { ++ break; ++ } ++ } ++ return str.length - 1 - i; ++ } ++ ++ function adjustMultilineComment(value, specialBase) { ++ var array, i, len, line, j, spaces, previousBase, sn; ++ ++ array = value.split(/\r\n|[\r\n]/); ++ spaces = Number.MAX_VALUE; ++ ++ // first line doesn't have indentation ++ for (i = 1, len = array.length; i < len; ++i) { ++ line = array[i]; ++ j = 0; ++ while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) { ++ ++j; ++ } ++ if (spaces > j) { ++ spaces = j; ++ } + } + +- function escapeDirective(str) { +- var i, iz, code, quote; ++ if (typeof specialBase !== 'undefined') { ++ // pattern like ++ // { ++ // var t = 20; /* ++ // * this is comment ++ // */ ++ // } ++ previousBase = base; ++ if (array[1][spaces] === '*') { ++ specialBase += ' '; ++ } ++ base = specialBase; ++ } else { ++ if (spaces & 1) { ++ // /* ++ // * ++ // */ ++ // If spaces are odd number, above pattern is considered. ++ // We waste 1 space. ++ --spaces; ++ } ++ previousBase = base; ++ } + +- quote = quotes === 'double' ? '"' : '\''; +- for (i = 0, iz = str.length; i < iz; ++i) { +- code = str.charCodeAt(i); +- if (code === 0x27 /* ' */) { +- quote = '"'; +- break; +- } else if (code === 0x22 /* " */) { +- quote = '\''; +- break; +- } else if (code === 0x5C /* \ */) { +- ++i; +- } +- } ++ for (i = 1, len = array.length; i < len; ++i) { ++ sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces))); ++ array[i] = sourceMap ? sn.join('') : sn; ++ } + +- return quote + str + quote; +- } +- +- function escapeString(str) { +- var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote; +- +- for (i = 0, len = str.length; i < len; ++i) { +- code = str.charCodeAt(i); +- if (code === 0x27 /* ' */) { +- ++singleQuotes; +- } else if (code === 0x22 /* " */) { +- ++doubleQuotes; +- } else if (code === 0x2F /* / */ && json) { +- result += '\\'; +- } else if (esutils.code.isLineTerminator(code) || code === 0x5C /* \ */) { +- result += escapeDisallowedCharacter(code); +- continue; +- } else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 0x20 /* SP */ || !json && !escapeless && (code < 0x20 /* SP */ || code > 0x7E /* ~ */))) { +- result += escapeAllowedCharacter(code, str.charCodeAt(i + 1)); +- continue; +- } +- result += String.fromCharCode(code); +- } ++ base = previousBase; + +- single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes)); +- quote = single ? '\'' : '"'; ++ return array.join('\n'); ++ } + +- if (!(single ? singleQuotes : doubleQuotes)) { +- return quote + result + quote; ++ function generateComment(comment, specialBase) { ++ if (comment.type === 'Line') { ++ if (endsWithLineTerminator(comment.value)) { ++ return '//' + comment.value; ++ } else { ++ // Always use LineTerminator ++ var result = '//' + comment.value; ++ if (!preserveBlankLines) { ++ result += '\n'; ++ } ++ return result; ++ } ++ } ++ if ( ++ extra.format.indent.adjustMultilineComment && ++ /[\n\r]/.test(comment.value) ++ ) { ++ return adjustMultilineComment('/*' + comment.value + '*/', specialBase); ++ } ++ return '/*' + comment.value + '*/'; ++ } ++ ++ function addComments(stmt, result) { ++ var i, ++ len, ++ comment, ++ save, ++ tailingToStatement, ++ specialBase, ++ fragment, ++ extRange, ++ range, ++ prevRange, ++ prefix, ++ infix, ++ suffix, ++ count; ++ ++ if (stmt.leadingComments && stmt.leadingComments.length > 0) { ++ save = result; ++ ++ if (preserveBlankLines) { ++ comment = stmt.leadingComments[0]; ++ result = []; ++ ++ extRange = comment.extendedRange; ++ range = comment.range; ++ ++ prefix = sourceCode.substring(extRange[0], range[0]); ++ count = (prefix.match(/\n/g) || []).length; ++ if (count > 0) { ++ result.push(stringRepeat('\n', count)); ++ result.push(addIndent(generateComment(comment))); ++ } else { ++ result.push(prefix); ++ result.push(generateComment(comment)); + } + +- str = result; +- result = quote; ++ prevRange = range; + +- for (i = 0, len = str.length; i < len; ++i) { +- code = str.charCodeAt(i); +- if ((code === 0x27 /* ' */ && single) || (code === 0x22 /* " */ && !single)) { +- result += '\\'; +- } +- result += String.fromCharCode(code); +- } ++ for (i = 1, len = stmt.leadingComments.length; i < len; i++) { ++ comment = stmt.leadingComments[i]; ++ range = comment.range; + +- return result + quote; +- } ++ infix = sourceCode.substring(prevRange[1], range[0]); ++ count = (infix.match(/\n/g) || []).length; ++ result.push(stringRepeat('\n', count)); ++ result.push(addIndent(generateComment(comment))); + +- /** +- * flatten an array to a string, where the array can contain +- * either strings or nested arrays +- */ +- function flattenToString(arr) { +- var i, iz, elem, result = ''; +- for (i = 0, iz = arr.length; i < iz; ++i) { +- elem = arr[i]; +- result += Array.isArray(elem) ? flattenToString(elem) : elem; ++ prevRange = range; + } +- return result; +- } + +- /** +- * convert generated to a SourceNode when source maps are enabled. +- */ +- function toSourceNodeWhenNeeded(generated, node) { +- if (!sourceMap) { +- // with no source maps, generated is either an +- // array or a string. if an array, flatten it. +- // if a string, just return it +- if (Array.isArray(generated)) { +- return flattenToString(generated); +- } else { +- return generated; +- } ++ suffix = sourceCode.substring(range[1], extRange[1]); ++ count = (suffix.match(/\n/g) || []).length; ++ result.push(stringRepeat('\n', count)); ++ } else { ++ comment = stmt.leadingComments[0]; ++ result = []; ++ if ( ++ safeConcatenation && ++ stmt.type === Syntax.Program && ++ stmt.body.length === 0 ++ ) { ++ result.push('\n'); + } +- if (node == null) { +- if (generated instanceof SourceNode) { +- return generated; +- } else { +- node = {}; +- } ++ result.push(generateComment(comment)); ++ if ( ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result.push('\n'); + } +- if (node.loc == null) { +- return new SourceNode(null, null, sourceMap, generated, node.name || null); ++ ++ for (i = 1, len = stmt.leadingComments.length; i < len; ++i) { ++ comment = stmt.leadingComments[i]; ++ fragment = [generateComment(comment)]; ++ if ( ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ++ ) { ++ fragment.push('\n'); ++ } ++ result.push(addIndent(fragment)); + } +- return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated, node.name || null); +- } ++ } + +- function noEmptySpace() { +- return (space) ? space : ' '; ++ result.push(addIndent(save)); + } + +- function join(left, right) { +- var leftSource, +- rightSource, +- leftCharCode, +- rightCharCode; ++ if (stmt.trailingComments) { ++ if (preserveBlankLines) { ++ comment = stmt.trailingComments[0]; ++ extRange = comment.extendedRange; ++ range = comment.range; + +- leftSource = toSourceNodeWhenNeeded(left).toString(); +- if (leftSource.length === 0) { +- return [right]; +- } ++ prefix = sourceCode.substring(extRange[0], range[0]); ++ count = (prefix.match(/\n/g) || []).length; + +- rightSource = toSourceNodeWhenNeeded(right).toString(); +- if (rightSource.length === 0) { +- return [left]; ++ if (count > 0) { ++ result.push(stringRepeat('\n', count)); ++ result.push(addIndent(generateComment(comment))); ++ } else { ++ result.push(prefix); ++ result.push(generateComment(comment)); + } ++ } else { ++ tailingToStatement = !endsWithLineTerminator( ++ toSourceNodeWhenNeeded(result).toString() ++ ); ++ specialBase = stringRepeat( ++ ' ', ++ calculateSpaces( ++ toSourceNodeWhenNeeded([base, result, indent]).toString() ++ ) ++ ); ++ for (i = 0, len = stmt.trailingComments.length; i < len; ++i) { ++ comment = stmt.trailingComments[i]; ++ if (tailingToStatement) { ++ // We assume target like following script ++ // ++ // var t = 20; /** ++ // * This is comment of t ++ // */ ++ if (i === 0) { ++ // first case ++ result = [result, indent]; ++ } else { ++ result = [result, specialBase]; ++ } ++ result.push(generateComment(comment, specialBase)); ++ } else { ++ result = [result, addIndent(generateComment(comment))]; ++ } ++ if ( ++ i !== len - 1 && ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result = [result, '\n']; ++ } ++ } ++ } ++ } + +- leftCharCode = leftSource.charCodeAt(leftSource.length - 1); +- rightCharCode = rightSource.charCodeAt(0); ++ return result; ++ } + +- if ((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode || +- esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || +- leftCharCode === 0x2F /* / */ && rightCharCode === 0x69 /* i */) { // infix word operators all start with `i` +- return [left, noEmptySpace(), right]; +- } else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || +- esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) { +- return [left, right]; +- } +- return [left, space, right]; +- } ++ function generateBlankLines(start, end, result) { ++ var j, ++ newlineCount = 0; + +- function addIndent(stmt) { +- return [base, stmt]; ++ for (j = start; j < end; j++) { ++ if (sourceCode[j] === '\n') { ++ newlineCount++; ++ } + } + +- function withIndent(fn) { +- var previousBase; +- previousBase = base; +- base += indent; +- fn(base); +- base = previousBase; ++ for (j = 1; j < newlineCount; j++) { ++ result.push(newline); + } ++ } + +- function calculateSpaces(str) { +- var i; +- for (i = str.length - 1; i >= 0; --i) { +- if (esutils.code.isLineTerminator(str.charCodeAt(i))) { +- break; +- } +- } +- return (str.length - 1) - i; ++ function parenthesize(text, current, should) { ++ if (current < should) { ++ return ['(', text, ')']; ++ } ++ return text; ++ } ++ ++ function generateVerbatimString(string) { ++ var i, iz, result; ++ result = string.split(/\r\n|\n/); ++ for (i = 1, iz = result.length; i < iz; i++) { ++ result[i] = newline + base + result[i]; ++ } ++ return result; ++ } ++ ++ function generateVerbatim(expr, precedence) { ++ var verbatim, result, prec; ++ verbatim = expr[extra.verbatim]; ++ ++ if (typeof verbatim === 'string') { ++ result = parenthesize( ++ generateVerbatimString(verbatim), ++ Precedence.Sequence, ++ precedence ++ ); ++ } else { ++ // verbatim is object ++ result = generateVerbatimString(verbatim.content); ++ prec = ++ verbatim.precedence != null ? verbatim.precedence : Precedence.Sequence; ++ result = parenthesize(result, prec, precedence); + } + +- function adjustMultilineComment(value, specialBase) { +- var array, i, len, line, j, spaces, previousBase, sn; ++ return toSourceNodeWhenNeeded(result, expr); ++ } + +- array = value.split(/\r\n|[\r\n]/); +- spaces = Number.MAX_VALUE; ++ function CodeGenerator() {} + +- // first line doesn't have indentation +- for (i = 1, len = array.length; i < len; ++i) { +- line = array[i]; +- j = 0; +- while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) { +- ++j; +- } +- if (spaces > j) { +- spaces = j; +- } +- } ++ // Helpers. + +- if (typeof specialBase !== 'undefined') { +- // pattern like +- // { +- // var t = 20; /* +- // * this is comment +- // */ +- // } +- previousBase = base; +- if (array[1][spaces] === '*') { +- specialBase += ' '; +- } +- base = specialBase; +- } else { +- if (spaces & 1) { +- // /* +- // * +- // */ +- // If spaces are odd number, above pattern is considered. +- // We waste 1 space. +- --spaces; +- } +- previousBase = base; +- } ++ CodeGenerator.prototype.maybeBlock = function (stmt, flags) { ++ var result, noLeadingComment; + +- for (i = 1, len = array.length; i < len; ++i) { +- sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces))); +- array[i] = sourceMap ? sn.join('') : sn; +- } ++ noLeadingComment = !extra.comment || !stmt.leadingComments; + +- base = previousBase; ++ if (stmt.type === Syntax.BlockStatement && noLeadingComment) { ++ return [space, this.generateStatement(stmt, flags)]; ++ } + +- return array.join('\n'); ++ if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { ++ return ';'; + } + +- function generateComment(comment, specialBase) { +- if (comment.type === 'Line') { +- if (endsWithLineTerminator(comment.value)) { +- return '//' + comment.value; +- } else { +- // Always use LineTerminator +- var result = '//' + comment.value; +- if (!preserveBlankLines) { +- result += '\n'; +- } +- return result; +- } ++ withIndent(() => { ++ result = [newline, addIndent(this.generateStatement(stmt, flags))]; ++ }); ++ ++ return result; ++ }; ++ ++ CodeGenerator.prototype.maybeBlockSuffix = (stmt, result) => { ++ var ends = endsWithLineTerminator( ++ toSourceNodeWhenNeeded(result).toString() ++ ); ++ if ( ++ stmt.type === Syntax.BlockStatement && ++ (!extra.comment || !stmt.leadingComments) && ++ !ends ++ ) { ++ return [result, space]; ++ } ++ if (ends) { ++ return [result, base]; ++ } ++ return [result, newline, base]; ++ }; ++ ++ function generateIdentifier(node) { ++ return toSourceNodeWhenNeeded(node.name, node); ++ } ++ ++ function generateAsyncPrefix(node, spaceRequired) { ++ return node.async ? 'async' + (spaceRequired ? noEmptySpace() : space) : ''; ++ } ++ ++ function generateStarSuffix(node) { ++ var isGenerator = node.generator && !extra.moz.starlessGenerator; ++ return isGenerator ? '*' + space : ''; ++ } ++ ++ function generateMethodPrefix(prop) { ++ var func = prop.value, ++ prefix = ''; ++ if (func.async) { ++ prefix += generateAsyncPrefix(func, !prop.computed); ++ } ++ if (func.generator) { ++ // avoid space before method name ++ prefix += generateStarSuffix(func) ? '*' : ''; ++ } ++ return prefix; ++ } ++ ++ CodeGenerator.prototype.generatePattern = function (node, precedence, flags) { ++ if (node.type === Syntax.Identifier) { ++ return generateIdentifier(node); ++ } ++ return this.generateExpression(node, precedence, flags); ++ }; ++ ++ CodeGenerator.prototype.generateFunctionParams = function (node) { ++ var i, iz, result, hasDefault; ++ ++ hasDefault = false; ++ ++ if ( ++ node.type === Syntax.ArrowFunctionExpression && ++ !node.rest && ++ (!node.defaults || node.defaults.length === 0) && ++ node.params.length === 1 && ++ node.params[0].type === Syntax.Identifier ++ ) { ++ // arg => { } case ++ result = [ ++ generateAsyncPrefix(node, true), ++ generateIdentifier(node.params[0]), ++ ]; ++ } else { ++ result = ++ node.type === Syntax.ArrowFunctionExpression ++ ? [generateAsyncPrefix(node, false)] ++ : []; ++ result.push('('); ++ if (node.defaults) { ++ hasDefault = true; ++ } ++ for (i = 0, iz = node.params.length; i < iz; ++i) { ++ if (hasDefault && node.defaults[i]) { ++ // Handle default values. ++ result.push( ++ this.generateAssignment( ++ node.params[i], ++ node.defaults[i], ++ '=', ++ Precedence.Assignment, ++ E_TTT ++ ) ++ ); ++ } else { ++ result.push( ++ this.generatePattern(node.params[i], Precedence.Assignment, E_TTT) ++ ); + } +- if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) { +- return adjustMultilineComment('/*' + comment.value + '*/', specialBase); ++ if (i + 1 < iz) { ++ result.push(',' + space); + } +- return '/*' + comment.value + '*/'; +- } ++ } + +- function addComments(stmt, result) { +- var i, len, comment, save, tailingToStatement, specialBase, fragment, +- extRange, range, prevRange, prefix, infix, suffix, count; ++ if (node.rest) { ++ if (node.params.length) { ++ result.push(',' + space); ++ } ++ result.push('...'); ++ result.push(generateIdentifier(node.rest)); ++ } + +- if (stmt.leadingComments && stmt.leadingComments.length > 0) { +- save = result; ++ result.push(')'); ++ } + +- if (preserveBlankLines) { +- comment = stmt.leadingComments[0]; +- result = []; ++ return result; ++ }; + +- extRange = comment.extendedRange; +- range = comment.range; ++ CodeGenerator.prototype.generateFunctionBody = function (node) { ++ var result, expr; + +- prefix = sourceCode.substring(extRange[0], range[0]); +- count = (prefix.match(/\n/g) || []).length; +- if (count > 0) { +- result.push(stringRepeat('\n', count)); +- result.push(addIndent(generateComment(comment))); +- } else { +- result.push(prefix); +- result.push(generateComment(comment)); +- } ++ result = this.generateFunctionParams(node); + +- prevRange = range; ++ if (node.type === Syntax.ArrowFunctionExpression) { ++ result.push(space); ++ result.push('=>'); ++ } + +- for (i = 1, len = stmt.leadingComments.length; i < len; i++) { +- comment = stmt.leadingComments[i]; +- range = comment.range; ++ if (node.expression) { ++ result.push(space); ++ expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT); ++ if (expr.toString().charAt(0) === '{') { ++ expr = ['(', expr, ')']; ++ } ++ result.push(expr); ++ } else { ++ result.push(this.maybeBlock(node.body, S_TTFF)); ++ } + +- infix = sourceCode.substring(prevRange[1], range[0]); +- count = (infix.match(/\n/g) || []).length; +- result.push(stringRepeat('\n', count)); +- result.push(addIndent(generateComment(comment))); ++ return result; ++ }; ++ ++ CodeGenerator.prototype.generateIterationForStatement = function ( ++ operator, ++ stmt, ++ flags ++ ) { ++ var result = [ ++ 'for' + (stmt.await ? noEmptySpace() + 'await' : '') + space + '(', ++ ]; ++ withIndent(() => { ++ if (stmt.left.type === Syntax.VariableDeclaration) { ++ withIndent(() => { ++ result.push(stmt.left.kind + noEmptySpace()); ++ result.push( ++ this.generateStatement(stmt.left.declarations[0], S_FFFF) ++ ); ++ }); ++ } else { ++ result.push(this.generateExpression(stmt.left, Precedence.Call, E_TTT)); ++ } ++ ++ result = join(result, operator); ++ result = [ ++ join( ++ result, ++ this.generateExpression(stmt.right, Precedence.Assignment, E_TTT) ++ ), ++ ')', ++ ]; ++ }); ++ result.push(this.maybeBlock(stmt.body, flags)); ++ return result; ++ }; ++ ++ CodeGenerator.prototype.generatePropertyKey = function (expr, computed) { ++ var result = []; ++ ++ if (computed) { ++ result.push('['); ++ } + +- prevRange = range; +- } ++ result.push(this.generateExpression(expr, Precedence.Assignment, E_TTT)); + +- suffix = sourceCode.substring(range[1], extRange[1]); +- count = (suffix.match(/\n/g) || []).length; +- result.push(stringRepeat('\n', count)); +- } else { +- comment = stmt.leadingComments[0]; +- result = []; +- if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) { +- result.push('\n'); +- } +- result.push(generateComment(comment)); +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push('\n'); +- } ++ if (computed) { ++ result.push(']'); ++ } ++ ++ return result; ++ }; ++ ++ CodeGenerator.prototype.generateAssignment = function ( ++ left, ++ right, ++ operator, ++ precedence, ++ flags ++ ) { ++ if (Precedence.Assignment < precedence) { ++ flags |= F_ALLOW_IN; ++ } + +- for (i = 1, len = stmt.leadingComments.length; i < len; ++i) { +- comment = stmt.leadingComments[i]; +- fragment = [generateComment(comment)]; +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { +- fragment.push('\n'); +- } +- result.push(addIndent(fragment)); ++ return parenthesize( ++ [ ++ this.generateExpression(left, Precedence.Call, flags), ++ space + operator + space, ++ this.generateExpression(right, Precedence.Assignment, flags), ++ ], ++ Precedence.Assignment, ++ precedence ++ ); ++ }; ++ ++ CodeGenerator.prototype.semicolon = (flags) => { ++ if (!semicolons && flags & F_SEMICOLON_OPT) { ++ return ''; ++ } ++ return ';'; ++ }; ++ ++ // Statements. ++ ++ CodeGenerator.Statement = { ++ BlockStatement: function (stmt, flags) { ++ var range, ++ content, ++ result = ['{', newline]; ++ ++ withIndent(() => { ++ // handle functions without any code ++ if (stmt.body.length === 0 && preserveBlankLines) { ++ range = stmt.range; ++ if (range[1] - range[0] > 2) { ++ content = sourceCode.substring(range[0] + 1, range[1] - 1); ++ if (content[0] === '\n') { ++ result = ['{']; ++ } ++ result.push(content); ++ } ++ } ++ ++ var i, iz, fragment, bodyFlags; ++ bodyFlags = S_TFFF; ++ if (flags & F_FUNC_BODY) { ++ bodyFlags |= F_DIRECTIVE_CTX; ++ } ++ ++ for (i = 0, iz = stmt.body.length; i < iz; ++i) { ++ if (preserveBlankLines) { ++ // handle spaces before the first line ++ if (i === 0) { ++ if (stmt.body[0].leadingComments) { ++ range = stmt.body[0].leadingComments[0].extendedRange; ++ content = sourceCode.substring(range[0], range[1]); ++ if (content[0] === '\n') { ++ result = ['{']; + } ++ } ++ if (!stmt.body[0].leadingComments) { ++ generateBlankLines( ++ stmt.range[0], ++ stmt.body[0].range[0], ++ result ++ ); ++ } ++ } ++ ++ // handle spaces between lines ++ if (i > 0) { ++ if ( ++ !stmt.body[i - 1].trailingComments && ++ !stmt.body[i].leadingComments ++ ) { ++ generateBlankLines( ++ stmt.body[i - 1].range[1], ++ stmt.body[i].range[0], ++ result ++ ); ++ } + } ++ } + +- result.push(addIndent(save)); +- } +- +- if (stmt.trailingComments) { +- +- if (preserveBlankLines) { +- comment = stmt.trailingComments[0]; +- extRange = comment.extendedRange; +- range = comment.range; ++ if (i === iz - 1) { ++ bodyFlags |= F_SEMICOLON_OPT; ++ } + +- prefix = sourceCode.substring(extRange[0], range[0]); +- count = (prefix.match(/\n/g) || []).length; +- +- if (count > 0) { +- result.push(stringRepeat('\n', count)); +- result.push(addIndent(generateComment(comment))); +- } else { +- result.push(prefix); +- result.push(generateComment(comment)); +- } ++ if (stmt.body[i].leadingComments && preserveBlankLines) { ++ fragment = this.generateStatement(stmt.body[i], bodyFlags); ++ } else { ++ fragment = addIndent( ++ this.generateStatement(stmt.body[i], bodyFlags) ++ ); ++ } ++ ++ result.push(fragment); ++ if ( ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ++ ) { ++ if (preserveBlankLines && i < iz - 1) { ++ // don't add a new line if there are leading coments ++ // in the next statement ++ if (!stmt.body[i + 1].leadingComments) { ++ result.push(newline); ++ } + } else { +- tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); +- specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString())); +- for (i = 0, len = stmt.trailingComments.length; i < len; ++i) { +- comment = stmt.trailingComments[i]; +- if (tailingToStatement) { +- // We assume target like following script +- // +- // var t = 20; /** +- // * This is comment of t +- // */ +- if (i === 0) { +- // first case +- result = [result, indent]; +- } else { +- result = [result, specialBase]; +- } +- result.push(generateComment(comment, specialBase)); +- } else { +- result = [result, addIndent(generateComment(comment))]; +- } +- if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result = [result, '\n']; +- } +- } +- } ++ result.push(newline); ++ } ++ } ++ ++ if (preserveBlankLines) { ++ // handle spaces after the last line ++ if (i === iz - 1) { ++ if (!stmt.body[i].trailingComments) { ++ generateBlankLines( ++ stmt.body[i].range[1], ++ stmt.range[1], ++ result ++ ); ++ } ++ } ++ } ++ } ++ }); ++ ++ result.push(addIndent('}')); ++ return result; ++ }, ++ ++ BreakStatement: function (stmt, flags) { ++ if (stmt.label) { ++ return 'break ' + stmt.label.name + this.semicolon(flags); ++ } ++ return 'break' + this.semicolon(flags); ++ }, ++ ++ ContinueStatement: function (stmt, flags) { ++ if (stmt.label) { ++ return 'continue ' + stmt.label.name + this.semicolon(flags); ++ } ++ return 'continue' + this.semicolon(flags); ++ }, ++ ++ ClassBody: function (stmt, flags) { ++ var result = ['{', newline]; ++ ++ withIndent((indent) => { ++ var i, iz; ++ ++ for (i = 0, iz = stmt.body.length; i < iz; ++i) { ++ result.push(indent); ++ result.push( ++ this.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT) ++ ); ++ if (i + 1 < iz) { ++ result.push(newline); ++ } ++ } ++ }); ++ ++ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { ++ result.push(newline); ++ } ++ result.push(base); ++ result.push('}'); ++ return result; ++ }, ++ ++ ClassDeclaration: function (stmt, flags) { ++ var result, fragment; ++ result = ['class']; ++ if (stmt.id) { ++ result = join( ++ result, ++ this.generateExpression(stmt.id, Precedence.Sequence, E_TTT) ++ ); ++ } ++ if (stmt.superClass) { ++ fragment = join( ++ 'extends', ++ this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT) ++ ); ++ result = join(result, fragment); ++ } ++ result.push(space); ++ result.push(this.generateStatement(stmt.body, S_TFFT)); ++ return result; ++ }, ++ ++ DirectiveStatement: function (stmt, flags) { ++ if (extra.raw && stmt.raw) { ++ return stmt.raw + this.semicolon(flags); ++ } ++ return escapeDirective(stmt.directive) + this.semicolon(flags); ++ }, ++ ++ DoWhileStatement: function (stmt, flags) { ++ // Because `do 42 while (cond)` is Syntax Error. We need semicolon. ++ var result = join('do', this.maybeBlock(stmt.body, S_TFFF)); ++ result = this.maybeBlockSuffix(stmt.body, result); ++ return join(result, [ ++ 'while' + space + '(', ++ this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), ++ ')' + this.semicolon(flags), ++ ]); ++ }, ++ ++ CatchClause: function (stmt, flags) { ++ var result; ++ withIndent(() => { ++ var guard; ++ ++ if (stmt.param) { ++ result = [ ++ 'catch' + space + '(', ++ this.generateExpression(stmt.param, Precedence.Sequence, E_TTT), ++ ')', ++ ]; ++ ++ if (stmt.guard) { ++ guard = this.generateExpression( ++ stmt.guard, ++ Precedence.Sequence, ++ E_TTT ++ ); ++ result.splice(2, 0, ' if ', guard); ++ } ++ } else { ++ result = ['catch']; + } ++ }); ++ result.push(this.maybeBlock(stmt.body, S_TFFF)); ++ return result; ++ }, + +- return result; +- } ++ DebuggerStatement: function (stmt, flags) { ++ return 'debugger' + this.semicolon(flags); ++ }, + +- function generateBlankLines(start, end, result) { +- var j, newlineCount = 0; ++ EmptyStatement: (stmt, flags) => ';', + +- for (j = start; j < end; j++) { +- if (sourceCode[j] === '\n') { +- newlineCount++; +- } +- } ++ ExportDefaultDeclaration: function (stmt, flags) { ++ var result = ['export'], ++ bodyFlags; + +- for (j = 1; j < newlineCount; j++) { ++ bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF; ++ ++ // export default HoistableDeclaration[Default] ++ // export default AssignmentExpression[In] ; ++ result = join(result, 'default'); ++ if (isStatement(stmt.declaration)) { ++ result = join( ++ result, ++ this.generateStatement(stmt.declaration, bodyFlags) ++ ); ++ } else { ++ result = join( ++ result, ++ this.generateExpression( ++ stmt.declaration, ++ Precedence.Assignment, ++ E_TTT ++ ) + this.semicolon(flags) ++ ); ++ } ++ return result; ++ }, ++ ++ ExportNamedDeclaration: function (stmt, flags) { ++ var result = ['export'], ++ bodyFlags; ++ ++ bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF; ++ ++ // export VariableStatement ++ // export Declaration[Default] ++ if (stmt.declaration) { ++ return join( ++ result, ++ this.generateStatement(stmt.declaration, bodyFlags) ++ ); ++ } ++ ++ // export ExportClause[NoReference] FromClause ; ++ // export ExportClause ; ++ if (stmt.specifiers) { ++ if (stmt.specifiers.length === 0) { ++ result = join(result, '{' + space + '}'); ++ } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) { ++ result = join( ++ result, ++ this.generateExpression( ++ stmt.specifiers[0], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ } else { ++ result = join(result, '{'); ++ withIndent((indent) => { ++ var i, iz; + result.push(newline); ++ for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) { ++ result.push(indent); ++ result.push( ++ this.generateExpression( ++ stmt.specifiers[i], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + newline); ++ } ++ } ++ }); ++ if ( ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result.push(newline); ++ } ++ result.push(base + '}'); + } +- } + +- function parenthesize(text, current, should) { +- if (current < should) { +- return ['(', text, ')']; +- } +- return text; +- } ++ if (stmt.source) { ++ result = join(result, [ ++ 'from' + space, ++ // ModuleSpecifier ++ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), ++ this.semicolon(flags), ++ ]); ++ } else { ++ result.push(this.semicolon(flags)); ++ } ++ } ++ return result; ++ }, ++ ++ ExportAllDeclaration: function (stmt, flags) { ++ // export * FromClause ; ++ return [ ++ 'export' + space, ++ '*' + space, ++ 'from' + space, ++ // ModuleSpecifier ++ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), ++ this.semicolon(flags), ++ ]; ++ }, ++ ++ ExpressionStatement: function (stmt, flags) { ++ var result, fragment; ++ ++ function isClassPrefixed(fragment) { ++ var code; ++ if (fragment.slice(0, 5) !== 'class') { ++ return false; ++ } ++ code = fragment.charCodeAt(5); ++ return ( ++ code === 0x7b /* '{' */ || ++ esutils.code.isWhiteSpace(code) || ++ esutils.code.isLineTerminator(code) ++ ); ++ } ++ ++ function isFunctionPrefixed(fragment) { ++ var code; ++ if (fragment.slice(0, 8) !== 'function') { ++ return false; ++ } ++ code = fragment.charCodeAt(8); ++ return ( ++ code === 0x28 /* '(' */ || ++ esutils.code.isWhiteSpace(code) || ++ code === 0x2a /* '*' */ || ++ esutils.code.isLineTerminator(code) ++ ); ++ } + +- function generateVerbatimString(string) { +- var i, iz, result; +- result = string.split(/\r\n|\n/); +- for (i = 1, iz = result.length; i < iz; i++) { +- result[i] = newline + base + result[i]; ++ function isAsyncPrefixed(fragment) { ++ var code, i, iz; ++ if (fragment.slice(0, 5) !== 'async') { ++ return false; + } +- return result; +- } ++ if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) { ++ return false; ++ } ++ for (i = 6, iz = fragment.length; i < iz; ++i) { ++ if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) { ++ break; ++ } ++ } ++ if (i === iz) { ++ return false; ++ } ++ if (fragment.slice(i, i + 8) !== 'function') { ++ return false; ++ } ++ code = fragment.charCodeAt(i + 8); ++ return ( ++ code === 0x28 /* '(' */ || ++ esutils.code.isWhiteSpace(code) || ++ code === 0x2a /* '*' */ || ++ esutils.code.isLineTerminator(code) ++ ); ++ } ++ ++ result = [ ++ this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT), ++ ]; ++ // 12.4 '{', 'function', 'class' is not allowed in this position. ++ // wrap expression with parentheses ++ fragment = toSourceNodeWhenNeeded(result).toString(); ++ if ( ++ fragment.charCodeAt(0) === 0x7b /* '{' */ || // ObjectExpression ++ isClassPrefixed(fragment) || ++ isFunctionPrefixed(fragment) || ++ isAsyncPrefixed(fragment) || ++ (directive && ++ flags & F_DIRECTIVE_CTX && ++ stmt.expression.type === Syntax.Literal && ++ typeof stmt.expression.value === 'string') ++ ) { ++ result = ['(', result, ')' + this.semicolon(flags)]; ++ } else { ++ result.push(this.semicolon(flags)); ++ } ++ return result; ++ }, ++ ++ ImportDeclaration: function (stmt, flags) { ++ // ES6: 15.2.1 valid import declarations: ++ // - import ImportClause FromClause ; ++ // - import ModuleSpecifier ; ++ var result, cursor; ++ ++ // If no ImportClause is present, ++ // this should be `import ModuleSpecifier` so skip `from` ++ // ModuleSpecifier is StringLiteral. ++ if (stmt.specifiers.length === 0) { ++ // import ModuleSpecifier ; ++ return [ ++ 'import', ++ space, ++ // ModuleSpecifier ++ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), ++ this.semicolon(flags), ++ ]; ++ } ++ ++ // import ImportClause FromClause ; ++ result = ['import']; ++ cursor = 0; ++ ++ // ImportedBinding ++ if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) { ++ result = join(result, [ ++ this.generateExpression( ++ stmt.specifiers[cursor], ++ Precedence.Sequence, ++ E_TTT ++ ), ++ ]); ++ ++cursor; ++ } ++ ++ if (stmt.specifiers[cursor]) { ++ if (cursor !== 0) { ++ result.push(','); ++ } ++ ++ if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) { ++ // NameSpaceImport ++ result = join(result, [ ++ space, ++ this.generateExpression( ++ stmt.specifiers[cursor], ++ Precedence.Sequence, ++ E_TTT ++ ), ++ ]); ++ } else { ++ // NamedImports ++ result.push(space + '{'); + +- function generateVerbatim(expr, precedence) { +- var verbatim, result, prec; +- verbatim = expr[extra.verbatim]; ++ if (stmt.specifiers.length - cursor === 1) { ++ // import { ... } from "..."; ++ result.push(space); ++ result.push( ++ this.generateExpression( ++ stmt.specifiers[cursor], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ result.push(space + '}' + space); ++ } else { ++ // import { ++ // ..., ++ // ..., ++ // } from "..."; ++ withIndent((indent) => { ++ var i, iz; ++ result.push(newline); ++ for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) { ++ result.push(indent); ++ result.push( ++ this.generateExpression( ++ stmt.specifiers[i], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + newline); ++ } ++ } ++ }); ++ if ( ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result.push(newline); ++ } ++ result.push(base + '}' + space); ++ } ++ } ++ } ++ ++ result = join(result, [ ++ 'from' + space, ++ // ModuleSpecifier ++ this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), ++ this.semicolon(flags), ++ ]); ++ return result; ++ }, ++ ++ VariableDeclarator: function (stmt, flags) { ++ var itemFlags = flags & F_ALLOW_IN ? E_TTT : E_FTT; ++ if (stmt.init) { ++ return [ ++ this.generateExpression(stmt.id, Precedence.Assignment, itemFlags), ++ space, ++ '=', ++ space, ++ this.generateExpression(stmt.init, Precedence.Assignment, itemFlags), ++ ]; ++ } ++ return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags); ++ }, ++ ++ VariableDeclaration: function (stmt, flags) { ++ // VariableDeclarator is typed as Statement, ++ // but joined with comma (not LineTerminator). ++ // So if comment is attached to target node, we should specialize. ++ var result, ++ i, ++ iz, ++ node, ++ bodyFlags, ++ that = this; ++ ++ result = [stmt.kind]; ++ ++ bodyFlags = flags & F_ALLOW_IN ? S_TFFF : S_FFFF; ++ ++ function block() { ++ node = stmt.declarations[0]; ++ if (extra.comment && node.leadingComments) { ++ result.push('\n'); ++ result.push(addIndent(that.generateStatement(node, bodyFlags))); ++ } else { ++ result.push(noEmptySpace()); ++ result.push(that.generateStatement(node, bodyFlags)); ++ } ++ ++ for (i = 1, iz = stmt.declarations.length; i < iz; ++i) { ++ node = stmt.declarations[i]; ++ if (extra.comment && node.leadingComments) { ++ result.push(',' + newline); ++ result.push(addIndent(that.generateStatement(node, bodyFlags))); ++ } else { ++ result.push(',' + space); ++ result.push(that.generateStatement(node, bodyFlags)); ++ } ++ } ++ } ++ ++ if (stmt.declarations.length > 1) { ++ withIndent(block); ++ } else { ++ block(); ++ } ++ ++ result.push(this.semicolon(flags)); ++ ++ return result; ++ }, ++ ++ ThrowStatement: function (stmt, flags) { ++ return [ ++ join( ++ 'throw', ++ this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) ++ ), ++ this.semicolon(flags), ++ ]; ++ }, ++ ++ TryStatement: function (stmt, flags) { ++ var result, i, iz, guardedHandlers; ++ ++ result = ['try', this.maybeBlock(stmt.block, S_TFFF)]; ++ result = this.maybeBlockSuffix(stmt.block, result); ++ ++ if (stmt.handlers) { ++ // old interface ++ for (i = 0, iz = stmt.handlers.length; i < iz; ++i) { ++ result = join( ++ result, ++ this.generateStatement(stmt.handlers[i], S_TFFF) ++ ); ++ if (stmt.finalizer || i + 1 !== iz) { ++ result = this.maybeBlockSuffix(stmt.handlers[i].body, result); ++ } ++ } ++ } else { ++ guardedHandlers = stmt.guardedHandlers || []; ++ ++ for (i = 0, iz = guardedHandlers.length; i < iz; ++i) { ++ result = join( ++ result, ++ this.generateStatement(guardedHandlers[i], S_TFFF) ++ ); ++ if (stmt.finalizer || i + 1 !== iz) { ++ result = this.maybeBlockSuffix(guardedHandlers[i].body, result); ++ } ++ } ++ ++ // new interface ++ if (stmt.handler) { ++ if (Array.isArray(stmt.handler)) { ++ for (i = 0, iz = stmt.handler.length; i < iz; ++i) { ++ result = join( ++ result, ++ this.generateStatement(stmt.handler[i], S_TFFF) ++ ); ++ if (stmt.finalizer || i + 1 !== iz) { ++ result = this.maybeBlockSuffix(stmt.handler[i].body, result); ++ } ++ } ++ } else { ++ result = join(result, this.generateStatement(stmt.handler, S_TFFF)); ++ if (stmt.finalizer) { ++ result = this.maybeBlockSuffix(stmt.handler.body, result); ++ } ++ } ++ } ++ } ++ if (stmt.finalizer) { ++ result = join(result, [ ++ 'finally', ++ this.maybeBlock(stmt.finalizer, S_TFFF), ++ ]); ++ } ++ return result; ++ }, ++ ++ SwitchStatement: function (stmt, flags) { ++ var result, fragment, i, iz, bodyFlags; ++ withIndent(() => { ++ result = [ ++ 'switch' + space + '(', ++ this.generateExpression( ++ stmt.discriminant, ++ Precedence.Sequence, ++ E_TTT ++ ), ++ ')' + space + '{' + newline, ++ ]; ++ }); ++ if (stmt.cases) { ++ bodyFlags = S_TFFF; ++ for (i = 0, iz = stmt.cases.length; i < iz; ++i) { ++ if (i === iz - 1) { ++ bodyFlags |= F_SEMICOLON_OPT; ++ } ++ fragment = addIndent( ++ this.generateStatement(stmt.cases[i], bodyFlags) ++ ); ++ result.push(fragment); ++ if ( ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ++ ) { ++ result.push(newline); ++ } ++ } ++ } ++ result.push(addIndent('}')); ++ return result; ++ }, ++ ++ SwitchCase: function (stmt, flags) { ++ var result, fragment, i, iz, bodyFlags; ++ withIndent(() => { ++ if (stmt.test) { ++ result = [ ++ join( ++ 'case', ++ this.generateExpression(stmt.test, Precedence.Sequence, E_TTT) ++ ), ++ ':', ++ ]; ++ } else { ++ result = ['default:']; ++ } ++ ++ i = 0; ++ iz = stmt.consequent.length; ++ if (iz && stmt.consequent[0].type === Syntax.BlockStatement) { ++ fragment = this.maybeBlock(stmt.consequent[0], S_TFFF); ++ result.push(fragment); ++ i = 1; ++ } ++ ++ if ( ++ i !== iz && ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result.push(newline); ++ } ++ ++ bodyFlags = S_TFFF; ++ for (; i < iz; ++i) { ++ if (i === iz - 1 && flags & F_SEMICOLON_OPT) { ++ bodyFlags |= F_SEMICOLON_OPT; ++ } ++ fragment = addIndent( ++ this.generateStatement(stmt.consequent[i], bodyFlags) ++ ); ++ result.push(fragment); ++ if ( ++ i + 1 !== iz && ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ++ ) { ++ result.push(newline); ++ } ++ } ++ }); ++ return result; ++ }, ++ ++ IfStatement: function (stmt, flags) { ++ var result, bodyFlags, semicolonOptional; ++ withIndent(() => { ++ result = [ ++ 'if' + space + '(', ++ this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), ++ ')', ++ ]; ++ }); ++ semicolonOptional = flags & F_SEMICOLON_OPT; ++ bodyFlags = S_TFFF; ++ if (semicolonOptional) { ++ bodyFlags |= F_SEMICOLON_OPT; ++ } ++ if (stmt.alternate) { ++ result.push(this.maybeBlock(stmt.consequent, S_TFFF)); ++ result = this.maybeBlockSuffix(stmt.consequent, result); ++ if (stmt.alternate.type === Syntax.IfStatement) { ++ result = join(result, [ ++ 'else ', ++ this.generateStatement(stmt.alternate, bodyFlags), ++ ]); ++ } else { ++ result = join( ++ result, ++ join('else', this.maybeBlock(stmt.alternate, bodyFlags)) ++ ); ++ } ++ } else { ++ result.push(this.maybeBlock(stmt.consequent, bodyFlags)); ++ } ++ return result; ++ }, ++ ++ ForStatement: function (stmt, flags) { ++ var result; ++ withIndent(() => { ++ result = ['for' + space + '(']; ++ if (stmt.init) { ++ if (stmt.init.type === Syntax.VariableDeclaration) { ++ result.push(this.generateStatement(stmt.init, S_FFFF)); ++ } else { ++ // F_ALLOW_IN becomes false. ++ result.push( ++ this.generateExpression(stmt.init, Precedence.Sequence, E_FTT) ++ ); ++ result.push(';'); ++ } ++ } else { ++ result.push(';'); ++ } + +- if (typeof verbatim === 'string') { +- result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence); ++ if (stmt.test) { ++ result.push(space); ++ result.push( ++ this.generateExpression(stmt.test, Precedence.Sequence, E_TTT) ++ ); ++ result.push(';'); + } else { +- // verbatim is object +- result = generateVerbatimString(verbatim.content); +- prec = (verbatim.precedence != null) ? verbatim.precedence : Precedence.Sequence; +- result = parenthesize(result, prec, precedence); ++ result.push(';'); + } + +- return toSourceNodeWhenNeeded(result, expr); ++ if (stmt.update) { ++ result.push(space); ++ result.push( ++ this.generateExpression(stmt.update, Precedence.Sequence, E_TTT) ++ ); ++ result.push(')'); ++ } else { ++ result.push(')'); ++ } ++ }); ++ ++ result.push( ++ this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF) ++ ); ++ return result; ++ }, ++ ++ ForInStatement: function (stmt, flags) { ++ return this.generateIterationForStatement( ++ 'in', ++ stmt, ++ flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF ++ ); ++ }, ++ ++ ForOfStatement: function (stmt, flags) { ++ return this.generateIterationForStatement( ++ 'of', ++ stmt, ++ flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF ++ ); ++ }, ++ ++ LabeledStatement: function (stmt, flags) { ++ return [ ++ stmt.label.name + ':', ++ this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF), ++ ]; ++ }, ++ ++ Program: function (stmt, flags) { ++ var result, fragment, i, iz, bodyFlags; ++ iz = stmt.body.length; ++ result = [safeConcatenation && iz > 0 ? '\n' : '']; ++ bodyFlags = S_TFTF; ++ for (i = 0; i < iz; ++i) { ++ if (!safeConcatenation && i === iz - 1) { ++ bodyFlags |= F_SEMICOLON_OPT; ++ } ++ ++ if (preserveBlankLines) { ++ // handle spaces before the first line ++ if (i === 0) { ++ if (!stmt.body[0].leadingComments) { ++ generateBlankLines(stmt.range[0], stmt.body[i].range[0], result); ++ } ++ } ++ ++ // handle spaces between lines ++ if (i > 0) { ++ if ( ++ !stmt.body[i - 1].trailingComments && ++ !stmt.body[i].leadingComments ++ ) { ++ generateBlankLines( ++ stmt.body[i - 1].range[1], ++ stmt.body[i].range[0], ++ result ++ ); ++ } ++ } ++ } ++ ++ fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags)); ++ result.push(fragment); ++ if ( ++ i + 1 < iz && ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString()) ++ ) { ++ if (preserveBlankLines) { ++ if (!stmt.body[i + 1].leadingComments) { ++ result.push(newline); ++ } ++ } else { ++ result.push(newline); ++ } ++ } ++ ++ if (preserveBlankLines) { ++ // handle spaces after the last line ++ if (i === iz - 1) { ++ if (!stmt.body[i].trailingComments) { ++ generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); ++ } ++ } ++ } ++ } ++ return result; ++ }, ++ ++ FunctionDeclaration: function (stmt, flags) { ++ return [ ++ generateAsyncPrefix(stmt, true), ++ 'function', ++ generateStarSuffix(stmt) || noEmptySpace(), ++ stmt.id ? generateIdentifier(stmt.id) : '', ++ this.generateFunctionBody(stmt), ++ ]; ++ }, ++ ++ ReturnStatement: function (stmt, flags) { ++ if (stmt.argument) { ++ return [ ++ join( ++ 'return', ++ this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) ++ ), ++ this.semicolon(flags), ++ ]; ++ } ++ return ['return' + this.semicolon(flags)]; ++ }, ++ ++ WhileStatement: function (stmt, flags) { ++ var result; ++ withIndent(() => { ++ result = [ ++ 'while' + space + '(', ++ this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), ++ ')', ++ ]; ++ }); ++ result.push( ++ this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF) ++ ); ++ return result; ++ }, ++ ++ WithStatement: function (stmt, flags) { ++ var result; ++ withIndent(() => { ++ result = [ ++ 'with' + space + '(', ++ this.generateExpression(stmt.object, Precedence.Sequence, E_TTT), ++ ')', ++ ]; ++ }); ++ result.push( ++ this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF) ++ ); ++ return result; ++ }, ++ }; ++ ++ merge(CodeGenerator.prototype, CodeGenerator.Statement); ++ ++ // Expressions. ++ ++ CodeGenerator.Expression = { ++ SequenceExpression: function (expr, precedence, flags) { ++ var result, i, iz; ++ if (Precedence.Sequence < precedence) { ++ flags |= F_ALLOW_IN; ++ } ++ result = []; ++ for (i = 0, iz = expr.expressions.length; i < iz; ++i) { ++ result.push( ++ this.generateExpression( ++ expr.expressions[i], ++ Precedence.Assignment, ++ flags ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + space); ++ } ++ } ++ return parenthesize(result, Precedence.Sequence, precedence); ++ }, ++ AssignmentExpression: function (expr, precedence, flags) { ++ return this.generateAssignment( ++ expr.left, ++ expr.right, ++ expr.operator, ++ precedence, ++ flags ++ ); ++ }, ++ ArrowFunctionExpression: function (expr, precedence, flags) { ++ return parenthesize( ++ this.generateFunctionBody(expr), ++ Precedence.ArrowFunction, ++ precedence ++ ); ++ }, ++ ConditionalExpression: function (expr, precedence, flags) { ++ if (Precedence.Conditional < precedence) { ++ flags |= F_ALLOW_IN; ++ } ++ return parenthesize( ++ [ ++ this.generateExpression(expr.test, Precedence.LogicalOR, flags), ++ space + '?' + space, ++ this.generateExpression( ++ expr.consequent, ++ Precedence.Assignment, ++ flags ++ ), ++ space + ':' + space, ++ this.generateExpression(expr.alternate, Precedence.Assignment, flags), ++ ], ++ Precedence.Conditional, ++ precedence ++ ); ++ }, ++ LogicalExpression: function (expr, precedence, flags) { ++ return this.BinaryExpression(expr, precedence, flags); ++ }, ++ BinaryExpression: function (expr, precedence, flags) { ++ var result, ++ leftPrecedence, ++ rightPrecedence, ++ currentPrecedence, ++ fragment, ++ leftSource; ++ currentPrecedence = BinaryPrecedence[expr.operator]; ++ leftPrecedence = ++ expr.operator === '**' ? Precedence.Postfix : currentPrecedence; ++ rightPrecedence = ++ expr.operator === '**' ? currentPrecedence : currentPrecedence + 1; ++ if (currentPrecedence < precedence) { ++ flags |= F_ALLOW_IN; ++ } ++ fragment = this.generateExpression(expr.left, leftPrecedence, flags); ++ leftSource = fragment.toString(); ++ if ( ++ leftSource.charCodeAt(leftSource.length - 1) === 0x2f /* / */ && ++ esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0)) ++ ) { ++ result = [fragment, noEmptySpace(), expr.operator]; ++ } else { ++ result = join(fragment, expr.operator); ++ } ++ fragment = this.generateExpression(expr.right, rightPrecedence, flags); ++ if ( ++ (expr.operator === '/' && fragment.toString().charAt(0) === '/') || ++ (expr.operator.slice(-1) === '<' && ++ fragment.toString().slice(0, 3) === '!--') ++ ) { ++ // If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start ++ result.push(noEmptySpace()); ++ result.push(fragment); ++ } else { ++ result = join(result, fragment); ++ } ++ if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) { ++ return ['(', result, ')']; ++ } ++ return parenthesize(result, currentPrecedence, precedence); ++ }, ++ CallExpression: function (expr, precedence, flags) { ++ var result, i, iz; ++ // F_ALLOW_UNPARATH_NEW becomes false. ++ result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)]; ++ result.push('('); ++ for (i = 0, iz = expr['arguments'].length; i < iz; ++i) { ++ result.push( ++ this.generateExpression( ++ expr['arguments'][i], ++ Precedence.Assignment, ++ E_TTT ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + space); ++ } ++ } ++ result.push(')'); ++ if (!(flags & F_ALLOW_CALL)) { ++ return ['(', result, ')']; ++ } ++ return parenthesize(result, Precedence.Call, precedence); ++ }, ++ NewExpression: function (expr, precedence, flags) { ++ var result, length, i, iz, itemFlags; ++ length = expr['arguments'].length; ++ // F_ALLOW_CALL becomes false. ++ // F_ALLOW_UNPARATH_NEW may become false. ++ itemFlags = ++ flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ++ ? E_TFT ++ : E_TFF; ++ result = join( ++ 'new', ++ this.generateExpression(expr.callee, Precedence.New, itemFlags) ++ ); ++ if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) { ++ result.push('('); ++ for (i = 0, iz = length; i < iz; ++i) { ++ result.push( ++ this.generateExpression( ++ expr['arguments'][i], ++ Precedence.Assignment, ++ E_TTT ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + space); ++ } ++ } ++ result.push(')'); ++ } ++ return parenthesize(result, Precedence.New, precedence); ++ }, ++ MemberExpression: function (expr, precedence, flags) { ++ var result, fragment; ++ // F_ALLOW_UNPARATH_NEW becomes false. ++ result = [ ++ this.generateExpression( ++ expr.object, ++ Precedence.Call, ++ flags & F_ALLOW_CALL ? E_TTF : E_TFF ++ ), ++ ]; ++ if (expr.computed) { ++ result.push('['); ++ result.push( ++ this.generateExpression( ++ expr.property, ++ Precedence.Sequence, ++ flags & F_ALLOW_CALL ? E_TTT : E_TFT ++ ) ++ ); ++ result.push(']'); ++ } else { ++ if ( ++ expr.object.type === Syntax.Literal && ++ typeof expr.object.value === 'number' ++ ) { ++ fragment = toSourceNodeWhenNeeded(result).toString(); ++ // When the following conditions are all true, ++ // 1. No floating point ++ // 2. Don't have exponents ++ // 3. The last character is a decimal digit ++ // 4. Not hexadecimal OR octal number literal ++ // we should add a floating point. ++ if ( ++ fragment.indexOf('.') < 0 && ++ !/[eExX]/.test(fragment) && ++ esutils.code.isDecimalDigit( ++ fragment.charCodeAt(fragment.length - 1) ++ ) && ++ !(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0' ++ ) { ++ result.push(' '); ++ } ++ } ++ result.push('.'); ++ result.push(generateIdentifier(expr.property)); ++ } ++ return parenthesize(result, Precedence.Member, precedence); ++ }, ++ MetaProperty: (expr, precedence, flags) => { ++ var result; ++ result = []; ++ result.push( ++ typeof expr.meta === 'string' ++ ? expr.meta ++ : generateIdentifier(expr.meta) ++ ); ++ result.push('.'); ++ result.push( ++ typeof expr.property === 'string' ++ ? expr.property ++ : generateIdentifier(expr.property) ++ ); ++ return parenthesize(result, Precedence.Member, precedence); ++ }, ++ UnaryExpression: function (expr, precedence, flags) { ++ var result, fragment, rightCharCode, leftSource, leftCharCode; ++ fragment = this.generateExpression( ++ expr.argument, ++ Precedence.Unary, ++ E_TTT ++ ); ++ if (space === '') { ++ result = join(expr.operator, fragment); ++ } else { ++ result = [expr.operator]; ++ if (expr.operator.length > 2) { ++ // delete, void, typeof ++ // get `typeof []`, not `typeof[]` ++ result = join(result, fragment); ++ } else { ++ // Prevent inserting spaces between operator and argument if it is unnecessary ++ // like, `!cond` ++ leftSource = toSourceNodeWhenNeeded(result).toString(); ++ leftCharCode = leftSource.charCodeAt(leftSource.length - 1); ++ rightCharCode = fragment.toString().charCodeAt(0); ++ if ( ++ ((leftCharCode === 0x2b /* + */ || leftCharCode === 0x2d) /* - */ && ++ leftCharCode === rightCharCode) || ++ (esutils.code.isIdentifierPartES5(leftCharCode) && ++ esutils.code.isIdentifierPartES5(rightCharCode)) ++ ) { ++ result.push(noEmptySpace()); ++ result.push(fragment); ++ } else { ++ result.push(fragment); ++ } ++ } ++ } ++ return parenthesize(result, Precedence.Unary, precedence); ++ }, ++ YieldExpression: function (expr, precedence, flags) { ++ var result; ++ if (expr.delegate) { ++ result = 'yield*'; ++ } else { ++ result = 'yield'; ++ } ++ if (expr.argument) { ++ result = join( ++ result, ++ this.generateExpression(expr.argument, Precedence.Yield, E_TTT) ++ ); ++ } ++ return parenthesize(result, Precedence.Yield, precedence); ++ }, ++ AwaitExpression: function (expr, precedence, flags) { ++ var result = join( ++ expr.all ? 'await*' : 'await', ++ this.generateExpression(expr.argument, Precedence.Await, E_TTT) ++ ); ++ return parenthesize(result, Precedence.Await, precedence); ++ }, ++ UpdateExpression: function (expr, precedence, flags) { ++ if (expr.prefix) { ++ return parenthesize( ++ [ ++ expr.operator, ++ this.generateExpression(expr.argument, Precedence.Unary, E_TTT), ++ ], ++ Precedence.Unary, ++ precedence ++ ); ++ } ++ return parenthesize( ++ [ ++ this.generateExpression(expr.argument, Precedence.Postfix, E_TTT), ++ expr.operator, ++ ], ++ Precedence.Postfix, ++ precedence ++ ); ++ }, ++ FunctionExpression: function (expr, precedence, flags) { ++ var result = [generateAsyncPrefix(expr, true), 'function']; ++ if (expr.id) { ++ result.push(generateStarSuffix(expr) || noEmptySpace()); ++ result.push(generateIdentifier(expr.id)); ++ } else { ++ result.push(generateStarSuffix(expr) || space); ++ } ++ result.push(this.generateFunctionBody(expr)); ++ return result; ++ }, ++ ArrayPattern: function (expr, precedence, flags) { ++ return this.ArrayExpression(expr, precedence, flags, true); ++ }, ++ ArrayExpression: function (expr, precedence, flags, isPattern) { ++ var result, multiline; ++ if (!expr.elements.length) { ++ return '[]'; ++ } ++ multiline = isPattern ? false : expr.elements.length > 1; ++ result = ['[', multiline ? newline : '']; ++ withIndent((indent) => { ++ var i, iz; ++ for (i = 0, iz = expr.elements.length; i < iz; ++i) { ++ if (!expr.elements[i]) { ++ if (multiline) { ++ result.push(indent); ++ } ++ if (i + 1 === iz) { ++ result.push(','); ++ } ++ } else { ++ result.push(multiline ? indent : ''); ++ result.push( ++ this.generateExpression( ++ expr.elements[i], ++ Precedence.Assignment, ++ E_TTT ++ ) ++ ); ++ } ++ if (i + 1 < iz) { ++ result.push(',' + (multiline ? newline : space)); ++ } ++ } ++ }); ++ if ( ++ multiline && ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result.push(newline); ++ } ++ result.push(multiline ? base : ''); ++ result.push(']'); ++ return result; ++ }, ++ RestElement: function (expr, precedence, flags) { ++ return '...' + this.generatePattern(expr.argument); ++ }, ++ ClassExpression: function (expr, precedence, flags) { ++ var result, fragment; ++ result = ['class']; ++ if (expr.id) { ++ result = join( ++ result, ++ this.generateExpression(expr.id, Precedence.Sequence, E_TTT) ++ ); ++ } ++ if (expr.superClass) { ++ fragment = join( ++ 'extends', ++ this.generateExpression(expr.superClass, Precedence.Unary, E_TTT) ++ ); ++ result = join(result, fragment); ++ } ++ result.push(space); ++ result.push(this.generateStatement(expr.body, S_TFFT)); ++ return result; ++ }, ++ MethodDefinition: function (expr, precedence, flags) { ++ var result, fragment; ++ if (expr['static']) { ++ result = ['static' + space]; ++ } else { ++ result = []; ++ } ++ if (expr.kind === 'get' || expr.kind === 'set') { ++ fragment = [ ++ join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)), ++ this.generateFunctionBody(expr.value), ++ ]; ++ } else { ++ fragment = [ ++ generateMethodPrefix(expr), ++ this.generatePropertyKey(expr.key, expr.computed), ++ this.generateFunctionBody(expr.value), ++ ]; ++ } ++ return join(result, fragment); ++ }, ++ Property: function (expr, precedence, flags) { ++ if (expr.kind === 'get' || expr.kind === 'set') { ++ return [ ++ expr.kind, ++ noEmptySpace(), ++ this.generatePropertyKey(expr.key, expr.computed), ++ this.generateFunctionBody(expr.value), ++ ]; ++ } ++ if (expr.shorthand) { ++ if (expr.value.type === 'AssignmentPattern') { ++ return this.AssignmentPattern(expr.value, Precedence.Sequence, E_TTT); ++ } ++ return this.generatePropertyKey(expr.key, expr.computed); ++ } ++ if (expr.method) { ++ return [ ++ generateMethodPrefix(expr), ++ this.generatePropertyKey(expr.key, expr.computed), ++ this.generateFunctionBody(expr.value), ++ ]; ++ } ++ return [ ++ this.generatePropertyKey(expr.key, expr.computed), ++ ':' + space, ++ this.generateExpression(expr.value, Precedence.Assignment, E_TTT), ++ ]; ++ }, ++ ObjectExpression: function (expr, precedence, flags) { ++ var multiline, result, fragment; ++ if (!expr.properties.length) { ++ return '{}'; ++ } ++ multiline = expr.properties.length > 1; ++ withIndent(() => { ++ fragment = this.generateExpression( ++ expr.properties[0], ++ Precedence.Sequence, ++ E_TTT ++ ); ++ }); ++ if (!multiline) { ++ // issues 4 ++ // Do not transform from ++ // dejavu.Class.declare({ ++ // method2: function () {} ++ // }); ++ // to ++ // dejavu.Class.declare({method2: function () { ++ // }}); ++ if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { ++ return ['{', space, fragment, space, '}']; ++ } ++ } ++ withIndent((indent) => { ++ var i, iz; ++ result = ['{', newline, indent, fragment]; ++ if (multiline) { ++ result.push(',' + newline); ++ for (i = 1, iz = expr.properties.length; i < iz; ++i) { ++ result.push(indent); ++ result.push( ++ this.generateExpression( ++ expr.properties[i], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + newline); ++ } ++ } ++ } ++ }); ++ if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { ++ result.push(newline); ++ } ++ result.push(base); ++ result.push('}'); ++ return result; ++ }, ++ AssignmentPattern: function (expr, precedence, flags) { ++ return this.generateAssignment( ++ expr.left, ++ expr.right, ++ '=', ++ precedence, ++ flags ++ ); ++ }, ++ ObjectPattern: function (expr, precedence, flags) { ++ var result, i, iz, multiline, property; ++ if (!expr.properties.length) { ++ return '{}'; ++ } ++ multiline = false; ++ if (expr.properties.length === 1) { ++ property = expr.properties[0]; ++ if ( ++ property.type === Syntax.Property && ++ property.value.type !== Syntax.Identifier ++ ) { ++ multiline = true; ++ } ++ } else { ++ for (i = 0, iz = expr.properties.length; i < iz; ++i) { ++ property = expr.properties[i]; ++ if (property.type === Syntax.Property && !property.shorthand) { ++ multiline = true; ++ break; ++ } ++ } ++ } ++ result = ['{', multiline ? newline : '']; ++ withIndent((indent) => { ++ var i, iz; ++ for (i = 0, iz = expr.properties.length; i < iz; ++i) { ++ result.push(multiline ? indent : ''); ++ result.push( ++ this.generateExpression( ++ expr.properties[i], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ if (i + 1 < iz) { ++ result.push(',' + (multiline ? newline : space)); ++ } ++ } ++ }); ++ if ( ++ multiline && ++ !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()) ++ ) { ++ result.push(newline); ++ } ++ result.push(multiline ? base : ''); ++ result.push('}'); ++ return result; ++ }, ++ ThisExpression: (expr, precedence, flags) => 'this', ++ Super: (expr, precedence, flags) => 'super', ++ Identifier: (expr, precedence, flags) => generateIdentifier(expr), ++ ImportDefaultSpecifier: (expr, precedence, flags) => ++ generateIdentifier(expr.id || expr.local), ++ ImportNamespaceSpecifier: (expr, precedence, flags) => { ++ var result = ['*']; ++ var id = expr.id || expr.local; ++ if (id) { ++ result.push(space + 'as' + noEmptySpace() + generateIdentifier(id)); ++ } ++ return result; ++ }, ++ ImportSpecifier: (expr, precedence, flags) => { ++ var imported = expr.imported; ++ var result = [imported.name]; ++ var local = expr.local; ++ if (local && local.name !== imported.name) { ++ result.push( ++ noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(local) ++ ); ++ } ++ return result; ++ }, ++ ExportSpecifier: (expr, precedence, flags) => { ++ var local = expr.local; ++ var result = [local.name]; ++ var exported = expr.exported; ++ if (exported && exported.name !== local.name) { ++ result.push( ++ noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(exported) ++ ); ++ } ++ return result; ++ }, ++ Literal: (expr, precedence, flags) => { ++ var raw; ++ if (expr.hasOwnProperty('raw') && parse && extra.raw) { ++ try { ++ raw = parse(expr.raw).body[0].expression; ++ if (raw.type === Syntax.Literal) { ++ if (raw.value === expr.value) { ++ return expr.raw; ++ } ++ } ++ } catch (e) { ++ // not use raw property ++ } ++ } ++ if (expr.regex) { ++ return '/' + expr.regex.pattern + '/' + expr.regex.flags; ++ } ++ if (expr.value === null) { ++ return 'null'; ++ } ++ if (typeof expr.value === 'string') { ++ return escapeString(expr.value); ++ } ++ if (typeof expr.value === 'number') { ++ return generateNumber(expr.value); ++ } ++ if (typeof expr.value === 'boolean') { ++ return expr.value ? 'true' : 'false'; ++ } ++ return generateRegExp(expr.value); ++ }, ++ GeneratorExpression: function (expr, precedence, flags) { ++ return this.ComprehensionExpression(expr, precedence, flags); ++ }, ++ ComprehensionExpression: function (expr, precedence, flags) { ++ // GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...] ++ // Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6 ++ var result, i, iz, fragment; ++ result = expr.type === Syntax.GeneratorExpression ? ['('] : ['[']; ++ if (extra.moz.comprehensionExpressionStartsWithAssignment) { ++ fragment = this.generateExpression( ++ expr.body, ++ Precedence.Assignment, ++ E_TTT ++ ); ++ result.push(fragment); ++ } ++ if (expr.blocks) { ++ withIndent(() => { ++ for (i = 0, iz = expr.blocks.length; i < iz; ++i) { ++ fragment = this.generateExpression( ++ expr.blocks[i], ++ Precedence.Sequence, ++ E_TTT ++ ); ++ if ( ++ i > 0 || ++ extra.moz.comprehensionExpressionStartsWithAssignment ++ ) { ++ result = join(result, fragment); ++ } else { ++ result.push(fragment); ++ } ++ } ++ }); ++ } ++ if (expr.filter) { ++ result = join(result, 'if' + space); ++ fragment = this.generateExpression( ++ expr.filter, ++ Precedence.Sequence, ++ E_TTT ++ ); ++ result = join(result, ['(', fragment, ')']); ++ } ++ if (!extra.moz.comprehensionExpressionStartsWithAssignment) { ++ fragment = this.generateExpression( ++ expr.body, ++ Precedence.Assignment, ++ E_TTT ++ ); ++ result = join(result, fragment); ++ } ++ result.push(expr.type === Syntax.GeneratorExpression ? ')' : ']'); ++ return result; ++ }, ++ ComprehensionBlock: function (expr, precedence, flags) { ++ var fragment; ++ if (expr.left.type === Syntax.VariableDeclaration) { ++ fragment = [ ++ expr.left.kind, ++ noEmptySpace(), ++ this.generateStatement(expr.left.declarations[0], S_FFFF), ++ ]; ++ } else { ++ fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT); ++ } ++ fragment = join(fragment, expr.of ? 'of' : 'in'); ++ fragment = join( ++ fragment, ++ this.generateExpression(expr.right, Precedence.Sequence, E_TTT) ++ ); ++ return ['for' + space + '(', fragment, ')']; ++ }, ++ SpreadElement: function (expr, precedence, flags) { ++ return [ ++ '...', ++ this.generateExpression(expr.argument, Precedence.Assignment, E_TTT), ++ ]; ++ }, ++ TaggedTemplateExpression: function (expr, precedence, flags) { ++ var itemFlags = E_TTF; ++ if (!(flags & F_ALLOW_CALL)) { ++ itemFlags = E_TFF; ++ } ++ var result = [ ++ this.generateExpression(expr.tag, Precedence.Call, itemFlags), ++ this.generateExpression(expr.quasi, Precedence.Primary, E_FFT), ++ ]; ++ return parenthesize(result, Precedence.TaggedTemplate, precedence); ++ }, ++ TemplateElement: (expr, precedence, flags) => { ++ // Don't use "cooked". Since tagged template can use raw template ++ // representation. So if we do so, it breaks the script semantics. ++ return expr.value.raw; ++ }, ++ TemplateLiteral: function (expr, precedence, flags) { ++ var result, i, iz; ++ result = ['`']; ++ for (i = 0, iz = expr.quasis.length; i < iz; ++i) { ++ result.push( ++ this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT) ++ ); ++ if (i + 1 < iz) { ++ result.push('${' + space); ++ result.push( ++ this.generateExpression( ++ expr.expressions[i], ++ Precedence.Sequence, ++ E_TTT ++ ) ++ ); ++ result.push(space + '}'); ++ } ++ } ++ result.push('`'); ++ return result; ++ }, ++ ModuleSpecifier: function (expr, precedence, flags) { ++ return this.Literal(expr, precedence, flags); ++ }, ++ ImportExpression: function (expr, precedence, flag) { ++ var workaround = "imp"; ++ return parenthesize( ++ [ ++ `${workaround}ort(${this.generateExpression(expr.source, Precedence.Assignment, E_TTT)})`, ++ ], ++ Precedence.Call, ++ precedence ++ ); ++ }, ++ }; ++ ++ merge(CodeGenerator.prototype, CodeGenerator.Expression); ++ ++ CodeGenerator.prototype.generateExpression = function ( ++ expr, ++ precedence, ++ flags ++ ) { ++ var result, type; ++ ++ type = expr.type || Syntax.Property; ++ ++ if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { ++ return generateVerbatim(expr, precedence); + } + +- function CodeGenerator() { +- } ++ result = this[type](expr, precedence, flags); + +- // Helpers. ++ if (extra.comment) { ++ result = addComments(expr, result); ++ } ++ return toSourceNodeWhenNeeded(result, expr); ++ }; + +- CodeGenerator.prototype.maybeBlock = function(stmt, flags) { +- var result, noLeadingComment, that = this; ++ CodeGenerator.prototype.generateStatement = function (stmt, flags) { ++ var result, fragment; + +- noLeadingComment = !extra.comment || !stmt.leadingComments; ++ result = this[stmt.type](stmt, flags); + +- if (stmt.type === Syntax.BlockStatement && noLeadingComment) { +- return [space, this.generateStatement(stmt, flags)]; +- } ++ // Attach comments + +- if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { +- return ';'; +- } ++ if (extra.comment) { ++ result = addComments(stmt, result); ++ } + +- withIndent(function () { +- result = [ +- newline, +- addIndent(that.generateStatement(stmt, flags)) +- ]; +- }); ++ fragment = toSourceNodeWhenNeeded(result).toString(); ++ if ( ++ stmt.type === Syntax.Program && ++ !safeConcatenation && ++ newline === '' && ++ fragment.charAt(fragment.length - 1) === '\n' ++ ) { ++ result = sourceMap ++ ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') ++ : fragment.replace(/\s+$/, ''); ++ } + +- return result; +- }; ++ return toSourceNodeWhenNeeded(result, stmt); ++ }; + +- CodeGenerator.prototype.maybeBlockSuffix = function (stmt, result) { +- var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); +- if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) { +- return [result, space]; +- } +- if (ends) { +- return [result, base]; +- } +- return [result, newline, base]; +- }; ++ function generateInternal(node) { ++ var codegen; + +- function generateIdentifier(node) { +- return toSourceNodeWhenNeeded(node.name, node); ++ codegen = new CodeGenerator(); ++ if (isStatement(node)) { ++ return codegen.generateStatement(node, S_TFFF); + } + +- function generateAsyncPrefix(node, spaceRequired) { +- return node.async ? 'async' + (spaceRequired ? noEmptySpace() : space) : ''; ++ if (isExpression(node)) { ++ return codegen.generateExpression(node, Precedence.Sequence, E_TTT); + } + +- function generateStarSuffix(node) { +- var isGenerator = node.generator && !extra.moz.starlessGenerator; +- return isGenerator ? '*' + space : ''; ++ throw new Error('Unknown node type: ' + node.type); ++ } ++ ++ function generate(node, options) { ++ var defaultOptions = getDefaultOptions(), ++ result, ++ pair; ++ ++ if (options != null) { ++ // Obsolete options ++ // ++ // `options.indent` ++ // `options.base` ++ // ++ // Instead of them, we can use `option.format.indent`. ++ if (typeof options.indent === 'string') { ++ defaultOptions.format.indent.style = options.indent; ++ } ++ if (typeof options.base === 'number') { ++ defaultOptions.format.indent.base = options.base; ++ } ++ options = updateDeeply(defaultOptions, options); ++ indent = options.format.indent.style; ++ if (typeof options.base === 'string') { ++ base = options.base; ++ } else { ++ base = stringRepeat(indent, options.format.indent.base); ++ } ++ } else { ++ options = defaultOptions; ++ indent = options.format.indent.style; ++ base = stringRepeat(indent, options.format.indent.base); + } +- +- function generateMethodPrefix(prop) { +- var func = prop.value, prefix = ''; +- if (func.async) { +- prefix += generateAsyncPrefix(func, !prop.computed); +- } +- if (func.generator) { +- // avoid space before method name +- prefix += generateStarSuffix(func) ? '*' : ''; +- } +- return prefix; ++ json = options.format.json; ++ renumber = options.format.renumber; ++ hexadecimal = json ? false : options.format.hexadecimal; ++ quotes = json ? 'double' : options.format.quotes; ++ escapeless = options.format.escapeless; ++ newline = options.format.newline; ++ space = options.format.space; ++ if (options.format.compact) { ++ newline = space = indent = base = ''; ++ } ++ parentheses = options.format.parentheses; ++ semicolons = options.format.semicolons; ++ safeConcatenation = options.format.safeConcatenation; ++ directive = options.directive; ++ parse = json ? null : options.parse; ++ sourceMap = options.sourceMap; ++ sourceCode = options.sourceCode; ++ preserveBlankLines = ++ options.format.preserveBlankLines && sourceCode !== null; ++ extra = options; ++ ++ if (sourceMap) { ++ if (!exports.browser) { ++ // We assume environment is node.js ++ // And prevent from including source-map by browserify ++ SourceNode = require('source-map').SourceNode; ++ } else { ++ SourceNode = global.sourceMap.SourceNode; ++ } + } + +- CodeGenerator.prototype.generatePattern = function (node, precedence, flags) { +- if (node.type === Syntax.Identifier) { +- return generateIdentifier(node); +- } +- return this.generateExpression(node, precedence, flags); +- }; ++ result = generateInternal(node); + +- CodeGenerator.prototype.generateFunctionParams = function (node) { +- var i, iz, result, hasDefault; ++ if (!sourceMap) { ++ pair = { code: result.toString(), map: null }; ++ return options.sourceMapWithCode ? pair : pair.code; ++ } + +- hasDefault = false; ++ pair = result.toStringWithSourceMap({ ++ file: options.file, ++ sourceRoot: options.sourceMapRoot, ++ }); + +- if (node.type === Syntax.ArrowFunctionExpression && +- !node.rest && (!node.defaults || node.defaults.length === 0) && +- node.params.length === 1 && node.params[0].type === Syntax.Identifier) { +- // arg => { } case +- result = [generateAsyncPrefix(node, true), generateIdentifier(node.params[0])]; +- } else { +- result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, false)] : []; +- result.push('('); +- if (node.defaults) { +- hasDefault = true; +- } +- for (i = 0, iz = node.params.length; i < iz; ++i) { +- if (hasDefault && node.defaults[i]) { +- // Handle default values. +- result.push(this.generateAssignment(node.params[i], node.defaults[i], '=', Precedence.Assignment, E_TTT)); +- } else { +- result.push(this.generatePattern(node.params[i], Precedence.Assignment, E_TTT)); +- } +- if (i + 1 < iz) { +- result.push(',' + space); +- } +- } +- +- if (node.rest) { +- if (node.params.length) { +- result.push(',' + space); +- } +- result.push('...'); +- result.push(generateIdentifier(node.rest)); +- } +- +- result.push(')'); +- } +- +- return result; +- }; +- +- CodeGenerator.prototype.generateFunctionBody = function (node) { +- var result, expr; +- +- result = this.generateFunctionParams(node); +- +- if (node.type === Syntax.ArrowFunctionExpression) { +- result.push(space); +- result.push('=>'); +- } +- +- if (node.expression) { +- result.push(space); +- expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT); +- if (expr.toString().charAt(0) === '{') { +- expr = ['(', expr, ')']; +- } +- result.push(expr); +- } else { +- result.push(this.maybeBlock(node.body, S_TTFF)); +- } +- +- return result; +- }; +- +- CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) { +- var result = ['for' + (stmt.await ? noEmptySpace() + 'await' : '') + space + '('], that = this; +- withIndent(function () { +- if (stmt.left.type === Syntax.VariableDeclaration) { +- withIndent(function () { +- result.push(stmt.left.kind + noEmptySpace()); +- result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF)); +- }); +- } else { +- result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT)); +- } +- +- result = join(result, operator); +- result = [join( +- result, +- that.generateExpression(stmt.right, Precedence.Assignment, E_TTT) +- ), ')']; +- }); +- result.push(this.maybeBlock(stmt.body, flags)); +- return result; +- }; +- +- CodeGenerator.prototype.generatePropertyKey = function (expr, computed) { +- var result = []; +- +- if (computed) { +- result.push('['); +- } +- +- result.push(this.generateExpression(expr, Precedence.Assignment, E_TTT)); +- +- if (computed) { +- result.push(']'); +- } +- +- return result; +- }; +- +- CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) { +- if (Precedence.Assignment < precedence) { +- flags |= F_ALLOW_IN; +- } +- +- return parenthesize( +- [ +- this.generateExpression(left, Precedence.Call, flags), +- space + operator + space, +- this.generateExpression(right, Precedence.Assignment, flags) +- ], +- Precedence.Assignment, +- precedence +- ); +- }; +- +- CodeGenerator.prototype.semicolon = function (flags) { +- if (!semicolons && flags & F_SEMICOLON_OPT) { +- return ''; +- } +- return ';'; +- }; +- +- // Statements. +- +- CodeGenerator.Statement = { +- +- BlockStatement: function (stmt, flags) { +- var range, content, result = ['{', newline], that = this; +- +- withIndent(function () { +- // handle functions without any code +- if (stmt.body.length === 0 && preserveBlankLines) { +- range = stmt.range; +- if (range[1] - range[0] > 2) { +- content = sourceCode.substring(range[0] + 1, range[1] - 1); +- if (content[0] === '\n') { +- result = ['{']; +- } +- result.push(content); +- } +- } +- +- var i, iz, fragment, bodyFlags; +- bodyFlags = S_TFFF; +- if (flags & F_FUNC_BODY) { +- bodyFlags |= F_DIRECTIVE_CTX; +- } +- +- for (i = 0, iz = stmt.body.length; i < iz; ++i) { +- if (preserveBlankLines) { +- // handle spaces before the first line +- if (i === 0) { +- if (stmt.body[0].leadingComments) { +- range = stmt.body[0].leadingComments[0].extendedRange; +- content = sourceCode.substring(range[0], range[1]); +- if (content[0] === '\n') { +- result = ['{']; +- } +- } +- if (!stmt.body[0].leadingComments) { +- generateBlankLines(stmt.range[0], stmt.body[0].range[0], result); +- } +- } +- +- // handle spaces between lines +- if (i > 0) { +- if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) { +- generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result); +- } +- } +- } +- +- if (i === iz - 1) { +- bodyFlags |= F_SEMICOLON_OPT; +- } +- +- if (stmt.body[i].leadingComments && preserveBlankLines) { +- fragment = that.generateStatement(stmt.body[i], bodyFlags); +- } else { +- fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags)); +- } +- +- result.push(fragment); +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { +- if (preserveBlankLines && i < iz - 1) { +- // don't add a new line if there are leading coments +- // in the next statement +- if (!stmt.body[i + 1].leadingComments) { +- result.push(newline); +- } +- } else { +- result.push(newline); +- } +- } +- +- if (preserveBlankLines) { +- // handle spaces after the last line +- if (i === iz - 1) { +- if (!stmt.body[i].trailingComments) { +- generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); +- } +- } +- } +- } +- }); +- +- result.push(addIndent('}')); +- return result; +- }, +- +- BreakStatement: function (stmt, flags) { +- if (stmt.label) { +- return 'break ' + stmt.label.name + this.semicolon(flags); +- } +- return 'break' + this.semicolon(flags); +- }, +- +- ContinueStatement: function (stmt, flags) { +- if (stmt.label) { +- return 'continue ' + stmt.label.name + this.semicolon(flags); +- } +- return 'continue' + this.semicolon(flags); +- }, +- +- ClassBody: function (stmt, flags) { +- var result = [ '{', newline], that = this; +- +- withIndent(function (indent) { +- var i, iz; +- +- for (i = 0, iz = stmt.body.length; i < iz; ++i) { +- result.push(indent); +- result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT)); +- if (i + 1 < iz) { +- result.push(newline); +- } +- } +- }); +- +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- result.push(base); +- result.push('}'); +- return result; +- }, +- +- ClassDeclaration: function (stmt, flags) { +- var result, fragment; +- result = ['class']; +- if (stmt.id) { +- result = join(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT)); +- } +- if (stmt.superClass) { +- fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT)); +- result = join(result, fragment); +- } +- result.push(space); +- result.push(this.generateStatement(stmt.body, S_TFFT)); +- return result; +- }, +- +- DirectiveStatement: function (stmt, flags) { +- if (extra.raw && stmt.raw) { +- return stmt.raw + this.semicolon(flags); +- } +- return escapeDirective(stmt.directive) + this.semicolon(flags); +- }, +- +- DoWhileStatement: function (stmt, flags) { +- // Because `do 42 while (cond)` is Syntax Error. We need semicolon. +- var result = join('do', this.maybeBlock(stmt.body, S_TFFF)); +- result = this.maybeBlockSuffix(stmt.body, result); +- return join(result, [ +- 'while' + space + '(', +- this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), +- ')' + this.semicolon(flags) +- ]); +- }, +- +- CatchClause: function (stmt, flags) { +- var result, that = this; +- withIndent(function () { +- var guard; +- +- if (stmt.param) { +- result = [ +- 'catch' + space + '(', +- that.generateExpression(stmt.param, Precedence.Sequence, E_TTT), +- ')' +- ]; +- +- if (stmt.guard) { +- guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT); +- result.splice(2, 0, ' if ', guard); +- } +- } else { +- result = ['catch']; +- } +- }); +- result.push(this.maybeBlock(stmt.body, S_TFFF)); +- return result; +- }, +- +- DebuggerStatement: function (stmt, flags) { +- return 'debugger' + this.semicolon(flags); +- }, +- +- EmptyStatement: function (stmt, flags) { +- return ';'; +- }, +- +- ExportDefaultDeclaration: function (stmt, flags) { +- var result = [ 'export' ], bodyFlags; +- +- bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF; +- +- // export default HoistableDeclaration[Default] +- // export default AssignmentExpression[In] ; +- result = join(result, 'default'); +- if (isStatement(stmt.declaration)) { +- result = join(result, this.generateStatement(stmt.declaration, bodyFlags)); +- } else { +- result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags)); +- } +- return result; +- }, +- +- ExportNamedDeclaration: function (stmt, flags) { +- var result = [ 'export' ], bodyFlags, that = this; +- +- bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF; +- +- // export VariableStatement +- // export Declaration[Default] +- if (stmt.declaration) { +- return join(result, this.generateStatement(stmt.declaration, bodyFlags)); +- } +- +- // export ExportClause[NoReference] FromClause ; +- // export ExportClause ; +- if (stmt.specifiers) { +- if (stmt.specifiers.length === 0) { +- result = join(result, '{' + space + '}'); +- } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) { +- result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)); +- } else { +- result = join(result, '{'); +- withIndent(function (indent) { +- var i, iz; +- result.push(newline); +- for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) { +- result.push(indent); +- result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT)); +- if (i + 1 < iz) { +- result.push(',' + newline); +- } +- } +- }); +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- result.push(base + '}'); +- } +- +- if (stmt.source) { +- result = join(result, [ +- 'from' + space, +- // ModuleSpecifier +- this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), +- this.semicolon(flags) +- ]); +- } else { +- result.push(this.semicolon(flags)); +- } +- } +- return result; +- }, +- +- ExportAllDeclaration: function (stmt, flags) { +- // export * FromClause ; +- return [ +- 'export' + space, +- '*' + space, +- 'from' + space, +- // ModuleSpecifier +- this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), +- this.semicolon(flags) +- ]; +- }, +- +- ExpressionStatement: function (stmt, flags) { +- var result, fragment; +- +- function isClassPrefixed(fragment) { +- var code; +- if (fragment.slice(0, 5) !== 'class') { +- return false; +- } +- code = fragment.charCodeAt(5); +- return code === 0x7B /* '{' */ || esutils.code.isWhiteSpace(code) || esutils.code.isLineTerminator(code); +- } +- +- function isFunctionPrefixed(fragment) { +- var code; +- if (fragment.slice(0, 8) !== 'function') { +- return false; +- } +- code = fragment.charCodeAt(8); +- return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code); +- } +- +- function isAsyncPrefixed(fragment) { +- var code, i, iz; +- if (fragment.slice(0, 5) !== 'async') { +- return false; +- } +- if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) { +- return false; +- } +- for (i = 6, iz = fragment.length; i < iz; ++i) { +- if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) { +- break; +- } +- } +- if (i === iz) { +- return false; +- } +- if (fragment.slice(i, i + 8) !== 'function') { +- return false; +- } +- code = fragment.charCodeAt(i + 8); +- return code === 0x28 /* '(' */ || esutils.code.isWhiteSpace(code) || code === 0x2A /* '*' */ || esutils.code.isLineTerminator(code); +- } +- +- result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)]; +- // 12.4 '{', 'function', 'class' is not allowed in this position. +- // wrap expression with parentheses +- fragment = toSourceNodeWhenNeeded(result).toString(); +- if (fragment.charCodeAt(0) === 0x7B /* '{' */ || // ObjectExpression +- isClassPrefixed(fragment) || +- isFunctionPrefixed(fragment) || +- isAsyncPrefixed(fragment) || +- (directive && (flags & F_DIRECTIVE_CTX) && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) { +- result = ['(', result, ')' + this.semicolon(flags)]; +- } else { +- result.push(this.semicolon(flags)); +- } +- return result; +- }, +- +- ImportDeclaration: function (stmt, flags) { +- // ES6: 15.2.1 valid import declarations: +- // - import ImportClause FromClause ; +- // - import ModuleSpecifier ; +- var result, cursor, that = this; +- +- // If no ImportClause is present, +- // this should be `import ModuleSpecifier` so skip `from` +- // ModuleSpecifier is StringLiteral. +- if (stmt.specifiers.length === 0) { +- // import ModuleSpecifier ; +- return [ +- 'import', +- space, +- // ModuleSpecifier +- this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), +- this.semicolon(flags) +- ]; +- } +- +- // import ImportClause FromClause ; +- result = [ +- 'import' +- ]; +- cursor = 0; +- +- // ImportedBinding +- if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) { +- result = join(result, [ +- this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT) +- ]); +- ++cursor; +- } +- +- if (stmt.specifiers[cursor]) { +- if (cursor !== 0) { +- result.push(','); +- } +- +- if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) { +- // NameSpaceImport +- result = join(result, [ +- space, +- this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT) +- ]); +- } else { +- // NamedImports +- result.push(space + '{'); +- +- if ((stmt.specifiers.length - cursor) === 1) { +- // import { ... } from "..."; +- result.push(space); +- result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)); +- result.push(space + '}' + space); +- } else { +- // import { +- // ..., +- // ..., +- // } from "..."; +- withIndent(function (indent) { +- var i, iz; +- result.push(newline); +- for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) { +- result.push(indent); +- result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT)); +- if (i + 1 < iz) { +- result.push(',' + newline); +- } +- } +- }); +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- result.push(base + '}' + space); +- } +- } +- } +- +- result = join(result, [ +- 'from' + space, +- // ModuleSpecifier +- this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), +- this.semicolon(flags) +- ]); +- return result; +- }, +- +- VariableDeclarator: function (stmt, flags) { +- var itemFlags = (flags & F_ALLOW_IN) ? E_TTT : E_FTT; +- if (stmt.init) { +- return [ +- this.generateExpression(stmt.id, Precedence.Assignment, itemFlags), +- space, +- '=', +- space, +- this.generateExpression(stmt.init, Precedence.Assignment, itemFlags) +- ]; +- } +- return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags); +- }, +- +- VariableDeclaration: function (stmt, flags) { +- // VariableDeclarator is typed as Statement, +- // but joined with comma (not LineTerminator). +- // So if comment is attached to target node, we should specialize. +- var result, i, iz, node, bodyFlags, that = this; +- +- result = [ stmt.kind ]; +- +- bodyFlags = (flags & F_ALLOW_IN) ? S_TFFF : S_FFFF; +- +- function block() { +- node = stmt.declarations[0]; +- if (extra.comment && node.leadingComments) { +- result.push('\n'); +- result.push(addIndent(that.generateStatement(node, bodyFlags))); +- } else { +- result.push(noEmptySpace()); +- result.push(that.generateStatement(node, bodyFlags)); +- } +- +- for (i = 1, iz = stmt.declarations.length; i < iz; ++i) { +- node = stmt.declarations[i]; +- if (extra.comment && node.leadingComments) { +- result.push(',' + newline); +- result.push(addIndent(that.generateStatement(node, bodyFlags))); +- } else { +- result.push(',' + space); +- result.push(that.generateStatement(node, bodyFlags)); +- } +- } +- } +- +- if (stmt.declarations.length > 1) { +- withIndent(block); +- } else { +- block(); +- } +- +- result.push(this.semicolon(flags)); +- +- return result; +- }, +- +- ThrowStatement: function (stmt, flags) { +- return [join( +- 'throw', +- this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) +- ), this.semicolon(flags)]; +- }, +- +- TryStatement: function (stmt, flags) { +- var result, i, iz, guardedHandlers; +- +- result = ['try', this.maybeBlock(stmt.block, S_TFFF)]; +- result = this.maybeBlockSuffix(stmt.block, result); +- +- if (stmt.handlers) { +- // old interface +- for (i = 0, iz = stmt.handlers.length; i < iz; ++i) { +- result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF)); +- if (stmt.finalizer || i + 1 !== iz) { +- result = this.maybeBlockSuffix(stmt.handlers[i].body, result); +- } +- } +- } else { +- guardedHandlers = stmt.guardedHandlers || []; +- +- for (i = 0, iz = guardedHandlers.length; i < iz; ++i) { +- result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF)); +- if (stmt.finalizer || i + 1 !== iz) { +- result = this.maybeBlockSuffix(guardedHandlers[i].body, result); +- } +- } +- +- // new interface +- if (stmt.handler) { +- if (Array.isArray(stmt.handler)) { +- for (i = 0, iz = stmt.handler.length; i < iz; ++i) { +- result = join(result, this.generateStatement(stmt.handler[i], S_TFFF)); +- if (stmt.finalizer || i + 1 !== iz) { +- result = this.maybeBlockSuffix(stmt.handler[i].body, result); +- } +- } +- } else { +- result = join(result, this.generateStatement(stmt.handler, S_TFFF)); +- if (stmt.finalizer) { +- result = this.maybeBlockSuffix(stmt.handler.body, result); +- } +- } +- } +- } +- if (stmt.finalizer) { +- result = join(result, ['finally', this.maybeBlock(stmt.finalizer, S_TFFF)]); +- } +- return result; +- }, +- +- SwitchStatement: function (stmt, flags) { +- var result, fragment, i, iz, bodyFlags, that = this; +- withIndent(function () { +- result = [ +- 'switch' + space + '(', +- that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT), +- ')' + space + '{' + newline +- ]; +- }); +- if (stmt.cases) { +- bodyFlags = S_TFFF; +- for (i = 0, iz = stmt.cases.length; i < iz; ++i) { +- if (i === iz - 1) { +- bodyFlags |= F_SEMICOLON_OPT; +- } +- fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags)); +- result.push(fragment); +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { +- result.push(newline); +- } +- } +- } +- result.push(addIndent('}')); +- return result; +- }, +- +- SwitchCase: function (stmt, flags) { +- var result, fragment, i, iz, bodyFlags, that = this; +- withIndent(function () { +- if (stmt.test) { +- result = [ +- join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)), +- ':' +- ]; +- } else { +- result = ['default:']; +- } +- +- i = 0; +- iz = stmt.consequent.length; +- if (iz && stmt.consequent[0].type === Syntax.BlockStatement) { +- fragment = that.maybeBlock(stmt.consequent[0], S_TFFF); +- result.push(fragment); +- i = 1; +- } +- +- if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- +- bodyFlags = S_TFFF; +- for (; i < iz; ++i) { +- if (i === iz - 1 && flags & F_SEMICOLON_OPT) { +- bodyFlags |= F_SEMICOLON_OPT; +- } +- fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags)); +- result.push(fragment); +- if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { +- result.push(newline); +- } +- } +- }); +- return result; +- }, +- +- IfStatement: function (stmt, flags) { +- var result, bodyFlags, semicolonOptional, that = this; +- withIndent(function () { +- result = [ +- 'if' + space + '(', +- that.generateExpression(stmt.test, Precedence.Sequence, E_TTT), +- ')' +- ]; +- }); +- semicolonOptional = flags & F_SEMICOLON_OPT; +- bodyFlags = S_TFFF; +- if (semicolonOptional) { +- bodyFlags |= F_SEMICOLON_OPT; +- } +- if (stmt.alternate) { +- result.push(this.maybeBlock(stmt.consequent, S_TFFF)); +- result = this.maybeBlockSuffix(stmt.consequent, result); +- if (stmt.alternate.type === Syntax.IfStatement) { +- result = join(result, ['else ', this.generateStatement(stmt.alternate, bodyFlags)]); +- } else { +- result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags))); +- } +- } else { +- result.push(this.maybeBlock(stmt.consequent, bodyFlags)); +- } +- return result; +- }, +- +- ForStatement: function (stmt, flags) { +- var result, that = this; +- withIndent(function () { +- result = ['for' + space + '(']; +- if (stmt.init) { +- if (stmt.init.type === Syntax.VariableDeclaration) { +- result.push(that.generateStatement(stmt.init, S_FFFF)); +- } else { +- // F_ALLOW_IN becomes false. +- result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT)); +- result.push(';'); +- } +- } else { +- result.push(';'); +- } +- +- if (stmt.test) { +- result.push(space); +- result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)); +- result.push(';'); +- } else { +- result.push(';'); +- } +- +- if (stmt.update) { +- result.push(space); +- result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT)); +- result.push(')'); +- } else { +- result.push(')'); +- } +- }); +- +- result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); +- return result; +- }, +- +- ForInStatement: function (stmt, flags) { +- return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF); +- }, +- +- ForOfStatement: function (stmt, flags) { +- return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF); +- }, +- +- LabeledStatement: function (stmt, flags) { +- return [stmt.label.name + ':', this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)]; +- }, +- +- Program: function (stmt, flags) { +- var result, fragment, i, iz, bodyFlags; +- iz = stmt.body.length; +- result = [safeConcatenation && iz > 0 ? '\n' : '']; +- bodyFlags = S_TFTF; +- for (i = 0; i < iz; ++i) { +- if (!safeConcatenation && i === iz - 1) { +- bodyFlags |= F_SEMICOLON_OPT; +- } +- +- if (preserveBlankLines) { +- // handle spaces before the first line +- if (i === 0) { +- if (!stmt.body[0].leadingComments) { +- generateBlankLines(stmt.range[0], stmt.body[i].range[0], result); +- } +- } +- +- // handle spaces between lines +- if (i > 0) { +- if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) { +- generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result); +- } +- } +- } +- +- fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags)); +- result.push(fragment); +- if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { +- if (preserveBlankLines) { +- if (!stmt.body[i + 1].leadingComments) { +- result.push(newline); +- } +- } else { +- result.push(newline); +- } +- } +- +- if (preserveBlankLines) { +- // handle spaces after the last line +- if (i === iz - 1) { +- if (!stmt.body[i].trailingComments) { +- generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); +- } +- } +- } +- } +- return result; +- }, +- +- FunctionDeclaration: function (stmt, flags) { +- return [ +- generateAsyncPrefix(stmt, true), +- 'function', +- generateStarSuffix(stmt) || noEmptySpace(), +- stmt.id ? generateIdentifier(stmt.id) : '', +- this.generateFunctionBody(stmt) +- ]; +- }, +- +- ReturnStatement: function (stmt, flags) { +- if (stmt.argument) { +- return [join( +- 'return', +- this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) +- ), this.semicolon(flags)]; +- } +- return ['return' + this.semicolon(flags)]; +- }, +- +- WhileStatement: function (stmt, flags) { +- var result, that = this; +- withIndent(function () { +- result = [ +- 'while' + space + '(', +- that.generateExpression(stmt.test, Precedence.Sequence, E_TTT), +- ')' +- ]; +- }); +- result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); +- return result; +- }, +- +- WithStatement: function (stmt, flags) { +- var result, that = this; +- withIndent(function () { +- result = [ +- 'with' + space + '(', +- that.generateExpression(stmt.object, Precedence.Sequence, E_TTT), +- ')' +- ]; +- }); +- result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); +- return result; +- } +- +- }; +- +- merge(CodeGenerator.prototype, CodeGenerator.Statement); +- +- // Expressions. +- +- CodeGenerator.Expression = { +- +- SequenceExpression: function (expr, precedence, flags) { +- var result, i, iz; +- if (Precedence.Sequence < precedence) { +- flags |= F_ALLOW_IN; +- } +- result = []; +- for (i = 0, iz = expr.expressions.length; i < iz; ++i) { +- result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags)); +- if (i + 1 < iz) { +- result.push(',' + space); +- } +- } +- return parenthesize(result, Precedence.Sequence, precedence); +- }, +- +- AssignmentExpression: function (expr, precedence, flags) { +- return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags); +- }, +- +- ArrowFunctionExpression: function (expr, precedence, flags) { +- return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence); +- }, +- +- ConditionalExpression: function (expr, precedence, flags) { +- if (Precedence.Conditional < precedence) { +- flags |= F_ALLOW_IN; +- } +- return parenthesize( +- [ +- this.generateExpression(expr.test, Precedence.LogicalOR, flags), +- space + '?' + space, +- this.generateExpression(expr.consequent, Precedence.Assignment, flags), +- space + ':' + space, +- this.generateExpression(expr.alternate, Precedence.Assignment, flags) +- ], +- Precedence.Conditional, +- precedence +- ); +- }, +- +- LogicalExpression: function (expr, precedence, flags) { +- return this.BinaryExpression(expr, precedence, flags); +- }, +- +- BinaryExpression: function (expr, precedence, flags) { +- var result, leftPrecedence, rightPrecedence, currentPrecedence, fragment, leftSource; +- currentPrecedence = BinaryPrecedence[expr.operator]; +- leftPrecedence = expr.operator === '**' ? Precedence.Postfix : currentPrecedence; +- rightPrecedence = expr.operator === '**' ? currentPrecedence : currentPrecedence + 1; +- +- if (currentPrecedence < precedence) { +- flags |= F_ALLOW_IN; +- } +- +- fragment = this.generateExpression(expr.left, leftPrecedence, flags); +- +- leftSource = fragment.toString(); +- +- if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) { +- result = [fragment, noEmptySpace(), expr.operator]; +- } else { +- result = join(fragment, expr.operator); +- } +- +- fragment = this.generateExpression(expr.right, rightPrecedence, flags); +- +- if (expr.operator === '/' && fragment.toString().charAt(0) === '/' || +- expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') { +- // If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start +- result.push(noEmptySpace()); +- result.push(fragment); +- } else { +- result = join(result, fragment); +- } +- +- if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) { +- return ['(', result, ')']; +- } +- return parenthesize(result, currentPrecedence, precedence); +- }, +- +- CallExpression: function (expr, precedence, flags) { +- var result, i, iz; +- // F_ALLOW_UNPARATH_NEW becomes false. +- result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)]; +- result.push('('); +- for (i = 0, iz = expr['arguments'].length; i < iz; ++i) { +- result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT)); +- if (i + 1 < iz) { +- result.push(',' + space); +- } +- } +- result.push(')'); +- +- if (!(flags & F_ALLOW_CALL)) { +- return ['(', result, ')']; +- } +- return parenthesize(result, Precedence.Call, precedence); +- }, +- +- NewExpression: function (expr, precedence, flags) { +- var result, length, i, iz, itemFlags; +- length = expr['arguments'].length; +- +- // F_ALLOW_CALL becomes false. +- // F_ALLOW_UNPARATH_NEW may become false. +- itemFlags = (flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0) ? E_TFT : E_TFF; +- +- result = join( +- 'new', +- this.generateExpression(expr.callee, Precedence.New, itemFlags) +- ); +- +- if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) { +- result.push('('); +- for (i = 0, iz = length; i < iz; ++i) { +- result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT)); +- if (i + 1 < iz) { +- result.push(',' + space); +- } +- } +- result.push(')'); +- } +- +- return parenthesize(result, Precedence.New, precedence); +- }, +- +- MemberExpression: function (expr, precedence, flags) { +- var result, fragment; +- +- // F_ALLOW_UNPARATH_NEW becomes false. +- result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)]; +- +- if (expr.computed) { +- result.push('['); +- result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT)); +- result.push(']'); +- } else { +- if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') { +- fragment = toSourceNodeWhenNeeded(result).toString(); +- // When the following conditions are all true, +- // 1. No floating point +- // 2. Don't have exponents +- // 3. The last character is a decimal digit +- // 4. Not hexadecimal OR octal number literal +- // we should add a floating point. +- if ( +- fragment.indexOf('.') < 0 && +- !/[eExX]/.test(fragment) && +- esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) && +- !(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0' +- ) { +- result.push(' '); +- } +- } +- result.push('.'); +- result.push(generateIdentifier(expr.property)); +- } +- +- return parenthesize(result, Precedence.Member, precedence); +- }, +- +- MetaProperty: function (expr, precedence, flags) { +- var result; +- result = []; +- result.push(typeof expr.meta === "string" ? expr.meta : generateIdentifier(expr.meta)); +- result.push('.'); +- result.push(typeof expr.property === "string" ? expr.property : generateIdentifier(expr.property)); +- return parenthesize(result, Precedence.Member, precedence); +- }, +- +- UnaryExpression: function (expr, precedence, flags) { +- var result, fragment, rightCharCode, leftSource, leftCharCode; +- fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT); +- +- if (space === '') { +- result = join(expr.operator, fragment); +- } else { +- result = [expr.operator]; +- if (expr.operator.length > 2) { +- // delete, void, typeof +- // get `typeof []`, not `typeof[]` +- result = join(result, fragment); +- } else { +- // Prevent inserting spaces between operator and argument if it is unnecessary +- // like, `!cond` +- leftSource = toSourceNodeWhenNeeded(result).toString(); +- leftCharCode = leftSource.charCodeAt(leftSource.length - 1); +- rightCharCode = fragment.toString().charCodeAt(0); +- +- if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) || +- (esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) { +- result.push(noEmptySpace()); +- result.push(fragment); +- } else { +- result.push(fragment); +- } +- } +- } +- return parenthesize(result, Precedence.Unary, precedence); +- }, +- +- YieldExpression: function (expr, precedence, flags) { +- var result; +- if (expr.delegate) { +- result = 'yield*'; +- } else { +- result = 'yield'; +- } +- if (expr.argument) { +- result = join( +- result, +- this.generateExpression(expr.argument, Precedence.Yield, E_TTT) +- ); +- } +- return parenthesize(result, Precedence.Yield, precedence); +- }, +- +- AwaitExpression: function (expr, precedence, flags) { +- var result = join( +- expr.all ? 'await*' : 'await', +- this.generateExpression(expr.argument, Precedence.Await, E_TTT) +- ); +- return parenthesize(result, Precedence.Await, precedence); +- }, +- +- UpdateExpression: function (expr, precedence, flags) { +- if (expr.prefix) { +- return parenthesize( +- [ +- expr.operator, +- this.generateExpression(expr.argument, Precedence.Unary, E_TTT) +- ], +- Precedence.Unary, +- precedence +- ); +- } +- return parenthesize( +- [ +- this.generateExpression(expr.argument, Precedence.Postfix, E_TTT), +- expr.operator +- ], +- Precedence.Postfix, +- precedence +- ); +- }, +- +- FunctionExpression: function (expr, precedence, flags) { +- var result = [ +- generateAsyncPrefix(expr, true), +- 'function' +- ]; +- if (expr.id) { +- result.push(generateStarSuffix(expr) || noEmptySpace()); +- result.push(generateIdentifier(expr.id)); +- } else { +- result.push(generateStarSuffix(expr) || space); +- } +- result.push(this.generateFunctionBody(expr)); +- return result; +- }, +- +- ArrayPattern: function (expr, precedence, flags) { +- return this.ArrayExpression(expr, precedence, flags, true); +- }, +- +- ArrayExpression: function (expr, precedence, flags, isPattern) { +- var result, multiline, that = this; +- if (!expr.elements.length) { +- return '[]'; +- } +- multiline = isPattern ? false : expr.elements.length > 1; +- result = ['[', multiline ? newline : '']; +- withIndent(function (indent) { +- var i, iz; +- for (i = 0, iz = expr.elements.length; i < iz; ++i) { +- if (!expr.elements[i]) { +- if (multiline) { +- result.push(indent); +- } +- if (i + 1 === iz) { +- result.push(','); +- } +- } else { +- result.push(multiline ? indent : ''); +- result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT)); +- } +- if (i + 1 < iz) { +- result.push(',' + (multiline ? newline : space)); +- } +- } +- }); +- if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- result.push(multiline ? base : ''); +- result.push(']'); +- return result; +- }, +- +- RestElement: function(expr, precedence, flags) { +- return '...' + this.generatePattern(expr.argument); +- }, +- +- ClassExpression: function (expr, precedence, flags) { +- var result, fragment; +- result = ['class']; +- if (expr.id) { +- result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT)); +- } +- if (expr.superClass) { +- fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Unary, E_TTT)); +- result = join(result, fragment); +- } +- result.push(space); +- result.push(this.generateStatement(expr.body, S_TFFT)); +- return result; +- }, +- +- MethodDefinition: function (expr, precedence, flags) { +- var result, fragment; +- if (expr['static']) { +- result = ['static' + space]; +- } else { +- result = []; +- } +- if (expr.kind === 'get' || expr.kind === 'set') { +- fragment = [ +- join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)), +- this.generateFunctionBody(expr.value) +- ]; +- } else { +- fragment = [ +- generateMethodPrefix(expr), +- this.generatePropertyKey(expr.key, expr.computed), +- this.generateFunctionBody(expr.value) +- ]; +- } +- return join(result, fragment); +- }, +- +- Property: function (expr, precedence, flags) { +- if (expr.kind === 'get' || expr.kind === 'set') { +- return [ +- expr.kind, noEmptySpace(), +- this.generatePropertyKey(expr.key, expr.computed), +- this.generateFunctionBody(expr.value) +- ]; +- } +- +- if (expr.shorthand) { +- if (expr.value.type === "AssignmentPattern") { +- return this.AssignmentPattern(expr.value, Precedence.Sequence, E_TTT); +- } +- return this.generatePropertyKey(expr.key, expr.computed); +- } +- +- if (expr.method) { +- return [ +- generateMethodPrefix(expr), +- this.generatePropertyKey(expr.key, expr.computed), +- this.generateFunctionBody(expr.value) +- ]; +- } +- +- return [ +- this.generatePropertyKey(expr.key, expr.computed), +- ':' + space, +- this.generateExpression(expr.value, Precedence.Assignment, E_TTT) +- ]; +- }, +- +- ObjectExpression: function (expr, precedence, flags) { +- var multiline, result, fragment, that = this; +- +- if (!expr.properties.length) { +- return '{}'; +- } +- multiline = expr.properties.length > 1; +- +- withIndent(function () { +- fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT); +- }); +- +- if (!multiline) { +- // issues 4 +- // Do not transform from +- // dejavu.Class.declare({ +- // method2: function () {} +- // }); +- // to +- // dejavu.Class.declare({method2: function () { +- // }}); +- if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { +- return [ '{', space, fragment, space, '}' ]; +- } +- } +- +- withIndent(function (indent) { +- var i, iz; +- result = [ '{', newline, indent, fragment ]; +- +- if (multiline) { +- result.push(',' + newline); +- for (i = 1, iz = expr.properties.length; i < iz; ++i) { +- result.push(indent); +- result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT)); +- if (i + 1 < iz) { +- result.push(',' + newline); +- } +- } +- } +- }); +- +- if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- result.push(base); +- result.push('}'); +- return result; +- }, +- +- AssignmentPattern: function(expr, precedence, flags) { +- return this.generateAssignment(expr.left, expr.right, '=', precedence, flags); +- }, +- +- ObjectPattern: function (expr, precedence, flags) { +- var result, i, iz, multiline, property, that = this; +- if (!expr.properties.length) { +- return '{}'; +- } +- +- multiline = false; +- if (expr.properties.length === 1) { +- property = expr.properties[0]; +- if ( +- property.type === Syntax.Property +- && property.value.type !== Syntax.Identifier +- ) { +- multiline = true; +- } +- } else { +- for (i = 0, iz = expr.properties.length; i < iz; ++i) { +- property = expr.properties[i]; +- if ( +- property.type === Syntax.Property +- && !property.shorthand +- ) { +- multiline = true; +- break; +- } +- } +- } +- result = ['{', multiline ? newline : '' ]; +- +- withIndent(function (indent) { +- var i, iz; +- for (i = 0, iz = expr.properties.length; i < iz; ++i) { +- result.push(multiline ? indent : ''); +- result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT)); +- if (i + 1 < iz) { +- result.push(',' + (multiline ? newline : space)); +- } +- } +- }); +- +- if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { +- result.push(newline); +- } +- result.push(multiline ? base : ''); +- result.push('}'); +- return result; +- }, +- +- ThisExpression: function (expr, precedence, flags) { +- return 'this'; +- }, +- +- Super: function (expr, precedence, flags) { +- return 'super'; +- }, +- +- Identifier: function (expr, precedence, flags) { +- return generateIdentifier(expr); +- }, +- +- ImportDefaultSpecifier: function (expr, precedence, flags) { +- return generateIdentifier(expr.id || expr.local); +- }, +- +- ImportNamespaceSpecifier: function (expr, precedence, flags) { +- var result = ['*']; +- var id = expr.id || expr.local; +- if (id) { +- result.push(space + 'as' + noEmptySpace() + generateIdentifier(id)); +- } +- return result; +- }, +- +- ImportSpecifier: function (expr, precedence, flags) { +- var imported = expr.imported; +- var result = [ imported.name ]; +- var local = expr.local; +- if (local && local.name !== imported.name) { +- result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(local)); +- } +- return result; +- }, +- +- ExportSpecifier: function (expr, precedence, flags) { +- var local = expr.local; +- var result = [ local.name ]; +- var exported = expr.exported; +- if (exported && exported.name !== local.name) { +- result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(exported)); +- } +- return result; +- }, +- +- Literal: function (expr, precedence, flags) { +- var raw; +- if (expr.hasOwnProperty('raw') && parse && extra.raw) { +- try { +- raw = parse(expr.raw).body[0].expression; +- if (raw.type === Syntax.Literal) { +- if (raw.value === expr.value) { +- return expr.raw; +- } +- } +- } catch (e) { +- // not use raw property +- } +- } +- +- if (expr.regex) { +- return '/' + expr.regex.pattern + '/' + expr.regex.flags; +- } +- +- if (expr.value === null) { +- return 'null'; +- } +- +- if (typeof expr.value === 'string') { +- return escapeString(expr.value); +- } +- +- if (typeof expr.value === 'number') { +- return generateNumber(expr.value); +- } +- +- if (typeof expr.value === 'boolean') { +- return expr.value ? 'true' : 'false'; +- } +- +- return generateRegExp(expr.value); +- }, +- +- GeneratorExpression: function (expr, precedence, flags) { +- return this.ComprehensionExpression(expr, precedence, flags); +- }, +- +- ComprehensionExpression: function (expr, precedence, flags) { +- // GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...] +- // Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6 +- +- var result, i, iz, fragment, that = this; +- result = (expr.type === Syntax.GeneratorExpression) ? ['('] : ['[']; +- +- if (extra.moz.comprehensionExpressionStartsWithAssignment) { +- fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); +- result.push(fragment); +- } +- +- if (expr.blocks) { +- withIndent(function () { +- for (i = 0, iz = expr.blocks.length; i < iz; ++i) { +- fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT); +- if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) { +- result = join(result, fragment); +- } else { +- result.push(fragment); +- } +- } +- }); +- } +- +- if (expr.filter) { +- result = join(result, 'if' + space); +- fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT); +- result = join(result, [ '(', fragment, ')' ]); +- } +- +- if (!extra.moz.comprehensionExpressionStartsWithAssignment) { +- fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); +- +- result = join(result, fragment); +- } +- +- result.push((expr.type === Syntax.GeneratorExpression) ? ')' : ']'); +- return result; +- }, +- +- ComprehensionBlock: function (expr, precedence, flags) { +- var fragment; +- if (expr.left.type === Syntax.VariableDeclaration) { +- fragment = [ +- expr.left.kind, noEmptySpace(), +- this.generateStatement(expr.left.declarations[0], S_FFFF) +- ]; +- } else { +- fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT); +- } +- +- fragment = join(fragment, expr.of ? 'of' : 'in'); +- fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT)); +- +- return [ 'for' + space + '(', fragment, ')' ]; +- }, +- +- SpreadElement: function (expr, precedence, flags) { +- return [ +- '...', +- this.generateExpression(expr.argument, Precedence.Assignment, E_TTT) +- ]; +- }, +- +- TaggedTemplateExpression: function (expr, precedence, flags) { +- var itemFlags = E_TTF; +- if (!(flags & F_ALLOW_CALL)) { +- itemFlags = E_TFF; +- } +- var result = [ +- this.generateExpression(expr.tag, Precedence.Call, itemFlags), +- this.generateExpression(expr.quasi, Precedence.Primary, E_FFT) +- ]; +- return parenthesize(result, Precedence.TaggedTemplate, precedence); +- }, +- +- TemplateElement: function (expr, precedence, flags) { +- // Don't use "cooked". Since tagged template can use raw template +- // representation. So if we do so, it breaks the script semantics. +- return expr.value.raw; +- }, +- +- TemplateLiteral: function (expr, precedence, flags) { +- var result, i, iz; +- result = [ '`' ]; +- for (i = 0, iz = expr.quasis.length; i < iz; ++i) { +- result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT)); +- if (i + 1 < iz) { +- result.push('${' + space); +- result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT)); +- result.push(space + '}'); +- } +- } +- result.push('`'); +- return result; +- }, +- +- ModuleSpecifier: function (expr, precedence, flags) { +- return this.Literal(expr, precedence, flags); +- }, +- +- ImportExpression: function(expr, precedence, flag) { +- return parenthesize([ +- 'import(', +- this.generateExpression(expr.source, Precedence.Assignment, E_TTT), +- ')' +- ], Precedence.Call, precedence); +- }, +- +- }; +- +- merge(CodeGenerator.prototype, CodeGenerator.Expression); +- +- CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) { +- var result, type; +- +- type = expr.type || Syntax.Property; +- +- if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { +- return generateVerbatim(expr, precedence); +- } +- +- result = this[type](expr, precedence, flags); +- +- +- if (extra.comment) { +- result = addComments(expr, result); +- } +- return toSourceNodeWhenNeeded(result, expr); +- }; +- +- CodeGenerator.prototype.generateStatement = function (stmt, flags) { +- var result, +- fragment; +- +- result = this[stmt.type](stmt, flags); +- +- // Attach comments +- +- if (extra.comment) { +- result = addComments(stmt, result); +- } +- +- fragment = toSourceNodeWhenNeeded(result).toString(); +- if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') { +- result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, ''); +- } +- +- return toSourceNodeWhenNeeded(result, stmt); +- }; +- +- function generateInternal(node) { +- var codegen; +- +- codegen = new CodeGenerator(); +- if (isStatement(node)) { +- return codegen.generateStatement(node, S_TFFF); +- } +- +- if (isExpression(node)) { +- return codegen.generateExpression(node, Precedence.Sequence, E_TTT); +- } +- +- throw new Error('Unknown node type: ' + node.type); ++ if (options.sourceContent) { ++ pair.map.setSourceContent(options.sourceMap, options.sourceContent); + } + +- function generate(node, options) { +- var defaultOptions = getDefaultOptions(), result, pair; +- +- if (options != null) { +- // Obsolete options +- // +- // `options.indent` +- // `options.base` +- // +- // Instead of them, we can use `option.format.indent`. +- if (typeof options.indent === 'string') { +- defaultOptions.format.indent.style = options.indent; +- } +- if (typeof options.base === 'number') { +- defaultOptions.format.indent.base = options.base; +- } +- options = updateDeeply(defaultOptions, options); +- indent = options.format.indent.style; +- if (typeof options.base === 'string') { +- base = options.base; +- } else { +- base = stringRepeat(indent, options.format.indent.base); +- } +- } else { +- options = defaultOptions; +- indent = options.format.indent.style; +- base = stringRepeat(indent, options.format.indent.base); +- } +- json = options.format.json; +- renumber = options.format.renumber; +- hexadecimal = json ? false : options.format.hexadecimal; +- quotes = json ? 'double' : options.format.quotes; +- escapeless = options.format.escapeless; +- newline = options.format.newline; +- space = options.format.space; +- if (options.format.compact) { +- newline = space = indent = base = ''; +- } +- parentheses = options.format.parentheses; +- semicolons = options.format.semicolons; +- safeConcatenation = options.format.safeConcatenation; +- directive = options.directive; +- parse = json ? null : options.parse; +- sourceMap = options.sourceMap; +- sourceCode = options.sourceCode; +- preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null; +- extra = options; +- +- if (sourceMap) { +- if (!exports.browser) { +- // We assume environment is node.js +- // And prevent from including source-map by browserify +- SourceNode = require('source-map').SourceNode; +- } else { +- SourceNode = global.sourceMap.SourceNode; +- } +- } +- +- result = generateInternal(node); +- +- if (!sourceMap) { +- pair = {code: result.toString(), map: null}; +- return options.sourceMapWithCode ? pair : pair.code; +- } +- +- +- pair = result.toStringWithSourceMap({ +- file: options.file, +- sourceRoot: options.sourceMapRoot +- }); +- +- if (options.sourceContent) { +- pair.map.setSourceContent(options.sourceMap, +- options.sourceContent); +- } +- +- if (options.sourceMapWithCode) { +- return pair; +- } +- +- return pair.map.toString(); ++ if (options.sourceMapWithCode) { ++ return pair; + } + +- FORMAT_MINIFY = { +- indent: { +- style: '', +- base: 0 +- }, +- renumber: true, +- hexadecimal: true, +- quotes: 'auto', +- escapeless: true, +- compact: true, +- parentheses: false, +- semicolons: false +- }; +- +- FORMAT_DEFAULTS = getDefaultOptions().format; +- +- exports.version = require('./package.json').version; +- exports.generate = generate; +- exports.attachComments = estraverse.attachComments; +- exports.Precedence = updateDeeply({}, Precedence); +- exports.browser = false; +- exports.FORMAT_MINIFY = FORMAT_MINIFY; +- exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS; +-}()); ++ return pair.map.toString(); ++ } ++ ++ FORMAT_MINIFY = { ++ indent: { ++ style: '', ++ base: 0, ++ }, ++ renumber: true, ++ hexadecimal: true, ++ quotes: 'auto', ++ escapeless: true, ++ compact: true, ++ parentheses: false, ++ semicolons: false, ++ }; ++ ++ FORMAT_DEFAULTS = getDefaultOptions().format; ++ ++ exports.version = require('./package.json').version; ++ exports.generate = generate; ++ exports.attachComments = estraverse.attachComments; ++ exports.Precedence = updateDeeply({}, Precedence); ++ // exports.browser = false; ++ exports.FORMAT_MINIFY = FORMAT_MINIFY; ++ exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS; ++})(); + /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 532f4111d..b708e5774 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false patchedDependencies: + '@astronautlabs/jsonpath': + hash: 7tqhac4nd4eo2oclutqyg5v5xq + path: patches/@astronautlabs__jsonpath.patch '@ceramicnetwork/common@2.30.0': hash: uqwtqun5atcy5jjekxssfbohei path: patches/@ceramicnetwork__common@2.30.0.patch @@ -32,6 +35,9 @@ patchedDependencies: did-jwt@8.0.4: hash: jwbfqko2nle36olg3vrp3gx3nm path: patches/did-jwt@8.0.4.patch + escodegen: + hash: cjgud6rxwgski5d74mndio3lhe + path: patches/escodegen.patch intl@1.2.5: hash: 2i3sho75ida2jvn4xlmbxxe25i path: patches/intl@1.2.5.patch @@ -318,8 +324,8 @@ importers: specifier: 1.4.0-beta.1 version: link:../../utils '@sphereon/pex': - specifier: ^2.0.1 - version: 2.0.1 + specifier: ^3.3.3 + version: 3.3.3 '@veramo/core': specifier: 6.0.0 version: 6.0.0 @@ -340,8 +346,8 @@ importers: version: 6.11.2 devDependencies: '@sphereon/ssi-types': - specifier: ^0.11.0 - version: 0.11.0 + specifier: 0.22.0 + version: 0.22.0 '@types/qs': specifier: ^6.9.12 version: 6.9.12 @@ -831,6 +837,9 @@ importers: '@metamask/utils': specifier: 9.3.0 version: 9.3.0 + '@sphereon/pex': + specifier: 3.3.3 + version: 3.3.3 '@veramo/core': specifier: 6.0.0 version: 6.0.0 @@ -917,11 +926,14 @@ importers: specifier: 2.17.0 version: 2.17.0 '@metamask/snaps-cli': - specifier: 6.5.0 - version: 6.5.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(@swc/helpers@0.5.11)(esbuild@0.21.1)(webextension-polyfill@0.10.0) + specifier: 6.6.0 + version: 6.6.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(@swc/helpers@0.5.11)(esbuild@0.21.1)(typescript@5.4.5)(webextension-polyfill@0.10.0) '@metamask/snaps-utils': specifier: 8.4.1 version: 8.4.1(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) + '@sphereon/ssi-types': + specifier: 0.22.0 + version: 0.22.0 '@types/elliptic': specifier: ^6.4.18 version: 6.4.18 @@ -1088,6 +1100,9 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@astronautlabs/jsonpath@1.1.2': + resolution: {integrity: sha512-FqL/muoreH7iltYC1EB5Tvox5E8NSOOPGkgns4G+qxRKl6k5dxEVljUjB5NcKESzkqwnUqWjSZkL61XGYOuV+A==} + '@babel/code-frame@7.10.4': resolution: {integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==} @@ -4660,10 +4675,20 @@ packages: resolution: {integrity: sha512-U1strOKT4v/kSJ2h4tgn9iUVVuv5Ja64J+OR145ITHd4574FaUYVJR80/imn6WmCbo8B6AYwHwEovdZ5qLGSKw==} engines: {node: ^18.18 || >=20} + '@metamask/base-controller@7.1.0': + resolution: {integrity: sha512-qUZXuyjy51o73QpkfgwvFiyahi0MRE0u33DGnC6eS34eww7JWwzwA+jbPFSWYj2nVGlR/ZQ1uZR7r1yCxcpzvg==} + engines: {node: ^18.18 || >=20} + '@metamask/controller-utils@11.3.0': resolution: {integrity: sha512-5b+Jg9sKKESzvQcuipHC1D7KSh98MVIi7hXQUk7iX+YVMl4KoKDv94Bl+li8g+jCBshMOV9bRMRh25/hdEvTZQ==} engines: {node: ^18.18 || >=20} + '@metamask/controller-utils@11.4.4': + resolution: {integrity: sha512-0/gKC6jxlj8KRzi0RjGDQnml6l4b46Da/AIqnGJMOC59zl4qD5UN1GM+mq7L5duw/m8sSHa7VbL1hL0l7Cw1pg==} + engines: {node: ^18.18 || >=20} + peerDependencies: + '@babel/runtime': ^7.0.0 + '@metamask/eth-json-rpc-provider@1.0.1': resolution: {integrity: sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA==} engines: {node: '>=14.0.0'} @@ -4682,6 +4707,10 @@ packages: peerDependencies: '@babel/runtime': ^7.0.0 + '@metamask/json-rpc-engine@10.0.2': + resolution: {integrity: sha512-UZKKvgEGVZyBOTKe0NrERv6J4QtR1X4a3Ppa10FZ2tY+nNvwQg3gFpWPRsYNQdPDFxtIsUdrMrqKvbkYSuHZkw==} + engines: {node: ^18.18 || >=20} + '@metamask/json-rpc-engine@7.3.3': resolution: {integrity: sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg==} engines: {node: '>=16.0.0'} @@ -4702,6 +4731,14 @@ packages: resolution: {integrity: sha512-8z7GAUYj3EFVkxiTjaND2x9Q8iURoKhwIyzLMZChLTiJ/XKRJwvtJ9cG2KIeL3GnNsPkVH97xngRmTaYAM6yDg==} engines: {node: ^18.18 || >=20} + '@metamask/json-rpc-middleware-stream@8.0.6': + resolution: {integrity: sha512-wE2CfuNZHnWbSjLEPCCb4MSyWgbQBUI5cslGZb+uRdXNzYOM/RDfq8FAdl6HhjmldHKdBFCW0L3kDr8frgahqA==} + engines: {node: ^18.18 || >=20} + + '@metamask/key-tree@10.0.2': + resolution: {integrity: sha512-GFCPZfiiaJAjAXthdvgxa4/ZD41IOZyCVc5MjgWnzj6Euur5URPqhMuefak6hBtY/Hz50gbDwLn8ODj4hbFF3A==} + engines: {node: ^18.20 || ^20.17 || >=22} + '@metamask/key-tree@9.0.0': resolution: {integrity: sha512-Fma7twGR7PK0QLby0ZCI2q4VDiSlZM0iIUYvmExDtiS6TIGQBu4br0rMWgfgMBz+arFFw8FriQxRrNBv4hb8SA==} engines: {node: '>=16.0.0'} @@ -4727,6 +4764,12 @@ packages: peerDependencies: '@metamask/approval-controller': ^7.0.0 + '@metamask/permission-controller@11.0.4': + resolution: {integrity: sha512-afBLuXR4BAH5rFjjex1kgogLjDnObfWsADOoME51HdJ4uERH89tadJUtFRR7QsYMpDUUHHtqputoCELmxCtl4g==} + engines: {node: ^18.18 || >=20} + peerDependencies: + '@metamask/approval-controller': ^7.0.0 + '@metamask/providers@15.0.0': resolution: {integrity: sha512-FXvL1NQNl6I7fMOJTfQYcBlBZ33vSlm6w80cMpmn8sJh0Lb7wcBpe02UwBsNlARnI+Qsr26XeDs6WHUHQh8CuA==} engines: {node: ^18.18 || >=20} @@ -4737,6 +4780,12 @@ packages: peerDependencies: webextension-polyfill: ^0.10.0 || ^0.11.0 || ^0.12.0 + '@metamask/providers@18.3.1': + resolution: {integrity: sha512-4wHCA24KDwq/eVnAu+/+N7BEuMNN63kdN295u8Wkdc76puyig3lJdcGGne+TEjiILG34twr9rjZPOWTCwOUcDg==} + engines: {node: ^18.18 || >=20} + peerDependencies: + webextension-polyfill: ^0.10.0 || ^0.11.0 || ^0.12.0 + '@metamask/rpc-errors@6.3.1': resolution: {integrity: sha512-ugDY7cKjF4/yH5LtBaOIKHw/AiGGSAmzptAUEiAEGr/78LwuzcXAxmzEQfSfMIfI+f9Djr8cttq1pRJJKfTuCg==} engines: {node: '>=16.0.0'} @@ -4745,6 +4794,10 @@ packages: resolution: {integrity: sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg==} engines: {node: '>=16.0.0'} + '@metamask/rpc-errors@7.0.2': + resolution: {integrity: sha512-YYYHsVYd46XwY2QZzpGeU4PSdRhHdxnzkB8piWGvJW2xbikZ3R+epAYEL4q/K8bh9JPTucsUdwRFnACor1aOYw==} + engines: {node: ^18.20 || ^20.17 || >=22} + '@metamask/safe-event-emitter@2.0.0': resolution: {integrity: sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==} @@ -4805,8 +4858,8 @@ packages: resolution: {integrity: sha512-MQMocMvFmp1MWownjKMuxevivwYeNQPSpNyIg9K7nmxKuoatp5NUc9L8EJ3Bh//rOfl6fBfXn9byfS0t+NE02Q==} engines: {node: ^18.16 || >=20} - '@metamask/snaps-cli@6.5.0': - resolution: {integrity: sha512-y19H9pereDYPRcyT005zp3oiO33K8EeKbzBvwweB2JYiNfQRq8tU4zdJ7IwKHvPj/XTqMr766QkfqtiQlJr/6w==} + '@metamask/snaps-cli@6.6.0': + resolution: {integrity: sha512-bj4xXu8st9Tej1sDDcTTd6p5XN+WhTE3D+K/SHA6c+luYU3+RCmWH/OVJaF8ifbWpKTT82TYioBHzYu/jGddAw==} engines: {node: ^18.16 || >=20} hasBin: true @@ -4814,6 +4867,14 @@ packages: resolution: {integrity: sha512-MnG1BBJk4UK9iJArK+h/iz8wlt+xjsvgnj0k39p5658hWZu6cuumHoV1EIupCwsCv7XXOBLc8iAgjvITXKC1FQ==} engines: {node: ^18.16 || >=20} + '@metamask/snaps-registry@3.2.2': + resolution: {integrity: sha512-20JqmfqAMcQgdR0rkWqLdiWoZYtMNhqzAUs64sO7jMBG0dBUYI+ktatH3ZlLLILqrOPumDDv+Goj7DozXLf33g==} + engines: {node: ^18.16 || >=20} + + '@metamask/snaps-sdk@6.14.0': + resolution: {integrity: sha512-vlb6N1xvWgXQyWXzWAuo5QGUuJ9EsJmLxrtS+fl0+Vdr09WqCPcu20EJu0pFwsde/8crbKaonq8n5TOisz5Utg==} + engines: {node: ^18.16 || >=20} + '@metamask/snaps-sdk@6.9.0': resolution: {integrity: sha512-wPiZNvmkUXTGJ5yLIN9s+KZuB9zx4bz5LurUpufQ8geaMenQ2ZSyg8vqx7hj25q3yk3W2KncV3wnBmtixjucRA==} engines: {node: ^18.16 || >=20} @@ -4822,14 +4883,26 @@ packages: resolution: {integrity: sha512-SbnwZ8suVXX/Zx8kVoE8QETY6DCHqBPjf7uyU2wxHR3puR0SVY7/UL9DG2U1UN3vQZfs9Ja0A87k1M+QynDUAw==} engines: {node: ^18.16 || >=20} - '@metamask/snaps-webpack-plugin@4.1.2': - resolution: {integrity: sha512-oFWsIWNVuZbeEL9CLZoDTdppj1ohSkcslsH/A6JAsbBKiFCPXMaxK6HmTIR6ZXdt871AnS7aN+qRpmrw0uoMiw==} + '@metamask/snaps-utils@8.7.0': + resolution: {integrity: sha512-8aGpnahx8pQdFDDaC5FJ4jQGotO8yxjWNmQMe4QDAH6NW7Z6XBHHuVDkbhJH2b8v8NLw/8vx3n7ZKrM13d0BMw==} + engines: {node: ^18.16 || >=20} + + '@metamask/snaps-webpack-plugin@4.2.0': + resolution: {integrity: sha512-AqO2P8ptX5v7u1V5Ov+4x7dE7BXpguNLZEcZhPKCZgVwc5SZgh87ZBlGADY7kK7dxtnL23IZw/+GSo/imqTEBQ==} engines: {node: ^18.16 || >=20} '@metamask/superstruct@3.1.0': resolution: {integrity: sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA==} engines: {node: '>=16.0.0'} + '@metamask/utils@10.0.1': + resolution: {integrity: sha512-zHgAitJtRwviVVFnRUA2PLRMaAwatr3jiHgiH7mPicJaeSK4ma01aGR4fHy0iy5tlVo1ZiioTmJ1Hbp8FZ6pSg==} + engines: {node: ^18.18 || ^20.14 || >=22} + + '@metamask/utils@11.0.1': + resolution: {integrity: sha512-tZlBvEJ6VhhfEiMV+Ad8rWRMjHKpbMogG01YU22JlsIeJptgIdZX1G8jJzhZH0Gxrixa2BeARh7m9lZWQo6rMg==} + engines: {node: ^18.18 || ^20.14 || >=22} + '@metamask/utils@5.0.2': resolution: {integrity: sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g==} engines: {node: '>=14.0.0'} @@ -6751,6 +6824,22 @@ packages: '@scure/bip39@1.2.2': resolution: {integrity: sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==} + '@sd-jwt/decode@0.6.1': + resolution: {integrity: sha512-QgTIoYd5zyKKLgXB4xEYJTrvumVwtsj5Dog0v0L9UH9ZvHekDaeexS247X7A4iSdzTvmZzUpGskgABOa4D8NmQ==} + engines: {node: '>=16'} + + '@sd-jwt/present@0.6.1': + resolution: {integrity: sha512-QRD3TUDLj4PqQNZ70bBxh8FLLrOE9mY8V9qiZrJSsaDOLFs2p1CtZG+v9ig62fxFYJZMf4bWKwYjz+qqGAtxCg==} + engines: {node: '>=16'} + + '@sd-jwt/types@0.6.1': + resolution: {integrity: sha512-LKpABZJGT77jNhOLvAHIkNNmGqXzyfwBT+6r+DN9zNzMx1CzuNR0qXk1GMUbast9iCfPkGbnEpUv/jHTBvlIvg==} + engines: {node: '>=16'} + + '@sd-jwt/utils@0.6.1': + resolution: {integrity: sha512-1NHZ//+GecGQJb+gSdDicnrHG0DvACUk9jTnXA5yLZhlRjgkjyfJLNsCZesYeCyVp/SiyvIC9B+JwoY4kI0TwQ==} + engines: {node: '>=16'} + '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -6806,18 +6895,15 @@ packages: msrcrypto: ^1.5.8 react-native-securerandom: ^1.0.1 - '@sphereon/pex-models@2.0.3': - resolution: {integrity: sha512-NsPeYmJLhxRG5fJxpcHnRR3xvi7i8SK8s21kYR9oBWO8cBU9qBCpw3gdUNiyI01/h6fbYqkIZ7eBNsHBIzqk5Q==} - - '@sphereon/pex@2.0.1': - resolution: {integrity: sha512-9UW1z60ltPMEauqKXa73gTfmU8SrPxH+X7Rx9v7G13ZmeTC8Yjfm2C7Mit01B9BCL49gShV4htG8np3+UKlorg==} - engines: {node: '>=16'} + '@sphereon/pex-models@2.3.2': + resolution: {integrity: sha512-foFxfLkRwcn/MOp/eht46Q7wsvpQGlO7aowowIIb5Tz9u97kYZ2kz6K2h2ODxWuv5CRA7Q0MY8XUBGE2lfOhOQ==} - '@sphereon/ssi-types@0.10.0': - resolution: {integrity: sha512-ajAUeaR2fMSvlj/au40ltzSoQ+Qy0CdYouPeK6upFma/8g36RbRh0CI+Ee1qOl3R/SbHBzB3XKWFVGHzooVnNQ==} + '@sphereon/pex@3.3.3': + resolution: {integrity: sha512-CXwdEcMTUh2z/5AriBn3OuShEG06l2tgiIr7qDJthnkez8DQ3sZo2vr4NEQWKKAL+DeAWAI4FryQGO4KuK7yfg==} + engines: {node: '>=18'} - '@sphereon/ssi-types@0.11.0': - resolution: {integrity: sha512-0ZV/X6J8k7UWmrRE2wo4ZIBq9TFYRd1GLT9nWWqDYnkzdaLUjD3mL0qs5wcTjqupxITCgwQqGrZ5YP9bm8feSA==} + '@sphereon/ssi-types@0.22.0': + resolution: {integrity: sha512-YPJAZlKmzNALXK8ohP3ETxj1oVzL4+M9ljj3fD5xrbacvYax1JPCVKc8BWSubGcQckKHPbgbpcS7LYEeghyT9Q==} '@spruceid/siwe-parser@2.1.0': resolution: {integrity: sha512-tFQwY2oQLa4qvHE6npKsVgVdVLQOCGP1zJM3yjZOHut43LqCwdSwitZndFLrJHZLpqru9FnmYHRakvsPvrI+qA==} @@ -7431,24 +7517,15 @@ packages: '@types/http-proxy@1.17.14': resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} - '@types/istanbul-lib-coverage@2.0.5': - resolution: {integrity: sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ==} - '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - '@types/istanbul-lib-report@3.0.2': - resolution: {integrity: sha512-8toY6FgdltSdONav1XtUHl4LN1yTmLza+EuDazb/fEmRNCwjyqNVIQWs2IfC74IqjHkREs/nQ2FWq5kZU9IC0w==} - '@types/istanbul-lib-report@3.0.3': resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} '@types/istanbul-reports@1.1.2': resolution: {integrity: sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==} - '@types/istanbul-reports@3.0.3': - resolution: {integrity: sha512-1nESsePMBlf0RPRffLZi5ujYh7IH1BWL4y9pr+Bn3cJBdxz+RTP8bUFljLz9HvzhhOSWKdyBZ4DIivdL6rvgZg==} - '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} @@ -7635,9 +7712,6 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} - '@types/yargs-parser@21.0.2': - resolution: {integrity: sha512-5qcvofLPbfjmBfKaLfj/+f+Sbd6pN4zl7w7VSVI5uz7m9QZTuB2aZAa2uo1wHFBNN2x6g/SoTkXmd8mQnQF2Cw==} - '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -7977,6 +8051,7 @@ packages: '@xmldom/xmldom@0.7.13': resolution: {integrity: sha512-lm2GW5PkosIzccsaZIz7tp8cPADSIlIHWDFTR1N0SzfinhhYgeIQjFMz4rYzanCScr3DqQLeomUDArp6MWKm+g==} engines: {node: '>=10.0.0'} + deprecated: this version is no longer supported, please update to at least 0.8.* '@xmldom/xmldom@0.8.10': resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} @@ -8038,6 +8113,7 @@ packages: acorn-import-assertions@1.9.0: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + deprecated: package has been renamed to acorn-import-attributes peerDependencies: acorn: ^8 @@ -8242,11 +8318,8 @@ packages: resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==} engines: {node: '>=10'} - array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} - - array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + array-buffer-byte-length@1.0.2: + resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} array-flatten@1.1.1: @@ -8266,16 +8339,8 @@ packages: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} - arraybuffer.prototype.slice@1.0.1: - resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} - engines: {node: '>= 0.4'} - - arraybuffer.prototype.slice@1.0.2: - resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} - engines: {node: '>= 0.4'} - - arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + arraybuffer.prototype.slice@1.0.4: + resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} arrify@1.0.1: @@ -8349,10 +8414,6 @@ packages: peerDependencies: postcss: ^8.1.0 - available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} - available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -8786,11 +8847,19 @@ packages: caip@1.1.0: resolution: {integrity: sha512-yOO3Fu4ygyKYAdznuoaqschMKIZzcdgyMpBNtrIfrUhnOeaOWG+dh0c13wcOS6B/46IGGbncoyzJlio79jU7rw==} + call-bind-apply-helpers@1.0.1: + resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} + engines: {node: '>= 0.4'} + call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.3: + resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} engines: {node: '>= 0.4'} caller-callsite@2.0.0: @@ -9603,16 +9672,16 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} - data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + data-view-buffer@1.0.2: + resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} - data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + data-view-byte-length@1.0.2: + resolution: {integrity: sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==} engines: {node: '>= 0.4'} - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + data-view-byte-offset@1.0.1: + resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} engines: {node: '>= 0.4'} dataloader@1.4.0: @@ -9734,10 +9803,6 @@ packages: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} - define-data-property@1.1.1: - resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} - engines: {node: '>= 0.4'} - define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -9746,10 +9811,6 @@ packages: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} - define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} - define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -9998,6 +10059,10 @@ packages: resolution: {integrity: sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==} engines: {node: '>=0.10'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + duplexer2@0.1.4: resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} @@ -10018,6 +10083,7 @@ packages: eciesjs@0.3.18: resolution: {integrity: sha512-RQhegEtLSyIiGJmFTZfvCTHER/fymipXFVx6OwSRYD6hOuy+6Kjpk0dGvIfP9kxn/smBpxQy71uxpGO406ITCw==} + deprecated: Please upgrade to v0.4+ ed25519-signature-2018-context@1.1.0: resolution: {integrity: sha512-ppDWYMNwwp9bploq0fS4l048vHIq41nWsAbPq6H4mNVx9G/GxW3fwg4Ln0mqctP13MoEpREK7Biz8TbVVdYXqA==} @@ -10158,20 +10224,12 @@ packages: resolution: {integrity: sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==} engines: {node: '>= 0.8'} - es-abstract@1.22.1: - resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} + es-abstract@1.23.7: + resolution: {integrity: sha512-OygGC8kIcDhXX+6yAZRGLqwi2CmEXCbLQixeGUgYeR+Qwlppqmo7DIDr8XibtEBZp+fJcoYpoatp5qwLMEdcqQ==} engines: {node: '>= 0.4'} - es-abstract@1.22.3: - resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} - engines: {node: '>= 0.4'} - - es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} - engines: {node: '>= 0.4'} - - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} es-errors@1.3.0: @@ -10188,14 +10246,6 @@ packages: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} - engines: {node: '>= 0.4'} - - es-set-tostringtag@2.0.2: - resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} - engines: {node: '>= 0.4'} - es-set-tostringtag@2.0.3: resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} engines: {node: '>= 0.4'} @@ -10203,8 +10253,8 @@ packages: es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} es6-object-assign@1.1.0: @@ -10792,6 +10842,13 @@ packages: vue-template-compiler: optional: true + fork-ts-checker-webpack-plugin@9.0.2: + resolution: {integrity: sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==} + engines: {node: '>=12.13.0', yarn: '>=1.0.0'} + peerDependencies: + typescript: '>3.6.0' + webpack: ^5.11.0 + form-data-encoder@2.1.4: resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} engines: {node: '>= 14.17'} @@ -10844,6 +10901,10 @@ packages: fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + fs-extra@11.2.0: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} @@ -10885,12 +10946,8 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} - engines: {node: '>= 0.4'} - - function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + function.prototype.name@1.1.8: + resolution: {integrity: sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==} engines: {node: '>= 0.4'} functions-have-names@1.2.3: @@ -10932,8 +10989,8 @@ packages: get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + get-intrinsic@1.2.6: + resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==} engines: {node: '>= 0.4'} get-nonce@1.0.1: @@ -10970,12 +11027,8 @@ packages: resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} engines: {node: '>=18'} - get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} - - get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + get-symbol-description@1.1.0: + resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} get-tsconfig@4.7.2: @@ -11022,6 +11075,7 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported global-directory@4.0.1: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} @@ -11043,10 +11097,6 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} - globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -11074,8 +11124,9 @@ packages: resolution: {integrity: sha512-6xyc49j+x7N4smawJs/q1i7mbSkt6SYUWWd9RbsmmDW7gRv+mhwZ4xT+XkPihZcNyo/diF//543WZq4szdS74w==} engines: {node: '>=14.0.0'} - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} got@12.6.1: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} @@ -11140,12 +11191,6 @@ packages: resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==} engines: {node: '>=8'} - has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} - - has-property-descriptors@1.0.1: - resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} - has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -11153,16 +11198,16 @@ packages: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + has-proto@1.2.0: + resolution: {integrity: sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==} engines: {node: '>= 0.4'} has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} has-tostringtag@1.0.2: @@ -11451,10 +11496,6 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@5.3.0: - resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} - engines: {node: '>= 4'} - ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -11507,6 +11548,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -11546,16 +11588,8 @@ packages: resolution: {integrity: sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==} engines: {node: '>=6'} - internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} - engines: {node: '>= 0.4'} - - internal-slot@1.0.6: - resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} - engines: {node: '>= 0.4'} - - internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + internal-slot@1.1.0: + resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} interpret@1.4.0: @@ -11608,11 +11642,8 @@ packages: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} - is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} - - is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + is-array-buffer@3.0.5: + resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} engines: {node: '>= 0.4'} is-arrayish@0.2.1: @@ -11621,15 +11652,20 @@ packages: is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + + is-bigint@1.1.0: + resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} + engines: {node: '>= 0.4'} is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + is-boolean-object@1.2.1: + resolution: {integrity: sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==} engines: {node: '>= 0.4'} is-buffer@1.1.6: @@ -11649,12 +11685,12 @@ packages: is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} - is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + is-data-view@1.0.2: + resolution: {integrity: sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==} engines: {node: '>= 0.4'} - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + is-date-object@1.1.0: + resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} engines: {node: '>= 0.4'} is-decimal@2.0.1: @@ -11686,6 +11722,10 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-finalizationregistry@1.1.1: + resolution: {integrity: sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==} + engines: {node: '>= 0.4'} + is-fullwidth-code-point@2.0.0: resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} engines: {node: '>=4'} @@ -11742,24 +11782,20 @@ packages: resolution: {integrity: sha512-aZMG0T3F34mTg4eTdszcGXx54oiZ4NtHSft3hWNJMGJXUUqdIj3cOZuHcU0nCWWcY3jd7yRe/3AEm3vSNTpBGQ==} engines: {node: '>=0.10.0'} - is-nan@1.3.2: - resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + is-map@2.0.3: + resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} - is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - - is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} engines: {node: '>= 0.4'} is-npm@6.0.0: resolution: {integrity: sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + is-number-object@1.1.1: + resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} engines: {node: '>= 0.4'} is-number@7.0.0: @@ -11808,8 +11844,8 @@ packages: is-reference@3.0.2: resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + is-regex@1.2.1: + resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} is-regexp@1.0.0: @@ -11820,11 +11856,12 @@ packages: resolution: {integrity: sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==} engines: {node: '>=6'} - is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + is-set@2.0.3: + resolution: {integrity: sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==} + engines: {node: '>= 0.4'} - is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + is-shared-array-buffer@1.0.4: + resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} engines: {node: '>= 0.4'} is-stream@1.1.0: @@ -11843,30 +11880,30 @@ packages: resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} engines: {node: '>=18'} - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + is-string@1.1.1: + resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} engines: {node: '>= 0.4'} is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + is-symbol@1.1.1: + resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} engines: {node: '>= 0.4'} is-text-path@2.0.0: resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} engines: {node: '>=8'} - is-typed-array@1.1.12: - resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} - engines: {node: '>= 0.4'} - is-typed-array@1.1.13: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} + engines: {node: '>= 0.4'} + is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} @@ -11882,8 +11919,17 @@ packages: resolution: {integrity: sha512-+kwPrVDu9Ms03L90Qaml+79+6DZHqHyRoANI6IsZJ/g8frhnfchDOBCa0RbQ6/kdHt5CS5OeIEyrYznNuVN+8A==} engines: {node: '>=0.10.0'} - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-weakmap@2.0.2: + resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} + engines: {node: '>= 0.4'} + + is-weakref@1.1.0: + resolution: {integrity: sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==} + engines: {node: '>= 0.4'} + + is-weakset@2.0.4: + resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} + engines: {node: '>= 0.4'} is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} @@ -12127,6 +12173,9 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + js-cookie@3.0.5: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} @@ -12735,6 +12784,10 @@ packages: marky@1.2.5: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + md5-file@3.2.3: resolution: {integrity: sha512-3Tkp1piAHaworfcCgH0jKbTvj1jWWFgbvh2cXaNCgHwyTCBxxvD1Y04rmfpvdPm1P4oXMOpm6+2H7sr7v9v8Fw==} engines: {node: '>=0.10'} @@ -13292,11 +13345,6 @@ packages: nanoassert@2.0.0: resolution: {integrity: sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==} - nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -13540,11 +13588,8 @@ packages: object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} - object-inspect@1.13.1: - resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - - object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} engines: {node: '>= 0.4'} object-is@1.1.5: @@ -13566,6 +13611,10 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} + object.assign@4.1.7: + resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} + engines: {node: '>= 0.4'} + obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} @@ -14580,9 +14629,6 @@ packages: react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-is@18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} @@ -14793,6 +14839,11 @@ packages: reflect-metadata@0.2.1: resolution: {integrity: sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==} + deprecated: This version has a critical bug in fallback handling. Please upgrade to reflect-metadata@0.2.2 or newer. + + reflect.getprototypeof@1.0.9: + resolution: {integrity: sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q==} + engines: {node: '>= 0.4'} regenerate-unicode-properties@10.1.1: resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} @@ -14817,14 +14868,6 @@ packages: regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} - regexp.prototype.flags@1.5.0: - resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} - engines: {node: '>= 0.4'} - - regexp.prototype.flags@1.5.1: - resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} - engines: {node: '>= 0.4'} - regexp.prototype.flags@1.5.3: resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} engines: {node: '>= 0.4'} @@ -15007,6 +15050,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@5.0.5: @@ -15073,16 +15117,8 @@ packages: safari-14-idb-fix@3.0.0: resolution: {integrity: sha512-eBNFLob4PMq8JA1dGyFn6G97q3/WzNtFK4RnzT1fnLq+9RyrGknzYiM/9B12MnKAxuj1IXr7UKYtTNtjyKMBog==} - safe-array-concat@1.0.0: - resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} - engines: {node: '>=0.4'} - - safe-array-concat@1.0.1: - resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} - engines: {node: '>=0.4'} - - safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + safe-array-concat@1.1.3: + resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} engines: {node: '>=0.4'} safe-buffer@5.1.2: @@ -15091,11 +15127,8 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - - safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + safe-regex-test@1.1.0: + resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} engines: {node: '>= 0.4'} safe-stable-stringify@2.4.3: @@ -15250,10 +15283,6 @@ packages: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} - set-function-name@2.0.1: - resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} - engines: {node: '>= 0.4'} - set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} engines: {node: '>= 0.4'} @@ -15309,11 +15338,23 @@ packages: engines: {node: '>=4'} hasBin: true + side-channel-list@1.0.0: + resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + side-channel@1.1.0: + resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} siginfo@2.0.0: @@ -15589,36 +15630,18 @@ packages: string.prototype.codepointat@0.2.1: resolution: {integrity: sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==} - string.prototype.matchall@4.0.8: - resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} - - string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + string.prototype.matchall@4.0.12: + resolution: {integrity: sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==} engines: {node: '>= 0.4'} - string.prototype.trim@1.2.8: - resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + string.prototype.trim@1.2.10: + resolution: {integrity: sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==} engines: {node: '>= 0.4'} - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + string.prototype.trimend@1.0.9: + resolution: {integrity: sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==} engines: {node: '>= 0.4'} - string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} - - string.prototype.trimend@1.0.7: - resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} - - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} - - string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} - - string.prototype.trimstart@1.0.7: - resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} - string.prototype.trimstart@1.0.8: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} @@ -15749,12 +15772,15 @@ packages: sudo-prompt@8.2.5: resolution: {integrity: sha512-rlBo3HU/1zAJUrkY6jNxDOC9eVYliG6nS4JA8u8KAshITd07tafMc/Br7xQwCSseXwJ2iCcHCE8SNWX3q8Z+kw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. sudo-prompt@9.1.1: resolution: {integrity: sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. sudo-prompt@9.2.1: resolution: {integrity: sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. supabase@1.165.0: resolution: {integrity: sha512-bN1TSR6p4POxCQqb3OsO6vo2H9yKIUB2HW44SiLAV9leBIjdm4AsrJJ1hmc/YecqjtuBooAr7RXz/uGKQEQbEQ==} @@ -16216,35 +16242,20 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} - typed-array-buffer@1.0.0: - resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + typed-array-buffer@1.0.3: + resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} - typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + typed-array-byte-length@1.0.3: + resolution: {integrity: sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==} engines: {node: '>= 0.4'} - typed-array-byte-length@1.0.0: - resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + typed-array-byte-offset@1.0.4: + resolution: {integrity: sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==} engines: {node: '>= 0.4'} - typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} - engines: {node: '>= 0.4'} - - typed-array-byte-offset@1.0.0: - resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} - engines: {node: '>= 0.4'} - - typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} - engines: {node: '>= 0.4'} - - typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} - - typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} typedarray-to-buffer@3.1.5: @@ -16355,8 +16366,9 @@ packages: resolution: {integrity: sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==} hasBin: true - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + unbox-primitive@1.1.0: + resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} + engines: {node: '>= 0.4'} uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} @@ -17028,8 +17040,17 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + which-boxed-primitive@1.1.1: + resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} + engines: {node: '>= 0.4'} + + which-builtin-type@1.2.1: + resolution: {integrity: sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==} + engines: {node: '>= 0.4'} + + which-collection@1.0.2: + resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} + engines: {node: '>= 0.4'} which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} @@ -17038,14 +17059,14 @@ packages: resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} engines: {node: '>=8.15'} - which-typed-array@1.1.11: - resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} - engines: {node: '>= 0.4'} - which-typed-array@1.1.15: resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} + which-typed-array@1.1.18: + resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} + engines: {node: '>= 0.4'} + which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -17547,6 +17568,10 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@astronautlabs/jsonpath@1.1.2(patch_hash=7tqhac4nd4eo2oclutqyg5v5xq)': + dependencies: + static-eval: 2.0.2 + '@babel/code-frame@7.10.4': dependencies: '@babel/highlight': 7.25.7 @@ -17807,9 +17832,9 @@ snapshots: '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - debug: 4.3.4 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -17818,9 +17843,9 @@ snapshots: '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - debug: 4.3.4 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -17829,9 +17854,9 @@ snapshots: '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.8)': dependencies: '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.5 - debug: 4.3.4 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -20785,8 +20810,8 @@ snapshots: '@cef-ebsi/key-did-resolver': 1.1.0 '@transmute/json-web-signature': 0.7.0-unstable.81(web-streams-polyfill@4.0.0) '@transmute/vc.js': 0.7.0-unstable.81(encoding@0.1.13)(web-streams-polyfill@4.0.0) - ajv: 8.12.0 - ajv-formats: 2.1.1(ajv@8.12.0) + ajv: 8.13.0 + ajv-formats: 2.1.1(ajv@8.13.0) axios: 1.5.1 did-resolver: 4.1.0 elliptic: 6.5.5 @@ -23409,7 +23434,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.6 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -23427,7 +23452,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.11 + '@types/node': 22.7.6 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -23531,9 +23556,9 @@ snapshots: '@jest/types@29.6.3': dependencies: '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.5 - '@types/istanbul-reports': 3.0.3 - '@types/node': 20.12.11 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 22.7.6 '@types/yargs': 17.0.29 chalk: 4.1.2 @@ -23576,7 +23601,7 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 '@js-temporal/polyfill@0.4.4': @@ -23651,7 +23676,7 @@ snapshots: '@metamask/approval-controller@7.0.3': dependencies: - '@metamask/base-controller': 7.0.1 + '@metamask/base-controller': 7.1.0 '@metamask/rpc-errors': 6.4.0 '@metamask/utils': 9.3.0 nanoid: 3.3.7 @@ -23672,6 +23697,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/base-controller@7.1.0': + dependencies: + '@metamask/utils': 10.0.1 + immer: 9.0.21 + transitivePeerDependencies: + - supports-color + '@metamask/controller-utils@11.3.0(@babel/runtime@7.25.7)': dependencies: '@ethereumjs/util': 8.1.0 @@ -23687,6 +23719,22 @@ snapshots: - '@babel/runtime' - supports-color + '@metamask/controller-utils@11.4.4(@babel/runtime@7.25.7)': + dependencies: + '@babel/runtime': 7.25.7 + '@ethereumjs/util': 8.1.0 + '@metamask/eth-query': 4.0.0 + '@metamask/ethjs-unit': 0.3.0(@babel/runtime@7.25.7) + '@metamask/utils': 10.0.1 + '@spruceid/siwe-parser': 2.1.0 + '@types/bn.js': 5.1.6 + bignumber.js: 9.1.2 + bn.js: 5.2.1 + eth-ens-namehash: 2.0.8 + fast-deep-equal: 3.1.3 + transitivePeerDependencies: + - supports-color + '@metamask/eth-json-rpc-provider@1.0.1': dependencies: '@metamask/json-rpc-engine': 7.3.3 @@ -23717,6 +23765,14 @@ snapshots: '@metamask/number-to-bn': 1.7.1 bn.js: 5.2.1 + '@metamask/json-rpc-engine@10.0.2': + dependencies: + '@metamask/rpc-errors': 7.0.2 + '@metamask/safe-event-emitter': 3.1.1 + '@metamask/utils': 11.0.1 + transitivePeerDependencies: + - supports-color + '@metamask/json-rpc-engine@7.3.3': dependencies: '@metamask/rpc-errors': 6.3.1 @@ -23759,6 +23815,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/json-rpc-middleware-stream@8.0.6': + dependencies: + '@metamask/json-rpc-engine': 10.0.2 + '@metamask/safe-event-emitter': 3.1.1 + '@metamask/utils': 11.0.1 + readable-stream: 3.6.2 + transitivePeerDependencies: + - supports-color + + '@metamask/key-tree@10.0.2': + dependencies: + '@metamask/scure-bip39': 2.1.1 + '@metamask/utils': 11.0.1 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.9 + transitivePeerDependencies: + - supports-color + '@metamask/key-tree@9.0.0': dependencies: '@metamask/scure-bip39': 2.1.0 @@ -23810,6 +23885,22 @@ snapshots: - '@babel/runtime' - supports-color + '@metamask/permission-controller@11.0.4(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)': + dependencies: + '@metamask/approval-controller': 7.0.3 + '@metamask/base-controller': 7.1.0 + '@metamask/controller-utils': 11.4.4(@babel/runtime@7.25.7) + '@metamask/json-rpc-engine': 10.0.2 + '@metamask/rpc-errors': 7.0.2 + '@metamask/utils': 10.0.1 + '@types/deep-freeze-strict': 1.1.2 + deep-freeze-strict: 1.1.1 + immer: 9.0.21 + nanoid: 3.3.7 + transitivePeerDependencies: + - '@babel/runtime' + - supports-color + '@metamask/providers@15.0.0': dependencies: '@metamask/json-rpc-engine': 7.3.3 @@ -23844,6 +23935,23 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/providers@18.3.1(webextension-polyfill@0.10.0)': + dependencies: + '@metamask/json-rpc-engine': 10.0.2 + '@metamask/json-rpc-middleware-stream': 8.0.6 + '@metamask/object-multiplex': 2.0.0 + '@metamask/rpc-errors': 7.0.2 + '@metamask/safe-event-emitter': 3.1.1 + '@metamask/utils': 11.0.1 + detect-browser: 5.3.0 + extension-port-stream: 4.2.0(webextension-polyfill@0.10.0) + fast-deep-equal: 3.1.3 + is-stream: 2.0.1 + readable-stream: 3.6.2 + webextension-polyfill: 0.10.0 + transitivePeerDependencies: + - supports-color + '@metamask/rpc-errors@6.3.1': dependencies: '@metamask/utils': 9.3.0 @@ -23858,6 +23966,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/rpc-errors@7.0.2': + dependencies: + '@metamask/utils': 11.0.1 + fast-safe-stringify: 2.1.1 + transitivePeerDependencies: + - supports-color + '@metamask/safe-event-emitter@2.0.0': {} '@metamask/safe-event-emitter@3.1.1': {} @@ -23936,7 +24051,7 @@ snapshots: '@metamask/slip44@4.0.0': {} - '@metamask/snaps-cli@6.5.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(@swc/helpers@0.5.11)(esbuild@0.21.1)(webextension-polyfill@0.10.0)': + '@metamask/snaps-cli@6.6.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(@swc/helpers@0.5.11)(esbuild@0.21.1)(typescript@5.4.5)(webextension-polyfill@0.10.0)': dependencies: '@babel/core': 7.25.8 '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.8) @@ -23946,11 +24061,11 @@ snapshots: '@babel/plugin-transform-runtime': 7.25.7(@babel/core@7.25.8) '@babel/preset-env': 7.25.8(@babel/core@7.25.8) '@babel/preset-typescript': 7.25.7(@babel/core@7.25.8) - '@metamask/snaps-sdk': 6.9.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0) - '@metamask/snaps-utils': 8.4.1(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) - '@metamask/snaps-webpack-plugin': 4.1.2(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) + '@metamask/snaps-sdk': 6.14.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0) + '@metamask/snaps-utils': 8.7.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) + '@metamask/snaps-webpack-plugin': 4.2.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) '@metamask/superstruct': 3.1.0 - '@metamask/utils': 9.3.0 + '@metamask/utils': 10.0.1 '@swc/core': 1.3.78(@swc/helpers@0.5.11) assert: 2.1.0 babelify: 10.0.0(@babel/core@7.25.8) @@ -23963,6 +24078,7 @@ snapshots: crypto-browserify: 3.12.0 domain-browser: 4.23.0 events: 3.3.0 + fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.4.5)(webpack@5.95.0(@swc/core@1.3.78(@swc/helpers@0.5.11))(esbuild@0.21.1)) https-browserify: 1.0.0 ora: 5.4.1 os-browserify: 0.3.0 @@ -23993,6 +24109,7 @@ snapshots: - '@swc/helpers' - esbuild - supports-color + - typescript - uglify-js - webextension-polyfill - webpack-cli @@ -24006,6 +24123,26 @@ snapshots: transitivePeerDependencies: - supports-color + '@metamask/snaps-registry@3.2.2': + dependencies: + '@metamask/superstruct': 3.1.0 + '@metamask/utils': 10.0.1 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + transitivePeerDependencies: + - supports-color + + '@metamask/snaps-sdk@6.14.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0)': + dependencies: + '@metamask/key-tree': 10.0.2 + '@metamask/providers': 18.3.1(webextension-polyfill@0.10.0) + '@metamask/rpc-errors': 7.0.2 + '@metamask/superstruct': 3.1.0 + '@metamask/utils': 10.0.1 + transitivePeerDependencies: + - supports-color + - webextension-polyfill + '@metamask/snaps-sdk@6.9.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0)': dependencies: '@metamask/key-tree': 9.1.2 @@ -24048,11 +24185,43 @@ snapshots: - supports-color - webextension-polyfill - '@metamask/snaps-webpack-plugin@4.1.2(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0)': + '@metamask/snaps-utils@8.7.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0)': dependencies: - '@metamask/snaps-sdk': 6.9.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0) - '@metamask/snaps-utils': 8.4.1(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) - '@metamask/utils': 9.3.0 + '@babel/core': 7.25.8 + '@babel/types': 7.25.8 + '@metamask/base-controller': 7.1.0 + '@metamask/key-tree': 10.0.2 + '@metamask/permission-controller': 11.0.4(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3) + '@metamask/rpc-errors': 7.0.2 + '@metamask/slip44': 4.0.0 + '@metamask/snaps-registry': 3.2.2 + '@metamask/snaps-sdk': 6.14.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0) + '@metamask/superstruct': 3.1.0 + '@metamask/utils': 10.0.1 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.9 + chalk: 4.1.2 + cron-parser: 4.9.0 + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + fast-xml-parser: 4.5.0 + marked: 12.0.2 + rfdc: 1.4.1 + semver: 7.6.3 + ses: 1.9.0 + validate-npm-package-name: 5.0.1 + transitivePeerDependencies: + - '@babel/runtime' + - '@metamask/approval-controller' + - supports-color + - webextension-polyfill + + '@metamask/snaps-webpack-plugin@4.2.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0)': + dependencies: + '@metamask/snaps-sdk': 6.14.0(patch_hash=3fjwc6ncazbhc3kbliaqs53llm)(webextension-polyfill@0.10.0) + '@metamask/snaps-utils': 8.7.0(@babel/runtime@7.25.7)(@metamask/approval-controller@7.0.3)(webextension-polyfill@0.10.0) + '@metamask/utils': 10.0.1 + prettier: 2.8.8 webpack-sources: 3.2.3 transitivePeerDependencies: - '@babel/runtime' @@ -24062,6 +24231,34 @@ snapshots: '@metamask/superstruct@3.1.0': {} + '@metamask/utils@10.0.1': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@metamask/superstruct': 3.1.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.9 + '@types/debug': 4.1.12 + debug: 4.3.7 + pony-cause: 2.1.11 + semver: 7.6.3 + uuid: 9.0.1 + transitivePeerDependencies: + - supports-color + + '@metamask/utils@11.0.1': + dependencies: + '@ethereumjs/tx': 4.2.0 + '@metamask/superstruct': 3.1.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.9 + '@types/debug': 4.1.12 + debug: 4.3.7 + pony-cause: 2.1.11 + semver: 7.6.3 + uuid: 9.0.1 + transitivePeerDependencies: + - supports-color + '@metamask/utils@5.0.2': dependencies: '@ethereumjs/tx': 4.2.0 @@ -25498,7 +25695,7 @@ snapshots: dependencies: asn1js: 3.0.5 pvtsutils: 1.3.3 - tslib: 2.6.2 + tslib: 2.8.0 '@peculiar/asn1-schema@2.3.8': dependencies: @@ -25508,14 +25705,14 @@ snapshots: '@peculiar/json-schema@1.1.12': dependencies: - tslib: 2.6.2 + tslib: 2.8.0 '@peculiar/webcrypto@1.4.3': dependencies: '@peculiar/asn1-schema': 2.3.6 '@peculiar/json-schema': 1.1.12 pvtsutils: 1.3.3 - tslib: 2.6.2 + tslib: 2.8.0 webcrypto-core: 1.7.7 '@peculiar/webcrypto@1.4.6': @@ -26646,7 +26843,7 @@ snapshots: chalk: 4.1.2 execa: 5.1.1 metro: 0.80.12(bufferutil@4.0.8)(utf-8-validate@6.0.3) - metro-config: 0.80.12(bufferutil@4.0.8) + metro-config: 0.80.12(bufferutil@4.0.8)(utf-8-validate@6.0.3) metro-core: 0.80.12 node-fetch: 2.7.0(encoding@0.1.13) querystring: 0.2.1 @@ -27236,6 +27433,24 @@ snapshots: '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 + '@sd-jwt/decode@0.6.1': + dependencies: + '@sd-jwt/types': 0.6.1 + '@sd-jwt/utils': 0.6.1 + + '@sd-jwt/present@0.6.1': + dependencies: + '@sd-jwt/decode': 0.6.1 + '@sd-jwt/types': 0.6.1 + '@sd-jwt/utils': 0.6.1 + + '@sd-jwt/types@0.6.1': {} + + '@sd-jwt/utils@0.6.1': + dependencies: + '@sd-jwt/types': 0.6.1 + js-base64: 3.7.7 + '@sec-ant/readable-stream@0.4.1': {} '@segment/loosely-validate-event@2.0.0': @@ -27300,25 +27515,26 @@ snapshots: str2buf: 1.3.0 webcrypto-shim: 0.1.7 - '@sphereon/pex-models@2.0.3': {} - - '@sphereon/pex@2.0.1': - dependencies: - '@sphereon/pex-models': 2.0.3 - '@sphereon/ssi-types': 0.10.0 - ajv: 8.12.0 - ajv-formats: 2.1.1(ajv@8.12.0) - jsonpath: 1.1.1 - jwt-decode: 3.1.2 - nanoid: 3.3.6 - string.prototype.matchall: 4.0.8 + '@sphereon/pex-models@2.3.2': {} - '@sphereon/ssi-types@0.10.0': + '@sphereon/pex@3.3.3': dependencies: + '@astronautlabs/jsonpath': 1.1.2(patch_hash=7tqhac4nd4eo2oclutqyg5v5xq) + '@sd-jwt/decode': 0.6.1 + '@sd-jwt/present': 0.6.1 + '@sd-jwt/types': 0.6.1 + '@sphereon/pex-models': 2.3.2 + '@sphereon/ssi-types': 0.22.0 + ajv: 8.13.0 + ajv-formats: 2.1.1(ajv@8.13.0) jwt-decode: 3.1.2 + nanoid: 3.3.7 + string.prototype.matchall: 4.0.12 + uint8arrays: 3.1.1 - '@sphereon/ssi-types@0.11.0': + '@sphereon/ssi-types@0.22.0': dependencies: + '@sd-jwt/decode': 0.6.1 jwt-decode: 3.1.2 '@spruceid/siwe-parser@2.1.0': @@ -28088,14 +28304,8 @@ snapshots: dependencies: '@types/node': 20.12.11 - '@types/istanbul-lib-coverage@2.0.5': {} - '@types/istanbul-lib-coverage@2.0.6': {} - '@types/istanbul-lib-report@3.0.2': - dependencies: - '@types/istanbul-lib-coverage': 2.0.5 - '@types/istanbul-lib-report@3.0.3': dependencies: '@types/istanbul-lib-coverage': 2.0.6 @@ -28105,10 +28315,6 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-lib-report': 3.0.3 - '@types/istanbul-reports@3.0.3': - dependencies: - '@types/istanbul-lib-report': 3.0.2 - '@types/istanbul-reports@3.0.4': dependencies: '@types/istanbul-lib-report': 3.0.3 @@ -28166,7 +28372,7 @@ snapshots: '@types/node-forge@1.3.11': dependencies: - '@types/node': 20.12.11 + '@types/node': 22.7.6 '@types/node@12.20.55': {} @@ -28305,8 +28511,6 @@ snapshots: dependencies: '@types/node': 20.12.11 - '@types/yargs-parser@21.0.2': {} - '@types/yargs-parser@21.0.3': {} '@types/yargs@13.0.12': @@ -28319,7 +28523,7 @@ snapshots: '@types/yargs@17.0.29': dependencies: - '@types/yargs-parser': 21.0.2 + '@types/yargs-parser': 21.0.3 '@ungap/structured-clone@1.2.0': {} @@ -29137,7 +29341,7 @@ snapshots: '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 tslib: 1.14.1 - uint8arrays: 3.1.0 + uint8arrays: 3.1.1 '@walletconnect/safe-json@1.0.2': dependencies: @@ -29604,15 +29808,10 @@ snapshots: dependencies: tslib: 2.6.2 - array-buffer-byte-length@1.0.0: + array-buffer-byte-length@1.0.2: dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.2 - - array-buffer-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.4 + call-bound: 1.0.3 + is-array-buffer: 3.0.5 array-flatten@1.1.1: {} @@ -29624,40 +29823,20 @@ snapshots: array.prototype.flat@1.3.2: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.7 es-shim-unscopables: 1.0.2 - arraybuffer.prototype.slice@1.0.1: + arraybuffer.prototype.slice@1.0.4: dependencies: - array-buffer-byte-length: 1.0.0 - call-bind: 1.0.7 + array-buffer-byte-length: 1.0.2 + call-bind: 1.0.8 define-properties: 1.2.1 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.2 - is-shared-array-buffer: 1.0.2 - - arraybuffer.prototype.slice@1.0.2: - dependencies: - array-buffer-byte-length: 1.0.0 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.22.3 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.2 - is-shared-array-buffer: 1.0.2 - - arraybuffer.prototype.slice@1.0.3: - dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.7 es-errors: 1.3.0 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.4 - is-shared-array-buffer: 1.0.3 + get-intrinsic: 1.2.6 + is-array-buffer: 3.0.5 arrify@1.0.1: {} @@ -29678,11 +29857,11 @@ snapshots: dependencies: pvtsutils: 1.3.5 pvutils: 1.1.3 - tslib: 2.6.2 + tslib: 2.8.0 assert@1.5.1: dependencies: - object.assign: 4.1.5 + object.assign: 4.1.7 util: 0.10.4 assert@2.0.0: @@ -29694,10 +29873,10 @@ snapshots: assert@2.1.0: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 is-nan: 1.3.2 object-is: 1.1.6 - object.assign: 4.1.5 + object.assign: 4.1.7 util: 0.12.5 assertion-error@1.1.0: {} @@ -29734,8 +29913,6 @@ snapshots: postcss: 8.4.38 postcss-value-parser: 4.2.0 - available-typed-arrays@1.0.5: {} - available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -29850,7 +30027,7 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.23.2): dependencies: - '@babel/compat-data': 7.24.4 + '@babel/compat-data': 7.25.8 '@babel/core': 7.23.2 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.23.2) semver: 6.3.1 @@ -29859,7 +30036,7 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.5): dependencies: - '@babel/compat-data': 7.24.4 + '@babel/compat-data': 7.25.8 '@babel/core': 7.24.5 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.24.5) semver: 6.3.1 @@ -29868,7 +30045,7 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.8): dependencies: - '@babel/compat-data': 7.24.4 + '@babel/compat-data': 7.25.8 '@babel/core': 7.25.8 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) semver: 6.3.1 @@ -30440,19 +30617,28 @@ snapshots: caip@1.1.0: {} + call-bind-apply-helpers@1.0.1: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + call-bind@1.0.2: dependencies: function-bind: 1.1.1 get-intrinsic: 1.2.1 - call-bind@1.0.7: + call-bind@1.0.8: dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + get-intrinsic: 1.2.6 set-function-length: 1.2.2 + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.6 + caller-callsite@2.0.0: dependencies: callsites: 2.0.0 @@ -31298,23 +31484,23 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 - data-view-buffer@1.0.1: + data-view-buffer@1.0.2: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 es-errors: 1.3.0 - is-data-view: 1.0.1 + is-data-view: 1.0.2 - data-view-byte-length@1.0.1: + data-view-byte-length@1.0.2: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 es-errors: 1.3.0 - is-data-view: 1.0.1 + is-data-view: 1.0.2 - data-view-byte-offset@1.0.0: + data-view-byte-offset@1.0.1: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 es-errors: 1.3.0 - is-data-view: 1.0.1 + is-data-view: 1.0.2 dataloader@1.4.0: {} @@ -31398,29 +31584,18 @@ snapshots: defer-to-connect@2.0.1: {} - define-data-property@1.1.1: - dependencies: - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - define-data-property@1.1.4: dependencies: - es-define-property: 1.0.0 + es-define-property: 1.0.1 es-errors: 1.3.0 - gopd: 1.0.1 + gopd: 1.2.0 define-lazy-prop@2.0.0: {} - define-properties@1.2.0: - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - define-properties@1.2.1: dependencies: - define-data-property: 1.1.1 - has-property-descriptors: 1.0.1 + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 object-keys: 1.1.1 defined@1.0.1: {} @@ -31712,6 +31887,12 @@ snapshots: create-hmac: 1.1.7 optional: true + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + duplexer2@0.1.4: dependencies: readable-stream: 2.3.8 @@ -31885,142 +32066,57 @@ snapshots: accepts: 1.3.8 escape-html: 1.0.3 - es-abstract@1.22.1: + es-abstract@1.23.7: dependencies: - array-buffer-byte-length: 1.0.0 - arraybuffer.prototype.slice: 1.0.1 - available-typed-arrays: 1.0.5 - call-bind: 1.0.7 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.12 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.0 - safe-array-concat: 1.0.0 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-buffer: 1.0.0 - typed-array-byte-length: 1.0.0 - typed-array-byte-offset: 1.0.0 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.11 - - es-abstract@1.22.3: - dependencies: - array-buffer-byte-length: 1.0.0 - arraybuffer.prototype.slice: 1.0.2 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - es-set-tostringtag: 2.0.2 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - internal-slot: 1.0.6 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.1 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.1 - safe-array-concat: 1.0.1 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.8 - string.prototype.trimend: 1.0.7 - string.prototype.trimstart: 1.0.7 - typed-array-buffer: 1.0.0 - typed-array-byte-length: 1.0.0 - typed-array-byte-offset: 1.0.0 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 - - es-abstract@1.23.3: - dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 + array-buffer-byte-length: 1.0.2 + arraybuffer.prototype.slice: 1.0.4 available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - data-view-buffer: 1.0.1 - data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 - es-define-property: 1.0.0 + call-bind: 1.0.8 + call-bound: 1.0.3 + data-view-buffer: 1.0.2 + data-view-byte-length: 1.0.2 + data-view-byte-offset: 1.0.1 + es-define-property: 1.0.1 es-errors: 1.3.0 es-object-atoms: 1.0.0 es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 + es-to-primitive: 1.3.0 + function.prototype.name: 1.1.8 + get-intrinsic: 1.2.6 + get-symbol-description: 1.1.0 globalthis: 1.0.4 - gopd: 1.0.1 + gopd: 1.2.0 has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 + has-proto: 1.2.0 + has-symbols: 1.1.0 hasown: 2.0.2 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 + internal-slot: 1.1.0 + is-array-buffer: 3.0.5 is-callable: 1.2.7 - is-data-view: 1.0.1 - is-negative-zero: 2.0.3 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.2 + is-data-view: 1.0.2 + is-regex: 1.2.1 + is-shared-array-buffer: 1.0.4 + is-string: 1.1.1 + is-typed-array: 1.1.15 + is-weakref: 1.1.0 + math-intrinsics: 1.1.0 + object-inspect: 1.13.3 object-keys: 1.1.1 - object.assign: 4.1.5 + object.assign: 4.1.7 regexp.prototype.flags: 1.5.3 - safe-array-concat: 1.1.2 - safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 + safe-array-concat: 1.1.3 + safe-regex-test: 1.1.0 + string.prototype.trim: 1.2.10 + string.prototype.trimend: 1.0.9 string.prototype.trimstart: 1.0.8 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 + typed-array-buffer: 1.0.3 + typed-array-byte-length: 1.0.3 + typed-array-byte-offset: 1.0.4 + typed-array-length: 1.0.7 + unbox-primitive: 1.1.0 + which-typed-array: 1.1.18 - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 + es-define-property@1.0.1: {} es-errors@1.3.0: {} @@ -32032,21 +32128,9 @@ snapshots: dependencies: es-errors: 1.3.0 - es-set-tostringtag@2.0.1: - dependencies: - get-intrinsic: 1.2.4 - has: 1.0.4 - has-tostringtag: 1.0.0 - - es-set-tostringtag@2.0.2: - dependencies: - get-intrinsic: 1.2.4 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - es-set-tostringtag@2.0.3: dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.6 has-tostringtag: 1.0.2 hasown: 2.0.2 @@ -32054,11 +32138,11 @@ snapshots: dependencies: hasown: 2.0.2 - es-to-primitive@1.2.1: + es-to-primitive@1.3.0: dependencies: is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 + is-date-object: 1.1.0 + is-symbol: 1.1.1 es6-object-assign@1.1.0: {} @@ -32194,7 +32278,7 @@ snapshots: escape-string-regexp@5.0.0: {} - escodegen@1.14.3: + escodegen@1.14.3(patch_hash=cjgud6rxwgski5d74mndio3lhe): dependencies: esprima: 4.0.1 estraverse: 4.3.0 @@ -32950,6 +33034,23 @@ snapshots: typescript: 5.4.5 webpack: 5.91.0(@swc/core@1.5.5(@swc/helpers@0.5.11)) + fork-ts-checker-webpack-plugin@9.0.2(typescript@5.4.5)(webpack@5.95.0(@swc/core@1.3.78(@swc/helpers@0.5.11))(esbuild@0.21.1)): + dependencies: + '@babel/code-frame': 7.25.7 + chalk: 4.1.2 + chokidar: 3.6.0 + cosmiconfig: 8.3.6(typescript@5.4.5) + deepmerge: 4.3.1 + fs-extra: 10.1.0 + memfs: 3.5.3 + minimatch: 3.1.2 + node-abort-controller: 3.1.1 + schema-utils: 3.3.0 + semver: 7.6.3 + tapable: 2.2.1 + typescript: 5.4.5 + webpack: 5.95.0(@swc/core@1.3.78(@swc/helpers@0.5.11))(esbuild@0.21.1) + form-data-encoder@2.1.4: {} form-data@3.0.2: @@ -32988,6 +33089,12 @@ snapshots: fs-constants@1.0.0: {} + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + fs-extra@11.2.0: dependencies: graceful-fs: 4.2.11 @@ -33035,19 +33142,14 @@ snapshots: function-bind@1.1.2: {} - function.prototype.name@1.1.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.22.1 - functions-have-names: 1.2.3 - - function.prototype.name@1.1.6: + function.prototype.name@1.1.8: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 define-properties: 1.2.1 - es-abstract: 1.22.3 functions-have-names: 1.2.3 + hasown: 2.0.2 + is-callable: 1.2.7 functions-have-names@1.2.3: {} @@ -33090,13 +33192,18 @@ snapshots: has-proto: 1.0.1 has-symbols: 1.0.3 - get-intrinsic@1.2.4: + get-intrinsic@1.2.6: dependencies: + call-bind-apply-helpers: 1.0.1 + dunder-proto: 1.0.1 + es-define-property: 1.0.1 es-errors: 1.3.0 + es-object-atoms: 1.0.0 function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 + gopd: 1.2.0 + has-symbols: 1.1.0 hasown: 2.0.2 + math-intrinsics: 1.1.0 get-nonce@1.0.1: {} @@ -33121,16 +33228,11 @@ snapshots: '@sec-ant/readable-stream': 0.4.1 is-stream: 4.0.1 - get-symbol-description@1.0.0: + get-symbol-description@1.1.0: dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - - get-symbol-description@1.0.2: - dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.6 get-tsconfig@4.7.2: dependencies: @@ -33213,21 +33315,17 @@ snapshots: globals@11.12.0: {} - globalthis@1.0.3: - dependencies: - define-properties: 1.2.1 - globalthis@1.0.4: dependencies: define-properties: 1.2.1 - gopd: 1.0.1 + gopd: 1.2.0 globby@11.1.0: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.0 + ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 @@ -33274,9 +33372,7 @@ snapshots: - encoding - supports-color - gopd@1.0.1: - dependencies: - get-intrinsic: 1.2.4 + gopd@1.2.0: {} got@12.6.1: dependencies: @@ -33353,31 +33449,23 @@ snapshots: has-own-prop@2.0.0: {} - has-property-descriptors@1.0.0: - dependencies: - get-intrinsic: 1.2.1 - - has-property-descriptors@1.0.1: - dependencies: - get-intrinsic: 1.2.4 - has-property-descriptors@1.0.2: dependencies: - es-define-property: 1.0.0 + es-define-property: 1.0.1 has-proto@1.0.1: {} - has-proto@1.0.3: {} + has-proto@1.2.0: + dependencies: + dunder-proto: 1.0.1 has-symbols@1.0.3: {} - has-tostringtag@1.0.0: - dependencies: - has-symbols: 1.0.3 + has-symbols@1.1.0: {} has-tostringtag@1.0.2: dependencies: - has-symbols: 1.0.3 + has-symbols: 1.1.0 has-yarn@3.0.0: {} @@ -33754,8 +33842,6 @@ snapshots: ieee754@1.2.1: {} - ignore@5.3.0: {} - ignore@5.3.1: {} image-size@1.1.1: @@ -33853,23 +33939,11 @@ snapshots: default-gateway: 4.2.0 ipaddr.js: 1.9.1 - internal-slot@1.0.5: - dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - side-channel: 1.0.4 - - internal-slot@1.0.6: - dependencies: - get-intrinsic: 1.2.4 - hasown: 2.0.2 - side-channel: 1.0.4 - - internal-slot@1.0.7: + internal-slot@1.1.0: dependencies: es-errors: 1.3.0 hasown: 2.0.2 - side-channel: 1.0.6 + side-channel: 1.1.0 interpret@1.4.0: {} @@ -33926,25 +34000,24 @@ snapshots: is-arguments@1.1.1: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 has-tostringtag: 1.0.2 - is-array-buffer@3.0.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - is-typed-array: 1.1.13 - - is-array-buffer@3.0.4: + is-array-buffer@3.0.5: dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.8 + call-bound: 1.0.3 + get-intrinsic: 1.2.6 is-arrayish@0.2.1: {} is-arrayish@0.3.2: {} - is-bigint@1.0.4: + is-async-function@2.0.0: + dependencies: + has-tostringtag: 1.0.2 + + is-bigint@1.1.0: dependencies: has-bigints: 1.0.2 @@ -33952,9 +34025,9 @@ snapshots: dependencies: binary-extensions: 2.2.0 - is-boolean-object@1.1.2: + is-boolean-object@1.2.1: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 has-tostringtag: 1.0.2 is-buffer@1.1.6: {} @@ -33973,13 +34046,16 @@ snapshots: dependencies: hasown: 2.0.0 - is-data-view@1.0.1: + is-data-view@1.0.2: dependencies: - is-typed-array: 1.1.13 + call-bound: 1.0.3 + get-intrinsic: 1.2.6 + is-typed-array: 1.1.15 - is-date-object@1.0.5: + is-date-object@1.1.0: dependencies: - has-tostringtag: 1.0.0 + call-bound: 1.0.3 + has-tostringtag: 1.0.2 is-decimal@2.0.1: {} @@ -33995,6 +34071,10 @@ snapshots: is-extglob@2.1.1: {} + is-finalizationregistry@1.1.1: + dependencies: + call-bound: 1.0.3 + is-fullwidth-code-point@2.0.0: {} is-fullwidth-code-point@3.0.0: {} @@ -34038,19 +34118,18 @@ snapshots: dependencies: is-glob: 2.0.1 + is-map@2.0.3: {} + is-nan@1.3.2: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 - is-negative-zero@2.0.2: {} - - is-negative-zero@2.0.3: {} - is-npm@6.0.0: {} - is-number-object@1.0.7: + is-number-object@1.1.1: dependencies: + call-bound: 1.0.3 has-tostringtag: 1.0.2 is-number@7.0.0: {} @@ -34082,22 +34161,22 @@ snapshots: dependencies: '@types/estree': 1.0.5 - is-regex@1.1.4: + is-regex@1.2.1: dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.0 + call-bound: 1.0.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 is-regexp@1.0.0: {} is-root@2.1.0: {} - is-shared-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.7 + is-set@2.0.3: {} - is-shared-array-buffer@1.0.3: + is-shared-array-buffer@1.0.4: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 is-stream@1.1.0: {} @@ -34107,29 +34186,32 @@ snapshots: is-stream@4.0.1: {} - is-string@1.0.7: + is-string@1.1.1: dependencies: - has-tostringtag: 1.0.0 + call-bound: 1.0.3 + has-tostringtag: 1.0.2 is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 - is-symbol@1.0.4: + is-symbol@1.1.1: dependencies: - has-symbols: 1.0.3 + call-bound: 1.0.3 + has-symbols: 1.1.0 + safe-regex-test: 1.1.0 is-text-path@2.0.0: dependencies: text-extensions: 2.4.0 - is-typed-array@1.1.12: + is-typed-array@1.1.13: dependencies: which-typed-array: 1.1.15 - is-typed-array@1.1.13: + is-typed-array@1.1.15: dependencies: - which-typed-array: 1.1.15 + which-typed-array: 1.1.18 is-typedarray@1.0.0: {} @@ -34141,9 +34223,16 @@ snapshots: dependencies: is-invalid-path: 0.1.0 - is-weakref@1.0.2: + is-weakmap@2.0.2: {} + + is-weakref@1.1.0: + dependencies: + call-bound: 1.0.3 + + is-weakset@2.0.4: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 + get-intrinsic: 1.2.6 is-windows@1.0.2: {} @@ -34374,7 +34463,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.6 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -34415,12 +34504,12 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.25.7 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.2 chalk: 4.1.2 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 @@ -34428,7 +34517,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.6 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -34530,7 +34619,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.11 + '@types/node': 22.7.6 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -34564,7 +34653,7 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 20.12.11 + '@types/node': 22.7.6 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -34601,6 +34690,8 @@ snapshots: joycon@3.1.1: {} + js-base64@3.7.7: {} + js-cookie@3.0.5: {} js-sha3@0.5.7: {} @@ -35219,7 +35310,7 @@ snapshots: lower-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.8.0 lowercase-keys@3.0.0: {} @@ -35293,6 +35384,8 @@ snapshots: marky@1.2.5: {} + math-intrinsics@1.1.0: {} + md5-file@3.2.3: dependencies: buffer-alloc: 1.2.0 @@ -35586,6 +35679,21 @@ snapshots: - supports-color - utf-8-validate + metro-config@0.80.12(bufferutil@4.0.8)(utf-8-validate@6.0.3): + dependencies: + connect: 3.7.0 + cosmiconfig: 5.2.1 + flow-enums-runtime: 0.0.6 + jest-validate: 29.7.0 + metro: 0.80.12(bufferutil@4.0.8)(utf-8-validate@6.0.3) + metro-cache: 0.80.12 + metro-core: 0.80.12 + metro-runtime: 0.80.12 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + metro-core@0.80.12: dependencies: flow-enums-runtime: 0.0.6 @@ -35777,7 +35885,7 @@ snapshots: metro-babel-transformer: 0.80.12 metro-cache: 0.80.12 metro-cache-key: 0.80.12 - metro-config: 0.80.12(bufferutil@4.0.8) + metro-config: 0.80.12(bufferutil@4.0.8)(utf-8-validate@6.0.3) metro-core: 0.80.12 metro-file-map: 0.80.12 metro-resolver: 0.80.12 @@ -36317,8 +36425,6 @@ snapshots: nanoassert@2.0.0: {} - nanoid@3.3.6: {} - nanoid@3.3.7: {} napi-build-utils@1.0.2: {} @@ -36620,18 +36726,16 @@ snapshots: object-inspect@1.12.3: {} - object-inspect@1.13.1: {} - - object-inspect@1.13.2: {} + object-inspect@1.13.3: {} object-is@1.1.5: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 object-is@1.1.6: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 object-keys@1.1.1: {} @@ -36642,9 +36746,18 @@ snapshots: object.assign@4.1.5: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 - has-symbols: 1.0.3 + has-symbols: 1.1.0 + object-keys: 1.1.1 + + object.assign@4.1.7: + dependencies: + call-bind: 1.0.8 + call-bound: 1.0.3 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + has-symbols: 1.1.0 object-keys: 1.1.1 obuf@1.1.2: {} @@ -37375,7 +37488,7 @@ snapshots: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 18.2.0 + react-is: 18.3.1 pretty-ms@9.0.0: dependencies: @@ -37481,7 +37594,7 @@ snapshots: pvtsutils@1.3.3: dependencies: - tslib: 2.6.2 + tslib: 2.8.0 pvtsutils@1.3.5: dependencies: @@ -37512,7 +37625,7 @@ snapshots: qs@6.11.0: dependencies: - side-channel: 1.0.6 + side-channel: 1.1.0 qs@6.11.2: dependencies: @@ -37520,7 +37633,7 @@ snapshots: qs@6.13.0: dependencies: - side-channel: 1.0.6 + side-channel: 1.1.0 query-string@7.1.3: dependencies: @@ -37679,8 +37792,6 @@ snapshots: react-is@17.0.2: {} - react-is@18.2.0: {} - react-is@18.3.1: {} react-json-view-lite@1.4.0(react@18.3.1): @@ -38021,6 +38132,17 @@ snapshots: reflect-metadata@0.2.1: {} + reflect.getprototypeof@1.0.9: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + dunder-proto: 1.0.1 + es-abstract: 1.23.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.6 + gopd: 1.2.0 + which-builtin-type: 1.2.1 + regenerate-unicode-properties@10.1.1: dependencies: regenerate: 1.4.2 @@ -38041,21 +38163,9 @@ snapshots: dependencies: '@babel/runtime': 7.23.2 - regexp.prototype.flags@1.5.0: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.0 - functions-have-names: 1.2.3 - - regexp.prototype.flags@1.5.1: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - set-function-name: 2.0.1 - regexp.prototype.flags@1.5.3: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 es-errors: 1.3.0 set-function-name: 2.0.2 @@ -38366,42 +38476,23 @@ snapshots: safari-14-idb-fix@3.0.0: {} - safe-array-concat@1.0.0: + safe-array-concat@1.1.3: dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - isarray: 2.0.5 - - safe-array-concat@1.0.1: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - isarray: 2.0.5 - - safe-array-concat@1.1.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 + call-bind: 1.0.8 + call-bound: 1.0.3 + get-intrinsic: 1.2.6 + has-symbols: 1.1.0 isarray: 2.0.5 safe-buffer@5.1.2: {} safe-buffer@5.2.1: {} - safe-regex-test@1.0.0: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - is-regex: 1.1.4 - - safe-regex-test@1.0.3: + safe-regex-test@1.1.0: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 es-errors: 1.3.0 - is-regex: 1.1.4 + is-regex: 1.2.1 safe-stable-stringify@2.4.3: {} @@ -38629,14 +38720,8 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - - set-function-name@2.0.1: - dependencies: - define-data-property: 1.1.4 - functions-have-names: 1.2.3 + get-intrinsic: 1.2.6 + gopd: 1.2.0 has-property-descriptors: 1.0.2 set-function-name@2.0.2: @@ -38713,18 +38798,39 @@ snapshots: interpret: 1.4.0 rechoir: 0.6.2 + side-channel-list@1.0.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.3 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.6 + object-inspect: 1.13.3 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.6 + object-inspect: 1.13.3 + side-channel-map: 1.0.1 + side-channel@1.0.4: dependencies: call-bind: 1.0.2 get-intrinsic: 1.2.1 object-inspect: 1.12.3 - side-channel@1.0.6: + side-channel@1.1.0: dependencies: - call-bind: 1.0.7 es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.1 + object-inspect: 1.13.3 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 siginfo@2.0.0: {} @@ -38968,7 +39074,7 @@ snapshots: static-eval@2.0.2: dependencies: - escodegen: 1.14.3 + escodegen: 1.14.3(patch_hash=cjgud6rxwgski5d74mndio3lhe) statuses@1.5.0: {} @@ -39039,69 +39145,42 @@ snapshots: string.prototype.codepointat@0.2.1: {} - string.prototype.matchall@4.0.8: + string.prototype.matchall@4.0.12: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - get-intrinsic: 1.2.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - regexp.prototype.flags: 1.5.0 - side-channel: 1.0.4 - - string.prototype.trim@1.2.7: - dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 define-properties: 1.2.1 - es-abstract: 1.22.1 - - string.prototype.trim@1.2.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.22.3 - - string.prototype.trim@1.2.9: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.7 + es-errors: 1.3.0 es-object-atoms: 1.0.0 + get-intrinsic: 1.2.6 + gopd: 1.2.0 + has-symbols: 1.1.0 + internal-slot: 1.1.0 + regexp.prototype.flags: 1.5.3 + set-function-name: 2.0.2 + side-channel: 1.1.0 - string.prototype.trimend@1.0.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.22.1 - - string.prototype.trimend@1.0.7: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.22.3 - - string.prototype.trimend@1.0.8: + string.prototype.trim@1.2.10: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + define-data-property: 1.1.4 define-properties: 1.2.1 + es-abstract: 1.23.7 es-object-atoms: 1.0.0 + has-property-descriptors: 1.0.2 - string.prototype.trimstart@1.0.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.22.1 - - string.prototype.trimstart@1.0.7: + string.prototype.trimend@1.0.9: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-object-atoms: 1.0.0 string.prototype.trimstart@1.0.8: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 es-object-atoms: 1.0.0 @@ -39562,9 +39641,9 @@ snapshots: traverse@0.6.10: dependencies: - gopd: 1.0.1 + gopd: 1.2.0 typedarray.prototype.slice: 1.0.3 - which-typed-array: 1.1.15 + which-typed-array: 1.1.18 tree-kill@1.2.2: {} @@ -39736,64 +39815,38 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 - typed-array-buffer@1.0.0: + typed-array-buffer@1.0.3: dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - is-typed-array: 1.1.13 - - typed-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 es-errors: 1.3.0 - is-typed-array: 1.1.13 + is-typed-array: 1.1.15 - typed-array-byte-length@1.0.0: + typed-array-byte-length@1.0.3: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 for-each: 0.3.3 - has-proto: 1.0.1 - is-typed-array: 1.1.13 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 - typed-array-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-byte-offset@1.0.0: - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.7 - for-each: 0.3.3 - has-proto: 1.0.1 - is-typed-array: 1.1.13 - - typed-array-byte-offset@1.0.2: + typed-array-byte-offset@1.0.4: dependencies: available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-length@1.0.4: - dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 for-each: 0.3.3 - is-typed-array: 1.1.13 + gopd: 1.2.0 + has-proto: 1.2.0 + is-typed-array: 1.1.15 + reflect.getprototypeof: 1.0.9 - typed-array-length@1.0.6: + typed-array-length@1.0.7: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 + gopd: 1.2.0 + is-typed-array: 1.1.15 possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.9 typedarray-to-buffer@3.1.5: dependencies: @@ -39801,12 +39854,12 @@ snapshots: typedarray.prototype.slice@1.0.3: dependencies: - call-bind: 1.0.7 + call-bind: 1.0.8 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.7 es-errors: 1.3.0 - typed-array-buffer: 1.0.2 - typed-array-byte-offset: 1.0.2 + typed-array-buffer: 1.0.3 + typed-array-byte-offset: 1.0.4 typedarray@0.0.6: {} @@ -39876,12 +39929,12 @@ snapshots: umd@3.0.3: {} - unbox-primitive@1.0.2: + unbox-primitive@1.1.0: dependencies: - call-bind: 1.0.7 + call-bound: 1.0.3 has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 + has-symbols: 1.1.0 + which-boxed-primitive: 1.1.1 uncrypto@0.1.3: {} @@ -40016,7 +40069,7 @@ snapshots: destr: 2.0.3 h3: 1.11.1 listhen: 1.7.2 - lru-cache: 10.2.2 + lru-cache: 10.4.3 mri: 1.2.0 node-fetch-native: 1.6.4 ofetch: 1.3.4 @@ -40441,7 +40494,7 @@ snapshots: '@peculiar/json-schema': 1.1.12 asn1js: 3.0.5 pvtsutils: 1.3.3 - tslib: 2.6.2 + tslib: 2.8.0 webcrypto-core@1.7.9: dependencies: @@ -40704,13 +40757,36 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 - which-boxed-primitive@1.0.2: + which-boxed-primitive@1.1.1: + dependencies: + is-bigint: 1.1.0 + is-boolean-object: 1.2.1 + is-number-object: 1.1.1 + is-string: 1.1.1 + is-symbol: 1.1.1 + + which-builtin-type@1.2.1: + dependencies: + call-bound: 1.0.3 + function.prototype.name: 1.1.8 + has-tostringtag: 1.0.2 + is-async-function: 2.0.0 + is-date-object: 1.1.0 + is-finalizationregistry: 1.1.1 + is-generator-function: 1.0.10 + is-regex: 1.2.1 + is-weakref: 1.1.0 + isarray: 2.0.5 + which-boxed-primitive: 1.1.1 + which-collection: 1.0.2 + which-typed-array: 1.1.18 + + which-collection@1.0.2: dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 + is-map: 2.0.3 + is-set: 2.0.3 + is-weakmap: 2.0.2 + is-weakset: 2.0.4 which-module@2.0.1: {} @@ -40719,20 +40795,21 @@ snapshots: load-yaml-file: 0.2.0 path-exists: 4.0.0 - which-typed-array@1.1.11: + which-typed-array@1.1.15: dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.7 + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 + gopd: 1.2.0 + has-tostringtag: 1.0.2 - which-typed-array@1.1.15: + which-typed-array@1.1.18: dependencies: available-typed-arrays: 1.0.7 - call-bind: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 for-each: 0.3.3 - gopd: 1.0.1 + gopd: 1.2.0 has-tostringtag: 1.0.2 which@1.3.1: