diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz new file mode 100644 index 0000000000..919851823d Binary files /dev/null and b/.yarn/install-state.gz differ diff --git a/README.md b/README.md index ef84490d98..dbf84f0b3a 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,24 @@ # This is V4; try V5! -You're looking at the README for **PostGraphile V4** — stable but feature-frozen. +You're looking at the README for **PostGraphile V4** — stable but +feature-frozen. -**PostGraphile V5 beta** is nearing completion and has [frequent releases](https://www.npmjs.com/package/postgraphile?activeTab=versions)! +**PostGraphile V5 beta** is nearing completion and has +[frequent releases](https://www.npmjs.com/package/postgraphile?activeTab=versions)! **Production-ready** and already powering many apps, V5 is a complete ground-up -rewrite powered by [Grafast](https://grafast.org), our cutting-edge planning -and execution engine for GraphQL. It dramatically reduces Postgres load, -supports true polymorphism, and introduces incremental delivery, executable -schema exports, greater control over your schema, and much more. Its efficient -and ergonomic extensibility guides you into the pit of success. It even -introduces an "eject button" for when you feel the need to move beyond an -autogenerated schema! - -V5 remains in "beta" while we finalize the APIs, so minor adjustments may -be needed between updates. Postgres-centric users who leverage [trusted -documents](https://benjie.dev/graphql/trusted-documents) (highly recommended!) -should experience particularly smooth sailing! +rewrite powered by [Grafast](https://grafast.org), our cutting-edge planning and +execution engine for GraphQL. It dramatically reduces Postgres load, supports +true polymorphism, and introduces incremental delivery, executable schema +exports, greater control over your schema, and much more. Its efficient and +ergonomic extensibility guides you into the pit of success. It even introduces +an "eject button" for when you feel the need to move beyond an autogenerated +schema! + +V5 remains in "beta" while we finalize the APIs, so minor adjustments may be +needed between updates. Postgres-centric users who leverage +[trusted documents](https://benjie.dev/graphql/trusted-documents) (highly +recommended!) should experience particularly smooth sailing! - [**→ V5 status page**](https://postgraphile.org/v5beta) - [**Overview of new features**](https://postgraphile.org/postgraphile/5/migrating-from-v4/v5-new-feature-summary) @@ -169,8 +171,8 @@ yarn add postgraphile ``` ```js -import { createServer } from 'http'; -import postgraphile from 'postgraphile'; +import { createServer } from "http"; +import postgraphile from "postgraphile"; createServer(postgraphile()); ``` @@ -228,8 +230,10 @@ PostGraphile features include: - [Just use the generated GraphQL schema](https://www.graphile.org/postgraphile/usage-schema/) [procedure documentation]: https://www.graphile.org/postgraphile/procedures/ -[advanced queries documentation]: https://www.graphile.org/postgraphile/custom-queries/ -[row-level-security]: http://www.postgresql.org/docs/current/static/ddl-rowsecurity.html +[advanced queries documentation]: + https://www.graphile.org/postgraphile/custom-queries/ +[row-level-security]: + http://www.postgresql.org/docs/current/static/ddl-rowsecurity.html ## Requirements diff --git a/SPONSORS.md b/SPONSORS.md index 4907e5d5d7..24f2023e8c 100644 --- a/SPONSORS.md +++ b/SPONSORS.md @@ -12,17 +12,17 @@ Graphile ecosystem. Find out ## Leaders - Robert Claypool -- Principia Mentis - nigelrmtaylor +- Principia Mentis - Trigger.dev - Axinom - Taiste - BairesDev -- Cintra - Two Bit Solutions +- Apollo - Dimply - Ndustrial -- Apollo +- Cintra - Beacon - deliver.media - Ravio @@ -41,12 +41,12 @@ Graphile ecosystem. Find out - nullachtvierzehn - Zymego - garpulon +- Vizcom - Ether -- Nate Smith - The Outbound Collective - Charlie Hadden -- Vizcom - Kiron Open Higher Education +- Nate Smith - Andrew Joseph - SIED 70 - TE 70 - Peter C. Romano @@ -58,3 +58,4 @@ Graphile ecosystem. Find out - Jody Hoon-Starr - Justin Carrus - WorkOS +- Malachi Bergman diff --git a/grafast/bench/dist/cli-run.d.ts b/grafast/bench/dist/cli-run.d.ts new file mode 100644 index 0000000000..8ab5c6995f --- /dev/null +++ b/grafast/bench/dist/cli-run.d.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +export {}; +//# sourceMappingURL=cli-run.d.ts.map \ No newline at end of file diff --git a/grafast/bench/dist/cli-run.d.ts.map b/grafast/bench/dist/cli-run.d.ts.map new file mode 100644 index 0000000000..e4878946a2 --- /dev/null +++ b/grafast/bench/dist/cli-run.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cli-run.d.ts","sourceRoot":"","sources":["../src/cli-run.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/bench/dist/cli-run.js b/grafast/bench/dist/cli-run.js new file mode 100644 index 0000000000..3f19b1caf8 --- /dev/null +++ b/grafast/bench/dist/cli-run.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const cli_1 = require("graphile-config/cli"); +const cli_js_1 = require("./cli.js"); +(0, cli_1.runCli)(cli_js_1.options, cli_js_1.run); +//# sourceMappingURL=cli-run.js.map \ No newline at end of file diff --git a/grafast/bench/dist/cli-run.js.map b/grafast/bench/dist/cli-run.js.map new file mode 100644 index 0000000000..1d291e912e --- /dev/null +++ b/grafast/bench/dist/cli-run.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cli-run.js","sourceRoot":"","sources":["../src/cli-run.ts"],"names":[],"mappings":";;;AACA,6CAA6C;AAE7C,qCAAwC;AAExC,IAAA,YAAM,EAAC,gBAAO,EAAE,YAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/bench/dist/cli.d.ts b/grafast/bench/dist/cli.d.ts new file mode 100644 index 0000000000..d7ad3e48b3 --- /dev/null +++ b/grafast/bench/dist/cli.d.ts @@ -0,0 +1,10 @@ +import type { ArgsFromOptions, Argv } from "graphile-config/cli"; +export declare function options(yargs: Argv): Argv<{ + schema: string | undefined; +} & { + operations: string | undefined; +} & { + config: string | undefined; +}>; +export declare function run(args: ArgsFromOptions): Promise; +//# sourceMappingURL=cli.d.ts.map \ No newline at end of file diff --git a/grafast/bench/dist/cli.d.ts.map b/grafast/bench/dist/cli.d.ts.map new file mode 100644 index 0000000000..fcf98f9749 --- /dev/null +++ b/grafast/bench/dist/cli.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAMjE,wBAAgB,OAAO,CAAC,KAAK,EAAE,IAAI;;;;;;GAmBlC;AAuBD,wBAAsB,GAAG,CAAC,IAAI,EAAE,eAAe,CAAC,OAAO,OAAO,CAAC,iBAoC9D"} \ No newline at end of file diff --git a/grafast/bench/dist/cli.js b/grafast/bench/dist/cli.js new file mode 100644 index 0000000000..fee099ac64 --- /dev/null +++ b/grafast/bench/dist/cli.js @@ -0,0 +1,78 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.options = options; +exports.run = run; +const tslib_1 = require("tslib"); +const fsp = tslib_1.__importStar(require("node:fs/promises")); +const path = tslib_1.__importStar(require("node:path")); +const node_url_1 = require("node:url"); +const glob_1 = require("glob"); +const graphql_1 = require("grafast/graphql"); +const graphile_config_1 = require("graphile-config"); +const load_1 = require("graphile-config/load"); +const index_js_1 = require("./index.js"); +function options(yargs) { + return yargs + .usage("$0", "Benchmark a Grafast schema") + .option("schema", { + alias: "s", + type: "string", + description: "path to the GraphQL schema", + }) + .option("operations", { + alias: "o", + type: "string", + description: "glob pattern for the operations to test", + }) + .option("config", { + alias: "C", + type: "string", + description: "The path to the graphile.config.mjs (or similar) file", + normalize: true, + }); +} +async function configFromArgs(args) { + const { schema, operations, config: configFileLocation } = args; + const userPreset = await (0, load_1.loadConfig)(configFileLocation); + const preset = { + extends: [...(userPreset ? [userPreset] : [])], + bench: {}, + }; + if (schema) { + preset.bench.schema = schema; + } + if (operations !== undefined) { + preset.bench.operations = operations; + } + const config = (0, graphile_config_1.resolvePreset)(preset); + return config; +} +async function run(args) { + const config = await configFromArgs(args); + const { schema: schemaFile = "schema.mjs", operations: operationsGlob = "queries/*.graphql", } = config.bench ?? {}; + const mod = await import((0, node_url_1.pathToFileURL)(schemaFile).href); + const schema = (0, graphql_1.isSchema)(mod.default) + ? mod.default + : (0, graphql_1.isSchema)(mod.schema) + ? mod.schema + : (0, graphql_1.isSchema)(mod) + ? mod + : (0, graphql_1.isSchema)(mod.default.default) + ? mod.default.default + : (0, graphql_1.isSchema)(mod.default.schema) + ? mod.default.schema + : null; + if (!schema) { + throw new Error(`Could not find a schema exported from that file - please export the schema as 'schema' or 'default'. Exports: ${Object.keys(mod)}`); + } + const operationFiles = await (0, glob_1.glob)(operationsGlob); + operationFiles.sort(); + const operations = await Promise.all(operationFiles.map(async (f) => { + return { + name: path.basename(path.dirname(f)) + "/" + path.basename(f), + source: await fsp.readFile(f, "utf8"), + }; + })); + await (0, index_js_1.bench)(schema, operations, config.bench ?? {}); +} +//# sourceMappingURL=cli.js.map \ No newline at end of file diff --git a/grafast/bench/dist/cli.js.map b/grafast/bench/dist/cli.js.map new file mode 100644 index 0000000000..3901cae5d6 --- /dev/null +++ b/grafast/bench/dist/cli.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAaA,0BAmBC;AAuBD,kBAoCC;;AA3FD,8DAAwC;AACxC,wDAAkC;AAClC,uCAAyC;AAEzC,+BAA4B;AAC5B,6CAA2C;AAC3C,qDAAgD;AAEhD,+CAAkD;AAGlD,yCAAmC;AAEnC,SAAgB,OAAO,CAAC,KAAW;IACjC,OAAO,KAAK;SACT,KAAK,CAAC,IAAI,EAAE,4BAA4B,CAAC;SACzC,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4BAA4B;KAC1C,CAAC;SACD,MAAM,CAAC,YAAY,EAAE;QACpB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,yCAAyC;KACvD,CAAC;SACD,MAAM,CAAC,QAAQ,EAAE;QAChB,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uDAAuD;QACpE,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;AACP,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,IAAqC;IACjE,MAAM,EAAE,MAAM,EAAE,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AA,kBAAQ,EAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;oBAC7B,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;oBACrB,CAAC,CAAC,IAAA,kBAAQ,EAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC;wBAC5B,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM;wBACpB,CAAC,CAAC,IAAI,CAAC;IACjB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,iHAAiH,MAAM,CAAC,IAAI,CAC1H,GAAG,CACJ,EAAE,CACJ,CAAC;IACJ,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,IAAA,WAAI,EAAC,cAAc,CAAC,CAAC;IAClD,cAAc,CAAC,IAAI,EAAE,CAAC;IACtB,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAClC,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAC7B,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC7D,MAAM,EAAE,MAAM,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;SACtC,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;IACF,MAAM,IAAA,gBAAK,EAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/grafast/bench/dist/index.d.ts b/grafast/bench/dist/index.d.ts new file mode 100644 index 0000000000..e9c19a6ee2 --- /dev/null +++ b/grafast/bench/dist/index.d.ts @@ -0,0 +1,9 @@ +import type { GraphQLSchema } from "grafast/graphql"; +import type { BenchOperation, GrafastBenchSetupResult } from "./interfaces.js"; +export { GrafastBenchConfig } from "./interfaces.js"; +export declare function bench(schema: GraphQLSchema, operations: BenchOperation[], options: { + setup?: () => Promise | GrafastBenchSetupResult; + teardown?: (setupResult: GrafastBenchSetupResult) => void | Promise; + contextFactory?: (operation: BenchOperation, setupResult: GrafastBenchSetupResult) => object; +}): Promise; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/bench/dist/index.d.ts.map b/grafast/bench/dist/index.d.ts.map new file mode 100644 index 0000000000..11770eacc2 --- /dev/null +++ b/grafast/bench/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAgBrD,wBAAsB,KAAK,CACzB,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,cAAc,EAAE,EAC5B,OAAO,EAAE;IACP,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,uBAAuB,CAAC,GAAG,uBAAuB,CAAC;IACzE,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,uBAAuB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,cAAc,CAAC,EAAE,CACf,SAAS,EAAE,cAAc,EACzB,WAAW,EAAE,uBAAuB,KACjC,MAAM,CAAC;CACb,iBAoIF"} \ No newline at end of file diff --git a/grafast/bench/dist/index.js b/grafast/bench/dist/index.js new file mode 100644 index 0000000000..d7cd2a2d3c --- /dev/null +++ b/grafast/bench/dist/index.js @@ -0,0 +1,132 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bench = bench; +const tslib_1 = require("tslib"); +const node_stream_1 = require("node:stream"); +const grafast_1 = require("grafast"); +const graphql_1 = require("grafast/graphql"); +const json5_1 = tslib_1.__importDefault(require("json5")); +const grafastMetricsEmitter = new node_stream_1.EventEmitter(); +async function bench(schema, operations, options) { + const { setup = () => ({}), teardown = () => { }, contextFactory = () => ({}), } = options; + const runs = Object.create(null); + for (const operation of operations) { + runs[operation.name] = []; + } + const setupResult = await setup(); + try { + for (let i = 0; i < 200; i++) { + for (const operation of operations) { + const document = (0, graphql_1.parse)(operation.source); + const errors = (0, graphql_1.validate)(schema, document); + if (errors.length !== 0) { + throw errors[0]; + } + const errorsAllowed = !/expect\(errors\)\.toBeFalsy\(\)/.test(operation.source); + const variableValuesMatch = operation.source.match(/^#> variableValues: ([^\n]+)$/m); + const variableValues = variableValuesMatch + ? json5_1.default.parse(variableValuesMatch[1]) + : {}; + const checkForErrors = (result) => { + if (result.errors !== undefined) { + throw new Error(result.errors[0].message); + } + }; + const timing = { + run: i, + elapsed: 0, + }; + const onPlan = (event) => { + timing.planning = event.elapsed; + timing.laps = event.laps; + }; + grafastMetricsEmitter.on("plan", onPlan); + const start = performance.now(); + const result = await (0, grafast_1.execute)({ + schema, + document, + contextValue: { + ...contextFactory(operation, setupResult), + grafastMetricsEmitter, + }, + variableValues, + }); + const payloads = []; + if ((0, grafast_1.isAsyncIterable)(result)) { + for await (const payload of result) { + if (!errorsAllowed) + checkForErrors(payload); + payloads.push(payload); + } + } + else { + if (!errorsAllowed) + checkForErrors(result); + payloads.push(result); + } + const finish = performance.now(); + const elapsed = finish - start; + timing.elapsed = elapsed; + grafastMetricsEmitter.off("plan", onPlan); + runs[operation.name].push(timing); + // console.log(operation.name); + // console.log(JSON.stringify(payloads, null, 2)); + } + } + const extraTotal = Object.create(null); + let planningTotal = 0; + let executionTotal = 0; + const tableData = Object.entries(runs).map(([name, timings]) => { + const focus = timings[timings.length - 1]; + const planning = focus.planning; + let min = Infinity; + let max = 0; + // let sum = 0; + const laps = focus.laps; + for (const timing of timings) { + const { elapsed } = timing; + if (elapsed < min) + min = elapsed; + if (elapsed > max) + max = elapsed; + // sum += elapsed; + } + planningTotal += planning; + executionTotal += focus.elapsed; + const extra = laps.reduce((memo, l) => { + memo[l.category] = (memo[l.category] ?? 0) + l.elapsed; + extraTotal[l.category] = (extraTotal[l.category] ?? 0) + l.elapsed; + return memo; + }, Object.create(null)); + return { + name, + planning, + min, + max, + //avg: sum / times.length, + ...extra, + }; + }); + tableData.push({ + name: "TOTAL", + planning: `${planningTotal.toFixed(2)} (${((100 * planningTotal) / + executionTotal).toFixed(1)}%)`, + min: null, + max: null, + ...Object.fromEntries(Object.entries(extraTotal).map(([k, v]) => { + if (typeof v !== "number") { + return [k, v]; + } + else { + return [k, ((100 * v) / planningTotal).toFixed(1) + "%"]; + } + })), + }); + console.table(tableData); + console.dir(tableData[tableData.length - 1]); + } + finally { + await teardown(setupResult); + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/bench/dist/index.js.map b/grafast/bench/dist/index.js.map new file mode 100644 index 0000000000..0701596a29 --- /dev/null +++ b/grafast/bench/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AA4BA,sBA8IC;;AA1KD,6CAA2C;AAE3C,qCAAmD;AAMnD,6CAAkD;AAClD,0DAA0B;AAK1B,MAAM,qBAAqB,GAAG,IAAI,0BAAY,EAAE,CAAC;AAc1C,KAAK,UAAU,KAAK,CACzB,MAAqB,EACrB,UAA4B,EAC5B,OAOC;IAED,MAAM,EACJ,KAAK,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,CAAQ,EACzB,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,EACnB,cAAc,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,GAC5B,GAAG,OAAO,CAAC;IACZ,MAAM,IAAI,GAA6B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3D,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAA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,IAAI,CAAC,CAAC,CAAC;YACxB,OAAO;gBACL,IAAI;gBACJ,QAAQ;gBACR,GAAG;gBACH,GAAG;gBACH,0BAA0B;gBAC1B,GAAG,KAAK;aACT,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CACxC,CAAC,GAAG,GAAG,aAAa,CAAC;gBACrB,cAAc,CACf,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;YAChB,GAAG,EAAE,IAAI;YACT,GAAG,EAAE,IAAI;YACT,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;gBACxC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;oBAC1B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAChB,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC,CAAC,CACH;SACF,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;YAAS,CAAC;QACT,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/bench/dist/interfaces.d.ts b/grafast/bench/dist/interfaces.d.ts new file mode 100644 index 0000000000..c533a5610f --- /dev/null +++ b/grafast/bench/dist/interfaces.d.ts @@ -0,0 +1,26 @@ +export interface BenchOperation { + name: string; + source: string; +} +export interface GrafastBenchSetupResult { +} +export interface GrafastBenchConfig { + /** Path to a JS file that exports the GraphQL schema to use */ + schema?: string; + /** Glob specifying GraphQL documents to test against the schema */ + operations?: string; + /** Create any helpers, e.g. database connection helpers */ + setup?: () => Promise | GrafastBenchSetupResult; + /** Create any helpers, e.g. database connection helpers */ + teardown?: (setupResult: GrafastBenchSetupResult) => void | Promise; + /** Factory function to get the GraphQL context to use for the operation */ + contextFactory?: (operation: BenchOperation, setupResult: GrafastBenchSetupResult) => object; +} +declare global { + namespace GraphileConfig { + interface Preset { + bench?: GrafastBenchConfig; + } + } +} +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/grafast/bench/dist/interfaces.d.ts.map b/grafast/bench/dist/interfaces.d.ts.map new file mode 100644 index 0000000000..aac649c436 --- /dev/null +++ b/grafast/bench/dist/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,uBAAuB;CAAG;AAC3C,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,uBAAuB,CAAC,GAAG,uBAAuB,CAAC;IACzE,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,uBAAuB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,2EAA2E;IAC3E,cAAc,CAAC,EAAE,CACf,SAAS,EAAE,cAAc,EACzB,WAAW,EAAE,uBAAuB,KACjC,MAAM,CAAC;CACb;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,MAAM;YACd,KAAK,CAAC,EAAE,kBAAkB,CAAC;SAC5B;KACF;CACF"} \ No newline at end of file diff --git a/grafast/bench/dist/interfaces.js b/grafast/bench/dist/interfaces.js new file mode 100644 index 0000000000..db9191150b --- /dev/null +++ b/grafast/bench/dist/interfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/grafast/bench/dist/interfaces.js.map b/grafast/bench/dist/interfaces.js.map new file mode 100644 index 0000000000..8fb5f7d179 --- /dev/null +++ b/grafast/bench/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/bench/tsconfig.build.tsbuildinfo b/grafast/bench/tsconfig.build.tsbuildinfo new file mode 100644 index 0000000000..a26f2ed052 --- /dev/null +++ b/grafast/bench/tsconfig.build.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../utils/graphile-config/dist/cli.d.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../grafast/fwd/graphql/index.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","../../utils/graphile-config/dist/loadconfig.d.ts","../grafast/dist/therecanbeonlyone.d.ts","../../utils/lru/dist/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../grafast/dist/constraints.d.ts","../grafast/dist/bucket.d.ts","../grafast/dist/steps/__item.d.ts","../grafast/dist/steps/__flag.d.ts","../grafast/dist/steps/access.d.ts","../grafast/dist/steps/__value.d.ts","../grafast/dist/steps/listtransform.d.ts","../grafast/dist/steps/connection.d.ts","../grafast/dist/steps/constant.d.ts","../grafast/dist/steps/each.d.ts","../grafast/dist/steps/error.d.ts","../grafast/dist/steps/filter.d.ts","../grafast/dist/steps/first.d.ts","../grafast/dist/steps/groupby.d.ts","../grafast/dist/multistep.d.ts","../grafast/dist/steps/lambda.d.ts","../grafast/dist/steps/last.d.ts","../grafast/dist/steps/list.d.ts","../grafast/dist/steps/listen.d.ts","../grafast/dist/steps/node.d.ts","../grafast/dist/steps/partitionbyindex.d.ts","../grafast/dist/steps/remapkeys.d.ts","../grafast/dist/steps/reverse.d.ts","../grafast/dist/steps/applyinput.d.ts","../grafast/dist/steps/setter.d.ts","../grafast/dist/steps/sideeffect.d.ts","../grafast/dist/steps/__inputlist.d.ts","../grafast/dist/steps/__inputobject.d.ts","../grafast/dist/steps/__inputstaticleaf.d.ts","../grafast/dist/steps/__trackedvalue.d.ts","../grafast/dist/steps/applytransforms.d.ts","../grafast/dist/steps/bakedinput.d.ts","../grafast/dist/steps/condition.d.ts","../grafast/dist/steps/graphqlresolver.d.ts","../grafast/dist/steps/load.d.ts","../grafast/dist/steps/polymorphicbranch.d.ts","../grafast/dist/steps/proxy.d.ts","../grafast/dist/steps/index.d.ts","../grafast/dist/graphqlcollectfields.d.ts","../grafast/dist/engine/executeoutputplan.d.ts","../grafast/dist/engine/outputplan.d.ts","../grafast/dist/engine/operationplan.d.ts","../grafast/dist/step.d.ts","../grafast/dist/engine/layerplan.d.ts","../grafast/dist/error.d.ts","../grafast/dist/steps/__inputdefault.d.ts","../grafast/dist/steps/__inputdynamicscalar.d.ts","../grafast/dist/deferred.d.ts","../grafast/dist/utils.d.ts","../grafast/dist/planjsoninterfaces.d.ts","../grafast/dist/interfaces.d.ts","../grafast/dist/steps/object.d.ts","../grafast/dist/exportas.d.ts","../grafast/dist/grafastprint.d.ts","../grafast/dist/makegrafastschema.d.ts","../grafast/dist/dev.d.ts","../grafast/dist/engine/lib/defaultplanresolver.d.ts","../grafast/dist/engine/lib/withgloballayerplan.d.ts","../grafast/dist/execute.d.ts","../grafast/dist/grafastgraphql.d.ts","../grafast/dist/middleware.d.ts","../grafast/dist/operationplan-input.d.ts","../grafast/dist/polymorphic.d.ts","../grafast/dist/stringifypayload.d.ts","../grafast/dist/stripansi.d.ts","../grafast/dist/subscribe.d.ts","../../node_modules/iterall/index.d.ts","../grafast/dist/args.d.ts","../grafast/dist/version.d.ts","../grafast/dist/index.d.ts","../../node_modules/json5/lib/parse.d.ts","../../node_modules/json5/lib/stringify.d.ts","../../node_modules/json5/lib/index.d.ts","./src/interfaces.ts","./src/index.ts","./src/cli.ts","./src/cli-run.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[88,132],[79,82,88,132,385],[79,82,88,132,146,154,175,196,299,305,306,384],[79,88,132,164,299,379,382,383],[79,88,132],[88,132,298,358,360,379],[88,132,311,350],[88,132,311,346,351,352],[88,132,346,352,360],[88,132,353,379],[88,132,298,310,348,350,353,358,360,379],[88,132,298,308,311,346,349,352,353,358,360,379],[88,132,360],[88,132,201,298,358,360,379],[88,132,311],[88,132,298,347,358,379],[88,132,298,305,307,308,324,346,347,351,352,354,357,358,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379],[88,132,202,298,305,309,310,333,346,347,351,352,353,354,355,356,358,359,379],[88,132,298,346,352,358,360,379],[88,132,305],[88,132,346,352],[88,132,298,346,351,352,358,360,379],[88,132,298,347,351,353,358,360,379],[88,132,312,346,352,360],[88,132,339,346,352,360],[88,132,298,318,346,352,358,360,379],[88,132,298,318,346,352,358,379],[88,132,346,352,360,379],[88,132,298,310,313,314,315,346,352,358,360,379],[88,132,314,346,352,379],[88,132,313,346,352,360],[88,132,298,346,347,352,358,360,379],[88,132,316,346,352,360],[88,132,312,316,317,346,352],[88,132,317,346,352,360],[88,132,298,346,352,358,379],[88,132,316,317,346,352],[88,132,312,313,314,315,316,317,318,319,320,321,322,323,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,361,379],[88,132,324,346,352,360],[88,132,313,318,346,352,360],[88,132,312,317,346,352,360,379],[88,132,313,324,346,352,360,379],[88,132,298,325,346,352,358,360,379],[88,132,318,346,352,360],[88,132,333,379],[88,132,201,298,358,379],[88,132,298,346,351,352,357,358,360,379],[88,132,298,358,379],[88,132,448],[88,132,647],[88,132,615,650],[88,132,615],[88,132,615,616],[88,132,672],[88,132,662,664],[88,132,662,664,665,666,667,668],[88,132,662,664,665],[88,132,662,664,665,666],[88,132,662,664,665,666,667],[88,132,615,622],[88,132,615,625],[88,132,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676],[88,132,615,616,653,654],[88,132,615,616,653],[88,132,615,616,625],[88,132,615,616,625,636],[88,132,538],[88,132,147,182],[88,132,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446],[88,132,390],[88,132,390,394],[88,132,388,390,392],[88,132,388,390],[88,132,390,396],[88,132,389,390],[88,132,401],[88,132,390,407,408,409],[88,132,390,411],[88,132,390,412,413,414,415,416,417,418,419,420,421,422,423,424],[88,132,390,393],[88,132,390,392],[88,132,390,401],[88,132,448,449,450,451,452],[88,132,448,450],[88,132,147,182,454],[88,132,138,182],[88,132,175,182,463],[88,132,147,182,454,468,469],[88,132,455,463,467],[88,132,472,500],[88,132,471,477],[88,132,482],[88,132,477],[88,132,476],[88,132,494],[88,132,490],[88,132,472,489,500],[88,132,471,472,473,474,475,476,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501],[88,132,503],[88,132,506,510],[88,132,506,507,509],[88,132,510],[88,132,505,506,507],[88,132,144,147,182,460,461,462],[88,132,455,461,463,467,512],[88,132,145,182,514,515],[88,132,144,145,182,517],[88,132,145,182],[88,132,520],[88,132,522,528],[88,132,523,524,525,526,527],[88,132,528],[88,132,144,147,149,152,164,175,182],[88,132,182],[88,132,533],[88,132,534],[88,132,540,543],[88,132,145,175,182],[88,132,137,182,503],[88,132,144,182],[88,132,548],[88,131,132,144,147,148,152,159,175,182,387,465,466,469,470,530,547],[88,132,599],[88,132,601,603,604,605,606,607,608,609,610,611,612,613],[88,132,601,602,604,605,606,607,608,609,610,611,612,613],[88,132,602,603,604,605,606,607,608,609,610,611,612,613],[88,132,601,602,603,605,606,607,608,609,610,611,612,613],[88,132,601,602,603,604,606,607,608,609,610,611,612,613],[88,132,601,602,603,604,605,607,608,609,610,611,612,613],[88,132,601,602,603,604,605,606,608,609,610,611,612,613],[88,132,601,602,603,604,605,606,607,609,610,611,612,613],[88,132,601,602,603,604,605,606,607,608,610,611,612,613],[88,132,601,602,603,604,605,606,607,608,609,611,612,613],[88,132,601,602,603,604,605,606,607,608,609,610,612,613],[88,132,601,602,603,604,605,606,607,608,609,610,611,613],[88,132,601,602,603,604,605,606,607,608,609,610,611,612],[88,132,809,810,811,812],[88,132,808],[88,132,182,808],[88,132,808,809,810,811],[88,129,132],[88,131,132],[132],[88,132,137,167],[88,132,133,138,144,145,152,164,175],[88,132,133,134,144,152],[83,84,85,88,132],[88,132,135,176],[88,132,136,137,145,153],[88,132,137,164,172],[88,132,138,140,144,152],[88,131,132,139],[88,132,140,141],[88,132,144],[88,132,142,144],[88,131,132,144],[88,132,144,145,146,164,175],[88,132,144,145,146,160,164,167],[88,127,132,180],[88,132,140,144,147,152,164,175],[88,132,144,145,147,148,152,164,172,175],[88,132,147,149,164,172,175],[86,87,88,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181],[88,132,144,150],[88,132,151,175,180],[88,132,140,144,152,164],[88,99,103,132,175],[88,99,132,164,175],[88,94,132],[88,96,99,132,172,175],[88,132,152,172],[88,94,132,182],[88,96,99,132,152,175],[88,91,92,95,98,132,144,164,175],[88,99,106,132],[88,91,97,132],[88,99,120,121,132],[88,95,99,132,167,175,182],[88,120,132,182],[88,93,94,132,182],[88,99,132],[88,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,121,122,123,124,125,126,132],[88,99,114,132],[88,99,106,107,132],[88,97,99,107,108,132],[88,98,132],[88,91,94,99,132],[88,99,103,107,108,132],[88,103,132],[88,97,99,102,132,175],[88,91,96,99,106,132],[88,132,164],[88,94,99,120,132,180,182],[88,132,153],[88,132,154],[88,131,132,155],[88,129,130,131,132,133,134,135,136,137,138,139,140,141,142,144,145,146,147,148,149,150,151,152,153,154,155,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181],[88,132,158],[88,132,159],[88,132,144,160,161],[88,132,160,162,176,178],[88,132,144,164,165,167],[88,132,166,167],[88,132,164,165],[88,132,167],[88,132,168],[88,129,132,164],[88,132,144,170,171],[88,132,170,171],[88,132,137,152,164,172],[88,132,173],[88,132,152,174],[88,132,147,159,175],[88,132,137,176],[88,132,164,177],[88,132,151,178],[88,132,179],[88,132,137,144,146,155,164,175,178,180],[88,132,164,181],[88,132,144,164,172,182,818,819,822,823],[88,132,830,831],[88,132,830],[88,132,835],[88,132,528,838,839],[88,132,834,920],[88,132,834,921],[88,132,528,838],[88,132,834,837],[88,132,828,833,834],[88,132,147,164,182],[88,132,164,182],[88,132,849,888],[88,132,849,873,888],[88,132,888],[88,132,849],[88,132,849,874,888],[88,132,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887],[88,132,874,888],[88,132,145,164,182,459],[88,132,145,468],[88,132,147,182,460,466],[88,132,895,896],[88,132,506,895],[88,132,506,896],[88,132,679],[88,132,898],[88,132,147,152,182,599],[88,132,182,902,903,904,905,906,907,908,909,910,911,912],[88,132,901,902,911],[88,132,902,911],[88,132,892,901,902,911],[88,132,901,902,903,904,905,906,907,908,909,910,912],[88,132,902],[88,132,137,901,911],[88,132,137,182,598,898,899,900,913],[88,132,144,147,149,152,175,182],[88,132,144,147,149,152,164,172,175,181,182],[80,88,132],[88,132,554,555,559,586,587,589,590,591,593,594],[88,132,552,553],[88,132,552],[88,132,554,594],[88,132,554,555,591,592,594],[88,132,594],[88,132,551,594,595],[88,132,554,555,593,594],[88,132,554,555,557,558,593,594],[88,132,554,555,556,593,594],[88,132,554,555,559,586,587,588,589,590,593,594],[88,132,551,554,555,559,591,593],[88,132,559,594],[88,132,561,562,563,564,565,566,567,568,569,570,594],[88,132,584,594],[88,132,560,571,579,580,581,582,583,585],[88,132,564,594],[88,132,572,573,574,575,576,577,578,594],[88,132,792,793,794,795,796],[88,132,790],[88,132,791,797,798],[88,132,680],[88,132,536,542],[88,132,183,185,189,190,193],[88,132,194],[88,132,185,189,192],[88,132,183,185,189,192,193,194,195],[88,132,189],[88,132,185,189,190,192],[88,132,183,185,190,191,193],[88,132,186,187,188],[88,132,145,154,182,183,184],[88,132,198,199,205,206],[88,132,207,273,274],[88,132,198,205,207],[88,132,199,207],[88,132,198,200,201,202,205,207,210,211],[88,132,200,212,226,227],[88,132,198,205,210,211,212],[88,132,198,202,205,207,209,210,211],[88,132,198,199,210,211,212],[88,132,197,213,218,225,228,229,272,275,297],[88,132,198],[88,132,199,203,204],[88,132,199,203,204,205,206,208,219,220,221,222,223,224],[88,132,199,204,205],[88,132,199],[88,132,198,199,204,205,207,220],[88,132,205],[88,132,199,205,206],[88,132,203,205],[88,132,212,226],[88,132,198,200,201,202,205,210],[88,132,198,205,208,211],[88,132,200,209,210,211,214,215,216,217],[88,132,211],[88,132,198,202,205,207,209,211],[88,132,207,210],[88,132,207],[88,132,198,205,211],[88,132,199,205,210,221],[88,132,210,276],[88,132,207,211],[88,132,205,210],[88,132,210],[88,132,198,208],[88,132,198,205],[88,132,205,210,211],[88,132,230,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296],[88,132,210,211],[88,132,202,205],[88,132,198,205,209,210,211,223],[88,132,198,202,205,211],[88,132,198,202,205],[88,132,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271],[88,132,223,231],[88,132,231],[88,132,198,205,207,210,230,231],[88,132,198,205,207,209,210,211,223,230],[88,132,540],[88,132,537,541],[88,132,380,381],[88,132,681],[88,132,682,724],[88,132,502,682,720,723],[88,132,722,724],[88,132,472,500,682,721,722,728,800,801],[88,132,678,682,721,722,723,724,725,726,728,802,803,804],[88,132,682,721,723,724],[88,132,615,677],[88,132,724,728,802],[88,132,728],[88,132,472,500,721,728,789,799,805],[88,132,721,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788],[88,132,472,500,721,728],[88,132,682,727,789],[88,132,682],[88,132,472,500,502,682,721],[88,132,144,168,182],[88,132,182,819,820,821],[88,132,164,182,819],[88,132,825],[88,132,539],[88,132,846],[88,132,145,196],[88,132,596],[88,132,507,550,595],[88,132,507,596],[88,132,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712],[88,132,698],[88,132,698,709],[88,132,684,700],[88,132,700],[88,132,707],[88,132,683],[88,132,684],[88,132,692],[88,132,714],[88,132,713,715,716,717,718,719],[88,132,716],[88,132,715],[88,132,147,152,172,175,178,506,511,550,596,597,598],[81,88,132],[88,132,300],[88,132,300,301],[88,132,300,301,302,303,304]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"b63bdb752220fb627e12ab41559a3508a1a1fdd36e0bc2a59e2e2305eab4f2de","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"00c167f32444b220a604a8308f4466cb83b1e3de66ccffdcdefb65a49c26f161","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"cea8b989b3d25e02e174de62e2e334a46e2e1ce1c31e349f145ad7b9cd2cfbfb","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"88a3a6f8c2a1640d8d5fd30d8d86462f8babd86a1e52fab0e8b7f7c141fb348e","impliedFormat":1},{"version":"345f76c854da724803c96f727a3f9c75e26cf95c6e7b8c1064dbc4e7727b74e6","impliedFormat":1},{"version":"ab7b7a15a5d73eb0cfc2b973e580f357f07492bff6608669d7e899e2d49ac9a3","impliedFormat":1},{"version":"4b8a1d246ef6d201e4ccb2225440b18ed2229b4e853edd3122f84ddbb0ee9e12","signature":"8f6cccb04620439ec3f3424b8aa2de2e0a561df83241cd6e7bdd5f9a6e0fa358","affectsGlobalScope":true,"impliedFormat":1},{"version":"7cf9ab02c71eb4c673cb641649267e72df49e6d5cfd9d221a65edea93cd4b97e","signature":"0000818f5efa12abf811fc77da7312f4e225cf113a189d09dda8e6f9c061be28","impliedFormat":1},{"version":"d478bc1a3e3bf08b099aa67afa1e11ef56d3f618e2a7407537150a47216b691d","signature":"e1daad9f4e934dc3cc7712c9a980e5c88a97ca56a289b72054be2896b884fcb9","impliedFormat":1},{"version":"732c42cfe4d01625caa167d23baec0746a063b0d8f94f1698b1230ac8dc62db9","signature":"43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012","impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[[383,386]],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":9,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[919,1],[89,1],[386,2],[385,3],[384,4],[383,5],[377,6],[311,1],[310,1],[357,1],[365,1],[349,7],[353,8],[366,9],[367,10],[351,11],[350,12],[354,13],[368,14],[362,1],[369,14],[363,15],[348,16],[379,17],[360,18],[364,19],[370,20],[324,21],[371,22],[359,13],[372,13],[352,23],[313,24],[355,25],[356,19],[336,19],[337,26],[338,27],[312,28],[339,29],[315,30],[314,31],[333,32],[340,21],[341,19],[342,9],[317,33],[318,9],[319,34],[320,9],[321,34],[322,35],[343,36],[323,37],[347,38],[325,39],[326,35],[327,40],[328,24],[316,41],[344,42],[329,43],[361,44],[330,37],[345,36],[346,9],[331,9],[332,9],[334,45],[335,39],[373,13],[374,1],[375,46],[307,1],[358,47],[378,1],[299,48],[653,1],[450,49],[448,1],[615,1],[649,50],[648,50],[647,1],[651,51],[652,51],[650,1],[618,1],[616,52],[619,53],[617,53],[620,1],[659,1],[660,1],[664,1],[661,1],[671,52],[670,1],[672,1],[673,54],[665,55],[669,56],[666,57],[662,1],[667,58],[668,59],[663,1],[635,52],[631,52],[634,52],[633,52],[632,52],[628,52],[627,52],[630,52],[629,52],[622,52],[623,60],[621,1],[626,61],[624,52],[677,62],[656,63],[658,63],[657,63],[654,64],[655,63],[675,1],[674,1],[676,1],[636,65],[637,1],[640,1],[643,1],[638,1],[645,1],[646,66],[642,1],[639,1],[641,1],[644,1],[625,1],[536,1],[539,67],[538,1],[387,68],[156,1],[388,1],[389,1],[390,1],[447,69],[391,70],[436,71],[393,72],[392,73],[394,70],[395,70],[397,74],[396,70],[398,75],[399,75],[400,70],[402,76],[403,70],[404,76],[405,70],[407,70],[408,70],[409,70],[410,77],[406,70],[411,1],[412,78],[413,78],[414,78],[415,78],[416,78],[425,79],[417,78],[418,78],[419,78],[420,78],[422,78],[421,78],[423,78],[424,78],[426,70],[427,70],[401,70],[428,76],[430,80],[429,70],[431,70],[432,70],[433,81],[435,70],[434,70],[437,70],[439,70],[440,82],[438,70],[441,70],[442,70],[443,70],[444,70],[445,70],[446,70],[453,83],[449,49],[451,84],[452,49],[455,85],[456,86],[457,1],[458,1],[464,87],[454,68],[465,1],[470,88],[468,89],[471,1],[473,90],[474,90],[475,1],[476,1],[478,91],[479,1],[480,1],[481,90],[482,1],[483,1],[484,92],[485,1],[486,1],[487,93],[488,1],[489,94],[490,1],[491,1],[492,1],[493,1],[496,1],[495,95],[472,1],[497,96],[498,1],[494,1],[499,1],[500,90],[501,97],[502,98],[504,99],[511,100],[510,101],[509,102],[505,1],[508,103],[506,1],[463,104],[513,105],[512,104],[516,106],[477,1],[518,107],[519,108],[521,109],[523,110],[524,110],[525,110],[522,1],[528,111],[526,112],[527,112],[529,1],[530,1],[466,1],[531,113],[532,114],[533,1],[534,115],[535,116],[544,117],[507,1],[514,118],[515,1],[545,119],[469,1],[546,120],[549,121],[547,121],[548,122],[600,123],[602,124],[603,125],[601,126],[604,127],[605,128],[606,129],[607,130],[608,131],[609,132],[610,133],[611,134],[612,135],[613,136],[614,109],[459,1],[517,1],[806,1],[807,1],[813,137],[810,138],[809,139],[812,140],[808,1],[811,138],[503,1],[814,114],[129,141],[130,141],[131,142],[88,143],[132,144],[133,145],[134,146],[83,1],[86,147],[84,1],[85,1],[135,148],[136,149],[137,150],[138,151],[139,152],[140,153],[141,153],[143,154],[142,155],[144,156],[145,157],[146,158],[128,159],[87,1],[147,160],[148,161],[149,162],[182,163],[150,164],[151,165],[152,166],[106,167],[116,168],[105,167],[126,169],[97,170],[96,171],[125,114],[119,172],[124,173],[99,174],[113,175],[98,176],[122,177],[94,178],[93,114],[123,179],[95,180],[100,181],[101,1],[104,181],[91,1],[127,182],[117,183],[108,184],[109,185],[111,186],[107,187],[110,188],[120,114],[102,189],[103,190],[112,191],[92,192],[115,183],[114,181],[118,1],[121,193],[153,194],[154,195],[155,196],[157,197],[158,198],[159,199],[160,200],[161,200],[162,201],[163,1],[164,202],[166,203],[165,204],[167,205],[168,206],[169,207],[170,208],[171,209],[172,210],[173,211],[174,212],[175,213],[176,214],[177,215],[178,216],[179,217],[180,218],[181,219],[815,114],[816,1],[817,1],[823,220],[818,1],[824,1],[827,1],[828,1],[829,1],[461,1],[832,221],[831,222],[462,1],[836,223],[841,224],[840,225],[843,224],[842,226],[839,227],[837,1],[838,228],[833,1],[835,229],[844,230],[845,1],[848,231],[873,232],[874,233],[849,234],[852,234],[871,232],[872,232],[862,232],[861,235],[859,232],[854,232],[867,232],[865,232],[869,232],[853,232],[866,232],[870,232],[855,232],[856,232],[868,232],[850,232],[857,232],[858,232],[860,232],[864,232],[875,236],[863,232],[851,232],[888,237],[887,1],[882,236],[884,238],[883,236],[876,236],[877,236],[879,236],[881,236],[885,238],[886,238],[878,238],[880,238],[460,239],[890,240],[889,89],[467,241],[891,68],[892,1],[893,1],[894,1],[897,242],[896,243],[895,244],[680,245],[679,1],[899,246],[520,1],[915,247],[913,248],[912,249],[903,250],[904,251],[911,252],[905,251],[906,250],[907,250],[908,250],[909,253],[902,254],[910,249],[901,1],[914,255],[916,256],[917,1],[918,257],[80,1],[81,258],[595,259],[552,1],[554,260],[553,261],[558,262],[593,263],[590,264],[592,265],[555,264],[556,266],[560,266],[559,267],[557,268],[591,269],[589,264],[594,270],[587,1],[588,1],[561,271],[566,264],[568,264],[563,264],[564,271],[570,264],[571,272],[562,264],[567,264],[569,264],[565,264],[585,273],[584,264],[586,274],[580,264],[582,264],[581,264],[577,264],[583,275],[578,264],[579,276],[572,264],[573,264],[574,264],[575,264],[576,264],[551,1],[900,1],[90,1],[537,1],[834,1],[797,277],[793,1],[794,1],[792,1],[795,1],[796,1],[798,1],[790,1],[791,278],[799,279],[681,280],[309,1],[543,281],[194,282],[195,283],[193,284],[196,285],[190,286],[191,287],[192,288],[186,286],[187,286],[189,289],[188,286],[185,290],[207,291],[275,292],[274,293],[273,294],[212,295],[228,296],[226,297],[227,298],[213,299],[298,300],[198,1],[202,1],[200,301],[201,1],[205,302],[208,1],[225,303],[203,1],[220,304],[206,305],[221,306],[224,307],[222,307],[219,308],[199,1],[204,1],[223,309],[229,310],[217,1],[211,311],[209,312],[218,313],[215,314],[214,314],[210,315],[216,316],[294,317],[288,318],[281,319],[280,320],[289,321],[290,307],[282,322],[295,323],[276,324],[277,325],[278,326],[297,327],[279,320],[283,323],[284,328],[291,329],[292,305],[293,328],[296,307],[285,326],[230,330],[286,331],[287,332],[272,333],[270,334],[271,334],[234,334],[235,334],[236,334],[237,334],[238,334],[239,334],[240,334],[241,334],[242,334],[262,334],[243,334],[244,334],[245,334],[246,334],[247,334],[248,334],[269,334],[249,334],[250,334],[251,334],[252,334],[267,334],[253,334],[268,334],[254,334],[265,334],[266,334],[255,334],[256,334],[257,334],[263,334],[264,334],[258,334],[259,334],[260,334],[261,334],[233,335],[232,336],[231,337],[197,1],[376,1],[541,338],[542,339],[382,340],[380,1],[381,1],[184,1],[682,341],[725,342],[724,343],[723,344],[726,1],[802,345],[801,1],[805,346],[803,347],[678,348],[804,349],[727,350],[800,351],[789,352],[729,353],[730,353],[731,353],[732,353],[733,353],[786,353],[734,353],[735,353],[736,353],[737,353],[738,353],[739,353],[740,353],[741,353],[785,353],[742,353],[743,353],[744,353],[745,353],[746,353],[747,353],[748,353],[749,353],[750,353],[751,353],[752,353],[753,353],[788,353],[754,353],[755,353],[756,353],[757,353],[758,353],[759,353],[760,353],[761,353],[762,353],[763,353],[764,353],[765,353],[787,353],[766,353],[767,353],[768,353],[769,353],[770,353],[771,353],[772,353],[773,353],[774,353],[775,353],[776,353],[777,353],[778,353],[779,353],[780,353],[781,353],[782,353],[783,353],[784,353],[728,354],[721,355],[722,356],[183,357],[822,358],[819,114],[821,359],[820,1],[825,1],[826,360],[540,361],[847,362],[846,363],[597,364],[596,365],[550,366],[898,1],[598,1],[830,222],[79,1],[713,367],[699,368],[710,369],[683,1],[701,370],[700,1],[702,371],[708,372],[707,1],[684,1],[705,1],[706,1],[692,373],[687,1],[686,374],[685,1],[694,1],[711,375],[690,373],[693,1],[698,1],[691,373],[688,374],[689,1],[695,374],[696,374],[709,1],[704,1],[712,1],[703,1],[714,1],[697,1],[715,376],[716,376],[720,377],[717,378],[718,379],[719,378],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[599,380],[82,381],[301,382],[302,383],[305,384],[300,1],[306,382],[303,382],[304,382],[308,1]],"latestChangedDtsFile":"./dist/cli-run.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/dataplan-json/dist/index.d.ts b/grafast/dataplan-json/dist/index.d.ts new file mode 100644 index 0000000000..2c2ef6949e --- /dev/null +++ b/grafast/dataplan-json/dist/index.d.ts @@ -0,0 +1,2 @@ +export { jsonParse, JSONParseStep, JSONValue } from "./steps/jsonParse.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-json/dist/index.d.ts.map b/grafast/dataplan-json/dist/index.d.ts.map new file mode 100644 index 0000000000..a0caec8d6b --- /dev/null +++ b/grafast/dataplan-json/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-json/dist/index.js b/grafast/dataplan-json/dist/index.js new file mode 100644 index 0000000000..f974a6480d --- /dev/null +++ b/grafast/dataplan-json/dist/index.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JSONParseStep = exports.jsonParse = void 0; +var jsonParse_js_1 = require("./steps/jsonParse.js"); +Object.defineProperty(exports, "jsonParse", { enumerable: true, get: function () { return jsonParse_js_1.jsonParse; } }); +Object.defineProperty(exports, "JSONParseStep", { enumerable: true, get: function () { return jsonParse_js_1.JSONParseStep; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/dataplan-json/dist/index.js.map b/grafast/dataplan-json/dist/index.js.map new file mode 100644 index 0000000000..5f74c4da5d --- /dev/null +++ b/grafast/dataplan-json/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2E;AAAlE,yGAAA,SAAS,OAAA;AAAE,6GAAA,aAAa,OAAA"} \ No newline at end of file diff --git a/grafast/dataplan-json/dist/steps/jsonParse.d.ts b/grafast/dataplan-json/dist/steps/jsonParse.d.ts new file mode 100644 index 0000000000..0f5e2738e2 --- /dev/null +++ b/grafast/dataplan-json/dist/steps/jsonParse.d.ts @@ -0,0 +1,30 @@ +import type { AccessStep, ExecutionDetails, GrafastResultsList } from "grafast"; +import { Step } from "grafast"; +export type JSONValue = string | number | boolean | null | { + [key: string]: JSONValue; +} | Array; +/** + * This plan accepts as JSON string as its only input and will result in the + * parsed JSON object (or array, boolean, string, etc). + */ +export declare class JSONParseStep extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + constructor($stringPlan: Step); + toStringMeta(): string; + get(key: TKey): AccessStep; + at(index: TIndex): AccessStep; + deduplicate(_peers: readonly Step[]): readonly Step[]; + execute({ indexMap, values: [stringDep], }: ExecutionDetails<[string]>): GrafastResultsList; +} +/** + * This plan accepts as JSON string as its only input and will result in the + * parsed JSON object (or array, boolean, string, etc). + */ +export declare function jsonParse($string: Step): JSONParseStep; +//# sourceMappingURL=jsonParse.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-json/dist/steps/jsonParse.d.ts.map b/grafast/dataplan-json/dist/steps/jsonParse.d.ts.map new file mode 100644 index 0000000000..a3a0f6f57c --- /dev/null +++ b/grafast/dataplan-json/dist/steps/jsonParse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonParse.d.ts","sourceRoot":"","sources":["../../src/steps/jsonParse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAoB,IAAI,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5B,KAAK,CAAC,SAAS,CAAC,CAAC;AAErB;;;GAGG;AACH,qBAAa,aAAa,CAAC,KAAK,SAAS,SAAS,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC;IACrE,MAAM,CAAC,QAAQ;;;MAGb;IAGF,aAAa,UAAS;gBAEV,WAAW,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IAK5C,YAAY,IAAI,MAAM;IAItB,GAAG,CAAC,IAAI,SAAS,MAAM,KAAK,EAC1B,GAAG,EAAE,IAAI,GACR,UAAU,CACX,KAAK,SAAS;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAC/D;IAID,EAAE,CAAC,MAAM,SAAS,MAAM,KAAK,GAAG,MAAM,EACpC,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAIrB,WAAW,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,GAAG,SAAS,IAAI,EAAE;IAK5D,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,SAAS,CAAC,GACpB,EAAE,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC;CAsB1D;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,SAAS,SAAS,EAC/C,OAAO,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAC3B,aAAa,CAAC,KAAK,CAAC,CAEtB"} \ No newline at end of file diff --git a/grafast/dataplan-json/dist/steps/jsonParse.js b/grafast/dataplan-json/dist/steps/jsonParse.js new file mode 100644 index 0000000000..bc19cc17e0 --- /dev/null +++ b/grafast/dataplan-json/dist/steps/jsonParse.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.JSONParseStep = void 0; +exports.jsonParse = jsonParse; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const grafast_1 = require("grafast"); +/** + * This plan accepts as JSON string as its only input and will result in the + * parsed JSON object (or array, boolean, string, etc). + */ +class JSONParseStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/json", + exportName: "JSONParseStep", + }; } + constructor($stringPlan) { + super(); + // We're not safe because if parsing JSON fails we'll include a rejected + // promise. + this.isSyncAndSafe = false; + this.addDependency($stringPlan); + } + toStringMeta() { + return chalk_1.default.bold.yellow(String(this.getDep(0).id)); + } + get(key) { + return (0, grafast_1.access)(this, [key]); + } + at(index) { + return (0, grafast_1.access)(this, [index]); + } + deduplicate(_peers) { + // We're all the same + return _peers; + } + execute({ indexMap, values: [stringDep], }) { + return indexMap((i) => { + const v = stringDep.at(i); + if (typeof v === "string") { + try { + return JSON.parse(v); + } + catch (e) { + return Promise.reject(e); + } + } + else if (v == null) { + return null; + } + else { + return Promise.reject(new Error(`JSONParseStep: expected string to parse, but received ${Array.isArray(v) ? "array" : typeof v}`)); + } + }); + } +} +exports.JSONParseStep = JSONParseStep; +/** + * This plan accepts as JSON string as its only input and will result in the + * parsed JSON object (or array, boolean, string, etc). + */ +function jsonParse($string) { + return new JSONParseStep($string); +} +(0, grafast_1.exportAs)("@dataplan/json", jsonParse, "jsonParse"); +//# sourceMappingURL=jsonParse.js.map \ No newline at end of file diff --git a/grafast/dataplan-json/dist/steps/jsonParse.js.map b/grafast/dataplan-json/dist/steps/jsonParse.js.map new file mode 100644 index 0000000000..eff40da98c --- /dev/null +++ b/grafast/dataplan-json/dist/steps/jsonParse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"jsonParse.js","sourceRoot":"","sources":["../../src/steps/jsonParse.ts"],"names":[],"mappings":";;;AAyFA,8BAIC;;AA7FD,0DAA0B;AAO1B,qCAAiD;AAUjD;;;GAGG;AACH,MAAa,aAAuC,SAAQ,cAAW;aAC9D,aAAQ,GAAG;QAChB,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,eAAe;KAC5B,AAHc,CAGb;IAKF,YAAY,WAAgC;QAC1C,KAAK,EAAE,CAAC;QALV,wEAAwE;QACxE,WAAW;QACX,kBAAa,GAAG,KAAK,CAAC;QAIpB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAED,YAAY;QACV,OAAO,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,GAAG,CACD,GAAS;QAIT,OAAO,IAAA,gBAAM,EAAC,IAAI,EAAE,CAAC,GAAa,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,EAAE,CACA,KAAa;QAEb,OAAO,IAAA,gBAAM,EAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/B,CAAC;IAEM,WAAW,CAAC,MAAuB;QACxC,qBAAqB;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,SAAS,CAAC,GACQ;QAC3B,OAAO,QAAQ,CAAyB,CAAC,CAAC,EAAE,EAAE;YAC5C,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAC1B,IAAI,CAAC;oBACH,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACvB,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;iBAAM,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;gBACrB,OAAO,IAAW,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,KAAK,CACP,yDACE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CACtC,EAAE,CACH,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;;AA7DH,sCA8DC;AAED;;;GAGG;AACH,SAAgB,SAAS,CACvB,OAA4B;IAE5B,OAAO,IAAI,aAAa,CAAQ,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,IAAA,kBAAQ,EAAC,gBAAgB,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-json/tsconfig.tsbuildinfo b/grafast/dataplan-json/tsconfig.tsbuildinfo new file mode 100644 index 0000000000..f061644229 --- /dev/null +++ b/grafast/dataplan-json/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/chalk/index.d.ts","../grafast/dist/therecanbeonlyone.d.ts","../../utils/lru/dist/index.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../grafast/dist/constraints.d.ts","../grafast/dist/bucket.d.ts","../grafast/dist/steps/__item.d.ts","../grafast/dist/steps/__flag.d.ts","../grafast/dist/steps/access.d.ts","../grafast/dist/steps/__value.d.ts","../grafast/dist/steps/listtransform.d.ts","../grafast/dist/steps/connection.d.ts","../grafast/dist/steps/constant.d.ts","../grafast/dist/steps/each.d.ts","../grafast/dist/steps/error.d.ts","../grafast/dist/steps/filter.d.ts","../grafast/dist/steps/first.d.ts","../grafast/dist/steps/groupby.d.ts","../grafast/dist/multistep.d.ts","../grafast/dist/steps/lambda.d.ts","../grafast/dist/steps/last.d.ts","../grafast/dist/steps/list.d.ts","../grafast/dist/steps/listen.d.ts","../grafast/dist/steps/node.d.ts","../grafast/dist/steps/partitionbyindex.d.ts","../grafast/dist/steps/remapkeys.d.ts","../grafast/dist/steps/reverse.d.ts","../grafast/dist/steps/applyinput.d.ts","../grafast/dist/steps/setter.d.ts","../grafast/dist/steps/sideeffect.d.ts","../grafast/dist/steps/__inputlist.d.ts","../grafast/dist/steps/__inputobject.d.ts","../grafast/dist/steps/__inputstaticleaf.d.ts","../grafast/dist/steps/__trackedvalue.d.ts","../grafast/dist/steps/applytransforms.d.ts","../grafast/dist/steps/bakedinput.d.ts","../grafast/dist/steps/condition.d.ts","../grafast/dist/steps/graphqlresolver.d.ts","../grafast/dist/steps/load.d.ts","../grafast/dist/steps/polymorphicbranch.d.ts","../grafast/dist/steps/proxy.d.ts","../grafast/dist/steps/index.d.ts","../grafast/dist/graphqlcollectfields.d.ts","../grafast/dist/engine/executeoutputplan.d.ts","../grafast/dist/engine/outputplan.d.ts","../grafast/dist/engine/operationplan.d.ts","../grafast/dist/step.d.ts","../grafast/dist/engine/layerplan.d.ts","../grafast/dist/error.d.ts","../grafast/dist/steps/__inputdefault.d.ts","../grafast/dist/steps/__inputdynamicscalar.d.ts","../grafast/dist/deferred.d.ts","../grafast/dist/utils.d.ts","../grafast/dist/planjsoninterfaces.d.ts","../grafast/dist/interfaces.d.ts","../grafast/dist/steps/object.d.ts","../grafast/dist/exportas.d.ts","../grafast/dist/grafastprint.d.ts","../grafast/dist/makegrafastschema.d.ts","../grafast/dist/dev.d.ts","../grafast/dist/engine/lib/defaultplanresolver.d.ts","../grafast/dist/engine/lib/withgloballayerplan.d.ts","../grafast/dist/execute.d.ts","../grafast/dist/grafastgraphql.d.ts","../grafast/dist/middleware.d.ts","../grafast/dist/operationplan-input.d.ts","../grafast/dist/polymorphic.d.ts","../grafast/dist/stringifypayload.d.ts","../grafast/dist/stripansi.d.ts","../grafast/dist/subscribe.d.ts","../../node_modules/iterall/index.d.ts","../grafast/dist/args.d.ts","../grafast/dist/version.d.ts","../grafast/dist/index.d.ts","./src/steps/jsonparse.ts","./src/index.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[269,313],[79,262,269,313],[79,80,261,269,313],[190,240,242,261,269,313],[193,232,269,313],[193,228,233,234,269,313],[228,234,242,269,313],[235,261,269,313],[190,192,230,232,235,240,242,261,269,313],[82,190,193,228,231,234,235,240,242,261,269,313],[242,269,313],[93,190,240,242,261,269,313],[193,269,313],[190,229,240,261,269,313],[81,82,88,190,206,228,229,233,234,236,239,240,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,269,313],[88,94,190,191,192,215,228,229,233,234,235,236,237,238,240,241,261,269,313],[190,228,234,240,242,261,269,313],[88,269,313],[228,234,269,313],[190,228,233,234,240,242,261,269,313],[190,229,233,235,240,242,261,269,313],[194,228,234,242,269,313],[221,228,234,242,269,313],[190,200,228,234,240,242,261,269,313],[190,200,228,234,240,261,269,313],[228,234,242,261,269,313],[190,192,195,196,197,228,234,240,242,261,269,313],[196,228,234,261,269,313],[195,228,234,242,269,313],[190,228,229,234,240,242,261,269,313],[198,228,234,242,269,313],[194,198,199,228,234,269,313],[199,228,234,242,269,313],[190,228,234,240,261,269,313],[198,199,228,234,269,313],[194,195,196,197,198,199,200,201,202,203,204,205,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,243,261,269,313],[206,228,234,242,269,313],[195,200,228,234,242,269,313],[194,199,228,234,242,261,269,313],[195,206,228,234,242,261,269,313],[190,207,228,234,240,242,261,269,313],[200,228,234,242,269,313],[215,261,269,313],[93,190,240,261,269,313],[190,228,233,234,239,240,242,261,269,313],[269,313,425],[269,313,623],[269,313,591,626],[269,313,591],[269,313,591,592],[269,313,648],[269,313,638,640],[269,313,638,640,641,642,643,644],[269,313,638,640,641],[269,313,638,640,641,642],[269,313,638,640,641,642,643],[269,313,591,598],[269,313,591,601],[269,313,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652],[269,313,591,592,629,630],[269,313,591,592,629],[269,313,591,592,601],[269,313,591,592,601,612],[269,313,514],[269,313,328,363],[269,313,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423],[269,313,367],[269,313,367,371],[269,313,365,367,369],[269,313,365,367],[269,313,367,373],[269,313,366,367],[269,313,378],[269,313,367,384,385,386],[269,313,367,388],[269,313,367,389,390,391,392,393,394,395,396,397,398,399,400,401],[269,313,367,370],[269,313,367,369],[269,313,367,378],[269,313,425,426,427,428,429],[269,313,425,427],[269,313,328,363,431],[269,313,319,363],[269,313,356,363,440],[269,313,328,363,431,445,446],[269,313,432,440,444],[269,313,449,477],[269,313,448,454],[269,313,459],[269,313,454],[269,313,453],[269,313,471],[269,313,467],[269,313,449,466,477],[269,313,448,449,450,451,452,453,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478],[269,313,480],[269,313,483,487],[269,313,483,484,486],[269,313,487],[269,313,482,483,484],[269,313,325,328,363,437,438,439],[269,313,432,438,440,444,489],[269,313,326,363,491,492],[269,313,325,326,363,494],[269,313,326,363],[269,313,497],[269,313,499,505],[269,313,500,501,502,503,504],[269,313,505],[269,313,325,328,330,333,345,356,363],[269,313,363],[269,313,510],[269,313,511],[269,313,516,519],[269,313,326,356,363],[269,313,318,363,480],[269,313,325,363],[269,313,524],[269,312,313,325,328,329,333,340,356,363,364,442,443,446,447,507,523],[269,313,575],[269,313,577,579,580,581,582,583,584,585,586,587,588,589],[269,313,577,578,580,581,582,583,584,585,586,587,588,589],[269,313,578,579,580,581,582,583,584,585,586,587,588,589],[269,313,577,578,579,581,582,583,584,585,586,587,588,589],[269,313,577,578,579,580,582,583,584,585,586,587,588,589],[269,313,577,578,579,580,581,583,584,585,586,587,588,589],[269,313,577,578,579,580,581,582,584,585,586,587,588,589],[269,313,577,578,579,580,581,582,583,585,586,587,588,589],[269,313,577,578,579,580,581,582,583,584,586,587,588,589],[269,313,577,578,579,580,581,582,583,584,585,587,588,589],[269,313,577,578,579,580,581,582,583,584,585,586,588,589],[269,313,577,578,579,580,581,582,583,584,585,586,587,589],[269,313,577,578,579,580,581,582,583,584,585,586,587,588],[269,313,785,786,787,788],[269,313,784],[269,313,363,784],[269,313,784,785,786,787],[269,310,313],[269,312,313],[313],[269,313,318,348],[269,313,314,319,325,326,333,345,356],[269,313,314,315,325,333],[264,265,266,269,313],[269,313,316,357],[269,313,317,318,326,334],[269,313,318,345,353],[269,313,319,321,325,333],[269,312,313,320],[269,313,321,322],[269,313,325],[269,313,323,325],[269,312,313,325],[269,313,325,326,327,345,356],[269,313,325,326,327,341,345,348],[269,308,313,361],[269,313,321,325,328,333,345,356],[269,313,325,326,328,329,333,345,353,356],[269,313,328,330,345,353,356],[267,268,269,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362],[269,313,325,331],[269,313,332,356,361],[269,313,321,325,333,345],[269,280,284,313,356],[269,280,313,345,356],[269,275,313],[269,277,280,313,353,356],[269,313,333,353],[269,275,313,363],[269,277,280,313,333,356],[269,272,273,276,279,313,325,345,356],[269,280,287,313],[269,272,278,313],[269,280,301,302,313],[269,276,280,313,348,356,363],[269,301,313,363],[269,274,275,313,363],[269,280,313],[269,274,275,276,277,278,279,280,281,282,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,313],[269,280,295,313],[269,280,287,288,313],[269,278,280,288,289,313],[269,279,313],[269,272,275,280,313],[269,280,284,288,289,313],[269,284,313],[269,278,280,283,313,356],[269,272,277,280,287,313],[269,313,345],[269,275,280,301,313,361,363],[269,313,334],[269,313,335],[269,312,313,336],[269,310,311,312,313,314,315,316,317,318,319,320,321,322,323,325,326,327,328,329,330,331,332,333,334,335,336,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362],[269,313,339],[269,313,340],[269,313,325,341,342],[269,313,341,343,357,359],[269,313,325,345,346,348],[269,313,347,348],[269,313,345,346],[269,313,348],[269,313,349],[269,310,313,345],[269,313,325,351,352],[269,313,351,352],[269,313,318,333,345,353],[269,313,354],[269,313,333,355],[269,313,328,340,356],[269,313,318,357],[269,313,345,358],[269,313,332,359],[269,313,360],[269,313,318,325,327,336,345,356,359,361],[269,313,345,362],[269,313,325,345,353,363,794,795,798,799],[269,313,806,807],[269,313,806],[269,313,811],[269,313,505,814,815],[269,313,810,912],[269,313,810,913],[269,313,505,814],[269,313,810,813],[269,313,804,809,810],[269,313,328,345,363],[269,313,345,363],[269,313,839,878],[269,313,839,863,878],[269,313,878],[269,313,839],[269,313,839,864,878],[269,313,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877],[269,313,864,878],[269,313,326,345,363,436],[269,313,326,445],[269,313,328,363,437,443],[269,313,885,886],[269,313,483,885],[269,313,483,886],[269,313,655],[269,313,888],[269,313,328,333,363,575],[269,313,363,892,893,894,895,896,897,898,899,900,901,902],[269,313,891,892,901],[269,313,892,901],[269,313,882,891,892,901],[269,313,891,892,893,894,895,896,897,898,899,900,902],[269,313,892],[269,313,318,891,901],[269,313,318,363,574,888,889,890,903],[269,313,325,328,330,333,356,363],[269,313,325,328,330,333,345,353,356,362,363],[269,313,909],[269,313,530,531,535,562,563,565,566,567,569,570],[269,313,528,529],[269,313,528],[269,313,530,570],[269,313,530,531,567,568,570],[269,313,570],[269,313,527,570,571],[269,313,530,531,569,570],[269,313,530,531,533,534,569,570],[269,313,530,531,532,569,570],[269,313,530,531,535,562,563,564,565,566,569,570],[269,313,527,530,531,535,567,569],[269,313,535,570],[269,313,537,538,539,540,541,542,543,544,545,546,570],[269,313,560,570],[269,313,536,547,555,556,557,558,559,561],[269,313,540,570],[269,313,548,549,550,551,552,553,554,570],[269,313,768,769,770,771,772],[269,313,766],[269,313,767,773,774],[269,313,656],[269,313,513,518],[269,313,822,824,828,829,832],[269,313,833],[269,313,824,828,831],[269,313,822,824,828,831,832,833,834],[269,313,828],[269,313,824,828,829,831],[269,313,822,824,829,830,832],[269,313,825,826,827],[269,313,326,335,363,822,823],[90,91,97,98,269,313],[99,165,166,269,313],[90,97,99,269,313],[91,99,269,313],[90,92,93,94,97,99,102,103,269,313],[92,104,118,119,269,313],[90,97,102,103,104,269,313],[90,94,97,99,101,102,103,269,313],[90,91,102,103,104,269,313],[89,105,110,117,120,121,164,167,189,269,313],[90,269,313],[91,95,96,269,313],[91,95,96,97,98,100,111,112,113,114,115,116,269,313],[91,96,97,269,313],[91,269,313],[90,91,96,97,99,112,269,313],[97,269,313],[91,97,98,269,313],[95,97,269,313],[104,118,269,313],[90,92,93,94,97,102,269,313],[90,97,100,103,269,313],[92,101,102,103,106,107,108,109,269,313],[103,269,313],[90,94,97,99,101,103,269,313],[99,102,269,313],[99,269,313],[90,97,103,269,313],[91,97,102,113,269,313],[102,168,269,313],[99,103,269,313],[97,102,269,313],[102,269,313],[90,100,269,313],[90,97,269,313],[97,102,103,269,313],[122,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,269,313],[102,103,269,313],[94,97,269,313],[90,97,101,102,103,115,269,313],[90,94,97,103,269,313],[90,94,97,269,313],[123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,269,313],[115,123,269,313],[123,269,313],[90,97,99,102,122,123,269,313],[90,97,99,101,102,103,115,122,269,313],[269,313,516],[80,269,313,517],[269,313,657],[269,313,658,700],[269,313,479,658,696,699],[269,313,698,700],[269,313,449,477,658,697,698,704,776,777],[269,313,654,658,697,698,699,700,701,702,704,778,779,780],[269,313,658,697,699,700],[269,313,591,653],[269,313,700,704,778],[269,313,704],[269,313,449,477,697,704,765,775,781],[269,313,697,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764],[269,313,449,477,697,704],[269,313,658,703,765],[269,313,658],[269,313,449,477,479,658,697],[269,313,325,349,363],[269,313,363,795,796,797],[269,313,345,363,795],[269,313,801],[269,313,515],[269,313,836],[269,313,326,835],[269,313,572],[269,313,484,526,571],[269,313,484,572],[269,313,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688],[269,313,674],[269,313,674,685],[269,313,660,676],[269,313,676],[269,313,683],[269,313,659],[269,313,660],[269,313,668],[269,313,690],[269,313,689,691,692,693,694,695],[269,313,692],[269,313,691],[269,313,328,333,353,356,359,483,488,526,572,573,574],[83,269,313],[83,84,269,313],[83,84,85,86,87,269,313]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a98c2d548ef63067ff2f888217688ee3529493cdd64fd45668aacb3c6da9c3d7","signature":"a300b3d1fd727ce517240746c0d70c6f620a5bb97ae06b84f92c32acb8458949","impliedFormat":1},{"version":"fa2bec09f892e9cbb2b86167134b987c2008d0e5654123bb0d533037b0982cd4","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[262,263],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":9,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[911,1],[270,1],[263,2],[262,3],[259,4],[193,1],[192,1],[239,1],[247,1],[231,5],[235,6],[248,7],[249,8],[233,9],[232,10],[236,11],[250,12],[244,1],[251,12],[245,13],[230,14],[261,15],[242,16],[246,17],[252,18],[206,19],[253,20],[241,11],[254,11],[234,21],[195,22],[237,23],[238,17],[218,17],[219,24],[220,25],[194,26],[221,27],[197,28],[196,29],[215,30],[222,19],[223,17],[224,7],[199,31],[200,7],[201,32],[202,7],[203,32],[204,33],[225,34],[205,35],[229,36],[207,37],[208,33],[209,38],[210,22],[198,39],[226,40],[211,41],[243,42],[212,35],[227,34],[228,7],[213,7],[214,7],[216,43],[217,37],[255,11],[256,1],[257,44],[81,1],[240,45],[260,1],[629,1],[427,46],[425,1],[591,1],[625,47],[624,47],[623,1],[627,48],[628,48],[626,1],[594,1],[592,49],[595,50],[593,50],[596,1],[635,1],[636,1],[640,1],[637,1],[647,49],[646,1],[648,1],[649,51],[641,52],[645,53],[642,54],[638,1],[643,55],[644,56],[639,1],[611,49],[607,49],[610,49],[609,49],[608,49],[604,49],[603,49],[606,49],[605,49],[598,49],[599,57],[597,1],[602,58],[600,49],[653,59],[632,60],[634,60],[633,60],[630,61],[631,60],[651,1],[650,1],[652,1],[612,62],[613,1],[616,1],[619,1],[614,1],[621,1],[622,63],[618,1],[615,1],[617,1],[620,1],[601,1],[513,1],[515,64],[514,1],[364,65],[337,1],[365,1],[366,1],[367,1],[424,66],[368,67],[413,68],[370,69],[369,70],[371,67],[372,67],[374,71],[373,67],[375,72],[376,72],[377,67],[379,73],[380,67],[381,73],[382,67],[384,67],[385,67],[386,67],[387,74],[383,67],[388,1],[389,75],[390,75],[391,75],[392,75],[393,75],[402,76],[394,75],[395,75],[396,75],[397,75],[399,75],[398,75],[400,75],[401,75],[403,67],[404,67],[378,67],[405,73],[407,77],[406,67],[408,67],[409,67],[410,78],[412,67],[411,67],[414,67],[416,67],[417,79],[415,67],[418,67],[419,67],[420,67],[421,67],[422,67],[423,67],[430,80],[426,46],[428,81],[429,46],[432,82],[433,83],[434,1],[435,1],[441,84],[431,65],[442,1],[447,85],[445,86],[448,1],[450,87],[451,87],[452,1],[453,1],[455,88],[456,1],[457,1],[458,87],[459,1],[460,1],[461,89],[462,1],[463,1],[464,90],[465,1],[466,91],[467,1],[468,1],[469,1],[470,1],[473,1],[472,92],[449,1],[474,93],[475,1],[471,1],[476,1],[477,87],[478,94],[479,95],[481,96],[488,97],[487,98],[486,99],[482,1],[485,100],[483,1],[440,101],[490,102],[489,101],[493,103],[454,1],[495,104],[496,105],[498,106],[500,107],[501,107],[502,107],[499,1],[505,108],[503,109],[504,109],[506,1],[507,1],[443,1],[508,110],[509,111],[510,1],[511,112],[512,113],[520,114],[484,1],[491,115],[492,1],[521,116],[446,1],[522,117],[525,118],[523,118],[524,119],[576,120],[578,121],[579,122],[577,123],[580,124],[581,125],[582,126],[583,127],[584,128],[585,129],[586,130],[587,131],[588,132],[589,133],[590,106],[436,1],[494,1],[782,1],[783,1],[789,134],[786,135],[785,136],[788,137],[784,1],[787,135],[480,1],[790,111],[310,138],[311,138],[312,139],[269,140],[313,141],[314,142],[315,143],[264,1],[267,144],[265,1],[266,1],[316,145],[317,146],[318,147],[319,148],[320,149],[321,150],[322,150],[324,151],[323,152],[325,153],[326,154],[327,155],[309,156],[268,1],[328,157],[329,158],[330,159],[363,160],[331,161],[332,162],[333,163],[287,164],[297,165],[286,164],[307,166],[278,167],[277,168],[306,111],[300,169],[305,170],[280,171],[294,172],[279,173],[303,174],[275,175],[274,111],[304,176],[276,177],[281,178],[282,1],[285,178],[272,1],[308,179],[298,180],[289,181],[290,182],[292,183],[288,184],[291,185],[301,111],[283,186],[284,187],[293,188],[273,189],[296,180],[295,178],[299,1],[302,190],[334,191],[335,192],[336,193],[338,194],[339,195],[340,196],[341,197],[342,197],[343,198],[344,1],[345,199],[347,200],[346,201],[348,202],[349,203],[350,204],[351,205],[352,206],[353,207],[354,208],[355,209],[356,210],[357,211],[358,212],[359,213],[360,214],[361,215],[362,216],[791,111],[792,1],[793,1],[799,217],[794,1],[800,1],[803,1],[804,1],[805,1],[438,1],[808,218],[807,219],[439,1],[812,220],[817,221],[816,222],[819,221],[818,223],[815,224],[813,1],[814,225],[809,1],[811,226],[820,227],[821,1],[838,228],[863,229],[864,230],[839,231],[842,231],[861,229],[862,229],[852,229],[851,232],[849,229],[844,229],[857,229],[855,229],[859,229],[843,229],[856,229],[860,229],[845,229],[846,229],[858,229],[840,229],[847,229],[848,229],[850,229],[854,229],[865,233],[853,229],[841,229],[878,234],[877,1],[872,233],[874,235],[873,233],[866,233],[867,233],[869,233],[871,233],[875,235],[876,235],[868,235],[870,235],[437,236],[880,237],[879,86],[444,238],[881,65],[882,1],[883,1],[884,1],[887,239],[886,240],[885,241],[656,242],[655,1],[889,243],[497,1],[905,244],[903,245],[902,246],[893,247],[894,248],[901,249],[895,248],[896,247],[897,247],[898,247],[899,250],[892,251],[900,246],[891,1],[904,252],[906,253],[907,1],[908,254],[909,1],[910,255],[571,256],[528,1],[530,257],[529,258],[534,259],[569,260],[566,261],[568,262],[531,261],[532,263],[536,263],[535,264],[533,265],[567,266],[565,261],[570,267],[563,1],[564,1],[537,268],[542,261],[544,261],[539,261],[540,268],[546,261],[547,269],[538,261],[543,261],[545,261],[541,261],[561,270],[560,261],[562,271],[556,261],[558,261],[557,261],[553,261],[559,272],[554,261],[555,273],[548,261],[549,261],[550,261],[551,261],[552,261],[527,1],[890,1],[271,1],[80,1],[810,1],[773,274],[769,1],[770,1],[768,1],[771,1],[772,1],[774,1],[766,1],[767,275],[775,276],[657,277],[191,1],[519,278],[833,279],[834,280],[832,281],[835,282],[829,283],[830,284],[831,285],[825,283],[826,283],[828,286],[827,283],[824,287],[99,288],[167,289],[166,290],[165,291],[104,292],[120,293],[118,294],[119,295],[105,296],[190,297],[90,1],[94,1],[92,298],[93,1],[97,299],[100,1],[117,300],[95,1],[112,301],[98,302],[113,303],[116,304],[114,304],[111,305],[91,1],[96,1],[115,306],[121,307],[109,1],[103,308],[101,309],[110,310],[107,311],[106,311],[102,312],[108,313],[186,314],[180,315],[173,316],[172,317],[181,318],[182,304],[174,319],[187,320],[168,321],[169,322],[170,323],[189,324],[171,317],[175,320],[176,325],[183,326],[184,302],[185,325],[188,304],[177,323],[122,327],[178,328],[179,329],[164,330],[162,331],[163,331],[126,331],[127,331],[128,331],[129,331],[130,331],[131,331],[132,331],[133,331],[134,331],[154,331],[135,331],[136,331],[137,331],[138,331],[139,331],[140,331],[161,331],[141,331],[142,331],[143,331],[144,331],[159,331],[145,331],[160,331],[146,331],[157,331],[158,331],[147,331],[148,331],[149,331],[155,331],[156,331],[150,331],[151,331],[152,331],[153,331],[125,332],[124,333],[123,334],[89,1],[258,1],[517,335],[518,336],[823,1],[658,337],[701,338],[700,339],[699,340],[702,1],[778,341],[777,1],[781,342],[779,343],[654,344],[780,345],[703,346],[776,347],[765,348],[705,349],[706,349],[707,349],[708,349],[709,349],[762,349],[710,349],[711,349],[712,349],[713,349],[714,349],[715,349],[716,349],[717,349],[761,349],[718,349],[719,349],[720,349],[721,349],[722,349],[723,349],[724,349],[725,349],[726,349],[727,349],[728,349],[729,349],[764,349],[730,349],[731,349],[732,349],[733,349],[734,349],[735,349],[736,349],[737,349],[738,349],[739,349],[740,349],[741,349],[763,349],[742,349],[743,349],[744,349],[745,349],[746,349],[747,349],[748,349],[749,349],[750,349],[751,349],[752,349],[753,349],[754,349],[755,349],[756,349],[757,349],[758,349],[759,349],[760,349],[704,350],[697,351],[698,352],[822,353],[798,354],[795,111],[797,355],[796,1],[801,1],[802,356],[516,357],[837,358],[836,359],[573,360],[572,361],[526,362],[888,1],[574,1],[806,219],[79,1],[689,363],[675,364],[686,365],[659,1],[677,366],[676,1],[678,367],[684,368],[683,1],[660,1],[681,1],[682,1],[668,369],[663,1],[662,370],[661,1],[670,1],[687,371],[666,369],[669,1],[674,1],[667,369],[664,370],[665,1],[671,370],[672,370],[685,1],[680,1],[688,1],[679,1],[690,1],[673,1],[691,372],[692,372],[696,373],[693,374],[694,375],[695,374],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[575,376],[84,377],[85,378],[88,379],[83,1],[86,377],[87,377],[82,1]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/adaptors/pg.d.ts b/grafast/dataplan-pg/dist/adaptors/pg.d.ts new file mode 100644 index 0000000000..3816075124 --- /dev/null +++ b/grafast/dataplan-pg/dist/adaptors/pg.d.ts @@ -0,0 +1,110 @@ +/** + * This is an adaptor for the `pg` module. + */ +import "../interfaces.js"; +import type { GrafastSubscriber, PromiseOrDirect } from "grafast"; +import type { Pool, PoolClient, PoolConfig } from "pg"; +import type { PgClient, WithPgClient } from "../executor.js"; +import type { MakePgServiceOptions } from "../interfaces.js"; +declare global { + namespace Grafast { + interface Context { + pgSettings: Record | null; + withPgClient: WithPgClient; + pgSubscriber: PgSubscriber | null; + } + } + namespace GraphileConfig { + interface PgAdaptors { + "@dataplan/pg/adaptors/pg": { + adaptorSettings: PgAdaptorSettings | undefined; + makePgServiceOptions: PgAdaptorMakePgServiceOptions; + client: NodePostgresPgClient; + }; + } + } +} +declare const $$isSetup: unique symbol; +export interface NodePostgresPgClient extends PgClient { + rawClient: PoolClient; +} +declare const $$queue: unique symbol; +declare module "pg" { + interface PoolClient { + [$$queue]?: Promise | null; + [$$isSetup]?: true; + } +} +/** + * Returns a `withPgClient` for the given `Pool` instance. + */ +export declare function makePgAdaptorWithPgClient(pool: Pool, release?: () => PromiseOrDirect): WithPgClient; +/** + * Returns a `withPgClient` for the given `PoolClient` instance. ONLY + * SUITABLE FOR TESTS! + * + */ +export declare function makeWithPgClientViaPgClientAlreadyInTransaction(pgClient: PoolClient, alreadyInTransaction?: boolean): WithPgClient; +export interface PgAdaptorSettings extends CommonPgAdaptorAndServiceSettings { + /** ONLY FOR USE IN TESTS! */ + poolClient?: PoolClient; + /** ONLY FOR USE IN TESTS! */ + poolClientIsInTransaction?: boolean; + /** ONLY FOR USE IN TESTS! */ + superuserPoolClient?: PoolClient; + /** ONLY FOR USE IN TESTS! */ + superuserPoolClientIsInTransaction?: boolean; +} +interface CommonPgAdaptorAndServiceSettings { + pool?: Pool; + poolConfig?: Omit; + connectionString?: string; + /** For installing the watch fixtures */ + superuserPool?: Pool; + /** For installing the watch fixtures */ + superuserPoolConfig?: Omit; + /** For installing the watch fixtures */ + superuserConnectionString?: string; +} +/** @deprecated Use PgAdaptorSettings instead. */ +export type PgAdaptorOptions = PgAdaptorSettings; +export declare function createWithPgClient(options?: PgAdaptorSettings, variant?: "SUPERUSER" | string | null): WithPgClient; +/** + * This class provides helpers for Postgres' LISTEN/NOTIFY pub/sub + * implementation. We aggregate all LISTEN/NOTIFY events so that we can supply + * them all via a single pgClient. We grab and release this client from/to the + * pool automatically. If the Postgres connection is interrupted then we'll + * automatically reconnect and re-establish the LISTENs, however _events can be + * lost_ when this happens, so you should be careful that Postgres connections + * will not be prematurely terminated in general. + */ +export declare class PgSubscriber implements GrafastSubscriber { + private pool; + private topics; + private eventEmitter; + private alive; + constructor(pool: Pool); + private recordNotification; + subscribe(topic: TTopic): AsyncIterableIterator; + private listen; + private unlisten; + private subscribedTopics; + private sync; + private syncWithClient; + private resetClient; + private listeningClient; + private listeningClientPromise; + private getClient; + release(): void; + private promise; + private chain; +} +export interface PgAdaptorMakePgServiceOptions extends MakePgServiceOptions, CommonPgAdaptorAndServiceSettings { +} +export declare function makePgService(options: PgAdaptorMakePgServiceOptions): GraphileConfig.PgServiceConfiguration<"@dataplan/pg/adaptors/pg">; +export {}; +//# sourceMappingURL=pg.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/adaptors/pg.d.ts.map b/grafast/dataplan-pg/dist/adaptors/pg.d.ts.map new file mode 100644 index 0000000000..8853a899e1 --- /dev/null +++ b/grafast/dataplan-pg/dist/adaptors/pg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pg.d.ts","sourceRoot":"","sources":["../../src/adaptors/pg.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAY,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,KAAK,EAEV,IAAI,EACJ,UAAU,EACV,UAAU,EAGX,MAAM,IAAI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M,OAAO,EACpC,KAAK,EAAE,MAAM,GACZ,qBAAqB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IA+EzC,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,IAAI;YAUE,cAAc;IAqB5B,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,sBAAsB,CAAoC;IAClE,OAAO,CAAC,SAAS;IA8DV,OAAO,IAAI,IAAI;IAyCtB,OAAO,CAAC,OAAO,CAAoC;YACrC,KAAK;CAIpB;AAED,MAAM,WAAW,6BACf,SAAQ,oBAAoB,EAC1B,iCAAiC;CAAG;AAuBxC,wBAAgB,aAAa,CAC3B,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAAC,sBAAsB,CAAC,0BAA0B,CAAC,CAwEnE"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/adaptors/pg.js b/grafast/dataplan-pg/dist/adaptors/pg.js new file mode 100644 index 0000000000..f4b33d0a68 --- /dev/null +++ b/grafast/dataplan-pg/dist/adaptors/pg.js @@ -0,0 +1,634 @@ +"use strict"; +/** + * This is an adaptor for the `pg` module. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgSubscriber = void 0; +exports.makePgAdaptorWithPgClient = makePgAdaptorWithPgClient; +exports.makeWithPgClientViaPgClientAlreadyInTransaction = makeWithPgClientViaPgClientAlreadyInTransaction; +exports.createWithPgClient = createWithPgClient; +exports.makePgService = makePgService; +const tslib_1 = require("tslib"); +// IMPORTANT: This file should only be available via direct (path) import, it should not be included in the main package exports. +require("../interfaces.js"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const eventemitter3_1 = tslib_1.__importDefault(require("eventemitter3")); +const grafast_1 = require("grafast"); +const pg = tslib_1.__importStar(require("pg")); +const PgPool = pg.Pool ?? pg.default?.Pool; +// Set `DATAPLAN_PG_PREPARED_STATEMENT_CACHE_SIZE=0` to disable prepared statements +const cacheSizeFromEnv = process.env.DATAPLAN_PG_PREPARED_STATEMENT_CACHE_SIZE + ? parseInt(process.env.DATAPLAN_PG_PREPARED_STATEMENT_CACHE_SIZE, 10) + : null; +/** + * If 0, prepared statements are disabled. Otherwise how many prepared + * statements should we keep around at any one time? + */ +const PREPARED_STATEMENT_CACHE_SIZE = !!cacheSizeFromEnv || cacheSizeFromEnv === 0 ? cacheSizeFromEnv : 100; +const $$isSetup = Symbol("isConfiguredForDataplanPg"); +/** + * \> JIT compilation is beneficial primarily for long-running CPU-bound + * \> queries. Frequently these will be analytical queries. For short + * \> queries the added overhead of performing JIT compilation will + * \> often be higher than the time it can save. + * -- https://www.postgresql.org/docs/14/jit-decision.html + * + * `@dataplan/pg` is designed for extremely fast queries, but sometimes + * user code can make Postgres think the cost of the query is going to + * be very high (this is especially the case when lots of "computed + * column functions" are used), and thus enables JIT. In testing we've + * seen queries that would take 50ms with `jit=off` take 8200ms with + * jit on. As such we've made the decision to disable jit for all + * queries. + * + * If you don't agree with our decision, disable this by setting the + * environmental variable `DATAPLAN_PG_DONT_DISABLE_JIT=1`. + */ +const DONT_DISABLE_JIT = process.env.DATAPLAN_PG_DONT_DISABLE_JIT === "1"; +function newNodePostgresPgClient(pgClient, txLevel, alwaysQueue, alreadyInTransaction) { + let queue = null; + const addToQueue = (callback) => { + const result = queue ? queue.then(callback) : callback(); + const clearIfSame = () => { + // Clear queue unless it has moved on + if (queue === newQueue) { + queue = null; + } + }; + const newQueue = result.then(clearIfSame, clearIfSame); + queue = newQueue; + return result; + }; + return { + rawClient: pgClient, + withTransaction(callback) { + // Transactions always queue; creating queue if need be + return addToQueue(async () => { + if (txLevel === 0 && !alreadyInTransaction) { + await pgClient.query({ text: "begin" }); + } + else { + await pgClient.query({ + text: `savepoint tx${txLevel === 0 ? "" : txLevel}`, + }); + } + try { + const newClient = newNodePostgresPgClient(pgClient, txLevel + 1, alwaysQueue, alreadyInTransaction); + const innerResult = await callback(newClient); + if (txLevel === 0 && !alreadyInTransaction) { + await pgClient.query({ text: "commit" }); + } + else { + await pgClient.query({ + text: `release savepoint tx${txLevel === 0 ? "" : txLevel}`, + }); + } + return innerResult; + } + catch (e) { + try { + if (txLevel === 0 && !alreadyInTransaction) { + await pgClient.query({ text: "rollback" }); + } + else { + await pgClient.query({ + text: `rollback to savepoint tx${txLevel === 0 ? "" : txLevel}`, + }); + } + } + catch (e2) { + console.error(`Error occurred whilst rolling back: ${e}`); + } + throw e; + } + }); + }, + query(opts) { + // Queries only need to queue if there's a queue already + if (queue || alwaysQueue) { + return addToQueue(doIt); + } + else { + return doIt(); + } + function doIt() { + const { text, name, values, arrayMode } = opts; + const queryObj = arrayMode + ? { + text, + values, + rowMode: "array", + } + : { + text, + values, + }; + if (PREPARED_STATEMENT_CACHE_SIZE > 0 && name != null) { + // Hacking into pgClient internals - this is dangerous, but it's the only way I know to get a prepared statement LRU + const connection = pgClient.connection; + if (connection && connection.parsedStatements) { + if (!connection._graphilePreparedStatementCache) { + connection._graphilePreparedStatementCache = new lru_1.default({ + maxLength: PREPARED_STATEMENT_CACHE_SIZE, + dispose(key) { + if (connection.parsedStatements[key]) { + pgClient + .query(`deallocate ${pgClient.escapeIdentifier(key)}`) + .then(() => { + delete connection.parsedStatements[key]; + }) + .catch((e) => { + // eslint-disable-next-line no-console + console.error("Error releasing prepared query", e); + }); + } + }, + }); + } + if (!connection._graphilePreparedStatementCache.get(name)) { + // We're relying on dispose to clear out the old ones. + connection._graphilePreparedStatementCache.set(name, true); + } + queryObj.name = name; + } + } + return pgClient.query(queryObj); + } + }, + }; +} +const $$queue = Symbol("tag"); +async function makeNodePostgresWithPgClient_inner(pgClient, pgSettings, callback, alwaysQueue, alreadyInTransaction) { + /** Transaction level; 0 = no transaction; 1 = begin; 2,... = savepoint */ + const pgSettingsEntries = []; + if (pgSettings != null) { + for (const [key, value] of Object.entries(pgSettings)) { + if (value == null) + continue; + pgSettingsEntries.push([key, "" + value]); + } + } + // PERF: under what situations is this actually required? We added it to + // force test queries that were sharing the same client to run in series + // rather than parallel (probably for the filter plugin test suite?) but it + // adds a tiny bit of overhead and most likely is only needed for people + // using makeWithPgClientViaPgClientAlreadyInTransaction. + while (pgClient[$$queue]) { + await pgClient[$$queue]; + } + return (pgClient[$$queue] = (async () => { + try { + // If there's pgSettings; create a transaction and set them, otherwise no transaction needed + if (pgSettingsEntries.length > 0) { + await pgClient.query({ + text: alreadyInTransaction ? "savepoint tx" : "begin", + }); + try { + await pgClient.query({ + text: "select set_config(el->>0, el->>1, true) from json_array_elements($1::json) el", + values: [JSON.stringify(pgSettingsEntries)], + }); + const client = newNodePostgresPgClient(pgClient, 1, alwaysQueue, alreadyInTransaction); + const result = await callback(client); + await pgClient.query({ + text: alreadyInTransaction ? "release savepoint tx" : "commit", + }); + return result; + } + catch (e) { + await pgClient.query({ + text: alreadyInTransaction + ? "rollback to savepoint tx" + : "rollback", + }); + throw e; + } + } + else { + const client = newNodePostgresPgClient(pgClient, 0, alwaysQueue, alreadyInTransaction); + return await callback(client); + } + } + finally { + pgClient[$$queue] = null; + } + })()); +} +/** + * Returns a `withPgClient` for the given `Pool` instance. + */ +function makePgAdaptorWithPgClient(pool, release = () => { }) { + const withPgClient = async (pgSettings, callback) => { + const pgClient = await pool.connect(); + if (!pgClient[$$isSetup]) { + pgClient[$$isSetup] = true; + if (!DONT_DISABLE_JIT) { + // We don't actually disable JIT, it's the optimization that's expensive so we disable that. + pgClient.query("set jit_optimize_above_cost = -1;").catch((e) => { + console.error(`Error occurred applying @dataplan/pg global Postgres settings: ${e}`); + }); + } + } + try { + return await makeNodePostgresWithPgClient_inner(pgClient, pgSettings, callback, false, false); + } + finally { + // NOTE: have decided not to `RESET ALL` here; otherwise timezone,jit,etc will reset + pgClient.release(); + } + }; + let released = false; + const releaseOnce = () => { + if (released) { + throw new Error("Release called twice on the same withPgClient"); + } + else { + released = true; + release(); + } + }; + withPgClient.release = releaseOnce; + return withPgClient; +} +/** + * Returns a `withPgClient` for the given `PoolClient` instance. ONLY + * SUITABLE FOR TESTS! + * + */ +function makeWithPgClientViaPgClientAlreadyInTransaction(pgClient, alreadyInTransaction = false) { + const release = () => { }; + const withPgClient = async (pgSettings, callback) => { + return makeNodePostgresWithPgClient_inner(pgClient, pgSettings, callback, + // Ensure only one withPgClient can run at a time, since we only have on pgClient. + true, alreadyInTransaction); + }; + let released = false; + const releaseOnce = () => { + if (released) { + throw new Error("Release called twice on the same withPgClient"); + } + else { + released = true; + release(); + } + }; + withPgClient.release = releaseOnce; + return withPgClient; +} +function createWithPgClient(options = Object.create(null), variant) { + if (variant === "SUPERUSER") { + if (options.superuserPool) { + return makePgAdaptorWithPgClient(options.superuserPool); + } + else if (options.superuserPoolClient) { + return makeWithPgClientViaPgClientAlreadyInTransaction(options.superuserPoolClient, options.superuserPoolClientIsInTransaction); + } + else if (options.superuserConnectionString) { + const pool = new PgPool({ + ...options.superuserPoolConfig, + connectionString: options.superuserConnectionString, + }); + const release = () => pool.end(); + return makePgAdaptorWithPgClient(pool, release); + } + // Otherwise, fall through to default handling + } + if (options.pool != null) { + return makePgAdaptorWithPgClient(options.pool); + } + else if (options.poolClient) { + return makeWithPgClientViaPgClientAlreadyInTransaction(options.poolClient, options.poolClientIsInTransaction); + } + else { + const pool = new PgPool({ + ...options.poolConfig, + connectionString: options.connectionString, + }); + const release = () => pool.end(); + return makePgAdaptorWithPgClient(pool, release); + } +} +// This is here as a TypeScript assertion, to ensure we conform to PgAdaptor +const adaptor = { + createWithPgClient, + makePgService, +}; +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); +/** + * This class provides helpers for Postgres' LISTEN/NOTIFY pub/sub + * implementation. We aggregate all LISTEN/NOTIFY events so that we can supply + * them all via a single pgClient. We grab and release this client from/to the + * pool automatically. If the Postgres connection is interrupted then we'll + * automatically reconnect and re-establish the LISTENs, however _events can be + * lost_ when this happens, so you should be careful that Postgres connections + * will not be prematurely terminated in general. + */ +class PgSubscriber { + constructor(pool) { + this.pool = pool; + this.topics = {}; + this.eventEmitter = new eventemitter3_1.default(); + this.alive = true; + this.recordNotification = (notification) => { + this.eventEmitter.emit(notification.channel, notification.payload); + }; + this.subscribedTopics = new Set(); + this.listeningClient = null; + this.listeningClientPromise = null; + // Avoid race conditions by chaining everything + this.promise = Promise.resolve(); + } + subscribe(topic) { + if (!this.alive) { + throw new Error("This PgSubscriber has been released."); + } + // eslint-disable-next-line @typescript-eslint/no-this-alias + const that = this; + const { eventEmitter, topics } = this; + const stack = []; + const queue = []; + let finished = false; + function doFinally(value) { + if (!finished) { + finished = { done: true, value }; + if (queue) { + const promises = queue.splice(0, queue.length); + promises.forEach((p) => p.resolve(finished)); + } + eventEmitter.removeListener(topic, recv); + // Every code path above this has to go through a `yield` and thus + // `asyncIterableIterator` will definitely be defined. + const idx = topics[topic]?.indexOf(asyncIterableIterator); + if (idx != null && idx >= 0) { + topics[topic].splice(idx, 1); + if (topics[topic].length === 0) { + delete topics[topic]; + that.unlisten(topic); + } + } + } + return finished; + } + const asyncIterableIterator = { + [Symbol.asyncIterator]() { + return this; + }, + async next() { + if (stack.length > 0) { + const value = await stack.shift(); + return { done: false, value }; + } + else if (finished) { + return finished; + } + else { + // This must be done synchronously - there must be **NO AWAIT BEFORE THIS** + const waiting = (0, grafast_1.defer)(); + queue.push(waiting); + const value = await waiting; + return { done: false, value }; + } + }, + async return(value) { + return doFinally(value); + }, + async throw() { + return doFinally(); + }, + }; + function recv(payload) { + if (queue.length > 0) { + const first = queue.shift(); + first.resolve(payload); + } + else { + stack.push(payload); + } + } + eventEmitter.addListener(topic, recv); + if (!topics[topic]) { + topics[topic] = [asyncIterableIterator]; + this.listen(topic); + } + else { + topics[topic].push(asyncIterableIterator); + } + return asyncIterableIterator; + } + listen(_topic) { + this.sync(); + } + unlisten(_topic) { + this.sync(); + } + sync() { + this.chain(async () => { + if (!this.alive) { + return; + } + const client = await this.getClient(); + await this.syncWithClient(client); + }).then(null, () => this.resetClient()); + } + async syncWithClient(client) { + if (!this.alive) { + throw new Error("PgSubscriber released; aborting syncWithClient"); + } + const expectedTopics = Object.keys(this.topics); + const topicsToAdd = expectedTopics.filter((t) => !this.subscribedTopics.has(t)); + const topicsToRemove = [...this.subscribedTopics.values()].filter((t) => !expectedTopics.includes(t)); + for (const topic of topicsToAdd) { + await client.query(`LISTEN ${client.escapeIdentifier(topic)}`); + this.subscribedTopics.add(topic); + } + for (const topic of topicsToRemove) { + await client.query(`UNLISTEN ${client.escapeIdentifier(topic)}`); + this.subscribedTopics.delete(topic); + } + } + resetClient() { + this.chain(() => { + if (!this.alive) { + return; + } + const client = this.listeningClient; + if (client !== null) { + client.off("notification", this.recordNotification); + client.release(); + this.listeningClient = null; + this.subscribedTopics.clear(); + if (this.listeningClientPromise) { + throw new Error("This should not occur (found listeningClientPromise in resetClient)"); + } + if (Object.keys(this.topics).length > 0) { + // Trigger a new client to be fetched and have it sync. + this.getClient().then(null, () => { + // Must be released; ignore + }); + } + } + }); + } + getClient() { + if (!this.alive) { + return Promise.reject(new Error("Released; aborting getClient")); + } + if (this.listeningClient) { + return Promise.resolve(this.listeningClient); + } + else { + if (!this.listeningClientPromise) { + const promise = (async () => { + for (let attempts = 0;; attempts++) { + try { + if (!this.alive) { + return Promise.reject(new Error("PgSubscriber released; aborting getClient")); + } + const logError = (e) => { + console.error(`Error on listening client: ${e}`); + }; + const client = await this.pool.connect(); + try { + client.on("error", logError); + client.on("notification", this.recordNotification); + await this.syncWithClient(client); + // All good; we can return this client finally! + this.listeningClientPromise = null; + this.listeningClient = client; + client.off("error", logError); + client.on("error", (e) => { + logError(e); + this.resetClient(); + }); + return client; + } + catch (e) { + client.off("error", logError); + client.off("notification", this.recordNotification); + client.release(); + throw e; + } + } + catch (e) { + console.error(`Error with listening client during getClient (attempt ${attempts + 1}): ${e}`); + // Exponential back-off (maximum 30 seconds) + await sleep(Math.min(100 * Math.exp(attempts), 30000)); + } + } + })(); + promise.then(null, () => { + /* ignore */ + }); + this.listeningClientPromise = promise; + return promise; + } + else { + return this.listeningClientPromise; + } + } + } + release() { + if (this.alive) { + this.alive = false; + for (const topic of Object.keys(this.topics)) { + for (const asyncIterableIterator of this.topics[topic]) { + if (asyncIterableIterator.return) { + asyncIterableIterator.return(); + } + else if (asyncIterableIterator.throw) { + asyncIterableIterator.throw(new Error("Released")); + } + else { + // What do we do now?! + // TYPES: if instead of using an AsyncIterableIterator we required it was an AsyncGenerator then this problem would go away. + console.error(`Could not return or throw from iterator for topic '${topic}'`); + } + } + delete this.topics[topic]; + } + const unlistenAndRelease = async (client) => { + try { + for (const topic of this.subscribedTopics) { + await client.query(`UNLISTEN ${client.escapeIdentifier(topic)}`); + this.subscribedTopics.delete(topic); + } + } + catch (e) { + // ignore + } + client.release(); + }; + if (this.listeningClient) { + unlistenAndRelease(this.listeningClient); + } + else if (this.listeningClientPromise) { + this.listeningClientPromise.then(unlistenAndRelease, () => { + /* ignore */ + }); + } + } + } + async chain(callback) { + this.promise = this.promise.then(callback, callback); + return this.promise; + } +} +exports.PgSubscriber = PgSubscriber; +function mkpool(name, releasers, poolConfig, connectionString) { + const pool = new PgPool({ ...poolConfig, connectionString }); + releasers.push(() => pool.end()); + // If you pass your own pool, you're responsible for doing this yourself + pool.on("connect", (client) => { + client.on("error", (e) => { + console.error(`Client error (active, ${name})`, e); + }); + }); + pool.on("error", (e) => { + console.error(`Client error (in pool, ${name})`, e); + }); + return pool; +} +function makePgService(options) { + const { name = "main", + // Begin: CommonPgAdaptorAndServiceSettings + pool: rawPool, poolConfig, connectionString, superuserPool: rawSuperuserPool, superuserPoolConfig, superuserConnectionString, + // End: CommonPgAdaptorAndServiceSettings + schemas, withPgClientKey = name === "main" ? "withPgClient" : `${name}_withPgClient`, pgSettingsKey = name === "main" ? "pgSettings" : `${name}_pgSettings`, pgSubscriberKey = name === "main" ? "pgSubscriber" : `${name}_pgSubscriber`, pubsub = true, pgSettings, pgSettingsForIntrospection, } = options; + if (pgSettings !== undefined && typeof pgSettingsKey !== "string") { + throw new Error(`makePgService called with pgSettings but no pgSettingsKey - please indicate where the settings should be stored, e.g. 'pgSettingsKey: "pgSettings"' (must be unique across sources)`); + } + const releasers = []; + const pool = rawPool ?? mkpool("pool", releasers, poolConfig, connectionString); + const superuserPool = rawSuperuserPool ?? + (superuserConnectionString + ? mkpool("superuserPool", releasers, superuserPoolConfig, superuserConnectionString) + : undefined); + let pgSubscriber = options.pgSubscriber ?? null; + if (!pgSubscriber && pubsub) { + pgSubscriber = new PgSubscriber(pool); + releasers.push(() => pgSubscriber.release?.()); + } + const service = { + name, + schemas: Array.isArray(schemas) ? schemas : [schemas ?? "public"], + withPgClientKey: withPgClientKey, + pgSettingsKey: pgSettingsKey, + pgSubscriberKey: pgSubscriberKey, + pgSettings, + pgSettingsForIntrospection, + pgSubscriber, + adaptor, + adaptorSettings: { + pool, + superuserPool, + }, + async release() { + // Release in reverse order + for (const releaser of [...releasers].reverse()) { + await releaser(); + } + }, + }; + return service; +} +//# sourceMappingURL=pg.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/adaptors/pg.js.map b/grafast/dataplan-pg/dist/adaptors/pg.js.map new file mode 100644 index 0000000000..9e8fe93db9 --- /dev/null +++ b/grafast/dataplan-pg/dist/adaptors/pg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pg.js","sourceRoot":"","sources":["../../src/adaptors/pg.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAkSH,8DA8CC;AAOD,0GA+BC;AA6BD,gDAqCC;AA8TD,sCA0EC;;AA9zBD,iIAAiI;AAEjI,4BAA0B;AAE1B,gEAAgC;AAChC,0EAAyC;AAEzC,qCAAgC;AAShC,+CAAyB;AA8BzB,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,IAAK,EAAU,CAAC,OAAO,EAAE,IAAI,CAAC;AAEpD,mFAAmF;AACnF,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,yCAAyC;IAC5E,CAAC,CAAC,QAAQ,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IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACtC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAa,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,OAAO,GACX;QACE,IAAI;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC;QACjE,eAAe,EAAE,eAAsB;QACvC,aAAa,EAAE,aAAoB;QACnC,eAAe,EAAE,eAAsB;QACvC,UAAU;QACV,0BAA0B;QAC1B,YAAY;QACZ,OAAO;QACP,eAAe,EAAE;YACf,IAAI;YACJ,aAAa;SACd;QACD,KAAK,CAAC,OAAO;YACX,2BAA2B;YAC3B,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;gBAChD,MAAM,QAAQ,EAAE,CAAC;YACnB,CAAC;QACH,CAAC;KACF,CAAC;IACJ,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/box.d.ts b/grafast/dataplan-pg/dist/codecUtils/box.d.ts new file mode 100644 index 0000000000..0c40aec357 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/box.d.ts @@ -0,0 +1,23 @@ +export interface PgBox { + a: { + x: number; + y: number; + }; + b: { + x: number; + y: number; + }; +} +/** + * Parses the Postgres box syntax. + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-BOX} + */ +export declare function parseBox(f: string): PgBox; +/** + * Stringifies a box to the Postgres box syntax. + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-BOX} + */ +export declare function stringifyBox(box: PgBox): string; +//# sourceMappingURL=box.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/box.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/box.d.ts.map new file mode 100644 index 0000000000..e9dde90d28 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/box.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../src/codecUtils/box.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAczC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,CAE/C"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/box.js b/grafast/dataplan-pg/dist/codecUtils/box.js new file mode 100644 index 0000000000..dfb1ce4494 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/box.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseBox = parseBox; +exports.stringifyBox = stringifyBox; +const grafast_1 = require("grafast"); +/** + * Parses the Postgres box syntax. + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-BOX} + */ +function parseBox(f) { + if (f[0] === "(" && f[f.length - 1] === ")") { + const [x1, y1, x2, y2] = f + .slice(1, f.length - 1) + .replace(/[()]/g, "") + .split(",") + .map((f) => parseFloat(f)); + return { + a: { x: x1, y: y1 }, + b: { x: x2, y: y2 }, + }; + } + else { + throw new grafast_1.SafeError(`Failed to parse box ${f}`); + } +} +/** + * Stringifies a box to the Postgres box syntax. + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-BOX} + */ +function stringifyBox(box) { + return `${box.a.x},${box.a.y},${box.b.x},${box.b.y}`; +} +//# sourceMappingURL=box.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/box.js.map b/grafast/dataplan-pg/dist/codecUtils/box.js.map new file mode 100644 index 0000000000..03d283ca57 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/box.js.map @@ -0,0 +1 @@ +{"version":3,"file":"box.js","sourceRoot":"","sources":["../../src/codecUtils/box.ts"],"names":[],"mappings":";;AAYA,4BAcC;AAOD,oCAEC;AAnCD,qCAAoC;AAOpC;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,CAAS;IAChC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC;aACvB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aACtB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aACpB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO;YACL,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;YACnB,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;SACpB,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAS,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,GAAU;IACrC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/circle.d.ts b/grafast/dataplan-pg/dist/codecUtils/circle.d.ts new file mode 100644 index 0000000000..a81637acc1 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/circle.d.ts @@ -0,0 +1,18 @@ +import type { PgPoint } from "./point.js"; +export interface PgCircle { + center: PgPoint; + radius: number; +} +/** + * Parses the Postgres circle syntax + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9} + */ +export declare function parseCircle(f: string): PgCircle; +/** + * Stringifies to the Postgres circle syntax + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9} + */ +export declare function stringifyCircle(circle: PgCircle): string; +//# sourceMappingURL=circle.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/circle.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/circle.d.ts.map new file mode 100644 index 0000000000..0553f3c663 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/circle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"circle.d.ts","sourceRoot":"","sources":["../../src/codecUtils/circle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ,CAc/C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CAExD"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/circle.js b/grafast/dataplan-pg/dist/codecUtils/circle.js new file mode 100644 index 0000000000..48bdbbad5e --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/circle.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseCircle = parseCircle; +exports.stringifyCircle = stringifyCircle; +const grafast_1 = require("grafast"); +const point_js_1 = require("./point.js"); +/** + * Parses the Postgres circle syntax + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9} + */ +function parseCircle(f) { + if (f[0] === "<" && f[f.length - 1] === ">") { + const [x, y, r] = f + .slice(1, f.length - 1) + .replace(/[()]/g, "") + .split(",") + .map((f) => parseFloat(f)); + return { + center: { x, y }, + radius: r, + }; + } + else { + throw new grafast_1.SafeError(`Failed to parse circle ${f}`); + } +} +/** + * Stringifies to the Postgres circle syntax + * + * @see {@link https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9} + */ +function stringifyCircle(circle) { + return `<${(0, point_js_1.stringifyPoint)(circle.center)},${circle.radius}>`; +} +//# sourceMappingURL=circle.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/circle.js.map b/grafast/dataplan-pg/dist/codecUtils/circle.js.map new file mode 100644 index 0000000000..c9b2411c55 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/circle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"circle.js","sourceRoot":"","sources":["../../src/codecUtils/circle.ts"],"names":[],"mappings":";;AAeA,kCAcC;AAOD,0CAEC;AAtCD,qCAAoC;AAGpC,yCAA4C;AAO5C;;;;GAIG;AACH,SAAgB,WAAW,CAAC,CAAS;IACnC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;aAChB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aACtB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aACpB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO;YACL,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;YAChB,MAAM,EAAE,CAAC;SACV,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAS,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,MAAgB;IAC9C,OAAO,IAAI,IAAA,yBAAc,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/hstore.d.ts b/grafast/dataplan-pg/dist/codecUtils/hstore.d.ts new file mode 100644 index 0000000000..fb60a7e22d --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/hstore.d.ts @@ -0,0 +1,16 @@ +export interface PgHStore { + [key: string]: string | null; +} +/** + * Parses the Postgres HStore syntax + * + * @see {@link https://www.postgresql.org/docs/14/hstore.html#id-1.11.7.25.5} + */ +export declare function parseHstore(hstoreString: string): PgHStore; +/** + * Stringifies to the Postgres HStore syntax + * + * @see {@link https://www.postgresql.org/docs/14/hstore.html#id-1.11.7.25.5} + */ +export declare function stringifyHstore(o: PgHStore | null): string | null; +//# sourceMappingURL=hstore.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/hstore.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/hstore.d.ts.map new file mode 100644 index 0000000000..9d4b17bfce --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/hstore.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hstore.d.ts","sourceRoot":"","sources":["../../src/codecUtils/hstore.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC9B;AAOD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAoI1D;AAUD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAiBjE"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/hstore.js b/grafast/dataplan-pg/dist/codecUtils/hstore.js new file mode 100644 index 0000000000..93b711c6bd --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/hstore.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseHstore = parseHstore; +exports.stringifyHstore = stringifyHstore; +const grafast_1 = require("grafast"); +// TESTS: need unit tests for this! +// NOTE: I've not tried running this and I was sleep-deprived when I wrote it. +// NOTE: I don't believe this is vulnerable to prototype polution since we do +// `Object.create(null)` and you can only set the value to a string or null. +/** + * Parses the Postgres HStore syntax + * + * @see {@link https://www.postgresql.org/docs/14/hstore.html#id-1.11.7.25.5} + */ +function parseHstore(hstoreString) { + const hstore = Object.create(null); + // Parse via a simple character-wise scanner + let mode = "EXPECT_KEY"; + let key = null; + let value = null; + for (let i = 0, l = hstoreString.length; i < l; i++) { + const char = hstoreString[i]; + switch (mode) { + case "EXPECT_KEY": { + if (/\s/.test(char)) { + continue; + } + else if (char === '"') { + mode = "KEY_QUOTES"; + key = ""; + } + else if (char === "\\") { + mode = "KEY_RAW"; + key = hstoreString[++i]; + } + else { + mode = "KEY_RAW"; + key = char; + } + break; + } + case "KEY_QUOTES": { + if (char === '"') { + mode = "EXPECT_ARROW"; + } + else if (char === "\\") { + key += hstoreString[++i]; + } + else { + key += char; + } + break; + } + case "KEY_RAW": { + if (/\s/.test(char)) { + mode = "EXPECT_ARROW"; + continue; + } + else if (char === "=" && hstoreString[i + 1] === ">") { + ++i; + mode = "EXPECT_VALUE"; + } + else if (char === "\\") { + key += hstoreString[++i]; + } + else { + key += char; + } + break; + } + case "EXPECT_ARROW": { + if (/\s/.test(char)) { + mode = "EXPECT_ARROW"; + continue; + } + else if (char === "=" && hstoreString[i + 1] === ">") { + ++i; + mode = "EXPECT_VALUE"; + } + else { + throw new grafast_1.SafeError("Invalid hstore value - expected '=>'"); + } + break; + } + case "EXPECT_VALUE": { + if (/\s/.test(char)) { + continue; + } + else if (char === '"') { + mode = "VALUE_QUOTES"; + value = ""; + } + else if (char === "\\") { + mode = "VALUE_RAW"; + value = hstoreString[++i]; + } + else { + mode = "VALUE_RAW"; + value = char; + } + break; + } + case "VALUE_QUOTES": { + if (char === '"') { + if (key == null) + throw new grafast_1.SafeError("No key"); + hstore[key] = value; + key = null; + value = null; + mode = "EXPECT_COMMA"; + } + else if (char === "\\") { + value += hstoreString[++i]; + } + else { + value += char; + } + break; + } + case "VALUE_RAW": { + if (char === "," || /\s/.test(char)) { + if (key == null) + throw new grafast_1.SafeError("No key"); + hstore[key] = value === "NULL" ? null : value; + key = null; + value = null; + mode = char === "," ? "EXPECT_KEY" : "EXPECT_COMMA"; + continue; + } + else if (char === "\\") { + value += hstoreString[++i]; + } + else { + value += char; + } + break; + } + case "EXPECT_COMMA": { + if (/\s/.test(char)) { + continue; + } + else if (char === ",") { + mode = "EXPECT_KEY"; + } + else { + throw new grafast_1.SafeError("Invalid hstore value - expected comma"); + } + break; + } + default: { + const never = mode; + throw new grafast_1.SafeError(`Reached invalid mode ${never}`); + } + } + } + if (key != null) { + hstore[key] = mode === "VALUE_RAW" && value === "NULL" ? null : value; + } + return hstore; +} +// To include a double quote or a backslash in a key or value, escape it with a +// backslash. [...] A value (but not a key) can be an SQL NULL. [...] +// Double-quote the NULL to treat it as the ordinary string “NULL”. +// -- https://www.postgresql.org/docs/14/static/hstore.html +function toHstoreString(str) { + return str == null ? "NULL" : '"' + str.replace(/(["\\])/g, "\\$1") + '"'; +} +/** + * Stringifies to the Postgres HStore syntax + * + * @see {@link https://www.postgresql.org/docs/14/hstore.html#id-1.11.7.25.5} + */ +function stringifyHstore(o) { + if (o == null) { + return null; + } + if (typeof o !== "object") { + throw new grafast_1.SafeError("Expected an hstore object"); + } + const keys = Object.keys(o); + const encodeKeyValue = (key) => { + const value = o[key]; + if (value == null) { + return `${toHstoreString(key)} => NULL`; + } + else { + return `${toHstoreString(key)} => ${toHstoreString(String(value))}`; + } + }; + return keys.map(encodeKeyValue).join(", "); +} +//# sourceMappingURL=hstore.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/hstore.js.map b/grafast/dataplan-pg/dist/codecUtils/hstore.js.map new file mode 100644 index 0000000000..5822d54bc7 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/hstore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hstore.js","sourceRoot":"","sources":["../../src/codecUtils/hstore.ts"],"names":[],"mappings":";;AAgBA,kCAoIC;AAeD,0CAiBC;AApLD,qCAAoC;AAMpC,mCAAmC;AACnC,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAE9E;;;;GAIG;AACH,SAAgB,WAAW,CAAC,YAAoB;IAC9C,MAAM,MAAM,GAAa,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7C,4CAA4C;IAC5C,IAAI,IAAI,GAQa,YAAY,CAAC;IAClC,IAAI,GAAG,GAAkB,IAAI,CAAC;IAC9B,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACpD,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAC7B,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,YAAY,CAAC,CAAC,CAAC;g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M,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACtE,CAAC;IACH,CAAC,CAAC;IACF,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/index.d.ts b/grafast/dataplan-pg/dist/codecUtils/index.d.ts new file mode 100644 index 0000000000..b6d35b1dac --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/index.d.ts @@ -0,0 +1,10 @@ +export * from "./box.js"; +export * from "./circle.js"; +export * from "./hstore.js"; +export * from "./interval.js"; +export * from "./line.js"; +export * from "./lseg.js"; +export * from "./path.js"; +export * from "./point.js"; +export * from "./polygon.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/index.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/index.d.ts.map new file mode 100644 index 0000000000..1f9ec48c7c --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codecUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/index.js b/grafast/dataplan-pg/dist/codecUtils/index.js new file mode 100644 index 0000000000..a0c5d1dbdc --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/index.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +tslib_1.__exportStar(require("./box.js"), exports); +tslib_1.__exportStar(require("./circle.js"), exports); +tslib_1.__exportStar(require("./hstore.js"), exports); +tslib_1.__exportStar(require("./interval.js"), exports); +tslib_1.__exportStar(require("./line.js"), exports); +tslib_1.__exportStar(require("./lseg.js"), exports); +tslib_1.__exportStar(require("./path.js"), exports); +tslib_1.__exportStar(require("./point.js"), exports); +tslib_1.__exportStar(require("./polygon.js"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/index.js.map b/grafast/dataplan-pg/dist/codecUtils/index.js.map new file mode 100644 index 0000000000..a29fbf8ba6 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codecUtils/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,sDAA4B;AAC5B,sDAA4B;AAC5B,wDAA8B;AAC9B,oDAA0B;AAC1B,oDAA0B;AAC1B,oDAA0B;AAC1B,qDAA2B;AAC3B,uDAA6B"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/interval.d.ts b/grafast/dataplan-pg/dist/codecUtils/interval.d.ts new file mode 100644 index 0000000000..3851bf1c5f --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/interval.d.ts @@ -0,0 +1,26 @@ +/** + * The representation of an 'interval' from Postgres. All entries are integers + * _except_ `seconds` which is floating point + */ +export interface PgInterval { + years: number; + months: number; + days: number; + hours: number; + minutes: number; + seconds: number; +} +/** + * Parses Postgres' 'interval' syntax. Note we only support + * `intervalstyle = 'postgres'` right now. + * + * @see {@link https://www.postgresql.org/docs/14/datatype-datetime.html#DATATYPE-INTERVAL-OUTPUT} + */ +export declare function parseInterval(interval: string): PgInterval; +/** + * Stringifies to Postgres' 'interval' syntax + * + * @see {@link https://www.postgresql.org/docs/14/datatype-datetime.html#DATATYPE-INTERVAL-INPUT} + */ +export declare function stringifyInterval(interval: PgInterval): string; +//# sourceMappingURL=interval.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/interval.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/interval.d.ts.map new file mode 100644 index 0000000000..58c5502e1e --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/interval.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interval.d.ts","sourceRoot":"","sources":["../../src/codecUtils/interval.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAuBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAe1D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAgB9D"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/interval.js b/grafast/dataplan-pg/dist/codecUtils/interval.js new file mode 100644 index 0000000000..f291b120e0 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/interval.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseInterval = parseInterval; +exports.stringifyInterval = stringifyInterval; +// Regexp construction enhanced from `postgres-interval`, which is licensed +// under the MIT license and is copyright (c) Ben Drucker +// (bendrucker.me). +const NUMBER = "([+-]?\\d+)"; +const YEAR = `${NUMBER}\\s+years?`; +const MONTH = `${NUMBER}\\s+mons?`; +const DAY = `${NUMBER}\\s+days?`; +// NOTE: PostgreSQL automatically overflows seconds into minutes and minutes +// into hours, so we can rely on minutes and seconds always being 2 digits +// (plus decimal for seconds). The overflow stops at hours - hours do not +// overflow into days, so could be arbitrarily long. +const TIME = "([+-])?(\\d+):(\\d\\d):(\\d\\d(?:\\.\\d{1,6})?)"; +const INTERVAL = new RegExp("^" + + // All parts of an interval are optional + [YEAR, MONTH, DAY, TIME].map((str) => "(?:" + str + ")?").join("\\s*") + + "$"); +/** + * Parses Postgres' 'interval' syntax. Note we only support + * `intervalstyle = 'postgres'` right now. + * + * @see {@link https://www.postgresql.org/docs/14/datatype-datetime.html#DATATYPE-INTERVAL-OUTPUT} + */ +function parseInterval(interval) { + const [, years, months, days, plusMinusTime, hours, minutes, seconds] = INTERVAL.exec(interval || "") || []; + const timeMultiplier = plusMinusTime === "-" ? -1 : 1; + return { + years: years ? parseInt(years, 10) : 0, + months: months ? parseInt(months, 10) : 0, + days: days ? parseInt(days, 10) : 0, + hours: hours ? timeMultiplier * parseInt(hours, 10) : 0, + minutes: minutes ? timeMultiplier * parseInt(minutes, 10) : 0, + // Seconds can be decimal; all other values are integer + seconds: seconds ? timeMultiplier * parseFloat(seconds) : 0, + }; +} +/** + * Stringifies to Postgres' 'interval' syntax + * + * @see {@link https://www.postgresql.org/docs/14/datatype-datetime.html#DATATYPE-INTERVAL-INPUT} + */ +function stringifyInterval(interval) { + const keys = [ + "seconds", + "minutes", + "hours", + "days", + "months", + "years", + ]; + const parts = []; + for (const key of keys) { + if (interval[key]) { + parts.push(`${interval[key]} ${key}`); + } + } + return parts.join(" ") || "0 seconds"; +} +//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/interval.js.map b/grafast/dataplan-pg/dist/codecUtils/interval.js.map new file mode 100644 index 0000000000..14ba0deeda --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/interval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../src/codecUtils/interval.ts"],"names":[],"mappings":";;AAwCA,sCAeC;AAOD,8CAgBC;AAjED,2EAA2E;AAC3E,+EAA+E;AAC/E,mBAAmB;AAEnB,MAAM,MAAM,GAAG,aAAa,CAAC;AAC7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EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,uDAAuD;QACvD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,QAAoB;IACpD,MAAM,IAAI,GAAG;QACX,SAAS;QACT,SAAS;QACT,OAAO;QACP,MAAM;QACN,QAAQ;QACR,OAAO;KACC,CAAC;IACX,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/line.d.ts b/grafast/dataplan-pg/dist/codecUtils/line.d.ts new file mode 100644 index 0000000000..59d325cec1 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/line.d.ts @@ -0,0 +1,23 @@ +export interface PgLine { + a: { + x: number; + y: number; + }; + b: { + x: number; + y: number; + }; +} +/** + * Parses the Postgres line syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LINE + */ +export declare function parseLine(f: string): PgLine; +/** + * Stringifies to the Postgres line syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LINE + */ +export declare function stringifyLine(line: PgLine): string; +//# sourceMappingURL=line.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/line.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/line.d.ts.map new file mode 100644 index 0000000000..57736cad2e --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/line.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/codecUtils/line.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAgB3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/line.js b/grafast/dataplan-pg/dist/codecUtils/line.js new file mode 100644 index 0000000000..ea610e3113 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/line.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseLine = parseLine; +exports.stringifyLine = stringifyLine; +const grafast_1 = require("grafast"); +/** + * Parses the Postgres line syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LINE + */ +function parseLine(f) { + if (f[0] === "{" && f[f.length - 1] === "}") { + const [A, B, C] = f + .slice(1, f.length - 1) + .split(",") + .map((f) => parseFloat(f)); + // Lines have the form Ax + By + C = 0. + // So if y = 0, Ax + C = 0; x = -C/A or if A is 0 then C = 0, x can be anything + // If x = 0, By + C = 0; y = -C/B or if B is 0 then C = 0, y can be anything + return { + a: { x: A === 0 ? 1 : -C / A, y: 0 }, + b: { x: 0, y: B === 0 ? 1 : -C / B }, + }; + } + else { + throw new grafast_1.SafeError(`Failed to parse line ${f}`); + } +} +/** + * Stringifies to the Postgres line syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LINE + */ +function stringifyLine(line) { + return `${line.a.x},${line.a.y},${line.b.x},${line.b.y}`; +} +//# sourceMappingURL=line.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/line.js.map b/grafast/dataplan-pg/dist/codecUtils/line.js.map new file mode 100644 index 0000000000..086a3a400e --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/line.js.map @@ -0,0 +1 @@ +{"version":3,"file":"line.js","sourceRoot":"","sources":["../../src/codecUtils/line.ts"],"names":[],"mappings":";;AAYA,8BAgBC;AAOD,sCAEC;AArCD,qCAAoC;AAOpC;;;;GAIG;AACH,SAAgB,SAAS,CAAC,CAAS;IACjC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;aAChB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aACtB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,uCAAuC;QACvC,+EAA+E;QAC/E,4EAA4E;QAC5E,OAAO;YACL,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;YACpC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;SACrC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAS,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAY;IACxC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/lseg.d.ts b/grafast/dataplan-pg/dist/codecUtils/lseg.d.ts new file mode 100644 index 0000000000..bb8c580aec --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/lseg.d.ts @@ -0,0 +1,23 @@ +export interface PgLseg { + a: { + x: number; + y: number; + }; + b: { + x: number; + y: number; + }; +} +/** + * Parses the Postgres line segment syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LSEG + */ +export declare function parseLseg(f: string): PgLseg; +/** + * Stringifies to the Postgres line segment syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LSEG + */ +export declare function stringifyLseg(lseg: PgLseg): string; +//# sourceMappingURL=lseg.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/lseg.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/lseg.d.ts.map new file mode 100644 index 0000000000..8478803ce4 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/lseg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lseg.d.ts","sourceRoot":"","sources":["../../src/codecUtils/lseg.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAc3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/lseg.js b/grafast/dataplan-pg/dist/codecUtils/lseg.js new file mode 100644 index 0000000000..74c672527c --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/lseg.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseLseg = parseLseg; +exports.stringifyLseg = stringifyLseg; +const grafast_1 = require("grafast"); +/** + * Parses the Postgres line segment syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LSEG + */ +function parseLseg(f) { + if (f[0] === "[" && f[f.length - 1] === "]") { + const [x1, y1, x2, y2] = f + .slice(1, f.length - 1) + .replace(/[()]/g, "") + .split(",") + .map((f) => parseFloat(f)); + return { + a: { x: x1, y: y1 }, + b: { x: x2, y: y2 }, + }; + } + else { + throw new grafast_1.SafeError(`Failed to parse lseg ${f}`); + } +} +/** + * Stringifies to the Postgres line segment syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#DATATYPE-LSEG + */ +function stringifyLseg(lseg) { + return `${lseg.a.x},${lseg.a.y},${lseg.b.x},${lseg.b.y}`; +} +//# sourceMappingURL=lseg.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/lseg.js.map b/grafast/dataplan-pg/dist/codecUtils/lseg.js.map new file mode 100644 index 0000000000..7fab4e8f64 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/lseg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lseg.js","sourceRoot":"","sources":["../../src/codecUtils/lseg.ts"],"names":[],"mappings":";;AAYA,8BAcC;AAOD,sCAEC;AAnCD,qCAAoC;AAOpC;;;;GAIG;AACH,SAAgB,SAAS,CAAC,CAAS;IACjC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC;aACvB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aACtB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aACpB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO;YACL,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;YACnB,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;SACpB,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAS,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAY;IACxC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/path.d.ts b/grafast/dataplan-pg/dist/codecUtils/path.d.ts new file mode 100644 index 0000000000..4e4462b99a --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/path.d.ts @@ -0,0 +1,18 @@ +import type { PgPoint } from "./point.js"; +export interface PgPath { + isOpen: boolean; + points: PgPoint[]; +} +/** + * Parses the Postgres path syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +export declare function parsePath(f: string): PgPath; +/** + * Stringifies to the Postgres path syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +export declare function stringifyPath(path: PgPath): string; +//# sourceMappingURL=path.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/path.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/path.d.ts.map new file mode 100644 index 0000000000..b95a1229a5 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/codecUtils/path.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CA2B3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/path.js b/grafast/dataplan-pg/dist/codecUtils/path.js new file mode 100644 index 0000000000..eab8f86b93 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/path.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parsePath = parsePath; +exports.stringifyPath = stringifyPath; +const grafast_1 = require("grafast"); +const point_js_1 = require("./point.js"); +/** + * Parses the Postgres path syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +function parsePath(f) { + let isOpen = null; + if (f[0] === "(" && f[f.length - 1] === ")") { + isOpen = false; + } + else if (f[0] === "[" && f[f.length - 1] === "]") { + isOpen = true; + } + if (isOpen !== null) { + const xsAndYs = f + .slice(1, f.length - 1) + .replace(/[()]/g, "") + .split(",") + .map((f) => parseFloat(f)); + if (xsAndYs.length % 2 !== 0) { + throw new grafast_1.SafeError("Invalid path representation"); + } + const points = []; + for (let i = 0, l = xsAndYs.length; i < l; i += 2) { + points.push({ x: xsAndYs[i], y: xsAndYs[i + 1] }); + } + return { + isOpen, + points, + }; + } + else { + throw new grafast_1.SafeError(`Failed to parse path ${f}`); + } +} +/** + * Stringifies to the Postgres path syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +function stringifyPath(path) { + const openParen = path.isOpen ? "[" : "("; + const closeParen = path.isOpen ? "]" : ")"; + return `${openParen}${path.points + .map(point_js_1.stringifyPoint) + .join(",")}${closeParen}`; +} +//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/path.js.map b/grafast/dataplan-pg/dist/codecUtils/path.js.map new file mode 100644 index 0000000000..c723b0ff17 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/codecUtils/path.ts"],"names":[],"mappings":";;AAeA,8BA2BC;AAOD,sCAMC;AAvDD,qCAAoC;AAGpC,yCAA4C;AAO5C;;;;GAIG;AACH,SAAgB,SAAS,CAAC,CAAS;IACjC,IAAI,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,GAAG,KAAK,CAAC;IACjB,CAAC;SAAM,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAA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AAC;IAC3C,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM;SAC9B,GAAG,CAAC,yBAAc,CAAC;SACnB,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,EAAE,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/point.d.ts b/grafast/dataplan-pg/dist/codecUtils/point.d.ts new file mode 100644 index 0000000000..c9dc66fe9a --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/point.d.ts @@ -0,0 +1,17 @@ +export interface PgPoint { + x: number; + y: number; +} +/** + * Parses the Postgres point syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.5 + */ +export declare function parsePoint(f: string): PgPoint; +/** + * Stringifies to the Postgres point syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.5 + */ +export declare function stringifyPoint(point: PgPoint): string; +//# sourceMappingURL=point.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/point.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/point.d.ts.map new file mode 100644 index 0000000000..dcc98c4dd1 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/point.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../src/codecUtils/point.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAU7C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/point.js b/grafast/dataplan-pg/dist/codecUtils/point.js new file mode 100644 index 0000000000..5535f8dc42 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/point.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parsePoint = parsePoint; +exports.stringifyPoint = stringifyPoint; +const grafast_1 = require("grafast"); +/** + * Parses the Postgres point syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.5 + */ +function parsePoint(f) { + if (f[0] === "(" && f[f.length - 1] === ")") { + const [x, y] = f + .slice(1, f.length - 1) + .split(",") + .map((f) => parseFloat(f)); + return { x, y }; + } + else { + throw new grafast_1.SafeError(`Failed to parse point ${f}`); + } +} +/** + * Stringifies to the Postgres point syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.5 + */ +function stringifyPoint(point) { + return `(${point.x},${point.y})`; +} +//# sourceMappingURL=point.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/point.js.map b/grafast/dataplan-pg/dist/codecUtils/point.js.map new file mode 100644 index 0000000000..149905478a --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/point.js.map @@ -0,0 +1 @@ +{"version":3,"file":"point.js","sourceRoot":"","sources":["../../src/codecUtils/point.ts"],"names":[],"mappings":";;AAYA,gCAUC;AAOD,wCAEC;AA/BD,qCAAoC;AAOpC;;;;GAIG;AACH,SAAgB,UAAU,CAAC,CAAS;IAClC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;aACb,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;aACtB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAS,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,KAAc;IAC3C,OAAO,IAAI,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/polygon.d.ts b/grafast/dataplan-pg/dist/codecUtils/polygon.d.ts new file mode 100644 index 0000000000..8de7e504a6 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/polygon.d.ts @@ -0,0 +1,17 @@ +import type { PgPoint } from "./point.js"; +export interface PgPolygon { + points: PgPoint[]; +} +/** + * Parses the Postgres polygon syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +export declare function parsePolygon(f: string): PgPolygon; +/** + * Stringifies to the Postgres polygon syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +export declare function stringifyPolygon(polygon: PgPolygon): string; +//# sourceMappingURL=polygon.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/polygon.d.ts.map b/grafast/dataplan-pg/dist/codecUtils/polygon.d.ts.map new file mode 100644 index 0000000000..ee4242a621 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/polygon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../../src/codecUtils/polygon.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAoBjD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAE3D"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/polygon.js b/grafast/dataplan-pg/dist/codecUtils/polygon.js new file mode 100644 index 0000000000..43d111bb96 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/polygon.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parsePolygon = parsePolygon; +exports.stringifyPolygon = stringifyPolygon; +const grafast_1 = require("grafast"); +const point_js_1 = require("./point.js"); +/** + * Parses the Postgres polygon syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +function parsePolygon(f) { + if (f[0] === "(" && f[f.length - 1] === ")") { + const xsAndYs = f + //.slice(1, f.length - 1) + .replace(/[()]/g, "") + .split(",") + .map((f) => parseFloat(f)); + if (xsAndYs.length % 2 !== 0) { + throw new grafast_1.SafeError("Invalid polygon representation"); + } + const points = []; + for (let i = 0, l = xsAndYs.length; i < l; i += 2) { + points.push({ x: xsAndYs[i], y: xsAndYs[i + 1] }); + } + return { + points, + }; + } + else { + throw new grafast_1.SafeError(`Failed to parse polygon`); + } +} +/** + * Stringifies to the Postgres polygon syntax. + * + * https://www.postgresql.org/docs/current/datatype-geometric.html#id-1.5.7.16.9 + */ +function stringifyPolygon(polygon) { + return polygon.points.map(point_js_1.stringifyPoint).join(","); +} +//# sourceMappingURL=polygon.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecUtils/polygon.js.map b/grafast/dataplan-pg/dist/codecUtils/polygon.js.map new file mode 100644 index 0000000000..3cb3db3162 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecUtils/polygon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polygon.js","sourceRoot":"","sources":["../../src/codecUtils/polygon.ts"],"names":[],"mappings":";;AAcA,oCAoBC;AAOD,4CAEC;AA3CD,qCAAoC;AAGpC,yCAA4C;AAM5C;;;;GAIG;AACH,SAAgB,YAAY,CAAC,CAAS;IACpC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,CAAC;YACf,yBAAyB;aACxB,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aACpB,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,mBAAS,CAAC,gCAAgC,CAAC,CAAC;QACxD,CAAC;QACD,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YAClD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,OAAO;YACL,MAAM;SACP,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,mBAAS,CAAC,yBAAyB,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,OAAkB;IACjD,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,yBAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecs.d.ts b/grafast/dataplan-pg/dist/codecs.d.ts new file mode 100644 index 0000000000..7501765c44 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecs.d.ts @@ -0,0 +1,239 @@ +import type { JSONValue } from "grafast"; +import type { SQL } from "pg-sql2"; +import type { PgBox, PgCircle, PgHStore, PgInterval, PgLine, PgLseg, PgPath, PgPoint, PgPolygon } from "./codecUtils/index.js"; +import type { PgExecutor } from "./executor.js"; +import type { PgCodec, PgCodecExtensions, PgCodecPolymorphism, PgEnumCodec, PgEnumValue } from "./interfaces.js"; +export type PgCodecAttributeViaExplicit = { + relation: string; + attribute: string; +}; +export type PgCodecAttributeVia = string | PgCodecAttributeViaExplicit; +/** @deprecated Use DataplanPg.PgCodecAttributeExtensions instead */ +export type PgCodecAttributeExtensions = DataplanPg.PgCodecAttributeExtensions; +export interface PgCodecAttribute { + /** + * How to translate to/from PG and how to cast. + */ + codec: TCodec; + /** + * Is the column/attribute guaranteed to not be null? + */ + notNull: TNotNull; + hasDefault?: boolean; + /** + * The SQL expression for a derivative attributes, e.g.: + * + * ```js + * expression: (alias) => sql`${alias}.first_name || ' ' || ${alias}.last_name` + * ``` + */ + expression?: (alias: SQL) => SQL; + /** + * If this attribute actually exists on a relation rather than locally, the name + * of the (unique) relation this attribute belongs to. + */ + via?: PgCodecAttributeVia; + /** + * If the attribute exists identically on a relation and locally (e.g. + * `posts.author_id` and `users.id` have exactly the same value due to a + * foreign key reference) then the plans can choose which one to grab. + * + * @remarks + * + * ``` + * create table users (id serial primary key); + * create table posts (id serial primary key, author_id int references users); + * create table comments (id serial primary key, user_id int references users); + * create table pets (id serial primary key, owner_id int references users); + * ``` + * + * Here: + * - posts.author_id *identical via* 'author.id' + * - comments.user_id *identical via* 'user.id' + * - pets.owner_id *identical via* 'owner.id' + * + * Note however that `users.id` is not *identical via* anything, because + * these are all plural relationships. So identicalVia is generally one-way + * (except in 1-to-1 relationships). + */ + identicalVia?: PgCodecAttributeVia; + /** + * Set this true if you're using column-level select privileges and there are + * roles accessible that do not have permission to select it. This will tell + * us not to auto-select it to more efficiently resolve row nullability + * questions - we'll only try when the user explicitly tells us to. + */ + restrictedAccess?: boolean; + description?: string; + extensions?: Partial; +} +export type PgCodecAttributes = TCodecMap; +export type ObjectFromPgCodecAttributes = { + [attributeName in keyof TAttributes]: TAttributes[attributeName] extends PgCodecAttribute ? UCodec extends PgCodec ? UNonNull extends true ? Exclude : UFromJs | null : never : never; +}; +export type PgRecordTypeCodecSpec = { + name: TName; + executor: PgExecutor; + identifier: SQL; + attributes: TAttributes; + polymorphism?: PgCodecPolymorphism; + description?: string; + extensions?: Partial; + isAnonymous?: boolean; +}; +/** + * Returns a PgCodec that represents a composite type (a type with + * attributes). + * + * name - the name of this type + * identifier - a pg-sql2 fragment that uniquely identifies this type, suitable to be fed after `::` into an SQL query. + * attributes - the attributes this composite type has + * extensions - an optional object that you can use to associate arbitrary data with this type + * isAnonymous - if true, this represents an "anonymous" type, typically the return value of a function or something like that. If this is true, then name and identifier are ignored. + */ +export declare function recordCodec(config: PgRecordTypeCodecSpec): PgCodec, undefined, undefined, undefined>; +export type PgEnumCodecSpec = { + name: TName; + identifier: SQL; + values: Array | TValue>; + description?: string; + extensions?: Partial; +}; +/** + * Returns a PgCodec that represents a Postgres enum type. + * + * - name - the name of the enum + * - identifier - a pg-sql2 fragment that uniquely identifies this type, suitable to be fed after `::` into an SQL query. + * - values - a list of the values that this enum can represent + * - extensions - an optional object that you can use to associate arbitrary data with this type + */ +export declare function enumCodec(config: PgEnumCodecSpec): PgEnumCodec; +export declare function isEnumCodec(t: PgCodec): t is PgEnumCodec; +type PgCodecTFromJavaScript> = TInnerCodec extends PgCodec ? UFromJs : any; +/** + * Given a PgCodec, this returns a new PgCodec that represents a list + * of the former. + * + * List codecs CANNOT BE NESTED - Postgres array types don't have defined + * dimensionality, so an array of an array of a type doesn't really make sense + * to Postgres, it being the same as an array of the type. + * + * @param innerCodec - the codec that represents the "inner type" of the array + * @param extensions - an optional object that you can use to associate arbitrary data with this type + * @param typeDelim - the delimeter used to separate entries in this list when Postgres stringifies it + * @param identifier - a pg-sql2 fragment that represents the name of this type + */ +export declare function listOfCodec, TName extends string = `${TInnerCodec extends PgCodec ? UName : never}[]`>(listedCodec: TInnerCodec, config?: { + description?: string; + extensions?: Partial; + typeDelim?: string; + identifier?: SQL; + name?: TName; +}): PgCodec[], TInnerCodec, undefined, undefined>; +/** + * Represents a PostgreSQL `DOMAIN` over the given codec + * + * @param innerCodec - the codec that represents the "inner type" of the domain + * @param name - the name of the domain + * @param identifier - a pg-sql2 fragment that represents the name of this type + * @param config - extra details about this domain + */ +export declare function domainOfCodec>(innerCodec: TInnerCodec, name: TName, identifier: SQL, config?: { + description?: string; + extensions?: Partial; + notNull?: boolean | null; +}): PgCodec ? U : any, TInnerCodec extends PgCodec ? U : any, undefined, TInnerCodec, undefined>; +interface PgRange { + start: { + value: T; + inclusive: boolean; + } | null; + end: { + value: T; + inclusive: boolean; + } | null; +} +/** + * Returns a PgCodec that represents a range of the given inner PgCodec + * type. + * + * @param innerCodec - the PgCodec that represents the bounds of this range + * @param name - the name of the range + * @param identifier - a pg-sql2 fragment that represents the name of this type + * @param config - extra details about this range + */ +export declare function rangeOfCodec>(innerCodec: TInnerCodec, name: TName, identifier: SQL, config?: { + description?: string; + extensions?: Partial; +}): PgCodec, undefined, undefined, TInnerCodec>; +/** + * Built in PostgreSQL types that we support; note the keys are the "ergonomic" + * names (like 'bigint'), but the values use the underlying PostgreSQL true + * names (those that would be found in the `pg_type` table). + */ +export declare const TYPES: { + readonly void: PgCodec<"void", undefined, string, void, undefined, undefined, undefined>; + readonly boolean: PgCodec<"bool", undefined, string, boolean, undefined, undefined, undefined>; + readonly int2: PgCodec<"int2", undefined, string, number, undefined, undefined, undefined>; + readonly int: PgCodec<"int4", undefined, string, number, undefined, undefined, undefined>; + readonly bigint: PgCodec<"int8", undefined, string, string, undefined, undefined, undefined>; + readonly float4: PgCodec<"float4", undefined, string, number, undefined, undefined, undefined>; + readonly float: PgCodec<"float8", undefined, string, number, undefined, undefined, undefined>; + readonly money: PgCodec<"money", undefined, string, string, undefined, undefined, undefined>; + readonly numeric: PgCodec<"numeric", undefined, string, string, undefined, undefined, undefined>; + readonly char: PgCodec<"char", undefined, string, string, undefined, undefined, undefined>; + readonly bpchar: PgCodec<"bpchar", undefined, string, string, undefined, undefined, undefined>; + readonly varchar: PgCodec<"varchar", undefined, string, string, undefined, undefined, undefined>; + readonly text: PgCodec<"text", undefined, string, string, undefined, undefined, undefined>; + readonly name: PgCodec<"name", undefined, string, string, undefined, undefined, undefined>; + readonly json: PgCodec<"json", undefined, string, JSONValue, undefined, undefined, undefined>; + readonly jsonb: PgCodec<"jsonb", undefined, string, JSONValue, undefined, undefined, undefined>; + readonly xml: PgCodec<"xml", undefined, string, string, undefined, undefined, undefined>; + readonly citext: PgCodec<"citext", undefined, string, string, undefined, undefined, undefined>; + readonly uuid: PgCodec<"uuid", undefined, string, string, undefined, undefined, undefined>; + readonly timestamp: PgCodec<"timestamp", undefined, string, string, undefined, undefined, undefined>; + readonly timestamptz: PgCodec<"timestamptz", undefined, string, string, undefined, undefined, undefined>; + readonly date: PgCodec<"date", undefined, string, string, undefined, undefined, undefined>; + readonly time: PgCodec<"time", undefined, string, string, undefined, undefined, undefined>; + readonly timetz: PgCodec<"timetz", undefined, string, string, undefined, undefined, undefined>; + readonly inet: PgCodec<"inet", undefined, string, string, undefined, undefined, undefined>; + readonly regproc: PgCodec<"regproc", undefined, string, string, undefined, undefined, undefined>; + readonly regprocedure: PgCodec<"regprocedure", undefined, string, string, undefined, undefined, undefined>; + readonly regoper: PgCodec<"regoper", undefined, string, string, undefined, undefined, undefined>; + readonly regoperator: PgCodec<"regoperator", undefined, string, string, undefined, undefined, undefined>; + readonly regclass: PgCodec<"regclass", undefined, string, string, undefined, undefined, undefined>; + readonly regtype: PgCodec<"regtype", undefined, string, string, undefined, undefined, undefined>; + readonly regrole: PgCodec<"regrole", undefined, string, string, undefined, undefined, undefined>; + readonly regnamespace: PgCodec<"regnamespace", undefined, string, string, undefined, undefined, undefined>; + readonly regconfig: PgCodec<"regconfig", undefined, string, string, undefined, undefined, undefined>; + readonly regdictionary: PgCodec<"regdictionary", undefined, string, string, undefined, undefined, undefined>; + readonly cidr: PgCodec<"cidr", undefined, string, string, undefined, undefined, undefined>; + readonly macaddr: PgCodec<"macaddr", undefined, string, string, undefined, undefined, undefined>; + readonly macaddr8: PgCodec<"macaddr8", undefined, string, string, undefined, undefined, undefined>; + readonly interval: PgCodec<"interval", undefined, string, PgInterval, undefined, undefined, undefined>; + readonly bit: PgCodec<"bit", undefined, string, string, undefined, undefined, undefined>; + readonly varbit: PgCodec<"varbit", undefined, string, string, undefined, undefined, undefined>; + readonly point: PgCodec<"point", undefined, string, PgPoint, undefined, undefined, undefined>; + readonly line: PgCodec<"line", undefined, string, PgLine, undefined, undefined, undefined>; + readonly lseg: PgCodec<"lseg", undefined, string, PgLseg, undefined, undefined, undefined>; + readonly box: PgCodec<"box", undefined, string, PgBox, undefined, undefined, undefined>; + readonly path: PgCodec<"path", undefined, string, PgPath, undefined, undefined, undefined>; + readonly polygon: PgCodec<"polygon", undefined, string, PgPolygon, undefined, undefined, undefined>; + readonly circle: PgCodec<"circle", undefined, string, PgCircle, undefined, undefined, undefined>; + readonly hstore: PgCodec<"hstore", undefined, string, PgHStore, undefined, undefined, undefined>; + readonly bytea: PgCodec<"bytea", undefined, string, Buffer, undefined, undefined, undefined>; +}; +/** + * For supported builtin type names ('void', 'bool', etc) that will be found in + * the `pg_catalog` table this will return a PgCodec. + */ +export declare function getCodecByPgCatalogTypeName(pgCatalogTypeName: string): PgCodec<"void", undefined, string, void, undefined, undefined, undefined> | PgCodec<"bool", undefined, string, boolean, undefined, undefined, undefined> | PgCodec<"int2", undefined, string, number, undefined, undefined, undefined> | PgCodec<"int4", undefined, string, number, undefined, undefined, undefined> | PgCodec<"int8", undefined, string, string, undefined, undefined, undefined> | PgCodec<"float4", undefined, string, number, undefined, undefined, undefined> | PgCodec<"float8", undefined, string, number, undefined, undefined, undefined> | PgCodec<"money", undefined, string, string, undefined, undefined, undefined> | PgCodec<"numeric", undefined, string, string, undefined, undefined, undefined> | PgCodec<"char", undefined, string, string, undefined, undefined, undefined> | PgCodec<"bpchar", undefined, string, string, undefined, undefined, undefined> | PgCodec<"varchar", undefined, string, string, undefined, undefined, undefined> | PgCodec<"text", undefined, string, string, undefined, undefined, undefined> | PgCodec<"name", undefined, string, string, undefined, undefined, undefined> | PgCodec<"json", undefined, string, JSONValue, undefined, undefined, undefined> | PgCodec<"jsonb", undefined, string, JSONValue, undefined, undefined, undefined> | PgCodec<"xml", undefined, string, string, undefined, undefined, undefined> | PgCodec<"uuid", undefined, string, string, undefined, undefined, undefined> | PgCodec<"timestamp", undefined, string, string, undefined, undefined, undefined> | PgCodec<"timestamptz", undefined, string, string, undefined, undefined, undefined> | PgCodec<"date", undefined, string, string, undefined, undefined, undefined> | PgCodec<"time", undefined, string, string, undefined, undefined, undefined> | PgCodec<"timetz", undefined, string, string, undefined, undefined, undefined> | PgCodec<"inet", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regproc", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regprocedure", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regoper", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regoperator", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regclass", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regtype", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regrole", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regnamespace", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regconfig", undefined, string, string, undefined, undefined, undefined> | PgCodec<"regdictionary", undefined, string, string, undefined, undefined, undefined> | PgCodec<"cidr", undefined, string, string, undefined, undefined, undefined> | PgCodec<"macaddr", undefined, string, string, undefined, undefined, undefined> | PgCodec<"macaddr8", undefined, string, string, undefined, undefined, undefined> | PgCodec<"interval", undefined, string, PgInterval, undefined, undefined, undefined> | PgCodec<"bit", undefined, string, string, undefined, undefined, undefined> | PgCodec<"varbit", undefined, string, string, undefined, undefined, undefined> | PgCodec<"point", undefined, string, PgPoint, undefined, undefined, undefined> | PgCodec<"line", undefined, string, PgLine, undefined, undefined, undefined> | PgCodec<"lseg", undefined, string, PgLseg, undefined, undefined, undefined> | PgCodec<"box", undefined, string, PgBox, undefined, undefined, undefined> | PgCodec<"path", undefined, string, PgPath, undefined, undefined, undefined> | PgCodec<"polygon", undefined, string, PgPolygon, undefined, undefined, undefined> | PgCodec<"circle", undefined, string, PgCircle, undefined, undefined, undefined> | PgCodec<"bytea", undefined, string, Buffer, undefined, undefined, undefined> | null; +export declare function getInnerCodec>(codec: TCodec): TCodec extends PgCodec ? Exclude : TCodec; +export declare function sqlValueWithCodec(value: unknown, codec: PgCodec): SQL; +export {}; +//# sourceMappingURL=codecs.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecs.d.ts.map b/grafast/dataplan-pg/dist/codecs.d.ts.map new file mode 100644 index 0000000000..d8b5f87ed1 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../src/codecs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,SAAS,CAAC;AAKhD,OAAO,KAAK,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACV,MAAM,uBAAuB,CAAC;AAoB/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EACV,OAAO,EACP,iBAAiB,EACjB,mBAAmB,EAGnB,WAAW,EACX,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAMzB,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;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,GAAG,EACH,SAAS,EACT,GAAG,EACH,SAAS,CACV,EAED,UAAU,EAAE,WAAW,EACvB,IAAI,EAAE,KAAK,EACX,UAAU,EAAE,GAAG,EACf,MAAM,GAAE;IACN,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACpC,GACL,OAAO,CACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,OAAO,CAAC,OAAO,CAAC,EAChB,SAAS,EACT,SAAS,EACT,WAAW,CACZ,CA+FA;AA8DD;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgIR,CAAC;AAMX;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,iBAAiB,EAAE,MAAM,yyHA6GpE;AAED,wBAAgB,aAAa,CAC3B,MAAM,SAAS,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAEpD,KAAK,EAAE,MAAM,GACZ,MAAM,SAAS,OAAO,CACvB,GAAG,EACH,GAAG,EACH,GAAG,EACH,MAAM,MAAM,EACZ,MAAM,OAAO,EACb,MAAM,MAAM,CACb,GACG,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,SAAS,CAAC,GAC7C,MAAM,CAWT;AAGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,OAI/D"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecs.js b/grafast/dataplan-pg/dist/codecs.js new file mode 100644 index 0000000000..67c18e76db --- /dev/null +++ b/grafast/dataplan-pg/dist/codecs.js @@ -0,0 +1,829 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TYPES = void 0; +exports.recordCodec = recordCodec; +exports.enumCodec = enumCodec; +exports.isEnumCodec = isEnumCodec; +exports.listOfCodec = listOfCodec; +exports.domainOfCodec = domainOfCodec; +exports.rangeOfCodec = rangeOfCodec; +exports.getCodecByPgCatalogTypeName = getCodecByPgCatalogTypeName; +exports.getInnerCodec = getInnerCodec; +exports.sqlValueWithCodec = sqlValueWithCodec; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importDefault(require("pg-sql2")); +const postgres_range_1 = require("postgres-range"); +const index_js_1 = require("./codecUtils/index.js"); +const inspect_js_1 = require("./inspect.js"); +const parseArray_js_1 = require("./parseArray.js"); +// PERF: `identity` can be shortcut +const identity = (value) => value; +/** + * Returns a PgCodec for the given builtin Postgres scalar type, optionally + * pass the following config: + * + * - castFromPg: how to wrap the SQL fragment that represents this type so that + * it's cast to a suitable type for us to receive via the relevant Postgres + * driver + * - listCastFromPg: as castFromPg, but for usage when the expression type is a + * list of this type + * - fromPg: parse the value from Postgres into JS format + * - toPg: serialize the value from JS into a format Postgres will understand + * + * param type - the name of the Postgres type - see the `pg_type` table + * param options - the configuration options described above + */ +function t() { + return (oid, type, options = {}) => { + const { castFromPg, listCastFromPg, fromPg, toPg, isBinary } = options; + return { + name: type, + sqlType: pg_sql2_1.default.identifier(...type.split(".")), + fromPg: fromPg ?? identity, + toPg: toPg ?? identity, + attributes: undefined, + extensions: { oid: oid }, + castFromPg, + listCastFromPg, + executor: null, + isBinary, + [inspect_js_1.inspect.custom]: codecInspect, + }; + }; +} +/** + * | To put a double quote or backslash in a quoted composite field value, + * | precede it with a backslash. + */ +function pgWrapQuotesInCompositeValue(str) { + return `"${str.replace(/["\\]/g, "\\$&")}"`; +} +function toRecordString(val) { + if (val == null) { + return ""; + } + else if (typeof val === "boolean") { + return val ? "t" : "f"; + } + else if (typeof val === "number") { + return "" + val; + } + else if ( + // essentially Array.isArray in this context + typeof val === "object") { + const parts = val.map((v) => toListString(v)); + return `{${parts.join(",")}}`; + } + else if (/[(),"\\]/.test(val) || val.length === 0) { + /* + * The Postgres manual states: + * + * > You can put double quotes around any field value, and must do so if + * > it contains commas or parentheses. + * + * Also: + * + * > In particular, fields containing parentheses, commas, double quotes, + * > or backslashes must be double-quoted. [...] Alternatively, you can + * > avoid quoting and use backslash-escaping to protect all data + * > characters that would otherwise be taken as composite syntax. + * + * We're going to go with double quoting. + */ + return pgWrapQuotesInCompositeValue(val); + } + else { + return "" + val; + } +} +function pgWrapQuotesInArray(str) { + return `"${str.replace(/["\\]/g, "\\$&")}"`; +} +function toListString(val) { + if (val == null) { + return "NULL"; + } + else if (typeof val === "boolean") { + return val ? "t" : "f"; + } + else if (typeof val === "number") { + return "" + val; + } + else if ( + // essentially Array.isArray in this context + typeof val === "object") { + const parts = val.map((v) => toListString(v)); + return `{${parts.join(",")}}`; + } + else { + return pgWrapQuotesInArray(val); + } +} +// TESTS: this needs unit tests! +/** + * Parses a PostgreSQL record string (e.g. `(1,2, hi)`) into a tuple (e.g. + * `["1", "2", " hi"]`). + * + * Postgres says: + * + * | The composite output routine will put double quotes around field values if + * | they are empty strings or contain parentheses, commas, double quotes, + * | backslashes, or white space. (Doing so for white space is not essential, + * | but aids legibility.) Double quotes and backslashes embedded in field + * | values will be doubled. + * + * @see {@link https://www.postgresql.org/docs/current/rowtypes.html#id-1.5.7.24.6} + */ +function recordStringToTuple(value) { + if (!value.startsWith("(") || !value.endsWith(")")) { + throw new Error(`Unsupported record string '${value}'`); + } + let inQuotes = false; + let current = null; + const tuple = []; + // We only need to loop inside the parenthesis. Whitespace is significant in here. + for (let i = 1, l = value.length - 1; i < l; i++) { + const char = value[i]; + if (inQuotes) { + if (current === null) { + throw new Error("Impossible?"); + } + if (char === '"') { + // '""' is an escape for '"' + if (value[i + 1] === '"') { + current += value[++i]; + } + else { + inQuotes = false; + // Expect comma or end + } + } + else if (char === "\\") { + // Backslash is literal escape + current += value[++i]; + } + else { + current += char; + } + } + else if (char === '"') { + if (current !== null) { + throw new Error(`Invalid record string attempts to open quotes when value already exists '${value}'`); + } + inQuotes = true; + current = ""; + } + else if (char === ",") { + tuple.push(current); + current = null; + } + else if (current !== null) { + current += char; + } + else { + current = char; + } + } + if (inQuotes) { + throw new Error(`Invalid record string; exits whilst still in quote marks '${value}'`); + } + tuple.push(current); + return tuple; +} +function realAttributeDefs(attributes) { + const attributeDefs = Object.entries(attributes); + return attributeDefs.filter(([_attributeName, spec]) => !spec.expression && !spec.via); +} +/** + * Takes a list of attributes and returns a mapping function that takes a + * composite value and turns it into a string that PostgreSQL could process as + * the composite value. + * + * @see {@link https://www.postgresql.org/docs/current/rowtypes.html#id-1.5.7.24.6} + */ +function makeRecordToSQLRawValue(attributes) { + const attributeDefs = realAttributeDefs(attributes); + return (value) => { + const values = attributeDefs.map(([attributeName, spec]) => { + const v = value[attributeName]; + const val = v == null ? null : spec.codec.toPg(v); + return toRecordString(val); + }); + return `(${values.join(",")})`; + }; +} +/** + * Takes a list of attributes and returns a mapping function that takes a + * PostgreSQL record string value (e.g. `(1,2,"hi")`) and turns it into a + * JavaScript object. If `asJSON` is true, then instead of a record string value, + * we expect a JSON array value (typically due to casting). + * + * @see {@link https://www.postgresql.org/docs/current/rowtypes.html#id-1.5.7.24.6} + */ +function makeSQLValueToRecord(attributes, asJSON = false) { + const attributeDefs = realAttributeDefs(attributes); + const attributeCount = attributeDefs.length; + return (value) => { + const tuple = asJSON ? JSON.parse(value) : recordStringToTuple(value); + const record = Object.create(null); + for (let i = 0; i < attributeCount; i++) { + const [attributeName, spec] = attributeDefs[i]; + const entry = tuple[i]; + record[attributeName] = entry == null ? null : spec.codec.fromPg(entry); + } + return record; + }; +} +const codecInspect = function () { + const type = this.domainOfCodec + ? `DomainCodec<${this.domainOfCodec.name}>` + : this.arrayOfCodec + ? `ListCodec<${this.arrayOfCodec.name}[]>` + : this.rangeOfCodec + ? `RangeCodec<${this.rangeOfCodec.name}>` + : this.attributes + ? `RecordCodec` + : "Codec"; + return `${type}(${this.name})`; +}; +/** + * Returns a PgCodec that represents a composite type (a type with + * attributes). + * + * name - the name of this type + * identifier - a pg-sql2 fragment that uniquely identifies this type, suitable to be fed after `::` into an SQL query. + * attributes - the attributes this composite type has + * extensions - an optional object that you can use to associate arbitrary data with this type + * isAnonymous - if true, this represents an "anonymous" type, typically the return value of a function or something like that. If this is true, then name and identifier are ignored. + */ +function recordCodec(config) { + const { name, identifier, attributes, polymorphism, description, extensions, isAnonymous = false, executor, } = config; + return { + name, + sqlType: identifier, + isAnonymous, + ...makeRecordCodecToFrom(name, attributes), + attributes, + polymorphism, + description, + extensions, + executor, + [inspect_js_1.inspect.custom]: codecInspect, + }; +} +(0, grafast_1.exportAs)("@dataplan/pg", recordCodec, "recordCodec"); +function listCastViaUnnest(name, frag, castFromPg, guaranteedNotNull) { + const identifier = pg_sql2_1.default.identifier(Symbol(name)); + const arraySql = (0, pg_sql2_1.default) `array(${pg_sql2_1.default.indent((0, pg_sql2_1.default) `select ${castFromPg(identifier)}\nfrom unnest(${frag}) ${identifier}`)})::text`; + if (guaranteedNotNull) { + return arraySql; + } + else { + return (0, pg_sql2_1.default) `(case when (${frag}) is not distinct from null then null::text else ${arraySql} end)`; + } +} +function makeRecordCodecToFrom(name, attributes) { + const attributeDefs = realAttributeDefs(attributes); + if (attributeDefs.some(([_attrName, attr]) => attr.codec.castFromPg)) { + const castFromPg = (fragment) => { + return (0, pg_sql2_1.default) `case when (${fragment}) is not distinct from null then null::text else json_build_array(${pg_sql2_1.default.join(attributeDefs.map(([attrName, attr]) => { + const expr = (0, pg_sql2_1.default) `((${fragment}).${pg_sql2_1.default.identifier(attrName)})`; + if (attr.codec.castFromPg) { + return attr.codec.castFromPg(expr, attr.codec.notNull); + } + else { + return (0, pg_sql2_1.default) `(${expr})::text`; + } + }), ", ")})::text end`; + }; + return { + castFromPg, + listCastFromPg(frag, guaranteedNotNull) { + return listCastViaUnnest(name, frag, castFromPg, guaranteedNotNull); + }, + fromPg: makeSQLValueToRecord(attributes, true), + toPg: makeRecordToSQLRawValue(attributes), + }; + } + else { + return { + fromPg: makeSQLValueToRecord(attributes), + toPg: makeRecordToSQLRawValue(attributes), + }; + } +} +/** + * Returns a PgCodec that represents a Postgres enum type. + * + * - name - the name of the enum + * - identifier - a pg-sql2 fragment that uniquely identifies this type, suitable to be fed after `::` into an SQL query. + * - values - a list of the values that this enum can represent + * - extensions - an optional object that you can use to associate arbitrary data with this type + */ +function enumCodec(config) { + const { name, identifier, values, description, extensions } = config; + return { + name, + sqlType: identifier, + fromPg: identity, + toPg: identity, + values: values.map((value) => typeof value === "string" ? { value } : value), + attributes: undefined, + description, + extensions, + executor: null, + }; +} +(0, grafast_1.exportAs)("@dataplan/pg", enumCodec, "enumCodec"); +function isEnumCodec(t) { + return "values" in t; +} +const $$listCodec = Symbol("listCodec"); +/** + * Given a PgCodec, this returns a new PgCodec that represents a list + * of the former. + * + * List codecs CANNOT BE NESTED - Postgres array types don't have defined + * dimensionality, so an array of an array of a type doesn't really make sense + * to Postgres, it being the same as an array of the type. + * + * @param innerCodec - the codec that represents the "inner type" of the array + * @param extensions - an optional object that you can use to associate arbitrary data with this type + * @param typeDelim - the delimeter used to separate entries in this list when Postgres stringifies it + * @param identifier - a pg-sql2 fragment that represents the name of this type + */ +function listOfCodec(listedCodec, config) { + const innerCodec = listedCodec; + if (!config && innerCodec[$$listCodec]) { + return innerCodec[$$listCodec]; + } + const { description, extensions, identifier = (0, pg_sql2_1.default) `${listedCodec.sqlType}[]`, typeDelim = `,`, name = `${innerCodec.name}[]`, } = config ?? {}; + const { fromPg: innerCodecFromPg, toPg: innerCodecToPg, listCastFromPg: innerCodecListCastFromPg, notNull: innerCodecNotNull, executor, } = innerCodec; + const listCodec = { + name, + sqlType: identifier, + fromPg: innerCodecFromPg === identity + ? parseArray_js_1.parseArray + : (0, parseArray_js_1.makeParseArrayWithTransform)(innerCodecFromPg), + toPg: (value) => { + let result = "{"; + for (let i = 0, l = value.length; i < l; i++) { + if (i > 0) { + result += typeDelim; + } + const v = value[i]; + if (v == null) { + result += "NULL"; + continue; + } + const str = innerCodecToPg(v); + if (str == null) { + result += "NULL"; + continue; + } + if (typeof str !== "string" && typeof str !== "number") { + throw new Error(`Do not know how to encode ${(0, inspect_js_1.inspect)(str)} to an array (send a PR!)`); + } + // > To put a double quote or backslash in a quoted array element + // > value, precede it with a backslash. + // -- https://www.postgresql.org/docs/current/arrays.html#ARRAYS-IO + result += `"${String(str).replace(/[\\"]/g, "\\$&")}"`; + } + result += "}"; + return result; + }, + attributes: undefined, + description, + extensions, + arrayOfCodec: innerCodec, + ...(innerCodecListCastFromPg + ? { + castFromPg: innerCodecListCastFromPg, + listCastFromPg(frag, guaranteedNotNull) { + return listCastViaUnnest(`${name}_item`, frag, (identifier) => innerCodecListCastFromPg.call(this, identifier, innerCodecNotNull), guaranteedNotNull); + }, + } + : null), + executor: executor, + [inspect_js_1.inspect.custom]: codecInspect, + }; + if (!config) { + // Memoize such that every `listOfCodec(foo)` returns the same object. + Object.defineProperty(innerCodec, $$listCodec, { value: listCodec }); + } + return listCodec; +} +(0, grafast_1.exportAs)("@dataplan/pg", listOfCodec, "listOfCodec"); +/** + * Represents a PostgreSQL `DOMAIN` over the given codec + * + * @param innerCodec - the codec that represents the "inner type" of the domain + * @param name - the name of the domain + * @param identifier - a pg-sql2 fragment that represents the name of this type + * @param config - extra details about this domain + */ +function domainOfCodec(innerCodec, name, identifier, config = {}) { + const { description, extensions, notNull } = config; + return { + // Generally same as underlying type: + ...innerCodec, + // Overriding: + name, + sqlType: identifier, + description, + extensions, + domainOfCodec: innerCodec.arrayOfCodec ? undefined : innerCodec, + notNull: Boolean(notNull), + [inspect_js_1.inspect.custom]: codecInspect, + }; +} +(0, grafast_1.exportAs)("@dataplan/pg", domainOfCodec, "domainOfCodec"); +/** + * @see {@link https://www.postgresql.org/docs/14/rangetypes.html#RANGETYPES-IO} + * + * @internal + */ +function escapeRangeValue(value, innerCodec) { + if (value == null) { + return ""; + } + const encoded = "" + (innerCodec.toPg(value) ?? ""); + // PERF: we don't always need to do this + return `"${encoded.replace(/"/g, '""')}"`; +} +/** + * Returns a PgCodec that represents a range of the given inner PgCodec + * type. + * + * @param innerCodec - the PgCodec that represents the bounds of this range + * @param name - the name of the range + * @param identifier - a pg-sql2 fragment that represents the name of this type + * @param config - extra details about this range + */ +function rangeOfCodec(innerCodec, name, identifier, config = {}) { + const { description, extensions } = config; + const needsCast = innerCodec.castFromPg; + const castFromPg = needsCast + ? function castFromPg(frag) { + return (0, pg_sql2_1.default) `json_build_array(${pg_sql2_1.default.indent((0, pg_sql2_1.default) `lower_inc(${frag}),\n${innerCodec.castFromPg((0, pg_sql2_1.default) `lower(${frag})`, innerCodec.notNull)},\n${innerCodec.castFromPg((0, pg_sql2_1.default) `upper(${frag})`, innerCodec.notNull)},\nupper_inc(${frag})`)})::text`; + } + : null; + return { + name, + sqlType: identifier, + description, + extensions, + rangeOfCodec: innerCodec, + ...(castFromPg + ? { + castFromPg, + listCastFromPg(frag, guaranteedNotNull) { + return listCastViaUnnest(name, frag, castFromPg, guaranteedNotNull); + }, + } + : null), + fromPg: needsCast + ? function (value) { + const json = JSON.parse(value); + return { + start: json[1] != null + ? { + value: innerCodec.fromPg(json[1]), + inclusive: !!json[0], + } + : null, + end: json[2] != null + ? { + value: innerCodec.fromPg(json[2]), + inclusive: !!json[3], + } + : null, + }; + } + : function (value) { + const parsed = (0, postgres_range_1.parse)(value); + return { + start: parsed.lower != null + ? { + value: innerCodec.fromPg(parsed.lower), + inclusive: parsed.isLowerBoundClosed(), + } + : null, + end: parsed.upper != null + ? { + value: innerCodec.fromPg(parsed.upper), + inclusive: parsed.isUpperBoundClosed(), + } + : null, + }; + }, + toPg(value) { + let str = ""; + if (value.start == null) { + str += "("; + } + else { + str += `${value.start.inclusive ? "[" : "("}${escapeRangeValue(value.start.value, innerCodec)}`; + } + str += ","; + if (value.end == null) { + str += ")"; + } + else { + str += `${escapeRangeValue(value.end.value, innerCodec)}${value.end.inclusive ? "]" : ")"}`; + } + return str; + }, + attributes: undefined, + executor: innerCodec.executor, + [inspect_js_1.inspect.custom]: codecInspect, + }; +} +(0, grafast_1.exportAs)("@dataplan/pg", rangeOfCodec, "rangeOfCodec"); +/** + * When we can use the raw representation directly, typically suitable for + * text, varchar, char, etc + */ +const verbatim = { + castFromPg: (frag) => frag, +}; +/** + * Casts to something else before casting to text; e.g. `${expression}::numeric::text` + */ +const castVia = (via) => ({ + castFromPg(frag) { + return (0, pg_sql2_1.default) `${pg_sql2_1.default.parens(frag)}::${via}::text`; + }, + listCastFromPg(frag) { + return (0, pg_sql2_1.default) `${pg_sql2_1.default.parens(frag)}::${via}[]::text[]::text`; + }, +}); +const viaNumeric = castVia((0, pg_sql2_1.default) `numeric`); +// const viaJson = castVia(sql`json`); +/** + * Casts using to_char to format dates; also handles arrays via unnest. + */ +const viaDateFormat = (format, prefix = pg_sql2_1.default.blank) => { + const sqlFormat = pg_sql2_1.default.literal(format); + function castFromPg(frag) { + return (0, pg_sql2_1.default) `to_char(${prefix}${frag}, ${sqlFormat}::text)`; + } + return { + castFromPg, + listCastFromPg(frag, guaranteedNotNull) { + return listCastViaUnnest("entry", frag, castFromPg, guaranteedNotNull); + }, + }; +}; +const parseAsTrustedInt = (n) => +n; +const jsonParse = (s) => JSON.parse(s); +const jsonStringify = (o) => JSON.stringify(o); +const stripSubnet32 = { + fromPg(value) { + return value.replace(/\/(32|128)$/, ""); + }, +}; +/** + * Built in PostgreSQL types that we support; note the keys are the "ergonomic" + * names (like 'bigint'), but the values use the underlying PostgreSQL true + * names (those that would be found in the `pg_type` table). + */ +exports.TYPES = { + void: t()("2278", "void"), // void: 2278 + boolean: t()("16", "bool", { + fromPg: (value) => value[0] === "t", + toPg: (v) => { + if (v === true) { + return "t"; + } + else if (v === false) { + return "f"; + } + else { + throw new Error(`${v} isn't a boolean; cowardly refusing to cast it to postgres`); + } + }, + }), + int2: t()("21", "int2", { fromPg: parseAsTrustedInt }), + int: t()("23", "int4", { fromPg: parseAsTrustedInt }), + bigint: t()("20", "int8"), + float4: t()("700", "float4", { fromPg: parseFloat }), + float: t()("701", "float8", { fromPg: parseFloat }), + money: t()("790", "money", viaNumeric), + numeric: t()("1700", "numeric"), + char: t()("18", "char", verbatim), + bpchar: t()("1042", "bpchar", verbatim), + varchar: t()("1043", "varchar", verbatim), + text: t()("25", "text", verbatim), + name: t()("19", "name", verbatim), + json: t()("114", "json", { + fromPg: jsonParse, + toPg: jsonStringify, + }), + jsonb: t()("3802", "jsonb", { + fromPg: jsonParse, + toPg: jsonStringify, + }), + xml: t()("142", "xml"), + citext: t()(undefined, "citext", verbatim), + uuid: t()("2950", "uuid", verbatim), + timestamp: t()("1114", "timestamp", viaDateFormat('YYYY-MM-DD"T"HH24:MI:SS.US')), + timestamptz: t()("1184", "timestamptz", viaDateFormat('YYYY-MM-DD"T"HH24:MI:SS.USTZH:TZM')), + date: t()("1082", "date", viaDateFormat("YYYY-MM-DD")), + time: t()("1083", "time", viaDateFormat("HH24:MI:SS.US", (0, pg_sql2_1.default) `date '1970-01-01' + `)), + timetz: t()("1266", "timetz", viaDateFormat("HH24:MI:SS.USTZH:TZM", (0, pg_sql2_1.default) `date '1970-01-01' + `)), + inet: t()("869", "inet", stripSubnet32), + regproc: t()("24", "regproc"), + regprocedure: t()("2202", "regprocedure"), + regoper: t()("2203", "regoper"), + regoperator: t()("2204", "regoperator"), + regclass: t()("2205", "regclass"), + regtype: t()("2206", "regtype"), + regrole: t()("4096", "regrole"), + regnamespace: t()("4089", "regnamespace"), + regconfig: t()("3734", "regconfig"), + regdictionary: t()("3769", "regdictionary"), + cidr: t()("650", "cidr"), + macaddr: t()("829", "macaddr"), + macaddr8: t()("774", "macaddr8"), + interval: t()("1186", "interval", { + ...viaDateFormat(`YYYY_MM_DD_HH24_MI_SS.US`), + fromPg(value) { + const parts = value.split("_").map(parseFloat); + // Note these are actually all integers except for `seconds`. + const [years, months, days, hours, minutes, seconds] = parts; + return { years, months, days, hours, minutes, seconds }; + }, + toPg: index_js_1.stringifyInterval, + }), + bit: t()("1560", "bit"), + varbit: t()("1562", "varbit"), + point: t()("600", "point", { + fromPg: index_js_1.parsePoint, + toPg: index_js_1.stringifyPoint, + }), + line: t()("628", "line", { fromPg: index_js_1.parseLine, toPg: index_js_1.stringifyLine }), + lseg: t()("601", "lseg", { fromPg: index_js_1.parseLseg, toPg: index_js_1.stringifyLseg }), + box: t()("603", "box", { fromPg: index_js_1.parseBox, toPg: index_js_1.stringifyBox }), + path: t()("602", "path", { fromPg: index_js_1.parsePath, toPg: index_js_1.stringifyPath }), + polygon: t()("604", "polygon", { + fromPg: index_js_1.parsePolygon, + toPg: index_js_1.stringifyPolygon, + }), + circle: t()("718", "circle", { + fromPg: index_js_1.parseCircle, + toPg: index_js_1.stringifyCircle, + }), + hstore: t()(undefined, "hstore", { + fromPg: index_js_1.parseHstore, + toPg: index_js_1.stringifyHstore, + }), + bytea: t()("17", "bytea", { + fromPg(str) { + // The bytea type supports two formats for input and output: “hex” + // format and PostgreSQL's historical “escape” format. Both of these + // are always accepted on input. The output format depends on the + // configuration parameter bytea_output; the default is hex. + // -- https://www.postgresql.org/docs/current/datatype-binary.html + if (str.startsWith("\\x")) { + // Hex format + return Buffer.from(str.substring(2), "hex"); + } + else { + // ENHANCE: consider supporting this + throw new Error(`PostgreSQL bytea escape format is currently unsupported, please use \`bytea_output = 'hex'\` in your PostgreSQL configuration.`); + } + }, + toPg(data) { + return `\\x${data.toString("hex")}`; + }, + isBinary: true, + }), +}; +(0, grafast_1.exportAs)("@dataplan/pg", exports.TYPES, "TYPES"); +for (const [name, codec] of Object.entries(exports.TYPES)) { + (0, grafast_1.exportAs)("@dataplan/pg", codec, ["TYPES", name]); +} +/** + * For supported builtin type names ('void', 'bool', etc) that will be found in + * the `pg_catalog` table this will return a PgCodec. + */ +function getCodecByPgCatalogTypeName(pgCatalogTypeName) { + switch (pgCatalogTypeName) { + case "void": + return exports.TYPES.void; + case "bool": + return exports.TYPES.boolean; + case "bytea": + return exports.TYPES.bytea; // oid: 17 + case "char": + return exports.TYPES.char; + case "bpchar": + return exports.TYPES.bpchar; + case "varchar": + return exports.TYPES.varchar; + case "text": + return exports.TYPES.text; + case "name": + return exports.TYPES.name; + case "uuid": + return exports.TYPES.uuid; + case "xml": + return exports.TYPES.xml; + case "json": + return exports.TYPES.json; + case "jsonb": + return exports.TYPES.jsonb; + case "bit": + return exports.TYPES.bit; + case "varbit": + return exports.TYPES.varbit; + case "int2": + return exports.TYPES.int2; + case "int4": + return exports.TYPES.int; + case "int8": + return exports.TYPES.bigint; + case "float8": + return exports.TYPES.float; + case "float4": + return exports.TYPES.float4; + case "numeric": + return exports.TYPES.numeric; + case "money": + return exports.TYPES.money; + case "box": + return exports.TYPES.box; + case "point": + return exports.TYPES.point; + case "path": + return exports.TYPES.path; + case "line": + return exports.TYPES.line; + case "lseg": + return exports.TYPES.lseg; + case "circle": + return exports.TYPES.circle; + case "polygon": + return exports.TYPES.polygon; + case "cidr": + return exports.TYPES.cidr; + case "inet": + return exports.TYPES.inet; + case "macaddr": + return exports.TYPES.macaddr; + case "macaddr8": + return exports.TYPES.macaddr8; + case "date": + return exports.TYPES.date; + case "timestamp": + return exports.TYPES.timestamp; + case "timestamptz": + return exports.TYPES.timestamptz; + case "time": + return exports.TYPES.time; + case "timetz": + return exports.TYPES.timetz; + case "interval": + return exports.TYPES.interval; + case "regclass": + return exports.TYPES.regclass; + case "regconfig": + return exports.TYPES.regconfig; + case "regdictionary": + return exports.TYPES.regdictionary; + case "regnamespace": + return exports.TYPES.regnamespace; + case "regoper": + return exports.TYPES.regoper; + case "regoperator": + return exports.TYPES.regoperator; + case "regproc": + return exports.TYPES.regproc; + case "regprocedure": + return exports.TYPES.regprocedure; + case "regrole": + return exports.TYPES.regrole; + case "regtype": + return exports.TYPES.regtype; + } + return null; +} +function getInnerCodec(codec) { + if (codec.domainOfCodec) { + return getInnerCodec(codec.domainOfCodec); + } + if (codec.arrayOfCodec) { + return getInnerCodec(codec.arrayOfCodec); + } + if (codec.rangeOfCodec) { + return getInnerCodec(codec.rangeOfCodec); + } + return codec; +} +(0, grafast_1.exportAs)("@dataplan/pg", getInnerCodec, "getInnerCodec"); +function sqlValueWithCodec(value, codec) { + return (0, pg_sql2_1.default) `${pg_sql2_1.default.value(value == null ? null : codec.toPg(value))}::${codec.sqlType}`; +} +//# sourceMappingURL=codecs.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/codecs.js.map b/grafast/dataplan-pg/dist/codecs.js.map new file mode 100644 index 0000000000..b0eeee4df0 --- /dev/null +++ b/grafast/dataplan-pg/dist/codecs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"codecs.js","sourceRoot":"","sources":["../src/codecs.ts"],"names":[],"mappings":";;;AA+aA,kCAoCC;AAuED,8BAkBC;AAGD,kCAOC;AA0CD,kCAkIC;AAWD,sCAkCC;AAiCD,oCA0HC;AA6MD,kEA6GC;AAED,sCAwBC;AAGD,8CAIC;;AApwCD,qCAAmC;AAEnC,8DAA0B;AAC1B,mDAAqD;AAcrD,oDAkB+B;AAE/B,6CAAuC;AAUvC,mDAA0E;AAE1E,mCAAmC;AACnC,MAAM,QAAQ,GAAG,CAAI,KAAQ,EAAK,EAAE,CAAC,KAAK,CAAC;AAyF3C;;;;;;;;;;;;;;GAcG;AACH,SAAS,CAAC;IAeR,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;QACjC,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QACvE,OAAO;YACL,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,iBAAG,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3C,MAAM,EAAE,MAAM,IAAK,QAAgB;YACnC,IAAI,EAAE,IAAI,IAAK,QAAgB;YAC/B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;YACxB,UAAU;YACV,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AAY,CAAC;AACtB,CAAC;AACD,IAAA,kBAAQ,EAAC,cAAc,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAEzD,SAAgB,iBAAiB,CAAC,KAAc,EAAE,KAAc;IAC9D,OAAO,IAAA,iBAAG,EAAA,GAAG,iBAAG,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAC9D,KAAK,CAAC,OACR,EAAE,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/datasource.d.ts b/grafast/dataplan-pg/dist/datasource.d.ts new file mode 100644 index 0000000000..f3a876b8e0 --- /dev/null +++ b/grafast/dataplan-pg/dist/datasource.d.ts @@ -0,0 +1,267 @@ +import type { ObjectStep } from "grafast"; +import { ExecutableStep } from "grafast"; +import type { SQL } from "pg-sql2"; +import type { PgCodecAttributes, PgCodecAttributeVia, PgCodecAttributeViaExplicit } from "./codecs.js"; +import type { PgExecutor, PgExecutorContextPlans } from "./executor.js"; +import type { Expand, GetPgCodecAttributes, GetPgRegistryCodecRelations, GetPgRegistryCodecs, PgCodec, PgCodecRelationConfig, PgCodecWithAttributes, PgRefDefinition, PgRegistry, PgRegistryConfig, PlanByUniques } from "./interfaces.js"; +import type { PgClassExpressionStep } from "./steps/pgClassExpression.js"; +import type { PgSelectArgumentDigest, PgSelectArgumentSpec, PgSelectMode, PgSelectStep } from "./steps/pgSelect.js"; +import type { PgSelectSinglePlanOptions, PgSelectSingleStep } from "./steps/pgSelectSingle.js"; +export declare function EXPORTABLE(factory: (...args: TScope) => T, args: [...TScope], nameHint?: string): T; +/** @deprecated Use DataplanPg.PgResourceUniqueExtensions instead */ +export type PgResourceUniqueExtensions = DataplanPg.PgResourceUniqueExtensions; +/** @deprecated Use DataplanPg.PgResourceExtensions instead */ +export type PgResourceExtensions = DataplanPg.PgResourceExtensions; +/** @deprecated Use DataplanPg.PgResourceParameterExtensions instead */ +export type PgResourceParameterExtensions = DataplanPg.PgResourceParameterExtensions; +/** + * If this is a functional (rather than static) resource, this describes one of + * the parameters it accepts. + */ +export interface PgResourceParameter { + /** + * Name of the parameter, if null then we must use positional rather than + * named arguments + */ + name: TName; + /** + * The type of this parameter + */ + codec: TCodec; + /** + * If true, then this parameter must be supplied, otherwise it's optional. + */ + required: boolean; + /** + * If true and the parameter is supplied, then the parameter must not be + * null. + */ + notNull?: boolean; + extensions?: PgResourceParameterExtensions; +} +/** + * Description of a unique constraint on a PgResource. + */ +export interface PgResourceUnique { + /** + * The attributes that are unique + */ + attributes: ReadonlyArray; + /** + * If this is true, this represents the "primary key" of the resource. + */ + isPrimary?: boolean; + description?: string; + /** + * Space for you to add your own metadata + */ + extensions?: PgResourceUniqueExtensions; +} +export interface PgCodecRefPathEntry { + relationName: string; +} +export type PgCodecRefPath = PgCodecRefPathEntry[]; +/** @deprecated Use DataplanPg.PgCodecRefExtensions instead */ +export type PgCodecRefExtensions = DataplanPg.PgCodecRefExtensions; +export interface PgCodecRef { + definition: PgRefDefinition; + paths: Array; + description?: string; + extensions?: PgCodecRefExtensions; +} +export interface PgCodecRefs { + [refName: string]: PgCodecRef; +} +/** + * Configuration options for your PgResource + */ +export interface PgResourceOptions>> = ReadonlyArray>>, TParameters extends readonly PgResourceParameter[] | undefined = readonly PgResourceParameter[] | undefined> { + /** + * The associated codec for this resource + */ + codec: TCodec; + /** + * The PgExecutor to use when servicing this resource; different executors can + * have different caching rules. A plan that uses one executor cannot be + * inlined into a plan for a different executor. + */ + executor: PgExecutor; + selectAuth?: (($step: PgSelectStep>) => void) | null; + name: TName; + identifier?: string; + from: TParameters extends readonly PgResourceParameter[] ? (...args: PgSelectArgumentDigest[]) => SQL : SQL; + uniques?: TUniques; + extensions?: PgResourceExtensions; + parameters?: TParameters; + description?: string; + /** + * Set true if this resource will only return at most one record - this is + * generally only useful for PostgreSQL function resources, in which case you + * should set it false if the function `returns setof` and true otherwise. + */ + isUnique?: boolean; + sqlPartitionByIndex?: SQL; + isMutation?: boolean; + hasImplicitOrder?: boolean; + /** + * If true, this indicates that this was originally a list (array) and thus + * should be treated as having a predetermined and reasonable length rather + * than being unbounded. It's just a hint to schema generation, it doesn't + * affect planning. + */ + isList?: boolean; + /** + * "Virtual" resources cannot be selected from/inserted to/etc, they're + * normally used to generate other resources that are _not_ virtual. + */ + isVirtual?: boolean; +} +export interface PgFunctionResourceOptions>> = ReadonlyArray>>, TNewParameters extends readonly PgResourceParameter[] = readonly PgResourceParameter[]> { + name: TNewName; + identifier?: string; + from: (...args: PgSelectArgumentDigest[]) => SQL; + parameters: TNewParameters; + returnsSetof: boolean; + returnsArray: boolean; + uniques?: TUniques; + extensions?: PgResourceExtensions; + isMutation?: boolean; + hasImplicitOrder?: boolean; + selectAuth?: (($step: PgSelectStep>) => void) | null; + description?: string; +} +/** + * PgResource represents any resource of SELECT-able data in Postgres: tables, + * views, functions, etc. + */ +export declare class PgResource>> = ReadonlyArray>>, TParameters extends readonly PgResourceParameter[] | undefined = readonly PgResourceParameter[] | undefined, TRegistry extends PgRegistry = PgRegistry> { + readonly registry: TRegistry; + readonly codec: TCodec; + readonly executor: PgExecutor; + readonly name: TName; + readonly identifier: string; + readonly from: SQL | ((...args: PgSelectArgumentDigest[]) => SQL); + readonly uniques: TUniques; + private selectAuth?; + /** + * If present, implies that the resource represents a `setof composite[]` (i.e. + * an array of arrays) - and thus is not appropriate to use for GraphQL + * Cursor Connections. + * + * @experimental + */ + sqlPartitionByIndex: SQL | null; + readonly parameters: TParameters; + readonly description: string | undefined; + readonly isUnique: boolean; + readonly isMutation: boolean; + readonly hasImplicitOrder: boolean; + /** + * If true, this indicates that this was originally a list (array) and thus + * should be treated as having a predetermined and reasonable length rather + * than being unbounded. It's just a hint to schema generation, it doesn't + * affect planning. + */ + readonly isList: boolean; + /** + * "Virtual" resources cannot be selected from/inserted to/etc, they're + * normally used to generate other resources that are _not_ virtual. + */ + readonly isVirtual: boolean; + extensions: Partial | undefined; + /** + * @param from - the SQL for the `FROM` clause (without any + * aliasing). If this is a subquery don't forget to wrap it in parens. + * @param name - a nickname for this resource. Doesn't need to be unique + * (but should be). Used for making the SQL query and debug messages easier + * to understand. + */ + constructor(registry: TRegistry, options: PgResourceOptions); + /** + * Often you can access table records from a table directly but also from a + * view or materialized view. This method makes it convenient to construct + * multiple datasources that all represent the same underlying table + * type/relations/etc. + */ + static alternativeResourceOptions>>, const TNewName extends string>(baseOptions: PgResourceOptions, overrideOptions: { + name: TNewName; + identifier?: string; + from: SQL; + uniques?: TNewUniques; + extensions?: PgResourceExtensions; + }): PgResourceOptions; + /** + * Often you can access table records from a table directly but also from a + * number of functions. This method makes it convenient to construct multiple + * datasources that all represent the same underlying table + * type/relations/etc but pull their rows from functions. + */ + static functionResourceOptions>>, const TNewName extends string>(baseOptions: Pick, "codec" | "executor" | "selectAuth">, overrideOptions: PgFunctionResourceOptions): PgResourceOptions; + toString(): string; + getRelations(): GetPgRegistryCodecRelations; + getRelation>(name: TRelationName): GetPgRegistryCodecRelations[TRelationName]; + resolveVia(via: PgCodecAttributeVia, attr: string): PgCodecAttributeViaExplicit; + getReciprocal, TOtherRelationName extends keyof GetPgRegistryCodecRelations>(otherCodec: TOtherCodec, otherRelationName: TOtherRelationName): [ + relationName: keyof GetPgRegistryCodecRelations, + relation: GetPgRegistryCodecRelations[keyof GetPgRegistryCodecRelations] + ] | null; + get(spec: PlanByUniques, TUniques>, _internalOptionsDoNotPass?: PgSelectSinglePlanOptions): GetPgCodecAttributes extends PgCodecAttributes ? PgSelectSingleStep : PgClassExpressionStep; + find(spec?: { + [key in keyof GetPgCodecAttributes]?: ExecutableStep | string | number; + }): PgSelectStep; + execute(args?: ReadonlyArray, mode?: PgSelectMode): ExecutableStep; + applyAuthorizationChecksToPlan($step: PgSelectStep): void; + /** + * @deprecated Please use `.executor.context()` instead - all resources for the + * same executor must use the same context to allow for SQL inlining, unions, + * etc. + */ + context(): ObjectStep; +} +export interface PgRegistryBuilder; +}, TResources extends { + [name in string]: PgResourceOptions>, readonly PgResourceParameter[] | undefined>; +}, TRelations extends { + [codecName in keyof TCodecs]?: { + [relationName in string]: PgCodecRelationConfig, PgResourceOptions>; + }; +}, TExecutors extends { + [name in string]: PgExecutor; +}> { + getRegistryConfig(): PgRegistryConfig, Expand, Expand, Expand>; + addExecutor(codec: TExecutor): PgRegistryBuilder; + addCodec(codec: TCodec): PgRegistryBuilder; + addResource>(resource: TResource): PgRegistryBuilder; + addRelation, const TCodecRelation extends Omit, "localCodec" | "remoteResourceOptions">>(codec: TCodec, relationName: TCodecRelationName, remoteResource: TRemoteResource, relation: TCodecRelation): PgRegistryBuilder; + build(): PgRegistry, Expand, Expand, Expand>; +} +export declare function makeRegistry; +}, TResourceOptions extends { + [name in string]: PgResourceOptions>>, readonly PgResourceParameter[] | undefined>; +}, TRelations extends { + [codecName in keyof TCodecs]?: { + [relationName in string]: PgCodecRelationConfig, PgResourceOptions>; + }; +}, TExecutors extends { + [name in string]: PgExecutor; +}>(config: PgRegistryConfig): PgRegistry; +export declare function makeRegistryBuilder(): PgRegistryBuilder<{}, {}, {}, {}>; +export declare function makePgResourceOptions>(options: TResourceOptions): TResourceOptions; +//# sourceMappingURL=datasource.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/datasource.d.ts.map b/grafast/dataplan-pg/dist/datasource.d.ts.map new file mode 100644 index 0000000000..c4d48edd00 --- /dev/null +++ b/grafast/dataplan-pg/dist/datasource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../src/datasource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAIL,cAAc,EAGf,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,E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AAiB,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,CAAC,EACvE,iBAAiB,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,CAAC,CACxD;KACF;CACF,EACD,UAAU,SAAS;KAChB,IAAI,IAAI,MAAM,GAAG,UAAU;CAC7B,EAED,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,CAAC,GAC1E,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,CAAC,CAiW/D;AAkDD,wBAAgB,mBAAmB,IAAI,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAqHvE;AAID,wBAAgB,qBAAqB,CACnC,KAAK,CAAC,gBAAgB,SAAS,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACpE,OAAO,EAAE,gBAAgB,oBAE1B"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/datasource.js b/grafast/dataplan-pg/dist/datasource.js new file mode 100644 index 0000000000..00b65e47c2 --- /dev/null +++ b/grafast/dataplan-pg/dist/datasource.js @@ -0,0 +1,776 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgResource = void 0; +exports.EXPORTABLE = EXPORTABLE; +exports.makeRegistry = makeRegistry; +exports.makeRegistryBuilder = makeRegistryBuilder; +exports.makePgResourceOptions = makePgResourceOptions; +const tslib_1 = require("tslib"); +/* eslint-disable graphile-export/export-instances */ +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importDefault(require("pg-sql2")); +const codecs_js_1 = require("./codecs.js"); +const inspect_js_1 = require("./inspect.js"); +const pgSelect_js_1 = require("./steps/pgSelect.js"); +function EXPORTABLE(factory, args, nameHint) { + const fn = factory(...args); + if ((typeof fn === "function" || (typeof fn === "object" && fn !== null)) && + !("$exporter$factory" in fn)) { + Object.defineProperties(fn, { + $exporter$args: { value: args }, + $exporter$factory: { value: factory }, + $exporter$name: { writable: true, value: nameHint }, + }); + } + return fn; +} +/** + * PgResource represents any resource of SELECT-able data in Postgres: tables, + * views, functions, etc. + */ +class PgResource { + /** + * @param from - the SQL for the `FROM` clause (without any + * aliasing). If this is a subquery don't forget to wrap it in parens. + * @param name - a nickname for this resource. Doesn't need to be unique + * (but should be). Used for making the SQL query and debug messages easier + * to understand. + */ + constructor(registry, options) { + // TODO: make a public interface for this information + /** + * If present, implies that the resource represents a `setof composite[]` (i.e. + * an array of arrays) - and thus is not appropriate to use for GraphQL + * Cursor Connections. + * + * @experimental + */ + this.sqlPartitionByIndex = null; + const { codec, executor, name, identifier, from, uniques, extensions, parameters, description, isUnique, sqlPartitionByIndex, isMutation, hasImplicitOrder, selectAuth, isList, isVirtual, } = options; + this.registry = registry; + this.extensions = extensions; + this.codec = codec; + this.executor = executor; + this.name = name; + this.identifier = identifier ?? name; + this.from = from; + this.uniques = uniques ?? []; + this.parameters = parameters; + this.description = description; + this.isUnique = !!isUnique; + this.sqlPartitionByIndex = sqlPartitionByIndex ?? null; + this.isMutation = !!isMutation; + this.hasImplicitOrder = hasImplicitOrder ?? false; + this.isList = !!isList; + this.isVirtual = isVirtual ?? false; + this.selectAuth = selectAuth; + // parameters is null iff from is not a function + const sourceIsFunction = typeof this.from === "function"; + if (this.parameters == null && sourceIsFunction) { + throw new Error(`Resource ${this} is invalid - it's a function but without a parameters array. If the function accepts no parameters please pass an empty array.`); + } + if (this.parameters != null && !sourceIsFunction) { + throw new Error(`Resource ${this} is invalid - parameters can only be specified when the resource is a function.`); + } + if (this.codec.arrayOfCodec?.attributes) { + throw new Error(`Resource ${this} is invalid - creating a resource that returns an array of a composite type is forbidden; please \`unnest\` the array.`); + } + if (this.isUnique && this.sqlPartitionByIndex) { + throw new Error(`Resource ${this} is invalid - cannot be unique and also partitionable`); + } + } + /** + * Often you can access table records from a table directly but also from a + * view or materialized view. This method makes it convenient to construct + * multiple datasources that all represent the same underlying table + * type/relations/etc. + */ + static alternativeResourceOptions(baseOptions, overrideOptions) { + const { name, identifier, from, uniques, extensions } = overrideOptions; + const { codec, executor, selectAuth } = baseOptions; + return { + codec, + executor, + name, + identifier, + from, + uniques, + parameters: undefined, + extensions, + selectAuth, + }; + } + /** + * Often you can access table records from a table directly but also from a + * number of functions. This method makes it convenient to construct multiple + * datasources that all represent the same underlying table + * type/relations/etc but pull their rows from functions. + */ + static functionResourceOptions(baseOptions, overrideOptions) { + const { codec, executor, selectAuth: originalSelectAuth } = baseOptions; + const { name, identifier, from: fnFrom, parameters, returnsSetof, returnsArray, uniques, extensions, isMutation, hasImplicitOrder, selectAuth: overrideSelectAuth, description, } = overrideOptions; + const selectAuth = overrideSelectAuth === null + ? null + : (overrideSelectAuth ?? originalSelectAuth); + if (!returnsArray) { + // This is the easy case + return { + codec, + executor, + name, + identifier, + from: fnFrom, + uniques, + parameters, + extensions, + isUnique: !returnsSetof, + isMutation: Boolean(isMutation), + hasImplicitOrder, + selectAuth, + description, + }; + } + else if (!returnsSetof) { + // This is a `composite[]` function; convert it to a `setof composite` function: + const from = EXPORTABLE((fnFrom, sql) => (...args) => sql `unnest(${fnFrom(...args)})`, [fnFrom, pg_sql2_1.default], `${name}_from`); + return { + codec, + executor, + name, + identifier, + from: from, + uniques, + parameters, + extensions, + isUnique: false, // set now, not unique + isMutation: Boolean(isMutation), + hasImplicitOrder, + selectAuth, + isList: true, + description, + }; + } + else { + // This is a `setof composite[]` function; convert it to `setof composite` and indicate that we should partition it. + const sqlTmp = pg_sql2_1.default.identifier(Symbol(`${name}_tmp`)); + const sqlPartitionByIndex = pg_sql2_1.default.identifier(Symbol(`${name}_idx`)); + const from = EXPORTABLE((fnFrom, sql, sqlPartitionByIndex, sqlTmp) => (...args) => sql `${fnFrom(...args)} with ordinality as ${sqlTmp} (arr, ${sqlPartitionByIndex}) cross join lateral unnest (${sqlTmp}.arr)`, [fnFrom, pg_sql2_1.default, sqlPartitionByIndex, sqlTmp], `${name}_from`); + return { + codec, + executor, + name, + identifier, + from: from, + uniques, + parameters, + extensions, + isUnique: false, // set now, not unique + sqlPartitionByIndex, + isMutation: Boolean(isMutation), + hasImplicitOrder, + selectAuth, + description, + }; + } + } + toString() { + return chalk_1.default.bold.blue(`PgResource(${this.name})`); + } + getRelations() { + return (this.registry.pgRelations[this.codec.name] ?? + Object.create(null)); + } + getRelation(name) { + return this.getRelations()[name]; + } + resolveVia(via, attr) { + if (!via) { + throw new Error("No via to resolve"); + } + if (typeof via === "string") { + // Check + const relation = this.getRelation(via); + if (!relation) { + throw new Error(`Unknown relation '${via}' in ${this}`); + } + if (!relation.remoteResource.codec.attributes[attr]) { + throw new Error(`${this} relation '${via}' does not have attribute '${attr}'`); + } + return { relation: via, attribute: attr }; + } + else { + return via; + } + } + // PERF: this needs optimization. + getReciprocal(otherCodec, otherRelationName) { + if (this.parameters) { + throw new Error(".getReciprocal() cannot be used with functional resources; please use .execute()"); + } + const otherRelation = this.registry.pgRelations[otherCodec.name]?.[otherRelationName]; + const relations = this.getRelations(); + const reciprocal = Object.entries(relations).find(([_relationName, relation]) => { + if (relation.remoteResource.codec !== otherCodec) { + return false; + } + if (!(0, grafast_1.arraysMatch)(relation.localAttributes, otherRelation.remoteAttributes)) { + return false; + } + if (!(0, grafast_1.arraysMatch)(relation.remoteAttributes, otherRelation.localAttributes)) { + return false; + } + return true; + }); + return reciprocal || null; + } + get(spec, + // This is internal, it's an optimisation we can use but you shouldn't. + _internalOptionsDoNotPass) { + if (this.parameters) { + throw new Error(".get() cannot be used with functional resources; please use .execute()"); + } + if (!spec) { + throw new Error(`Cannot ${this}.get without a valid spec`); + } + const keys = Object.keys(spec); + if (!this.uniques.some((uniq) => uniq.attributes.every((key) => keys.includes(key)))) { + throw new Error(`Attempted to call ${this}.get({${keys.join(", ")}}) at child field (TODO: which one?) but that combination of attributes is not unique (uniques: ${JSON.stringify(this.uniques)}). Did you mean to call .find() instead?`); + } + return this.find(spec).single(_internalOptionsDoNotPass); + } + find(spec = Object.create(null)) { + if (this.parameters) { + throw new Error(".get() cannot be used with functional resources; please use .execute()"); + } + if (!this.codec.attributes) { + throw new Error("Cannot call find if there's no attributes"); + } + const attributes = this.codec.attributes; + const keys = Object.keys(spec); /* as Array*/ + const invalidKeys = keys.filter((key) => attributes[key] == null); + if (invalidKeys.length > 0) { + throw new Error(`Attempted to call ${this}.get({${keys.join(", ")}}) but that request included attributes that we don't know about: '${invalidKeys.join("', '")}'`); + } + const identifiers = keys.map((key) => { + const attribute = attributes[key]; + if ("via" in attribute && attribute.via) { + throw new Error(`Attribute '${String(key)}' is defined with a 'via' and thus cannot be used as an identifier for '.find()' or '.get()' calls (requested keys: '${keys.join("', '")}').`); + } + const { codec } = attribute; + const stepOrConstant = spec[key]; + if (stepOrConstant == undefined) { + throw new Error(`Attempted to call ${this}.find({${keys.join(", ")}}) but failed to provide a plan for '${String(key)}'`); + } + return { + step: stepOrConstant instanceof grafast_1.ExecutableStep + ? stepOrConstant + : (0, grafast_1.constant)(stepOrConstant, false), + codec, + matches: (alias) => typeof attribute.expression === "function" + ? attribute.expression(alias) + : (0, pg_sql2_1.default) `${alias}.${pg_sql2_1.default.identifier(key)}`, + }; + }); + return (0, pgSelect_js_1.pgSelect)({ resource: this, identifiers }); + } + execute(args = [], mode = this.isMutation ? "mutation" : "normal") { + const $select = (0, pgSelect_js_1.pgSelect)({ + resource: this, + identifiers: [], + args, + mode, + }); + if (this.isUnique) { + return $select.single(); + } + const sqlPartitionByIndex = this.sqlPartitionByIndex; + if (sqlPartitionByIndex) { + // We're a setof array of composite type function, e.g. `setof users[]`, so we need to reconstitute the plan. + return (0, grafast_1.partitionByIndex)($select, ($row) => $row.select(sqlPartitionByIndex, codecs_js_1.TYPES.int, true), + // Ordinality is 1-indexed but we want a 0-indexed number + 1); + } + else { + return $select; + } + } + applyAuthorizationChecksToPlan($step) { + if (this.selectAuth) { + this.selectAuth($step); + } + // e.g. $step.where(sql`user_id = ${me}`); + return; + } + /** + * @deprecated Please use `.executor.context()` instead - all resources for the + * same executor must use the same context to allow for SQL inlining, unions, + * etc. + */ + context() { + return this.executor.context(); + } + /** @internal */ + executeWithCache(values, options) { + return this.executor.executeWithCache(values, options); + } + /** @internal */ + executeWithoutCache(values, options) { + return this.executor.executeWithoutCache(values, options); + } + /** @internal */ + executeStream(values, options) { + return this.executor.executeStream(values, options); + } + /** @internal */ + executeMutation(options) { + return this.executor.executeMutation(options); + } + /** + * Returns an SQL fragment that evaluates to `'true'` (string) if the row is + * non-null and `'false'` or `null` otherwise. + * + * @see {@link PgCodec.notNullExpression} + * + * @internal + */ + getNullCheckExpression(alias) { + if (this.codec.notNullExpression) { + // Use the user-provided check + return this.codec.notNullExpression(alias); + } + else { + // Every column in a primary key is non-nullable; so just see if one is null + const pk = this.uniques.find((u) => u.isPrimary); + const nonNullableAttribute = (this.codec.attributes + ? Object.entries(this.codec.attributes).find(([_attributeName, spec]) => !spec.via && !spec.expression && spec.notNull)?.[0] + : null) ?? pk?.attributes[0]; + if (nonNullableAttribute) { + const firstAttribute = (0, pg_sql2_1.default) `${alias}.${pg_sql2_1.default.identifier(nonNullableAttribute)}`; + return (0, pg_sql2_1.default) `(not (${firstAttribute} is null))::text`; + } + else { + // Fallback + // NOTE: we cannot use `is distinct from null` here because it's + // commonly used for `select * from ((select my_table.composite).*)` + // and the rows there _are_ distinct from null even if the underlying + // data is not. + return (0, pg_sql2_1.default) `(not (${alias} is null))::text`; + } + } + } +} +exports.PgResource = PgResource; +(0, grafast_1.exportAs)("@dataplan/pg", PgResource, "PgResource"); +function makeRegistry(config) { + const registry = { + pgExecutors: Object.create(null), + pgCodecs: Object.create(null), + pgResources: Object.create(null), + pgRelations: Object.create(null), + }; + // Tell the system to read the built pgCodecs, pgResources, pgRelations from the registry + Object.defineProperties(registry.pgExecutors, { + $exporter$args: { value: [registry] }, + $exporter$factory: { + value: (registry) => registry.pgExecutors, + }, + }); + Object.defineProperties(registry.pgCodecs, { + $exporter$args: { value: [registry] }, + $exporter$factory: { + value: (registry) => registry.pgCodecs, + }, + }); + Object.defineProperties(registry.pgResources, { + $exporter$args: { value: [registry] }, + $exporter$factory: { + value: (registry) => registry.pgResources, + }, + }); + Object.defineProperties(registry.pgRelations, { + $exporter$args: { value: [registry] }, + $exporter$factory: { + value: (registry) => registry.pgRelations, + }, + }); + let addExecutorForbidden = false; + function addExecutor(executor) { + if (addExecutorForbidden) { + throw new Error(`It's too late to call addExecutor now`); + } + const executorName = executor.name; + if (registry.pgExecutors[executorName]) { + if (registry.pgExecutors[executorName] !== executor) { + console.dir({ + existing: registry.pgExecutors[executorName], + new: executor, + }); + throw new Error(`Executor named '${executorName}' is already registered; you cannot have two executors with the same name`); + } + return executor; + } + else { + // Custom spec, pin it back to the registry + registry.pgExecutors[executorName] = executor; + if (!executor.$$export && !executor.$exporter$factory) { + // Tell the system to read the built executor from the registry + Object.defineProperties(executor, { + $exporter$args: { value: [registry, executorName] }, + $exporter$factory: { + value: (registry, executorName) => registry.pgExecutors[executorName], + }, + }); + } + return executor; + } + } + let addCodecForbidden = false; + function addCodec(codec) { + if (addCodecForbidden) { + throw new Error(`It's too late to call addCodec now`); + } + const codecName = codec.name; + if (registry.pgCodecs[codecName]) { + if (registry.pgCodecs[codecName] !== codec) { + console.dir({ + existing: registry.pgCodecs[codecName], + new: codec, + }); + throw new Error(`Codec named '${codecName}' is already registered; you cannot have two codecs with the same name`); + } + return codec; + } + else if (codec.$$export || codec.$exporter$factory) { + registry.pgCodecs[codecName] = codec; + return codec; + } + else { + // Custom spec, pin it back to the registry + registry.pgCodecs[codecName] = codec; + if (codec.attributes) { + const prevCols = codec.attributes; + for (const col of Object.values(prevCols)) { + addCodec(col.codec); + } + } + if (codec.arrayOfCodec) { + addCodec(codec.arrayOfCodec); + } + if (codec.domainOfCodec) { + addCodec(codec.domainOfCodec); + } + if (codec.rangeOfCodec) { + addCodec(codec.rangeOfCodec); + } + // Tell the system to read the built codec from the registry + Object.defineProperties(codec, { + $exporter$args: { value: [registry, codecName] }, + $exporter$factory: { + value: (registry, codecName) => registry.pgCodecs[codecName], + }, + }); + return codec; + } + } + for (const [executorName, executor] of Object.entries(config.pgExecutors)) { + if (executorName !== executor.name) { + throw new Error(`Executor added to registry with wrong name; ${JSON.stringify(executorName)} !== ${JSON.stringify(executor.name)}`); + } + addExecutor(executor); + } + for (const [codecName, codec] of Object.entries(config.pgCodecs)) { + if (codecName !== codec.name) { + throw new Error(`Codec added to registry with wrong name`); + } + addCodec(codec); + } + for (const [resourceName, rawConfig] of Object.entries(config.pgResources)) { + const resourceConfig = { + ...rawConfig, + executor: addExecutor(rawConfig.executor), + codec: addCodec(rawConfig.codec), + parameters: rawConfig.parameters + ? rawConfig.parameters.map((p) => ({ + ...p, + codec: addCodec(p.codec), + })) + : rawConfig.parameters, + }; + const resource = new PgResource(registry, resourceConfig); + // This is the magic that breaks the circular reference: rather than + // building PgResource via a factory we tell the system to just retrieve it + // from the already build registry. + Object.defineProperties(resource, { + $exporter$args: { value: [registry, resourceName] }, + $exporter$factory: { + value: (registry, resourceName) => registry.pgResources[resourceName], + }, + }); + registry.pgResources[resourceName] = resource; + } + // Ensure all the relation codecs are also added + for (const codecName of Object.keys(config.pgRelations)) { + const relations = config.pgRelations[codecName]; + if (!relations) { + continue; + } + for (const relationName of Object.keys(relations)) { + const relationConfig = relations[relationName]; + if (relationConfig) { + addCodec(relationConfig.localCodec); + } + } + } + // DO NOT CALL addCodec BELOW HERE + addCodecForbidden = true; + addExecutorForbidden = true; + /** + * If the user uses a codec with attributes as a column type (or an array of + * the codec is the column type, etc) then we need to have a resource for + * processing this codec. So we add all table-like codecs here, then we + * remove the ones that already have resources, then we build resources for the + * remainder. + */ + const tableLikeCodecsWithoutTableLikeResources = new Set(); + const walkCodec = (codec, isAccessibleViaAttribute = false, seen = new Set()) => { + if (seen.has(codec)) { + return; + } + seen.add(codec); + if (isAccessibleViaAttribute && + codec.attributes && + codec.executor && + !codec.isAnonymous) { + tableLikeCodecsWithoutTableLikeResources.add(codec); + } + if (codec.attributes) { + for (const col of Object.values(codec.attributes)) { + if (isAccessibleViaAttribute) { + walkCodec(col.codec, isAccessibleViaAttribute, seen); + } + else { + walkCodec(col.codec, true, new Set()); + } + } + } + if (codec.arrayOfCodec) { + walkCodec(codec.arrayOfCodec, isAccessibleViaAttribute, seen); + } + if (codec.rangeOfCodec) { + walkCodec(codec.rangeOfCodec, isAccessibleViaAttribute, seen); + } + if (codec.domainOfCodec) { + walkCodec(codec.domainOfCodec, isAccessibleViaAttribute, seen); + } + }; + // Add table-like codecs used within attributes + for (const codec of Object.values(registry.pgCodecs)) { + walkCodec(codec); + } + // Remove from these those codecs that already have resources + for (const resource of Object.values(registry.pgResources)) { + if (!resource.parameters) { + tableLikeCodecsWithoutTableLikeResources.delete(resource.codec); + } + } + // Now add resources for the table-like codecs that don't have them already + for (const codec of tableLikeCodecsWithoutTableLikeResources) { + if (codec.executor) { + const resourceName = `frmcdc_${codec.name}`; + const resource = new PgResource(registry, { + name: resourceName, + executor: codec.executor, + from: (0, pg_sql2_1.default) `(select 1/0 /* codec-only resource; should not select directly */)`, + codec, + identifier: resourceName, + isVirtual: true, + extensions: { + tags: { + behavior: "-*", + }, + }, + }); + Object.defineProperties(resource, { + $exporter$args: { value: [registry, resourceName] }, + $exporter$factory: { + value: (registry, resourceName) => registry.pgResources[resourceName], + }, + }); + registry.pgResources[resourceName] = resource; + } + } + for (const codecName of Object.keys(config.pgRelations)) { + const relations = config.pgRelations[codecName]; + if (!relations) { + continue; + } + const builtRelations = Object.create(null); + // Tell the system to read the built relations from the registry + Object.defineProperties(builtRelations, { + $exporter$args: { value: [registry, codecName] }, + $exporter$factory: { + value: (registry, codecName) => registry.pgRelations[codecName], + }, + }); + for (const relationName of Object.keys(relations)) { + const relationConfig = relations[relationName]; + if (!relationConfig) { + continue; + } + const { localCodec, remoteResourceOptions, ...rest } = relationConfig; + const builtRelation = { + ...rest, + localCodec, + remoteResource: registry.pgResources[remoteResourceOptions.name], + }; + // Tell the system to read the built relation from the registry + Object.defineProperties(builtRelation, { + $exporter$args: { value: [registry, codecName, relationName] }, + $exporter$factory: { + value: (registry, codecName, relationName) => registry.pgRelations[codecName][relationName], + }, + }); + builtRelations[relationName] = builtRelation; + } + registry.pgRelations[codecName] = builtRelations; + } + validateRelations(registry); + return registry; +} +(0, grafast_1.exportAs)("@dataplan/pg", makeRegistry, "makeRegistry"); +function validateRelations(registry) { + // PERF: skip this if not isDev? + const reg = registry; + for (const codec of Object.values(reg.pgCodecs)) { + // Check that all the `via` and `identicalVia` match actual relations. + const relationKeys = Object.keys(reg.pgRelations[codec.name] ?? {}); + if (codec.attributes) { + Object.entries(codec.attributes).forEach(([attributeName, col]) => { + const { via, identicalVia } = col; + if (via != null) { + if (typeof via === "string") { + if (!relationKeys.includes(via)) { + throw new Error(`${codec.name} claims attribute '${attributeName}' is via relation '${via}', but there is no such relation.`); + } + } + else { + if (!relationKeys.includes(via.relation)) { + throw new Error(`${codec.name} claims attribute '${attributeName}' is via relation '${via.relation}', but there is no such relation.`); + } + } + } + if (identicalVia) { + if (typeof identicalVia === "string") { + if (!relationKeys.includes(identicalVia)) { + throw new Error(`${codec.name} claims attribute '${attributeName}' is identicalVia relation '${identicalVia}', but there is no such relation.`); + } + } + else { + if (!relationKeys.includes(identicalVia.relation)) { + throw new Error(`${codec.name} claims attribute '${attributeName}' is identicalVia relation '${identicalVia.relation}', but there is no such relation.`); + } + } + } + }); + } + } +} +// eslint-disable-next-line @typescript-eslint/ban-types +function makeRegistryBuilder() { + const registryConfig = { + pgExecutors: Object.create(null), + pgCodecs: Object.create(null), + pgResources: Object.create(null), + pgRelations: Object.create(null), + }; + const builder = { + getRegistryConfig() { + return registryConfig; + }, + addExecutor(executor) { + const existing = registryConfig.pgExecutors[executor.name]; + if (existing) { + if (existing !== executor) { + throw new Error(`Attempted to add a second executor named '${executor.name}' (existing: ${(0, inspect_js_1.inspect)(existing)}, new: ${(0, inspect_js_1.inspect)(executor)})`); + } + return builder; + } + registryConfig.pgExecutors[executor.name] = executor; + return builder; + }, + addCodec(codec) { + const existing = registryConfig.pgCodecs[codec.name]; + if (existing) { + if (existing !== codec) { + throw new Error(`Attempted to add a second codec named '${codec.name}' (existing: ${(0, inspect_js_1.inspect)(existing)}, new: ${(0, inspect_js_1.inspect)(codec)})`); + } + return builder; + } + registryConfig.pgCodecs[codec.name] = codec; + if (codec.arrayOfCodec) { + this.addCodec(codec.arrayOfCodec); + } + if (codec.domainOfCodec) { + this.addCodec(codec.domainOfCodec); + } + if (codec.rangeOfCodec) { + this.addCodec(codec.rangeOfCodec); + } + if (codec.attributes) { + for (const col of Object.values(codec.attributes)) { + this.addCodec(col.codec); + } + } + return builder; + }, + addResource(resource) { + this.addExecutor(resource.executor); + const existing = registryConfig.pgResources[resource.name]; + if (existing) { + if (existing !== resource) { + throw new Error(`Attempted to add a second resource named '${resource.name}':\n First represented ${printResourceFrom(existing)}.\n Second represents ${printResourceFrom(resource)}.\n Details: ${chalk_1.default.bold.blue.underline `https://err.red/p2rc`}`); + } + return builder; + } + this.addCodec(resource.codec); + registryConfig.pgResources[resource.name] = resource; + return builder; + }, + addRelation(localCodec, relationName, remoteResourceOptions, relation) { + if (!registryConfig.pgCodecs[localCodec.name]) { + throw new Error(`Adding a relation before adding the codec is forbidden.`); + } + if (!registryConfig.pgResources[remoteResourceOptions.name]) { + throw new Error(`Adding a relation before adding the resource is forbidden.`); + } + if (!registryConfig.pgRelations[localCodec.name]) { + registryConfig.pgRelations[localCodec.name] = Object.create(null); + } + registryConfig.pgRelations[localCodec.name][relationName] = { + localCodec, + remoteResourceOptions, + ...relation, + }; + return builder; + }, + build() { + return EXPORTABLE((makeRegistry, registryConfig) => makeRegistry(registryConfig), [makeRegistry, registryConfig], "registry"); + }, + }; + return builder; +} +(0, grafast_1.exportAs)("@dataplan/pg", makeRegistryBuilder, "makeRegistryBuilder"); +function makePgResourceOptions(options) { + return options; +} +(0, grafast_1.exportAs)("@dataplan/pg", makePgResourceOptions, "makePgResourceOptions"); +function printResourceFrom(resource) { + if (typeof resource.from === "function") { + return `a function accepting ${resource.parameters?.length} parameters and returning SQL type '${pg_sql2_1.default.compile(resource.codec.sqlType).text}'`; + } + else { + return `a table/view/etc called '${pg_sql2_1.default.compile(resource.from).text}'`; + } +} +//# sourceMappingURL=datasource.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/datasource.js.map b/grafast/dataplan-pg/dist/datasource.js.map new file mode 100644 index 0000000000..dd3665fc44 --- /dev/null +++ b/grafast/dataplan-pg/dist/datasource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"datasource.js","sourceRoot":"","sources":["../src/datasource.ts"],"names":[],"mappings":";;;AAyDA,gCAiBC;AAi3BD,oCAkYC;AAkDD,kDAqHC;AAID,sDAIC;;AA5+CD,qDAAqD;AACrD,0DAA0B;AAE1B,qCAOiB;AAEjB,8DAA0B;AAO1B,2CAAoC;AASpC,6CAAuC;AAuBvC,qDAA+C;AAM/C,SAAgB,UAAU,CACxB,OAA+B,EAC/B,IAAiB,EACjB,QAAiB;IAEjB,MAAM,EAAE,GAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/B,IACE,CAAC,OAAO,EAAE,KAAK,UAAU,IAAI,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,mBAAmB,IAAI,EAAE,CAAC,EAC5B,CAAC;QACD,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;YAC1B,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YAC/B,iBAAiB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YACrC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;SACpD,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,CAAC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CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpE,CAAC;YACD,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,GAAG;gBAC1D,UAAU;gBACV,qBAAqB;gBACrB,GAAG,QAAQ;aAIZ,CAAC;YACF,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,KAAK;YACH,OAAO,UAAU,CACf,CAAC,YAAY,EAAE,cAAc,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,EAC9D,CAAC,YAAY,EAAE,cAAc,CAAC,EAC9B,UAAU,CACX,CAAC;QACJ,CAAC;KACF,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,IAAA,kBAAQ,EAAC,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;AAErE,SAAgB,qBAAqB,CAEnC,OAAyB;IACzB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,IAAA,kBAAQ,EAAC,cAAc,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,CAAC;AAEzE,SAAS,iBAAiB,CAAC,QAA2B;IACpD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QACxC,OAAO,wBACL,QAAQ,CAAC,UAAU,EAAE,MACvB,uCACE,iBAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IACtC,GAAG,CAAC;IACN,CAAC;SAAM,CAAC;QACN,OAAO,4BAA4B,iBAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC;IACxE,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/examples/exampleSchema.d.ts b/grafast/dataplan-pg/dist/examples/exampleSchema.d.ts new file mode 100644 index 0000000000..f5c82955e1 --- /dev/null +++ b/grafast/dataplan-pg/dist/examples/exampleSchema.d.ts @@ -0,0 +1,13 @@ +import { GraphQLSchema } from "grafast/graphql"; +import type { WithPgClient } from "../"; +import type { NodePostgresPgClient, PgSubscriber } from "../adaptors/pg.js"; +export declare function EXPORTABLE(factory: (...args: TScope) => T, args: [...TScope], nameHint?: string): T; +export interface OurGraphQLContext extends Grafast.Context { + pgSettings: Record; + withPgClient: WithPgClient; + pgSubscriber: PgSubscriber; +} +export declare function makeExampleSchema(options?: { + deoptimize?: boolean; +}): GraphQLSchema; +//# sourceMappingURL=exampleSchema.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/examples/exampleSchema.d.ts.map b/grafast/dataplan-pg/dist/examples/exampleSchema.d.ts.map new file mode 100644 index 0000000000..35364fcdff --- /dev/null +++ b/grafast/dataplan-pg/dist/examples/exampleSchema.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exampleSchema.d.ts","sourceRoot":"","sources":["../../src/examples/exampleSchema.ts"],"names":[],"mappings":"AAqDA,OAAO,EASL,aAAa,EAId,MAAM,iBAAiB,CAAC;AAKzB,OAAO,KAAK,EAQV,YAAY,EACb,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAoD5E,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,SAAS,GAAG,EAAE,EAChD,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,KAAK,CAAC,EAC/B,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,CAAC,CAaH;AAKD,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,OAAO;IACxD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,YAAY,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACjD,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAwB,GACtD,aAAa,CAi4Jf"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/examples/exampleSchema.js b/grafast/dataplan-pg/dist/examples/exampleSchema.js new file mode 100644 index 0000000000..d1556c4552 --- /dev/null +++ b/grafast/dataplan-pg/dist/examples/exampleSchema.js @@ -0,0 +1,3488 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EXPORTABLE = EXPORTABLE; +exports.makeExampleSchema = makeExampleSchema; +const tslib_1 = require("tslib"); +/* + * This is a hand-rolled GraphQL schema that we used throughout the development + * of Grafast; it's used for the @dataplan/pg tests and demonstrates common + * patterns as well as edge cases. This is NOT meant to be an example of how + * _you_ should write a schema, in particular it's (deliberately) quite + * inconsistent and has many ways of achieving the same goals. I would not + * recommend reading it in full, but dipping in to particular places you're + * interested in might be useful. + */ +const json_1 = require("@dataplan/json"); +const crypto = tslib_1.__importStar(require("crypto")); +const fs_1 = require("fs"); +const grafast_1 = require("grafast"); +const graphql_1 = require("grafast/graphql"); +const pg_sql2_1 = tslib_1.__importDefault(require("pg-sql2")); +const codecs_js_1 = require("../codecs.js"); +const datasource_js_1 = require("../datasource.js"); +const index_js_1 = require("../index.js"); +const pgPageInfo_js_1 = require("../steps/pgPageInfo.js"); +const pgSelect_js_1 = require("../steps/pgSelect.js"); +const pgUnionAll_js_1 = require("../steps/pgUnionAll.js"); +const withPgClient_js_1 = require("../steps/withPgClient.js"); +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); +function EXPORTABLE(factory, args, nameHint) { + const fn = factory(...args); + if ((typeof fn === "function" || (typeof fn === "object" && fn !== null)) && + !("$exporter$factory" in fn)) { + Object.defineProperties(fn, { + $exporter$args: { value: args }, + $exporter$factory: { value: factory }, + $exporter$name: { writable: true, value: nameHint }, + }); + } + return fn; +} +/*+--------------------------------------------------------------------------+ + | DATA SOURCES | + +--------------------------------------------------------------------------+*/ +function makeExampleSchema(options = Object.create(null)) { + const executor = EXPORTABLE((PgExecutor, context, object) => new PgExecutor({ + name: "main", + context: () => { + const $context = context(); + return object({ + pgSettings: $context.get("pgSettings"), + withPgClient: $context.get("withPgClient"), + }); + }, + }), [index_js_1.PgExecutor, grafast_1.context, grafast_1.object], "defaultPgExecutor"); + /** + * Applies auth checks to the plan; we are using a placeholder here for now. + */ + const selectAuth = EXPORTABLE((sql) => ($step) => { + $step.where(sql `true /* authorization checks */`); + }, [pg_sql2_1.default], "selectAuth"); + const registryConfig = EXPORTABLE((PgResource, TYPES, enumCodec, executor, listOfCodec, makePgResourceOptions, makeRegistryBuilder, recordCodec, selectAuth, sql, sqlFromArgDigests) => { + const col = (options) => { + const { notNull, codec, expression, via, identicalVia } = options; + return { + codec: codec, + notNull: !!notNull, + expression, + via, + identicalVia, + }; + }; + const forumCodec = recordCodec({ + executor, + name: "forums", + identifier: sql `app_public.forums`, + attributes: { + id: col({ notNull: true, codec: TYPES.uuid }), + name: col({ notNull: true, codec: TYPES.citext }), + archived_at: col({ codec: TYPES.timestamptz }), + is_archived: col({ + codec: TYPES.boolean, + expression: (alias) => sql `${alias}.archived_at is not null`, + }), + }, + }); + const userCodec = recordCodec({ + executor, + name: "users", + identifier: sql `app_public.users`, + attributes: { + id: col({ notNull: true, codec: TYPES.uuid }), + username: col({ notNull: true, codec: TYPES.citext }), + gravatar_url: col({ codec: TYPES.text }), + created_at: col({ notNull: true, codec: TYPES.timestamptz }), + }, + }); + const messagesCodec = recordCodec({ + executor, + name: "messages", + identifier: sql `app_public.messages`, + attributes: { + id: col({ notNull: true, codec: TYPES.uuid }), + body: col({ notNull: true, codec: TYPES.text }), + author_id: col({ + notNull: true, + codec: TYPES.uuid, + identicalVia: { relation: "author", attribute: "person_id" }, + }), + forum_id: col({ + notNull: true, + codec: TYPES.uuid, + identicalVia: { relation: "forum", attribute: "id" }, + }), + created_at: col({ notNull: true, codec: TYPES.timestamptz }), + archived_at: col({ codec: TYPES.timestamptz }), + featured: col({ codec: TYPES.boolean }), + is_archived: col({ + codec: TYPES.boolean, + expression: (alias) => sql `${alias}.archived_at is not null`, + }), + }, + }); + const uniqueAuthorCountResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: TYPES.int, + from: (...args) => sql `app_public.unique_author_count(${sqlFromArgDigests(args)})`, + name: "unique_author_count", + parameters: [ + { + name: "featured", + required: false, + codec: TYPES.boolean, + }, + ], + isUnique: true, + }); + const forumNamesArrayResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: listOfCodec(TYPES.text), + from: (...args) => sql `app_public.forum_names_array(${sqlFromArgDigests(args)})`, + name: "forum_names_array", + parameters: [], + isUnique: true, // No setof + }); + const forumNamesCasesResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: listOfCodec(TYPES.text), + from: (...args) => sql `app_public.forum_names_cases(${sqlFromArgDigests(args)})`, + name: "forum_names_cases", + parameters: [], + }); + const forumsUniqueAuthorCountResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: TYPES.int, + from: (...args) => sql `app_public.forums_unique_author_count(${sqlFromArgDigests(args)})`, + name: "forums_unique_author_count", + parameters: [ + { + name: "forums", + required: true, + codec: forumCodec, + }, + { + name: "featured", + required: false, + codec: TYPES.boolean, + }, + ], + isUnique: true, + }); + const scalarTextResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: TYPES.text, + from: sql `(select '')`, + name: "text", + }); + const messageResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: messagesCodec, + from: sql `app_public.messages`, + name: "messages", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const userResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: userCodec, + from: sql `app_public.users`, + name: "users", + uniques: [ + { attributes: ["id"], isPrimary: true }, + { attributes: ["username"] }, + ], + }); + const forumResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: forumCodec, + from: sql `app_public.forums`, + name: "forums", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const usersMostRecentForumResourceOptions = PgResource.functionResourceOptions(forumResourceOptions, { + name: "users_most_recent_forum", + from: (...args) => sql `app_public.users_most_recent_forum(${sqlFromArgDigests(args)})`, + returnsArray: false, + returnsSetof: false, + parameters: [ + { + name: "u", + codec: userResourceOptions.codec, + required: true, + notNull: true, + }, + ], + selectAuth: null, + }); + const featuredMessagesResourceOptions = PgResource.functionResourceOptions(messageResourceOptions, { + name: "featured_messages", + from: (...args) => sql `app_public.featured_messages(${sqlFromArgDigests(args)})`, + returnsSetof: true, + returnsArray: false, + parameters: [], + }); + const forumsFeaturedMessagesResourceOptions = PgResource.functionResourceOptions(messageResourceOptions, { + name: "forums_featured_messages", + from: (...args) => sql `app_public.forums_featured_messages(${sqlFromArgDigests(args)})`, + returnsSetof: true, + returnsArray: false, + parameters: [ + { + name: "forum", + required: true, + codec: forumCodec, + }, + ], + }); + const randomUserArrayResourceOptions = PgResource.functionResourceOptions(userResourceOptions, { + name: "random_user_array", + from: (...args) => sql `app_public.random_user_array(${sqlFromArgDigests(args)})`, + returnsArray: true, + returnsSetof: false, + parameters: [], + }); + const randomUserArraySetResourceOptions = PgResource.functionResourceOptions(userResourceOptions, { + name: "random_user_array_set", + from: (...args) => sql `app_public.random_user_array_set(${sqlFromArgDigests(args)})`, + returnsSetof: true, + returnsArray: true, + parameters: [], + }); + const forumsMessagesListSetResourceOptions = PgResource.functionResourceOptions(messageResourceOptions, { + name: "forums_messages_list_set", + from: (...args) => sql `app_public.forums_messages_list_set(${sqlFromArgDigests(args)})`, + parameters: [ + { + codec: forumCodec, + name: null, + required: true, + }, + ], + returnsArray: true, + returnsSetof: true, + extensions: { + tags: { + name: "messagesListSet", + }, + }, + }); + const unionEntityCodec = recordCodec({ + executor, + name: "union__entity", + identifier: sql `interfaces_and_unions.union__entity`, + attributes: { + person_id: col({ codec: TYPES.int, notNull: false }), + post_id: col({ codec: TYPES.int, notNull: false }), + comment_id: col({ codec: TYPES.int, notNull: false }), + }, + }); + const personBookmarksCodec = recordCodec({ + executor, + name: "person_bookmarks", + identifier: sql `interfaces_and_unions.person_bookmarks`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + person_id: col({ + codec: TYPES.int, + notNull: true, + identicalVia: { relation: "person", attribute: "id" }, + }), + bookmarked_entity: col({ + codec: unionEntityCodec, + notNull: true, + }), + }, + }); + const personBookmarksResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: personBookmarksCodec, + from: sql `interfaces_and_unions.person_bookmarks`, + name: "person_bookmarks", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const personCodec = recordCodec({ + executor, + name: "people", + identifier: sql `interfaces_and_unions.people`, + attributes: { + person_id: col({ codec: TYPES.int, notNull: true }), + username: col({ codec: TYPES.text, notNull: true }), + }, + }); + const personResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: personCodec, + from: sql `interfaces_and_unions.people`, + name: "people", + uniques: [ + { attributes: ["person_id"], isPrimary: true }, + { attributes: ["username"] }, + ], + }); + const postCodec = recordCodec({ + executor, + name: "posts", + identifier: sql `interfaces_and_unions.posts`, + attributes: { + post_id: col({ codec: TYPES.int, notNull: true }), + author_id: col({ + codec: TYPES.int, + notNull: true, + identicalVia: { relation: "author", attribute: "person_id" }, + }), + body: col({ codec: TYPES.text, notNull: true }), + }, + }); + const postResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: postCodec, + from: sql `interfaces_and_unions.posts`, + name: "posts", + uniques: [{ attributes: ["post_id"], isPrimary: true }], + }); + const commentCodec = recordCodec({ + executor, + name: "comments", + identifier: sql `interfaces_and_unions.comments`, + attributes: { + comment_id: col({ codec: TYPES.int, notNull: true }), + author_id: col({ + codec: TYPES.int, + notNull: true, + identicalVia: { relation: "author", attribute: "person_id" }, + }), + post_id: col({ + codec: TYPES.int, + notNull: true, + identicalVia: { relation: "post", attribute: "id" }, + }), + body: col({ codec: TYPES.text, notNull: true }), + }, + }); + const commentResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: commentCodec, + from: sql `interfaces_and_unions.comments`, + name: "comments", + uniques: [{ attributes: ["comment_id"], isPrimary: true }], + }); + const itemTypeEnumCodec = enumCodec({ + name: "item_type", + identifier: sql `interfaces_and_unions.item_type`, + values: ["TOPIC", "POST", "DIVIDER", "CHECKLIST", "CHECKLIST_ITEM"], + }); + const enumTableItemTypeCodec = recordCodec({ + executor, + name: "enum_table_item_type", + identifier: sql `interfaces_and_unions.enum_table_item_type`, + attributes: { + type: { + codec: TYPES.text, + notNull: true, + }, + description: { + codec: TYPES.text, + notNull: false, + }, + }, + }); + const enumTableItemTypeResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: enumTableItemTypeCodec, + from: sql `interfaces_and_unions.enum_table_item_type`, + name: "enum_table_item_type", + uniques: [{ attributes: ["type"], isPrimary: true }], + }); + const enumTableItemTypeEnumCodec = enumCodec({ + name: "enum_table_item_type_enum", + identifier: sql `text`, + values: ["TOPIC", "POST", "DIVIDER", "CHECKLIST", "CHECKLIST_ITEM"], + }); + const singleTableItemsCodec = recordCodec({ + executor, + name: "single_table_items", + identifier: sql `interfaces_and_unions.single_table_items`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + type: col({ + codec: itemTypeEnumCodec, + notNull: true, + }), + type2: col({ + codec: enumTableItemTypeEnumCodec, + notNull: true, + }), + parent_id: col({ + codec: TYPES.int, + notNull: false, + identicalVia: { relation: "parent", attribute: "id" }, + }), + author_id: col({ + codec: TYPES.int, + notNull: true, + identicalVia: { relation: "author", attribute: "person_id" }, + }), + position: col({ codec: TYPES.bigint, notNull: true }), + created_at: col({ codec: TYPES.timestamptz, notNull: true }), + updated_at: col({ codec: TYPES.timestamptz, notNull: true }), + is_explicitly_archived: col({ + codec: TYPES.boolean, + notNull: true, + }), + archived_at: col({ codec: TYPES.timestamptz, notNull: false }), + title: col({ codec: TYPES.text, notNull: false }), + description: col({ codec: TYPES.text, notNull: false }), + note: col({ codec: TYPES.text, notNull: false }), + color: col({ codec: TYPES.text, notNull: false }), + }, + }); + const singleTableItemsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: singleTableItemsCodec, + from: sql `interfaces_and_unions.single_table_items`, + name: "single_table_items", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const relationalItemsCodec = recordCodec({ + executor, + name: "relational_items", + identifier: sql `interfaces_and_unions.relational_items`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + type: col({ + codec: itemTypeEnumCodec, + notNull: true, + }), + type2: col({ + codec: enumTableItemTypeEnumCodec, + notNull: true, + }), + parent_id: col({ + codec: TYPES.int, + notNull: false, + identicalVia: { relation: "parent", attribute: "id" }, + }), + author_id: col({ + codec: TYPES.int, + notNull: true, + identicalVia: { relation: "author", attribute: "person_id" }, + }), + position: col({ codec: TYPES.bigint, notNull: true }), + created_at: col({ codec: TYPES.timestamptz, notNull: true }), + updated_at: col({ codec: TYPES.timestamptz, notNull: true }), + is_explicitly_archived: col({ + codec: TYPES.boolean, + notNull: true, + }), + archived_at: col({ codec: TYPES.timestamptz, notNull: false }), + }, + }); + const relationalItemsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalItemsCodec, + from: sql `interfaces_and_unions.relational_items`, + name: "relational_items", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const relationalCommentableCodec = recordCodec({ + executor, + name: "relational_commentables", + identifier: sql `interfaces_and_unions.relational_commentables`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + type: col({ + codec: itemTypeEnumCodec, + notNull: true, + }), + type2: col({ + codec: enumTableItemTypeEnumCodec, + notNull: true, + }), + }, + }); + const relationalCommentableResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalCommentableCodec, + from: sql `interfaces_and_unions.relational_commentables`, + name: "relational_commentables", + }); + const itemAttributes = { + id: col({ codec: TYPES.int, notNull: true, identicalVia: "item" }), + type: col({ codec: TYPES.text, notNull: true, via: "item" }), + type2: col({ + codec: enumTableItemTypeEnumCodec, + notNull: true, + via: "item", + }), + parent_id: col({ + codec: TYPES.int, + notNull: false, + via: "item", + }), + author_id: col({ + codec: TYPES.int, + notNull: true, + via: "item", + }), + position: col({ codec: TYPES.bigint, notNull: true, via: "item" }), + created_at: col({ + codec: TYPES.timestamptz, + notNull: true, + via: "item", + }), + updated_at: col({ + codec: TYPES.timestamptz, + notNull: true, + via: "item", + }), + is_explicitly_archived: col({ + codec: TYPES.boolean, + notNull: true, + via: "item", + }), + archived_at: col({ + codec: TYPES.timestamptz, + notNull: false, + via: "item", + }), + }; + const relationalTopicsCodec = recordCodec({ + executor, + name: "relational_topics", + identifier: sql `interfaces_and_unions.relational_topics`, + attributes: { + ...itemAttributes, + title: col({ codec: TYPES.text, notNull: false }), + }, + }); + const relationalTopicsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalTopicsCodec, + from: sql `interfaces_and_unions.relational_topics`, + name: "relational_topics", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const relationalPostsCodec = recordCodec({ + executor, + name: "relational_posts", + identifier: sql `interfaces_and_unions.relational_posts`, + attributes: { + ...itemAttributes, + title: col({ codec: TYPES.text, notNull: false }), + description: col({ codec: TYPES.text, notNull: false }), + note: col({ codec: TYPES.text, notNull: false }), + }, + }); + const relationalPostsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalPostsCodec, + from: sql `interfaces_and_unions.relational_posts`, + name: "relational_posts", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const relationalDividersCodec = recordCodec({ + executor, + name: "relational_dividers", + identifier: sql `interfaces_and_unions.relational_dividers`, + attributes: { + ...itemAttributes, + title: col({ codec: TYPES.text, notNull: false }), + color: col({ codec: TYPES.text, notNull: false }), + }, + }); + const relationalDividersResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalDividersCodec, + from: sql `interfaces_and_unions.relational_dividers`, + name: "relational_dividers", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const relationalChecklistsCodec = recordCodec({ + executor, + name: "relational_checklists", + identifier: sql `interfaces_and_unions.relational_checklists`, + attributes: { + ...itemAttributes, + title: col({ codec: TYPES.text, notNull: false }), + }, + }); + const relationalChecklistsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalChecklistsCodec, + from: sql `interfaces_and_unions.relational_checklists`, + name: "relational_checklists", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const relationalChecklistItemsCodec = recordCodec({ + executor, + name: "relational_checklist_items", + identifier: sql `interfaces_and_unions.relational_checklist_items`, + attributes: { + ...itemAttributes, + description: col({ codec: TYPES.text, notNull: true }), + note: col({ codec: TYPES.text, notNull: false }), + }, + }); + const relationalChecklistItemsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: relationalChecklistItemsCodec, + from: sql `interfaces_and_unions.relational_checklist_items`, + name: "relational_checklist_items", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + //////////////////////////////////////// + const unionItemsCodec = recordCodec({ + executor, + name: "union_items", + identifier: sql `interfaces_and_unions.union_items`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + type: col({ + codec: itemTypeEnumCodec, + notNull: true, + }), + type2: col({ + codec: enumTableItemTypeEnumCodec, + notNull: true, + }), + }, + }); + const unionItemsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: unionItemsCodec, + from: sql `interfaces_and_unions.union_items`, + name: "union_items", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const unionTopicsCodec = recordCodec({ + executor, + name: "union_topics", + identifier: sql `interfaces_and_unions.union_topics`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + title: col({ codec: TYPES.text, notNull: false }), + }, + }); + const unionTopicsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: unionTopicsCodec, + from: sql `interfaces_and_unions.union_topics`, + name: "union_topics", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const unionPostsCodec = recordCodec({ + executor, + name: "union_posts", + identifier: sql `interfaces_and_unions.union_posts`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + title: col({ codec: TYPES.text, notNull: false }), + description: col({ codec: TYPES.text, notNull: false }), + note: col({ codec: TYPES.text, notNull: false }), + }, + }); + const unionPostsResource = makePgResourceOptions({ + executor, + selectAuth, + codec: unionPostsCodec, + from: sql `interfaces_and_unions.union_posts`, + name: "union_posts", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const unionDividersCodec = recordCodec({ + executor, + name: "union_dividers", + identifier: sql `interfaces_and_unions.union_dividers`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + title: col({ codec: TYPES.text, notNull: false }), + color: col({ codec: TYPES.text, notNull: false }), + }, + }); + const unionDividersResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: unionDividersCodec, + from: sql `interfaces_and_unions.union_dividers`, + name: "union_dividers", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const unionChecklistsCodec = recordCodec({ + executor, + name: "union_checklists", + identifier: sql `interfaces_and_unions.union_checklists`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + title: col({ codec: TYPES.text, notNull: false }), + }, + }); + const unionChecklistsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: unionChecklistsCodec, + from: sql `interfaces_and_unions.union_checklists`, + name: "union_checklists", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const unionChecklistItemsCodec = recordCodec({ + executor, + name: "union_checklist_items", + identifier: sql `interfaces_and_unions.union_checklist_items`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + description: col({ codec: TYPES.text, notNull: true }), + note: col({ codec: TYPES.text, notNull: false }), + }, + }); + const unionChecklistItemsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: unionChecklistItemsCodec, + from: sql `interfaces_and_unions.union_checklist_items`, + name: "union_checklist_items", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const unionEntityResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: unionEntityCodec, + from: sql `(select null::interfaces_and_unions.union__entity)`, + name: "union__entity", + }); + const entitySearchResourceOptions = PgResource.functionResourceOptions(unionEntityResourceOptions, { + from: (...args) => sql `interfaces_and_unions.search(${sqlFromArgDigests(args)})`, + returnsSetof: true, + returnsArray: false, + name: "entity_search", + parameters: [ + { + name: "query", + required: true, + codec: TYPES.text, + }, + ], + }); + //////////////////////////////////////// + const awsApplicationsCodec = recordCodec({ + executor, + name: "aws_applications", + identifier: sql `interfaces_and_unions.aws_applications`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + name: col({ + codec: TYPES.text, + notNull: true, + }), + last_deployed: col({ + codec: TYPES.timestamptz, + notNull: false, + }), + aws_id: col({ codec: TYPES.text, notNull: false }), + }, + }); + const awsApplicationsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: awsApplicationsCodec, + from: sql `interfaces_and_unions.aws_applications`, + name: "aws_applications", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const gcpApplicationsCodec = recordCodec({ + executor, + name: "gcp_applications", + identifier: sql `interfaces_and_unions.gcp_applications`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + name: col({ + codec: TYPES.text, + notNull: true, + }), + last_deployed: col({ + codec: TYPES.timestamptz, + notNull: false, + }), + gcp_id: col({ codec: TYPES.text, notNull: false }), + }, + }); + const gcpApplicationsResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: gcpApplicationsCodec, + from: sql `interfaces_and_unions.gcp_applications`, + name: "gcp_applications", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const firstPartyVulnerabilitiesCodec = recordCodec({ + executor, + name: "first_party_vulnerabilities", + identifier: sql `interfaces_and_unions.first_party_vulnerabilities`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + name: col({ + codec: TYPES.text, + notNull: true, + }), + cvss_score: col({ codec: TYPES.float, notNull: true }), + team_name: col({ codec: TYPES.text, notNull: false }), + }, + }); + const firstPartyVulnerabilitiesResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: firstPartyVulnerabilitiesCodec, + from: sql `interfaces_and_unions.first_party_vulnerabilities`, + name: "first_party_vulnerabilities", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + const thirdPartyVulnerabilitiesCodec = recordCodec({ + executor, + name: "third_party_vulnerabilities", + identifier: sql `interfaces_and_unions.third_party_vulnerabilities`, + attributes: { + id: col({ codec: TYPES.int, notNull: true }), + name: col({ + codec: TYPES.text, + notNull: true, + }), + cvss_score: col({ codec: TYPES.float, notNull: true }), + vendor_name: col({ codec: TYPES.text, notNull: false }), + }, + }); + const thirdPartyVulnerabilitiesResourceOptions = makePgResourceOptions({ + executor, + selectAuth, + codec: thirdPartyVulnerabilitiesCodec, + from: sql `interfaces_and_unions.third_party_vulnerabilities`, + name: "third_party_vulnerabilities", + uniques: [{ attributes: ["id"], isPrimary: true }], + }); + return makeRegistryBuilder() + .addExecutor(executor) + .addCodec(forumCodec) + .addCodec(userCodec) + .addCodec(messagesCodec) + .addResource(uniqueAuthorCountResourceOptions) + .addResource(forumNamesArrayResourceOptions) + .addResource(forumNamesCasesResourceOptions) + .addResource(forumsUniqueAuthorCountResourceOptions) + .addResource(scalarTextResourceOptions) + .addResource(messageResourceOptions) + .addResource(userResourceOptions) + .addResource(forumResourceOptions) + .addResource(usersMostRecentForumResourceOptions) + .addResource(featuredMessagesResourceOptions) + .addResource(forumsFeaturedMessagesResourceOptions) + .addResource(randomUserArrayResourceOptions) + .addResource(randomUserArraySetResourceOptions) + .addResource(forumsMessagesListSetResourceOptions) + .addCodec(unionEntityCodec) + .addCodec(personBookmarksCodec) + .addResource(personBookmarksResourceOptions) + .addCodec(personCodec) + .addResource(personResourceOptions) + .addCodec(postCodec) + .addResource(postResourceOptions) + .addCodec(commentCodec) + .addResource(commentResourceOptions) + .addCodec(itemTypeEnumCodec) + .addCodec(enumTableItemTypeCodec) + .addResource(enumTableItemTypeResourceOptions) + .addCodec(enumTableItemTypeEnumCodec) + .addCodec(singleTableItemsCodec) + .addResource(singleTableItemsResourceOptions) + .addCodec(relationalItemsCodec) + .addResource(relationalItemsResourceOptions) + .addCodec(relationalCommentableCodec) + .addResource(relationalCommentableResourceOptions) + .addCodec(relationalTopicsCodec) + .addResource(relationalTopicsResourceOptions) + .addCodec(relationalPostsCodec) + .addResource(relationalPostsResourceOptions) + .addCodec(relationalDividersCodec) + .addResource(relationalDividersResourceOptions) + .addCodec(relationalChecklistsCodec) + .addResource(relationalChecklistsResourceOptions) + .addCodec(relationalChecklistItemsCodec) + .addResource(relationalChecklistItemsResourceOptions) + .addCodec(unionItemsCodec) + .addResource(unionItemsResourceOptions) + .addCodec(unionTopicsCodec) + .addResource(unionTopicsResourceOptions) + .addCodec(unionPostsCodec) + .addResource(unionPostsResource) + .addCodec(unionDividersCodec) + .addResource(unionDividersResourceOptions) + .addCodec(unionChecklistsCodec) + .addResource(unionChecklistsResourceOptions) + .addCodec(unionChecklistItemsCodec) + .addResource(unionChecklistItemsResourceOptions) + .addResource(unionEntityResourceOptions) + .addResource(entitySearchResourceOptions) + .addCodec(awsApplicationsCodec) + .addResource(awsApplicationsResourceOptions) + .addCodec(gcpApplicationsCodec) + .addResource(gcpApplicationsResourceOptions) + .addCodec(firstPartyVulnerabilitiesCodec) + .addResource(firstPartyVulnerabilitiesResourceOptions) + .addCodec(thirdPartyVulnerabilitiesCodec) + .addResource(thirdPartyVulnerabilitiesResourceOptions) + .addRelation(messagesCodec, "author", userResourceOptions, { + localAttributes: [`author_id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(messagesCodec, "forum", forumResourceOptions, { + localAttributes: ["forum_id"], + remoteAttributes: ["id"], + isUnique: true, + }) + .addRelation(personBookmarksResourceOptions.codec, "person", personResourceOptions, { + isUnique: true, + localAttributes: ["person_id"], + remoteAttributes: ["person_id"], + }) + .addRelation(personCodec, "singleTableItems", singleTableItemsResourceOptions, { + isUnique: false, + localAttributes: ["person_id"], + remoteAttributes: ["author_id"], + }) + .addRelation(personCodec, "posts", postResourceOptions, { + isUnique: false, + localAttributes: ["person_id"], + remoteAttributes: ["author_id"], + }) + .addRelation(personCodec, "comments", postResourceOptions, { + isUnique: false, + localAttributes: ["person_id"], + remoteAttributes: ["author_id"], + }) + .addRelation(personCodec, "personBookmarks", personBookmarksResourceOptions, { + isUnique: false, + localAttributes: ["person_id"], + remoteAttributes: ["person_id"], + }) + .addRelation(postCodec, "author", personResourceOptions, { + isUnique: true, + localAttributes: ["author_id"], + remoteAttributes: ["person_id"], + }) + .addRelation(postCodec, "comments", commentResourceOptions, { + isUnique: false, + localAttributes: ["post_id"], + remoteAttributes: ["post_id"], + }) + .addRelation(commentCodec, "author", personResourceOptions, { + isUnique: true, + localAttributes: ["author_id"], + remoteAttributes: ["person_id"], + }) + .addRelation(commentCodec, "post", postResourceOptions, { + isUnique: true, + localAttributes: ["post_id"], + remoteAttributes: ["post_id"], + }) + .addRelation(singleTableItemsCodec, "parent", singleTableItemsResourceOptions, { + isUnique: true, + localAttributes: ["parent_id"], + remoteAttributes: ["id"], + }) + .addRelation(singleTableItemsCodec, "children", singleTableItemsResourceOptions, { + isUnique: false, + localAttributes: ["id"], + remoteAttributes: ["parent_id"], + }) + .addRelation(singleTableItemsCodec, "author", personResourceOptions, { + isUnique: true, + localAttributes: ["author_id"], + remoteAttributes: ["person_id"], + }) + .addRelation(relationalTopicsCodec, "item", relationalItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalTopicsCodec, "parent", relationalItemsResourceOptions, { + localAttributes: [`parent_id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalTopicsCodec, "author", personResourceOptions, { + localAttributes: [`author_id`], + remoteAttributes: [`person_id`], + isUnique: true, + }) + .addRelation(relationalPostsCodec, "item", relationalItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalPostsCodec, "parent", relationalItemsResourceOptions, { + localAttributes: [`parent_id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalPostsCodec, "author", personResourceOptions, { + localAttributes: [`author_id`], + remoteAttributes: [`person_id`], + isUnique: true, + }) + .addRelation(relationalPostsCodec, "commentable", relationalCommentableResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalDividersCodec, "item", relationalItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalDividersCodec, "parent", relationalItemsResourceOptions, { + localAttributes: [`parent_id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalDividersCodec, "author", personResourceOptions, { + localAttributes: [`author_id`], + remoteAttributes: [`person_id`], + isUnique: true, + }) + .addRelation(relationalChecklistsCodec, "item", relationalItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalChecklistsCodec, "parent", relationalItemsResourceOptions, { + localAttributes: [`parent_id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalChecklistsCodec, "author", personResourceOptions, { + localAttributes: [`author_id`], + remoteAttributes: [`person_id`], + isUnique: true, + }) + .addRelation(relationalChecklistsCodec, "commentable", relationalCommentableResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalChecklistItemsCodec, "item", relationalItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalChecklistItemsCodec, "parent", relationalItemsResourceOptions, { + localAttributes: [`parent_id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalChecklistItemsCodec, "author", personResourceOptions, { + localAttributes: [`author_id`], + remoteAttributes: [`person_id`], + isUnique: true, + }) + .addRelation(relationalChecklistItemsCodec, "commentable", relationalCommentableResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(relationalItemsCodec, "parent", relationalItemsResourceOptions, { + isUnique: true, + localAttributes: ["parent_id"], + remoteAttributes: ["id"], + }) + .addRelation(relationalItemsCodec, "children", relationalItemsResourceOptions, { + isUnique: false, + localAttributes: ["id"], + remoteAttributes: ["parent_id"], + }) + .addRelation(relationalItemsCodec, "author", personResourceOptions, { + isUnique: true, + localAttributes: ["author_id"], + remoteAttributes: ["person_id"], + }) + .addRelation(relationalItemsCodec, "topic", relationalTopicsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalItemsCodec, "post", relationalPostsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalItemsCodec, "divider", relationalDividersResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalItemsCodec, "checklist", relationalChecklistsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalItemsCodec, "checklistItem", relationalChecklistItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalCommentableCodec, "post", relationalPostsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalCommentableCodec, "checklist", relationalChecklistsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(relationalCommentableCodec, "checklistItem", relationalChecklistItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + // reciprocal: 'item', + }) + .addRelation(unionItemsCodec, "topic", unionTopicsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(unionItemsCodec, "post", unionPostsResource, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(unionItemsCodec, "divider", unionDividersResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(unionItemsCodec, "checklist", unionChecklistsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .addRelation(unionItemsCodec, "checklistItem", unionChecklistItemsResourceOptions, { + localAttributes: [`id`], + remoteAttributes: [`id`], + isUnique: true, + }) + .getRegistryConfig(); + }, [ + index_js_1.PgResource, + index_js_1.TYPES, + index_js_1.enumCodec, + executor, + codecs_js_1.listOfCodec, + datasource_js_1.makePgResourceOptions, + datasource_js_1.makeRegistryBuilder, + index_js_1.recordCodec, + selectAuth, + pg_sql2_1.default, + pgSelect_js_1.sqlFromArgDigests, + ], "registryConfig"); + const registry = EXPORTABLE((makeRegistry, registryConfig) => makeRegistry(registryConfig), [datasource_js_1.makeRegistry, registryConfig], "registry"); + if (Math.random() > 2) { + /* + * This block includes a rudimentary TypeScript types test - we get a + * person by id, follow the relationship to their posts, grab one of these, + * then grab its id. This id should be an int4, we want to ensure that it's + * assignable to 'int4' and NOT assignable to 'text' (i.e. not `string` or + * `any`). + * + * NOTE: this code would throw errors if you actually try and run it + * because it's not being ran as part of a Grafast planning context - hence + * the `if`. + */ + const $person = registry.pgResources.people.get({ + person_id: (0, grafast_1.constant)(1, false), + }); + const $posts = $person.manyRelation("posts"); + const $post = $posts.single(); + const $id = $post.get("post_id"); + const _testGood = $id.pgCodec.name; + // @ts-expect-error + const _testBad = $id.pgCodec.name; + } + const deoptimizeIfAppropriate = EXPORTABLE((__ListTransformStep, options) => (step) => { + if (options.deoptimize) { + const innerPlan = step instanceof __ListTransformStep + ? step.getListStep() + : step; + if ("getClassStep" in innerPlan) { + innerPlan.getClassStep().setInliningForbidden(); + } + else if ("setInliningForbidden" in innerPlan) { + innerPlan.setInliningForbidden(); + } + } + return step; + }, [grafast_1.__ListTransformStep, options]); + const { pgCodecs: { union__entity: unionEntityCodec }, pgResources: { messages: messageResource, users: userResource, forums: forumResource, people: personResource, person_bookmarks: personBookmarksResource, posts: postResource, comments: commentResource, single_table_items: singleTableItemsResource, relational_items: relationalItemsResource, relational_topics: relationalTopicsResource, relational_posts: relationalPostsResource, relational_dividers: relationalDividersResource, relational_checklists: relationalChecklistsResource, relational_checklist_items: relationalChecklistItemsResource, union_items: unionItemsResource, union_topics: unionTopicsResource, union_posts: unionPostsResource, union_dividers: unionDividersResource, union_checklists: unionChecklistsResource, union_checklist_items: unionChecklistItemsResource, relational_commentables: relationalCommentableResource, users_most_recent_forum: usersMostRecentForumResource, forums_unique_author_count: forumsUniqueAuthorCountResource, forums_featured_messages: forumsFeaturedMessagesResource, forums_messages_list_set: forumsMessagesListSetResource, text: scalarTextResource, unique_author_count: uniqueAuthorCountResource, forum_names_array: forumNamesArrayResource, forum_names_cases: forumNamesCasesResource, random_user_array: randomUserArrayResource, random_user_array_set: randomUserArraySetResource, featured_messages: featuredMessagesResource, entity_search: entitySearchResource, first_party_vulnerabilities: firstPartyVulnerabilitiesResource, third_party_vulnerabilities: thirdPartyVulnerabilitiesResource, }, } = registry; + //////////////////////////////////////// + const EnumTableItemType = new graphql_1.GraphQLEnumType({ + name: "EnumTableItemType", + values: { + TOPIC: { value: "TOPIC" }, + POST: { value: "POST" }, + DIVIDER: { value: "DIVIDER" }, + CHECKLIST: { value: "CHECKLIST" }, + CHECKLIST_ITEM: { value: "CHECKLIST_ITEM" }, + }, + }); + function attrField(attrName, type) { + return { + type, + plan: EXPORTABLE((attrName) => function plan($entity) { + return $entity.get(attrName); + }, [attrName]), + }; + } + function singleRelationField(relation, type) { + return { + type, + plan: EXPORTABLE((deoptimizeIfAppropriate, relation) => function plan($entity) { + const $plan = $entity.singleRelation(relation); + deoptimizeIfAppropriate($plan); + return $plan; + }, [deoptimizeIfAppropriate, relation]), + }; + } + const HashType = new graphql_1.GraphQLEnumType({ + name: "HashType", + values: { + MD5: { value: "md5" }, + SHA1: { value: "sha1" }, + SHA256: { value: "sha256" }, + }, + }); + const Hashes = new graphql_1.GraphQLObjectType({ + name: "Hashes", + fields: () => ({ + md5: { + type: graphql_1.GraphQLString, + resolve: EXPORTABLE((crypto) => function resolve(parent) { + return crypto.createHash("md5").update(parent.text).digest("hex"); + }, [crypto]), + }, + sha1: { + type: graphql_1.GraphQLString, + resolve: EXPORTABLE((crypto) => function resolve(parent) { + return crypto + .createHash("sha1") + .update(parent.text) + .digest("hex"); + }, [crypto]), + }, + throwNonNullError: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + resolve: EXPORTABLE(() => function resolve() { + return null; + }, []), + }, + throwTestError: { + type: graphql_1.GraphQLString, + resolve: EXPORTABLE(() => function resolve() { + throw new Error("Test"); + }, []), + }, + sha256: { + type: graphql_1.GraphQLString, + resolve: EXPORTABLE((crypto) => function resolve(parent) { + return crypto + .createHash("sha256") + .update(parent.text) + .digest("hex"); + }, [crypto]), + }, + self: { + type: Hashes, + resolve: EXPORTABLE(() => function resolve(parent) { + return parent; + }, []), + }, + }), + }); + const User = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "User", + fields: () => ({ + // Here we don't use `attrField` because we want to explicitly test the default plan resolver + // username: attrField("username", GraphQLString), + username: { + type: graphql_1.GraphQLString, + }, + gravatarUrl: attrField("gravatar_url", graphql_1.GraphQLString), + mostRecentForum: { + type: Forum, + plan: EXPORTABLE((deoptimizeIfAppropriate, usersMostRecentForumResource) => ($user) => { + const $forum = usersMostRecentForumResource.execute([ + { step: $user.record() }, + ]); + deoptimizeIfAppropriate($forum); + return $forum; + }, [deoptimizeIfAppropriate, usersMostRecentForumResource]), + }, + // This field is to test standard resolvers work on planned types + usernameHash: { + type: graphql_1.GraphQLString, + args: { + hashType: { + type: new graphql_1.GraphQLNonNull(HashType), + }, + }, + plan: EXPORTABLE((object) => function plan($user) { + return object({ username: $user.get("username") }); + }, [grafast_1.object]), + resolve: EXPORTABLE((crypto) => function resolve(user, args) { + return crypto + .createHash(args.hashType) + .update(user.username) + .digest("hex"); + }, [crypto]), + }, + // This field is to test standard resolvers work when returning non-scalars on planned types + usernameHashes: { + type: Hashes, + plan: EXPORTABLE(() => function plan($user) { + return $user.get("username"); + }, []), + resolve: EXPORTABLE(() => function resolve(username) { + return { text: username }; + }, []), + }, + }), + }); + const MessagesOrderBy = new graphql_1.GraphQLEnumType({ + name: "MessagesOrderBy", + values: { + BODY_ASC: { + extensions: { + grafast: { + apply: EXPORTABLE((TYPES, sql) => (qb) => { + qb.orderBy({ + codec: TYPES.text, + fragment: sql `${qb}.body`, + direction: "ASC", + }); + }, [index_js_1.TYPES, pg_sql2_1.default]), + }, + }, + }, + BODY_DESC: { + extensions: { + grafast: { + apply: EXPORTABLE((TYPES, sql) => (qb) => { + qb.orderBy({ + codec: TYPES.text, + fragment: sql `${qb}.body`, + direction: "DESC", + }); + }, [index_js_1.TYPES, pg_sql2_1.default]), + }, + }, + }, + AUTHOR_USERNAME_ASC: { + extensions: { + grafast: { + apply: EXPORTABLE((TYPES, sql) => (qb) => { + const authorAlias = qb.singleRelation("author"); + qb.orderBy({ + codec: TYPES.text, + fragment: sql `${authorAlias}.username`, + direction: "ASC", + }); + }, [index_js_1.TYPES, pg_sql2_1.default]), + }, + }, + }, + AUTHOR_USERNAME_DESC: { + extensions: { + grafast: { + apply: EXPORTABLE((TYPES, sql) => (qb) => { + const authorAlias = qb.singleRelation("author"); + qb.orderBy({ + codec: TYPES.text, + fragment: sql `${authorAlias}.username`, + direction: "DESC", + }); + }, [index_js_1.TYPES, pg_sql2_1.default]), + }, + }, + }, + }, + }); + const Message = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "Message", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLString), + featured: attrField("featured", graphql_1.GraphQLBoolean), + body: attrField("body", graphql_1.GraphQLString), + forum: singleRelationField("forum", Forum), + author: { + type: User, + plan: EXPORTABLE((deoptimizeIfAppropriate) => function plan($message) { + const $user = $message.singleRelation("author"); + deoptimizeIfAppropriate($user); + return $user; + }, [deoptimizeIfAppropriate]), + }, + isArchived: attrField("is_archived", graphql_1.GraphQLBoolean), + }), + }); + const MessageEdge = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "MessageEdge", + fields: { + cursor: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE(() => function plan($node) { + return $node.cursor(); + }, []), + }, + node: { + type: Message, + plan: EXPORTABLE(() => function plan($node) { + return $node; + }, []), + }, + }, + }); + const PageInfo = (0, grafast_1.newObjectTypeBuilder)(pgPageInfo_js_1.PgPageInfoStep)({ + name: "PageInfo", + fields: { + hasNextPage: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean), + plan: EXPORTABLE(() => ($pageInfo) => $pageInfo.hasNextPage(), []), + }, + hasPreviousPage: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean), + plan: EXPORTABLE(() => ($pageInfo) => $pageInfo.hasPreviousPage(), []), + }, + startCursor: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE(() => ($pageInfo) => $pageInfo.startCursor(), []), + }, + endCursor: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE(() => ($pageInfo) => $pageInfo.endCursor(), []), + }, + }, + }); + const MessagesConnection = (0, grafast_1.newObjectTypeBuilder)(grafast_1.ConnectionStep)({ + name: "MessagesConnection", + fields: { + edges: { + type: new graphql_1.GraphQLList(MessageEdge), + plan: EXPORTABLE(() => function plan($connection) { + return $connection.edges(); + }, []), + }, + nodes: (0, grafast_1.newGrafastFieldConfigBuilder)()({ + type: new graphql_1.GraphQLList(Message), + plan: EXPORTABLE(() => function plan($connection) { + return $connection.nodes(); + }, []), + }), + pageInfo: (0, grafast_1.newGrafastFieldConfigBuilder)()({ + type: new graphql_1.GraphQLNonNull(PageInfo), + plan: EXPORTABLE(() => function plan($connection) { + // return context(); + return $connection.pageInfo(); + }, []), + }), + totalCount: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + plan: EXPORTABLE((TYPES, sql) => ($connection) => $connection + .cloneSubplanWithoutPagination("aggregate") + .single() + .select(sql `count(*)`, TYPES.bigint, false), [index_js_1.TYPES, pg_sql2_1.default]), + }, + }, + }); + const IncludeArchived = new graphql_1.GraphQLEnumType({ + name: "IncludeArchived", + values: { + INHERIT: { + value: "INHERIT", + }, + YES: { + value: "YES", + }, + NO: { + value: "NO", + }, + EXCLUSIVELY: { + value: "EXCLUSIVELY", + }, + }, + }); + function makeIncludeArchivedArg(getClassStep) { + return { + type: IncludeArchived, + applyPlan: EXPORTABLE((PgSelectSingleStep, constant, getClassStep, includeArchivedCondition, lambda) => function plan($parent, $field, val) { + const $messages = getClassStep($field); + const $value = val.getRaw(); + const $parentPgSelectSingle = $parent instanceof PgSelectSingleStep + ? $parent + : null; + const sqlParentArchivedAt = $parentPgSelectSingle?.resource?.codec + .attributes?.archived_at + ? $messages.placeholder($parentPgSelectSingle.get("archived_at")) + : undefined; + const $condition = lambda([constant(sqlParentArchivedAt), $value], includeArchivedCondition, true); + $messages.apply($condition); + }, [ + index_js_1.PgSelectSingleStep, + grafast_1.constant, + getClassStep, + includeArchivedCondition, + grafast_1.lambda, + ]), + defaultValue: "INHERIT", + }; + } + const MessageCondition = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "MessageCondition", + fields: { + featured: { + type: graphql_1.GraphQLBoolean, + apply: EXPORTABLE((TYPES, sql, sqlValueWithCodec) => function plan($condition, arg) { + if (arg === null) { + $condition.where(sql `${$condition}.featured is null`); + } + else { + $condition.where(sql `${$condition}.featured = ${sqlValueWithCodec(arg, TYPES.boolean)}`); + } + }, [index_js_1.TYPES, pg_sql2_1.default, codecs_js_1.sqlValueWithCodec]), + }, + }, + }); + const BooleanFilter = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "BooleanFilter", + fields: { + equalTo: { + type: graphql_1.GraphQLBoolean, + apply: EXPORTABLE((TYPES, sql, sqlValueWithCodec) => function plan($parent, arg) { + if (arg === null) { + // Ignore + } + else { + $parent.where(sql `${$parent.expression} = ${sqlValueWithCodec(arg, TYPES.boolean)}`); + } + }, [index_js_1.TYPES, pg_sql2_1.default, codecs_js_1.sqlValueWithCodec]), + }, + notEqualTo: { + type: graphql_1.GraphQLBoolean, + apply: EXPORTABLE((TYPES, sql, sqlValueWithCodec) => function plan($parent, arg) { + if (arg === null) { + // Ignore + } + else { + $parent.where(sql `${$parent.expression} <> ${sqlValueWithCodec(arg, TYPES.boolean)}`); + } + }, [index_js_1.TYPES, pg_sql2_1.default, codecs_js_1.sqlValueWithCodec]), + }, + }, + }); + const MessageFilter = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "MessageFilter", + fields: { + featured: { + type: BooleanFilter, + apply: EXPORTABLE((PgBooleanFilter, sql) => function plan($messageFilter, arg) { + if (arg === null) { + // Ignore + } + else { + return new PgBooleanFilter($messageFilter, sql `${$messageFilter}.featured`); + } + }, [index_js_1.PgBooleanFilter, pg_sql2_1.default]), + }, + isArchived: { + type: BooleanFilter, + apply: EXPORTABLE((PgBooleanFilter, sql) => function plan($messageFilter, arg) { + if (arg === null) { + // Ignore + } + else { + return new PgBooleanFilter($messageFilter, sql `${$messageFilter}.is_archived`); + } + }, [index_js_1.PgBooleanFilter, pg_sql2_1.default]), + }, + }, + }); + const ForumCondition = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "ForumCondition", + fields: { + name: { + type: graphql_1.GraphQLString, + apply: EXPORTABLE((TYPES, sql, sqlValueWithCodec) => function plan($condition, arg) { + if (arg === null) { + $condition.where(sql `${$condition}.name is null`); + } + else { + $condition.where(sql `${$condition}.name = ${sqlValueWithCodec(arg, TYPES.text)}`); + } + }, [index_js_1.TYPES, pg_sql2_1.default, codecs_js_1.sqlValueWithCodec]), + }, + }, + }); + const ForumToManyMessageFilter = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "ForumToManyMessageFilter", + fields: { + some: { + type: MessageFilter, + apply: EXPORTABLE(() => function plan($manyFilter, arg) { + if (arg !== null) { + return $manyFilter.some(); + } + }, []), + }, + }, + }); + const ForumFilter = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "ForumFilter", + fields: { + messages: { + type: ForumToManyMessageFilter, + apply: EXPORTABLE((PgManyFilter, messageResource) => function plan($condition, arg) { + if (arg !== null) { + return new PgManyFilter($condition, messageResource, ["id"], ["forum_id"]); + } + }, [index_js_1.PgManyFilter, messageResource]), + }, + }, + }); + const Forum = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "Forum", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLString), + name: attrField("name", graphql_1.GraphQLString), + // Expression attribute + isArchived: attrField("is_archived", graphql_1.GraphQLBoolean), + // Custom expression; actual attribute select shouldn't make it through to the generated query. + archivedAtIsNotNull: { + type: graphql_1.GraphQLBoolean, + plan: EXPORTABLE((TYPES, pgClassExpression) => function plan($forum) { + const $archivedAt = $forum.get("archived_at"); + const $expr1 = pgClassExpression($forum, TYPES.boolean, true) `${$archivedAt} is not null`; + const $expr2 = pgClassExpression($forum, TYPES.boolean, true) `${$expr1} is true`; + return $expr2; + }, [index_js_1.TYPES, index_js_1.pgClassExpression]), + }, + self: { + type: Forum, + plan: EXPORTABLE(() => function plan($forum) { + return $forum; + }, []), + }, + message: { + type: Message, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + }, + }, + plan: EXPORTABLE((deoptimizeIfAppropriate, messageResource) => function plan($forum, { $id }) { + const $forumId = $forum.get("id"); + const $message = messageResource.get({ + forum_id: $forumId, + id: $id, + }); + deoptimizeIfAppropriate($message); + return $message; + }, [deoptimizeIfAppropriate, messageResource]), + }, + messagesList: { + type: new graphql_1.GraphQLList(Message), + args: { + first: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$forum, $messages, arg) { + $messages.setFirst(arg.getRaw()); + }, []), + }, + condition: { + type: MessageCondition, + applyPlan: EXPORTABLE((pgWhere) => function plan(_$forum, $messages, arg) { + arg.apply($messages, pgWhere); + }, [pgWhere]), + }, + filter: { + type: MessageFilter, + applyPlan: EXPORTABLE((pgClassFilterWhere) => function plan(_$forum, $messages, arg) { + arg.apply($messages, pgClassFilterWhere); + }, [pgClassFilterWhere]), + }, + includeArchived: makeIncludeArchivedArg(($messages) => $messages), + }, + plan: EXPORTABLE((deoptimizeIfAppropriate, messageResource) => function plan($forum) { + const $forumId = $forum.get("id"); + const $messages = messageResource.find({ forum_id: $forumId }); + deoptimizeIfAppropriate($messages); + $messages.setTrusted(); + // $messages.leftJoin(...); + // $messages.innerJoin(...); + // $messages.relation('fk_messages_author_id') + // $messages.where(...); + // $messages.orderBy(...); + return $messages; + }, [deoptimizeIfAppropriate, messageResource]), + }, + messagesConnection: { + type: MessagesConnection, + args: { + first: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$forum, $connection, arg) { + $connection.setFirst(arg.getRaw()); + }, []), + }, + last: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setLast(arg.getRaw()); + }, []), + }, + condition: { + type: MessageCondition, + applyPlan: EXPORTABLE((pgWhere) => function plan(_$forum, $connection, arg) { + const $messages = $connection.getSubplan(); + arg.apply($messages, pgWhere); + }, [pgWhere]), + }, + filter: { + type: MessageFilter, + applyPlan: EXPORTABLE((pgClassFilterWhere) => function plan(_$forum, $connection, arg) { + const $messages = $connection.getSubplan(); + arg.apply($messages, pgClassFilterWhere); + }, [pgClassFilterWhere]), + }, + includeArchived: makeIncludeArchivedArg(($connection) => $connection.getSubplan()), + }, + plan: EXPORTABLE((connection, deoptimizeIfAppropriate, messageResource) => function plan($forum) { + const $messages = messageResource.find({ + forum_id: $forum.get("id"), + }); + $messages.setTrusted(); + deoptimizeIfAppropriate($messages); + // $messages.leftJoin(...); + // $messages.innerJoin(...); + // $messages.relation('fk_messages_author_id') + // $messages.where(...); + const $connectionPlan = connection($messages); + // $connectionPlan.orderBy... ? + // DEFINITELY NOT $messages.orderBy BECAUSE we don't want that applied to aggregates. + // DEFINITELY NOT $messages.limit BECAUSE we don't want those limits applied to aggregates or page info. + return $connectionPlan; + }, [grafast_1.connection, deoptimizeIfAppropriate, messageResource]), + }, + uniqueAuthorCount: { + type: graphql_1.GraphQLInt, + args: { + featured: { + type: graphql_1.GraphQLBoolean, + }, + }, + plan: EXPORTABLE((TYPES, forumsUniqueAuthorCountResource) => function plan($forum, { $featured }) { + return forumsUniqueAuthorCountResource.execute([ + { + step: $forum.record(), + }, + { + step: $featured, + pgCodec: TYPES.boolean, + }, + ]); + }, [index_js_1.TYPES, forumsUniqueAuthorCountResource]), + }, + randomUser: { + type: User, + plan: EXPORTABLE((deoptimizeIfAppropriate, pgSelect, sql, sqlFromArgDigests, userResource) => function plan($forum) { + const $user = pgSelect({ + resource: userResource, + identifiers: [], + args: [ + { + step: $forum.record(), + }, + ], + from: (...args) => sql `app_public.forums_random_user(${sqlFromArgDigests(args)})`, + name: "forums_random_user", + }).single(); + deoptimizeIfAppropriate($user); + return $user; + }, [ + deoptimizeIfAppropriate, + index_js_1.pgSelect, + pg_sql2_1.default, + pgSelect_js_1.sqlFromArgDigests, + userResource, + ]), + }, + featuredMessages: { + type: new graphql_1.GraphQLList(Message), + plan: EXPORTABLE((deoptimizeIfAppropriate, forumsFeaturedMessagesResource) => function plan($forum) { + const $messages = forumsFeaturedMessagesResource.execute([ + { + step: $forum.record(), + }, + ]); + deoptimizeIfAppropriate($messages); + return $messages; + }, [deoptimizeIfAppropriate, forumsFeaturedMessagesResource]), + }, + messagesListSet: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLList(Message)), + plan: EXPORTABLE((deoptimizeIfAppropriate, forumsMessagesListSetResource) => function plan($forum) { + const $partitionedMessages = forumsMessagesListSetResource.execute([ + { + step: $forum.record(), + }, + ]); + deoptimizeIfAppropriate($partitionedMessages); + return $partitionedMessages; + }, [deoptimizeIfAppropriate, forumsMessagesListSetResource]), + }, + messagesWithManyTransforms: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLList(Message)), + plan: EXPORTABLE((deoptimizeIfAppropriate, each, filter, groupBy, lambda, messageResource) => function plan($forum) { + // This is a deliberately convoluted plan to ensure that multiple + // filter plans work well together. + // Load _all_ the messages from the DB. + const $messages = messageResource.find(); + deoptimizeIfAppropriate($messages); + // Filter messages to those _not_ in this forum + const $messagesFromOtherForums = filter($messages, ($message) => lambda([$message.get("forum_id"), $forum.get("id")], ([messageForumId, forumId]) => messageForumId !== forumId, true)); + // Group messages by the "featured" property + const $grouped = groupBy($messagesFromOtherForums, ($message) => $message.get("featured")); + // Since `groupBy` results in a `Map`, turn it into an array by just getting the values + const $entries = lambda($grouped, (map) => [...map.values()], true); + // Now map over the resulting list of list of values and wrap with the message list item plan. + return each($entries, ($group) => each($group, ($item) => $messages.listItem($item))); + }, [ + deoptimizeIfAppropriate, + grafast_1.each, + grafast_1.filter, + grafast_1.groupBy, + grafast_1.lambda, + messageResource, + ]), + }, + }), + }); + const singleTableTypeNameCallback = EXPORTABLE(() => (v) => { + if (v == null) { + return v; + } + const type = { + TOPIC: "SingleTableTopic", + POST: "SingleTablePost", + DIVIDER: "SingleTableDivider", + CHECKLIST: "SingleTableChecklist", + CHECKLIST_ITEM: "SingleTableChecklistItem", + }[v]; + if (!type) { + throw new Error(`Could not determine type for '${v}'`); + } + return type; + }, []); + const singleTableTypeName = EXPORTABLE((lambda, singleTableTypeNameCallback) => ($entity) => { + const $type = $entity.get("type"); + const $typeName = lambda($type, singleTableTypeNameCallback, true); + return $typeName; + }, [grafast_1.lambda, singleTableTypeNameCallback]); + const singleTableItemInterface = EXPORTABLE((pgSingleTablePolymorphic, singleTableTypeName) => ($item) => pgSingleTablePolymorphic(singleTableTypeName($item), $item), [index_js_1.pgSingleTablePolymorphic, singleTableTypeName]); + const relationalItemPolymorphicTypeMap = EXPORTABLE((deoptimizeIfAppropriate) => ({ + RelationalTopic: { + match: (t) => t === "TOPIC", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("topic")), + }, + RelationalPost: { + match: (t) => t === "POST", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("post")), + }, + RelationalDivider: { + match: (t) => t === "DIVIDER", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("divider")), + }, + RelationalChecklist: { + match: (t) => t === "CHECKLIST", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("checklist")), + }, + RelationalChecklistItem: { + match: (t) => t === "CHECKLIST_ITEM", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("checklistItem")), + }, + }), [deoptimizeIfAppropriate]); + const relationalItemInterface = EXPORTABLE((pgPolymorphic, relationalItemPolymorphicTypeMap) => ($item) => pgPolymorphic($item, $item.get("type"), relationalItemPolymorphicTypeMap), [index_js_1.pgPolymorphic, relationalItemPolymorphicTypeMap]); + const unionItemPolymorphicTypeMap = EXPORTABLE((deoptimizeIfAppropriate) => ({ + UnionTopic: { + match: (t) => t === "TOPIC", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("topic")), + }, + UnionPost: { + match: (t) => t === "POST", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("post")), + }, + UnionDivider: { + match: (t) => t === "DIVIDER", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("divider")), + }, + UnionChecklist: { + match: (t) => t === "CHECKLIST", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("checklist")), + }, + UnionChecklistItem: { + match: (t) => t === "CHECKLIST_ITEM", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("checklistItem")), + }, + }), [deoptimizeIfAppropriate]); + const unionItemUnion = EXPORTABLE((pgPolymorphic, unionItemPolymorphicTypeMap) => ($item) => pgPolymorphic($item, $item.get("type"), unionItemPolymorphicTypeMap), [index_js_1.pgPolymorphic, unionItemPolymorphicTypeMap]); + const relationalCommentablePolymorphicTypeMap = EXPORTABLE((deoptimizeIfAppropriate) => ({ + RelationalPost: { + match: (t) => t === "POST", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("post")), + }, + RelationalChecklist: { + match: (t) => t === "CHECKLIST", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("checklist")), + }, + RelationalChecklistItem: { + match: (t) => t === "CHECKLIST_ITEM", + plan: (_, $item) => deoptimizeIfAppropriate($item.singleRelation("checklistItem")), + }, + }), [deoptimizeIfAppropriate]); + const relationalCommentableInterface = EXPORTABLE((pgPolymorphic, relationalCommentablePolymorphicTypeMap) => ($item) => pgPolymorphic($item, $item.get("type"), relationalCommentablePolymorphicTypeMap), [index_js_1.pgPolymorphic, relationalCommentablePolymorphicTypeMap]); + const entityPolymorphicTypeMap = EXPORTABLE((commentResource, personResource, postResource) => ({ + Person: { + match: (v) => v[0] != null, + plan: ($list) => personResource.get({ person_id: $list.at(0) }), + }, + Post: { + match: (v) => v[1] != null, + plan: ($list) => postResource.get({ post_id: $list.at(1) }), + }, + Comment: { + match: (v) => v[2] != null, + plan: ($list) => commentResource.get({ comment_id: $list.at(2) }), + }, + }), [commentResource, personResource, postResource]); + /** + * This makes a polymorphic plan that returns the "entity" represented by the + * "interfaces_and_unions.union__entity" type in the database (a composite + * type with an attribute that's a "foreign key" to each table that's + * included in the union). + * + * i.e. if `$item.get('person_id')` is set, then it's a Person and we should + * grab that person from the `personResource`. If `post_id` is set it's a Post, + * and so on. + */ + const entityUnion = EXPORTABLE((entityPolymorphicTypeMap, list, pgPolymorphic) => ($item) => pgPolymorphic($item, list([ + $item.get("person_id"), + $item.get("post_id"), + $item.get("comment_id"), + ]), entityPolymorphicTypeMap), [entityPolymorphicTypeMap, grafast_1.list, index_js_1.pgPolymorphic]); + const PersonBookmark = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "PersonBookmark", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLInt), + person: singleRelationField("person", Person), + bookmarkedEntity: { + type: Entity, + plan: EXPORTABLE((entityUnion) => function plan($personBookmark) { + const $entity = $personBookmark.get("bookmarked_entity"); + return entityUnion($entity); + }, [entityUnion]), + }, + }), + }); + const Person = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "Person", + fields: () => ({ + personId: attrField("person_id", graphql_1.GraphQLInt), + username: attrField("username", graphql_1.GraphQLString), + singleTableItemsList: { + type: new graphql_1.GraphQLList(SingleTableItem), + plan: EXPORTABLE((deoptimizeIfAppropriate, each, singleTableItemInterface, singleTableItemsResource) => function plan($person) { + const $personId = $person.get("person_id"); + const $items = singleTableItemsResource.find({ + author_id: $personId, + }); + deoptimizeIfAppropriate($items); + return each($items, singleTableItemInterface); + }, [ + deoptimizeIfAppropriate, + grafast_1.each, + singleTableItemInterface, + singleTableItemsResource, + ]), + }, + relationalItemsList: { + type: new graphql_1.GraphQLList(RelationalItem), + plan: EXPORTABLE((deoptimizeIfAppropriate, each, relationalItemInterface, relationalItemsResource) => function plan($person) { + const $personId = $person.get("person_id"); + const $items = relationalItemsResource.find({ + author_id: $personId, + }); + deoptimizeIfAppropriate($items); + return each($items, ($item) => relationalItemInterface($item)); + }, [ + deoptimizeIfAppropriate, + grafast_1.each, + relationalItemInterface, + relationalItemsResource, + ]), + }, + personBookmarksList: { + type: new graphql_1.GraphQLList(PersonBookmark), + plan: EXPORTABLE(() => function plan($person) { + return $person.manyRelation("personBookmarks"); + }, []), + }, + }), + }); + const Post = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "Post", + fields: () => ({ + postId: attrField("post_id", graphql_1.GraphQLInt), + body: attrField("body", graphql_1.GraphQLString), + author: singleRelationField("author", Person), + }), + }); + const Comment = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "Comment", + fields: () => ({ + commentId: attrField("comment_id", graphql_1.GraphQLInt), + author: singleRelationField("author", Person), + post: singleRelationField("post", Post), + body: attrField("body", graphql_1.GraphQLString), + }), + }); + //////////////////////////////////////// + const SingleTableItem = new graphql_1.GraphQLInterfaceType({ + name: "SingleTableItem", + fields: () => ({ + id: { type: graphql_1.GraphQLInt }, + type: { type: graphql_1.GraphQLString }, + type2: { type: EnumTableItemType }, + parent: { type: SingleTableItem }, + author: { type: Person }, + position: { type: graphql_1.GraphQLString }, + createdAt: { type: graphql_1.GraphQLString }, + updatedAt: { type: graphql_1.GraphQLString }, + isExplicitlyArchived: { type: graphql_1.GraphQLBoolean }, + archivedAt: { type: graphql_1.GraphQLString }, + }), + }); + const commonSingleTableItemFields = { + id: attrField("id", graphql_1.GraphQLInt), + type: attrField("type", graphql_1.GraphQLString), + type2: attrField("type2", EnumTableItemType), + parent: { + type: SingleTableItem, + plan: EXPORTABLE((deoptimizeIfAppropriate, singleTableItemInterface) => function plan($entity) { + const $plan = $entity.singleRelation("parent"); + deoptimizeIfAppropriate($plan); + return singleTableItemInterface($plan); + }, [deoptimizeIfAppropriate, singleTableItemInterface]), + }, + author: singleRelationField("author", Person), + position: attrField("position", graphql_1.GraphQLString), + createdAt: attrField("created_at", graphql_1.GraphQLString), + updatedAt: attrField("updated_at", graphql_1.GraphQLString), + isExplicitlyArchived: attrField("is_explicitly_archived", graphql_1.GraphQLBoolean), + archivedAt: attrField("archived_at", graphql_1.GraphQLString), + }; + const SingleTableTopic = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "SingleTableTopic", + interfaces: [SingleTableItem], + fields: () => ({ + ...commonSingleTableItemFields, + title: attrField("title", graphql_1.GraphQLString), + }), + }); + const SingleTablePost = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "SingleTablePost", + interfaces: [SingleTableItem], + fields: () => ({ + ...commonSingleTableItemFields, + title: attrField("title", graphql_1.GraphQLString), + description: attrField("description", graphql_1.GraphQLString), + note: attrField("note", graphql_1.GraphQLString), + }), + }); + const SingleTableDivider = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "SingleTableDivider", + interfaces: [SingleTableItem], + fields: () => ({ + ...commonSingleTableItemFields, + title: attrField("title", graphql_1.GraphQLString), + color: attrField("color", graphql_1.GraphQLString), + }), + }); + const SingleTableChecklist = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "SingleTableChecklist", + interfaces: [SingleTableItem], + fields: () => ({ + ...commonSingleTableItemFields, + title: attrField("title", graphql_1.GraphQLString), + }), + }); + const SingleTableChecklistItem = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "SingleTableChecklistItem", + interfaces: [SingleTableItem], + fields: () => ({ + ...commonSingleTableItemFields, + description: attrField("description", graphql_1.GraphQLString), + note: attrField("note", graphql_1.GraphQLString), + }), + }); + //////////////////////////////////////// + const RelationalItem = new graphql_1.GraphQLInterfaceType({ + name: "RelationalItem", + fields: () => ({ + id: { type: graphql_1.GraphQLInt }, + type: { type: graphql_1.GraphQLString }, + type2: { type: EnumTableItemType }, + parent: { type: RelationalItem }, + author: { type: Person }, + position: { type: graphql_1.GraphQLString }, + createdAt: { type: graphql_1.GraphQLString }, + updatedAt: { type: graphql_1.GraphQLString }, + isExplicitlyArchived: { type: graphql_1.GraphQLBoolean }, + archivedAt: { type: graphql_1.GraphQLString }, + }), + }); + const RelationalCommentable = new graphql_1.GraphQLInterfaceType({ + name: "RelationalCommentable", + fields: () => ({ + id: { type: graphql_1.GraphQLInt }, + type: { type: graphql_1.GraphQLString }, + type2: { type: EnumTableItemType }, + }), + }); + const commonRelationalItemFields = () => ({ + id: attrField("id", graphql_1.GraphQLInt), + type: attrField("type", graphql_1.GraphQLString), + type2: attrField("type2", EnumTableItemType), + parent: { + type: RelationalItem, + plan: EXPORTABLE((deoptimizeIfAppropriate, relationalItemInterface) => function plan($entity) { + const $plan = $entity.singleRelation("parent"); + deoptimizeIfAppropriate($plan); + return relationalItemInterface($plan); + }, [deoptimizeIfAppropriate, relationalItemInterface]), + }, + author: singleRelationField("author", Person), + position: attrField("position", graphql_1.GraphQLString), + createdAt: attrField("created_at", graphql_1.GraphQLString), + updatedAt: attrField("updated_at", graphql_1.GraphQLString), + isExplicitlyArchived: attrField("is_explicitly_archived", graphql_1.GraphQLBoolean), + archivedAt: attrField("archived_at", graphql_1.GraphQLString), + }); + const RelationalTopic = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "RelationalTopic", + interfaces: [RelationalItem], + fields: () => ({ + ...commonRelationalItemFields(), + title: attrField("title", graphql_1.GraphQLString), + }), + }); + const RelationalPost = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "RelationalPost", + interfaces: [RelationalItem, RelationalCommentable], + fields: () => ({ + ...commonRelationalItemFields(), + title: attrField("title", graphql_1.GraphQLString), + description: attrField("description", graphql_1.GraphQLString), + note: attrField("note", graphql_1.GraphQLString), + titleLower: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE((pgSelect, scalarTextResource, sql, sqlFromArgDigests) => function plan($entity) { + return pgSelect({ + resource: scalarTextResource, + identifiers: [], + args: [ + { + step: $entity.record(), + }, + ], + from: (...args) => sql `interfaces_and_unions.relational_posts_title_lower(${sqlFromArgDigests(args)})`, + name: "relational_posts_title_lower", + }).single(); + }, [index_js_1.pgSelect, scalarTextResource, pg_sql2_1.default, pgSelect_js_1.sqlFromArgDigests]), + }, + }), + }); + const RelationalDivider = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "RelationalDivider", + interfaces: [RelationalItem], + fields: () => ({ + ...commonRelationalItemFields(), + title: attrField("title", graphql_1.GraphQLString), + color: attrField("color", graphql_1.GraphQLString), + }), + }); + const RelationalChecklist = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "RelationalChecklist", + interfaces: [RelationalItem, RelationalCommentable], + fields: () => ({ + ...commonRelationalItemFields(), + title: attrField("title", graphql_1.GraphQLString), + }), + }); + const RelationalChecklistItem = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "RelationalChecklistItem", + interfaces: [RelationalItem, RelationalCommentable], + fields: () => ({ + ...commonRelationalItemFields(), + description: attrField("description", graphql_1.GraphQLString), + note: attrField("note", graphql_1.GraphQLString), + }), + }); + //////////////////////////////////////// + const UnionItem = new graphql_1.GraphQLUnionType({ + name: "UnionItem", + types: () => [ + UnionTopic, + UnionPost, + UnionDivider, + UnionChecklist, + UnionChecklistItem, + ], + }); + const UnionTopic = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "UnionTopic", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLInt), + title: attrField("title", graphql_1.GraphQLString), + }), + }); + const UnionPost = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "UnionPost", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLInt), + title: attrField("title", graphql_1.GraphQLString), + description: attrField("description", graphql_1.GraphQLString), + note: attrField("note", graphql_1.GraphQLString), + }), + }); + const UnionDivider = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "UnionDivider", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLInt), + title: attrField("title", graphql_1.GraphQLString), + color: attrField("color", graphql_1.GraphQLString), + }), + }); + const UnionChecklist = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "UnionChecklist", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLInt), + title: attrField("title", graphql_1.GraphQLString), + }), + }); + const UnionChecklistItem = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgSelectSingleStep)({ + name: "UnionChecklistItem", + fields: () => ({ + id: attrField("id", graphql_1.GraphQLInt), + description: attrField("description", graphql_1.GraphQLString), + note: attrField("note", graphql_1.GraphQLString), + }), + }); + //////////////////////////////////////// + const Entity = new graphql_1.GraphQLUnionType({ + name: "Entity", + types: () => [Person, Post, Comment], + }); + //////////////////////////////////////// + const Vulnerability = new graphql_1.GraphQLInterfaceType({ + name: "Vulnerability", + fields: { + cvssScore: { + type: graphql_1.GraphQLFloat, + }, + }, + }); + const FirstPartyVulnerability = (0, grafast_1.newObjectTypeBuilder)(grafast_1.ExecutableStep)({ + name: "FirstPartyVulnerability", + interfaces: [Vulnerability], + fields: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + plan: EXPORTABLE(() => function plan($v) { + return $v.get("id"); + }, []), + }, + name: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + plan: EXPORTABLE(() => function plan($v) { + return $v.get("name"); + }, []), + }, + cvssScore: { + type: graphql_1.GraphQLFloat, + plan: EXPORTABLE(() => function plan($v) { + return $v.get("cvss_score"); + }, []), + }, + teamName: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE(() => function plan($v) { + return $v.get("team_name"); + }, []), + }, + }, + }); + const ThirdPartyVulnerability = (0, grafast_1.newObjectTypeBuilder)(grafast_1.ExecutableStep)({ + name: "ThirdPartyVulnerability", + interfaces: [Vulnerability], + fields: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + plan: EXPORTABLE(() => function plan($v) { + return $v.get("id"); + }, []), + }, + name: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + plan: EXPORTABLE(() => function plan($v) { + return $v.get("name"); + }, []), + }, + cvssScore: { + type: graphql_1.GraphQLFloat, + plan: EXPORTABLE(() => function plan($v) { + return $v.get("cvss_score"); + }, []), + }, + vendorName: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE(() => function plan($v) { + return $v.get("vendor_name"); + }, []), + }, + }, + }); + const VulnerabilityEdge = (0, grafast_1.newObjectTypeBuilder)(pgUnionAll_js_1.PgUnionAllSingleStep)({ + name: "VulnerabilityEdge", + fields: { + cursor: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE(() => function plan($node) { + return $node.cursor(); + }, []), + }, + node: { + type: Vulnerability, + plan: EXPORTABLE(() => function plan($node) { + return $node; + }, []), + }, + }, + }); + const VulnerabilitiesConnection = (0, grafast_1.newObjectTypeBuilder)(grafast_1.ConnectionStep)({ + name: "VulnerabilitiesConnection", + fields: { + edges: { + type: new graphql_1.GraphQLList(VulnerabilityEdge), + plan: EXPORTABLE(() => function plan($connection) { + return $connection.edges(); + }, []), + }, + pageInfo: (0, grafast_1.newGrafastFieldConfigBuilder)()({ + type: new graphql_1.GraphQLNonNull(PageInfo), + plan: EXPORTABLE(() => function plan($connection) { + return $connection.pageInfo(); + }, []), + }), + }, + }); + const VulnerabilityCondition = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "VulnerabilityCondition", + fields: { + todo: { + type: graphql_1.GraphQLString, + }, + }, + }); + const VulnerabilitiesOrderBy = new graphql_1.GraphQLEnumType({ + name: "VulnerabilitiesOrderBy", + values: { + CVSS_SCORE_ASC: { + extensions: { + grafast: { + apply: EXPORTABLE(() => (qb) => { + qb.orderBy({ + attribute: "cvss_score", + direction: "ASC", + }); + }, []), + }, + }, + }, + CVSS_SCORE_DESC: { + extensions: { + grafast: { + apply: EXPORTABLE(() => (qb) => { + qb.orderBy({ + attribute: "cvss_score", + direction: "DESC", + }); + }, []), + }, + }, + }, + }, + }); + //////////////////////////////////////// + const Query = (0, grafast_1.newObjectTypeBuilder)(grafast_1.__ValueStep)({ + name: "Query", + fields: { + forums: { + type: new graphql_1.GraphQLList(Forum), + args: { + first: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $forums, arg) { + $forums.setFirst(arg.getRaw()); + }, []), + }, + includeArchived: makeIncludeArchivedArg(($forums) => $forums), + condition: { + type: ForumCondition, + applyPlan: EXPORTABLE((pgWhere) => function plan(_$root, $forums, arg) { + arg.apply($forums, pgWhere); + }, [pgWhere]), + }, + filter: { + type: ForumFilter, + applyPlan: EXPORTABLE((pgClassFilterWhere) => function plan(_$root, $forums, arg) { + arg.apply($forums, pgClassFilterWhere); + }, [pgClassFilterWhere]), + }, + }, + plan: EXPORTABLE((deoptimizeIfAppropriate, forumResource) => function plan(_$root) { + const $forums = forumResource.find(); + deoptimizeIfAppropriate($forums); + return $forums; + }, [deoptimizeIfAppropriate, forumResource]), + }, + forum: { + type: Forum, + plan: EXPORTABLE((deoptimizeIfAppropriate, forumResource) => function plan(_$root, { $id }) { + const $forum = forumResource.get({ + id: $id, + }); + deoptimizeIfAppropriate($forum); + return $forum; + }, [deoptimizeIfAppropriate, forumResource]), + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + }, + }, + }, + message: { + type: Message, + plan: EXPORTABLE((deoptimizeIfAppropriate, messageResource) => function plan(_$root, { $id }) { + const $message = messageResource.get({ + id: $id, + }); + deoptimizeIfAppropriate($message); + return $message; + }, [deoptimizeIfAppropriate, messageResource]), + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + }, + }, + }, + allMessagesConnection: { + type: MessagesConnection, + args: { + condition: { + type: MessageCondition, + applyPlan: EXPORTABLE((pgWhere) => function plan(_$root, $connection, arg) { + const $messages = $connection.getSubplan(); + arg.apply($messages, pgWhere); + }, [pgWhere]), + }, + filter: { + type: MessageFilter, + applyPlan: EXPORTABLE((pgClassFilterWhere) => function plan(_$root, $connection, arg) { + const $messages = $connection.getSubplan(); + arg.apply($messages, pgClassFilterWhere); + }, [pgClassFilterWhere]), + }, + includeArchived: makeIncludeArchivedArg(($connection) => $connection.getSubplan()), + first: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, val) { + $connection.setFirst(val.getRaw()); + }, []), + }, + last: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setLast(arg.getRaw()); + }, []), + }, + after: { + type: graphql_1.GraphQLString, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setAfter(arg.getRaw()); + }, []), + }, + before: { + type: graphql_1.GraphQLString, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setBefore(arg.getRaw()); + }, []), + }, + orderBy: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(MessagesOrderBy)), + }, + }, + plan: EXPORTABLE((connection, deoptimizeIfAppropriate, messageResource) => function plan(_, fieldArgs) { + const $messages = messageResource.find(); + deoptimizeIfAppropriate($messages); + // $messages.leftJoin(...); + // $messages.innerJoin(...); + // $messages.relation('fk_messages_author_id') + // $messages.where(...); + const $connectionPlan = connection($messages); + fieldArgs.apply($messages, "orderBy"); + // DEFINITELY NOT $messages.orderBy BECAUSE we don't want that applied to aggregates. + // DEFINITELY NOT $messages.limit BECAUSE we don't want those limits applied to aggregates or page info. + return $connectionPlan; + }, [grafast_1.connection, deoptimizeIfAppropriate, messageResource]), + }, + uniqueAuthorCount: { + type: graphql_1.GraphQLInt, + args: { + featured: { + type: graphql_1.GraphQLBoolean, + }, + }, + plan: EXPORTABLE((TYPES, deoptimizeIfAppropriate, uniqueAuthorCountResource) => function plan(_$root, { $featured }) { + const $plan = uniqueAuthorCountResource.execute([ + { + step: $featured, + pgCodec: TYPES.boolean, + name: "featured", + }, + ]); + deoptimizeIfAppropriate($plan); + return $plan; + }, [index_js_1.TYPES, deoptimizeIfAppropriate, uniqueAuthorCountResource]), + }, + forumNames: { + type: new graphql_1.GraphQLList(graphql_1.GraphQLString), + plan: EXPORTABLE((pgSelect, scalarTextResource, sql) => function plan(_$root) { + const $plan = pgSelect({ + resource: scalarTextResource, + identifiers: [], + from: sql `app_public.forum_names()`, + name: "forum_names", + }); + return $plan; + }, [index_js_1.pgSelect, scalarTextResource, pg_sql2_1.default]), + }, + forumNamesArray: { + type: new graphql_1.GraphQLList(graphql_1.GraphQLString), + plan: EXPORTABLE((forumNamesArrayResource) => function plan(_$root) { + return forumNamesArrayResource.execute(); + }, [forumNamesArrayResource]), + }, + forumNamesCasesList: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLList(graphql_1.GraphQLString)), + plan: EXPORTABLE((forumNamesCasesResource) => function plan(_$root) { + const $plan = forumNamesCasesResource.execute(); + return $plan; + }, [forumNamesCasesResource]), + }, + // TODO + /* + forumNamesCasesConnection: { + type: new GraphQLList(GraphQLString), + plan: EXPORTABLE( + (forumNamesArrayResource, connection) => + function plan(_$root) { + const $plan = forumNamesArrayResource.execute(); + return connection($plan); + }, + [forumNamesArrayResource, connection], + ), + }, + */ + FORUM_NAMES: { + type: new graphql_1.GraphQLList(graphql_1.GraphQLString), + description: "Like forumNames, only we convert them all to upper case", + plan: EXPORTABLE((each, lambda, pgSelect, scalarTextResource, sql) => function plan(_$root) { + const $names = pgSelect({ + resource: scalarTextResource, + identifiers: [], + from: sql `app_public.forum_names()`, + name: "forum_names", + }); + // return lambda($names, (names: string[]) => names.map(name => name.toUpperCase())), + return each($names, ($name) => lambda($name, (name) => name.toUpperCase(), true)); + }, [grafast_1.each, grafast_1.lambda, index_js_1.pgSelect, scalarTextResource, pg_sql2_1.default]), + }, + randomUser: { + type: User, + plan: EXPORTABLE((deoptimizeIfAppropriate, pgSelect, sql, userResource) => function plan() { + const $users = pgSelect({ + resource: userResource, + identifiers: [], + from: sql `app_public.random_user()`, + name: "random_user", + }); + deoptimizeIfAppropriate($users); + return $users.single(); + }, [deoptimizeIfAppropriate, index_js_1.pgSelect, pg_sql2_1.default, userResource]), + }, + randomUserArray: { + type: new graphql_1.GraphQLList(User), + plan: EXPORTABLE((deoptimizeIfAppropriate, randomUserArrayResource) => function plan() { + const $select = randomUserArrayResource.execute(); + deoptimizeIfAppropriate($select); + return $select; + }, [deoptimizeIfAppropriate, randomUserArrayResource]), + }, + randomUserArraySet: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLList(User)), + plan: EXPORTABLE((deoptimizeIfAppropriate, randomUserArraySetResource) => function plan() { + const $selectPartitioned = randomUserArraySetResource.execute(); + deoptimizeIfAppropriate($selectPartitioned); + return $selectPartitioned; + }, [deoptimizeIfAppropriate, randomUserArraySetResource]), + }, + featuredMessages: { + type: new graphql_1.GraphQLList(Message), + plan: EXPORTABLE((deoptimizeIfAppropriate, featuredMessagesResource, pgSelect) => function plan() { + const $messages = pgSelect({ + resource: featuredMessagesResource, + identifiers: [], + }); + deoptimizeIfAppropriate($messages); + return $messages; + }, [deoptimizeIfAppropriate, featuredMessagesResource, index_js_1.pgSelect]), + }, + people: { + type: new graphql_1.GraphQLList(Person), + plan: EXPORTABLE((deoptimizeIfAppropriate, personResource) => function plan() { + const $people = personResource.find(); + deoptimizeIfAppropriate($people); + return $people; + }, [deoptimizeIfAppropriate, personResource]), + }, + singleTableItemById: { + type: SingleTableItem, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((singleTableItemInterface, singleTableItemsResource) => function plan(_$root, { $id }) { + const $item = singleTableItemsResource.get({ + id: $id, + }); + return singleTableItemInterface($item); + }, [singleTableItemInterface, singleTableItemsResource]), + }, + singleTableTopicById: { + type: SingleTableTopic, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((constant, singleTableItemsResource) => function plan(_$root, { $id }) { + const $item = singleTableItemsResource.get({ + id: $id, + type: constant("TOPIC", false), + }); + return $item; + }, [grafast_1.constant, singleTableItemsResource]), + }, + relationalItemById: { + type: RelationalItem, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((relationalItemInterface, relationalItemsResource) => function plan(_$root, { $id }) { + const $item = relationalItemsResource.get({ + id: $id, + }); + return relationalItemInterface($item); + }, [relationalItemInterface, relationalItemsResource]), + }, + relationalTopicById: { + type: RelationalTopic, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((relationalTopicsResource) => function plan(_$root, { $id }) { + return relationalTopicsResource.get({ + id: $id, + }); + }, [relationalTopicsResource]), + }, + allRelationalCommentablesList: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(RelationalCommentable)), + args: { + first: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $each, val) { + const $commentables = $each.getListStep(); + $commentables.setFirst(val.getRaw()); + }, []), + }, + }, + plan: EXPORTABLE((TYPES, each, relationalCommentableInterface, relationalCommentableResource, sql) => function plan() { + const $commentables = relationalCommentableResource.find(); + $commentables.orderBy({ + codec: TYPES.int, + fragment: sql `${$commentables.alias}.id`, + direction: "ASC", + }); + return each($commentables, ($commentable) => relationalCommentableInterface($commentable)); + }, [ + index_js_1.TYPES, + grafast_1.each, + relationalCommentableInterface, + relationalCommentableResource, + pg_sql2_1.default, + ]), + }, + unionItemById: { + type: UnionItem, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((unionItemUnion, unionItemsResource) => function plan(_$root, { $id }) { + const $item = unionItemsResource.get({ + id: $id, + }); + return unionItemUnion($item); + }, [unionItemUnion, unionItemsResource]), + }, + unionItemByIdViaUnionAll: { + type: UnionItem, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((TYPES, pgUnionAll, sql, unionChecklistItemsResource, unionChecklistsResource, unionDividersResource, unionPostsResource, unionTopicsResource) => function plan(_$root, { $id }) { + const $items = pgUnionAll({ + resourceByTypeName: { + UnionTopic: unionTopicsResource, + UnionPost: unionPostsResource, + UnionDivider: unionDividersResource, + UnionChecklist: unionChecklistsResource, + UnionChecklistItem: unionChecklistItemsResource, + }, + }); + $items.where(sql `${$items}.id = ${$items.placeholder($id, TYPES.int)}`); + return $items.single(); + }, [ + index_js_1.TYPES, + pgUnionAll_js_1.pgUnionAll, + pg_sql2_1.default, + unionChecklistItemsResource, + unionChecklistsResource, + unionDividersResource, + unionPostsResource, + unionTopicsResource, + ]), + }, + unionTopicById: { + type: UnionTopic, + args: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((unionTopicsResource) => function plan(_$root, { $id }) { + return unionTopicsResource.get({ + id: $id, + }); + }, [unionTopicsResource]), + }, + allUnionItemsList: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(UnionItem)), + plan: EXPORTABLE((TYPES, each, sql, unionItemUnion, unionItemsResource) => function plan() { + const $items = unionItemsResource.find(); + $items.orderBy({ + codec: TYPES.int, + fragment: sql `${$items.alias}.id`, + direction: "ASC", + }); + return each($items, ($item) => unionItemUnion($item)); + }, [index_js_1.TYPES, grafast_1.each, pg_sql2_1.default, unionItemUnion, unionItemsResource]), + }, + searchEntities: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(Entity)), + args: { + query: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + }, + }, + plan: EXPORTABLE((TYPES, deoptimizeIfAppropriate, each, entitySearchResource, entityUnion) => function plan(_$root, { $query }) { + const $step = entitySearchResource.execute([ + { + step: $query, + pgCodec: TYPES.text, + name: "query", + }, + ]); + deoptimizeIfAppropriate($step); + return each($step, ($item) => entityUnion($item)); + }, [ + index_js_1.TYPES, + deoptimizeIfAppropriate, + grafast_1.each, + entitySearchResource, + entityUnion, + ]), + }, + personByPersonId: { + type: Person, + args: { + personId: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + plan: EXPORTABLE((personResource) => function plan(_$root, { $personId }) { + return personResource.get({ + person_id: $personId, + }); + }, [personResource]), + }, + nonNullableNull: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + description: "Claims to be non-nullable, but always returns null. Used to test root-level null handling.", + plan: EXPORTABLE((constant) => function plan() { + return constant(null); + }, [grafast_1.constant]), + }, + nonNullableError: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + description: "Non-nullable, always throws. Used to test root-level null handling.", + plan: EXPORTABLE((error) => function plan() { + return error(new Error("Generic error from nonNullableError field in example schema")); + }, [grafast_1.error]), + }, + deepObject: { + type: new graphql_1.GraphQLObjectType({ + name: "DeepObject", + fields: { + number: { + type: graphql_1.GraphQLInt, + }, + numbers: { + type: new graphql_1.GraphQLList(graphql_1.GraphQLInt), + }, + friend: { + type: new graphql_1.GraphQLObjectType({ + name: "DeepObjectFriend", + fields: { + name: { type: graphql_1.GraphQLString }, + occupation: { type: graphql_1.GraphQLString }, + status: { type: graphql_1.GraphQLString }, + }, + }), + }, + }, + }), + resolve: EXPORTABLE(() => function resolve() { + return { + number: 42, + numbers: [1, 1, 2, 3, 5, 8, 13], + friend: { + name: "Marvin", + occupation: "Android", + status: "paranoid", + }, + }; + }, []), + }, + vulnerabilities: { + type: new graphql_1.GraphQLList(Vulnerability), + args: { + first: { + type: graphql_1.GraphQLInt, + }, + offset: { + type: graphql_1.GraphQLInt, + }, + }, + plan: EXPORTABLE((TYPES, constant, firstPartyVulnerabilitiesResource, pgUnionAll, sql, thirdPartyVulnerabilitiesResource) => function plan(_, { $first, $offset }) { + // IMPORTANT: for cursor pagination, type must be part of cursor condition + const $vulnerabilities = pgUnionAll({ + name: "vulnerabilities", + attributes: { + cvss_score: { + codec: TYPES.float, + notNull: false, + }, + }, + resourceByTypeName: { + FirstPartyVulnerability: firstPartyVulnerabilitiesResource, + ThirdPartyVulnerability: thirdPartyVulnerabilitiesResource, + }, + }); + $vulnerabilities.orderBy({ + attribute: "cvss_score", + direction: "DESC", + }); + $vulnerabilities.where({ + type: "attribute", + attribute: "cvss_score", + callback: (alias) => sql `${alias} > ${$vulnerabilities.placeholder(constant(6, false), TYPES.float)}`, + }); + $vulnerabilities.setFirst($first); + $vulnerabilities.setOffset($offset); + return $vulnerabilities; + }, [ + index_js_1.TYPES, + grafast_1.constant, + firstPartyVulnerabilitiesResource, + pgUnionAll_js_1.pgUnionAll, + pg_sql2_1.default, + thirdPartyVulnerabilitiesResource, + ]), + }, + vulnerabilitiesConnection: { + type: VulnerabilitiesConnection, + args: { + condition: { + type: VulnerabilityCondition, + applyPlan: EXPORTABLE((pgWhere) => function plan(_$root, $connection, arg) { + const $collection = $connection.getSubplan(); + arg.apply($collection, pgWhere); + }, [pgWhere]), + }, + first: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, val) { + $connection.setFirst(val.getRaw()); + }, []), + }, + last: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setLast(arg.getRaw()); + }, []), + }, + offset: { + type: graphql_1.GraphQLInt, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setOffset(arg.getRaw()); + }, []), + }, + after: { + type: graphql_1.GraphQLString, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setAfter(arg.getRaw()); + }, []), + }, + before: { + type: graphql_1.GraphQLString, + applyPlan: EXPORTABLE(() => function plan(_$root, $connection, arg) { + $connection.setBefore(arg.getRaw()); + }, []), + }, + orderBy: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(VulnerabilitiesOrderBy)), + }, + }, + plan: EXPORTABLE((TYPES, connection, firstPartyVulnerabilitiesResource, pgUnionAll, thirdPartyVulnerabilitiesResource) => function plan(_, fieldArgs) { + // IMPORTANT: for cursor pagination, type must be part of cursor condition + const $vulnerabilities = pgUnionAll({ + name: "vulnerabilities", + attributes: { + cvss_score: { + codec: TYPES.float, + notNull: false, + }, + }, + resourceByTypeName: { + FirstPartyVulnerability: firstPartyVulnerabilitiesResource, + ThirdPartyVulnerability: thirdPartyVulnerabilitiesResource, + }, + }); + fieldArgs.apply($vulnerabilities, "orderBy"); + return connection($vulnerabilities); + }, [ + index_js_1.TYPES, + grafast_1.connection, + firstPartyVulnerabilitiesResource, + pgUnionAll_js_1.pgUnionAll, + thirdPartyVulnerabilitiesResource, + ]), + }, + }, + }); + const CreateRelationalPostInput = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "CreateRelationalPostInput", + fields: { + title: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + }, + description: { + type: graphql_1.GraphQLString, + }, + note: { + type: graphql_1.GraphQLString, + }, + }, + }); + const RelationalPostPatch = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "RelationalPostPatch", + fields: { + // All nullable, since it's a patch. + title: { + type: graphql_1.GraphQLString, + }, + description: { + type: graphql_1.GraphQLString, + }, + note: { + type: graphql_1.GraphQLString, + }, + }, + }); + const UpdateRelationalPostByIdInput = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "UpdateRelationalPostByIdInput", + fields: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + patch: { + type: new graphql_1.GraphQLNonNull(RelationalPostPatch), + }, + }, + }); + const DeleteRelationalPostByIdInput = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "DeleteRelationalPostByIdInput", + fields: { + id: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt), + }, + }, + }); + const CreateRelationalPostPayload = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgClassExpressionStep)({ + name: "CreateRelationalPostPayload", + fields: { + post: { + type: RelationalPost, + plan: EXPORTABLE((relationalPostsResource) => function plan($post) { + return relationalPostsResource.get({ id: $post.get("id") }); + }, [relationalPostsResource]), + }, + id: { + type: graphql_1.GraphQLInt, + plan: EXPORTABLE(() => function plan($post) { + return $post.get("id"); + }, []), + }, + query: { + type: Query, + plan: EXPORTABLE((rootValue) => function plan() { + return rootValue(); + }, [grafast_1.rootValue]), + }, + }, + }); + const UpdateRelationalPostByIdPayload = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgUpdateSingleStep)({ + name: "UpdateRelationalPostByIdPayload", + fields: { + post: { + type: RelationalPost, + plan: EXPORTABLE((relationalPostsResource) => function plan($post) { + return relationalPostsResource.get({ id: $post.get("id") }); + }, [relationalPostsResource]), + }, + id: { + type: graphql_1.GraphQLInt, + plan: EXPORTABLE(() => function plan($post) { + return $post.get("id"); + }, []), + }, + query: { + type: Query, + plan: EXPORTABLE((rootValue) => function plan() { + return rootValue(); + }, [grafast_1.rootValue]), + }, + }, + }); + const DeleteRelationalPostByIdPayload = (0, grafast_1.newObjectTypeBuilder)(index_js_1.PgDeleteSingleStep)({ + name: "DeleteRelationalPostByIdPayload", + fields: { + // Since we've deleted the post we cannot go and fetch it; so we must + // return the record from the mutation RETURNING clause + post: { + type: RelationalPost, + plan: EXPORTABLE((pgSelectSingleFromRecord, relationalPostsResource) => function plan($post) { + return pgSelectSingleFromRecord(relationalPostsResource, $post.record()); + }, [index_js_1.pgSelectSingleFromRecord, relationalPostsResource]), + }, + id: { + type: graphql_1.GraphQLInt, + plan: EXPORTABLE(() => function plan($post) { + return $post.get("id"); + }, []), + }, + query: { + type: Query, + plan: EXPORTABLE((rootValue) => function plan() { + return rootValue(); + }, [grafast_1.rootValue]), + }, + }, + }); + const MultipleActionsInput = (0, grafast_1.newInputObjectTypeBuilder)()({ + name: "MultipleActionsInput", + fields: { + a: { + type: graphql_1.GraphQLInt, + }, + }, + }); + const MultipleActionsPayload = (0, grafast_1.newObjectTypeBuilder)(withPgClient_js_1.WithPgClientStep)({ + name: "MultipleActionsPayload", + fields: { + i: { + type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLInt)), + plan: EXPORTABLE(() => function plan($parent) { + return $parent; + }, []), + }, + }, + }); + const Mutation = (0, grafast_1.newObjectTypeBuilder)(grafast_1.__ValueStep)({ + name: "Mutation", + fields: { + createRelationalPost: { + args: { + input: { + type: new graphql_1.GraphQLNonNull(CreateRelationalPostInput), + }, + }, + type: CreateRelationalPostPayload, + plan: EXPORTABLE((bakedInput, constant, getNullableInputTypeAtPath, pgInsertSingle, relationalItemsResource, relationalPostsResource) => function plan(_$root, fieldArgs) { + const $item = pgInsertSingle(relationalItemsResource, { + type: constant `POST`, + author_id: constant(2, false), + }); + const $itemId = $item.get("id"); + const $post = pgInsertSingle(relationalPostsResource, { + id: $itemId, + }); + const inputArgType = fieldArgs.typeAt("input"); + for (const key of ["title", "description", "note"]) { + const $rawValue = fieldArgs.getRaw(["input", key]); + const $value = bakedInput(getNullableInputTypeAtPath(inputArgType, [key]), $rawValue); + // TODO: pgInsertSingle needs to attributes with undefined values at runtime + $post.set(key, $value); + } + // NOTE: returning a record() here is unnecessary and requires + // `select *` privileges. In a normal schema we'd just return the + // mutation plan directly. Even if we're sharing types it would + // generally be better to return the identifier and then look up the + // record using the identifier. Nonetheless, this is useful for tests. + // Since our field type, `CreateRelationalPostPayload`, is shared between + // `createRelationalPost`, `createThreeRelationalPosts` and + // `createThreeRelationalPostsComputed` must return a common plan + // type that `CreateRelationalPostPayload` can use; in this case a + // `PgClassExpressionStep` + return $post.record(); + }, [ + grafast_1.bakedInput, + grafast_1.constant, + grafast_1.getNullableInputTypeAtPath, + index_js_1.pgInsertSingle, + relationalItemsResource, + relationalPostsResource, + ]), + }, + createThreeRelationalPosts: { + description: "This silly mutation is specifically to ensure that mutation plans are not tree-shaken - we never want to throw away mutation side effects.", + type: CreateRelationalPostPayload, + plan: EXPORTABLE((constant, pgInsertSingle, relationalItemsResource, relationalPostsResource) => function plan() { + // Only the _last_ post plan is returned; there's no dependency on + // the first two posts, and yet they should not be tree-shaken + // because they're mutations. + let $post; + for (let i = 0; i < 3; i++) { + const $item = pgInsertSingle(relationalItemsResource, { + type: constant `POST`, + author_id: constant(2, false), + }); + const $itemId = $item.get("id"); + $post = pgInsertSingle(relationalPostsResource, { + id: $itemId, + title: constant(`Post #${i + 1}`, false), + description: constant(`Desc ${i + 1}`, false), + note: constant(null), + }); + } + // See NOTE in createRelationalPost plan. + return $post.record(); + }, [ + grafast_1.constant, + index_js_1.pgInsertSingle, + relationalItemsResource, + relationalPostsResource, + ]), + }, + createThreeRelationalPostsComputed: { + description: "This silly mutation is specifically to ensure that mutation plans are not tree-shaken even if they use plans that are normally side-effect free - we never want to throw away mutation side effects.", + type: CreateRelationalPostPayload, + plan: EXPORTABLE((TYPES, constant, pgSelect, relationalPostsResource, sql) => function plan() { + // Only the _last_ post plan is returned; there's no dependency on + // the first two posts, and yet they should not be tree-shaken + // because they're mutations. + let $post; + for (let i = 0; i < 3; i++) { + $post = pgSelect({ + resource: relationalPostsResource, + identifiers: [], + from: (authorId, title) => sql `interfaces_and_unions.insert_post(${authorId.placeholder}, ${title.placeholder})`, + args: [ + { + step: constant(2, false), + pgCodec: TYPES.int, + }, + { + step: constant(`Computed post #${i + 1}`, false), + pgCodec: TYPES.text, + }, + ], + mode: "mutation", + }); + } + // See NOTE in createRelationalPost plan. + return $post.single().record(); + }, [index_js_1.TYPES, grafast_1.constant, index_js_1.pgSelect, relationalPostsResource, pg_sql2_1.default]), + }, + updateRelationalPostById: { + args: { + input: { + type: new graphql_1.GraphQLNonNull(UpdateRelationalPostByIdInput), + }, + }, + type: UpdateRelationalPostByIdPayload, + plan: EXPORTABLE((bakedInput, getNullableInputTypeAtPath, pgUpdateSingle, relationalPostsResource) => function plan(_$root, fieldArgs) { + const $post = pgUpdateSingle(relationalPostsResource, { + id: fieldArgs.$input.$id, + }); + const inputArgType = fieldArgs.typeAt("input"); + for (const key of ["title", "description", "note"]) { + const $rawValue = fieldArgs.getRaw(["input", "patch", key]); + const $value = bakedInput(getNullableInputTypeAtPath(inputArgType, ["patch", key]), $rawValue); + // TODO: pgUpdateSingle needs to ignore values set to undefined + $post.set(key, $value); + } + return $post; + }, [ + grafast_1.bakedInput, + grafast_1.getNullableInputTypeAtPath, + index_js_1.pgUpdateSingle, + relationalPostsResource, + ]), + }, + deleteRelationalPostById: { + args: { + input: { + type: new graphql_1.GraphQLNonNull(DeleteRelationalPostByIdInput), + }, + }, + type: DeleteRelationalPostByIdPayload, + plan: EXPORTABLE((pgDeleteSingle, relationalPostsResource) => function plan(_$root, { $input: { $id } }) { + const $post = pgDeleteSingle(relationalPostsResource, { + id: $id, + }); + return $post; + }, [index_js_1.pgDeleteSingle, relationalPostsResource]), + }, + multipleActions: { + args: { + input: { + type: new graphql_1.GraphQLNonNull(MultipleActionsInput), + }, + }, + type: MultipleActionsPayload, + plan: EXPORTABLE((executor, object, sleep, sql, withPgClientTransaction) => function plan(_$root, { $input: { $a } }) { + const $transactionResult = withPgClientTransaction(executor, object({ + a: $a, + }), async (client, { a }) => { + // Set a transaction variable to reference later + await client.query(sql.compile(sql `select set_config('my_app.a', ${sql.value(a ?? 1)}, true);`)); + // Run some SQL + const { rows } = await client.query(sql.compile(sql `select * from generate_series(1, ${sql.value(a ?? 1)}) as i;`)); + // Do some asynchronous work (e.g. talk to Stripe or whatever) + await sleep(2); + // Use the transaction variable to ensure we're still in the transaction + const { rows: rows2 } = await client.query(sql.compile(sql `select i + current_setting('my_app.a', true)::int as i from generate_series(${sql.value(rows[rows.length - 1].i)}, 10) as i;`)); + // Return the data + return rows2.map((row) => row.i); + }); + // This line is critical to test setting hasSideEffects on a withPgClient call + $transactionResult.hasSideEffects = true; + return $transactionResult; + }, [executor, grafast_1.object, sleep, pg_sql2_1.default, withPgClient_js_1.withPgClientTransaction]), + }, + }, + }); + const ForumMessageSubscriptionPayload = (0, grafast_1.newObjectTypeBuilder)(json_1.JSONParseStep)({ + name: "ForumMessageSubscriptionPayload", + fields: { + operationType: { + type: graphql_1.GraphQLString, + plan: EXPORTABLE((lambda) => function plan($event) { + return lambda($event.get("op"), (txt) => String(txt).toLowerCase(), true); + }, [grafast_1.lambda]), + }, + message: { + type: Message, + plan: EXPORTABLE((messageResource) => function plan($event) { + return messageResource.get({ id: $event.get("id") }); + }, [messageResource]), + }, + }, + }); + const Subscription = (0, grafast_1.newObjectTypeBuilder)(grafast_1.__ValueStep)({ + name: "Subscription", + fields: { + forumMessage: { + args: { + forumId: { + type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString), + }, + }, + type: ForumMessageSubscriptionPayload, + subscribePlan: EXPORTABLE((context, jsonParse, lambda, listen) => function subscribePlan(_$root, args) { + const $forumId = args.getRaw("forumId"); + const $topic = lambda($forumId, (id) => `forum:${id}:message`, true); + const $pgSubscriber = context().get("pgSubscriber"); + return listen($pgSubscriber, $topic, jsonParse); + }, [grafast_1.context, json_1.jsonParse, grafast_1.lambda, grafast_1.listen]), + plan: EXPORTABLE(() => function plan($event) { + return $event; + }, []), + }, + }, + }); + return new graphql_1.GraphQLSchema({ + query: Query, + mutation: Mutation, + subscription: Subscription, + types: [ + // Don't forget to add all types that implement interfaces here + // otherwise they _might_ not show up in the schema. + SingleTableTopic, + SingleTablePost, + SingleTableDivider, + SingleTableChecklist, + SingleTableChecklistItem, + RelationalTopic, + RelationalPost, + RelationalDivider, + RelationalChecklist, + RelationalChecklistItem, + FirstPartyVulnerability, + ThirdPartyVulnerability, + ], + extensions: { + graphileExporter: { + deps: [ + relationalDividersResource, + relationalChecklistsResource, + relationalChecklistItemsResource, + ], + }, + }, + enableDeferStream: true, + }); +} +async function main() { + const filePath = `${__dirname}/../../__tests__/schema.graphql`; + const schema = makeExampleSchema(); + (0, fs_1.writeFileSync)(filePath, + //prettier.format( + (0, graphql_1.printSchema)(schema)); +} +if (require.main === module) { + main().catch((e) => { + console.error(e); + process.exit(1); + }); +} +const pgClassFilterWhere = EXPORTABLE((PgClassFilter) => function pgClassFilterWhere(qb) { + return new PgClassFilter(qb.whereBuilder(), qb.alias); +}, [index_js_1.PgClassFilter]); +function pgWhere(qb) { + return qb.whereBuilder(); +} +const includeArchivedCondition = EXPORTABLE((sql) => function includeArchivedCondition([sqlParentArchivedAt, value]) { + return (queryBuilder) => { + if (value === "YES") { + // No restriction + } + else if (value === "EXCLUSIVELY") { + queryBuilder.where(sql `${queryBuilder}.archived_at is not null`); + } + else if (value === "INHERIT" && + // INHERIT only works if the parent has an archived_at attribute. + sqlParentArchivedAt !== undefined) { + queryBuilder.where(sql `(${queryBuilder.alias}.archived_at is null) = (${sqlParentArchivedAt} is null)`); + } + else { + queryBuilder.where(sql `${queryBuilder}.archived_at is null`); + } + }; +}, [pg_sql2_1.default]); +//# sourceMappingURL=exampleSchema.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/examples/exampleSchema.js.map b/grafast/dataplan-pg/dist/examples/exampleSchema.js.map new file mode 100644 index 0000000000..0ec90ef6b2 --- /dev/null +++ b/grafast/dataplan-pg/dist/examples/exampleSchema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exampleSchema.js","sourceRoot":"","sources":["../../src/examples/exampleSchema.ts"],"names":[],"mappings":";AAAA,iGAAiG;;AAqIjG,gCAiBC;AAeD,8CAm4JC;;AAtiKD;;;;;;;;GAQG;AAEH,yCAA0D;AAC1D,uDAAiC;AACjC,2BAAmC;AAenC,qCAsBiB;AAEjB,6CAayB;AAEzB,8DAA0B;AAc1B,4CAA8D;AAC9D,oDAI0B;AAC1B,0CAqBqB;AAMrB,0DAAwD;AAMxD,sDAAyD;AAKzD,0DAA0E;AAC1E,8DAGkC;AAClC,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAEhF,SAAgB,UAAU,CACxB,OAA+B,EAC/B,IAAiB,EACjB,QAAiB;IAEjB,MAAM,EAAE,GAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/B,IACE,CAAC,OAAO,EAAE,KAAK,UAAU,IAAI,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,mBAAmB,IAAI,EAAE,CAAC,EAC5B,CAAC;QACD,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;YAC1B,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YAC/B,iBAAiB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;YACrC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;SACpD,CAAC,CAAC;IACL,CAAC;I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AAY,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC,EACH,CAAC,wBAAa,CAAC,CAChB,CAAC;AACF,SAAS,OAAO,CAAC,EAAiD;IAChE,OAAO,EAAE,CAAC,YAAY,EAAE,CAAC;AAC3B,CAAC;AACD,MAAM,wBAAwB,GAAG,UAAU,CACzC,CAAC,GAAG,EAAE,EAAE,CACN,SAAS,wBAAwB,CAAC,CAAC,mBAAmB,EAAE,KAAK,CAG5D;IACC,OAAO,CAAC,YAAY,EAAE,EAAE;QACtB,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YACpB,iBAAiB;QACnB,CAAC;aAAM,IAAI,KAAK,KAAK,aAAa,EAAE,CAAC;YACnC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAA,GAAG,YAAY,0BAA0B,CAAC,CAAC;QACnE,CAAC;aAAM,IACL,KAAK,KAAK,SAAS;YACnB,iEAAiE;YACjE,mBAAmB,KAAK,SAAS,EACjC,CAAC;YACD,YAAY,CAAC,KAAK,CAChB,GAAG,CAAA,IAAI,YAAY,CAAC,KAAK,4BAA4B,mBAAmB,WAAW,CACpF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,KAAK,CAAC,GAAG,CAAA,GAAG,YAAY,sBAAsB,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,EACH,CAAC,iBAAG,CAAC,CACN,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/executor.d.ts b/grafast/dataplan-pg/dist/executor.d.ts new file mode 100644 index 0000000000..b58eeb27c2 --- /dev/null +++ b/grafast/dataplan-pg/dist/executor.d.ts @@ -0,0 +1,105 @@ +import type { ExecutableStep, ExecutionEventEmitter, GrafastValuesList, ObjectStep, PromiseOrDirect } from "grafast"; +import type { SQLRawValue } from "pg-sql2"; +export interface PgClientQuery { + /** The query string */ + text: string; + /** The values to put in the placeholders */ + values?: Array; + /** An optimisation, to avoid you having to decode attribute names */ + arrayMode?: boolean; + /** For prepared statements */ + name?: string; +} +export interface PgClientResult { + /** + * For `SELECT` or `INSERT/UPDATE/DELETE ... RETURNING` this will be the list + * of rows returned. + */ + rows: readonly TData[]; + /** + * For `INSERT/UPDATE/DELETE` without `RETURNING`, this will be the number of + * rows created/updated/deleted. + */ + rowCount: number | null; +} +/** + * This is a generic interface that your Postgres client must honor; have a + * look at adaptors/pg.ts for an example of a compliant implementation that + * uses the `pg` module, but you should be able to write an adaptor for many + * different Postgres drivers. + */ +export interface PgClient { + query(opts: PgClientQuery): Promise>; + withTransaction(callback: (client: this) => Promise): Promise; +} +export interface WithPgClient { + (pgSettings: Record | null, callback: (client: TPgClient) => T | Promise): Promise; + release?(): PromiseOrDirect; +} +export type PgExecutorContext = { + pgSettings: TSettings; + withPgClient: WithPgClient; +}; +export type PgExecutorContextPlans = { + pgSettings: ExecutableStep; + withPgClient: ExecutableStep>; +}; +export type PgExecutorInput = { + context: PgExecutorContext; + queryValues: ReadonlyArray; +}; +export type PgExecutorOptions = { + text: string; + rawSqlValues: Array; + identifierIndex?: number | null; + name?: string; + eventEmitter: ExecutionEventEmitter | undefined; + useTransaction?: boolean; +}; +export type PgExecutorMutationOptions = { + context: PgExecutorContext; + text: string; + values: ReadonlyArray; +}; +export type PgExecutorSubscribeOptions = { + context: PgExecutorContext; + topic: string; +}; +/** + * Represents a PostgreSQL database connection, can be used for issuing queries + * to the database. Used by PgResource but also directly by things like + * PgSimpleFunctionCallStep. Was once PgDataSource itself. Multiple PgExecutors + * can exist in the same schema. PgExecutor is also responsible for things like + * caching. + */ +export declare class PgExecutor { + name: TName; + private contextCallback; + private $$cache; + constructor(options: { + name: TName; + context: () => ObjectStep>; + }); + toString(): string; + context(): ObjectStep>; + private _executeWithClient; + private _execute; + private withTransaction; + executeWithCache(values: GrafastValuesList>, common: PgExecutorOptions): Promise<{ + values: GrafastValuesList>; + }>; + executeWithoutCache(values: GrafastValuesList>, common: PgExecutorOptions): Promise<{ + values: GrafastValuesList>; + }>; + private _executeWithOrWithoutCache; + /** + * Returns a list of streams (async iterables), one for each entry in + * `values`, for the results from the cursor defined by running the query + * `common.text` with the given variables. + */ + executeStream(values: GrafastValuesList>, common: PgExecutorOptions): Promise<{ + streams: Array | PromiseLike>; + }>; + executeMutation(options: PgExecutorMutationOptions): Promise>; +} +//# sourceMappingURL=executor.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/executor.d.ts.map b/grafast/dataplan-pg/dist/executor.d.ts.map new file mode 100644 index 0000000000..13e8a6f791 --- /dev/null +++ b/grafast/dataplan-pg/dist/executor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA+B3C,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc,CAAC,KAAK;IACnC;;;OAGG;IACH,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAI,K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ACnD,CAAC;YAQY,0BAA0B;IAkNxC;;;;OAIG;IACU,aAAa,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,EACpD,MAAM,EAAE,iBAAiB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,EAClD,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC;QACT,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;KAC7D,CAAC;IA0SW,eAAe,CAAC,KAAK,EAChC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CAelC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/executor.js b/grafast/dataplan-pg/dist/executor.js new file mode 100644 index 0000000000..99fe8a5d7d --- /dev/null +++ b/grafast/dataplan-pg/dist/executor.js @@ -0,0 +1,586 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgExecutor = void 0; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const debug_1 = tslib_1.__importDefault(require("debug")); +const grafast_1 = require("grafast"); +const formatSQLForDebugging_js_1 = require("./formatSQLForDebugging.js"); +const inspect_js_1 = require("./inspect.js"); +const LOOK_DOWN = "👇".repeat(30); +const LOOK_UP = "👆".repeat(30); +const $$FINISHED = Symbol("finished"); +class Wrapped { + constructor(originalValue) { + this.originalValue = originalValue; + } +} +let cursorCount = 0; +const debug = (0, debug_1.default)("@dataplan/pg:PgExecutor"); +const debugVerbose = debug.extend("verbose"); +const debugExplain = debug.extend("explain"); +/** + * Represents a PostgreSQL database connection, can be used for issuing queries + * to the database. Used by PgResource but also directly by things like + * PgSimpleFunctionCallStep. Was once PgDataSource itself. Multiple PgExecutors + * can exist in the same schema. PgExecutor is also responsible for things like + * caching. + */ +class PgExecutor { + constructor(options) { + const { name, context } = options; + this.name = name; + this.$$cache = Symbol(this.name + "_cache"); + this.contextCallback = context; + } + toString() { + return chalk_1.default.bold.blue(`PgExecutor(${this.name})`); + } + // public context(): ExecutableStep + context() { + return this.contextCallback(); + } + async _executeWithClient(client, text, values, name, publish) { + let queryResult = null, error = null; + const start = process.hrtime.bigint(); + try { + queryResult = await client.query({ + text, + values: values, + arrayMode: true, + name, + }); + } + catch (e) { + error = e; + } + const end = process.hrtime.bigint(); + // TODO: this should be based on the headers of the incoming request + const shouldExplain = debugExplain.enabled; + const explainAnalyzeSafe = shouldExplain && /^\s*select/i.test(text); + let explain = undefined; + if (shouldExplain && !error) { + const explainResult = await client.query({ + text: `EXPLAIN (${explainAnalyzeSafe ? "ANALYZE, " : ""}COSTS, VERBOSE, BUFFERS, SETTINGS) ${text}`, + values: values, + arrayMode: true, + }); + const firstResult = explainResult.rows[0]; + const key = firstResult ? Object.keys(firstResult)[0] : "0"; + explain = + explainResult.rows.length === 1 && + typeof firstResult[key] === "object" && + firstResult[key] !== null + ? // Support for 'FORMAT JSON' + JSON.stringify(firstResult[key], null, 2) + : explainResult.rows.map((r) => r[key]).join("\n"); + } + if (debugVerbose.enabled || debugExplain.enabled) { + const duration = (Number((end - start) / 10000n) / 100).toFixed(2) + "ms"; + const rows = queryResult?.rows; + const rowResults = rows && rows.length > 10 + ? "[\n " + + rows + .slice(0, 3) + .map((row) => (0, inspect_js_1.inspect)(row, { colors: true, depth: 5 }).replace(/\n/g, "\n ")) + .join(",\n ") + + ",\n\n ...\n\n " + + rows + .slice(rows.length - 3) + .map((row) => (0, inspect_js_1.inspect)(row, { colors: true, depth: 5 }).replace(/\n/g, "\n ")) + .join("\n ") + + "\n]" + : (0, inspect_js_1.inspect)(queryResult?.rows, { colors: true, depth: 6 }); + (debugExplain.enabled ? debugExplain : debugVerbose)(`\ + + +%s +# SQL QUERY: +%s + +# PLACEHOLDERS: +%o + +${error + ? `\ +# ERROR: +%o` + : `\ +# RESULT: +%s`} + +# DURATION +${duration} +%s + + +# EXPLAIN +%s + + +`, LOOK_DOWN, (0, formatSQLForDebugging_js_1.formatSQLForDebugging)(text, error), values, error ? error : rowResults, LOOK_UP, explain ?? + (shouldExplain + ? `(Explain disabled ${error ? "due to error" : "due to unknown reason"})` + : `(Use 'DEBUG="@dataplan/pg:PgExecutor:explain"' to enable explain)`)); + } + if (publish !== undefined) { + publish(text, name, explain); + } + if (error) { + throw error; + } + if (!queryResult) { + // Appease TypeScript + throw new Error("No query result and no error? Impossible."); + } + return queryResult; + } + async _execute(context, text, values, name, publish) { + // PERF: we could probably make this more efficient by grouping the + // deferreds further, DataLoader-style, and running one SQL query for + // everything. + return await context.withPgClient(context.pgSettings, (client) => this._executeWithClient(client, text, values, name, publish)); + } + withTransaction(context, callback) { + return context.withPgClient(context.pgSettings, (baseClient) => baseClient.withTransaction((transactionClient) => { + const execute = (text, values) => this._executeWithClient(transactionClient, text, values); + return callback(execute); + })); + } + async executeWithCache(values, common) { + return this._executeWithOrWithoutCache(values, common, true); + } + async executeWithoutCache(values, common) { + return this._executeWithOrWithoutCache(values, common, false); + } + async _executeWithOrWithoutCache(values, common, useCache) { + const { rawSqlValues, identifierIndex, eventEmitter } = common; + const publishExecute = eventEmitter + ? (text, name, explain) => { + eventEmitter.emit("explainOperation", { + operation: { + type: "sql", + title: `SQL query${name ? ` '${name.slice(0, 7)}...'` : ""}`, + query: text, + explain, + }, + }); + } + : undefined; + const valuesCount = values.length; + const results = []; + const batches = (() => { + if (common.useTransaction) { + // If we're using a transaction, use a separate batch for each query. + return values.map(({ context, queryValues }, resultIndex) => [context, [{ queryValues, resultIndex }]]); + } + else { + // Group by context + const groupMap = new Map(); + for (let resultIndex = 0, l = valuesCount; resultIndex < l; resultIndex++) { + results[resultIndex] = undefined; + const { context, queryValues } = values[resultIndex]; + let entry = groupMap.get(context); + if (!entry) { + entry = []; + groupMap.set(context, entry); + } + entry.push({ queryValues, resultIndex }); + } + return groupMap.entries(); + } + })(); + // For each context, run the relevant fetches + const promises = []; + for (const [context, batch] of batches) { + promises.push((async () => { + let cacheForContext = useCache + ? context[this.$$cache] + : null; + if (!cacheForContext) { + cacheForContext = new lru_1.default({ maxLength: 500 /* SQL queries */ }); + if (useCache) { + context[this.$$cache] = cacheForContext; + } + } + const textAndValues = `${common.text}\n${JSON.stringify(rawSqlValues)}`; + let cacheForQuery = cacheForContext.get(textAndValues); + if (!cacheForQuery) { + cacheForQuery = new Map(); + cacheForContext.set(textAndValues, cacheForQuery); + } + const scopedCache = cacheForQuery; + /** + * The `identifiersJSON` (`JSON.stringify(queryValues)`) that don't exist in the cache currently. + */ + const remaining = []; + const remainingDeferreds = []; + try { + // Concurrent requests to the same queryValues should result in the same value/execution. + const batchSize = batch.length; + for (let batchIndex = 0; batchIndex < batchSize; batchIndex++) { + const { queryValues, resultIndex } = batch[batchIndex]; + const identifiersJSON = JSON.stringify(queryValues); // PERF: Canonical? Manual for perf? + const existingResult = scopedCache.get(identifiersJSON); + if (existingResult) { + if (debugVerbose.enabled) { + debugVerbose("%s served %o from cache: %c", this, identifiersJSON, existingResult); + } + results[resultIndex] = existingResult; + } + else { + if (debugVerbose.enabled) { + debugVerbose("%s no entry for %o in cache %c", this, identifiersJSON, scopedCache); + } + if (grafast_1.isDev && remaining.includes(identifiersJSON)) { + throw new Error("Should only fetch each identifiersJSON once, future entries in the loop should receive previous deferred"); + } + const pendingResult = (0, grafast_1.defer)(); // CRITICAL: this MUST resolve later + results[resultIndex] = pendingResult; + scopedCache.set(identifiersJSON, pendingResult); + remaining.push(identifiersJSON) - 1; + remainingDeferreds.push(pendingResult); + } + } + if (remaining.length) { + const { text, name } = common; + const sqlValues = identifierIndex == null + ? rawSqlValues + : [ + ...rawSqlValues, + // Manual JSON-ing + "[" + remaining.join(",") + "]", + ]; + // PERF: we could probably make this more efficient by grouping the + // deferreds further, DataLoader-style, and running one SQL query for + // everything. + const queryResult = common.useTransaction + ? await this.executeMutation({ + context, + text, + values: sqlValues, + }) + : await this._execute(context, text, sqlValues, name, publishExecute); + const { rows } = queryResult; + const groups = Object.create(null); + for (let i = 0, l = rows.length; i < l; i++) { + const result = rows[i]; + const valueIndex = identifierIndex != null + ? result[identifierIndex] + : 0; + if (!groups[valueIndex]) { + groups[valueIndex] = [result]; + } + else { + groups[valueIndex].push(result); + } + } + for (let i = 0, l = remainingDeferreds.length; i < l; i++) { + const remainingDeferred = remainingDeferreds[i]; + const value = groups[i] ?? []; + remainingDeferred.resolve(value); + } + } + } + catch (e) { + // This block guarantees that all remainingDeferreds will be + // rejected - we don't want defers hanging around! + remainingDeferreds.forEach((d) => { + try { + d.reject(e); + } + catch (e2) { + // Ignore error when rejecting + console.error(`Encountered second error when rejecting deferred due to a different error; ignoring error: ${e2}`); + } + }); + return Promise.reject(e); + } + })()); + } + // Avoids UnhandledPromiseRejection error. + await Promise.allSettled(promises); + const finalResults = await Promise.all(results); + return { values: finalResults }; + } + /** + * Returns a list of streams (async iterables), one for each entry in + * `values`, for the results from the cursor defined by running the query + * `common.text` with the given variables. + */ + async executeStream(values, common) { + const { text, rawSqlValues, identifierIndex } = common; + const valuesCount = values.length; + const streams = []; + // Group by context + const groupMap = new Map(); + for (let resultIndex = 0, l = valuesCount; resultIndex < l; resultIndex++) { + streams[resultIndex] = null; + const { context, queryValues } = values[resultIndex]; + let entry = groupMap.get(context); + if (!entry) { + entry = []; + groupMap.set(context, entry); + } + entry.push({ queryValues, resultIndex }); + } + // For each context, run the relevant fetches + const promises = []; + for (const [context, batch] of groupMap.entries()) { + // ENHANCE: this is a mess, we should refactor and simplify it significantly + const tx = (0, grafast_1.defer)(); + let txResolved = false; + let cursorOpen = false; + const promise = (async () => { + const batchIndexesByIdentifiersJSON = new Map(); + // Concurrent requests to the same queryValues should result in the same value/execution. + const batchSize = batch.length; + for (let batchIndex = 0; batchIndex < batchSize; batchIndex++) { + const { queryValues } = batch[batchIndex]; + const identifiersJSON = JSON.stringify(queryValues); // Perf: Canonical? Manual for perf? + const existing = batchIndexesByIdentifiersJSON.get(identifiersJSON); + if (existing !== undefined) { + existing.push(batchIndex); + if (debugVerbose.enabled) { + debugVerbose("%s served %o again (%o)", this, identifiersJSON, existing); + } + //results[resultIndex] = existingResult; + } + else { + if (debugVerbose.enabled) { + debugVerbose("%s no entry for %o, allocating", this, identifiersJSON); + } + batchIndexesByIdentifiersJSON.set(identifiersJSON, [batchIndex]); + } + } + if (batchIndexesByIdentifiersJSON.size <= 0) { + throw new Error("GrafastInternalError<98699a62-cd44-4372-8e92-d730b116a51d>: empty batch doesn't make sense in this context."); + } + const remaining = [...batchIndexesByIdentifiersJSON.keys()]; + const batchIndexesByValueIndex = [ + ...batchIndexesByIdentifiersJSON.values(), + ]; + // PERF: batchIndexesByIdentifiersJSON = null; + const sqlValues = identifierIndex == null + ? rawSqlValues + : [ + ...rawSqlValues, + // Manual JSON-ing + "[" + remaining.join(",") + "]", + ]; + // Maximum PostgreSQL identifier length is typically 63 bytes. + // Minus the `__cursor___` text, this leaves 52 characters for this + // counter. JS's largest safe integer is 2^53-1 which is 16 digits + // long - well under the 52 character limit. Assuming we used 1000 + // cursors per second every second, it would take us 285k years to + // exhaust this. Because this is a cursor we control and know is + // PostgreSQL safe we don't need to escape it. + const cursorIdentifier = `__cursor_${cursorCount++}__`; + const batchFetchSize = 100; + const declareCursorSQL = `declare ${cursorIdentifier} insensitive no scroll cursor without hold for\n${text}`; + const pullViaCursorSQL = `fetch forward ${batchFetchSize} from ${cursorIdentifier}`; + const releaseCursorSQL = `close ${cursorIdentifier}`; + let _deferredStreams = 0; + let valuesPending = 0; + const pending = batch.map(() => []); + const waiting = batch.map(() => null); + let finished = false; + // eslint-disable-next-line no-inner-declarations + function getNext(batchIndex) { + if (pending[batchIndex].length > 0) { + const value = pending[batchIndex].shift(); + valuesPending--; + if (valuesPending < batchFetchSize && !fetching) { + fetchNextBatch().then(null, handleFetchError); + } + if (value instanceof Wrapped) { + return Promise.reject(value.originalValue); + } + else { + return value; + } + } + else { + if (finished) { + throw $$FINISHED; + } + _deferredStreams++; + if (grafast_1.isDev && waiting[batchIndex]) { + throw new Error(`Waiting on more than one record! Forbidden!`); + } + const deferred = (0, grafast_1.defer)(); + waiting[batchIndex] = deferred; + return deferred; + } + } + // eslint-disable-next-line no-inner-declarations + function supplyValue(batchIndex, value) { + const deferred = waiting[batchIndex]; + if (deferred !== null) { + waiting[batchIndex] = null; + _deferredStreams--; + if (value instanceof Wrapped) { + deferred.reject(value.originalValue); + } + else { + deferred.resolve(value); + } + } + else { + valuesPending++; + pending[batchIndex].push(value); + } + } + const executePromise = (0, grafast_1.defer)(); + const handleFetchError = (error) => { + if (finished) { + console.error(`GraphileInternalError<2a6a34e4-a172-4c9a-b74e-b87ccf1b6d47>: Received an error when stream was already finished: ${error}`); + return; + } + finished = true; + tx.resolve(); + txResolved = true; + cursorOpen = false; + executePromise.reject(error); + console.error("Error occurred:"); + console.error(error); + for (let i = 0, l = batch.length; i < l; i++) { + supplyValue(i, new Wrapped(error)); + } + }; + this.withTransaction(context, async (_execute) => { + executePromise.resolve(_execute); + return tx; + }).then(null, handleFetchError); + const execute = await executePromise; + // eslint-disable-next-line no-inner-declarations + let fetching = false; + const fetchNextBatch = async () => { + if (fetching) { + return; + } + if (finished) { + return; + } + fetching = true; + const queryResult = await execute(pullViaCursorSQL, []); + const { rows } = queryResult; + if (rows.length < batchFetchSize) { + releaseCursor(); + } + for (let i = 0, l = rows.length; i < l; i++) { + const result = rows[i]; + const valueIndex = identifierIndex != null + ? result[identifierIndex] + : 0; + const batchIndexes = batchIndexesByValueIndex[valueIndex]; + if (!batchIndexes) { + throw new Error(`GrafastInternalError<8f513ceb-a3dc-4ec7-9ca1-0f0d4576a22d>: could not determine the identifier JSON for value index '${valueIndex}'`); + } + for (let i = 0, l = batchIndexes.length; i < l; i++) { + supplyValue(batchIndexes[i], result); + } + } + fetching = false; + if (finished) { + // We've hit the end of the road + for (let i = 0, l = batch.length; i < l; i++) { + supplyValue(i, new Wrapped($$FINISHED)); + } + } + else { + if (valuesPending < batchFetchSize) { + fetchNextBatch().then(null, handleFetchError); + } + } + }; + // Registers the cursor + cursorOpen = true; + await execute(declareCursorSQL, sqlValues); + // Ensure we release the cursor now we've registered it. + fetchNextBatch().then(null, handleFetchError); + function releaseCursor() { + finished = true; + if (cursorOpen) { + cursorOpen = false; + // Release the cursor + (async () => { + // This also closes the cursor + try { + await execute(releaseCursorSQL, []); + } + finally { + if (!txResolved) { + tx.resolve(); + txResolved = true; + cursorOpen = false; + } + } + })().catch((e) => { + console.error(`Error occurred whilst closing cursor: ${e}`); + }); + } + } + // IMPORTANT: must *NOT* throw between here and the try block in the callback below + let remainingBatches = batch.length; + batch.forEach(({ resultIndex }, batchIndex) => { + streams[resultIndex] = (async function* () { + try { + for (;;) { + yield await getNext(batchIndex); + } + } + catch (e) { + if (e === $$FINISHED) { + return; + } + else { + throw e; + } + } + finally { + remainingBatches--; + if (remainingBatches === 0) { + releaseCursor(); + } + } + })(); + }); + })(); + promise.then(null, (e) => { + console.error("UNEXPECTED ERROR!"); + console.error(e); + tx.resolve(); + txResolved = true; + cursorOpen = false; + batch.forEach(({ resultIndex }) => { + const stream = streams[resultIndex]; + if ((0, grafast_1.isAsyncIterable)(stream)) { + stream[Symbol.asyncIterator]().throw?.(e); + } + streams[resultIndex] = Promise.reject(e); + }); + }); + promises.push(promise); + } + // Avoids UnhandledPromiseRejection error. + await Promise.allSettled(promises); + return { + streams: streams, + }; + } + async executeMutation(options) { + const { context, text, values } = options; + const { withPgClient, pgSettings } = context; + // We don't explicitly need a transaction for mutations + const queryResult = await withPgClient(pgSettings, (client) => this._executeWithClient(client, text, values)); + // PERF: we could probably make this more efficient rather than blowing away the entire cache! + // Wipe the cache since a mutation succeeded. + context[this.$$cache]?.reset(); + return queryResult; + } +} +exports.PgExecutor = PgExecutor; +(0, grafast_1.exportAs)("@dataplan/pg", PgExecutor, "PgExecutor"); +//# sourceMappingURL=executor.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/executor.js.map b/grafast/dataplan-pg/dist/executor.js.map new file mode 100644 index 0000000000..5c701a1e26 --- /dev/null +++ b/grafast/dataplan-pg/dist/executor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"executor.js","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":";;;;AAAA,gEAAgC;AAChC,0DAA0B;AAC1B,0DAAiC;AASjC,qCAAkE;AAGlE,yEAAmE;AACnE,6CAAuC;AAEvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEhC,MAAM,UAAU,GAAkB,MAAM,CAAC,UAAU,CAAC,CAAC;AAErD,MAAM,OAAO;IACX,YAAmB,aAAgB;QAAhB,kBAAa,GAAb,aAAa,CAAG;IAAG,CAAC;CACxC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB,MAAM,KAAK,GAAG,IAAA,eAAY,EAAC,yBAAyB,CAAC,CAAC;AACtD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAkG7C;;;;;;GAMG;AACH,MAAa,UAAU;IAKrB,YAAY,OAGX;QACC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;IACjC,CAAC;IAEM,QAAQ;QACb,OAAO,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IACrD,CAAC;IAED,mCAAmC;IAC5B,OAAO;QACZ,OAAO,IAAI,CAAC,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C,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;QAExC,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA9tBD,gCA8tBC;AAED,IAAA,kBAAQ,EAAC,cAAc,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgBooleanFilter.d.ts b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.d.ts new file mode 100644 index 0000000000..dd3140a1c4 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.d.ts @@ -0,0 +1,20 @@ +import { Modifier } from "grafast"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgConditionLike } from "../interfaces.js"; +export declare class PgBooleanFilter extends Modifier implements SQLable { + readonly expression: SQL; + static $$export: { + moduleName: string; + exportName: string; + }; + private conditions; + private havingConditions; + alias: SQL; + constructor(classFilter: PgConditionLike, expression: SQL); + where(condition: SQL): void; + having(condition: SQL): void; + apply(): void; + [$$toSQL](): SQL; +} +//# sourceMappingURL=pgBooleanFilter.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgBooleanFilter.d.ts.map b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.d.ts.map new file mode 100644 index 0000000000..53b98b60ac --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgBooleanFilter.d.ts","sourceRoot":"","sources":["../../src/filters/pgBooleanFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,qBAAa,eACX,SAAQ,QAAQ,CAAC,eAAe,CAChC,YAAW,OAAO;aAaA,UAAU,EAAE,GAAG;IAXjC,MAAM,CAAC,QAAQ;;;MAGb;IAEF,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,gBAAgB,CAAa;IAC9B,KAAK,EAAE,GAAG,CAAC;gBAGhB,WAAW,EAAE,eAAe,EACZ,UAAU,EAAE,GAAG;IAMjC,KAAK,CAAC,SAAS,EAAE,GAAG;IAIpB,MAAM,CAAC,SAAS,EAAE,GAAG;IAIrB,KAAK;IAKL,CAAC,OAAO,CAAC;CAGV"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgBooleanFilter.js b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.js new file mode 100644 index 0000000000..8bb08326dc --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgBooleanFilter = void 0; +const grafast_1 = require("grafast"); +const pg_sql2_1 = require("pg-sql2"); +class PgBooleanFilter extends grafast_1.Modifier { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgBooleanFilter", + }; } + constructor(classFilter, expression) { + super(classFilter); + this.expression = expression; + this.conditions = []; + this.havingConditions = []; + this.alias = classFilter.alias; + } + where(condition) { + this.conditions.push(condition); + } + having(condition) { + this.havingConditions.push(condition); + } + apply() { + this.conditions.forEach((condition) => this.parent.where(condition)); + this.havingConditions.forEach((condition) => this.parent.having(condition)); + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgBooleanFilter = PgBooleanFilter; +//# sourceMappingURL=pgBooleanFilter.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgBooleanFilter.js.map b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.js.map new file mode 100644 index 0000000000..9b69839fbb --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgBooleanFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgBooleanFilter.js","sourceRoot":"","sources":["../../src/filters/pgBooleanFilter.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC,qCAAkC;AAIlC,MAAa,eACX,SAAQ,kBAAyB;aAG1B,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,iBAAiB;KAC9B,AAHc,CAGb;IAMF,YACE,WAA4B,EACZ,UAAe;QAE/B,KAAK,CAAC,WAAW,CAAC,CAAC;QAFH,eAAU,GAAV,UAAU,CAAK;QANzB,eAAU,GAAU,EAAE,CAAC;QACvB,qBAAgB,GAAU,EAAE,CAAC;QAQnC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,SAAc;QAClB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,SAAc;QACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,CAAC,iBAAO,CAAC;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;;AApCH,0CAqCC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgClassFilter.d.ts b/grafast/dataplan-pg/dist/filters/pgClassFilter.d.ts new file mode 100644 index 0000000000..a14b24f704 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgClassFilter.d.ts @@ -0,0 +1,20 @@ +import { Modifier } from "grafast"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgConditionLike } from "../index.js"; +import type { PgCondition, PgConditionCapableParent } from "../steps/pgCondition.js"; +export declare class PgClassFilter extends Modifier> implements SQLable, PgConditionLike { + readonly alias: SQL; + static $$export: { + moduleName: string; + exportName: string; + }; + private conditions; + private havingConditions; + constructor(parent: PgCondition, alias: SQL); + where(condition: SQL): void; + having(condition: SQL): void; + apply(): void; + [$$toSQL](): SQL; +} +//# sourceMappingURL=pgClassFilter.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgClassFilter.d.ts.map b/grafast/dataplan-pg/dist/filters/pgClassFilter.d.ts.map new file mode 100644 index 0000000000..95871a186b --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgClassFilter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgClassFilter.d.ts","sourceRoot":"","sources":["../../src/filters/pgClassFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,aAAa,CACtB,OAAO,SAAS,wBAAwB,GAAG,wBAAwB,CAErE,SAAQ,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CACrC,YAAW,OAAO,EAAE,eAAe;aAYjB,KAAK,EAAE,GAAG;IAV5B,MAAM,CAAC,QAAQ;;;MAGb;IAEF,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,gBAAgB,CAAa;gBAGnC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EACZ,KAAK,EAAE,GAAG;IAK5B,KAAK,CAAC,SAAS,EAAE,GAAG;IAIpB,MAAM,CAAC,SAAS,EAAE,GAAG;IAIrB,KAAK;IAKL,CAAC,OAAO,CAAC;CAGV"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgClassFilter.js b/grafast/dataplan-pg/dist/filters/pgClassFilter.js new file mode 100644 index 0000000000..001b537a00 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgClassFilter.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgClassFilter = void 0; +const grafast_1 = require("grafast"); +const pg_sql2_1 = require("pg-sql2"); +class PgClassFilter extends grafast_1.Modifier { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgClassFilter", + }; } + constructor(parent, alias) { + super(parent); + this.alias = alias; + this.conditions = []; + this.havingConditions = []; + } + where(condition) { + this.conditions.push(condition); + } + having(condition) { + this.havingConditions.push(condition); + } + apply() { + this.conditions.forEach((condition) => this.parent.where(condition)); + this.havingConditions.forEach((condition) => this.parent.having(condition)); + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgClassFilter = PgClassFilter; +//# sourceMappingURL=pgClassFilter.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgClassFilter.js.map b/grafast/dataplan-pg/dist/filters/pgClassFilter.js.map new file mode 100644 index 0000000000..042634e5ad --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgClassFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgClassFilter.js","sourceRoot":"","sources":["../../src/filters/pgClassFilter.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC,qCAAkC;AAQlC,MAAa,aAGX,SAAQ,kBAA8B;aAG/B,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,eAAe;KAC5B,AAHc,CAGb;IAKF,YACE,MAA4B,EACZ,KAAU;QAE1B,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,UAAK,GAAL,KAAK,CAAK;QALpB,eAAU,GAAU,EAAE,CAAC;QACvB,qBAAgB,GAAU,EAAE,CAAC;IAOrC,CAAC;IAED,KAAK,CAAC,SAAc;QAClB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,SAAc;QACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,CAAC,iBAAO,CAAC;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;;AApCH,sCAqCC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgManyFilter.d.ts b/grafast/dataplan-pg/dist/filters/pgManyFilter.d.ts new file mode 100644 index 0000000000..475335a7f7 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgManyFilter.d.ts @@ -0,0 +1,18 @@ +import { Modifier } from "grafast"; +import type { PgResource } from "../datasource.js"; +import { PgTempTable } from "../steps/pgTempTable.js"; +import { PgClassFilter } from "./pgClassFilter.js"; +export declare class PgManyFilter> extends Modifier { + childDataSource: TChildResource; + private myAttrs; + private theirAttrs; + static $$export: { + moduleName: string; + exportName: string; + }; + someTemp: PgTempTable | null; + constructor($parentFilterPlan: PgClassFilter, childDataSource: TChildResource, myAttrs: string[], theirAttrs: string[]); + some(): PgClassFilter>; + apply(): void; +} +//# sourceMappingURL=pgManyFilter.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgManyFilter.d.ts.map b/grafast/dataplan-pg/dist/filters/pgManyFilter.d.ts.map new file mode 100644 index 0000000000..cfd2c4cbbc --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgManyFilter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgManyFilter.d.ts","sourceRoot":"","sources":["../../src/filters/pgManyFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,YAAY,CACvB,cAAc,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAC1D,SAAQ,QAAQ,CAAC,aAAa,CAAC;IAStB,eAAe,EAAE,cAAc;IACtC,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,UAAU;IAVpB,MAAM,CAAC,QAAQ;;;MAGb;IAEK,QAAQ,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI,CAAQ;gBAEzD,iBAAiB,EAAE,aAAa,EACzB,eAAe,EAAE,cAAc,EAC9B,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAAE;IAU9B,IAAI;IAiBJ,KAAK;CAqBN"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgManyFilter.js b/grafast/dataplan-pg/dist/filters/pgManyFilter.js new file mode 100644 index 0000000000..491a67330f --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgManyFilter.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgManyFilter = void 0; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importDefault(require("pg-sql2")); +const pgTempTable_js_1 = require("../steps/pgTempTable.js"); +const pgClassFilter_js_1 = require("./pgClassFilter.js"); +class PgManyFilter extends grafast_1.Modifier { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgManyFilter", + }; } + constructor($parentFilterPlan, childDataSource, myAttrs, theirAttrs) { + super($parentFilterPlan); + this.childDataSource = childDataSource; + this.myAttrs = myAttrs; + this.theirAttrs = theirAttrs; + this.someTemp = null; + if (myAttrs.length !== theirAttrs.length) { + throw new Error("Expected the local and remote attributes to have the same number of entries."); + } + } + some() { + const tempTable = new pgTempTable_js_1.PgTempTable(this.parent, this.childDataSource); + // Implement the relationship + this.myAttrs.forEach((attr, i) => { + tempTable.where((0, pg_sql2_1.default) `${this.parent.alias}.${pg_sql2_1.default.identifier(attr)} = ${tempTable.alias}.${pg_sql2_1.default.identifier(this.theirAttrs[i])}`); + }); + const $filter = new pgClassFilter_js_1.PgClassFilter(tempTable.wherePlan(), tempTable.alias); + this.someTemp = tempTable; + return $filter; + } + apply() { + if (this.someTemp) { + const conditions = this.someTemp.conditions; + const from = (0, pg_sql2_1.default) `\nfrom ${this.someTemp.fromExpression()} as ${this.someTemp.alias}`; + const sqlConditions = pg_sql2_1.default.join(conditions.map((c) => pg_sql2_1.default.parens(pg_sql2_1.default.indent(c))), " and "); + const where = conditions.length === 0 + ? pg_sql2_1.default.blank + : conditions.length === 1 + ? (0, pg_sql2_1.default) `\nwhere ${sqlConditions}` + : (0, pg_sql2_1.default) `\nwhere\n${pg_sql2_1.default.indent(sqlConditions)}`; + this.parent.where((0, pg_sql2_1.default) `exists(${pg_sql2_1.default.indent((0, pg_sql2_1.default) `select 1${from}${where}`)})`); + } + } +} +exports.PgManyFilter = PgManyFilter; +//# sourceMappingURL=pgManyFilter.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgManyFilter.js.map b/grafast/dataplan-pg/dist/filters/pgManyFilter.js.map new file mode 100644 index 0000000000..a06d9e5d14 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgManyFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgManyFilter.js","sourceRoot":"","sources":["../../src/filters/pgManyFilter.ts"],"names":[],"mappings":";;;;AAAA,qCAAmC;AACnC,8DAA0B;AAG1B,4DAAsD;AACtD,yDAAmD;AAEnD,MAAa,YAEX,SAAQ,kBAAuB;aACxB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;KAC3B,AAHc,CAGb;IAGF,YACE,iBAAgC,EACzB,eAA+B,EAC9B,OAAiB,EACjB,UAAoB;QAE5B,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAJlB,oBAAe,GAAf,eAAe,CAAgB;QAC9B,YAAO,GAAP,OAAO,CAAU;QACjB,eAAU,GAAV,UAAU,CAAU;QALvB,aAAQ,GAAuC,IAAI,CAAC;QAQzD,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI;QACF,MAAM,SAAS,GAAG,IAAI,4BAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAErE,6BAA6B;QAC7B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;YAC/B,SAAS,CAAC,KAAK,CACb,IAAA,iBAAG,EAAA,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,iBAAG,CAAC,UAAU,CAAC,IAAI,CAAC,MAC7C,SAAS,CAAC,KACZ,IAAI,iBAAG,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CACzC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,gCAAa,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5C,MAAM,IAAI,GAAG,IAAA,iBAAG,EAAA,UAAU,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,OACtD,IAAI,CAAC,QAAQ,CAAC,KAChB,EAAE,CAAC;YACH,MAAM,aAAa,GAAG,iBAAG,CAAC,IAAI,CAC5B,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAG,CAAC,MAAM,CAAC,iBAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,CACR,CAAC;YACF,MAAM,KAAK,GACT,UAAU,CAAC,MAAM,KAAK,CAAC;gBACrB,CAAC,CAAC,iBAAG,CAAC,KAAK;gBACX,CAAC,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;oBACvB,CAAC,CAAC,IAAA,iBAAG,EAAA,WAAW,aAAa,EAAE;oBAC/B,CAAC,CAAC,IAAA,iBAAG,EAAA,YAAY,iBAAG,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,IAAA,iBAAG,EAAA,UAAU,iBAAG,CAAC,MAAM,CAAC,IAAA,iBAAG,EAAA,WAAW,IAAI,GAAG,KAAK,EAAE,CAAC,GAAG,CACzD,CAAC;QACJ,CAAC;IACH,CAAC;;AA5DH,oCA6DC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgOrFilter.d.ts b/grafast/dataplan-pg/dist/filters/pgOrFilter.d.ts new file mode 100644 index 0000000000..0d0ef1c3b6 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgOrFilter.d.ts @@ -0,0 +1,19 @@ +import { Modifier } from "grafast"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgConditionLike } from "../interfaces.js"; +export declare class PgOrFilter extends Modifier implements SQLable { + static $$export: { + moduleName: string; + exportName: string; + }; + private conditions; + private havingConditions; + alias: SQL; + constructor($classFilterPlan: PgConditionLike); + where(condition: SQL): void; + having(condition: SQL): void; + apply(): void; + [$$toSQL](): SQL; +} +//# sourceMappingURL=pgOrFilter.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgOrFilter.d.ts.map b/grafast/dataplan-pg/dist/filters/pgOrFilter.d.ts.map new file mode 100644 index 0000000000..2b6888297f --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgOrFilter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgOrFilter.d.ts","sourceRoot":"","sources":["../../src/filters/pgOrFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAO,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,qBAAa,UAAW,SAAQ,QAAQ,CAAC,eAAe,CAAE,YAAW,OAAO;IAC1E,MAAM,CAAC,QAAQ;;;MAGb;IAEF,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,gBAAgB,CAAa;IAC9B,KAAK,EAAE,GAAG,CAAC;gBAEN,gBAAgB,EAAE,eAAe;IAK7C,KAAK,CAAC,SAAS,EAAE,GAAG;IAIpB,MAAM,CAAC,SAAS,EAAE,GAAG;IAIrB,KAAK;IAmBL,CAAC,OAAO,CAAC;CAGV"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgOrFilter.js b/grafast/dataplan-pg/dist/filters/pgOrFilter.js new file mode 100644 index 0000000000..af5d07a3ce --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgOrFilter.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgOrFilter = void 0; +const grafast_1 = require("grafast"); +const pg_sql2_1 = require("pg-sql2"); +class PgOrFilter extends grafast_1.Modifier { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgOrFilter", + }; } + constructor($classFilterPlan) { + super($classFilterPlan); + this.conditions = []; + this.havingConditions = []; + this.alias = $classFilterPlan.alias; + } + where(condition) { + this.conditions.push(condition); + } + having(condition) { + this.havingConditions.push(condition); + } + apply() { + if (this.conditions.length > 0) { + this.parent.where((0, pg_sql2_1.sql) `(${pg_sql2_1.sql.join(this.conditions.map((frag) => pg_sql2_1.sql.indent(pg_sql2_1.sql.parens(frag))), "\nOR\n")})`); + } + if (this.havingConditions.length > 0) { + this.parent.having((0, pg_sql2_1.sql) `(${pg_sql2_1.sql.join(this.havingConditions.map((frag) => pg_sql2_1.sql.indent(pg_sql2_1.sql.parens(frag))), "\nOR\n")})`); + } + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgOrFilter = PgOrFilter; +//# sourceMappingURL=pgOrFilter.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/filters/pgOrFilter.js.map b/grafast/dataplan-pg/dist/filters/pgOrFilter.js.map new file mode 100644 index 0000000000..8d41d7cd64 --- /dev/null +++ b/grafast/dataplan-pg/dist/filters/pgOrFilter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgOrFilter.js","sourceRoot":"","sources":["../../src/filters/pgOrFilter.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC,qCAAuC;AAIvC,MAAa,UAAW,SAAQ,kBAAyB;aAChD,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,YAAY;KACzB,AAHc,CAGb;IAMF,YAAY,gBAAiC;QA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formatSQLForDebugging.d.ts new file mode 100644 index 0000000000..11453e775c --- /dev/null +++ b/grafast/dataplan-pg/dist/formatSQLForDebugging.d.ts @@ -0,0 +1,14 @@ +/** + * `@dataplan/pg` builds SQL queries in a particular format, this function will + * tweak the queries to add some syntax highlighting to make the queries easier + * to read. + * + * Further, if this is passed with a Postgres error, we'll try and add a + * pointer that points to the relevant part of the query where the error + * occurred. + */ +export declare function formatSQLForDebugging(sql: string, error?: { + position?: string | number; + message?: string; +} | null): string; +//# sourceMappingURL=formatSQLForDebugging.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/formatSQLForDebugging.d.ts.map b/grafast/dataplan-pg/dist/formatSQLForDebugging.d.ts.map new file mode 100644 index 0000000000..8136350953 --- /dev/null +++ b/grafast/dataplan-pg/dist/formatSQLForDebugging.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"formatSQLForDebugging.d.ts","sourceRoot":"","sources":["../src/formatSQLForDebugging.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAC9D,MAAM,CAmDR"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/formatSQLForDebugging.js b/grafast/dataplan-pg/dist/formatSQLForDebugging.js new file mode 100644 index 0000000000..8179710050 --- /dev/null +++ b/grafast/dataplan-pg/dist/formatSQLForDebugging.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.formatSQLForDebugging = formatSQLForDebugging; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +/** + * `@dataplan/pg` builds SQL queries in a particular format, this function will + * tweak the queries to add some syntax highlighting to make the queries easier + * to read. + * + * Further, if this is passed with a Postgres error, we'll try and add a + * pointer that points to the relevant part of the query where the error + * occurred. + */ +function formatSQLForDebugging(sql, error) { + const pos = error?.position != null ? parseInt(String(error.position), 10) : null; + let colourIndex = 0; + const allowedColours = [ + chalk_1.default.red, + chalk_1.default.green, + chalk_1.default.yellow, + chalk_1.default.blue, + chalk_1.default.magenta, + chalk_1.default.cyan, + chalk_1.default.white, + chalk_1.default.black, + ]; + function nextColor() { + colourIndex = (colourIndex + 1) % allowedColours.length; + return allowedColours[colourIndex]; + } + const colours = Object.create(null); + /* Yep - that's `colour` from English and `ize` from American */ + function colourize(str) { + if (!colours[str]) { + colours[str] = nextColor(); + } + return colours[str].bold.call(null, str); + } + function comment(str) { + return chalk_1.default.inverse(str); + } + const lines = sql.split("\n"); + let start = 0; + const output = []; + for (const line of lines) { + const end = start + line.length + 1; + const colouredSql = line + .replace(/__[a-z0-9_]+(?:_[0-9]+|__)/g, colourize) + .replace(/(\/\*.*\*\/|--.*$)/g, comment); + output.push(colouredSql); + if (pos != null && pos >= start && pos < end) { + output.push(chalk_1.default.red("-".repeat(pos - start - 1) + "^ " + error?.message)); + } + start = end; + } + return output.join("\n"); +} +//# sourceMappingURL=formatSQLForDebugging.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/formatSQLForDebugging.js.map b/grafast/dataplan-pg/dist/formatSQLForDebugging.js.map new file mode 100644 index 0000000000..d5ce848fc6 --- /dev/null +++ b/grafast/dataplan-pg/dist/formatSQLForDebugging.js.map @@ -0,0 +1 @@ +{"version":3,"file":"formatSQLForDebugging.js","sourceRoot":"","sources":["../src/formatSQLForDebugging.ts"],"names":[],"mappings":";;AAWA,sDAsDC;;AAjED,0DAA0B;AAE1B;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,GAAW,EACX,KAA+D;IAE/D,MAAM,GAAG,GACP,KAAK,EAAE,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,C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qBAAqB,EAAE,OAAO,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,KAAK,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;YAC7C,MAAM,CAAC,IAAI,CACT,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,OAAO,CAAC,CAC/D,CAAC;QACJ,CAAC;QACD,KAAK,GAAG,GAAG,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/index.d.ts b/grafast/dataplan-pg/dist/index.d.ts new file mode 100644 index 0000000000..7ea51f4d5d --- /dev/null +++ b/grafast/dataplan-pg/dist/index.d.ts @@ -0,0 +1,102 @@ +import type { GrafastSubscriber } from "grafast"; +import { domainOfCodec, enumCodec, getCodecByPgCatalogTypeName, getInnerCodec, isEnumCodec, listOfCodec, ObjectFromPgCodecAttributes, PgCodecAttribute, PgCodecAttributeExtensions, PgCodecAttributes, PgCodecAttributeVia, PgCodecAttributeViaExplicit, PgEnumCodecSpec, PgRecordTypeCodecSpec, rangeOfCodec, recordCodec, sqlValueWithCodec, TYPES } from "./codecs.js"; +import { PgBox, PgCircle, PgHStore, PgInterval, PgLine, PgLseg, PgPath, PgPoint, PgPolygon } from "./codecUtils/index.js"; +import { makePgResourceOptions, makeRegistry, makeRegistryBuilder, PgCodecRef, PgCodecRefExtensions, PgCodecRefPath, PgCodecRefPathEntry, PgCodecRefs, PgFunctionResourceOptions, PgRegistryBuilder, PgResource, PgResourceExtensions, PgResourceOptions, PgResourceParameter, PgResourceUnique, PgResourceUniqueExtensions } from "./datasource.js"; +import { PgClient, PgClientQuery, PgClientResult, PgExecutor, PgExecutorContext, PgExecutorContextPlans, PgExecutorInput, PgExecutorMutationOptions, PgExecutorOptions, WithPgClient } from "./executor.js"; +import { PgBooleanFilter } from "./filters/pgBooleanFilter.js"; +import { PgClassFilter } from "./filters/pgClassFilter.js"; +import { PgManyFilter } from "./filters/pgManyFilter.js"; +import { PgOrFilter } from "./filters/pgOrFilter.js"; +import type { PgSelectQueryBuilderCallback, PgUnionAllQueryBuilderCallback } from "./interfaces.js"; +import { GetPgCodecAttributes, GetPgRegistryCodecRelations, GetPgRegistryCodecs, GetPgRegistrySources, GetPgResourceAttributes, GetPgResourceCodec, GetPgResourceRegistry, GetPgResourceRelations, GetPgResourceUniques, KeysOfType, MakePgServiceOptions, PgClassSingleStep, PgCodec, PgCodecAnyScalar, PgCodecExtensions, PgCodecList, PgCodecPolymorphism, PgCodecPolymorphismRelational, PgCodecPolymorphismRelationalTypeSpec, PgCodecPolymorphismSingle, PgCodecPolymorphismSingleTypeAttributeSpec, PgCodecPolymorphismSingleTypeSpec, PgCodecPolymorphismUnion, PgCodecRelation, PgCodecRelationConfig, PgCodecRelationExtensions, PgCodecWithAttributes, PgConditionLike, PgDecode, PgEncode, PgEnumCodec, PgEnumValue, PgGroupSpec, PgOrderSpec, PgRefDefinition, PgRefDefinitionExtensions, PgRefDefinitions, PgRegistry, PgTypedStep, PlanByUniques, TuplePlanMap } from "./interfaces.js"; +import { PgLockableParameter, PgLockCallback } from "./pgLocker.js"; +import type { PgAdaptor } from "./pgServices.js"; +import { getWithPgClientFromPgService, withPgClientFromPgService, withSuperuserPgClientFromPgService } from "./pgServices.js"; +import { PgContextPlugin } from "./plugins/PgContextPlugin.js"; +import { pgClassExpression, PgClassExpressionStep } from "./steps/pgClassExpression.js"; +import { PgCondition, PgConditionCapableParent, PgHavingConditionSpec, PgWhereConditionSpec, pgWhereConditionSpecListToSQL } from "./steps/pgCondition.js"; +import { PgCursorStep } from "./steps/pgCursor.js"; +import { pgDeleteSingle, PgDeleteSingleQueryBuilder, PgDeleteSingleStep } from "./steps/pgDeleteSingle.js"; +import { pgInsertSingle, PgInsertSingleQueryBuilder, PgInsertSingleStep } from "./steps/pgInsertSingle.js"; +import { pgPageInfo, PgPageInfoStep } from "./steps/pgPageInfo.js"; +import { pgPolymorphic, PgPolymorphicStep, PgPolymorphicTypeMap } from "./steps/pgPolymorphic.js"; +import { generatePgParameterAnalysis, pgFromExpression, pgFromExpressionRuntime, PgGroupDetails, pgSelect, PgSelectArgumentDigest, PgSelectArgumentRuntimeValue, PgSelectArgumentSpec, pgSelectFromRecords, PgSelectIdentifierSpec, PgSelectMode, PgSelectOptions, PgSelectParsedCursorStep, PgSelectQueryBuilder, PgSelectRowsStep, PgSelectStep, sqlFromArgDigests } from "./steps/pgSelect.js"; +import { pgSelectFromRecord, pgSelectSingleFromRecord, PgSelectSinglePlanOptions, PgSelectSingleStep } from "./steps/pgSelectSingle.js"; +import { pgSingleTablePolymorphic, PgSingleTablePolymorphicStep } from "./steps/pgSingleTablePolymorphic.js"; +import { PgTempTable } from "./steps/pgTempTable.js"; +import { pgUnionAll, PgUnionAllQueryBuilder, PgUnionAllRowsStep, PgUnionAllSingleStep, PgUnionAllStep, PgUnionAllStepCondition, PgUnionAllStepConfig, PgUnionAllStepConfigAttributes, PgUnionAllStepMember, PgUnionAllStepOrder } from "./steps/pgUnionAll.js"; +import { pgUpdateSingle, PgUpdateSingleQueryBuilder, PgUpdateSingleStep } from "./steps/pgUpdateSingle.js"; +import { pgValidateParsedCursor, PgValidateParsedCursorStep } from "./steps/pgValidateParsedCursor.js"; +import { toPg, ToPgStep } from "./steps/toPg.js"; +import { withPgClient, WithPgClientStep, WithPgClientStepCallback, withPgClientTransaction } from "./steps/withPgClient.js"; +import { assertPgClassSingleStep } from "./utils.js"; +export { assertPgClassSingleStep, domainOfCodec, enumCodec, generatePgParameterAnalysis, getCodecByPgCatalogTypeName, getInnerCodec, GetPgCodecAttributes, GetPgRegistryCodecRelations, GetPgRegistryCodecs, GetPgRegistrySources, GetPgResourceAttributes, GetPgResourceCodec, GetPgResourceRegistry, GetPgResourceRelations, GetPgResourceUniques, getWithPgClientFromPgService, isEnumCodec, KeysOfType, listOfCodec, makePgResourceOptions, MakePgServiceOptions, makeRegistry, makeRegistryBuilder, ObjectFromPgCodecAttributes, PgAdaptor, PgBooleanFilter, PgBox, PgCircle, pgClassExpression, PgClassExpressionStep, PgClassFilter, PgClassSingleStep, PgClient, PgClientQuery, PgClientResult, PgCodec, PgCodecAnyScalar, PgCodecAttribute, PgCodecAttributeExtensions, PgCodecAttributes, PgCodecAttributeVia, PgCodecAttributeViaExplicit, PgCodecExtensions, PgCodecList, PgCodecPolymorphism, PgCodecPolymorphismRelational, PgCodecPolymorphismRelationalTypeSpec, PgCodecPolymorphismSingle, PgCodecPolymorphismSingleTypeAttributeSpec, PgCodecPolymorphismSingleTypeSpec, PgCodecPolymorphismUnion, PgCodecRef, PgCodecRefExtensions, PgCodecRefPath, PgCodecRefPathEntry, PgCodecRefs, PgCodecRelation, PgCodecRelationConfig, PgCodecRelationExtensions, PgCodecWithAttributes, PgCondition, PgConditionCapableParent, PgConditionLike, PgContextPlugin, PgCursorStep, PgDecode, pgDeleteSingle, PgDeleteSingleQueryBuilder, PgDeleteSingleStep, PgEncode, PgEnumCodec, PgEnumCodecSpec, PgEnumValue, PgExecutor, PgExecutorContext, PgExecutorContextPlans, PgExecutorInput, PgExecutorMutationOptions, PgExecutorOptions, pgFromExpression, pgFromExpressionRuntime, PgFunctionResourceOptions, PgGroupDetails, PgGroupSpec, PgHavingConditionSpec, PgHStore, pgInsertSingle, PgInsertSingleQueryBuilder, PgInsertSingleStep, PgInterval, PgLine, PgLockableParameter, PgLockCallback, PgLseg, PgManyFilter, PgOrderSpec, PgOrFilter, pgPageInfo, PgPageInfoStep, PgPath, PgPoint, PgPolygon, pgPolymorphic, PgPolymorphicStep, PgPolymorphicTypeMap, PgRecordTypeCodecSpec, PgRefDefinition, PgRefDefinitionExtensions, PgRefDefinitions, PgRegistry, PgRegistryBuilder, PgResource, PgResourceExtensions, PgResourceOptions, PgResourceParameter, PgResourceUnique, PgResourceUniqueExtensions, pgSelect, PgSelectArgumentDigest, PgSelectArgumentRuntimeValue, PgSelectArgumentSpec, pgSelectFromRecord, pgSelectFromRecords, PgSelectIdentifierSpec, PgSelectMode, PgSelectOptions, PgSelectParsedCursorStep, PgSelectQueryBuilder, PgSelectQueryBuilderCallback, PgSelectRowsStep, pgSelectSingleFromRecord, PgSelectSinglePlanOptions, PgSelectSingleStep, PgSelectStep, pgSingleTablePolymorphic, PgSingleTablePolymorphicStep, PgTempTable, PgTypedStep, pgUnionAll, PgUnionAllQueryBuilder, PgUnionAllQueryBuilderCallback, PgUnionAllRowsStep, PgUnionAllSingleStep, PgUnionAllStep, PgUnionAllStepCondition, PgUnionAllStepConfig, PgUnionAllStepConfigAttributes, PgUnionAllStepMember, PgUnionAllStepOrder, pgUpdateSingle, PgUpdateSingleQueryBuilder, PgUpdateSingleStep, pgValidateParsedCursor, PgValidateParsedCursorStep, PgWhereConditionSpec, pgWhereConditionSpecListToSQL, PlanByUniques, rangeOfCodec, recordCodec, sqlFromArgDigests, sqlValueWithCodec, toPg, ToPgStep, TuplePlanMap, TYPES, WithPgClient, withPgClient, withPgClientFromPgService, WithPgClientStep, WithPgClientStepCallback, withPgClientTransaction, withSuperuserPgClientFromPgService, }; +export { version } from "./version.js"; +declare global { + namespace GraphileConfig { + interface PgServiceConfiguration { + name: string; + schemas?: string[]; + adaptor: PgAdaptor; + adaptorSettings?: GraphileConfig.PgAdaptors[TAdaptor]["adaptorSettings"]; + /** The key on 'context' where the withPgClient function will be sourced */ + withPgClientKey: KeysOfType>; + /** Return settings to set in the session */ + pgSettings?: ((requestContext: Grafast.RequestContext) => Record) | Record | null; + /** Settings to set in the session that performs introspection (during gather phase) */ + pgSettingsForIntrospection?: Record | null; + /** The key on 'context' where the pgSettings for this DB will be sourced */ + pgSettingsKey?: KeysOfType | null | undefined>; + /** The GrafastSubscriber to use for subscriptions */ + pgSubscriber?: GrafastSubscriber> | null; + /** Where on the context should the PgSubscriber be stored? */ + pgSubscriberKey?: KeysOfType | null | undefined>; + /** + * Call this when you no longer need this service configuration any more; + * releases any created resources (e.g. connection pools). + */ + release?: () => void | PromiseLike; + } + interface Preset { + pgServices?: ReadonlyArray<{ + [Key in keyof GraphileConfig.PgAdaptors]: PgServiceConfiguration; + }[keyof GraphileConfig.PgAdaptors]>; + } + interface PgAdaptors { + } + } + namespace DataplanPg { + interface PgConditionExtensions { + } + /** + * Custom metadata for a codec + */ + interface PgCodecExtensions { + oid?: string; + listItemNonNull?: boolean; + isEnumTableEnum?: boolean; + } + /** + * Extra metadata you can attach to a unique constraint. + */ + interface PgResourceUniqueExtensions { + } + /** + * Space for extra metadata about this resource + */ + interface PgResourceExtensions { + } + interface PgResourceParameterExtensions { + variant?: string; + } + interface PgCodecRefExtensions { + } + interface PgCodecAttributeExtensions { + } + interface PgRefDefinitionExtensions { + } + interface PgCodecRelationExtensions { + } + } +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/index.d.ts.map b/grafast/dataplan-pg/dist/index.d.ts.map new file mode 100644 index 0000000000..64e5af0a33 --- /dev/null +++ b/grafast/dataplan-pg/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,EACL,aAAa,EACb,SAAS,EACT,2BAA2B,EAC3B,aAAa,EACb,WAAW,EACX,WAAW,EACX,2BAA2B,EAC3B,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC3B,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,KAAK,EACN,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,UA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,EAAE,MAAM,CAAC;SAClB;QAED,UAAU,oBAAoB;SAAG;QACjC,UAAU,0BAA0B;SAAG;QACvC,UAAU,yBAAyB;SAAG;QACtC,UAAU,yBAAyB;SAAG;KACvC;CACF"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/index.js b/grafast/dataplan-pg/dist/index.js new file mode 100644 index 0000000000..bfe663762a --- /dev/null +++ b/grafast/dataplan-pg/dist/index.js @@ -0,0 +1,164 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pgValidateParsedCursor = exports.PgUpdateSingleStep = exports.pgUpdateSingle = exports.PgUnionAllStep = exports.PgUnionAllSingleStep = exports.PgUnionAllRowsStep = exports.pgUnionAll = exports.PgTempTable = exports.PgSingleTablePolymorphicStep = exports.pgSingleTablePolymorphic = exports.PgSelectStep = exports.PgSelectSingleStep = exports.pgSelectSingleFromRecord = exports.PgSelectRowsStep = exports.pgSelectFromRecords = exports.pgSelectFromRecord = exports.pgSelect = exports.PgResource = exports.PgPolymorphicStep = exports.pgPolymorphic = exports.PgPageInfoStep = exports.pgPageInfo = exports.PgOrFilter = exports.PgManyFilter = exports.PgInsertSingleStep = exports.pgInsertSingle = exports.pgFromExpressionRuntime = exports.pgFromExpression = exports.PgExecutor = exports.PgDeleteSingleStep = exports.pgDeleteSingle = exports.PgCursorStep = exports.PgContextPlugin = exports.PgCondition = exports.PgClassFilter = exports.PgClassExpressionStep = exports.pgClassExpression = exports.PgBooleanFilter = exports.makeRegistryBuilder = exports.makeRegistry = exports.makePgResourceOptions = exports.listOfCodec = exports.isEnumCodec = exports.getWithPgClientFromPgService = exports.getInnerCodec = exports.getCodecByPgCatalogTypeName = exports.generatePgParameterAnalysis = exports.enumCodec = exports.domainOfCodec = exports.assertPgClassSingleStep = void 0; +exports.version = exports.withSuperuserPgClientFromPgService = exports.withPgClientTransaction = exports.WithPgClientStep = exports.withPgClientFromPgService = exports.withPgClient = exports.TYPES = exports.ToPgStep = exports.toPg = exports.sqlValueWithCodec = exports.sqlFromArgDigests = exports.recordCodec = exports.rangeOfCodec = exports.pgWhereConditionSpecListToSQL = exports.PgValidateParsedCursorStep = void 0; +const grafast_1 = require("grafast"); +const codecs_js_1 = require("./codecs.js"); +Object.defineProperty(exports, "domainOfCodec", { enumerable: true, get: function () { return codecs_js_1.domainOfCodec; } }); +Object.defineProperty(exports, "enumCodec", { enumerable: true, get: function () { return codecs_js_1.enumCodec; } }); +Object.defineProperty(exports, "getCodecByPgCatalogTypeName", { enumerable: true, get: function () { return codecs_js_1.getCodecByPgCatalogTypeName; } }); +Object.defineProperty(exports, "getInnerCodec", { enumerable: true, get: function () { return codecs_js_1.getInnerCodec; } }); +Object.defineProperty(exports, "isEnumCodec", { enumerable: true, get: function () { return codecs_js_1.isEnumCodec; } }); +Object.defineProperty(exports, "listOfCodec", { enumerable: true, get: function () { return codecs_js_1.listOfCodec; } }); +Object.defineProperty(exports, "rangeOfCodec", { enumerable: true, get: function () { return codecs_js_1.rangeOfCodec; } }); +Object.defineProperty(exports, "recordCodec", { enumerable: true, get: function () { return codecs_js_1.recordCodec; } }); +Object.defineProperty(exports, "sqlValueWithCodec", { enumerable: true, get: function () { return codecs_js_1.sqlValueWithCodec; } }); +Object.defineProperty(exports, "TYPES", { enumerable: true, get: function () { return codecs_js_1.TYPES; } }); +const datasource_js_1 = require("./datasource.js"); +Object.defineProperty(exports, "makePgResourceOptions", { enumerable: true, get: function () { return datasource_js_1.makePgResourceOptions; } }); +Object.defineProperty(exports, "makeRegistry", { enumerable: true, get: function () { return datasource_js_1.makeRegistry; } }); +Object.defineProperty(exports, "makeRegistryBuilder", { enumerable: true, get: function () { return datasource_js_1.makeRegistryBuilder; } }); +Object.defineProperty(exports, "PgResource", { enumerable: true, get: function () { return datasource_js_1.PgResource; } }); +const executor_js_1 = require("./executor.js"); +Object.defineProperty(exports, "PgExecutor", { enumerable: true, get: function () { return executor_js_1.PgExecutor; } }); +const pgBooleanFilter_js_1 = require("./filters/pgBooleanFilter.js"); +Object.defineProperty(exports, "PgBooleanFilter", { enumerable: true, get: function () { return pgBooleanFilter_js_1.PgBooleanFilter; } }); +const pgClassFilter_js_1 = require("./filters/pgClassFilter.js"); +Object.defineProperty(exports, "PgClassFilter", { enumerable: true, get: function () { return pgClassFilter_js_1.PgClassFilter; } }); +const pgManyFilter_js_1 = require("./filters/pgManyFilter.js"); +Object.defineProperty(exports, "PgManyFilter", { enumerable: true, get: function () { return pgManyFilter_js_1.PgManyFilter; } }); +const pgOrFilter_js_1 = require("./filters/pgOrFilter.js"); +Object.defineProperty(exports, "PgOrFilter", { enumerable: true, get: function () { return pgOrFilter_js_1.PgOrFilter; } }); +const pgServices_js_1 = require("./pgServices.js"); +Object.defineProperty(exports, "getWithPgClientFromPgService", { enumerable: true, get: function () { return pgServices_js_1.getWithPgClientFromPgService; } }); +Object.defineProperty(exports, "withPgClientFromPgService", { enumerable: true, get: function () { return pgServices_js_1.withPgClientFromPgService; } }); +Object.defineProperty(exports, "withSuperuserPgClientFromPgService", { enumerable: true, get: function () { return pgServices_js_1.withSuperuserPgClientFromPgService; } }); +const PgContextPlugin_js_1 = require("./plugins/PgContextPlugin.js"); +Object.defineProperty(exports, "PgContextPlugin", { enumerable: true, get: function () { return PgContextPlugin_js_1.PgContextPlugin; } }); +const pgClassExpression_js_1 = require("./steps/pgClassExpression.js"); +Object.defineProperty(exports, "pgClassExpression", { enumerable: true, get: function () { return pgClassExpression_js_1.pgClassExpression; } }); +Object.defineProperty(exports, "PgClassExpressionStep", { enumerable: true, get: function () { return pgClassExpression_js_1.PgClassExpressionStep; } }); +const pgCondition_js_1 = require("./steps/pgCondition.js"); +Object.defineProperty(exports, "PgCondition", { enumerable: true, get: function () { return pgCondition_js_1.PgCondition; } }); +Object.defineProperty(exports, "pgWhereConditionSpecListToSQL", { enumerable: true, get: function () { return pgCondition_js_1.pgWhereConditionSpecListToSQL; } }); +const pgCursor_js_1 = require("./steps/pgCursor.js"); +Object.defineProperty(exports, "PgCursorStep", { enumerable: true, get: function () { return pgCursor_js_1.PgCursorStep; } }); +const pgDeleteSingle_js_1 = require("./steps/pgDeleteSingle.js"); +Object.defineProperty(exports, "pgDeleteSingle", { enumerable: true, get: function () { return pgDeleteSingle_js_1.pgDeleteSingle; } }); +Object.defineProperty(exports, "PgDeleteSingleStep", { enumerable: true, get: function () { return pgDeleteSingle_js_1.PgDeleteSingleStep; } }); +const pgInsertSingle_js_1 = require("./steps/pgInsertSingle.js"); +Object.defineProperty(exports, "pgInsertSingle", { enumerable: true, get: function () { return pgInsertSingle_js_1.pgInsertSingle; } }); +Object.defineProperty(exports, "PgInsertSingleStep", { enumerable: true, get: function () { return pgInsertSingle_js_1.PgInsertSingleStep; } }); +const pgPageInfo_js_1 = require("./steps/pgPageInfo.js"); +Object.defineProperty(exports, "pgPageInfo", { enumerable: true, get: function () { return pgPageInfo_js_1.pgPageInfo; } }); +Object.defineProperty(exports, "PgPageInfoStep", { enumerable: true, get: function () { return pgPageInfo_js_1.PgPageInfoStep; } }); +const pgPolymorphic_js_1 = require("./steps/pgPolymorphic.js"); +Object.defineProperty(exports, "pgPolymorphic", { enumerable: true, get: function () { return pgPolymorphic_js_1.pgPolymorphic; } }); +Object.defineProperty(exports, "PgPolymorphicStep", { enumerable: true, get: function () { return pgPolymorphic_js_1.PgPolymorphicStep; } }); +const pgSelect_js_1 = require("./steps/pgSelect.js"); +Object.defineProperty(exports, "generatePgParameterAnalysis", { enumerable: true, get: function () { return pgSelect_js_1.generatePgParameterAnalysis; } }); +Object.defineProperty(exports, "pgFromExpression", { enumerable: true, get: function () { return pgSelect_js_1.pgFromExpression; } }); +Object.defineProperty(exports, "pgFromExpressionRuntime", { enumerable: true, get: function () { return pgSelect_js_1.pgFromExpressionRuntime; } }); +Object.defineProperty(exports, "pgSelect", { enumerable: true, get: function () { return pgSelect_js_1.pgSelect; } }); +Object.defineProperty(exports, "pgSelectFromRecords", { enumerable: true, get: function () { return pgSelect_js_1.pgSelectFromRecords; } }); +Object.defineProperty(exports, "PgSelectRowsStep", { enumerable: true, get: function () { return pgSelect_js_1.PgSelectRowsStep; } }); +Object.defineProperty(exports, "PgSelectStep", { enumerable: true, get: function () { return pgSelect_js_1.PgSelectStep; } }); +Object.defineProperty(exports, "sqlFromArgDigests", { enumerable: true, get: function () { return pgSelect_js_1.sqlFromArgDigests; } }); +const pgSelectSingle_js_1 = require("./steps/pgSelectSingle.js"); +Object.defineProperty(exports, "pgSelectFromRecord", { enumerable: true, get: function () { return pgSelectSingle_js_1.pgSelectFromRecord; } }); +Object.defineProperty(exports, "pgSelectSingleFromRecord", { enumerable: true, get: function () { return pgSelectSingle_js_1.pgSelectSingleFromRecord; } }); +Object.defineProperty(exports, "PgSelectSingleStep", { enumerable: true, get: function () { return pgSelectSingle_js_1.PgSelectSingleStep; } }); +const pgSingleTablePolymorphic_js_1 = require("./steps/pgSingleTablePolymorphic.js"); +Object.defineProperty(exports, "pgSingleTablePolymorphic", { enumerable: true, get: function () { return pgSingleTablePolymorphic_js_1.pgSingleTablePolymorphic; } }); +Object.defineProperty(exports, "PgSingleTablePolymorphicStep", { enumerable: true, get: function () { return pgSingleTablePolymorphic_js_1.PgSingleTablePolymorphicStep; } }); +const pgTempTable_js_1 = require("./steps/pgTempTable.js"); +Object.defineProperty(exports, "PgTempTable", { enumerable: true, get: function () { return pgTempTable_js_1.PgTempTable; } }); +const pgUnionAll_js_1 = require("./steps/pgUnionAll.js"); +Object.defineProperty(exports, "pgUnionAll", { enumerable: true, get: function () { return pgUnionAll_js_1.pgUnionAll; } }); +Object.defineProperty(exports, "PgUnionAllRowsStep", { enumerable: true, get: function () { return pgUnionAll_js_1.PgUnionAllRowsStep; } }); +Object.defineProperty(exports, "PgUnionAllSingleStep", { enumerable: true, get: function () { return pgUnionAll_js_1.PgUnionAllSingleStep; } }); +Object.defineProperty(exports, "PgUnionAllStep", { enumerable: true, get: function () { return pgUnionAll_js_1.PgUnionAllStep; } }); +const pgUpdateSingle_js_1 = require("./steps/pgUpdateSingle.js"); +Object.defineProperty(exports, "pgUpdateSingle", { enumerable: true, get: function () { return pgUpdateSingle_js_1.pgUpdateSingle; } }); +Object.defineProperty(exports, "PgUpdateSingleStep", { enumerable: true, get: function () { return pgUpdateSingle_js_1.PgUpdateSingleStep; } }); +const pgValidateParsedCursor_js_1 = require("./steps/pgValidateParsedCursor.js"); +Object.defineProperty(exports, "pgValidateParsedCursor", { enumerable: true, get: function () { return pgValidateParsedCursor_js_1.pgValidateParsedCursor; } }); +Object.defineProperty(exports, "PgValidateParsedCursorStep", { enumerable: true, get: function () { return pgValidateParsedCursor_js_1.PgValidateParsedCursorStep; } }); +const toPg_js_1 = require("./steps/toPg.js"); +Object.defineProperty(exports, "toPg", { enumerable: true, get: function () { return toPg_js_1.toPg; } }); +Object.defineProperty(exports, "ToPgStep", { enumerable: true, get: function () { return toPg_js_1.ToPgStep; } }); +const withPgClient_js_1 = require("./steps/withPgClient.js"); +Object.defineProperty(exports, "withPgClient", { enumerable: true, get: function () { return withPgClient_js_1.withPgClient; } }); +Object.defineProperty(exports, "WithPgClientStep", { enumerable: true, get: function () { return withPgClient_js_1.WithPgClientStep; } }); +Object.defineProperty(exports, "withPgClientTransaction", { enumerable: true, get: function () { return withPgClient_js_1.withPgClientTransaction; } }); +const utils_js_1 = require("./utils.js"); +Object.defineProperty(exports, "assertPgClassSingleStep", { enumerable: true, get: function () { return utils_js_1.assertPgClassSingleStep; } }); +(0, grafast_1.exportAsMany)("@dataplan/pg", { + assertPgClassSingleStep: utils_js_1.assertPgClassSingleStep, + domainOfCodec: codecs_js_1.domainOfCodec, + getInnerCodec: codecs_js_1.getInnerCodec, + enumCodec: codecs_js_1.enumCodec, + getCodecByPgCatalogTypeName: codecs_js_1.getCodecByPgCatalogTypeName, + isEnumCodec: codecs_js_1.isEnumCodec, + listOfCodec: codecs_js_1.listOfCodec, + rangeOfCodec: codecs_js_1.rangeOfCodec, + recordCodec: codecs_js_1.recordCodec, + sqlValueWithCodec: codecs_js_1.sqlValueWithCodec, + makeRegistryBuilder: datasource_js_1.makeRegistryBuilder, + makeRegistry: datasource_js_1.makeRegistry, + makePgResourceOptions: datasource_js_1.makePgResourceOptions, + TYPES: codecs_js_1.TYPES, + PgResource: datasource_js_1.PgResource, + PgExecutor: executor_js_1.PgExecutor, + PgBooleanFilter: pgBooleanFilter_js_1.PgBooleanFilter, + PgClassFilter: pgClassFilter_js_1.PgClassFilter, + PgManyFilter: pgManyFilter_js_1.PgManyFilter, + PgOrFilter: pgOrFilter_js_1.PgOrFilter, + pgClassExpression: pgClassExpression_js_1.pgClassExpression, + PgClassExpressionStep: pgClassExpression_js_1.PgClassExpressionStep, + PgCondition: pgCondition_js_1.PgCondition, + pgWhereConditionSpecListToSQL: pgCondition_js_1.pgWhereConditionSpecListToSQL, + PgCursorStep: pgCursor_js_1.PgCursorStep, + pgDeleteSingle: pgDeleteSingle_js_1.pgDeleteSingle, + PgDeleteSingleStep: pgDeleteSingle_js_1.PgDeleteSingleStep, + pgInsertSingle: pgInsertSingle_js_1.pgInsertSingle, + PgInsertSingleStep: pgInsertSingle_js_1.PgInsertSingleStep, + pgPageInfo: pgPageInfo_js_1.pgPageInfo, + PgPageInfoStep: pgPageInfo_js_1.PgPageInfoStep, + pgPolymorphic: pgPolymorphic_js_1.pgPolymorphic, + PgPolymorphicStep: pgPolymorphic_js_1.PgPolymorphicStep, + pgSelect: pgSelect_js_1.pgSelect, + pgFromExpressionRuntime: pgSelect_js_1.pgFromExpressionRuntime, + pgFromExpression: pgSelect_js_1.pgFromExpression, + generatePgParameterAnalysis: pgSelect_js_1.generatePgParameterAnalysis, + pgSelectFromRecords: pgSelect_js_1.pgSelectFromRecords, + PgSelectStep: pgSelect_js_1.PgSelectStep, + PgSelectRowsStep: pgSelect_js_1.PgSelectRowsStep, + sqlFromArgDigests: pgSelect_js_1.sqlFromArgDigests, + pgSelectFromRecord: pgSelectSingle_js_1.pgSelectFromRecord, + pgSelectSingleFromRecord: pgSelectSingle_js_1.pgSelectSingleFromRecord, + PgSelectSingleStep: pgSelectSingle_js_1.PgSelectSingleStep, + pgSingleTablePolymorphic: pgSingleTablePolymorphic_js_1.pgSingleTablePolymorphic, + pgUnionAll: pgUnionAll_js_1.pgUnionAll, + PgUnionAllSingleStep: pgUnionAll_js_1.PgUnionAllSingleStep, + PgUnionAllRowsStep: pgUnionAll_js_1.PgUnionAllRowsStep, + PgUnionAllStep: pgUnionAll_js_1.PgUnionAllStep, + PgSingleTablePolymorphicStep: pgSingleTablePolymorphic_js_1.PgSingleTablePolymorphicStep, + pgUpdateSingle: pgUpdateSingle_js_1.pgUpdateSingle, + PgUpdateSingleStep: pgUpdateSingle_js_1.PgUpdateSingleStep, + pgValidateParsedCursor: pgValidateParsedCursor_js_1.pgValidateParsedCursor, + PgValidateParsedCursorStep: pgValidateParsedCursor_js_1.PgValidateParsedCursorStep, + PgTempTable: pgTempTable_js_1.PgTempTable, + toPg: toPg_js_1.toPg, + ToPgStep: toPg_js_1.ToPgStep, + withPgClient: withPgClient_js_1.withPgClient, + withPgClientTransaction: withPgClient_js_1.withPgClientTransaction, + WithPgClientStep: withPgClient_js_1.WithPgClientStep, + getWithPgClientFromPgService: pgServices_js_1.getWithPgClientFromPgService, + withPgClientFromPgService: pgServices_js_1.withPgClientFromPgService, + withSuperuserPgClientFromPgService: pgServices_js_1.withSuperuserPgClientFromPgService, + PgContextPlugin: PgContextPlugin_js_1.PgContextPlugin, +}); +var version_js_1 = require("./version.js"); +Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_js_1.version; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/index.js.map b/grafast/dataplan-pg/dist/index.js.map new file mode 100644 index 0000000000..2688d6dbe6 --- /dev/null +++ b/grafast/dataplan-pg/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,qCAAuC;AAEvC,2CAmBqB;AA+LnB,8F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CAAkB;IAClB,cAAc,EAAd,8BAAc;IACd,4BAA4B,EAA5B,0DAA4B;IAC5B,cAAc,EAAd,kCAAc;IACd,kBAAkB,EAAlB,sCAAkB;IAClB,sBAAsB,EAAtB,kDAAsB;IACtB,0BAA0B,EAA1B,sDAA0B;IAC1B,WAAW,EAAX,4BAAW;IACX,IAAI,EAAJ,cAAI;IACJ,QAAQ,EAAR,kBAAQ;IACR,YAAY,EAAZ,8BAAY;IACZ,uBAAuB,EAAvB,yCAAuB;IACvB,gBAAgB,EAAhB,kCAAgB;IAChB,4BAA4B,EAA5B,4CAA4B;IAC5B,yBAAyB,EAAzB,yCAAyB;IACzB,kCAAkC,EAAlC,kDAAkC;IAClC,eAAe,EAAf,oCAAe;CAChB,CAAC,CAAC;AAEH,2CAAuC;AAA9B,qGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/inspect.d.ts b/grafast/dataplan-pg/dist/inspect.d.ts new file mode 100644 index 0000000000..055d98ae5a --- /dev/null +++ b/grafast/dataplan-pg/dist/inspect.d.ts @@ -0,0 +1,10 @@ +export declare let inspect: { + (obj: any, options?: { + colors?: boolean; + depth?: number; + compact?: boolean | number; + breakLength?: number; + }): string; + custom: symbol; +}; +//# sourceMappingURL=inspect.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/inspect.d.ts.map b/grafast/dataplan-pg/dist/inspect.d.ts.map new file mode 100644 index 0000000000..390b857b51 --- /dev/null +++ b/grafast/dataplan-pg/dist/inspect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,OAAO,EAAE;IAClB,CACE,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GACA,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/inspect.js b/grafast/dataplan-pg/dist/inspect.js new file mode 100644 index 0000000000..35c376300a --- /dev/null +++ b/grafast/dataplan-pg/dist/inspect.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.inspect = void 0; +try { + exports.inspect = require("util").inspect; + if (typeof exports.inspect !== "function") { + throw new Error("Failed to load inspect"); + } +} +catch { + exports.inspect = Object.assign((obj) => { + return Array.isArray(obj) || + !obj || + Object.getPrototypeOf(obj) === null || + Object.getPrototypeOf(obj) === Object.prototype + ? String(JSON.stringify(obj)) + : String(obj); + }, { custom: Symbol.for("nodejs.util.inspect.custom") }); +} +//# sourceMappingURL=inspect.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/inspect.js.map b/grafast/dataplan-pg/dist/inspect.js.map new file mode 100644 index 0000000000..3c586db9d3 --- /dev/null +++ b/grafast/dataplan-pg/dist/inspect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":";;;AAaA,IAAI,CAAC;IACH,eAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;IAClC,IAAI,OAAO,eAAO,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC;AAAC,MAAM,CAAC;IACP,eAAO,GAAG,MAAM,CAAC,MAAM,CACrB,CAAC,GAAQ,EAAE,EAAE;QACX,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YACvB,CAAC,GAAG;YACJ,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,IAAI;YACnC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,SAAS;YAC/C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC7B,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,EACD,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,EAAE,CACrD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/interfaces.d.ts b/grafast/dataplan-pg/dist/interfaces.d.ts new file mode 100644 index 0000000000..1adeab6619 --- /dev/null +++ b/grafast/dataplan-pg/dist/interfaces.d.ts @@ -0,0 +1,405 @@ +import type { Modifier, Step } from "grafast"; +import type { PgSQL, SQL, SQLRawValue } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgCodecAttributes } from "./codecs.js"; +import type { PgCodecRefs, PgResource, PgResourceOptions, PgResourceParameter, PgResourceUnique } from "./datasource.js"; +import type { PgExecutor } from "./executor.js"; +import type { PgDeleteSingleStep } from "./steps/pgDeleteSingle.js"; +import type { PgInsertSingleStep } from "./steps/pgInsertSingle.js"; +import type { PgSelectQueryBuilder } from "./steps/pgSelect.js"; +import type { PgSelectSingleStep } from "./steps/pgSelectSingle.js"; +import type { PgUnionAllQueryBuilder } from "./steps/pgUnionAll.js"; +import type { PgUpdateSingleStep } from "./steps/pgUpdateSingle.js"; +/** + * A class-like source of information - could be from `SELECT`-ing a row, or + * `INSERT...RETURNING` or similar. *ALWAYS* represents a single row (or null). + */ +export type PgClassSingleStep = PgResource> = PgSelectSingleStep | PgInsertSingleStep | PgUpdateSingleStep | PgDeleteSingleStep; +/** + * Given a value of type TInput, returns an `SQL` value to insert into an SQL + * statement. + */ +export type PgEncode = (value: TInput) => SQLRawValue; +/** + * Given a text value from PostgreSQL, returns the value cast to TCanonical. + */ +export type PgDecode = (value: TFromPostgres) => TForJavaScript; +/** @deprecated Use DataplanPg.PgRefDefinitionExtensions instead */ +export type PgRefDefinitionExtensions = DataplanPg.PgRefDefinitionExtensions; +export interface PgRefDefinition { + graphqlType?: string; + sourceGraphqlType?: string; + singular?: boolean; + description?: string; + extensions?: DataplanPg.PgRefDefinitionExtensions; + singleRecordFieldName?: string; + listFieldName?: string; + connectionFieldName?: string; +} +export interface PgRefDefinitions { + [refName: string]: PgRefDefinition; +} +/** @deprecated Use DataplanPg.PgCodecExtensions instead */ +export type PgCodecExtensions = DataplanPg.PgCodecExtensions; +export interface PgCodecPolymorphismSingleTypeAttributeSpec { + attribute: TAttributeName; + isNotNull?: boolean; + rename?: string; +} +export interface PgCodecPolymorphismSingleTypeSpec { + /** The name of the polymorphic subentry of the parent single table polymorphic codec */ + name: string; + /** The attributes that are specific to this concrete type (including any modifiers); empty array is valid */ + attributes: Array>; +} +export interface PgCodecPolymorphismSingle { + mode: "single"; + /** The list of attributes that is used to determine which polymorphic type the record is. Currently this should always have length 1. */ + typeAttributes: readonly TAttributeName[]; + /** These attributes are shared by every concrete type of this codec; empty array is valid */ + commonAttributes: readonly TAttributeName[]; + /** Details the concrete types from this polymorphic single table, including what to call it, and what columns it has. */ + types: { + [typeKey: string]: PgCodecPolymorphismSingleTypeSpec; + }; +} +export interface PgCodecPolymorphismRelationalTypeSpec { + name: string; + /** The name of the database table this type relates to (useful before the relations are established) */ + references: string; + /** The name of the relation to follow to get the related record */ + relationName: string; +} +export interface PgCodecPolymorphismRelational { + mode: "relational"; + typeAttributes: readonly TAttributeName[]; + types: { + [typeKey: string]: PgCodecPolymorphismRelationalTypeSpec; + }; +} +export interface PgCodecPolymorphismUnion { + mode: "union"; +} +export type PgCodecPolymorphism = PgCodecPolymorphismSingle | PgCodecPolymorphismRelational | PgCodecPolymorphismUnion; +/** + * A codec for a Postgres type, tells us how to convert to-and-from Postgres + * (including changes to the SQL statement itself). Also includes metadata + * about the type, for example any of the attributes it has. + */ +export interface PgCodec | undefined = PgCodec | undefined, TDomainItemCodec extends PgCodec | undefined = PgCodec | undefined, TRangeItemCodec extends PgCodec | undefined = PgCodec | undefined> { + /** + * Unique name to identify this codec. + */ + name: TName; + /** + * Given a value of type TFromJavaScript, returns an `SQL` value to insert into an SQL + * statement. + * + * **IMPORTANT**: nulls must already be handled! + */ + toPg: PgEncode; + /** + * Given a text value from PostgreSQL, returns the value cast to TCanonical. + * + * **IMPORTANT**: nulls must already be handled! + */ + fromPg: PgDecode; + /** + * We'll append `::text` by default to each selection; however if this type + * needs something special (e.g. `money` should be converted to `numeric` + * before being converted to `text`) then you can provide this custom + * callback to provide your own casting - this could even include function + * calls if you want. + */ + castFromPg?: (fragment: SQL, guaranteedNotNull?: boolean) => SQL; + /** + * If you provide `castFromPg` you probably ought to also specify + * `listCastFromPg` so that a list of this type can be converted properly. + */ + listCastFromPg?: (fragment: SQL, guaranteedNotNull?: boolean) => SQL; + /** + * When we have an expression of this type, we can safely cast it within + * Postgres using the cast `(${expression})::${sqlType}` to make the type + * explicit. + */ + sqlType: SQL; + /** + * If true, this is an anonymous type (e.g. the return type of a + * `returns record` or `returns table` PostgreSQL function) and thus should + * not be referenced via `sqlType` directly. + */ + isAnonymous?: boolean; + /** + * True if this type is a binary type (e.g. bytea) + */ + isBinary?: boolean; + /** + * If this is a composite type, the attributes it supports. + */ + attributes: TAttributes; + /** + * A callback to return `'true'` (text string) if the composite type + * represented by this codec is non-null, and `null` or `'false'` otherwise. + * + * If this codec represents a composite type (e.g. a row or other type with + * multiple attributes) and this type can be returned from a function then + * there's a risk that the function may return null/an all-nulls composite + * type. This can occur with `returns some_composite_type` or + * `returns setof some_composite_type`, though the former is more common as + * you explicitly need to return nulls in the latter. + * + * We can't simply do `not (foo is null)` because you might be using + * column-level select grants which would prevent this happening. As such we + * give you a chance to provide your own non-null check. In most table cases + * you can use `(${alias}.id is not null)::text` (assuming 'id' is the name + * of your primary key); for composite types you can normally do + * `(not (${alias} is null))::text`. + */ + notNullExpression?: (alias: SQL) => SQL; + /** + * If set, this represents a PostgreSQL array type. Please note: array types + * should NOT be nested. + */ + arrayOfCodec?: TArrayItemCodec; + /** + * The underlying codec that this type is a domain over. + */ + domainOfCodec?: TDomainItemCodec; + /** + * If this is a domain, does it add a non-null constraint? + */ + notNull?: boolean; + /** + * The underlying codec that this type is a range over. + */ + rangeOfCodec?: TRangeItemCodec; + polymorphism?: PgCodecPolymorphism; + description?: string; + /** + * Arbitrary metadata + */ + extensions?: Partial; + /** + * Relations to follow for shortcut references, can be polymorphic, can be + * many-to-many. + */ + refs?: PgCodecRefs; + /** + * If this codec came from a specific database, we should list the executor + * here. If the codec is used with multiple databases, leave this null, but + * note that if it has attributes then it will not be able to be used as the + * type of an attribute itself. + */ + executor: PgExecutor | null; +} +export type PgCodecWithAttributes = PgCodec; +export type PgCodecAnyScalar = PgCodec; +export type PgCodecList = PgCodec> = PgCodec; +export type PgEnumValue = { + value: TValue; + description?: string; +}; +/** + * A PgCodec specifically for enums + */ +export interface PgEnumCodec extends PgCodec { + values: PgEnumValue[]; +} +/** + * A PgTypedStep has a 'pgCodec' property which means we don't need + * to also state the pgCodec to use, this can be an added convenience. + */ +export interface PgTypedStep extends Step { + pgCodec: TCodec; +} +type PgOrderCommonSpec = { + readonly direction: "ASC" | "DESC"; + /** `NULLS FIRST` or `NULLS LAST` or nothing */ + readonly nulls?: "FIRST" | "LAST" | null; +}; +export type PgOrderFragmentSpec = { + /** The expression we're ordering by. */ + readonly fragment: SQL; + /** The codec of the expression that we're ordering by, this is useful when constructing a cursor for it. */ + readonly codec: PgCodec; + readonly attribute?: never; + readonly callback?: never; + readonly nullable?: boolean; +} & PgOrderCommonSpec; +export type PgOrderAttributeSpec = { + /** The attribute you're using for ordering */ + readonly attribute: string; + /** An optional expression to wrap this attribute with, and the type that expression returns */ + readonly callback?: (attributeExpression: SQL, attributeCodec: PgCodec, nullable: boolean) => [fragment: SQL, codec: PgCodec, nullable?: boolean]; + readonly fragment?: never; + readonly codec?: never; + readonly nullable?: boolean; +} & PgOrderCommonSpec; +/** + * The information required to specify an entry in an 'ORDER BY' clause. + */ +export type PgOrderSpec = PgOrderFragmentSpec | PgOrderAttributeSpec; +/** + * The information required to specify an entry in a `GROUP BY` clause. + */ +export interface PgGroupSpec { + fragment: SQL; + codec: PgCodec; + guaranteedNotNull?: boolean; +} +export type TuplePlanMap> = { + [Index in keyof TTuple]: { + [key in keyof TAttributes as Exclude]?: Step>; + } & { + [key in TTuple[number]]: Step>; + }; +}; +/** + * Represents a spec like `{user_id: Step}` or + * `{organization_id: Step, item_id: Step}`. The keys in + * the spec can be any of the attributes in TAttributes, however there must be at + * least one of the unique sets of attributes represented (as specified in + * TUniqueAttributes) - you can then add arbitrary additional attributes if you need + * to. + */ +export type PlanByUniques>> = TAttributes extends PgCodecAttributes ? TuplePlanMap[number] : undefined; +export type PgConditionLike = Modifier & { + alias: SQL; + where(condition: SQL): void; + having(condition: SQL): void; +}; +export type KeysOfType = { + [key in keyof TObject]: TObject[key] extends TValueType ? key : never; +}[keyof TObject]; +export interface MakePgServiceOptions extends Partial> { + connectionString?: string; + schemas?: string | string[]; + superuserConnectionString?: string; + pubsub?: boolean; +} +/** @deprecated Use DataplanPg.PgCodecRelationExtensions instead */ +export type PgCodecRelationExtensions = DataplanPg.PgCodecRelationExtensions; +export interface PgCodecRelationBase { + /** Where the relationship starts */ + localCodec: TLocalCodec; + /** If localCodec is polymorphic, which of the concrete subtypes should this relationship apply to? */ + localCodecPolymorphicTypes?: string[]; + /** + * The attributes locally used in this relationship. + */ + localAttributes: readonly (keyof TLocalCodec["attributes"] & string)[]; + /** + * The remote attributes that are joined against. + */ + remoteAttributes: readonly TRemoteAttributes[]; + /** + * If true then there's at most one record this relationship will find. + */ + isUnique: boolean; + /** + * If true then this is a reverse lookup (where our local attributes are + * referenced by the remote tables remote attributes, rather than the other way + * around), so multiple rows may be found (unless isUnique is true). + */ + isReferencee?: boolean; + /** + * Space for you to add your own metadata. + */ + extensions?: PgCodecRelationExtensions; + description?: string; +} +export interface PgCodecRelationConfig> extends PgCodecRelationBase, any, any> ? keyof UAttributes : never> { + remoteResourceOptions: TRemoteResourceOptions; +} +/** + * Describes a relation from a codec to a resource + */ +export interface PgCodecRelation = PgResource> extends PgCodecRelationBase, any, any, any> ? keyof UAttributes : never> { + /** + * The remote resource this relation relates to. + */ + remoteResource: TRemoteResource; +} +export interface PgRegistryConfig; +}, TResourceOptions extends { + [name in string]: PgResourceOptions>>, readonly PgResourceParameter[] | undefined>; +}, TRelations extends { + [codecName in keyof TCodecs]?: { + [relationName in string]: PgCodecRelationConfig, PgResourceOptions>; + }; +}, TExecutors extends { + [executorName in string]: PgExecutor; +} = { + [executorName: string]: PgExecutor; +}> { + pgExecutors: TExecutors; + pgCodecs: TCodecs; + pgResources: TResourceOptions; + pgRelations: TRelations; +} +export type Expand = T extends unknown ? { + [TKey in keyof T]: T[TKey]; +} : never; +export interface PgRegistry; +} = Record>, TResourceOptions extends { + [name in string]: PgResourceOptions>, readonly PgResourceParameter[] | undefined>; +} = Record>, readonly PgResourceParameter[] | undefined>>, TRelations extends { + [codecName in keyof TCodecs]?: { + [relationName in string]: PgCodecRelationConfig, PgResourceOptions>; + }; +} = Record, PgResourceOptions>>>, TExecutors extends { + [executorName in string]: PgExecutor; +} = { + [executorName: string]: PgExecutor; +}> { + pgExecutors: TExecutors; + pgCodecs: TCodecs; + pgResources: { + [name in keyof TResourceOptions]: TResourceOptions[name] extends PgResourceOptions ? PgResource> : never; + }; + pgRelations: { + [codecName in keyof TRelations]: { + [relationName in keyof TRelations[codecName]]: Expand & { + remoteResource: TRelations[codecName][relationName] extends { + remoteResourceOptions: PgResourceOptions; + } ? PgResource> : never; + }>; + }; + }; +} +export type GetPgRegistryCodecs> = TRegistry["pgCodecs"]; +export type GetPgRegistrySources> = TRegistry["pgResources"]; +export type GetPgRegistryCodecRelations, TCodec extends PgCodec> = TRegistry["pgRelations"][TCodec["name"]]; +export type GetPgCodecAttributes> = TCodec extends PgCodec ? UAttributes extends undefined ? never : UAttributes : PgCodecAttributes; +export type GetPgResourceRegistry> = TResource["registry"]; +export type GetPgResourceCodec> = TResource["codec"]; +export type GetPgResourceAttributes> = GetPgCodecAttributes; +export type GetPgResourceRelations> = TResource["registry"]["pgRelations"][TResource["codec"]["name"]]; +export type GetPgResourceUniques> = TResource["uniques"]; +export type PgSQLCallback = (sql: PgSQL>) => TResult; +export type PgSQLCallbackOrDirect = PgSQLCallback | TResult; +export interface PgQueryBuilder { + /** The alias of the current table */ + alias: SQL; + [$$toSQL](): SQL; + setMeta(key: string, value: unknown): void; + getMetaRaw(key: string): unknown; +} +export type PgSelectQueryBuilderCallback = (qb: PgSelectQueryBuilder) => void; +export type PgUnionAllQueryBuilderCallback = (qb: PgUnionAllQueryBuilder) => void; +export type ReadonlyArrayOrDirect = T | ReadonlyArray; +export type ObjectForResource> = { + [key in keyof GetPgResourceAttributes & string]?: any; +}; +export interface PgQueryRootStep extends Step { + getPgRoot(): PgQueryRootStep; + placeholder($step: PgTypedStep): SQL; + placeholder($step: Step, codec: PgCodec, alreadyEncoded?: boolean): SQL; + deferredSQL($step: Step): SQL; +} +export {}; +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/interfaces.d.ts.map b/grafast/dataplan-pg/dist/interfaces.d.ts.map new file mode 100644 index 0000000000..bff2f534d6 --- /dev/null +++ b/grafast/dataplan-pg/dist/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,iBAAiB,EACj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AM,qBAAqB,CAAC,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAE9E,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC;IACjB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,4BAA4B,GAAG,CAAC,EAAE,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAC9E,MAAM,MAAM,8BAA8B,GAAG,CAC3C,EAAE,EAAE,sBAAsB,KACvB,IAAI,CAAC;AACV,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAE5D,MAAM,MAAM,iBAAiB,CAC3B,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IACrE;KACD,GAAG,IAAI,MAAM,uBAAuB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,GAAG;CACjE,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,IAAI;IAC3C,SAAS,IAAI,eAAe,CAAC;IAC7B,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;IAC9C,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IACxE,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACpC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/interfaces.js b/grafast/dataplan-pg/dist/interfaces.js new file mode 100644 index 0000000000..88e4ecea05 --- /dev/null +++ b/grafast/dataplan-pg/dist/interfaces.js @@ -0,0 +1,4 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const pg_sql2_1 = require("pg-sql2"); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/interfaces.js.map b/grafast/dataplan-pg/dist/interfaces.js.map new file mode 100644 index 0000000000..4fc226a83b --- /dev/null +++ b/grafast/dataplan-pg/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;AAEA,qCAAkC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/parseArray.d.ts b/grafast/dataplan-pg/dist/parseArray.d.ts new file mode 100644 index 0000000000..43ae5d1400 --- /dev/null +++ b/grafast/dataplan-pg/dist/parseArray.d.ts @@ -0,0 +1,11 @@ +type Transform = (val: string) => T; +/** + * Parses an array according to + * https://www.postgresql.org/docs/17/arrays.html#ARRAYS-IO + * + * Trusts the data (mostly), so only hook up to trusted Postgres servers. + */ +export declare function makeParseArrayWithTransform(transform?: Transform): (str: string) => readonly T[]; +export declare const parseArray: (str: string) => readonly string[]; +export {}; +//# sourceMappingURL=parseArray.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/parseArray.d.ts.map b/grafast/dataplan-pg/dist/parseArray.d.ts.map new file mode 100644 index 0000000000..4275d6d68e --- /dev/null +++ b/grafast/dataplan-pg/dist/parseArray.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parseArray.d.ts","sourceRoot":"","sources":["../src/parseArray.ts"],"names":[],"mappings":"AAaA,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,GAAG,MAAM,EACpD,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,GACvB,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAAC,EAAE,CAgG/B;AAED,eAAO,MAAM,UAAU,QAlGd,MAAM,sBAkGwC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/parseArray.js b/grafast/dataplan-pg/dist/parseArray.js new file mode 100644 index 0000000000..aa15d61459 --- /dev/null +++ b/grafast/dataplan-pg/dist/parseArray.js @@ -0,0 +1,114 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseArray = void 0; +exports.makeParseArrayWithTransform = makeParseArrayWithTransform; +const BACKSLASH = "\\"; +const DQUOT = '"'; +const LBRACE = "{"; +const RBRACE = "}"; +const LBRACKET = "["; +const EQUALS = "="; +const COMMA = ","; +/** When the raw value is this, it means a literal `null` */ +const NULL_STRING = "NULL"; +const EMPTY_ARRAY = Object.freeze([]); +/** + * Parses an array according to + * https://www.postgresql.org/docs/17/arrays.html#ARRAYS-IO + * + * Trusts the data (mostly), so only hook up to trusted Postgres servers. + */ +function makeParseArrayWithTransform(transform) { + const haveTransform = transform != null; + return function parseArray(str) { + const rbraceIndex = str.length - 1; + if (rbraceIndex === 1) { + return EMPTY_ARRAY; + } + if (str[rbraceIndex] !== RBRACE) { + throw new Error("Invalid array text - must end with }"); + } + // If starts with `[`, it is specifying the index boundas. Skip past first `=`. + let position = 0; + if (str[position] === LBRACKET) { + position = str.indexOf(EQUALS) + 1; + } + if (str[position++] !== LBRACE) { + throw new Error("Invalid array text - must start with {"); + } + const output = []; + let current = output; + const stack = []; + let currentStringStart = position; + // Allocate on first assignment + let currentString = ""; + let expectValue = true; + for (; position < rbraceIndex; ++position) { + let char = str[position]; + // > The array output routine will put double quotes around element values if + // > they are empty strings, contain curly braces, delimiter characters, double + // > quotes, backslashes, or white space, or match the word NULL. Double quotes + // > and backslashes embedded in element values will be backslash-escaped. + if (char === DQUOT) { + // It's escaped + currentStringStart = ++position; + let dquot = str.indexOf(DQUOT, currentStringStart); + let backSlash = str.indexOf(BACKSLASH, currentStringStart); + while (backSlash !== -1 && backSlash < dquot) { + position = backSlash; + const part = str.slice(currentStringStart, position); + currentString += part; + currentStringStart = ++position; + if (dquot === position++) { + // This was an escaped doublequote; find the next one! + dquot = str.indexOf(DQUOT, position); + } + // Either way, find the next backslash + backSlash = str.indexOf(BACKSLASH, position); + } + position = dquot; + const part = str.slice(currentStringStart, position); + currentString += part; + current.push(haveTransform ? transform(currentString) : currentString); + currentString = ""; + expectValue = false; + } + else if (char === LBRACE) { + const newArray = []; + current.push(newArray); + stack.push(current); + current = newArray; + currentStringStart = position + 1; + expectValue = true; + } + else if (char === COMMA) { + expectValue = true; + } + else if (char === RBRACE) { + expectValue = false; + const arr = stack.pop(); + if (arr === undefined) { + throw new Error("Invalid array text - too many '}'"); + } + current = arr; + } + else if (expectValue) { + currentStringStart = position; + while ((char = str[position]) !== COMMA && + char !== RBRACE && + position < rbraceIndex) { + ++position; + } + const part = str.slice(currentStringStart, position--); + current.push(part === NULL_STRING ? null : haveTransform ? transform(part) : part); + expectValue = false; + } + else { + throw new Error("Was expecting delimeter"); + } + } + return output; + }; +} +exports.parseArray = makeParseArrayWithTransform(); +//# sourceMappingURL=parseArray.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/parseArray.js.map b/grafast/dataplan-pg/dist/parseArray.js.map new file mode 100644 index 0000000000..52d73915f7 --- /dev/null +++ b/grafast/dataplan-pg/dist/parseArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parseArray.js","sourceRoot":"","sources":["../src/parseArray.ts"],"names":[],"mappings":";;;AAqBA,kEAkGC;AAvHD,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,MAAM,KAAK,GAAG,GAAG,CAAC;AAClB,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,KAAK,GAAG,GAAG,CAAC;AAElB,4DAA4D;AAC5D,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ChB,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,UAAU,GAAG,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgLocker.d.ts b/grafast/dataplan-pg/dist/pgLocker.d.ts new file mode 100644 index 0000000000..368034927d --- /dev/null +++ b/grafast/dataplan-pg/dist/pgLocker.d.ts @@ -0,0 +1,48 @@ +import type { PgStmtBaseStep } from "./steps/pgStmt"; +export type PgLockableParameter = "orderBy" | "first" | "last" | "offset" | "groupBy"; +export type PgLockCallback> = (step: TStep) => void; +export declare class PgLocker> { + private parent; + /** + * Determines if the PgSelectStep is "locked" - i.e. its + * FROM,JOINs,WHERE,ORDER BY,LIMIT,OFFSET cannot be changed. Note this does + * not prevent adding more SELECTs + */ + locked: boolean; + constructor(parent: TStep); + private _beforeLock; + private _afterLock; + private _lockedParameter; + /** + * Performs the given call back just before the given PgLockableParameter is + * locked. + * + * @remarks To make sure we do things in the right order (e.g. ensure all the + * `order by` values are established before attempting to interpret a + * `cursor` for `before`/`after`) we need a locking system. This locking + * system allows for final actions to take place _just before_ the element is + * locked, for example _just before_ the order is locked we might want to + * check that the ordering is unique, and if it is not then we may want to + * add the primary key to the ordering. + */ + beforeLock(type: PgLockableParameter, callback: PgLockCallback): void; + /** + * Performs the given call back just after the given PgLockableParameter is + * locked. + */ + afterLock(type: PgLockableParameter, callback: PgLockCallback): void; + private lockCallbacks; + /** + * Calls all the beforeLock actions for the given parameter and then locks + * it. + */ + lockParameter(type: PgLockableParameter): void; + /** + * Throw a helpful error if you're trying to modify something that's already + * locked. + */ + assertParameterUnlocked(type: PgLockableParameter): void; + lockAllParameters(): void; + lock(): void; +} +//# sourceMappingURL=pgLocker.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgLocker.d.ts.map b/grafast/dataplan-pg/dist/pgLocker.d.ts.map new file mode 100644 index 0000000000..1cc3c24723 --- /dev/null +++ b/grafast/dataplan-pg/dist/pgLocker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgLocker.d.ts","sourceRoot":"","sources":["../src/pgLocker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,GACR,SAAS,CAAC;AACd,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,cAAc,CAAC,GAAG,CAAC,IAAI,CAC9D,IAAI,EAAE,KAAK,KACR,IAAI,CAAC;AAEV,qBAAa,QAAQ,CAAC,KAAK,SAAS,cAAc,CAAC,GAAG,CAAC;IAQzC,OAAO,CAAC,MAAM;IAP1B;;;;OAIG;IACI,MAAM,UAAS;gBAEF,MAAM,EAAE,KAAK;IAEjC,OAAO,CAAC,WAAW,CAQjB;IAEF,OAAO,CAAC,UAAU,CAQhB;IAEF,OAAO,CAAC,gBAAgB,CAQtB;IAEF;;;;;;;;;;;OAWG;IACI,UAAU,CACf,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,GAC9B,IAAI;IAKP;;;OAGG;IACI,SAAS,CACd,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,GAC9B,IAAI;IAKP,OAAO,CAAC,aAAa;IAoBrB;;;OAGG;IACI,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAWrD;;;OAGG;IACI,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAcxD,iBAAiB;IAqBjB,IAAI,IAAI,IAAI;CAIpB"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgLocker.js b/grafast/dataplan-pg/dist/pgLocker.js new file mode 100644 index 0000000000..b051c5e4eb --- /dev/null +++ b/grafast/dataplan-pg/dist/pgLocker.js @@ -0,0 +1,129 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgLocker = void 0; +const grafast_1 = require("grafast"); +class PgLocker { + constructor(parent) { + this.parent = parent; + /** + * Determines if the PgSelectStep is "locked" - i.e. its + * FROM,JOINs,WHERE,ORDER BY,LIMIT,OFFSET cannot be changed. Note this does + * not prevent adding more SELECTs + */ + this.locked = false; + this._beforeLock = { + orderBy: [], + groupBy: [], + first: [], + last: [], + offset: [], + }; + this._afterLock = { + orderBy: [], + groupBy: [], + first: [], + last: [], + offset: [], + }; + this._lockedParameter = { + orderBy: false, + groupBy: false, + first: false, + last: false, + offset: false, + }; + } + /** + * Performs the given call back just before the given PgLockableParameter is + * locked. + * + * @remarks To make sure we do things in the right order (e.g. ensure all the + * `order by` values are established before attempting to interpret a + * `cursor` for `before`/`after`) we need a locking system. This locking + * system allows for final actions to take place _just before_ the element is + * locked, for example _just before_ the order is locked we might want to + * check that the ordering is unique, and if it is not then we may want to + * add the primary key to the ordering. + */ + beforeLock(type, callback) { + this.assertParameterUnlocked(type); + this._beforeLock[type].push(callback); + } + /** + * Performs the given call back just after the given PgLockableParameter is + * locked. + */ + afterLock(type, callback) { + this.assertParameterUnlocked(type); + this._afterLock[type].push(callback); + } + lockCallbacks(phase, type) { + const list = phase === "beforeLock" ? this._beforeLock : this._afterLock; + const callbacks = list[type]; + const l = callbacks.length; + if (l > 0) { + const toCall = callbacks.splice(0, l); + for (let i = 0; i < l; i++) { + toCall[i](this.parent); + } + if (callbacks.length > 0) { + throw new Error(`beforeLock callback for '${type}' caused more beforeLock callbacks to be registered`); + } + } + } + /** + * Calls all the beforeLock actions for the given parameter and then locks + * it. + */ + lockParameter(type) { + if (this._lockedParameter[type] !== false) { + return; + } + this.lockCallbacks("beforeLock", type); + this._lockedParameter[type] = grafast_1.isDev + ? new Error("Initially locked here").stack + : true; + this.lockCallbacks("afterLock", type); + } + /** + * Throw a helpful error if you're trying to modify something that's already + * locked. + */ + assertParameterUnlocked(type) { + const isLocked = this._lockedParameter[type]; + if (isLocked !== false) { + if (typeof isLocked === "string") { + throw new Error(`'${type}' has already been locked\n ` + + isLocked.replace(/\n/g, "\n ") + + "\n"); + } + throw new Error(`'${type}' has already been locked`); + } + } + lockAllParameters() { + // // We must execute everything after `from` so we have the alias to reference + // this.lockParameter("from"); + // this.lockParameter("join"); + this.lockParameter("groupBy"); + this.lockParameter("orderBy"); + // // We must execute where after orderBy because cursor queries require all orderBy attributes + // this.lockParameter("cursorComparator"); + // this.lockParameter("whereBound"); + // this.lockParameter("where"); + // // 'where' -> 'whereBound' can affect 'offset'/'limit' + // this.lockParameter("offset"); + // this.lockParameter("limit"); + // this.lockParameter("first"); + // this.lockParameter("last"); + // // We must execute select after orderBy otherwise we cannot generate a cursor + // this.lockParameter("fixedSelectExpression"); + // this.lockParameter("selectCursor"); + // this.lockParameter("select"); + } + lock() { + this.lockAllParameters(); + this.locked = true; + } +} +exports.PgLocker = PgLocker; +//# sourceMappingURL=pgLocker.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgLocker.js.map b/grafast/dataplan-pg/dist/pgLocker.js.map new file mode 100644 index 0000000000..b31e8c2f4c --- /dev/null +++ b/grafast/dataplan-pg/dist/pgLocker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgLocker.js","sourceRoot":"","sources":["../src/pgLocker.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAchC,MAAa,QAAQ;IAQnB,YAAoB,MAAa;QAAb,WAAM,GAAN,MAAM,CAAO;QAPjC;;;;WAIG;QACI,WAAM,GAAG,KAAK,CAAC;QAId,gBAAW,GAEf;YACF,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;SACX,CAAC;QAEM,eAAU,GAEd;YACF,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;SACX,CAAC;QAEM,qBAAgB,GAEpB;YACF,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,IAAI;QACT,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;CACF;AAtJD,4BAsJC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgServices.d.ts b/grafast/dataplan-pg/dist/pgServices.d.ts new file mode 100644 index 0000000000..43304b9e15 --- /dev/null +++ b/grafast/dataplan-pg/dist/pgServices.d.ts @@ -0,0 +1,20 @@ +import type { PgClient, WithPgClient } from "./executor.js"; +type PromiseOrDirect = T | PromiseLike; +/** @experimental */ +export interface PgAdaptor { + createWithPgClient: (adaptorSettings: GraphileConfig.PgAdaptors[TAdaptor]["adaptorSettings"], variant?: "SUPERUSER" | string | null) => PromiseOrDirect>; + makePgService: (options: GraphileConfig.PgAdaptors[TAdaptor]["makePgServiceOptions"]) => GraphileConfig.PgServiceConfiguration; +} +/** + * Is "thenable". + */ +export declare function isPromiseLike(t: T | Promise | PromiseLike): t is PromiseLike; +/** + * Get or build the 'withPgClient' callback function for a given database + * config, caching it to make future lookups faster. + */ +export declare function getWithPgClientFromPgService(config: GraphileConfig.PgServiceConfiguration): PromiseOrDirect>; +export declare function withPgClientFromPgService(config: GraphileConfig.PgServiceConfiguration, pgSettings: Record | null, callback: (client: PgClient) => T | Promise): Promise; +export declare function withSuperuserPgClientFromPgService(config: GraphileConfig.PgServiceConfiguration, pgSettings: Record | null, callback: (client: PgClient) => T | Promise): Promise; +export {}; +//# sourceMappingURL=pgServices.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgServices.d.ts.map b/grafast/dataplan-pg/dist/pgServices.d.ts.map new file mode 100644 index 0000000000..f4fd9a8526 --- /dev/null +++ b/grafast/dataplan-pg/dist/pgServices.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgServices.d.ts","sourceRoot":"","sources":["../src/pgServices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAA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AAC,MAAM,EAAE,QAAQ,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAUZ;AAGD,wBAAsB,kCAAkC,CAAC,CAAC,EACxD,MAAM,EAAE,cAAc,CAAC,sBAAsB,EAC7C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,IAAI,EACrD,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAUZ"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgServices.js b/grafast/dataplan-pg/dist/pgServices.js new file mode 100644 index 0000000000..853281eb00 --- /dev/null +++ b/grafast/dataplan-pg/dist/pgServices.js @@ -0,0 +1,94 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPromiseLike = isPromiseLike; +exports.getWithPgClientFromPgService = getWithPgClientFromPgService; +exports.withPgClientFromPgService = withPgClientFromPgService; +exports.withSuperuserPgClientFromPgService = withSuperuserPgClientFromPgService; +/** + * Is "thenable". + */ +function isPromiseLike(t) { + return t != null && typeof t.then === "function"; +} +const isTest = process.env.NODE_ENV === "test"; +const withPgClientDetailsByConfigCache = new Map(); +/** + * Get or build the 'withPgClient' callback function for a given database + * config, caching it to make future lookups faster. + */ +function getWithPgClientFromPgService(config) { + const existing = withPgClientDetailsByConfigCache.get(config); + if (existing) { + if (isPromiseLike(existing)) { + return existing.then((v) => { + v.retainers++; + return v.withPgClient; + }); + } + else { + existing.retainers++; + return existing.withPgClient; + } + } + else { + const promise = (async () => { + const factory = config.adaptor?.createWithPgClient; + if (typeof factory !== "function") { + throw new Error(`'${config.adaptor}' does not look like a withPgClient adaptor - please ensure it exports a method called 'createWithPgClient'`); + } + const originalWithPgClient = await factory(config.adaptorSettings); + const withPgClient = ((...args) => originalWithPgClient.apply(null, args)); + const cachedValue = { + withPgClient, + retainers: 1, + }; + let released = false; + withPgClient.release = () => { + cachedValue.retainers--; + // To allow for other promises to resolve and add/remove from the retaininers, check after a tick + setTimeout(() => { + if (cachedValue.retainers === 0 && !released) { + released = true; + withPgClientDetailsByConfigCache.delete(config); + return originalWithPgClient.release?.(); + } + // TODO: this used to be zero, but that seems really inefficient... + // Figure out why I did that? + // }, 0); + }, isTest ? 500 : 5000); + }; + withPgClientDetailsByConfigCache.set(config, cachedValue); + return cachedValue; + })(); + if (!withPgClientDetailsByConfigCache.has(config)) { + withPgClientDetailsByConfigCache.set(config, promise); + } + promise.catch(() => { + withPgClientDetailsByConfigCache.delete(config); + }); + return promise.then((v) => v.withPgClient); + } +} +async function withPgClientFromPgService(config, pgSettings, callback) { + const withPgClientFromPgService = getWithPgClientFromPgService(config); + const withPgClient = isPromiseLike(withPgClientFromPgService) + ? await withPgClientFromPgService + : withPgClientFromPgService; + try { + return await withPgClient(pgSettings, callback); + } + finally { + withPgClient.release(); + } +} +// We don't cache superuser withPgClients +async function withSuperuserPgClientFromPgService(config, pgSettings, callback) { + const withPgClient = await config.adaptor.createWithPgClient(config.adaptorSettings, "SUPERUSER"); + try { + return await withPgClient(pgSettings, callback); + } + finally { + withPgClient.release?.(); + } +} +//# sourceMappingURL=pgServices.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/pgServices.js.map b/grafast/dataplan-pg/dist/pgServices.js.map new file mode 100644 index 0000000000..568aa57983 --- /dev/null +++ b/grafast/dataplan-pg/dist/pgServices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgServices.js","sourceRoot":"","sources":["../src/pgServices.ts"],"names":[],"mappings":";;AAuBA,sCAIC;AAkBD,oEAkEC;AAED,8DAcC;AAGD,gFAcC;AA5HD;;GAEG;AACH,SAAgB,aAAa,CAC3B,CAAkC;IAElC,OAAO,CAAC,IAAI,IAAI,IAAI,OAAQ,CAAS,CAAC,IAAI,KAAK,UAAU,CAAC;AAC5D,CAAC;AAED,MAAM,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AAE,QAAQ,CAAC,CAAC;IAClD,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAQ,EAAE,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,yCAAyC;AAClC,KAAK,UAAU,kCAAkC,CACtD,MAA6C,EAC7C,UAAqD,EACrD,QAA8C;IAE9C,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAC1D,MAAM,CAAC,eAAe,EACtB,WAAW,CACZ,CAAC;IACF,IAAI,CAAC;QACH,OAAO,MAAM,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/plugins/PgContextPlugin.d.ts b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.d.ts new file mode 100644 index 0000000000..57bb5aeb65 --- /dev/null +++ b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.d.ts @@ -0,0 +1,10 @@ +export declare const EMPTY_OBJECT: Record; +declare global { + namespace GraphileConfig { + interface Plugins { + PgContextPlugin: true; + } + } +} +export declare const PgContextPlugin: GraphileConfig.Plugin; +//# sourceMappingURL=PgContextPlugin.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/plugins/PgContextPlugin.d.ts.map b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.d.ts.map new file mode 100644 index 0000000000..a1da3ec746 --- /dev/null +++ b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PgContextPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/PgContextPlugin.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAE9C,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,OAAO;YACf,eAAe,EAAE,IAAI,CAAC;SACvB;KACF;CACF;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,MAmE5C,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/plugins/PgContextPlugin.js b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.js new file mode 100644 index 0000000000..ecb253e5a9 --- /dev/null +++ b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgContextPlugin = exports.EMPTY_OBJECT = void 0; +const pgServices_js_1 = require("../pgServices.js"); +const version_js_1 = require("../version.js"); +exports.EMPTY_OBJECT = Object.freeze(Object.create(null)); +exports.PgContextPlugin = { + name: "PgContextPlugin", + description: "Extends the runtime GraphQL context with details needed to support your configured pgServices", + version: version_js_1.version, + grafast: { + middleware: { + prepareArgs(next, { args }) { + if (!args.contextValue) { + args.contextValue = Object.create(null); + } + const { resolvedPreset: config, requestContext: ctx } = args; + const contextValue = args.contextValue; + if (config?.pgServices) { + for (const pgService of config.pgServices) { + const { pgSettings, pgSettingsKey, withPgClientKey, pgSubscriberKey, pgSubscriber, } = pgService; + if (pgSettings && pgSettingsKey == null) { + throw new Error(`pgService '${pgService.name}' specifies pgSettings, but has no pgSettingsKey.`); + } + if (pgSubscriber && pgSubscriberKey == null) { + throw new Error(`pgService '${pgService.name}' specifies pgSubscriber, but has no pgSubscriberKey.`); + } + if (pgSettingsKey != null) { + if (pgSettingsKey in contextValue) { + throw new Error(`Key '${pgSettingsKey}' already set on the context; refusing to overwrite - please check your configuration.`); + } + contextValue[pgSettingsKey] = + typeof pgSettings === "function" + ? pgSettings(ctx ?? exports.EMPTY_OBJECT) + : (pgSettings ?? undefined); + } + if (pgSubscriberKey != null) { + if (pgSubscriberKey in contextValue) { + throw new Error(`Key '${pgSubscriberKey}' already set on the context; refusing to overwrite - please check your configuration.`); + } + contextValue[pgSubscriberKey] = pgSubscriber; + } + if (withPgClientKey in contextValue) { + throw new Error(`Key '${withPgClientKey}' already set on the context; refusing to overwrite - please check your configuration.`); + } + contextValue[withPgClientKey] = pgServices_js_1.withPgClientFromPgService.bind(null, pgService); + } + } + return next(); + }, + }, + }, +}; +//# sourceMappingURL=PgContextPlugin.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/plugins/PgContextPlugin.js.map b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.js.map new file mode 100644 index 0000000000..1ead282d68 --- /dev/null +++ b/grafast/dataplan-pg/dist/plugins/PgContextPlugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PgContextPlugin.js","sourceRoot":"","sources":["../../src/plugins/PgContextPlugin.ts"],"names":[],"mappings":";;;AAGA,oDAA6D;AAC7D,8CAAwC;AAE3B,QAAA,YAAY,GAA0B,MAAM,CAAC,MAAM,CAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CACpB,CAAC;AAUW,QAAA,eAAe,GAA0B;IACpD,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,+FAA+F;IACjG,OAAO,EAAE,oBAAO;IAEhB,OAAO,EAAE;QACP,UAAU,EAAE;YACV,WAAW,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;gBACxB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;oBACvB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC1C,CAAC;gBACD,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;gBAC7D,MAAM,YAAY,GAAG,IAAI,CAAC,YAAmC,CAAC;gBAC9D,IAAI,MAAM,EAAE,UAAU,EAAE,CAAC;oBACvB,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;wBAC1C,MAAM,EACJ,UAAU,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,GACb,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d.ts b/grafast/dataplan-pg/dist/steps/pgClassExpression.d.ts new file mode 100644 index 0000000000..1d792fe780 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgClassExpression.d.ts @@ -0,0 +1,49 @@ +import type { AccessStep, UnbatchedExecutionExtra } from "grafast"; +import { UnbatchedStep } from "grafast"; +import type { SQL } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgResource } from "../datasource.js"; +import type { GetPgCodecAttributes, PgClassSingleStep, PgCodec, PgTypedStep } from "../interfaces.js"; +import { PgUnionAllSingleStep } from "./pgUnionAll.js"; +/** + * A plan for selecting a attribute or attribute-like expression. Keep in mind that + * a attribute might not be a scalar (could be a list, compound type, JSON, + * geometry, etc), so this might not be a "leaf". The result of this might be used as the input + * of another layer of plan. + */ +export declare class PgClassExpressionStep> extends UnbatchedStep implements PgTypedStep { + readonly pgCodec: TExpressionCodec; + private guaranteedNotNull?; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * This is the numeric index of this expression within the grandparent + * PgSelectStep's selection. + */ + private attrIndex; + readonly expression: SQL; + private needsPolymorphicUnwrap; + private needsTupleAccess; + constructor($table: PgClassSingleStep | PgUnionAllSingleStep, pgCodec: TExpressionCodec, strings: TemplateStringsArray, dependencies?: ReadonlyArray | SQL>, guaranteedNotNull?: boolean | undefined); + toStringMeta(): string; + get>(attributeName: TAttr): PgClassExpressionStep[TAttr]["codec"], TResource>; + private _getInternal; + getParentStep(): PgClassSingleStep | PgUnionAllSingleStep; + getMeta(key: string): AccessStep; + optimize(): this; + unbatchedExecute(_extra: UnbatchedExecutionExtra, v: any): any; + deduplicate(peers: Array>): PgClassExpressionStep[]; + [$$toSQL](): SQL; + toSQL(): SQL; +} +/** + * This higher order function takes a table and codec as input and returns a + * tagged template literal function that you can use to build an SQL expression + * that will be selected. + */ +declare function pgClassExpression>(table: PgClassSingleStep | PgUnionAllSingleStep, codec: TExpressionCodec, guaranteedNotNull?: boolean): (strings: TemplateStringsArray, ...dependencies: ReadonlyArray | SQL>) => PgClassExpressionStep; +export { pgClassExpression }; +//# sourceMappingURL=pgClassExpression.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgClassExpression.d.ts.map b/grafast/dataplan-pg/dist/steps/pgClassExpression.d.ts.map new file mode 100644 index 0000000000..a99e5d52fa --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgClassExpression.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgClassExpression.d.ts","sourceRoot":"","sources":["../../src/steps/pgClassExpression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAAoB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACnC,OAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAQvD;;;;;GAKG;AACH,qBAAa,qBAAqB,CAC9B,gBAAgB,SAAS,OAAO,EAChC,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAEvD,SAAQ,aAAa,CAAC,GAAG,CACzB,YAAW,WAAW,CAAC,gBAAgB,CAAC;aA8BtB,OAAO,EAAE,gBAAgB;IAGzC,OAAO,CAAC,iBAAiB,CAAC;IA/B5B,MAAM,CAAC,QAAQ;;;MAGb;IAEF,aAAa,UAAQ;IAUrB;;;OAGG;IACH,OAAO,CAAC,SAAS,CAAuB;IAExC,SAAgB,UAAU,EAAE,GAAG,CAAC;IAEhC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,EAAE,oBAAoB,EAC7B,GAAG,YAAY,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KACnD,qBAAqB,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAUtD;AAID,OAAO,EAAE,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgClassExpression.js b/grafast/dataplan-pg/dist/steps/pgClassExpression.js new file mode 100644 index 0000000000..c4e284372f --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgClassExpression.js @@ -0,0 +1,212 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgClassExpressionStep = void 0; +exports.pgClassExpression = pgClassExpression; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importStar(require("pg-sql2")); +const pgDeleteSingle_js_1 = require("./pgDeleteSingle.js"); +const pgInsertSingle_js_1 = require("./pgInsertSingle.js"); +const pgSelectSingle_js_1 = require("./pgSelectSingle.js"); +const pgUnionAll_js_1 = require("./pgUnionAll.js"); +const pgUpdateSingle_js_1 = require("./pgUpdateSingle.js"); +// const debugPlan = debugFactory("@dataplan/pg:PgClassExpressionStep:plan"); +// const debugExecute = debugFactory( "@dataplan/pg:PgClassExpressionStep:execute",); +// const debugPlanVerbose = debugPlan.extend("verbose"); +// const debugExecuteVerbose = debugExecute.extend("verbose"); +/** + * A plan for selecting a attribute or attribute-like expression. Keep in mind that + * a attribute might not be a scalar (could be a list, compound type, JSON, + * geometry, etc), so this might not be a "leaf". The result of this might be used as the input + * of another layer of plan. + */ +class PgClassExpressionStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgClassExpressionStep", + }; } + constructor($table, pgCodec, strings, dependencies = [], guaranteedNotNull) { + super(); + this.pgCodec = pgCodec; + this.guaranteedNotNull = guaranteedNotNull; + this.isSyncAndSafe = true; + /** + * This is the numeric index of this expression within the grandparent + * PgSelectStep's selection. + */ + this.attrIndex = null; + this.needsPolymorphicUnwrap = + $table instanceof pgUnionAll_js_1.PgUnionAllSingleStep && + $table.getClassStep().mode === "normal"; + this.needsTupleAccess = + $table instanceof pgInsertSingle_js_1.PgInsertSingleStep || + $table instanceof pgUpdateSingle_js_1.PgUpdateSingleStep || + $table instanceof pgDeleteSingle_js_1.PgDeleteSingleStep; + const $row = this.needsTupleAccess ? (0, grafast_1.access)($table, "t") : $table; + this.rowDependencyId = this.addDependency($row); + if (strings.length !== dependencies.length + 1) { + throw new Error(`Invalid call to PgClassExpressionStep; should have exactly one more string (found ${strings.length}) than dependency (found ${dependencies.length}). Recommend using the tagged template literal helper pgClassExpression.`); + } + const badStringIndex = strings.findIndex((s) => typeof s !== "string"); + if (badStringIndex >= 0) { + throw new Error(`Received a non-string at index ${badStringIndex} to strings argument of ${this}.`); + } + const fragments = dependencies.map((stepOrSql, i) => { + if (!stepOrSql) { + throw new Error(`Invalid stepOrSql at index ${i}`); + } + if (pg_sql2_1.default.isSQL(stepOrSql)) { + return stepOrSql; + } + else if (stepOrSql instanceof PgClassExpressionStep && + stepOrSql.getParentStep() === $table) { + // TODO: when we defer placeholders until finalize we'll need to copy + // deps/etc + return stepOrSql.expression; + } + else if ($table instanceof pgSelectSingle_js_1.PgSelectSingleStep) { + // TODO: when we defer placeholders until finalize we'll need to store + // deps/etc + const placeholder = $table.placeholder(stepOrSql); + return placeholder; + } + else { + throw new Error(`Cannot use placeholders when parent plan is ${$table}`); + } + }); + // We're pretending we called `sql` directly by passing the template + // strings array. + this.expression = (0, pg_sql2_1.default)(strings, ...fragments); + } + toStringMeta() { + if (!this.expression) { + return "???"; + } + const expr = pg_sql2_1.default.compile(this.expression); + if (expr.text.length > 23) { + return (expr.text.slice(0, 10) + "..." + expr.text.slice(expr.text.length - 10)); + } + else { + return expr.text; + } + } + /* Here's the proper type of this function, but that makes using it painful. + ```ts + public get< + TAttr extends TExpressionCodec extends PgCodec< + any, + undefined, + infer U, + any, + any, + any, + any + > + ? keyof U + : keyof GetPgCodecAttributes, + >( + attributeName: TAttr, + ): TExpressionCodec extends PgCodec< + any, + undefined, + infer U, + any, + any, + any, + any + > + ? AccessStep + : PgClassExpressionStep< + GetPgCodecAttributes[TAttr]["codec"], + TResource + > { + ``` + + Instead, we'll lie and ignore the `AccessStep` case + */ + get(attributeName) { + return this.cacheStep("get", attributeName, () => this._getInternal(attributeName)); + } + _getInternal(attributeName) { + const attributes = this.pgCodec.attributes; + if (attributes === undefined) { + // Fall back to access, since this could be a 'point' or similar type that doesn't have attributes in Postgres but does in JS. + return (0, grafast_1.access)(this, attributeName); + } + const attribute = attributes[attributeName]; + if (!attribute) { + throw new Error(`Cannot call ${this}.get('${String(attributeName)}') because this does not have that attribute; supported attributes: '${Object.keys(attributes).join("', '")}'.`); + } + if (attribute.via) { + throw new Error(`Cannot call ${this}.get('${String(attributeName)}') because 'via' is not yet supported here - please raise an issue (or, even better, a pull request!).`); + } + if (attribute.expression) { + throw new Error(`Cannot call ${this}.get('${String(attributeName)}') because 'expression' is not yet supported here - please raise an issue (or, even better, a pull request!).`); + } + const sqlExpr = pgClassExpression(this.getParentStep(), attribute.codec, attribute.notNull); + return sqlExpr `${pg_sql2_1.default.parens(this.expression, true)}.${pg_sql2_1.default.identifier(attributeName)}`; + } + getParentStep() { + const $row = this.getDep(this.rowDependencyId); + const step = this.needsTupleAccess + ? $row.getParentStep() + : $row; + if (!(step instanceof pgSelectSingle_js_1.PgSelectSingleStep) && + !(step instanceof pgInsertSingle_js_1.PgInsertSingleStep) && + !(step instanceof pgUpdateSingle_js_1.PgUpdateSingleStep) && + !(step instanceof pgDeleteSingle_js_1.PgDeleteSingleStep) && + !(step instanceof pgUnionAll_js_1.PgUnionAllSingleStep)) { + throw new Error(`Expected ${step} to be a PgSelectSingleStep | PgInsertSingleStep | PgUpdateSingleStep | PgDeleteSingleStep | PgUnionAllSingleStep`); + } + return step; + } + getMeta(key) { + return this.getParentStep().getMeta(key); + } + optimize() { + this.attrIndex = this.getParentStep().selectAndReturnIndex(this.pgCodec.castFromPg + ? this.pgCodec.castFromPg(this.expression, this.guaranteedNotNull) + : (0, pg_sql2_1.default) `${pg_sql2_1.default.parens(this.expression)}::text`); + return this; + } + unbatchedExecute(_extra, v) { + if (v == null) { + return null; + } + const rawValue = v[this.attrIndex]; + if (rawValue == null) { + return null; + } + else { + return this.pgCodec.fromPg(rawValue); + } + } + deduplicate(peers) { + const parentPlan = this.getParentStep(); + const classPlan = parentPlan instanceof pgSelectSingle_js_1.PgSelectSingleStep + ? parentPlan.getClassStep() + : null; + const symbolSubstitutes = classPlan?._symbolSubstitutes; + const options = symbolSubstitutes ? { symbolSubstitutes } : undefined; + return peers.filter((p) => pg_sql2_1.default.isEquivalent(this.expression, p.expression, options)); + } + [pg_sql2_1.$$toSQL]() { + return this.expression; + } + toSQL() { + return this.expression; + } +} +exports.PgClassExpressionStep = PgClassExpressionStep; +/** + * This higher order function takes a table and codec as input and returns a + * tagged template literal function that you can use to build an SQL expression + * that will be selected. + */ +function pgClassExpression(table, codec, guaranteedNotNull) { + return (strings, ...dependencies) => { + return new PgClassExpressionStep(table, codec, strings, dependencies, codec.notNull || guaranteedNotNull); + }; +} +(0, grafast_1.exportAs)("@dataplan/pg", pgClassExpression, "pgClassExpression"); +//# sourceMappingURL=pgClassExpression.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgClassExpression.js.map b/grafast/dataplan-pg/dist/steps/pgClassExpression.js.map new file mode 100644 index 0000000000..76e9a35a08 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgClassExpression.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgClassExpression.js","sourceRoot":"","sources":["../../src/steps/pgClassExpression.ts"],"names":[],"mappings":";;;AAmUS,8CAAiB;;AAlU1B,qCAA0D;AAE1D,2DAAuC;AASvC,2DAAyD;AACzD,2DAAyD;AACzD,2DAAyD;AACzD,mDAAuD;AACvD,2DAAyD;AAEzD,6EAA6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AAY,EAAE,EAAE;QAClC,OAAO,IAAI,qBAAqB,CAC9B,KAAK,EACL,KAAK,EACL,OAAO,EACP,YAAY,EACZ,KAAK,CAAC,OAAO,IAAI,iBAAiB,CACnC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,IAAA,kBAAQ,EAAC,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCondition.d.ts b/grafast/dataplan-pg/dist/steps/pgCondition.d.ts new file mode 100644 index 0000000000..ed42379ba3 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCondition.d.ts @@ -0,0 +1,57 @@ +import { Modifier } from "grafast"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +export type PgWhereConditionSpec = SQL | PgWhereConditionAttributeSpec; +export interface PgWhereConditionAttributeSpec { + type: "attribute"; + attribute: TAttribute; + callback: (fragment: SQL) => SQL; +} +export type PgHavingConditionSpec<_TAttribute extends string> = SQL; +export interface PgConditionCapableParent { + alias: SQL; + where(condition: PgWhereConditionSpec): void; + having?(condition: PgHavingConditionSpec): void; +} +type PgConditionModeExists = { + mode: "EXISTS"; + tableExpression: SQL; + alias?: string; + equals?: boolean; +}; +export type PgConditionResolvedMode = { + mode: "PASS_THRU"; +} | { + mode: "AND"; +} | { + mode: "OR"; +} | { + mode: "NOT"; +} | PgConditionModeExists; +export type PgConditionMode = "PASS_THRU" | "AND" | "OR" | "NOT" | PgConditionResolvedMode; +export declare class PgCondition extends Modifier implements PgConditionCapableParent, SQLable { + private isHaving; + static $$export: { + moduleName: string; + exportName: string; + }; + private conditions; + private havingConditions; + readonly alias: SQL; + extensions: DataplanPg.PgConditionExtensions; + readonly resolvedMode: PgConditionResolvedMode; + constructor(parent: TParent, isHaving?: boolean, mode?: PgConditionMode); + toStringMeta(): string; + orPlan(): PgCondition; + andPlan(): PgCondition; + notPlan(): PgCondition; + existsPlan(options: Omit): PgCondition; + where(condition: PgWhereConditionSpec): void; + having(condition: PgHavingConditionSpec): void; + private transform; + apply(): void; + [$$toSQL](): SQL; +} +export declare function pgWhereConditionSpecListToSQL(alias: SQL, conditions: PgWhereConditionSpec[], andOr?: "and" | "or", transform?: (frag: SQL) => SQL): SQL | null; +export {}; +//# sourceMappingURL=pgCondition.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCondition.d.ts.map b/grafast/dataplan-pg/dist/steps/pgCondition.d.ts.map new file mode 100644 index 0000000000..f998e72752 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCondition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgCondition.d.ts","sourceRoot":"","sources":["../../src/steps/pgCondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAO,MAAM,SAAS,CAAC;AAEvC,MAAM,MAAM,oBAAoB,CAAC,UAAU,SAAS,MAAM,IACtD,GAAG,GACH,6BAA6B,CAAC,UAAU,CAAC,CAAC;AAE9C,MAAM,WAAW,6BAA6B,CAAC,UAAU,SAAS,MAAM;IACtE,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,GAAG,CAAC;CAClC;AAED,MAAM,MAAM,qBAAqB,CAAC,WAAW,SAAS,MAAM,IAAI,GAAG,CAAC;AAGpE,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,SAAS,EAAE,oBAAoB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAClD,MAAM,CAAC,CAAC,SAAS,EAAE,qBAAqB,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACtD;AAED,KAAK,qBAAqB,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bb,CAAC,OAAO,CAAC;CAGV;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,oBAAoB,CAAC,GAAG,CAAC,EAAE,EACvC,KAAK,GAAE,KAAK,GAAG,IAAY,EAC3B,SAAS,GAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAoB,GAC7C,GAAG,GAAG,IAAI,CA8BZ"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCondition.js b/grafast/dataplan-pg/dist/steps/pgCondition.js new file mode 100644 index 0000000000..5140e9fb03 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCondition.js @@ -0,0 +1,175 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgCondition = void 0; +exports.pgWhereConditionSpecListToSQL = pgWhereConditionSpecListToSQL; +const grafast_1 = require("grafast"); +const pg_sql2_1 = require("pg-sql2"); +class PgCondition extends grafast_1.Modifier { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgCondition", + }; } + constructor(parent, isHaving = false, mode = "PASS_THRU") { + super(parent); + this.isHaving = isHaving; + this.conditions = []; + this.havingConditions = []; + this.extensions = Object.create(null); + if (typeof mode === "string") { + this.resolvedMode = { mode }; + } + else { + this.resolvedMode = mode; + } + switch (this.resolvedMode.mode) { + case "PASS_THRU": + case "AND": + case "OR": + case "NOT": { + this.alias = parent.alias; + break; + } + case "EXISTS": { + this.alias = pg_sql2_1.sql.identifier(Symbol(this.resolvedMode.alias ?? "exists")); + break; + } + } + } + toStringMeta() { + return `${this.parent.id}/${this.resolvedMode.mode}`; + } + orPlan() { + return new PgCondition(this, this.isHaving, "OR"); + } + andPlan() { + return new PgCondition(this, this.isHaving, "AND"); + } + notPlan() { + return new PgCondition(this, this.isHaving, "NOT"); + } + existsPlan(options) { + if (this.isHaving) { + // Is this true? + throw new Error(`EXISTS inside having is currently unsupported`); + } + return new PgCondition(this, this.isHaving, { + ...options, + mode: "EXISTS", + }); + } + where(condition) { + if (this.isHaving) { + throw new Error(`Cannot call .where() on a 'having' condition`); + } + this.conditions.push(condition); + } + having(condition) { + if (!this.isHaving) { + throw new Error(`cannot call .having() on a 'where' condition`); + } + this.havingConditions.push(condition); + } + transform(conditions) { + const sqlCondition = pgWhereConditionSpecListToSQL(this.alias, conditions, this.resolvedMode.mode === "OR" ? "or" : "and", this.resolvedMode.mode === "NOT" + ? (frag) => pg_sql2_1.sql.parens((0, pg_sql2_1.sql) `not ${pg_sql2_1.sql.parens(frag)}`) + : (frag) => frag); + if (sqlCondition === null) { + return null; + } + switch (this.resolvedMode.mode) { + case "PASS_THRU": { + throw new Error("Should never reach here"); + } + case "AND": + case "OR": + case "NOT": { + return sqlCondition; + } + case "EXISTS": { + const sqlExists = (0, pg_sql2_1.sql) `exists(${pg_sql2_1.sql.indent `\ +select 1 +from ${this.resolvedMode.tableExpression} as ${this.alias} +where ${sqlCondition}`})`; + if (this.resolvedMode.equals != null) { + return (0, pg_sql2_1.sql) `${sqlExists} = ${this.resolvedMode.equals ? pg_sql2_1.sql.true : pg_sql2_1.sql.false}`; + } + else { + // Assume true + return sqlExists; + } + } + default: { + const never = this.resolvedMode; + throw new Error(`Unhandled mode: ${never.mode}`); + } + } + } + apply() { + if (this.isHaving) { + if (!this.parent.having) { + throw new Error(`${this.parent} doesn't support 'having'`); + } + if (this.resolvedMode.mode === "PASS_THRU") { + this.havingConditions.forEach((condition) => { + this.parent.having(condition); + }); + } + else { + const frag = this.transform(this.havingConditions); + if (frag) { + this.parent.having(frag); + } + } + } + else { + if (this.resolvedMode.mode === "PASS_THRU") { + this.conditions.forEach((condition) => { + this.parent.where(condition); + }); + } + else { + const frag = this.transform(this.conditions); + if (frag) { + this.parent.where(frag); + } + } + } + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgCondition = PgCondition; +function pgWhereConditionSpecListToSQL(alias, conditions, andOr = "and", transform = (frag) => frag) { + const mappedConditions = []; + for (const c of conditions) { + if (pg_sql2_1.sql.isSQL(c)) { + if (pg_sql2_1.sql.isEquivalent(c, pg_sql2_1.sql.blank)) { + continue; + } + const frag = pg_sql2_1.sql.parens(c); + mappedConditions.push(pg_sql2_1.sql.indent(transform(frag))); + continue; + } + else { + switch (c.type) { + case "attribute": { + const frag = c.callback((0, pg_sql2_1.sql) `${alias}.${pg_sql2_1.sql.identifier(c.attribute)}`); + mappedConditions.push(pg_sql2_1.sql.indent(transform(frag))); + continue; + } + default: { + const never = c.type; + throw new Error(`Unsupported condition: ` + never); + } + } + } + } + if (mappedConditions.length === 0) { + return null; + } + const joined = pg_sql2_1.sql.join(mappedConditions, `\n${andOr}\n`); + const sqlCondition = pg_sql2_1.sql.parens(joined); + return sqlCondition; +} +//# sourceMappingURL=pgCondition.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCondition.js.map b/grafast/dataplan-pg/dist/steps/pgCondition.js.map new file mode 100644 index 0000000000..943ca898c6 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCondition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgCondition.js","sourceRoot":"","sources":["../../src/steps/pgCondition.ts"],"names":[],"mappings":";;;AAgNA,sEAmCC;AAnPD,qCAAmC;AAEnC,qCAAuC;AA0CvC,MAAa,WAGX,SAAQ,kBAAiB;aAGlB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,aAAa;KAC1B,AAHc,CAGb;IAUF,YACE,MAAe,EACP,WAAW,KAAK,EACxB,OAAwB,WAAW;QAEnC,KAAK,CAAC,MAAM,CAAC,CAAC;QAHN,aAAQ,GAAR,QAAQ,CAAQ;QAVlB,eAAU,GAAgC,EAAE,CAAC;QAC7C,qBAAgB,GAAiC,EAAE,CAAC;QAIrD,eAAU,GAAqC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QASxE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,CAAC,YAAY,GA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IAAI,CAAC,CAAC,CAAC,CAAC;YACnD,SAAS;QACX,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;gBACf,KAAK,WAAW,CAAC,CAAC,CAAC;oBACjB,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAA,aAAG,EAAA,GAAG,KAAK,IAAI,aAAG,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;oBACtE,gBAAgB,CAAC,IAAI,CAAC,aAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACnD,SAAS;gBACX,CAAC;gBACD,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,KAAK,GAAU,CAAC,CAAC,IAAI,CAAC;oBAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAI,KAAa,CAAC,CAAC;gBAC9D,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,aAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,aAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,YAAY,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCursor.d.ts b/grafast/dataplan-pg/dist/steps/pgCursor.d.ts new file mode 100644 index 0000000000..87a02d194f --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCursor.d.ts @@ -0,0 +1,29 @@ +import type { ExecutableStep, UnbatchedExecutionExtra } from "grafast"; +import { UnbatchedStep } from "grafast"; +import type { PgCodec } from "../index.js"; +import type { PgSelectSingleStep } from "./pgSelectSingle.js"; +import type { PgUnionAllSingleStep } from "./pgUnionAll.js"; +export interface PgCursorDetails { + readonly digest: string; + readonly indicies: ReadonlyArray<{ + index: number; + codec: PgCodec; + }>; +} +/** + * Given a PgSelectSingleStep, this will build a cursor by looking at all the + * orders applied and then fetching them and building a cursor string from + * them. + */ +export declare class PgCursorStep | PgUnionAllSingleStep> extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + itemDepId: number; + cursorDetailsDepId: number; + constructor($item: TStep, $cursorDetails: ExecutableStep); + unbatchedExecute(_extra: UnbatchedExecutionExtra, itemTuple: any[] | null, cursorDetails: PgCursorDetails | null): string | null; +} +//# sourceMappingURL=pgCursor.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCursor.d.ts.map b/grafast/dataplan-pg/dist/steps/pgCursor.d.ts.map new file mode 100644 index 0000000000..0469898983 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCursor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgCursor.d.ts","sourceRoot":"","sources":["../../src/steps/pgCursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;QAC/B,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,OAAO,CAAC;KAChB,CAAC,CAAC;CACJ;AAED;;;;GAIG;AACH,qBAAa,YAAY,CACvB,KAAK,SAAS,kBAAkB,CAAC,GAAG,CAAC,GAAG,oBAAoB,CAC5D,SAAQ,aAAa,CAAC,GAAG,CAAC;IAC1B,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IAErB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;gBAGzB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,CAAC,eAAe,GAAG,IAAI,CAAC;IAOxD,gBAAgB,CACd,MAAM,EAAE,uBAAuB,EAC/B,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EACvB,aAAa,EAAE,eAAe,GAAG,IAAI,GACpC,MAAM,GAAG,IAAI;CAgBjB"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCursor.js b/grafast/dataplan-pg/dist/steps/pgCursor.js new file mode 100644 index 0000000000..383b1b1cea --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCursor.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgCursorStep = void 0; +const grafast_1 = require("grafast"); +/** + * Given a PgSelectSingleStep, this will build a cursor by looking at all the + * orders applied and then fetching them and building a cursor string from + * them. + */ +class PgCursorStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgCursorStep", + }; } + constructor($item, $cursorDetails) { + super(); + this.isSyncAndSafe = true; + this.itemDepId = this.addDependency($item); + this.cursorDetailsDepId = this.addDependency($cursorDetails); + } + unbatchedExecute(_extra, itemTuple, cursorDetails) { + if (itemTuple == null || cursorDetails == null) + return null; + const { digest, indicies } = cursorDetails; + const cursorTuple = [digest]; + let hasNonNull = false; + for (let i = 0, l = indicies.length; i < l; i++) { + const { index, codec } = indicies[i]; + const orderVal = itemTuple[index]; + if (!hasNonNull && orderVal != null) { + hasNonNull = true; + } + cursorTuple.push(codec.fromPg(orderVal)); + } + if (!hasNonNull) + return null; + return Buffer.from(JSON.stringify(cursorTuple), "utf8").toString("base64"); + } +} +exports.PgCursorStep = PgCursorStep; +//# sourceMappingURL=pgCursor.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgCursor.js.map b/grafast/dataplan-pg/dist/steps/pgCursor.js.map new file mode 100644 index 0000000000..516f065aea --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgCursor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgCursor.js","sourceRoot":"","sources":["../../src/steps/pgCursor.ts"],"names":[],"mappings":";;;AACA,qCAAwC;AAcxC;;;;GAIG;AACH,MAAa,YAEX,SAAQ,uBAAkB;aACnB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,cAAc;KAC3B,AAHc,CAGb;IAMF,YACE,KAAY,EACZ,cAAsD;QAEtD,KAAK,EAAE,CAAC;QATV,kBAAa,GAAG,IAAI,CAAC;QAUnB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,gBAAgB,CACd,MAA+B,EAC/B,SAAuB,EACvB,aAAqC;QAErC,IAAI,SAAS,IAAI,IAAI,IAAI,aAAa,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC5D,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC;QAC3C,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC;QAC7B,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;YAClC,IAAI,CAAC,UAAU,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;gBACpC,UAAU,GAAG,IAAI,CAAC;YACpB,CAAC;YACD,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7E,CAAC;;AAxCH,oCAyCC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgDeleteSingle.d.ts b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.d.ts new file mode 100644 index 0000000000..c0ec93170a --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.d.ts @@ -0,0 +1,83 @@ +import type { ExecutionDetails, GrafastResultsList, Maybe } from "grafast"; +import { Step } from "grafast"; +import type { SQL } from "pg-sql2"; +import type { PgCodecWithAttributes, PgResource } from "../index.js"; +import type { GetPgResourceAttributes, GetPgResourceCodec, GetPgResourceUniques, PgQueryBuilder, PlanByUniques, ReadonlyArrayOrDirect } from "../interfaces.js"; +import type { PgClassExpressionStep } from "./pgClassExpression.js"; +/** + * Deletes a row in the database, can return columns from the deleted row. + */ +export declare class PgDeleteSingleStep = PgResource> extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * Tells us what we're dealing with - data type, columns, where to delete it + * from, what it's called, etc. + */ + readonly resource: TResource; + /** + * This defaults to the name of the resource but you can override it. Aids + * in debugging. + */ + private readonly name; + /** + * To be used as the table alias, we always use a symbol unless the calling + * code specifically indicates a string to use. + */ + private readonly symbol; + /** = sql.identifier(this.symbol) */ + readonly alias: SQL; + /** + * The attributes and their dependency ids for us to find the record by. + */ + private getBys; + /** + * The id for the PostgreSQL context plan. + */ + private contextId; + /** + * When locked, no more selects can be added + */ + private locked; + /** + * The list of things we're selecting. + */ + private selects; + private applyDepIds; + constructor(resource: TResource, getBy: PlanByUniques, GetPgResourceUniques>); + toStringMeta(): string | null; + /** + * Returns a plan representing a named attribute (e.g. column) from the newly + * deleteed row. + */ + get>(attr: TAttr): PgClassExpressionStep[TAttr]["codec"], TResource>; + getMeta(key: string): import("grafast").AccessStep; + record(): PgClassExpressionStep, TResource>; + apply($step: Step>>): void; + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + execute({ indexMap, values, }: ExecutionDetails): Promise>; + finalize(): void; +} +/** + * Delete a row in `resource` identified by the `getBy` unique condition. + */ +export declare function pgDeleteSingle>(resource: TResource, getBy: PlanByUniques, GetPgResourceUniques>): PgDeleteSingleStep; +export interface PgDeleteSingleQueryBuilder<_TResource extends PgResource = PgResource> extends PgQueryBuilder { +} +type PgDeleteSingleQueryBuilderCallback = (qb: PgDeleteSingleQueryBuilder) => void; +export {}; +//# sourceMappingURL=pgDeleteSingle.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgDeleteSingle.d.ts.map b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.d.ts.map new file mode 100644 index 0000000000..c024da67b6 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgDeleteSingle.d.ts","sourceRoot":"","sources":["../../src/steps/pgDeleteSingle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EAEN,MAAM,SAAS,CAAC;AACjB,OAAO,EAAsC,IAAI,EAAE,MAAM,SAAS,CA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GACV,qBAAqB,CACtB,uBAAuB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAClD,SAAS,CACV;IAqCM,OAAO,CAAC,GAAG,EAAE,MAAM;IAInB,MAAM,IAAI,qBAAqB,CACpC,kBAAkB,CAAC,SAAS,CAAC,EAC7B,SAAS,CACV;IA8BD,KAAK,CACH,KAAK,EAAE,IAAI,CACT,qBAAqB,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,CACjE;IAKH;;;;;;;;;;;OAWG;IACG,OAAO,CAAC,EACZ,QAAQ,EACR,MAAM,GACP,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAmE/C,QAAQ,IAAI,IAAI;CAgFxB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAEhD,QAAQ,EAAE,SAAS,EACnB,KAAK,EAAE,aAAa,CAClB,uBAAuB,CAAC,SAAS,CAAC,EAClC,oBAAoB,CAAC,SAAS,CAAC,CAChC,GACA,kBAAkB,CAAC,SAAS,CAAC,CAE/B;AAGD,MAAM,WAAW,0BAA0B,CACzC,UAAU,SAAS,UAAU,CAC3B,GAAG,EACH,qBAAqB,EACrB,GAAG,EACH,GAAG,EACH,GAAG,CACJ,GAAG,UAAU,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CACzD,SAAQ,cAAc;CAAG;AAE3B,KAAK,kCAAkC,GAAG,CACxC,EAAE,EAAE,0BAA0B,KAC3B,IAAI,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgDeleteSingle.js b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.js new file mode 100644 index 0000000000..0975c21c08 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.js @@ -0,0 +1,263 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgDeleteSingleStep = void 0; +exports.pgDeleteSingle = pgDeleteSingle; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importStar(require("pg-sql2")); +const inspect_js_1 = require("../inspect.js"); +const pgClassExpression_js_1 = require("./pgClassExpression.js"); +/** + * Deletes a row in the database, can return columns from the deleted row. + */ +class PgDeleteSingleStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgDeleteSingleStep", + }; } + constructor(resource, getBy) { + super(); + this.isSyncAndSafe = false; + /** + * The attributes and their dependency ids for us to find the record by. + */ + this.getBys = []; + /** + * When locked, no more selects can be added + */ + this.locked = false; + /** + * When finalized, we build the SQL query, queryValues, and note where to feed in + * the relevant queryValues. This saves repeating this work at execution time. + * + * @internal + */ + this.finalizeResults = null; + /** + * The list of things we're selecting. + */ + this.selects = []; + this.applyDepIds = []; + this.hasSideEffects = true; + this.resource = resource; + this.name = resource.name; + this.symbol = Symbol(this.name); + this.alias = pg_sql2_1.default.identifier(this.symbol); + this.contextId = this.addDependency(this.resource.executor.context()); + const keys = getBy + ? Object.keys(getBy) + : []; + if (!this.resource.uniques.some((uniq) => uniq.attributes.every((key) => keys.includes(key)))) { + throw new Error(`Attempted to build 'PgDeleteSingleStep' with a non-unique getBy keys ('${keys.join("', '")}') - please ensure your 'getBy' spec uniquely identifiers a row (resource = ${this.resource}; supported uniques = ${(0, inspect_js_1.inspect)(this.resource.uniques)}).`); + } + keys.forEach((name) => { + if (grafast_1.isDev) { + if (this.getBys.some((col) => col.name === name)) { + throw new Error(`Attribute '${String(name)}' was specified more than once in ${this}'s getBy spec`); + } + } + const value = getBy[name]; + const depId = this.addDependency(value); + const attribute = this.resource.codec.attributes[name]; + const pgCodec = attribute.codec; + this.getBys.push({ name, depId, pgCodec }); + }); + } + toStringMeta() { + return `${this.resource.name}(${this.getBys.map((g) => g.name)})`; + } + /** + * Returns a plan representing a named attribute (e.g. column) from the newly + * deleteed row. + */ + get(attr) { + const resourceAttribute = this.resource.codec.attributes[attr]; + if (!resourceAttribute) { + throw new Error(`${this.resource} does not define an attribute named '${String(attr)}'`); + } + if (resourceAttribute?.via) { + throw new Error(`Cannot select a 'via' attribute from PgDeleteSingleStep`); + } + /* + * Only cast to `::text` during select; we want to use it uncasted in + * conditions/etc. The reasons we cast to ::text include: + * + * - to make return values consistent whether they're direct or in nested + * arrays + * - to make sure that that various PostgreSQL clients we support do not + * mangle the data in unexpected ways - we take responsibility for + * decoding these string values. + */ + const sqlExpr = (0, pgClassExpression_js_1.pgClassExpression)(this, resourceAttribute.codec, resourceAttribute.notNull); + const colPlan = resourceAttribute.expression + ? sqlExpr `${pg_sql2_1.default.parens(resourceAttribute.expression(this.alias))}` + : sqlExpr `${this.alias}.${pg_sql2_1.default.identifier(String(attr))}`; + return colPlan; + } + getMeta(key) { + return (0, grafast_1.access)(this, ["m", key]); + } + record() { + return (0, pgClassExpression_js_1.pgClassExpression)(this, this.resource.codec, false) `${this.alias}`; + } + /** + * Advanced method; rather than returning a plan it returns an index. + * Generally useful for PgClassExpressionStep. + * + * @internal + */ + selectAndReturnIndex(fragment) { + if (this.locked) { + throw new Error("Step is finalized, no more selects may be added"); + } + // Optimisation: if we're already selecting this fragment, return the existing one. + const index = this.selects.findIndex((frag) => pg_sql2_1.default.isEquivalent(frag, fragment)); + if (index >= 0) { + return index; + } + return this.selects.push(fragment) - 1; + } + apply($step) { + this.applyDepIds.push(this.addUnaryDependency($step)); + } + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + async execute({ indexMap, values, }) { + const { alias, contextId, finalizeResults } = this; + if (!finalizeResults) { + throw new Error("Cannot execute PgSelectStep before finalizing it."); + } + const { text, rawSqlValues, queryValueDetailsBySymbol } = finalizeResults; + // We must execute each mutation on its own, but we can at least do so in + // parallel. Note we return a list of promises, each may reject or resolve + // without causing the others to reject. + const contextDep = values[contextId]; + return indexMap(async (i) => { + const context = contextDep.at(i); + const meta = Object.create(null); + const queryBuilder = { + alias, + [pg_sql2_1.$$toSQL]() { + return alias; + }, + setMeta(key, value) { + meta[key] = value; + }, + getMetaRaw(key) { + return meta[key]; + }, + }; + for (const applyDepId of this.applyDepIds) { + const val = values[applyDepId].unaryValue(); + if (Array.isArray(val)) { + val.forEach((v) => v?.(queryBuilder)); + } + else { + val?.(queryBuilder); + } + } + const sqlValues = queryValueDetailsBySymbol.size + ? rawSqlValues.map((v) => { + if (typeof v === "symbol") { + const details = queryValueDetailsBySymbol.get(v); + if (!details) { + throw new Error(`Saw unexpected symbol '${(0, inspect_js_1.inspect)(v)}'`); + } + const val = values[details.depId].at(i); + return val == null ? null : details.processor(val); + } + else { + return v; + } + }) + : rawSqlValues; + const { rows, rowCount } = await this.resource.executeMutation({ + context, + text, + values: sqlValues, + }); + if (rowCount === 0) { + return Promise.reject(new Error(`No values were deleted in collection '${this.resource.name}' because no values you can delete were found matching these criteria.`)); + } + return { __proto__: null, m: meta, t: rows[0] ?? [] }; + }); + } + finalize() { + if (!this.isFinalized) { + this.locked = true; + const resourceSource = this.resource.from; + if (!pg_sql2_1.default.isSQL(resourceSource)) { + throw new Error(`Error in ${this}: can only delete into resources defined as SQL, however ${this.resource} has ${(0, inspect_js_1.inspect)(this.resource.from)}`); + } + const table = (0, pg_sql2_1.default) `${resourceSource} as ${this.alias}`; + const fragmentsWithAliases = this.selects.map((frag, idx) => (0, pg_sql2_1.default) `${frag} as ${pg_sql2_1.default.identifier(String(idx))}`); + const returning = fragmentsWithAliases.length > 0 + ? (0, pg_sql2_1.default) ` returning\n${pg_sql2_1.default.indent(pg_sql2_1.default.join(fragmentsWithAliases, ",\n"))}` + : pg_sql2_1.default.blank; + /* + * NOTE: Though we'd like to do bulk deletes, it's challenging to link it + * back together again. + * + * Currently it seems that the order returned from `delete ... + * using (select ... order by ...) returning ...` is the same order as the + * `order by` was, however this is not guaranteed in the documentation + * and as such cannot be relied upon. Further the pgsql-hackers list + * explicitly declined guaranteeing this behavior: + * + * https://www.postgresql.org/message-id/CAKFQuwbgdJ_xNn0YHWGR0D%2Bv%2B3mHGVqJpG_Ejt96KHoJjs6DkA%40mail.gmail.com + * + * So we have to make do with single deletes, alas. + */ + const getByAttributesCount = this.getBys.length; + if (getByAttributesCount === 0) { + // No attributes specified to find the row?! This is forbidden. + throw new grafast_1.SafeError("Attempted to delete a record, but no information on uniquely determining the record was specified."); + } + else { + // This is our common path + const sqlWhereClauses = []; + const queryValueDetailsBySymbol = new Map(); + for (let i = 0; i < getByAttributesCount; i++) { + const { name, depId, pgCodec } = this.getBys[i]; + const symbol = Symbol(name); + sqlWhereClauses[i] = pg_sql2_1.default.parens((0, pg_sql2_1.default) `${pg_sql2_1.default.identifier(this.symbol, name)} = ${pg_sql2_1.default.value( + // THIS IS A DELIBERATE HACK - we will be replacing this symbol with + // a value before executing the query. + symbol)}::${pgCodec.sqlType}`); + queryValueDetailsBySymbol.set(symbol, { + depId, + processor: pgCodec.toPg, + }); + } + const where = (0, pg_sql2_1.default) ` where ${pg_sql2_1.default.parens(pg_sql2_1.default.join(sqlWhereClauses, " and "))}`; + const query = (0, pg_sql2_1.default) `delete from ${table}${where}${returning};`; + const { text, values: rawSqlValues } = pg_sql2_1.default.compile(query); + this.finalizeResults = { + text, + rawSqlValues, + queryValueDetailsBySymbol, + }; + } + } + super.finalize(); + } +} +exports.PgDeleteSingleStep = PgDeleteSingleStep; +/** + * Delete a row in `resource` identified by the `getBy` unique condition. + */ +function pgDeleteSingle(resource, getBy) { + return new PgDeleteSingleStep(resource, getBy); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgDeleteSingle, "pgDeleteSingle"); +//# sourceMappingURL=pgDeleteSingle.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgDeleteSingle.js.map b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.js.map new file mode 100644 index 0000000000..3bc74c77f3 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgDeleteSingle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgDeleteSingle.js","sourceRoot":"","sources":["../../src/steps/pgDeleteSingle.ts"],"names":[],"mappings":";;;AA2aA,wCAUC;;AA/aD,qCAAmE;AAEnE,2DAAuC;AAQvC,8CAAwC;AAWxC,iEAA2D;AAkB3D;;GAEG;AACH,MAAa,kBAEX,SAAQ,cAAe;aAChB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,oBAAoB;KACjC,AAHc,CAGb;IA0DF,YACE,QAAmB,EACnB,KAGC;QAED,KAAK,EAAE,CAAC;QAhEV,kBAAa,GAAG,KAAK,CAAC;QAuBtB;;WAEG;QACK,WAAM,GAIT,EAAE,CAAC;QAOR;;WAEG;QACK,WAAM,GAAG,KAAK,CAAC;QAEvB;;;;;WAKG;QACK,oBAAe,GAAuC,IAAI,CAAC;QAEnE;;WAEG;QACK,YAAO,GAAe,EAAE,CAAC;QAEzB,gBAAW,GAAa,EAAE,CAAC;QAUjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,iBAAG,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QAEtE,MAAM,IAAI,G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Aa,CACd,KAAK,OAAO,CAAC,OAAO,EAAE,CACxB,CAAC;oBACF,yBAAyB,CAAC,GAAG,CAAC,MAAM,EAAE;wBACpC,KAAK;wBACL,SAAS,EAAE,OAAO,CAAC,IAAI;qBACxB,CAAC,CAAC;gBACL,CAAC;gBAED,MAAM,KAAK,GAAG,IAAA,iBAAG,EAAA,UAAU,iBAAG,CAAC,MAAM,CACnC,iBAAG,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CACnC,EAAE,CAAC;gBACJ,MAAM,KAAK,GAAG,IAAA,iBAAG,EAAA,eAAe,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,CAAC;gBAC7D,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,iBAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAE1D,IAAI,CAAC,eAAe,GAAG;oBACrB,IAAI;oBACJ,YAAY;oBACZ,yBAAyB;iBAC1B,CAAC;YACJ,CAAC;QACH,CAAC;QAED,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;;AArXH,gDAsXC;AAED;;GAEG;AACH,SAAgB,cAAc,CAG5B,QAAmB,EACnB,KAGC;IAED,OAAO,IAAI,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC;AACD,IAAA,kBAAQ,EAAC,cAAc,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgInsertSingle.d.ts b/grafast/dataplan-pg/dist/steps/pgInsertSingle.d.ts new file mode 100644 index 0000000000..7efed11b2d --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgInsertSingle.d.ts @@ -0,0 +1,100 @@ +import type { ExecutionDetails, GrafastResultsList, Maybe, Setter, SetterCapable } from "grafast"; +import { Step } from "grafast"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgCodecAttribute } from "../codecs.js"; +import type { PgResource } from "../datasource.js"; +import type { GetPgResourceAttributes, GetPgResourceCodec, ObjectForResource, PgCodecWithAttributes, PgQueryBuilder, PgTypedStep, ReadonlyArrayOrDirect } from "../interfaces.js"; +import type { PgClassExpressionStep } from "./pgClassExpression.js"; +/** + * Inserts a row into resource with the given specified attribute values. + */ +export declare class PgInsertSingleStep = PgResource> extends Step implements SetterCapable<{ + [key in keyof GetPgResourceAttributes & string]: Step; +}>, SQLable { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * Tells us what we're dealing with - data type, columns, where to insert it, + * what it's called, etc. + */ + readonly resource: TResource; + /** + * This defaults to the name of the resource but you can override it. Aids + * in debugging. + */ + private readonly name; + /** + * To be used as the table alias, we always use a symbol unless the calling + * code specifically indicates a string to use. + */ + private readonly symbol; + /** = sql.identifier(this.symbol) */ + readonly alias: SQL; + /** + * The attributes and their dependency ids for us to insert. + */ + private attributes; + /** + * The id for the PostgreSQL context plan. + */ + private contextId; + /** + * When locked, no more values can be set, no more selects can be added + */ + private locked; + /** + * When finalized, we build the SQL query, queryValues, and note where to feed in + * the relevant queryValues. This saves repeating this work at execution time. + */ + private finalizeResults; + /** + * The list of things we're selecting. + */ + private selects; + private applyDepIds; + constructor(resource: TResource, attributes?: { + [key in keyof GetPgResourceAttributes]?: PgTypedStep[key]["codec"]> | Step; + }); + toStringMeta(): string | null; + set>(name: TKey, value: Step): void; + /** + * Returns a plan representing a named attribute (e.g. column) from the newly + * inserted row. + */ + get>(attr: TAttr): PgClassExpressionStep[TAttr] extends PgCodecAttribute ? UCodec : never, TResource>; + getMeta(key: string): import("grafast").AccessStep; + record(): PgClassExpressionStep, TResource>; + apply($step: Step>>): void; + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + execute({ indexMap, values, }: ExecutionDetails): Promise>; + finalize(): void; + [$$toSQL](): SQL; +} +/** + * Inserts a row into resource with the given specified attribute values. + */ +export declare function pgInsertSingle>(resource: TResource, attributes?: { + [key in keyof GetPgResourceAttributes]?: PgTypedStep[key]["codec"]> | Step; +}): PgInsertSingleStep; +export interface PgInsertSingleQueryBuilder = PgResource> extends PgQueryBuilder, SetterCapable> { + set>(key: TAttributeName, value: ObjectForResource[TAttributeName]): void; + setBuilder(): Setter, this>; +} +type PgInsertSingleQueryBuilderCallback = (qb: PgInsertSingleQueryBuilder) => void; +export {}; +//# sourceMappingURL=pgInsertSingle.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgInsertSingle.d.ts.map b/grafast/dataplan-pg/dist/steps/pgInsertSingle.d.ts.map new file mode 100644 index 0000000000..a6c0ca6a8e --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgInsertSingle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgInsertSingle.d.ts","sourceRoot":"","sources":["../../src/steps/pgInsertSingle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EAEL,MAAM,EACN,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAmC,IAAI,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EACrB,cAAc,EACd,WAAW,EACX,qBAAqB,EACtB,MAAM,kBAAk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EAAE,GAAG,CAAC,CACzD,SAAQ,cAAc,EACpB,aAAa,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7C,GAAG,CAAC,cAAc,SAAS,MAAM,iBAAiB,CAAC,SAAS,CAAC,EAC3D,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,GAClD,IAAI,CAAC;IACR,UAAU,IAAI,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;CAC1D;AAED,KAAK,kCAAkC,GAAG,CACxC,EAAE,EAAE,0BAA0B,KAC3B,IAAI,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgInsertSingle.js b/grafast/dataplan-pg/dist/steps/pgInsertSingle.js new file mode 100644 index 0000000000..93080573d1 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgInsertSingle.js @@ -0,0 +1,272 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgInsertSingleStep = void 0; +exports.pgInsertSingle = pgInsertSingle; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importStar(require("pg-sql2")); +const codecs_js_1 = require("../codecs.js"); +const inspect_js_1 = require("../inspect.js"); +const pgClassExpression_js_1 = require("./pgClassExpression.js"); +/** + * Inserts a row into resource with the given specified attribute values. + */ +class PgInsertSingleStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgInsertSingleStep", + }; } + constructor(resource, attributes) { + super(); + this.isSyncAndSafe = false; + /** + * The attributes and their dependency ids for us to insert. + */ + this.attributes = []; + /** + * When locked, no more values can be set, no more selects can be added + */ + this.locked = false; + /** + * When finalized, we build the SQL query, queryValues, and note where to feed in + * the relevant queryValues. This saves repeating this work at execution time. + */ + this.finalizeResults = null; + /** + * The list of things we're selecting. + */ + this.selects = []; + this.applyDepIds = []; + this.hasSideEffects = true; + this.resource = resource; + this.name = resource.name; + this.symbol = Symbol(this.name); + this.alias = pg_sql2_1.default.identifier(this.symbol); + this.contextId = this.addDependency(this.resource.executor.context()); + if (attributes) { + Object.entries(attributes).forEach(([key, value]) => { + if (value) { + this.set(key, value); + } + }); + } + } + toStringMeta() { + return `${this.resource.name}(${this.attributes.map((a) => a.name)})`; + } + set(name, value) { + if (this.locked) { + throw new Error("Cannot set after plan is locked."); + } + if (grafast_1.isDev) { + if (this.attributes.some((col) => col.name === name)) { + throw new Error(`Attribute '${String(name)}' was specified more than once in ${this}`); + } + } + const attribute = this.resource.codec.attributes?.[name]; + if (!attribute) { + throw new Error(`Attribute ${String(name)} not found in ${this.resource.codec}`); + } + const { codec: pgCodec } = attribute; + const depId = this.addDependency(value); + this.attributes.push({ name, depId, pgCodec }); + } + /** + * Returns a plan representing a named attribute (e.g. column) from the newly + * inserted row. + */ + get(attr) { + if (!this.resource.codec.attributes) { + throw new Error(`Cannot call .get() when there's no attributes.`); + } + const resourceAttribute = this.resource.codec.attributes[attr]; + if (!resourceAttribute) { + throw new Error(`${this.resource} does not define an attribute named '${String(attr)}'`); + } + if (resourceAttribute?.via) { + throw new Error(`Cannot select a 'via' attribute from PgInsertSingleStep`); + } + /* + * Only cast to `::text` during select; we want to use it uncasted in + * conditions/etc. The reasons we cast to ::text include: + * + * - to make return values consistent whether they're direct or in nested + * arrays + * - to make sure that that various PostgreSQL clients we support do not + * mangle the data in unexpected ways - we take responsibility for + * decoding these string values. + */ + const sqlExpr = (0, pgClassExpression_js_1.pgClassExpression)(this, resourceAttribute.codec, resourceAttribute.notNull); + const colPlan = resourceAttribute.expression + ? sqlExpr `${pg_sql2_1.default.parens(resourceAttribute.expression(this.alias))}` + : sqlExpr `${this.alias}.${pg_sql2_1.default.identifier(String(attr))}`; + return colPlan; + } + getMeta(key) { + return (0, grafast_1.access)(this, ["m", key]); + } + record() { + return (0, pgClassExpression_js_1.pgClassExpression)(this, this.resource.codec, false) `${this.alias}`; + } + /** + * Advanced method; rather than returning a plan it returns an index. + * Generally useful for PgClassExpressionStep. + * + * @internal + */ + selectAndReturnIndex(fragment) { + // NOTE: it's okay to add selections after the plan is "locked" - lock only + // applies to which rows are being selected, not what is being queried + // about the rows. + // Optimisation: if we're already selecting this fragment, return the existing one. + const index = this.selects.findIndex((frag) => pg_sql2_1.default.isEquivalent(frag, fragment)); + if (index >= 0) { + return index; + } + return this.selects.push(fragment) - 1; + } + apply($step) { + this.applyDepIds.push(this.addUnaryDependency($step)); + } + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + async execute({ indexMap, values, }) { + const { resource, contextId, finalizeResults, alias } = this; + if (!finalizeResults) { + throw new Error("Cannot execute PgSelectStep before finalizing it."); + } + const { table, returning } = finalizeResults; + const contextDep = values[contextId]; + /* + * NOTE: Though we'd like to do bulk inserts, there's no way of us + * reliably linking the data back up again given users might: + * + * - rely on auto-generated primary keys + * - have triggers manipulating the data so we can't match it back up + * + * Currently it seems that the order returned from `insert into ... + * select ... order by ... returning ...` is the same order as the + * `order by` was, however this is not guaranteed in the documentation + * and as such cannot be relied upon. Further the pgsql-hackers list + * explicitly declined guaranteeing this behavior: + * + * https://www.postgresql.org/message-id/CAKFQuwbgdJ_xNn0YHWGR0D%2Bv%2B3mHGVqJpG_Ejt96KHoJjs6DkA%40mail.gmail.com + * + * So we have to make do with single inserts, alas. + */ + // We must execute each mutation on its own, but we can at least do so in + // parallel. Note we return a list of promises, each may reject or resolve + // without causing the others to reject. + return indexMap(async (i) => { + const context = contextDep.at(i); + const sqlAttributes = []; + const sqlValues = []; + for (const { depId, name, pgCodec } of this.attributes) { + const attVal = values[depId].at(i); + // `null` is kept, `undefined` is skipped + if (attVal !== undefined) { + const sqlIdent = pg_sql2_1.default.identifier(name); + const sqlVal = (0, codecs_js_1.sqlValueWithCodec)(attVal, pgCodec); + sqlAttributes.push(sqlIdent); + sqlValues.push(sqlVal); + } + } + const meta = Object.create(null); + const queryBuilder = { + alias, + [pg_sql2_1.$$toSQL]() { + return alias; + }, + setMeta(key, value) { + meta[key] = value; + }, + getMetaRaw(key) { + return meta[key]; + }, + set(name, attVal) { + const pgCodec = resource.codec.attributes[name]?.codec; + if (!pgCodec) { + throw new Error(`Attribute ${name} not recognized on ${resource}`); + } + const sqlIdent = pg_sql2_1.default.identifier(name); + const sqlVal = (0, codecs_js_1.sqlValueWithCodec)(attVal, pgCodec); + sqlAttributes.push(sqlIdent); + sqlValues.push(sqlVal); + }, + setBuilder() { + return (0, grafast_1.setter)(this); + }, + }; + for (const applyDepId of this.applyDepIds) { + const val = values[applyDepId].unaryValue(); + if (Array.isArray(val)) { + val.forEach((v) => v?.(queryBuilder)); + } + else { + val?.(queryBuilder); + } + } + let compileResult; + if (sqlAttributes.length > 0) { + // This is our common path + const attributes = pg_sql2_1.default.join(sqlAttributes, ", "); + const values = pg_sql2_1.default.join(sqlValues, ", "); + const query = (0, pg_sql2_1.default) `insert into ${table} (${attributes}) values (${values})${returning};`; + compileResult = pg_sql2_1.default.compile(query); + } + else { + // No columns to insert?! Odd... but okay. + const query = (0, pg_sql2_1.default) `insert into ${table} default values${returning};`; + compileResult = pg_sql2_1.default.compile(query); + } + const { text, values: stmtValues } = compileResult; + const { rows } = await this.resource.executeMutation({ + context, + text, + values: stmtValues, + }); + return { __proto__: null, m: meta, t: rows[0] ?? [] }; + }); + } + finalize() { + if (!this.isFinalized) { + this.locked = true; + const resourceSource = this.resource.from; + if (!pg_sql2_1.default.isSQL(resourceSource)) { + throw new Error(`Error in ${this}: can only insert into sources defined as SQL, however ${this.resource} has ${(0, inspect_js_1.inspect)(this.resource.from)}`); + } + const table = (0, pg_sql2_1.default) `${resourceSource} as ${this.alias}`; + const fragmentsWithAliases = this.selects.map((frag, idx) => (0, pg_sql2_1.default) `${frag} as ${pg_sql2_1.default.identifier(String(idx))}`); + const returning = fragmentsWithAliases.length > 0 + ? (0, pg_sql2_1.default) ` returning\n${pg_sql2_1.default.indent(pg_sql2_1.default.join(fragmentsWithAliases, ",\n"))}` + : pg_sql2_1.default.blank; + this.finalizeResults = { + table, + returning, + }; + } + super.finalize(); + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgInsertSingleStep = PgInsertSingleStep; +/** + * Inserts a row into resource with the given specified attribute values. + */ +function pgInsertSingle(resource, attributes) { + return new PgInsertSingleStep(resource, attributes); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgInsertSingle, "pgInsertSingle"); +//# sourceMappingURL=pgInsertSingle.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgInsertSingle.js.map b/grafast/dataplan-pg/dist/steps/pgInsertSingle.js.map new file mode 100644 index 0000000000..109e53fe9f --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgInsertSingle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgInsertSingle.js","sourceRoot":"","sources":["../../src/steps/pgInsertSingle.ts"],"names":[],"mappings":";;;AAsaA,wCAWC;;AAzaD,qCAAgE;AAEhE,2DAAuC;AAGvC,4CAAiD;AAEjD,8CAAwC;AAYxC,iEAA2D;AAO3D;;GAEG;AACH,MAAa,kBAGX,SAAQ,cAEP;aAOM,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,oBAAoB;KACjC,AAHc,CAGb;IA0DF,YACE,QAAmB,EACnB,UAIC;QAED,KAAK,EAAE,CAAC;QAhEV,kBAAa,GAAG,KAAK,CAAC;QAuBtB;;WAEG;QACK,eAAU,GAKb,EAAE,CAAC;QAOR;;WAEG;QACK,WAAM,GAAG,KAAK,CAAC;QAEvB;;;WAGG;QACK,oBAAe,GAA6C,IAAI,CAAC;QAEzE;;WAEG;QACK,YAAO,GAAe,EAAE,CAAC;QAEzB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,CACb,YAAY,IAAI,0DACd,IAAI,CAAC,QACP,QAAQ,IAAA,oBAAO,EAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CACtC,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,GAAG,IAAA,iBAAG,EAAA,GAAG,cAAc,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;YAEtD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAC3C,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,IAAA,iBAAG,EAAA,GAAG,IAAI,OAAO,iBAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAC9D,CAAC;YACF,MAAM,SAAS,GACb,oBAAoB,CAAC,MAAM,GAAG,CAAC;gBAC7B,CAAC,CAAC,IAAA,iBAAG,EAAA,eAAe,iBAAG,CAAC,MAAM,CAC1B,iBAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CACtC,EAAE;gBACL,CAAC,CAAC,iBAAG,CAAC,KAAK,CAAC;YAChB,IAAI,CAAC,eAAe,GAAG;gBACrB,KAAK;gBACL,SAAS;aACV,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IACD,CAAC,iBAAO,CAAC;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;;AA3XH,gDA4XC;AAED;;GAEG;AACH,SAAgB,cAAc,CAG5B,QAAmB,EACnB,UAIC;IAED,OAAO,IAAI,kBAAkB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACtD,CAAC;AACD,IAAA,kBAAQ,EAAC,cAAc,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPageInfo.d.ts b/grafast/dataplan-pg/dist/steps/pgPageInfo.d.ts new file mode 100644 index 0000000000..25dfa8fe25 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPageInfo.d.ts @@ -0,0 +1,59 @@ +import type { ExecutableStep, ExecutionDetails, GrafastResultsList, PageInfoCapableStep } from "grafast"; +import { ConnectionStep, UnbatchedStep } from "grafast"; +import type { PgCursorStep } from "./pgCursor.js"; +import type { PgSelectParsedCursorStep, PgSelectStep } from "./pgSelect.js"; +import type { PgSelectSingleStep } from "./pgSelectSingle.js"; +import type { PgUnionAllSingleStep, PgUnionAllStep } from "./pgUnionAll.js"; +/** + * Represents the PageInfo for a Relay-style GraphQL Connection. + * + * Invoking PgPageInfoStep should have no direct overhead (e.g. + * `pageInfo { __typename }` is free); cost should not be incurred until one of + * the submethods is called. + * + * {@page ~@dataplan/pg/steps/pgPageInfo.md} + */ +export declare class PgPageInfoStep | PgUnionAllStep> extends UnbatchedStep implements PageInfoCapableStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private connectionStepId; + constructor(connectionPlan: ConnectionStep); + /** + * Returns true if the following hold: + * + * - first is set + * - last is not set + * - if first had been one larger, another record would have been returned. + * + * In all other cases, false is returned. + * + * @see {@link https://relay.dev/graphql/connections.htm#HasNextPage()} + */ + hasNextPage(): ExecutableStep; + /** + * Returns true if the following hold: + * + * - last is set + * - first is not set + * - if last had been one larger, another record would have been returned. + * + * In all other cases, false is returned. + * + * @see {@link https://relay.dev/graphql/connections.htm#HasPreviousPage()} + */ + hasPreviousPage(): ExecutableStep; + startCursor(): PgCursorStep | PgUnionAllSingleStep>; + endCursor(): PgCursorStep | PgUnionAllSingleStep>; + execute({ count }: ExecutionDetails): GrafastResultsList; + unbatchedExecute(): any; +} +/** + * Represents the PageInfo for a Relay-style GraphQL Connection. + * + * {@page ~@dataplan/pg/steps/pgPageInfo.md} + */ +export declare function pgPageInfo | PgUnionAllStep>(connectionPlan: ConnectionStep): PgPageInfoStep; +//# sourceMappingURL=pgPageInfo.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPageInfo.d.ts.map b/grafast/dataplan-pg/dist/steps/pgPageInfo.d.ts.map new file mode 100644 index 0000000000..260f8bd911 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPageInfo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgPageInfo.d.ts","sourceRoot":"","sources":["../../src/steps/pgPageInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAElB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EAKd,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAS5E;;;;;;;;GAQG;AACH,qBAAa,cAAc,CACvB,KAAK,SAAS,YAAY,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAE5D,SAAQ,aAAa,CAAC,GAAG,CACzB,YAAW,mBAAmB;IAE9B,MAAM,CAAC,QAAQ;;;MAGb;IAEF,aAAa,UAAQ;IAErB,OAAO,CAAC,gBAAgB,CAAS;gBAG/B,cAAc,EAAE,cAAc,CAAC,GAAG,EAAE,wBAAwB,EAAE,KAAK,EAAE,GAAG,CAAC;IAwB3E;;;;;;;;;;OAUG;IACI,WAAW,IAAI,cAAc,CAAC,OAAO,CAAC;IAa7C;;;;;;;;;;OAUG;IACI,eAAe,IAAI,cAAc,CAAC,OAAO,CAAC;IAcjD,WAAW,IAAI,YAAY,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,oBAAoB,CAAC;IAM3E,SAAS,IAAI,YAAY,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,oBAAoB,CAAC;IAMzE,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,GAAG,kBAAkB,CAAC,MAAM,CAAC;IAIhE,gBAAgB;CAGjB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,SAAS,YAAY,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,EAE1D,cAAc,EAAE,cAAc,CAAC,GAAG,EAAE,wBAAwB,EAAE,KAAK,EAAE,GAAG,CAAC,GACxE,cAAc,CAAC,KAAK,CAAC,CAEvB"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPageInfo.js b/grafast/dataplan-pg/dist/steps/pgPageInfo.js new file mode 100644 index 0000000000..639d0bd1a3 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPageInfo.js @@ -0,0 +1,126 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgPageInfoStep = void 0; +exports.pgPageInfo = pgPageInfo; +const grafast_1 = require("grafast"); +/* + * **IMPORTANT**: see pgPageInfo.md for reasoning behind decisions made in this file + */ +// Reduce GC overhead by reusing the same empty object over and over. +const EMPTY_OBJECT = Object.freeze(Object.create(null)); +/** + * Represents the PageInfo for a Relay-style GraphQL Connection. + * + * Invoking PgPageInfoStep should have no direct overhead (e.g. + * `pageInfo { __typename }` is free); cost should not be incurred until one of + * the submethods is called. + * + * {@page ~@dataplan/pg/steps/pgPageInfo.md} + */ +class PgPageInfoStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgPageInfoStep", + }; } + constructor(connectionPlan) { + super(); + this.isSyncAndSafe = true; + this.connectionStepId = this.addDependency(connectionPlan); + } + /** + * Might come in handy later? + * + * @internal + */ + getConnectionStep() { + const plan = this.getDep(this.connectionStepId); + if (!(plan instanceof grafast_1.ConnectionStep)) { + throw new Error(`Expected ${plan} to be a ConnectionStep`); + } + return plan; + } + /** + * Returns true if the following hold: + * + * - first is set + * - last is not set + * - if first had been one larger, another record would have been returned. + * + * In all other cases, false is returned. + * + * @see {@link https://relay.dev/graphql/connections.htm#HasNextPage()} + */ + hasNextPage() { + const $connection = this.getConnectionStep(); + const $first = $connection.getFirst() ?? (0, grafast_1.constant)(undefined); + const $last = $connection.getLast() ?? (0, grafast_1.constant)(undefined); + const $node = $connection.cloneSubplanWithPagination(); + const $hasMore = $node.hasMore(); + return (0, grafast_1.lambda)({ first: $first, last: $last, hasMore: $hasMore }, hasNextPageCb, true); + } + /** + * Returns true if the following hold: + * + * - last is set + * - first is not set + * - if last had been one larger, another record would have been returned. + * + * In all other cases, false is returned. + * + * @see {@link https://relay.dev/graphql/connections.htm#HasPreviousPage()} + */ + hasPreviousPage() { + const $connection = this.getConnectionStep(); + const $first = $connection.getFirst() ?? (0, grafast_1.constant)(undefined); + const $last = $connection.getLast() ?? (0, grafast_1.constant)(undefined); + const $offset = $connection.getOffset() ?? (0, grafast_1.constant)(undefined); + const $node = $connection.cloneSubplanWithPagination(); + const $hasMore = $node.hasMore(); + return (0, grafast_1.lambda)({ first: $first, last: $last, offset: $offset, hasMore: $hasMore }, hasPreviousPageCb, true); + } + startCursor() { + const $connection = this.getConnectionStep(); + const $rows = $connection.cloneSubplanWithPagination(); + return $rows.row((0, grafast_1.first)($rows)).cursor(); + } + endCursor() { + const $connection = this.getConnectionStep(); + const $rows = $connection.cloneSubplanWithPagination(); + return $rows.row((0, grafast_1.last)($rows)).cursor(); + } + execute({ count }) { + return new Array(count).fill(EMPTY_OBJECT); + } + unbatchedExecute() { + return EMPTY_OBJECT; + } +} +exports.PgPageInfoStep = PgPageInfoStep; +/** + * Represents the PageInfo for a Relay-style GraphQL Connection. + * + * {@page ~@dataplan/pg/steps/pgPageInfo.md} + */ +function pgPageInfo(connectionPlan) { + return new PgPageInfoStep(connectionPlan); +} +function hasNextPageCb(parts) { + const { first, last, hasMore } = parts; + return first != null && last == null && first !== 0 ? hasMore : false; +} +function hasPreviousPageCb(parts) { + const { first, last, offset, hasMore } = parts; + if (first === 0 || last === 0) { + return false; + } + if (last != null && first == null) { + return hasMore; + } + else if (offset != null && offset !== 0) { + return true; + } + else { + return false; + } +} +//# sourceMappingURL=pgPageInfo.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPageInfo.js.map b/grafast/dataplan-pg/dist/steps/pgPageInfo.js.map new file mode 100644 index 0000000000..135a2013cc --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPageInfo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgPageInfo.js","sourceRoot":"","sources":["../../src/steps/pgPageInfo.ts"],"names":[],"mappings":";;;AAwJA,gCAMC;AAvJD,qCAOiB;AAOjB;;GAEG;AAEH,qEAAqE;AACrE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAExD;;;;;;;;GAQG;AACH,MAAa,cAGX,SAAQ,uBAAkB;aAGnB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,gBAAgB;KAC7B,AAHc,CAGb;IAMF,YACE,cAAyE;QAEzE,KAAK,EAAE,CAAC;QAPV,kBAAa,GAAG,IAAI,CAAC;QAQnB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACI,iBAAiB;QAMtB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAChD,IAAI,CAAC,CAAC,IAAI,YAAY,wBAAc,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,YAAY,IAAI,yBAAyB,CAAC,CAAC;QAC7D,CAAC;QACD,OAAO,IAAiE,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;OAUG;IACI,WAAW;QAChB,MAAM,WAAW,GAAG,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,OAAO,CAAC;IACjB,CAAC;SAAM,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPolymorphic.d.ts b/grafast/dataplan-pg/dist/steps/pgPolymorphic.d.ts new file mode 100644 index 0000000000..481c299124 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPolymorphic.d.ts @@ -0,0 +1,47 @@ +import type { ExecutableStep, PolymorphicData, PolymorphicStep, UnbatchedExecutionExtra } from "grafast"; +import { UnbatchedStep } from "grafast"; +import type { GraphQLObjectType } from "grafast/graphql"; +import type { PgClassExpressionStep } from "./pgClassExpression.js"; +import type { PgSelectSingleStep } from "./pgSelectSingle.js"; +/** + * A map from the potential concrete types a polymorphic item may be, how to + * determine which one is correct, and how to handle it if it matches. + */ +export interface PgPolymorphicTypeMap | PgClassExpressionStep, TTypeSpecifier, TTypeSpecifierStep extends ExecutableStep = ExecutableStep> { + readonly [typeName: string]: { + match(specifier: TTypeSpecifier): boolean; + plan($specifier: TTypeSpecifierStep, $item: TItemStep): ExecutableStep; + }; +} +/** + * This class is used for dealing with polymorphism; you feed it a plan + * representing an item, a second plan indicating the type of that item, and a + * PgPolymorphicTypeMap that helps figure out which type the item is and how to + * handle it. + */ +export declare class PgPolymorphicStep | PgClassExpressionStep, TTypeSpecifier, TTypeSpecifierStep extends ExecutableStep = ExecutableStep> extends UnbatchedStep implements PolymorphicStep { + private readonly possibleTypes; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private typeSpecifierStepId; + private itemStepId; + private readonly types; + constructor($item: TItemStep, $typeSpecifier: TTypeSpecifierStep, possibleTypes: PgPolymorphicTypeMap); + deduplicate(peers: PgPolymorphicStep[]): PgPolymorphicStep[]; + private itemPlan; + private typeSpecifierPlan; + planForType(type: GraphQLObjectType): ExecutableStep; + private getTypeNameFromSpecifier; + unbatchedExecute(_extra: UnbatchedExecutionExtra, _item: any, specifier: any): PolymorphicData | null; +} +/** + * This class is used for dealing with polymorphism; you feed it a plan + * representing an item, a second plan indicating the type of that item, and a + * PgPolymorphicTypeMap that helps figure out which type the item is and how to + * handle it. + */ +export declare function pgPolymorphic | PgClassExpressionStep, TTypeSpecifier = any, TTypeSpecifierStep extends ExecutableStep = ExecutableStep>($item: TItemStep, $typeSpecifier: TTypeSpecifierStep, possibleTypes: PgPolymorphicTypeMap): PgPolymorphicStep; +//# sourceMappingURL=pgPolymorphic.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPolymorphic.d.ts.map b/grafast/dataplan-pg/dist/steps/pgPolymorphic.d.ts.map new file mode 100644 index 0000000000..540d6da6b4 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPolymorphic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgPolymorphic.d.ts","sourceRoot":"","sources":["../../src/steps/pgPolymorphic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,uBAAuB,EACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EAKL,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oBAAoB,CACnC,SAAS,SAAS,kBAAkB,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAC3E,cAAc,EACd,kBAAkB,SAChB,cAAc,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC;IAEjE,QAAQ,E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SAAS,SAAS,kBAAkB,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAC3E,cAAc,GAAG,GAAG,EACpB,kBAAkB,SAChB,cAAc,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC,cAAc,CAAC,EAEjE,KAAK,EAAE,SAAS,EAChB,cAAc,EAAE,kBAAkB,EAClC,aAAa,EAAE,oBAAoB,CACjC,SAAS,EACT,cAAc,EACd,kBAAkB,CACnB,GACA,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAMlE"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPolymorphic.js b/grafast/dataplan-pg/dist/steps/pgPolymorphic.js new file mode 100644 index 0000000000..7609ba2488 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPolymorphic.js @@ -0,0 +1,79 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgPolymorphicStep = void 0; +exports.pgPolymorphic = pgPolymorphic; +const grafast_1 = require("grafast"); +const inspect_js_1 = require("../inspect.js"); +/** + * This class is used for dealing with polymorphism; you feed it a plan + * representing an item, a second plan indicating the type of that item, and a + * PgPolymorphicTypeMap that helps figure out which type the item is and how to + * handle it. + */ +class PgPolymorphicStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgPolymorphicStep", + }; } + constructor($item, $typeSpecifier, possibleTypes) { + super(); + this.possibleTypes = possibleTypes; + this.isSyncAndSafe = true; + this.itemStepId = this.addDependency($item); + this.typeSpecifierStepId = this.addDependency($typeSpecifier); + this.types = Object.keys(possibleTypes); + this.peerKey = JSON.stringify(this.types); + } + deduplicate(peers) { + return peers.filter((peer) => { + return peer.possibleTypes === this.possibleTypes; + }); + } + itemPlan() { + return this.getDepOptions(this.itemStepId).step; + } + typeSpecifierPlan() { + return this.getDepOptions(this.typeSpecifierStepId) + .step; + } + planForType(type) { + const spec = this.possibleTypes[type.name]; + if (!spec) { + throw new Error(`${this} could resolve to ${type.name}, but can only handle the following types: '${Object.keys(this.possibleTypes).join("', '")}'`); + } + const $typeSpecifier = this.typeSpecifierPlan(); + const $item = this.itemPlan(); + return spec.plan($typeSpecifier, $item); + } + getTypeNameFromSpecifier(specifier) { + const t = this.types.find((t) => this.possibleTypes[t].match(specifier)); + if (!t) { + if (grafast_1.isDev) { + console.error(`Could not find a type that matched the specifier '${(0, inspect_js_1.inspect)(specifier)}'`); + } + throw new grafast_1.SafeError("Could not determine the type to use for this polymorphic value."); + } + return t; + } + unbatchedExecute(_extra, _item, specifier) { + if (specifier) { + const typeName = this.getTypeNameFromSpecifier(specifier); + return (0, grafast_1.polymorphicWrap)(typeName); + } + else { + return null; + } + } +} +exports.PgPolymorphicStep = PgPolymorphicStep; +/** + * This class is used for dealing with polymorphism; you feed it a plan + * representing an item, a second plan indicating the type of that item, and a + * PgPolymorphicTypeMap that helps figure out which type the item is and how to + * handle it. + */ +function pgPolymorphic($item, $typeSpecifier, possibleTypes) { + return new PgPolymorphicStep($item, $typeSpecifier, possibleTypes); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgPolymorphic, "pgPolymorphic"); +//# sourceMappingURL=pgPolymorphic.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgPolymorphic.js.map b/grafast/dataplan-pg/dist/steps/pgPolymorphic.js.map new file mode 100644 index 0000000000..bf61bebf8a --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgPolymorphic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgPolymorphic.js","sourceRoot":"","sources":["../../src/steps/pgPolymorphic.ts"],"names":[],"mappings":";;;AAkJA,sCAmBC;AA/JD,qCAMiB;AAGjB,8CAAwC;AAoBxC;;;;;GAKG;AACH,MAAa,iBAMX,SAAQ,uBAAkB;aAGnB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,mBAAmB;KAChC,AAHc,CAGb;IAOF,Y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AG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAEO,wBAAwB,CAAC,SAAyB;QACxD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,CAAC,EAAE,CAAC;YACP,IAAI,eAAK,EAAE,CAAC;gBACV,OAAO,CAAC,KAAK,CACX,qDAAqD,IAAA,oBAAO,EAC1D,SAAS,CACV,GAAG,CACL,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,mBAAS,CACjB,iEAAiE,CAClE,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,gBAAgB,CACd,MAA+B,EAC/B,KAAU,EACV,SAAc;QAEd,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;YAC1D,OAAO,IAAA,yBAAe,EAAC,QAAQ,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;;AAhGH,8CAiGC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAM3B,KAAgB,EAChB,cAAkC,EAClC,aAIC;IAED,OAAO,IAAI,iBAAiB,CAC1B,KAAK,EACL,cAAc,EACd,aAAa,CACd,CAAC;AACJ,CAAC;AAED,IAAA,kBAAQ,EAAC,cAAc,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelect.d.ts b/grafast/dataplan-pg/dist/steps/pgSelect.d.ts new file mode 100644 index 0000000000..54bf578682 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelect.d.ts @@ -0,0 +1,453 @@ +import type { ConnectionCapableStep, ConnectionStep, ExecutionDetails, GrafastResultsList, LambdaStep, Maybe, StepOptimizeOptions } from "grafast"; +import { Step } from "grafast"; +import type { SQL } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgCodecAttributes } from "../codecs.js"; +import type { PgResource, PgResourceParameter } from "../datasource.js"; +import type { GetPgResourceAttributes, GetPgResourceCodec, GetPgResourceRelations, PgCodec, PgGroupSpec, PgOrderSpec, PgQueryBuilder, PgSelectQueryBuilderCallback, PgSQLCallbackOrDirect, PgTypedStep, ReadonlyArrayOrDirect } from "../interfaces.js"; +import { PgLocker } from "../pgLocker.js"; +import { PgClassExpressionStep } from "./pgClassExpression.js"; +import type { PgHavingConditionSpec, PgWhereConditionSpec } from "./pgCondition.js"; +import { PgCondition } from "./pgCondition.js"; +import type { PgCursorDetails } from "./pgCursor.js"; +import type { PgPageInfoStep } from "./pgPageInfo.js"; +import type { PgSelectSinglePlanOptions } from "./pgSelectSingle.js"; +import { PgSelectSingleStep } from "./pgSelectSingle.js"; +import type { PgStmtCommonQueryInfo, PgStmtCompileQueryInfo, PgStmtDeferredPlaceholder, PgStmtDeferredSQL } from "./pgStmt.js"; +import { PgStmtBaseStep } from "./pgStmt.js"; +export type PgSelectParsedCursorStep = LambdaStep; +type PgSelectPlanJoin = { + type: "cross"; + from: SQL; + alias: SQL; + attributeNames?: SQL; + lateral?: boolean; +} | { + type: "inner" | "left" | "right" | "full"; + from: SQL; + alias: SQL; + attributeNames?: SQL; + conditions: SQL[]; + lateral?: boolean; +}; +type PgSelectScopedPlanJoin = PgSQLCallbackOrDirect; +export type PgSelectIdentifierSpec = { + step: Step; + codec: PgCodec; + matches: (alias: SQL) => SQL; +} | { + step: PgTypedStep; + codec?: PgCodec; + matches: (alias: SQL) => SQL; +}; +export type PgSelectArgumentSpec = { + step: Step; + pgCodec: PgCodec; + name?: string; +} | { + step: PgTypedStep; + pgCodec?: never; + name?: string; +}; +export interface PgSelectArgumentDigest { + position?: number; + name?: string; + placeholder: SQL; + step?: never; +} +interface PgSelectArgumentBasics { + position?: number; + name?: string; +} +interface PgSelectArgumentPlaceholder extends PgSelectArgumentBasics { + placeholder: SQL; + step?: never; + depId?: never; +} +export interface PgSelectArgumentRuntimeValue extends PgSelectArgumentBasics { + placeholder?: never; + value: unknown; +} +export type PgSelectMode = "normal" | "aggregate" | "mutation"; +export interface PgSelectOptions = PgResource> { + /** + * Tells us what we're dealing with - data type, columns, where to get it + * from, what it's called, etc. Many of these details can be overridden + * below. + */ + resource: TResource; + /** + * The identifiers to limit the results down to just the row(s) you care + * about. + * + * NOTE: this is required because it's a big footgun to omit it by accident, + * if you truly do not need it (e.g. if you're calling a function with + * limited results or you really want everything) then you can specify it as + * an empty array `[]`. + */ + identifiers: Array; + /** + * Set this true if your query includes any `VOLATILE` function (including + * seemingly innocuous things such as `random()`) otherwise we might only + * call the relevant function once and re-use the result. + */ + forceIdentity?: boolean; + parameters?: readonly PgResourceParameter[]; + /** + * If your `from` (or resource.from if omitted) is a function, the arguments + * to pass to the function. + */ + args?: ReadonlyArray; + /** + * If you want to build the data in a custom way (e.g. calling a function, + * selecting from a view, building a complex query, etc) then you can + * override the `resource.from` here with your own from code. Defaults to + * `resource.from`. + */ + from?: SQL | ((...args: PgSelectArgumentDigest[]) => SQL); + /** + * You should never rely on implicit order - use explicit `ORDER BY` (via + * `$select.orderBy(...)`) instead. However, if you _are_ relying on implicit + * order in your `from` result (e.g. a subquery or function call that has its + * own internal ordering), setting this to `true` will prevent PgSelect from + * inlining some queries (joins) that it thinks might impact the order of + * results. Setting this to `true` does NOT guarantee that you can rely on + * your order being maintained, but it does increase the chances. + */ + hasImplicitOrder?: false; + /** + * If you pass a custom `from` (or otherwise want to aid in debugging), + * passing a custom name can make it easier to follow the SQL/etc that is + * generated. + */ + name?: string; + mode?: PgSelectMode; + /** + * If true and this turns into a join it should be a lateral join. + */ + joinAsLateral?: boolean; +} +interface PgSelectStepResult { + hasMore: boolean; + /** a tuple based on what is selected at runtime */ + items: ReadonlyArray | AsyncIterable; + cursorDetails: PgCursorDetails | undefined; + groupDetails: PgGroupDetails | undefined; + m: Record; +} +export interface PgGroupDetails { + readonly indicies: ReadonlyArray<{ + index: number; + codec: PgCodec; + }>; +} +/** + * This represents selecting from a class-like entity (table, view, etc); i.e. + * it represents `SELECT , FROM `. You can also add + * `JOIN`, `WHERE`, `ORDER BY`, `LIMIT`, `OFFSET`. You cannot add `GROUP BY` + * because that would invalidate the identifiers; and as such you can't use + * `HAVING` or functions that implicitly turn the query into an aggregate. We + * don't allow `UNION`/`INTERSECT`/`EXCEPT`/`FOR UPDATE`/etc at this time, + * purely because it hasn't been sufficiently considered. + */ +export declare class PgSelectStep = PgResource> extends PgStmtBaseStep implements ConnectionCapableStep, PgSelectParsedCursorStep> { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private readonly from; + private readonly hasImplicitOrder; + /** + * This defaults to the name of the resource but you can override it. Aids + * in debugging. + */ + readonly name: string; + /** + * To be used as the table alias, we always use a symbol unless the calling + * code specifically indicates a string to use. + */ + private readonly symbol; + /** + * When SELECTs get merged, symbols also need to be merged. The keys in this + * map are the symbols of PgSelects that don't exist any more, the values are + * symbols of the PgSelects that they were replaced with (which might also not + * exist in future, but we follow the chain so it's fine). + */ + private readonly _symbolSubstitutes; + /** = sql.identifier(this.symbol) */ + readonly alias: SQL; + /** + * The resource from which we are selecting: table, view, etc + */ + readonly resource: TResource; + private relationJoins; + private joins; + private conditions; + private groups; + private havingConditions; + private orders; + private isOrderUnique; + protected firstStepId: number | null; + protected lastStepId: number | null; + protected fetchOneExtra: boolean; + /** When using natural pagination, this index is the lower bound (and should be excluded) */ + protected lowerIndexStepId: number | null; + /** When using natural pagination, this index is the upper bound (and should be excluded) */ + protected upperIndexStepId: number | null; + protected offsetStepId: number | null; + protected beforeStepId: number | null; + protected afterStepId: number | null; + private connectionDepId; + private applyDepIds; + /** + * Set this true if your query includes any `VOLATILE` function (including + * seemingly innocuous things such as `random()`) otherwise we might only + * call the relevant function once and re-use the result. + */ + forceIdentity: boolean; + protected placeholders: Array; + protected deferreds: Array; + private fixedPlaceholderValues; + /** + * If true, we don't need to add any of the security checks from the + * resource; otherwise we must do so. Default false. + */ + private isTrusted; + /** + * If true, we know at most one result can be matched for each identifier, so + * it's safe to do a `LEFT JOIN` without risk of returning duplicates. Default false. + */ + private isUnique; + /** + * If true, we will not attempt to inline this into the parent query. + * Default false. + */ + private isInliningForbidden; + /** + * If true and this becomes a join during optimisation then it should become + * a lateral join; e.g. in the following query, the left join must be + * lateral. + * + * ```sql + * select * + * from foo + * left join lateral ( + * select (foo.col).* + * ) t + * on true + * ``` + */ + private joinAsLateral; + /** + * The list of things we're selecting. + */ + private selects; + /** + * The id for the PostgreSQL context plan. + */ + private contextId; + readonly mode: PgSelectMode; + protected locker: PgLocker; + private _meta; + static clone>(cloneFrom: PgSelectStep, mode?: PgSelectMode): PgSelectStep; + constructor(options: PgSelectOptions); + toStringMeta(): string; + lock(): void; + setInliningForbidden(newInliningForbidden?: boolean): this; + inliningForbidden(): boolean; + setTrusted(newIsTrusted?: boolean): this; + trusted(): boolean; + /** + * Set this true ONLY if there can be at most one match for each of the + * identifiers. If you set this true when this is not the case then you may + * get unexpected results during inlining; if in doubt leave it at the + * default. + */ + setUnique(newUnique?: boolean): this; + unique(): boolean; + /** + * Join to a named relationship and return the alias that can be used in + * SELECT, WHERE and ORDER BY. + */ + singleRelation & string>(relationIdentifier: TRelationName): SQL; + /** + * @experimental Please use `singleRelation` or `manyRelation` instead. + */ + join(spec: PgSelectScopedPlanJoin): void; + getMeta(key: string): import("grafast").AccessStep; + private nullCheckIndex; + /** + * Finalizes this instance and returns a mutable clone; useful for + * connections/etc (e.g. copying `where` conditions but adding more, or + * pagination, or grouping, aggregates, etc) + */ + clone(mode?: PgSelectMode): PgSelectStep; + connectionClone($connection: ConnectionStep, mode?: PgSelectMode): PgSelectStep; + where(rawCondition: PgSQLCallbackOrDirect & string>>): void; + groupBy(group: PgSQLCallbackOrDirect): void; + having(rawCondition: PgSQLCallbackOrDirect & string>>): void; + orderBy(order: PgSQLCallbackOrDirect): void; + setOrderIsUnique(): void; + apply($step: Step>>): void; + protected assertCursorPaginationAllowed(): void; + items(): PgSelectRowsStep; + pageInfo($connectionPlan: ConnectionStep): PgPageInfoStep; + getCursorDetails(): Step; + private needsGroups; + getGroupDetails(): Step; + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + execute(executionDetails: ExecutionDetails): Promise>; + finalize(): void; + deduplicate(peers: PgSelectStep[]): PgSelectStep[]; + private getParentForInlining; + private mergeSelectsWith; + /** + * - Merge placeholders + * - Merge fixedPlaceholders + * - Merge deferreds + * - Merge _symbolSubstitutes + */ + private mergePlaceholdersInto; + optimize({ stream }: StepOptimizeOptions): Step; + /** + * Most likely you want `.single()` instead of this method. + * + * If this plan may only return one record, you can use `.singleAsRecord()` + * to return a plan that resolves to that record (rather than a list of + * records as it does currently). + * + * The main reason to use this instead of `.single()` is if you are + * paginating over a scalar and you truly need a PgSelectSingleStep interface + * e.g. so you can get the `count(*)` aggregate. + * + * Beware: if you call this and the database might actually return more than + * one record then you're potentially in for a Bad Time. + */ + singleAsRecord(options?: PgSelectSinglePlanOptions): PgSelectSingleStep; + /** + * If this plan may only return one record, you can use `.single()` to return + * a plan that resolves to either that record (in the case of composite + * types) or the underlying scalar (in the case of a resource whose codec has + * no attributes). + * + * Beware: if you call this and the database might actually return more than + * one record then you're potentially in for a Bad Time. + */ + single(options?: PgSelectSinglePlanOptions): TResource extends PgResource, any, any, any> ? UAttributes extends PgCodecAttributes ? PgSelectSingleStep : PgClassExpressionStep, TResource> : never; + row($row: Step, options?: PgSelectSinglePlanOptions): PgSelectSingleStep; + /** + * When you return a plan in a situation where GraphQL is expecting a + * GraphQLList, it must implement the `.listItem()` method to return a plan + * for an individual item within this list. Grafast will automatically call + * this (possibly recursively) to pass to the plan resolvers on the children + * of this field. + * + * NOTE: Grafast handles the list indexes for you, so your list item plan + * should process just the single input list item. + * + * IMPORTANT: do not call `.listItem` from user code; it's only intended to + * be called by Grafast. + */ + listItem(itemPlan: Step): TResource extends PgResource, any, any, any> ? UAttributes extends PgCodecAttributes ? PgSelectSingleStep : PgClassExpressionStep, TResource> : never; + [$$toSQL](): SQL; + whereBuilder(): PgCondition; + havingBuilder(): PgCondition; + setMeta(key: string, value: unknown): void; + getMetaRaw(key: string): unknown; + static getStaticInfo>($source: PgSelectStep): StaticInfo; +} +export declare class PgSelectRowsStep = PgResource> extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + constructor($pgSelect: PgSelectStep); + getClassStep(): PgSelectStep; + listItem(itemPlan: Step): TResource extends PgResource | undefined, PgCodec | undefined, PgCodec | undefined>, boolean>; + } | undefined, any, any, any, any, any>, any, any, any> ? UAttributes extends { + [x: string]: import("../codecs.js").PgCodecAttribute | undefined, PgCodec | undefined, PgCodec | undefined>, boolean>; + } ? PgSelectSingleStep : PgClassExpressionStep, TResource> : never; + deduplicate(_peers: readonly Step[]): readonly Step[]; + execute(executionDetails: ExecutionDetails): readonly any[]; +} +export declare function pgSelect>(options: PgSelectOptions): PgSelectStep; +/** + * Turns a list of records (e.g. from PgSelectSingleStep.record()) back into a PgSelect. + */ +export declare function pgSelectFromRecords>(resource: TResource, records: PgClassExpressionStep, any, any>, TResource> | Step): PgSelectStep; +export declare function sqlFromArgDigests(digests: readonly PgSelectArgumentDigest[]): SQL; +export declare function pgFromExpression($target: { + getPgRoot(): Step & { + placeholder(step: Step, codec: PgCodec): SQL; + deferredSQL($step: Step): SQL; + }; +}, baseFrom: SQL | ((...args: readonly PgSelectArgumentDigest[]) => SQL), inParameters?: readonly PgResourceParameter[] | undefined, specs?: ReadonlyArray): SQL; +declare const $$generationCheck: unique symbol; +export declare function generatePgParameterAnalysis(parameters: readonly PgResourceParameter[]): { + /** DO NOT GENERATE THIS OBJECT YOURSELF! Use generateParameterAnalysis(parameters) */ + [$$generationCheck]: readonly PgResourceParameter | undefined, PgCodec | undefined, PgCodec | undefined>, boolean>; + } | undefined, any, any, PgCodec | undefined, PgCodec | undefined, PgCodec | undefined>>[]; + parameterByName: Record | undefined, PgCodec | undefined, PgCodec | undefined>, boolean>; + } | undefined, any, any, PgCodec | undefined, PgCodec | undefined, PgCodec | undefined>>>; + indexAfterWhichAllArgsAreNamed: number; +}; +export declare function pgFromExpressionRuntime(from: (...args: PgSelectArgumentDigest[]) => SQL, parameters: readonly PgResourceParameter[], digests: ReadonlyArray, parameterAnalysis?: ReturnType): SQL; +export declare function getFragmentAndCodecFromOrder(alias: SQL, order: PgOrderSpec, codecOrCodecs: PgCodec | PgCodec[]): [fragment: SQL, codec: PgCodec, isNullable?: boolean]; +interface PgSelectQueryInfo = PgResource> extends PgStmtCommonQueryInfo, PgStmtCompileQueryInfo { + readonly name: string; + readonly resource: TResource; + readonly mode: PgSelectMode; + /** Are we fetching just one record? */ + readonly isUnique: boolean; + readonly joinAsLateral: boolean; + /** Is the order that was established at planning time unique? */ + readonly isOrderUnique: boolean; + readonly fixedPlaceholderValues: ReadonlyMap; + readonly _symbolSubstitutes: ReadonlyMap; + readonly needsGroups: boolean; + readonly selects: ReadonlyArray; + readonly from: SQL; + readonly joins: ReadonlyArray; + readonly conditions: ReadonlyArray; + readonly orders: ReadonlyArray; + readonly relationJoins: ReadonlyMap, SQL>; + readonly meta: { + readonly [key: string]: any; + }; +} +type CoreInfo> = Readonly, "placeholders" | "deferreds">>; +type StaticKeys = "forceIdentity" | "havingConditions" | "mode" | "hasSideEffects" | "name" | "alias" | "symbol" | "resource" | "groups" | "orders" | "selects" | "fetchOneExtra" | "isOrderUnique" | "isUnique" | "conditions" | "from" | "joins" | "needsCursor" | "needsGroups" | "relationJoins" | "meta" | "placeholderSymbols" | "deferredSymbols" | "fixedPlaceholderValues" | "_symbolSubstitutes" | "joinAsLateral"; +type StaticInfo> = Pick, StaticKeys>; +export interface PgSelectQueryBuilder = PgResource> extends PgQueryBuilder { + /** Instruct to add another order */ + orderBy(spec: PgOrderSpec): void; + /** Inform that the resulting order is now unique */ + setOrderIsUnique(): void; + /** Returns the SQL alias representing the table related to this relation */ + singleRelation & string>(relationIdentifier: TRelationName): SQL; + where(condition: PgWhereConditionSpec & string>): void; + whereBuilder(): PgCondition; + groupBy(group: PgGroupSpec): void; + having(condition: PgHavingConditionSpec & string>): void; + havingBuilder(): PgCondition; + join(spec: PgSelectPlanJoin): void; + selectAndReturnIndex(fragment: SQL): number; +} +export {}; +//# sourceMappingURL=pgSelect.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelect.d.ts.map b/grafast/dataplan-pg/dist/steps/pgSelect.d.ts.map new file mode 100644 index 0000000000..07b090351d --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgSelect.d.ts","sourceRoot":"","sources":["../../src/steps/pgSelect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,KAAK,EAEL,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAiBL,IAAI,EAIL,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,SAAS,CAAC;AAChD,OAAY,EAAwB,OAAO,EAAe,MAAM,SAAS,CAAC;AAE1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,E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ACX,CAAC;AAubF,MAAM,WAAW,oBAAoB,CACnC,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,UAAU,CAClE,SAAQ,cAAc;IACtB,oCAAoC;IACpC,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,oDAAoD;IACpD,gBAAgB,IAAI,IAAI,CAAC;IACzB,4EAA4E;IAC5E,cAAc,CACZ,aAAa,SAAS,MAAM,sBAAsB,CAAC,SAAS,CAAC,GAAG,MAAM,EAEtE,kBAAkB,EAAE,aAAa,GAChC,GAAG,CAAC;IACP,KAAK,CACH,SAAS,EAAE,oBAAoB,CAC7B,MAAM,uBAAuB,CAAC,SAAS,CAAC,GAAG,MAAM,CAClD,GACA,IAAI,CAAC;IACR,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,MAAM,CACJ,SAAS,EAAE,qBAAqB,CAC9B,MAAM,uBAAuB,CAAC,SAAS,CAAC,GAAG,MAAM,CAClD,GACA,IAAI,CAAC;IACR,aAAa,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAGnC,IAAI,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,QAAQ,EAAE,GAAG,GAAG,MAAM,CAAC;CAC7C"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelect.js b/grafast/dataplan-pg/dist/steps/pgSelect.js new file mode 100644 index 0000000000..40828f023b --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelect.js @@ -0,0 +1,2481 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgSelectRowsStep = exports.PgSelectStep = void 0; +exports.pgSelect = pgSelect; +exports.pgSelectFromRecords = pgSelectFromRecords; +exports.sqlFromArgDigests = sqlFromArgDigests; +exports.pgFromExpression = pgFromExpression; +exports.generatePgParameterAnalysis = generatePgParameterAnalysis; +exports.pgFromExpressionRuntime = pgFromExpressionRuntime; +exports.getFragmentAndCodecFromOrder = getFragmentAndCodecFromOrder; +const tslib_1 = require("tslib"); +const crypto_1 = require("crypto"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importStar(require("pg-sql2")); +const codecs_js_1 = require("../codecs.js"); +const parseArray_js_1 = require("../parseArray.js"); +const pgLocker_js_1 = require("../pgLocker.js"); +const pgClassExpression_js_1 = require("./pgClassExpression.js"); +const pgCondition_js_1 = require("./pgCondition.js"); +const pgPageInfo_js_1 = require("./pgPageInfo.js"); +const pgSelectSingle_js_1 = require("./pgSelectSingle.js"); +const pgStmt_js_1 = require("./pgStmt.js"); +const pgValidateParsedCursor_js_1 = require("./pgValidateParsedCursor.js"); +const ALWAYS_ALLOWED = true; +// Maximum identifier length in Postgres is 63 chars, so trim one off. (We +// could do base64... but meh.) +const hash = (text) => (0, crypto_1.createHash)("sha256").update(text).digest("hex").slice(0, 63); +const debugPlan = (0, debug_1.default)("@dataplan/pg:PgSelectStep:plan"); +// const debugExecute = debugFactory("@dataplan/pg:PgSelectStep:execute"); +const debugPlanVerbose = debugPlan.extend("verbose"); +// const debugExecuteVerbose = debugExecute.extend("verbose"); +const EMPTY_ARRAY = Object.freeze([]); +const NO_ROWS = Object.freeze({ + hasMore: false, + items: [], + cursorDetails: undefined, + groupDetails: undefined, + m: Object.create(null), +}); +function assertSensible(step) { + if (step instanceof PgSelectStep) { + throw new Error("You passed a PgSelectStep as an identifier, perhaps you forgot to add `.record()`?"); + } + if (step instanceof pgSelectSingle_js_1.PgSelectSingleStep) { + throw new Error("You passed a PgSelectSingleStep as an identifier, perhaps you forgot to add `.record()`?"); + } +} +/** + * This represents selecting from a class-like entity (table, view, etc); i.e. + * it represents `SELECT , FROM
`. You can also add + * `JOIN`, `WHERE`, `ORDER BY`, `LIMIT`, `OFFSET`. You cannot add `GROUP BY` + * because that would invalidate the identifiers; and as such you can't use + * `HAVING` or functions that implicitly turn the query into an aggregate. We + * don't allow `UNION`/`INTERSECT`/`EXCEPT`/`FOR UPDATE`/etc at this time, + * purely because it hasn't been sufficiently considered. + */ +class PgSelectStep extends pgStmt_js_1.PgStmtBaseStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgSelectStep", + }; } + static clone(cloneFrom, mode = cloneFrom.mode) { + const cloneFromMatchingMode = cloneFrom?.mode === mode ? cloneFrom : null; + const $clone = new PgSelectStep({ + identifiers: [], //We'll overwrite teh result of this in a moment + args: undefined, // We'll overwrite the result of this in a moment + context: cloneFrom.getDep(cloneFrom.contextId), + resource: cloneFrom.resource, + from: cloneFrom.from, + ...(cloneFrom.hasImplicitOrder === false + ? { hasImplicitOrder: cloneFrom.hasImplicitOrder } + : {}), + name: cloneFrom.name, + mode, + joinAsLateral: cloneFrom.joinAsLateral, + forceIdentity: cloneFrom.forceIdentity, + _internalCloneSymbol: cloneFrom.symbol, + _internalCloneAlias: cloneFrom.alias, + }); + if ($clone.dependencies.length !== 1) { + throw new Error("Should not have any dependencies other than context yet"); + } + cloneFrom.dependencies.forEach((planId, idx) => { + if (idx === 0) + return; + const myIdx = $clone.addDependency({ + ...cloneFrom.getDepOptions(idx), + skipDeduplication: true, + }); + if (myIdx !== idx) { + throw new Error(`Failed to clone ${cloneFrom}; dependency indexes did not match: ${myIdx} !== ${idx}`); + } + }); + $clone.applyDepIds = [...cloneFrom.applyDepIds]; + $clone.isTrusted = cloneFrom.isTrusted; + // TODO: should `isUnique` only be set if mode matches? + $clone.isUnique = cloneFrom.isUnique; + $clone.isInliningForbidden = cloneFrom.isInliningForbidden; + for (const [k, v] of cloneFrom._symbolSubstitutes) { + $clone._symbolSubstitutes.set(k, v); + } + for (const v of cloneFrom.placeholders) { + $clone.placeholders.push(v); + } + for (const v of cloneFrom.deferreds) { + $clone.deferreds.push(v); + } + for (const [k, v] of cloneFrom.fixedPlaceholderValues) { + $clone.fixedPlaceholderValues.set(k, v); + } + for (const [k, v] of cloneFrom.relationJoins) { + $clone.relationJoins.set(k, v); + } + for (const v of cloneFrom.joins) { + $clone.joins.push(v); + } + for (const v of cloneFrom.conditions) { + $clone.conditions.push(v); + } + if (cloneFromMatchingMode) { + for (const v of cloneFromMatchingMode.selects) { + $clone.selects.push(v); + } + for (const v of cloneFromMatchingMode.groups) { + $clone.groups.push(v); + } + for (const v of cloneFromMatchingMode.havingConditions) { + $clone.havingConditions.push(v); + } + for (const v of cloneFromMatchingMode.orders) { + $clone.orders.push(v); + } + $clone.isOrderUnique = cloneFromMatchingMode.isOrderUnique; + $clone.firstStepId = cloneFromMatchingMode.firstStepId; + $clone.lastStepId = cloneFromMatchingMode.lastStepId; + $clone.fetchOneExtra = cloneFromMatchingMode.fetchOneExtra; + $clone.offsetStepId = cloneFromMatchingMode.offsetStepId; + // dependencies were already added, so we can just copy the dependency references + $clone.beforeStepId = cloneFromMatchingMode.beforeStepId; + $clone.afterStepId = cloneFromMatchingMode.afterStepId; + $clone.lowerIndexStepId = cloneFromMatchingMode.lowerIndexStepId; + $clone.upperIndexStepId = cloneFromMatchingMode.upperIndexStepId; + } + return $clone; + } + constructor(options) { + super(); + this.isSyncAndSafe = false; + /** + * When SELECTs get merged, symbols also need to be merged. The keys in this + * map are the symbols of PgSelects that don't exist any more, the values are + * symbols of the PgSelects that they were replaced with (which might also not + * exist in future, but we follow the chain so it's fine). + */ + this._symbolSubstitutes = new Map(); + // JOIN + this.relationJoins = new Map(); + this.joins = []; + // WHERE + this.conditions = []; + // GROUP BY + this.groups = []; + // HAVING + this.havingConditions = []; + // ORDER BY + this.orders = []; + this.isOrderUnique = false; + // LIMIT + this.firstStepId = null; + this.lastStepId = null; + this.fetchOneExtra = false; + /** When using natural pagination, this index is the lower bound (and should be excluded) */ + this.lowerIndexStepId = null; + /** When using natural pagination, this index is the upper bound (and should be excluded) */ + this.upperIndexStepId = null; + // OFFSET + this.offsetStepId = null; + // CURSORS + this.beforeStepId = null; + this.afterStepId = null; + // Connection + this.connectionDepId = null; + this.applyDepIds = []; + this.placeholders = []; + this.deferreds = []; + this.fixedPlaceholderValues = new Map(); + /** + * If true, we don't need to add any of the security checks from the + * resource; otherwise we must do so. Default false. + */ + this.isTrusted = false; + /** + * If true, we know at most one result can be matched for each identifier, so + * it's safe to do a `LEFT JOIN` without risk of returning duplicates. Default false. + */ + this.isUnique = false; + /** + * If true, we will not attempt to inline this into the parent query. + * Default false. + */ + this.isInliningForbidden = false; + /** + * The list of things we're selecting. + */ + this.selects = []; + this.locker = new pgLocker_js_1.PgLocker(this); + this._meta = Object.create(null); + this.nullCheckIndex = undefined; + this.needsGroups = false; + const { resource, parameters = resource.parameters, identifiers, args: inArgs, from: inFrom = null, hasImplicitOrder: inHasImplicitOrder, name, mode, joinAsLateral: inJoinAsLateral = false, forceIdentity: inForceIdentity = false, context: inContext, + // Clone only details + _internalCloneSymbol, _internalCloneAlias, } = options; + this.mode = mode ?? "normal"; + this.hasSideEffects = this.mode === "mutation"; + this.resource = resource; + // Since we're applying this to the original it doesn't make sense to + // also apply it to the clones. + if (_internalCloneSymbol === undefined) { + if (this.mode === "aggregate") { + this.locker.beforeLock("orderBy", () => this.locker.lockParameter("groupBy")); + } + } + this.contextId = this.addDependency(inContext ?? resource.executor.context()); + this.name = name ?? resource.name; + this.symbol = _internalCloneSymbol ?? Symbol(this.name); + this.alias = _internalCloneAlias ?? pg_sql2_1.default.identifier(this.symbol); + this.hasImplicitOrder = inHasImplicitOrder ?? resource.hasImplicitOrder; + this.joinAsLateral = inJoinAsLateral ?? !!this.resource.parameters; + this.forceIdentity = inForceIdentity; + { + if (!identifiers) { + throw new Error("Invalid construction of PgSelectStep"); + } + identifiers.forEach((identifier) => { + if (grafast_1.isDev) { + assertSensible(identifier.step); + } + const { step, matches } = identifier; + const codec = identifier.codec || identifier.step.pgCodec; + const expression = matches(this.alias); + const placeholder = this.placeholder(step, codec); + this.where((0, pg_sql2_1.default) `${expression} = ${placeholder}`); + }); + const ourFrom = inFrom ?? resource.from; + this.from = pgFromExpression(this, ourFrom, parameters, inArgs); + } + this.peerKey = this.resource.name; + debugPlanVerbose(`%s (%s) constructor (%s)`, this, this.name, this.mode); + return this; + } + toStringMeta() { + return (this.name + + (this.fetchOneExtra ? "+1" : "") + + (this.mode === "normal" ? "" : `(${this.mode})`)); + } + lock() { + this.locker.lock(); + } + setInliningForbidden(newInliningForbidden = true) { + this.isInliningForbidden = newInliningForbidden; + return this; + } + inliningForbidden() { + return this.isInliningForbidden; + } + setTrusted(newIsTrusted = true) { + if (this.locker.locked) { + throw new Error(`${this}: cannot toggle trusted once plan is locked`); + } + this.isTrusted = newIsTrusted; + return this; + } + trusted() { + return this.isTrusted; + } + /** + * Set this true ONLY if there can be at most one match for each of the + * identifiers. If you set this true when this is not the case then you may + * get unexpected results during inlining; if in doubt leave it at the + * default. + */ + setUnique(newUnique = true) { + if (this.locker.locked) { + throw new Error(`${this}: cannot toggle unique once plan is locked`); + } + this.isUnique = newUnique; + return this; + } + unique() { + return this.isUnique; + } + /** + * Join to a named relationship and return the alias that can be used in + * SELECT, WHERE and ORDER BY. + */ + singleRelation(relationIdentifier) { + const relation = this.resource.getRelation(relationIdentifier); + if (!relation) { + throw new Error(`${this.resource} does not have a relation named '${String(relationIdentifier)}'`); + } + if (!relation.isUnique) { + throw new Error(`${this.resource} relation '${String(relationIdentifier)}' is not unique so cannot be used with singleRelation`); + } + const { remoteResource, localAttributes, remoteAttributes } = relation; + // Join to this relation if we haven't already + const cachedAlias = this.relationJoins.get(relationIdentifier); + if (cachedAlias) { + return cachedAlias; + } + const alias = pg_sql2_1.default.identifier(Symbol(relationIdentifier)); + if (typeof remoteResource.from === "function") { + throw new Error("Callback sources not currently supported via singleRelation"); + } + this.joins.push({ + type: "left", + from: remoteResource.from, + alias, + conditions: localAttributes.map((col, i) => (0, pg_sql2_1.default) `${this.alias}.${pg_sql2_1.default.identifier(col)} = ${alias}.${pg_sql2_1.default.identifier(remoteAttributes[i])}`), + }); + this.relationJoins.set(relationIdentifier, alias); + return alias; + } + /** + * @experimental Please use `singleRelation` or `manyRelation` instead. + */ + join(spec) { + this.joins.push(this.scopedSQL(spec)); + } + getMeta(key) { + return (0, grafast_1.access)(this, ["m", key]); + } + /** + * Select an SQL fragment, returning the index the result will have. + * + * @internal + */ + selectAndReturnIndex(fragmentOrCb) { + const fragment = this.scopedSQL(fragmentOrCb); + if (!this.isArgumentsFinalized) { + throw new Error("Select added before arguments were finalized"); + } + // NOTE: it's okay to add selections after the plan is "locked" - lock only + // applies to which rows are being selected, not what is being queried + // about the rows. + // Optimisation: if we're already selecting this fragment, return the existing one. + const options = { + symbolSubstitutes: this._symbolSubstitutes, + }; + // PERF: performance of this sucks at planning time + const index = this.selects.findIndex((frag) => pg_sql2_1.default.isEquivalent(frag, fragment, options)); + if (index >= 0) { + return index; + } + return this.selects.push(fragment) - 1; + } + /** @internal */ + getNullCheckIndex() { + // PERF: if this isn't coming from a function _and_ it's not being inlined + // via a left-join or similar then we shouldn't need this and should be + // able to drop it. + if (this.nullCheckIndex !== undefined) { + return this.nullCheckIndex; + } + const nullCheckExpression = this.resource.getNullCheckExpression(this.alias); + if (nullCheckExpression) { + this.nullCheckIndex = this.selectAndReturnIndex(nullCheckExpression); + } + else { + this.nullCheckIndex = null; + } + return this.nullCheckIndex; + } + /** + * Finalizes this instance and returns a mutable clone; useful for + * connections/etc (e.g. copying `where` conditions but adding more, or + * pagination, or grouping, aggregates, etc) + */ + clone(mode) { + // Prevent any changes to our original to help avoid programming + // errors. + this.lock(); + return PgSelectStep.clone(this, mode); + } + connectionClone($connection, mode) { + const $plan = this.clone(mode); + // In case any errors are raised + $plan.connectionDepId = $plan.addDependency($connection); + return $plan; + } + where(rawCondition) { + if (this.locker.locked) { + throw new Error(`${this}: cannot add conditions once plan is locked ('where')`); + } + const condition = this.scopedSQL(rawCondition); + if (pg_sql2_1.default.isSQL(condition)) { + this.conditions.push(condition); + } + else { + switch (condition.type) { + case "attribute": { + this.conditions.push(this.scopedSQL((sql) => condition.callback(sql `${this.alias}.${sql.identifier(condition.attribute)}`))); + break; + } + default: { + const never = condition.type; + console.error("Unsupported condition: ", never); + throw new Error(`Unsupported condition`); + } + } + } + } + groupBy(group) { + this.locker.assertParameterUnlocked("groupBy"); + if (this.mode !== "aggregate") { + throw new grafast_1.SafeError(`Cannot add groupBy to a non-aggregate query`); + } + this.groups.push(this.scopedSQL(group)); + } + having(rawCondition) { + if (this.locker.locked) { + throw new Error(`${this}: cannot add having conditions once plan is locked ('having')`); + } + if (this.mode !== "aggregate") { + throw new grafast_1.SafeError(`Cannot add having to a non-aggregate query`); + } + const condition = this.scopedSQL(rawCondition); + if (pg_sql2_1.default.isSQL(condition)) { + this.havingConditions.push(condition); + } + else { + const never = condition; + console.error("Unsupported condition: ", never); + throw new Error(`Unsupported condition`); + } + } + orderBy(order) { + this.locker.assertParameterUnlocked("orderBy"); + this.orders.push(this.scopedSQL(order)); + } + setOrderIsUnique() { + if (this.locker.locked) { + throw new Error(`${this}: cannot set order unique once plan is locked`); + } + this.isOrderUnique = true; + } + apply($step) { + if ($step instanceof grafast_1.ConstantStep) { + $step.data(this); + } + else { + this.applyDepIds.push(this.addUnaryDependency($step)); + } + } + assertCursorPaginationAllowed() { + if (this.mode === "aggregate") { + throw new grafast_1.SafeError("Cannot use cursor pagination on an aggregate PgSelectStep"); + } + } + items() { + return this.operationPlan.cacheStep(this, "items", "" /* Digest of our arguments */, () => new PgSelectRowsStep(this)); + } + pageInfo($connectionPlan) { + this.assertCursorPaginationAllowed(); + this.lock(); + return (0, pgPageInfo_js_1.pgPageInfo)($connectionPlan); + } + getCursorDetails() { + this.needsCursor = true; + return (0, grafast_1.access)(this, "cursorDetails"); + } + getGroupDetails() { + this.needsGroups = true; + return (0, grafast_1.access)(this, "groupDetails"); + } + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + async execute(executionDetails) { + const { indexMap, count, values, extra: { eventEmitter }, stream, } = executionDetails; + const { meta, text, rawSqlValues, textForDeclare, rawSqlValuesForDeclare, identifierIndex, name, streamInitialCount, queryValues, shouldReverseOrder, first, last, cursorDetails, groupDetails, } = buildTheQuery({ + executionDetails, + // Stuff directly referencing dependency IDs + firstStepId: this.firstStepId, + lastStepId: this.lastStepId, + offsetStepId: this.offsetStepId, + afterStepId: this.afterStepId, + beforeStepId: this.beforeStepId, + applyDepIds: this.applyDepIds, + // Stuff referencing dependency IDs in a nested fashion + placeholders: this.placeholders, + deferreds: this.deferreds, + // Fixed stuff that is local to us (aka "StaticInfo") + ...PgSelectStep.getStaticInfo(this), + }); + if (first === 0 || last === 0) { + return (0, grafast_1.arrayOfLength)(count, NO_ROWS); + } + const contextDep = values[this.contextId]; + if (stream == null) { + const specs = indexMap((i) => { + const context = contextDep.at(i); + return { + // The context is how we'd handle different connections with different claims + context, + queryValues: identifierIndex != null + ? queryValues.map(({ dependencyIndex, codec }) => { + const val = values[dependencyIndex].at(i); + return val == null ? null : codec.toPg(val); + }) + : EMPTY_ARRAY, + }; + }); + const executeMethod = this.operationPlan.operation.operation === "query" + ? "executeWithCache" + : "executeWithoutCache"; + const executionResult = await this.resource[executeMethod](specs, { + text, + rawSqlValues, + identifierIndex, + name, + eventEmitter, + useTransaction: this.mode === "mutation", + }); + // debugExecute("%s; result: %c", this, executionResult); + return executionResult.values.map((allVals) => { + if ((0, grafast_1.isPromiseLike)(allVals)) { + // Must be an error + return allVals; + } + return createSelectResult(allVals, { + first, + last, + fetchOneExtra: this.fetchOneExtra, + shouldReverseOrder, + meta, + cursorDetails, + groupDetails, + }); + }); + } + else { + if (shouldReverseOrder !== false) { + throw new Error("shouldReverseOrder must be false for stream"); + } + if (!rawSqlValuesForDeclare || !textForDeclare) { + throw new Error("declare query must exist for stream"); + } + let specs = null; + if (text) { + specs = indexMap((i) => { + const context = contextDep.at(i); + return { + // The context is how we'd handle different connections with different claims + context, + queryValues: identifierIndex != null + ? queryValues.map(({ dependencyIndex, codec }) => { + const val = values[dependencyIndex].at(i); + return val == null ? null : codec.toPg(val); + }) + : EMPTY_ARRAY, + }; + }); + } + const initialFetchResult = specs + ? (await this.resource.executeWithoutCache(specs, { + text, + rawSqlValues, + identifierIndex, + eventEmitter, + })).values + : null; + const streamSpecs = indexMap((i) => { + const context = contextDep.at(i); + return { + // The context is how we'd handle different connections with different claims + context, + queryValues: identifierIndex != null + ? queryValues.map(({ dependencyIndex, codec }) => { + const val = values[dependencyIndex].at(i); + return val == null ? val : codec.toPg(val); + }) + : EMPTY_ARRAY, + }; + }); + const streams = (await this.resource.executeStream(streamSpecs, { + text: textForDeclare, + rawSqlValues: rawSqlValuesForDeclare, + identifierIndex, + eventEmitter, + })).streams; + return streams.map((iterable, idx) => { + if (!(0, grafast_1.isAsyncIterable)(iterable)) { + // Must be an error + return iterable; + } + if (!initialFetchResult) { + return { + hasMore: false, + items: iterable, + cursorDetails, + groupDetails, + m: meta, + }; + } + // Munge the initialCount records into the streams + const innerIterator = iterable[Symbol.asyncIterator](); + let i = 0; + let done = false; + const l = initialFetchResult[idx].length; + const mergedGenerator = { + async [Symbol.asyncDispose]() { + await this.return(undefined); + }, + next() { + if (done) { + return Promise.resolve({ value: undefined, done }); + } + else if (i < l) { + return Promise.resolve({ + value: initialFetchResult[idx][i++], + done, + }); + } + else if (streamInitialCount != null && l < streamInitialCount) { + done = true; + innerIterator.return?.(); + return Promise.resolve({ value: undefined, done }); + } + else { + return innerIterator.next(); + } + }, + return(value) { + done = true; + return (innerIterator.return?.(value) ?? + Promise.resolve({ value: undefined, done })); + }, + throw(e) { + done = true; + return (innerIterator.throw?.(e) ?? + Promise.resolve({ value: undefined, done })); + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + return { + hasMore: false, + items: mergedGenerator, + cursorDetails, + groupDetails, + m: meta, + }; + }); + } + } + finalize() { + // In case we have any lock actions in future: + this.lock(); + // Now we need to be able to mess with ourself, but be sure to lock again + // at the end. + this.locker.locked = false; + this.locker.locked = true; + super.finalize(); + } + deduplicate(peers) { + if (!this.isTrusted) { + this.resource.applyAuthorizationChecksToPlan(this); + this.isTrusted = true; + } + this.locker.lockAllParameters(); + return peers.filter(($p) => { + if ($p === this) { + return true; + } + const p = $p; + // If SELECT, FROM, JOIN, WHERE, ORDER, GROUP BY, HAVING, LIMIT, OFFSET + // all match with one of our peers then we can replace ourself with one + // of our peers. NOTE: we do _not_ merge SELECTs at this stage because + // that would require mapping, and mapping should not be done during + // deduplicate because it would interfere with optimize. So, instead, + // we try to ensure that as few selects as possible exist in the plan + // at this stage. + // Check FROM matches + if (p.resource !== this.resource) { + return false; + } + // Check mode matches + if (p.mode !== this.mode) { + return false; + } + // Since deduplicate runs before we have children, we do not need to + // check the symbol or alias matches. We do need to factor the different + // symbols into SQL equivalency checks though. + const symbolSubstitutes = new Map(); + const options = { symbolSubstitutes }; + if (typeof this.symbol === "symbol" && typeof p.symbol === "symbol") { + if (this.symbol !== p.symbol) { + symbolSubstitutes.set(this.symbol, p.symbol); + } + else { + // Fine :) + } + } + else if (this.symbol !== p.symbol) { + return false; + } + // Check PLACEHOLDERS match + if (!(0, pg_sql2_1.arraysMatch)(this.placeholders, p.placeholders, (a, b) => { + const equivalent = a.codec === b.codec && a.dependencyIndex === b.dependencyIndex; + if (equivalent) { + if (a.symbol !== b.symbol) { + // Make symbols appear equivalent + symbolSubstitutes.set(a.symbol, b.symbol); + } + } + return equivalent; + })) { + debugPlanVerbose("Refusing to deduplicate %c with %c because the placeholders don't match", this, p); + return false; + } + // Check DEFERREDs match + if (!(0, pg_sql2_1.arraysMatch)(this.deferreds, p.deferreds, (a, b) => { + const equivalent = a.dependencyIndex === b.dependencyIndex; + if (equivalent) { + if (a.symbol !== b.symbol) { + // Make symbols appear equivalent + symbolSubstitutes.set(a.symbol, b.symbol); + } + } + return equivalent; + })) { + debugPlanVerbose("Refusing to deduplicate %c with %c because the deferreds don't match", this, p); + return false; + } + const sqlIsEquivalent = (a, b) => pg_sql2_1.default.isEquivalent(a, b, options); + // Check trusted matches + if (p.trusted !== this.trusted) { + return false; + } + // Check inliningForbidden matches + if (p.inliningForbidden !== this.inliningForbidden) { + return false; + } + // Check FROM + if (!sqlIsEquivalent(p.from, this.from)) { + return false; + } + // Check SELECT matches + if (!(0, pg_sql2_1.arraysMatch)(this.selects, p.selects, sqlIsEquivalent)) { + return false; + } + // Check GROUPs match + if (!(0, pg_sql2_1.arraysMatch)(this.groups, p.groups, (a, b) => sqlIsEquivalent(a.fragment, b.fragment))) { + return false; + } + // Check HAVINGs match + if (!(0, pg_sql2_1.arraysMatch)(this.havingConditions, p.havingConditions, sqlIsEquivalent)) { + return false; + } + // Check ORDERs match + if (!(0, pg_sql2_1.arraysMatch)(this.orders, p.orders, (a, b) => { + if (a.direction !== b.direction) + return false; + if (a.nulls !== b.nulls) + return false; + if (a.attribute != null) { + if (b.attribute !== a.attribute) + return false; + // ENHANCEMENT: really should compare if the result is equivalent? + return a.callback === b.callback; + } + else { + if (b.attribute != null) + return false; + return sqlIsEquivalent(a.fragment, b.fragment); + } + })) { + return false; + } + const depsMatch = (myDepId, theirDepId) => this.maybeGetDep(myDepId) === p.maybeGetDep(theirDepId); + // Check LIMIT, OFFSET and CURSOR matches + if (!depsMatch(this.firstStepId, p.firstStepId) || + !depsMatch(this.lastStepId, p.lastStepId) || + !depsMatch(this.offsetStepId, p.offsetStepId) || + !depsMatch(this.lowerIndexStepId, p.lowerIndexStepId) || + !depsMatch(this.upperIndexStepId, p.upperIndexStepId)) { + return false; + } + // Check JOINs match + if (!(0, pg_sql2_1.arraysMatch)(this.joins, p.joins, (a, b) => joinMatches(a, b, sqlIsEquivalent))) { + debugPlanVerbose("Refusing to deduplicate %c with %c because the joins don't match", this, p); + return false; + } + // Check WHEREs match + if (!(0, pg_sql2_1.arraysMatch)(this.conditions, p.conditions, sqlIsEquivalent)) { + debugPlanVerbose("Refusing to deduplicate %c with %c because the conditions don't match", this, p); + return false; + } + debugPlanVerbose("Found that %c and %c are equivalent!", this, p); + return true; + }); + } + /** @internal */ + deduplicatedWith(replacement) { + if (typeof this.symbol === "symbol" && + typeof replacement.symbol === "symbol") { + if (this.symbol !== replacement.symbol) { + replacement._symbolSubstitutes.set(this.symbol, replacement.symbol); + } + else { + // Fine :) + } + } + if (this.fetchOneExtra) { + replacement.fetchOneExtra = true; + } + if (this.needsCursor) { + replacement.needsCursor = true; + } + } + getParentForInlining() { + /** + * These are the dependencies that are not PgClassExpressionSteps, we just + * need them to be at a higher level than $pgSelect + */ + const otherDeps = []; + /** + * This is the PgSelectStep that we would like to try and inline ourself + * into. If `undefined`, this hasn't been found yet. If `null`, this has + * been explicitly forbidden due to a mismatch of some kind. + */ + let $pgSelect = undefined; + /** + * This is the pgSelectSingle representing a single record from $pgSelect, + * it's used when remapping of keys is required after inlining ourself into + * $pgSelect. + */ + let $pgSelectSingle = undefined; + // Scan through the dependencies to find a suitable ancestor step to merge with + for (let dependencyIndex = 0, l = this.dependencies.length; dependencyIndex < l; dependencyIndex++) { + if (dependencyIndex === this.contextId) { + // We check myContext vs tsContext below; so lets assume it's fine + // for now. + continue; + } + let $dep = this.getDep(dependencyIndex); + if ($dep instanceof PgFromExpressionStep) { + const digest0 = $dep.getDigest(0); + if (digest0?.step && digest0.step instanceof pgClassExpression_js_1.PgClassExpressionStep) { + $dep = digest0.step; + } + } + if ($dep instanceof pgClassExpression_js_1.PgClassExpressionStep) { + const $depPgSelectSingle = $dep.getParentStep(); + if (!($depPgSelectSingle instanceof pgSelectSingle_js_1.PgSelectSingleStep)) { + continue; + } + const $depPgSelect = $depPgSelectSingle.getClassStep(); + if ($depPgSelect === this) { + throw new Error(`Recursion error - record plan ${$dep} is dependent on ${$depPgSelect}, and ${this} is dependent on ${$dep}`); + } + if ($depPgSelect.hasSideEffects) { + // It's a mutation; don't merge + continue; + } + // Don't allow merging across a stream/defer/subscription boundary + if (!(0, grafast_1.stepsAreInSamePhase)($depPgSelect, this)) { + continue; + } + // Don't want to make this a join as it can result in the order being + // messed up + if ($depPgSelect.hasImplicitOrder && + !this.joinAsLateral && + this.isUnique) { + continue; + } + /* + if (!planGroupsOverlap(this, t2)) { + // We're not in the same group (i.e. there's probably a @defer or + // @stream between us) - do not merge. + continue; + } + */ + if ($pgSelect === undefined && $pgSelectSingle === undefined) { + $pgSelectSingle = $depPgSelectSingle; + $pgSelect = $depPgSelect; + } + else if ($depPgSelect !== $pgSelect) { + debugPlanVerbose("Refusing to optimise %c due to dependency %c depending on different class (%c != %c)", this, $dep, $depPgSelect, $pgSelect); + $pgSelect = null; + break; + } + else if ($depPgSelectSingle !== $pgSelectSingle) { + debugPlanVerbose("Refusing to optimise %c due to parent dependency mismatch: %c != %c", this, $depPgSelectSingle, $pgSelectSingle); + $pgSelect = null; + break; + } + } + else { + otherDeps.push($dep); + } + } + // Check the contexts are the same + if ($pgSelect != null && $pgSelectSingle != null) { + const myContext = this.getDep(this.contextId); + const tsContext = $pgSelect.getDep($pgSelect.contextId); + if (myContext !== tsContext) { + debugPlanVerbose("Refusing to optimise %c due to own context dependency %c differing from tables context dependency %c (%c, %c)", this, myContext, tsContext, $pgSelect.dependencies[$pgSelect.contextId], $pgSelect); + $pgSelect = null; + } + } + // Check the dependencies can be moved across to `t` + if ($pgSelect != null && $pgSelectSingle != null) { + for (const dep of otherDeps) { + if ($pgSelect.canAddDependency(dep)) { + // All good; just move the dependency over + } + else { + debugPlanVerbose("Refusing to optimise %c due to dependency %c which cannot be added as a dependency of %c", this, dep, $pgSelect); + $pgSelect = null; + break; + } + } + } + if ($pgSelect != null && $pgSelectSingle != null) { + // Looks feasible. + if ($pgSelect.id === this.id) { + throw new Error(`Something's gone catastrophically wrong - ${this} is trying to merge with itself!`); + } + return { $pgSelect, $pgSelectSingle }; + } + else { + return null; + } + } + mergeSelectsWith(otherPlan) { + const actualKeyByDesiredKey = Object.create(null); + this.selects.forEach((frag, idx) => { + actualKeyByDesiredKey[idx] = otherPlan.selectAndReturnIndex(frag); + }); + return actualKeyByDesiredKey; + } + /** + * - Merge placeholders + * - Merge fixedPlaceholders + * - Merge deferreds + * - Merge _symbolSubstitutes + */ + mergePlaceholdersInto($target) { + for (const placeholder of this.placeholders) { + const { dependencyIndex, symbol, codec, alreadyEncoded } = placeholder; + const dep = this.getDep(dependencyIndex); + /* + * We have dependency `dep`. We're attempting to merge ourself into + * `otherPlan`. We have two situations we need to handle: + * + * 1. `dep` is not dependent on `otherPlan`, in which case we can add + * `dep` as a dependency to `otherPlan` without creating a cycle, or + * 2. `dep` is dependent on `otherPlan` (for example, it might be the + * result of selecting an expression in the `otherPlan`), in which + * case we should turn it into an SQL expression and inline that. + */ + // PERF: we know dep can't depend on otherPlan if + // `isStaticInputStep(dep)` or `dep`'s layerPlan is an ancestor of + // `otherPlan`'s layerPlan. + if ((0, grafast_1.stepAMayDependOnStepB)($target, dep)) { + // Either dep is a static input plan (which isn't dependent on anything + // else) or otherPlan is deeper than dep; either way we can use the dep + // directly within otherPlan. + const newPlanIndex = $target.addDependency(dep); + $target.placeholders.push({ + dependencyIndex: newPlanIndex, + codec, + symbol, + alreadyEncoded, + }); + } + else if (dep instanceof pgClassExpression_js_1.PgClassExpressionStep) { + // Replace with a reference. + $target.fixedPlaceholderValues.set(placeholder.symbol, dep.toSQL()); + } + else { + throw new Error(`Could not merge placeholder from unsupported plan type: ${dep}`); + } + } + for (const [sqlPlaceholder, placeholderValue,] of this.fixedPlaceholderValues.entries()) { + if ($target.fixedPlaceholderValues.has(sqlPlaceholder) && + $target.fixedPlaceholderValues.get(sqlPlaceholder) !== placeholderValue) { + throw new Error(`${$target} already has an identical placeholder with a different value when trying to mergePlaceholdersInto it from ${this}`); + } + $target.fixedPlaceholderValues.set(sqlPlaceholder, placeholderValue); + } + for (const { symbol, dependencyIndex } of this.deferreds) { + const dep = this.getDep(dependencyIndex); + if ((0, grafast_1.stepAMayDependOnStepB)($target, dep)) { + const newPlanIndex = $target.addDependency(dep); + $target.deferreds.push({ + dependencyIndex: newPlanIndex, + symbol, + }); + } + else if (dep instanceof PgFromExpressionStep) { + const newDep = $target.withLayerPlan(() => dep.inlineInto($target)); + const newPlanIndex = $target.addDependency(newDep); + $target.deferreds.push({ + dependencyIndex: newPlanIndex, + symbol, + }); + } + else { + throw new Error(`Could not merge placeholder from unsupported plan type: ${dep}`); + } + } + for (const [a, b] of this._symbolSubstitutes.entries()) { + if (grafast_1.isDev) { + if ($target._symbolSubstitutes.has(a) && + $target._symbolSubstitutes.get(a) !== b) { + throw new Error(`Conflict when setting a substitute whilst merging ${this} into ${$target}; symbol already has a substitute, and it's different.`); + } + } + $target._symbolSubstitutes.set(a, b); + } + } + optimize({ stream }) { + // In case we have any lock actions in future: + this.lock(); + // Inline ourself into our parent if we can. + let parentDetails; + if (!this.isInliningForbidden && + !this.hasSideEffects && + !stream && + !this.joins.some((j) => j.type !== "left") && + (parentDetails = this.getParentForInlining()) !== null && + parentDetails.$pgSelect.mode === "normal") { + const { $pgSelect, $pgSelectSingle } = parentDetails; + if (this.mode === "normal" && + this.isUnique && + this.firstStepId == null && + this.lastStepId == null && + this.offsetStepId == null && + // For uniques these should all pass anyway, but pays to be cautious.. + this.groups.length === 0 && + this.havingConditions.length === 0 && + this.orders.length === 0 && + !this.fetchOneExtra) { + // Allow, do it via left join + debugPlanVerbose("Merging %c into %c (via %c)", this, $pgSelect, $pgSelectSingle); + this.mergePlaceholdersInto($pgSelect); + const identifier = `joinDetailsFor${this.id}`; + $pgSelect.withLayerPlan(() => { + $pgSelect.apply(new PgSelectInlineApplyStep(identifier, false, { + staticInfo: PgSelectStep.getStaticInfo(this), + $first: this.maybeGetDep(this.firstStepId), + $last: this.maybeGetDep(this.lastStepId), + $offset: this.maybeGetDep(this.offsetStepId), + $after: this.maybeGetDep(this.afterStepId), + $before: this.maybeGetDep(this.beforeStepId), + applySteps: this.applyDepIds.map((depId) => this.getDep(depId)), + })); + }); + const $details = $pgSelect.getMeta(identifier); + return (0, grafast_1.lambda)([$details, $pgSelectSingle], pgInlineViaJoinTransform, true); + } + else { + /* + // TODO: this isn't really accurate plus it's expensive to calculate; fix it properly! + // An approximation of "belongs to" is: we're referencing a unique combination of columns on the parent. + const relationshipIsBelongsTo = $pgSelect.resource.uniques.some((u) => + u.attributes.every((remoteColumn) => { + const remoteColumnExpression = sql`${ + $pgSelect.alias + }.${sql.identifier(String(remoteColumn))}`; + return identifierMatchesExpressions.some((e) => + sql.isEquivalent(e, remoteColumnExpression), + ); + }), + ); + */ + const relationshipIsBelongsTo = true; + const allowed = ALWAYS_ALLOWED || + $pgSelectSingle.getAndFreezeIsUnary() || + (!$pgSelect.isUnique && relationshipIsBelongsTo); + if (allowed) { + // Add a nested select expression + const $__item = $pgSelectSingle.getItemStep(); + this.mergePlaceholdersInto($pgSelect); + const identifier = `subqueryDetailsFor${this.id}`; + $pgSelect.withLayerPlan(() => { + $pgSelect.apply(new PgSelectInlineApplyStep(identifier, true, { + staticInfo: PgSelectStep.getStaticInfo(this), + $first: this.maybeGetDep(this.firstStepId), + $last: this.maybeGetDep(this.lastStepId), + $offset: this.maybeGetDep(this.offsetStepId), + $after: this.maybeGetDep(this.afterStepId), + $before: this.maybeGetDep(this.beforeStepId), + applySteps: this.applyDepIds.map((depId) => this.getDep(depId)), + })); + }); + const $details = $pgSelect.getMeta(identifier); + return (0, grafast_1.lambda)([$details, $__item], pgInlineViaSubqueryTransform, true); + } + } + } + // PERF: we should serialize our `SELECT` clauses and then if any are + // identical we should omit the later copies and have them link back to the + // earliest version (resolve this in `execute` via mapping). + // TODO: have connection validate cursor + /* + if (this.connectionDepId === null) { + const $validate = pgValidateParsedCursor( + $parsedCursorPlan, + digest, + orderCount, + beforeOrAfter, + ); + this.addDependency($validate); + } else { + // To make the error be thrown in the right place, we should also add this error to our parent connection + const $connection = this.getDep>( + this.connectionDepId, + ); + $connection.addValidation(() => { + return pgValidateParsedCursor( + $parsedCursorPlan, + digest, + orderCount, + beforeOrAfter, + ); + }); + } + */ + return this; + } + /** + * Most likely you want `.single()` instead of this method. + * + * If this plan may only return one record, you can use `.singleAsRecord()` + * to return a plan that resolves to that record (rather than a list of + * records as it does currently). + * + * The main reason to use this instead of `.single()` is if you are + * paginating over a scalar and you truly need a PgSelectSingleStep interface + * e.g. so you can get the `count(*)` aggregate. + * + * Beware: if you call this and the database might actually return more than + * one record then you're potentially in for a Bad Time. + */ + singleAsRecord(options) { + this.setUnique(true); + return new pgSelectSingle_js_1.PgSelectSingleStep(this, (0, grafast_1.first)(this), options); + } + /** + * If this plan may only return one record, you can use `.single()` to return + * a plan that resolves to either that record (in the case of composite + * types) or the underlying scalar (in the case of a resource whose codec has + * no attributes). + * + * Beware: if you call this and the database might actually return more than + * one record then you're potentially in for a Bad Time. + */ + single(options) { + const $single = this.singleAsRecord(options); + const isScalar = !this.resource.codec.attributes; + return (isScalar ? $single.getSelfNamed() : $single); + } + row($row, options) { + return new pgSelectSingle_js_1.PgSelectSingleStep(this, $row, options); + } + /** + * When you return a plan in a situation where GraphQL is expecting a + * GraphQLList, it must implement the `.listItem()` method to return a plan + * for an individual item within this list. Grafast will automatically call + * this (possibly recursively) to pass to the plan resolvers on the children + * of this field. + * + * NOTE: Grafast handles the list indexes for you, so your list item plan + * should process just the single input list item. + * + * IMPORTANT: do not call `.listItem` from user code; it's only intended to + * be called by Grafast. + */ + listItem(itemPlan) { + const $single = new pgSelectSingle_js_1.PgSelectSingleStep(this, itemPlan); + const isScalar = !this.resource.codec.attributes; + return (isScalar ? $single.getSelfNamed() : $single); + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } + whereBuilder() { + return new pgCondition_js_1.PgCondition(this); + } + havingBuilder() { + return new pgCondition_js_1.PgCondition(this, true); + } + setMeta(key, value) { + this._meta[key] = value; + } + getMetaRaw(key) { + return this._meta[key]; + } + static getStaticInfo($source) { + return { + forceIdentity: $source.forceIdentity, + havingConditions: $source.havingConditions, + mode: $source.mode, + hasSideEffects: $source.hasSideEffects, + name: $source.name, + alias: $source.alias, + symbol: $source.symbol, + resource: $source.resource, + groups: $source.groups, + orders: $source.orders, + selects: $source.selects, + fetchOneExtra: $source.fetchOneExtra, + isOrderUnique: $source.isOrderUnique, + isUnique: $source.isUnique, + conditions: $source.conditions, + from: $source.from, + joins: $source.joins, + needsCursor: $source.needsCursor, + needsGroups: $source.needsGroups, + relationJoins: $source.relationJoins, + meta: $source._meta, + placeholderSymbols: $source.placeholders.map((p) => p.symbol), + deferredSymbols: $source.deferreds.map((p) => p.symbol), + fixedPlaceholderValues: $source.fixedPlaceholderValues, + _symbolSubstitutes: $source._symbolSubstitutes, + joinAsLateral: $source.joinAsLateral, + }; + } +} +exports.PgSelectStep = PgSelectStep; +class PgSelectRowsStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgSelectRowsStep", + }; } + constructor($pgSelect) { + super(); + this.isSyncAndSafe = false; + this.addDependency($pgSelect); + } + getClassStep() { + return this.getDepOptions(0).step; + } + listItem(itemPlan) { + return this.getClassStep().listItem(itemPlan); + } + deduplicate(_peers) { + // We don't have any properties, and dependencies is already checked, so we're the same as our kin. + return _peers; + } + // optimize() { + // const $access = access(this.getClassStep(), "items"); + // $access.isSyncAndSafe = false; + // return $access; + // } + execute(executionDetails) { + const pgSelect = executionDetails.values[0]; + return executionDetails.indexMap((i) => pgSelect.at(i).items); + } +} +exports.PgSelectRowsStep = PgSelectRowsStep; +function joinMatches(j1, j2, sqlIsEquivalent) { + if (j1.type === "cross") { + if (j2.type !== j1.type) { + return false; + } + if (!sqlIsEquivalent(j1.from, j2.from)) { + return false; + } + if (!sqlIsEquivalent(j1.alias, j2.alias)) { + return false; + } + return true; + } + else { + if (j2.type !== j1.type) { + return false; + } + if (!sqlIsEquivalent(j1.from, j2.from)) { + return false; + } + if (!sqlIsEquivalent(j1.alias, j2.alias)) { + return false; + } + if (!(0, pg_sql2_1.arraysMatch)(j1.conditions, j2.conditions, sqlIsEquivalent)) { + return false; + } + return true; + } +} +/** + * Apply a default order in case our default is not unique. + */ +function makeOrderUniqueIfPossible(info) { + // Never re-order aggregates + if (info.mode === "aggregate") + return; + // If we're already uniquely ordered, no need to order + if (info.isOrderUnique) + return; + // No need to order a unique record + if (info.isUnique) + return; + const { alias, resource: { uniques, codec: { attributes }, }, } = info; + const unique = uniques[0]; + // Nothing unique to order by + if (unique == null) + return; + for (const c of unique.attributes) { + info.orders.push({ + fragment: (0, pg_sql2_1.default) `${alias}.${pg_sql2_1.default.identifier(c)}`, + codec: attributes[c].codec, + direction: "ASC", + }); + } + info.isOrderUnique = true; +} +function pgSelect(options) { + return new PgSelectStep(options); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgSelect, "pgSelect"); +/** + * Turns a list of records (e.g. from PgSelectSingleStep.record()) back into a PgSelect. + */ +function pgSelectFromRecords(resource, records) { + return new PgSelectStep({ + resource, + identifiers: [], + from: (records) => (0, pg_sql2_1.default) `unnest(${records.placeholder})`, + args: [{ step: records, pgCodec: (0, codecs_js_1.listOfCodec)(resource.codec) }], + }); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgSelectFromRecords, "pgSelectFromRecords"); +function sqlFromArgDigests(digests) { + const args = digests.map((digest) => { + if (digest.name) { + return (0, pg_sql2_1.default) `${pg_sql2_1.default.identifier(digest.name)} := ${digest.placeholder}`; + } + else { + return digest.placeholder; + } + }); + return digests.length > 1 + ? pg_sql2_1.default.indent(pg_sql2_1.default.join(args, ",\n")) + : pg_sql2_1.default.join(args, ", "); +} +(0, grafast_1.exportAs)("@dataplan/pg", sqlFromArgDigests, "sqlFromArgDigests"); +// Previously: digestsFromArgumentSpecs; now combined +function pgFromExpression($target, baseFrom, inParameters = undefined, specs = []) { + if (typeof baseFrom !== "function") { + return baseFrom; + } + if (specs.length === 0) { + return baseFrom(); + } + if (specs.every((spec) => "placeholder" in spec && spec.placeholder != null)) { + return baseFrom(...specs); + } + const $placeholderable = $target.getPgRoot(); + let parameters; + if (!inParameters) { + const params = []; + for (const spec of specs) { + if (spec.step) { + if (spec.pgCodec) { + params.push({ + name: spec.name ?? null, + codec: spec.pgCodec, + required: false, + }); + } + else { + params.push({ + name: spec.name ?? null, + codec: spec.step.pgCodec, + required: false, + }); + } + } + else { + throw new Error(`Cannot use placeholder steps without passing accurate placeholders`); + } + } + parameters = params; + } + else { + parameters = inParameters; + } + if (specs.length > parameters.length) { + throw new Error(`Attempted to build function-like from expression for ${$placeholderable}, but insufficient parameter definitions (${parameters.length}) were provided for the arguments passed (${specs.length}).`); + } + const digests = []; + for (const spec of specs) { + if (spec.step) { + if (grafast_1.isDev) { + assertSensible(spec.step); + } + const { step, name } = spec; + const codec = "pgCodec" in spec ? spec.pgCodec : spec.step.pgCodec; + if (step.getAndFreezeIsUnary()) { + // It's a unary step; depend on it directly because it allows us to do + // things like not passing parameters to PostgreSQL functions where + // those parameters are optional. (Without this, we'd supply `null` + // to these parameters, which would result in a different behavior.) + digests.push({ + name, + step, + }); + } + else { + const placeholder = $placeholderable.placeholder(step, codec); + digests.push({ + name, + placeholder, + }); + } + } + else { + digests.push(spec); + } + } + return $placeholderable.withLayerPlan(() => $placeholderable.deferredSQL(new PgFromExpressionStep(baseFrom, parameters, digests))); +} +/** @internal */ +class PgFromExpressionStep extends grafast_1.UnbatchedStep { + constructor(from, parameters, digests) { + super(); + this.from = from; + this.parameters = parameters; + this.isSyncAndSafe = true; + if (this.getAndFreezeIsUnary() !== true) { + throw new Error(`PgFromExpressionStep must be unary`); + } + this.parameterAnalysis = generatePgParameterAnalysis(this.parameters); + this.digests = digests.map((digest) => { + if (digest.step) { + const { step, ...rest } = digest; + const depId = this.addDependency(digest.step); + return { ...rest, depId }; + } + else { + return digest; + } + }); + } + /** @internal */ + getDigest(index) { + const digest = this.digests[index]; + if (!digest) + return null; + if (digest.depId != null) { + const { depId, ...rest } = digest; + return { + ...rest, + step: this.getDepOptions(depId).step, + }; + } + else { + return digest; + } + } + /** @internal */ + inlineInto($target) { + return new PgFromExpressionStep(this.from, this.parameters, this.digests.map((d) => { + if (d.depId != null) { + const { depId, ...rest } = d; + const step = this.getDep(depId); + if (step instanceof pgClassExpression_js_1.PgClassExpressionStep) { + const $parent = step.getParentStep(); + if ($parent instanceof pgSelectSingle_js_1.PgSelectSingleStep) { + const $pgSelect = $parent.getClassStep(); + if ($pgSelect === $target) { + const { position, name } = rest; + return { + position, + name, + placeholder: step.expression, + }; + } + } + } + return { + ...rest, + step, + }; + } + else { + return d; + } + })); + } + deduplicate(peers) { + return peers.filter((p) => { + if (p.from !== this.from) { + return false; + } + if (!(0, pg_sql2_1.arraysMatch)(p.parameters, this.parameters, (a, b) => a.name === b.name && + a.codec === b.codec && + a.notNull === b.notNull && + a.required === b.required && + a.extensions === b.extensions)) { + return false; + } + if (!(0, pg_sql2_1.arraysMatch)(p.digests, this.digests, (a, b) => { + return (a.name === b.name && + a.position === b.position && + a.depId === b.depId && + a.placeholder === b.placeholder); + })) { + return false; + } + return true; + }); + } + unbatchedExecute(_extra, ...deps) { + const digests = this.digests.map((d) => d.depId != null ? { ...d, value: deps[d.depId] } : d); + return pgFromExpressionRuntime(this.from, this.parameters, digests, this.parameterAnalysis); + } +} +const $$generationCheck = Symbol("Used parameterAnalysis()"); +function generatePgParameterAnalysis(parameters) { + const parameterByName = Object.create(null); + let indexAfterWhichAllArgsAreNamed = 0; + for (let i = 0, l = parameters.length; i < l; i++) { + const param = parameters[i]; + if (param.name != null) { + parameterByName[param.name] = param; + } + // Note that `name = ''` counts as having no name. + if (!param.name) { + indexAfterWhichAllArgsAreNamed = i + 1; + } + } + return { + /** DO NOT GENERATE THIS OBJECT YOURSELF! Use generateParameterAnalysis(parameters) */ + [$$generationCheck]: parameters, + parameterByName, + indexAfterWhichAllArgsAreNamed, + }; +} +function pgFromExpressionRuntime(from, parameters, digests, parameterAnalysis = generatePgParameterAnalysis(parameters)) { + if (!parameterAnalysis[$$generationCheck]) { + throw new Error(`You must not generate the parameter analysis yourself; use generateParameterAnalysis(parameters)`); + } + if (parameterAnalysis[$$generationCheck] !== parameters) { + throw new Error(`This parameter analysis was produced for a different set of parameters; perhaps you sliced the array?`); + } + const { parameterByName, indexAfterWhichAllArgsAreNamed } = parameterAnalysis; + /** + * If true, we can only use named parameters now. Set this if we skip an + * entry, or if the input has a name that doesn't match the parameter name. + */ + let namedOnly = false; + let argIndex = 0; + const args = []; + for (let digestIndex = 0, digestsCount = digests.length; digestIndex < digestsCount; digestIndex++) { + const digest = digests[digestIndex]; + if (!namedOnly && + // Note that name can be the empty string, we treat that as "no name" + digest.name && + parameters[digestIndex].name !== digest.name) { + namedOnly = true; + } + if (namedOnly && !digest.name) { + throw new Error(`Cannot have unnamed argument after named arguments at index ${digestIndex}`); + } + const parameter = namedOnly + ? parameterByName[digest.name] + : parameters[digestIndex]; + if (!parameter) { + throw new Error(`Could not determine parameter for argument at index ${digestIndex}${digest.name ? ` (${digest.name})` : ""}`); + } + let sqlValue; + if (digest.placeholder) { + // It's a placeholder, always use it + sqlValue = digest.placeholder; + } + else { + const dep = digest.value; + if (dep === undefined && + (namedOnly || + (!parameter.required && + digestIndex >= indexAfterWhichAllArgsAreNamed - 1))) { + namedOnly = true; + continue; + } + sqlValue = (0, codecs_js_1.sqlValueWithCodec)(dep ?? null, parameter.codec); + } + if (namedOnly) { + args.push({ + placeholder: sqlValue, + name: parameter.name, + }); + } + else { + args.push({ + placeholder: sqlValue, + position: argIndex++, + }); + } + } + return from(...args); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgFromExpression, "pgFromExpression"); +function getFragmentAndCodecFromOrder(alias, order, codecOrCodecs) { + if (order.attribute != null) { + const colFrag = (0, pg_sql2_1.default) `${alias}.${pg_sql2_1.default.identifier(order.attribute)}`; + const isArray = Array.isArray(codecOrCodecs); + const col = (isArray ? codecOrCodecs[0] : codecOrCodecs).attributes[order.attribute]; + const colCodec = col.codec; + if (isArray) { + for (const codec of codecOrCodecs) { + if (codec.attributes[order.attribute].codec !== colCodec) { + throw new Error(`Order by attribute '${order.attribute}' not allowed - this attribute has different codecs (${codec.attributes[order.attribute].codec.name} != ${colCodec.name}) in different parents (${codecOrCodecs[0].name} vs ${codec.name})`); + } + } + } + const isNullable = !col.notNull && !colCodec.notNull; + return order.callback + ? order.callback(colFrag, colCodec, isNullable) + : [colFrag, colCodec, isNullable]; + } + else { + return [order.fragment, order.codec, order.nullable]; + } +} +function calculateOrderBySQL(params) { + const { reverse, orders: rawOrders, alias, codec } = params; + const orders = reverse + ? rawOrders.map((o) => ({ + ...o, + direction: o.direction === "ASC" ? "DESC" : "ASC", + nulls: o.nulls === "LAST" + ? "FIRST" + : o.nulls === "FIRST" + ? "LAST" + : o.nulls, + })) + : rawOrders; + return orders.length > 0 + ? (0, pg_sql2_1.default) `\norder by ${pg_sql2_1.default.join(orders.map((o) => { + const [frag] = getFragmentAndCodecFromOrder(alias, o, codec); + return (0, pg_sql2_1.default) `${frag} ${o.direction === "ASC" ? (0, pg_sql2_1.default) `asc` : (0, pg_sql2_1.default) `desc`}${o.nulls === "LAST" + ? (0, pg_sql2_1.default) ` nulls last` + : o.nulls === "FIRST" + ? (0, pg_sql2_1.default) ` nulls first` + : pg_sql2_1.default.blank}`; + }), ", ")}` + : pg_sql2_1.default.blank; +} +function buildTheQueryCore(rawInfo) { + const info = { + ...rawInfo, + // Make mutable: + selects: [...rawInfo.selects], + conditions: [...rawInfo.conditions], + orders: [...rawInfo.orders], + groups: [...rawInfo.groups], + havingConditions: [...rawInfo.havingConditions], + relationJoins: new Map(rawInfo.relationJoins), + joins: [...rawInfo.joins], + meta: { __proto__: null, ...rawInfo.meta }, + // Will be populated by applyConditionFromCursor + cursorLower: null, + cursorUpper: null, + cursorDigest: null, + cursorIndicies: rawInfo.needsCursor ? [] : null, + groupIndicies: rawInfo.needsGroups ? [] : null, + // Will be populated by applyCommonPaginationStuff + first: null, + last: null, + offset: null, + shouldReverseOrder: false, + }; + function selectAndReturnIndex(expression) { + const existingIndex = info.selects.findIndex((s) => pg_sql2_1.default.isEquivalent(s, expression)); + if (existingIndex >= 0) + return existingIndex; + return info.selects.push(expression) - 1; + } + const meta = info.meta; + const queryBuilder = { + alias: info.alias, + [pg_sql2_1.$$toSQL]() { + return info.alias; + }, + selectAndReturnIndex, + join(spec) { + info.joins.push(spec); + }, + setMeta(key, value) { + meta[key] = value; + }, + getMetaRaw(key) { + return meta[key]; + }, + orderBy(spec) { + if (info.mode !== "aggregate") { + info.orders.push(spec); + } + else { + // Throw it away? + // Maybe later we can use it in the aggregates themself - e.g. `array_agg(... order by )` + } + }, + setOrderIsUnique() { + info.isOrderUnique = true; + }, + singleRelation(relationIdentifier) { + // NOTE: this is almost an exact copy of the same method on PgSelectStep, + // except using `info`... We should harmonize them. + const relation = info.resource.getRelation(relationIdentifier); + if (!relation) { + throw new Error(`${info.resource} does not have a relation named '${String(relationIdentifier)}'`); + } + if (!relation.isUnique) { + throw new Error(`${info.resource} relation '${String(relationIdentifier)}' is not unique so cannot be used with singleRelation`); + } + const { remoteResource, localAttributes, remoteAttributes } = relation; + // Join to this relation if we haven't already + const cachedAlias = info.relationJoins.get(relationIdentifier); + if (cachedAlias) { + return cachedAlias; + } + const alias = pg_sql2_1.default.identifier(Symbol(relationIdentifier)); + if (typeof remoteResource.from === "function") { + throw new Error("Callback sources not currently supported via singleRelation"); + } + info.joins.push({ + type: "left", + from: remoteResource.from, + alias, + conditions: localAttributes.map((col, i) => (0, pg_sql2_1.default) `${info.alias}.${pg_sql2_1.default.identifier(col)} = ${alias}.${pg_sql2_1.default.identifier(remoteAttributes[i])}`), + }); + info.relationJoins.set(relationIdentifier, alias); + return alias; + }, + where(condition) { + if (pg_sql2_1.default.isSQL(condition)) { + info.conditions.push(condition); + } + else { + switch (condition.type) { + case "attribute": { + info.conditions.push(condition.callback((0, pg_sql2_1.default) `${info.alias}.${pg_sql2_1.default.identifier(condition.attribute)}`)); + break; + } + default: { + const never = condition.type; + console.error("Unsupported condition: ", never); + throw new Error(`Unsupported condition`); + } + } + } + }, + groupBy(spec) { + info.groups.push(spec); + }, + having(condition) { + if (info.mode !== "aggregate") { + throw new grafast_1.SafeError(`Cannot add having to a non-aggregate query`); + } + if (pg_sql2_1.default.isSQL(condition)) { + info.havingConditions.push(condition); + } + else { + const never = condition; + console.error("Unsupported condition: ", never); + throw new Error(`Unsupported condition`); + } + }, + whereBuilder() { + return new pgCondition_js_1.PgCondition(this); + }, + havingBuilder() { + return new pgCondition_js_1.PgCondition(this, true); + }, + }; + const { count, stream, values } = info.executionDetails; + for (const applyDepId of info.applyDepIds) { + const val = values[applyDepId].unaryValue(); + if (Array.isArray(val)) { + val.forEach((v) => v?.(queryBuilder)); + } + else { + val?.(queryBuilder); + } + } + // beforeLock("orderBy"): Now the runtime orders/etc have been added, mutate `orders` to be unique + makeOrderUniqueIfPossible(info); + // afterLock("orderBy"): Now the runtime orders/etc have been performed, + const after = (0, pgStmt_js_1.getUnary)(values, info.afterStepId); + const before = (0, pgStmt_js_1.getUnary)(values, info.beforeStepId); + if (info.needsCursor || after != null || before != null) { + info.cursorDigest = getOrderByDigest(info); + } + // PERF: only calculate this if needed + const { sql: trueOrderBySQL } = buildOrderBy(info, false); + if (info.cursorIndicies) { + // PERF: calculate cursorDigest here instead? + if (info.orders.length > 0) { + for (const o of info.orders) { + const [frag, codec] = getFragmentAndCodecFromOrder(info.alias, o, info.resource.codec); + info.cursorIndicies.push({ + index: selectAndReturnIndex(codec.castFromPg + ? codec.castFromPg(frag, o.nullable === false) + : (0, pg_sql2_1.default) `${frag}::text`), + codec, + }); + } + } + else { + // No ordering; so use row number + info.cursorIndicies.push({ + index: selectAndReturnIndex((0, pg_sql2_1.default) `(row_number() over (partition by 1))::text`), + codec: codecs_js_1.TYPES.int, + }); + } + } + if (info.groupIndicies) { + if (info.groups.length > 0) { + for (const o of info.groups) { + const { codec, fragment, guaranteedNotNull = false } = o; + info.groupIndicies.push({ + index: selectAndReturnIndex(codec.castFromPg + ? codec.castFromPg(fragment, guaranteedNotNull) + : (0, pg_sql2_1.default) `${fragment}::text`), + codec, + }); + } + } + else { + // No grouping + } + } + // apply conditions from the cursor + applyConditionFromCursor(info, "after", after); + applyConditionFromCursor(info, "before", before); + (0, pgStmt_js_1.applyCommonPaginationStuff)(info); + /**************************************** + * * + * ALL MUTATION NOW COMPLETE * + * * + ****************************************/ + return { + count, + trueOrderBySQL, + info, + stream, + meta, + }; +} +function buildTheQuery(rawInfo) { + const { placeholders, deferreds, fixedPlaceholderValues, _symbolSubstitutes, } = rawInfo; + const { count, trueOrderBySQL, info, stream, meta } = buildTheQueryCore(rawInfo); + const { name, hasSideEffects, forceIdentity, first, last, shouldReverseOrder, cursorDigest, cursorIndicies, groupIndicies, } = info; + const combinedInfo = { + ...info, + // Merge things necessary only for query building back in + placeholders, + deferreds, + fixedPlaceholderValues, + _symbolSubstitutes, + }; + const { queryValues, placeholderValues, identifiersSymbol, identifiersAlias, } = (0, pgStmt_js_1.makeValues)(combinedInfo, name); + // Handle fixed placeholder values + for (const [key, value] of fixedPlaceholderValues) { + placeholderValues.set(key, value); + } + const forceOrder = (stream && info.shouldReverseOrder) || false; + const makeQuery = ({ limit, offset, options, } = {}) => { + if (queryValues.length > 0 || + (count !== 1 && (forceIdentity || hasSideEffects))) { + const extraSelects = []; + const identifierIndexOffset = extraSelects.push((0, pg_sql2_1.default) `${identifiersAlias}.idx`) - 1; + // PERF: try and re-use existing trueOrderBySQL selection? + const rowNumberIndexOffset = forceOrder || limit != null || offset != null + ? extraSelects.push((0, pg_sql2_1.default) `row_number() over (${pg_sql2_1.default.indent(trueOrderBySQL)})`) - 1 + : -1; + const { sql: baseQuery, extraSelectIndexes } = buildQuery(info, { + extraSelects, + forceOrder, + }); + const identifierIndex = extraSelectIndexes[identifierIndexOffset]; + const rowNumberIndex = rowNumberIndexOffset >= 0 + ? extraSelectIndexes[rowNumberIndexOffset] + : null; + const innerWrapper = pg_sql2_1.default.identifier(Symbol("stream_wrapped")); + /* + * This wrapper around the inner query is for @stream: + * + * - stream must be in the correct order, so if we have + * `shouldReverseOrder` then we must reverse the order + * ourselves here; + * - stream can have an `initialCount` - we want to satisfy all + * `initialCount` records from _each identifier group_ before we then + * resolve the remaining records. + * + * NOTE: if neither of the above cases apply then we can skip this, + * even for @stream. + */ + const wrappedInnerQuery = rowNumberIndex != null || + limit != null || + (offset != null && offset > 0) + ? (0, pg_sql2_1.default) `select *\nfrom (${pg_sql2_1.default.indent(baseQuery)}) ${innerWrapper}\norder by ${innerWrapper}.${pg_sql2_1.default.identifier(String(rowNumberIndex))}${limit != null ? (0, pg_sql2_1.default) `\nlimit ${pg_sql2_1.default.literal(limit)}` : pg_sql2_1.default.blank}${offset != null && offset > 0 + ? (0, pg_sql2_1.default) `\noffset ${pg_sql2_1.default.literal(offset)}` + : pg_sql2_1.default.blank}` + : baseQuery; + // PERF: if the query does not have a limit/offset; should we use an + // `inner join` in a flattened query instead of a wrapped query with + // `lateral`? + const wrapperSymbol = Symbol(name + "_result"); + const wrapperAlias = pg_sql2_1.default.identifier(wrapperSymbol); + const { text: lateralText, values: rawSqlValues, [pg_sql2_1.$$symbolToIdentifier]: symbolToIdentifier, } = pg_sql2_1.default.compile((0, pg_sql2_1.default) `lateral (${pg_sql2_1.default.indent(wrappedInnerQuery)}) as ${wrapperAlias}`, options); + const identifiersAliasText = symbolToIdentifier.get(identifiersSymbol); + const wrapperAliasText = symbolToIdentifier.get(wrapperSymbol); + /* + * IMPORTANT: these wrapper queries are necessary so that queries + * that have a limit/offset get the limit/offset applied _per + * identifier group_; that's why this cannot just be another "from" + * clause. + */ + const text = `\ +select ${wrapperAliasText}.* +from (select ids.ordinality - 1 as idx${queryValues.length > 0 + ? `, ${queryValues + .map(({ codec }, idx) => { + return `(ids.value->>${idx})::${pg_sql2_1.default.compile(codec.sqlType).text} as "id${idx}"`; + }) + .join(", ")}` + : ""} from json_array_elements($${rawSqlValues.length + 1}::json) with ordinality as ids) as ${identifiersAliasText}, +${lateralText};`; + return { text, rawSqlValues, identifierIndex }; + } + else if ((limit != null && limit >= 0) || + (offset != null && offset > 0)) { + // ENHANCEMENT: make this nicer; combine with the `if` branch above? + const extraSelects = []; + const rowNumberIndexOffset = forceOrder || limit != null || offset != null + ? extraSelects.push((0, pg_sql2_1.default) `row_number() over (${pg_sql2_1.default.indent(trueOrderBySQL)})`) - 1 + : -1; + const { sql: baseQuery, extraSelectIndexes } = buildQuery(info, { + extraSelects, + }); + const rowNumberIndex = rowNumberIndexOffset >= 0 + ? extraSelectIndexes[rowNumberIndexOffset] + : null; + const innerWrapper = pg_sql2_1.default.identifier(Symbol("stream_wrapped")); + /* + * This wrapper around the inner query is for @stream: + * + * - stream must be in the correct order, so if we have + * `shouldReverseOrder` then we must reverse the order + * ourselves here; + * - stream can have an `initialCount` - we want to satisfy all + * `initialCount` records from _each identifier group_ before we then + * resolve the remaining records. + * + * NOTE: if neither of the above cases apply then we can skip this, + * even for @stream. + */ + const wrappedInnerQuery = rowNumberIndex != null || + limit != null || + (offset != null && offset > 0) + ? (0, pg_sql2_1.default) `select *\nfrom (${pg_sql2_1.default.indent(baseQuery)}) ${innerWrapper}\norder by ${innerWrapper}.${pg_sql2_1.default.identifier(String(rowNumberIndex))}${limit != null ? (0, pg_sql2_1.default) `\nlimit ${pg_sql2_1.default.literal(limit)}` : pg_sql2_1.default.blank}${offset != null && offset > 0 + ? (0, pg_sql2_1.default) `\noffset ${pg_sql2_1.default.literal(offset)}` + : pg_sql2_1.default.blank};` + : (0, pg_sql2_1.default) `${baseQuery};`; + const { text, values: rawSqlValues } = pg_sql2_1.default.compile(wrappedInnerQuery, options); + return { text, rawSqlValues, identifierIndex: null }; + } + else { + const { sql: query } = buildQuery(info, {}); + const { text, values: rawSqlValues } = pg_sql2_1.default.compile((0, pg_sql2_1.default) `${query};`, options); + return { text, rawSqlValues, identifierIndex: null }; + } + }; + const cursorDetails = cursorDigest != null && cursorIndicies != null + ? { digest: cursorDigest, indicies: cursorIndicies } + : undefined; + const groupDetails = groupIndicies + ? { indicies: groupIndicies } + : undefined; + if (stream) { + // PERF: should use the queryForSingle optimization in here too + // When streaming we can't reverse order in JS - we must do it in the DB. + if (stream.initialCount > 0) { + /* + * Here our stream is constructed of two parts - an + * `initialFetchQuery` to satisfy the `initialCount` and then a + * `streamQuery` to build the PostgreSQL cursor for fetching the + * remaining results across all groups. + */ + const { text, rawSqlValues, identifierIndex: initialFetchIdentifierIndex, } = makeQuery({ + limit: stream.initialCount, + options: { placeholderValues }, + }); + const { text: textForDeclare, rawSqlValues: rawSqlValuesForDeclare, identifierIndex: streamIdentifierIndex, } = makeQuery({ + offset: stream.initialCount, + options: { placeholderValues }, + }); + if (initialFetchIdentifierIndex !== streamIdentifierIndex) { + throw new Error(`GrafastInternalError<3760b02e-dfd0-4924-bf62-2e0ef9399605>: expected identifier indexes to match`); + } + const identifierIndex = initialFetchIdentifierIndex; + return { + meta, + text, + rawSqlValues, + textForDeclare, + rawSqlValuesForDeclare, + identifierIndex, + shouldReverseOrder: false, + streamInitialCount: stream.initialCount, + queryValues, + first, + last, + cursorDetails, + groupDetails, + }; + } + else { + /* + * Unlike the above case, here we have an `initialCount` of zero so + * we can skip the `initialFetchQuery` and jump straight to the + * `streamQuery`. + */ + const { text: textForDeclare, rawSqlValues: rawSqlValuesForDeclare, identifierIndex: streamIdentifierIndex, } = makeQuery({ + offset: 0, + options: { + placeholderValues, + }, + }); + return { + meta, + // This is a hack since this is the _only_ place we don't want + // `text`; loosening the types would risk us forgetting in more + // places (and cause us to do excessive type safety checks) so we + // use an explicit empty string to mark this. + text: "", + rawSqlValues: [], + textForDeclare, + rawSqlValuesForDeclare, + identifierIndex: streamIdentifierIndex, + shouldReverseOrder: false, + streamInitialCount: 0, + queryValues, + first, + last, + cursorDetails, + groupDetails, + }; + } + } + else { + const { text, rawSqlValues, identifierIndex } = makeQuery({ + options: { + placeholderValues, + }, + }); + return { + meta, + text, + rawSqlValues, + identifierIndex, + shouldReverseOrder, + name: hash(text), + queryValues, + first, + last, + cursorDetails, + groupDetails, + }; + } +} +class PgSelectInlineApplyStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgSelectInlineApplyStep", + }; } + constructor(identifier, viaSubquery, details) { + super(); + this.identifier = identifier; + this.viaSubquery = viaSubquery; + this.isSyncAndSafe = true; + const { staticInfo, $first, $last, $offset, $after, $before, applySteps } = details; + this.staticInfo = staticInfo; + this.firstStepId = $first ? this.addUnaryDependency($first) : null; + this.lastStepId = $last ? this.addUnaryDependency($last) : null; + this.offsetStepId = $offset ? this.addUnaryDependency($offset) : null; + this.afterStepId = $after ? this.addUnaryDependency($after) : null; + this.beforeStepId = $before ? this.addUnaryDependency($before) : null; + this.applyDepIds = applySteps.map(($apply) => this.addUnaryDependency($apply)); + } + execute(executionDetails) { + if (executionDetails.count !== 1) { + throw new Error(`PgSelectInlineApplyStep must be unary!`); + } + return [ + (queryBuilder) => { + const { parts, info, meta } = buildPartsForInlining({ + executionDetails, + // My own dependencies + firstStepId: this.firstStepId, + lastStepId: this.lastStepId, + offsetStepId: this.offsetStepId, + afterStepId: this.afterStepId, + beforeStepId: this.beforeStepId, + applyDepIds: this.applyDepIds, + // Data that's independent of dependencies + ...this.staticInfo, + }); + const { cursorDigest, cursorIndicies, groupIndicies } = info; + const cursorDetails = cursorDigest != null && cursorIndicies != null + ? { digest: cursorDigest, indicies: cursorIndicies } + : undefined; + const groupDetails = groupIndicies != null ? { indicies: groupIndicies } : undefined; + if (this.viaSubquery) { + const { first, last, fetchOneExtra, meta, shouldReverseOrder } = info; + const { sql: baseQuery } = buildQueryFromParts(parts, { + asArray: true, + }); + const selectIndex = queryBuilder.selectAndReturnIndex( + // 's' for 'subquery' + (0, pg_sql2_1.default) `array(${pg_sql2_1.default.indent(baseQuery)})::text`); + const details = { + cursorDetails, + groupDetails, + shouldReverseOrder, + fetchOneExtra, + selectIndex, + first, + last, + meta, + }; + queryBuilder.setMeta(this.identifier, details); + } + else { + const { whereConditions, joins, selects } = parts; + const { from, alias, resource, joinAsLateral } = this.staticInfo; + const where = buildWhereOrHaving((0, pg_sql2_1.default) `/* WHERE becoming ON */`, whereConditions); + queryBuilder.join({ + type: "left", + from, + alias, + attributeNames: resource.codec.attributes ? pg_sql2_1.default.blank : (0, pg_sql2_1.default) `(v)`, + // Note the WHERE is now part of the JOIN condition (since + // it's a LEFT JOIN). + conditions: where !== pg_sql2_1.default.blank ? [where] : [], + lateral: joinAsLateral, + }); + for (const join of joins) { + queryBuilder.join(join); + } + const selectIndexes = selects.map((s) => queryBuilder.selectAndReturnIndex(s)); + const details = { + selectIndexes, + cursorDetails, + groupDetails, + meta, + }; + queryBuilder.setMeta(this.identifier, details); + } + }, + ]; + } +} +function buildPartsForInlining(rawInfo) { + const coreResult = buildTheQueryCore(rawInfo); + return { + ...coreResult, + parts: buildQueryParts(coreResult.info, {}), + }; +} +function applyConditionFromCursor(info, beforeOrAfter, parsedCursor) { + if (parsedCursor == null) + return; + const { orders, isOrderUnique, alias, resource, cursorDigest } = info; + if (cursorDigest == null) { + throw new Error(`Cursor passed, but could not determine order digest.`); + } + const orderCount = orders.length; + // Cursor validity check + (0, pgValidateParsedCursor_js_1.validateParsedCursor)(parsedCursor, cursorDigest, orderCount, beforeOrAfter); + if (orderCount === 0) { + // Natural pagination `['natural', N]` + const n = parsedCursor[1]; + if (beforeOrAfter === "after") { + info.cursorLower = n; + } + else { + info.cursorUpper = n; + } + return; + } + if (!isOrderUnique) { + // ENHANCEMENT: make this smarter + throw new grafast_1.SafeError(`Can only use '${beforeOrAfter}' cursor when there is a unique defined order.`); + } + const condition = (i = 0) => { + const order = orders[i]; + const [orderFragment, orderCodec, nullable] = getFragmentAndCodecFromOrder(alias, order, resource.codec); + const { nulls, direction } = order; + const sqlValue = (0, pg_sql2_1.default) `${pg_sql2_1.default.value(parsedCursor[i + 1])}::${orderCodec.sqlType}`; + // For the truth-table of this code, have a look at this spreadsheet: + // https://docs.google.com/spreadsheets/d/1m5H-4IRAjhx_Z8v7nd2wMTbmx1dOBof9IroW3WUYE7s/edit?usp=sharing + const gt = (direction === "ASC" && beforeOrAfter === "after") || + (direction === "DESC" && beforeOrAfter === "before"); + const nullsFirst = nulls === "FIRST" + ? true + : nulls === "LAST" + ? false + : // NOTE: PostgreSQL states that by default DESC = NULLS FIRST, + // ASC = NULLS LAST + direction === "DESC"; + // Simple less than or greater than + let fragment = (0, pg_sql2_1.default) `${orderFragment} ${gt ? (0, pg_sql2_1.default) `>` : (0, pg_sql2_1.default) `<`} ${sqlValue}`; + // Nullable, so now handle if one is null but the other isn't + if (nullable) { + const useAIsNullAndBIsNotNull = (nullsFirst && beforeOrAfter === "after") || + (!nullsFirst && beforeOrAfter === "before"); + const oneIsNull = useAIsNullAndBIsNotNull + ? (0, pg_sql2_1.default) `${orderFragment} is null and ${sqlValue} is not null` + : (0, pg_sql2_1.default) `${orderFragment} is not null and ${sqlValue} is null`; + fragment = (0, pg_sql2_1.default) `((${fragment}) or (${oneIsNull}))`; + } + // Finally handle if they're equal - recurse + if (i < orderCount - 1) { + const equals = nullable ? (0, pg_sql2_1.default) `is not distinct from` : (0, pg_sql2_1.default) `=`; + const aEqualsB = (0, pg_sql2_1.default) `${orderFragment} ${equals} ${sqlValue}`; + fragment = (0, pg_sql2_1.default) `(${fragment}) +or ( +${pg_sql2_1.default.indent `${aEqualsB} +and ${pg_sql2_1.default.indent(pg_sql2_1.default.parens(condition(i + 1)))}`} +)`; + } + return fragment; + }; + /* + * We used to allow the cursor to be null or string; but we now _only_ run + * this code when the `evalIs(null) || evalIs(undefined)` returns false. So + * we know that the cursor must exist, so therefore we don't need to add + * this extra condition. + // If the cursor is null then no condition is needed + const cursorIsNullPlaceholder = this.placeholder( + lambda($parsedCursorPlan, (cursor) => cursor == null), + TYPES.boolean + ); + const finalCondition = sql`(${condition()}) or (${cursorIsNullPlaceholder} is true)`; + */ + const finalCondition = condition(); + info.conditions.push(finalCondition); +} +/** + * So we can quickly detect if cursors are invalid we use this digest, + * passing this check does not mean that the cursor is valid but it at least + * catches common user errors. + */ +function getOrderByDigest(info) { + const { placeholderSymbols, deferredSymbols, alias, resource, fixedPlaceholderValues, orders, } = info; + if (orders.length === 0) { + return "natural"; + } + // The security of this hash is unimportant; the main aim is to protect the + // user from themself. If they bypass this, that's their problem (it will + // not introduce a security issue). + const hash = (0, crypto_1.createHash)("sha256"); + hash.update(JSON.stringify(orders.map((o) => { + const [frag] = getFragmentAndCodecFromOrder(alias, o, resource.codec); + const placeholderValues = new Map(fixedPlaceholderValues); + for (let i = 0; i < placeholderSymbols.length; i++) { + const symbol = placeholderSymbols[i]; + placeholderValues.set(symbol, pg_sql2_1.default.identifier(`PLACEHOLDER_${i}`)); + } + for (let i = 0; i < deferredSymbols.length; i++) { + const symbol = deferredSymbols[i]; + placeholderValues.set(symbol, pg_sql2_1.default.identifier(`DEFERRED_${i}`)); + } + return pg_sql2_1.default.compile(frag, { placeholderValues }).text; + }))); + const digest = hash.digest("hex").slice(0, 10); + return digest; +} +function buildQueryParts(info, options = Object.create(null)) { + const { alias, resource, selects: baseSelects, _symbolSubstitutes } = info; + function buildFrom() { + return { + sql: (0, pg_sql2_1.default) `\nfrom ${info.from} as ${alias}${resource.codec.attributes ? pg_sql2_1.default.blank : (0, pg_sql2_1.default) `(v)`}`, + }; + } + function buildGroupBy() { + const groups = info.groups; + return { + sql: groups.length > 0 + ? (0, pg_sql2_1.default) `\ngroup by ${pg_sql2_1.default.join(groups.map((o) => o.fragment), ", ")}` + : pg_sql2_1.default.blank, + }; + } + // NOTE: according to the EdgesToReturn algorithm in the GraphQL Cursor + // Connections Specification first is applied first, then last is applied. + // For us this means that if first is present we set the limit to this and + // then we do the last artificially later. + // https://relay.dev/graphql/connections.htm#EdgesToReturn() + const [limitAndOffsetSQL] = (0, pgStmt_js_1.calculateLimitAndOffsetSQLFromInfo)(info); + function buildLimitAndOffset() { + return { + sql: limitAndOffsetSQL, + }; + } + const { sql: from } = buildFrom(); + const { sql: groupBy } = buildGroupBy(); + const { sql: orderBy } = buildOrderBy(info, options.forceOrder ? false : info.shouldReverseOrder); + const { sql: limitAndOffset } = buildLimitAndOffset(); + const { extraSelects = EMPTY_ARRAY } = options; + const selects = [...baseSelects, ...extraSelects]; + const l = baseSelects.length; + const extraSelectIndexes = extraSelects.map((_, i) => i + l); + return { + selects, + from, + joins: info.joins, + whereConditions: info.conditions, + groupBy, + havingConditions: info.havingConditions, + orderBy, + limitAndOffset, + extraSelectIndexes, + _symbolSubstitutes, + }; +} +function buildQuery(info, options = Object.create(null)) { + return buildQueryFromParts(buildQueryParts(info, options)); +} +function buildQueryFromParts(parts, options = {}) { + const { selects, from, joins, whereConditions, groupBy, havingConditions, orderBy, limitAndOffset, extraSelectIndexes, } = parts; + const select = buildSelect(selects, options.asArray); + const aliases = buildAliases(parts._symbolSubstitutes); + const join = buildJoin(joins); + const where = buildWhereOrHaving((0, pg_sql2_1.default) `where`, whereConditions); + const having = buildWhereOrHaving((0, pg_sql2_1.default) `having`, havingConditions); + const baseQuery = (0, pg_sql2_1.default) `${aliases}${select}${from}${join}${where}${groupBy}${having}${orderBy}${limitAndOffset}`; + return { sql: baseQuery, extraSelectIndexes }; +} +function buildOrderBy(info, reverse) { + const { orders, alias, resource: { codec }, } = info; + return { + sql: calculateOrderBySQL({ + reverse, + orders, + alias, + codec, + }), + }; +} +function buildWhereOrHaving(whereOrHaving, baseConditions) { + const allConditions = baseConditions; + const sqlConditions = pg_sql2_1.default.join(allConditions.map((c) => pg_sql2_1.default.parens(pg_sql2_1.default.indent(c))), " and "); + return allConditions.length === 0 + ? pg_sql2_1.default.blank + : allConditions.length === 1 + ? (0, pg_sql2_1.default) `\n${whereOrHaving} ${sqlConditions}` + : (0, pg_sql2_1.default) `\n${whereOrHaving}\n${pg_sql2_1.default.indent(sqlConditions)}`; +} +function buildJoin(inJoins) { + const joins = inJoins.map((j) => { + const conditions = j.type === "cross" + ? pg_sql2_1.default.blank + : j.conditions.length === 0 + ? pg_sql2_1.default.true + : j.conditions.length === 1 + ? j.conditions[0] + : pg_sql2_1.default.join(j.conditions.map((c) => pg_sql2_1.default.parens(pg_sql2_1.default.indent(c))), " and "); + const joinCondition = j.type !== "cross" + ? (0, pg_sql2_1.default) `\non ${pg_sql2_1.default.parens(pg_sql2_1.default.indentIf(j.conditions.length > 1, conditions))}` + : pg_sql2_1.default.blank; + const join = j.type === "inner" + ? (0, pg_sql2_1.default) `inner join` + : j.type === "left" + ? (0, pg_sql2_1.default) `left outer join` + : j.type === "right" + ? (0, pg_sql2_1.default) `right outer join` + : j.type === "full" + ? (0, pg_sql2_1.default) `full outer join` + : j.type === "cross" + ? (0, pg_sql2_1.default) `cross join` + : pg_sql2_1.default.blank; + return (0, pg_sql2_1.default) `${join}${j.lateral ? (0, pg_sql2_1.default) ` lateral` : pg_sql2_1.default.blank} ${j.from} as ${j.alias}${j.attributeNames ?? pg_sql2_1.default.blank}${joinCondition}`; + }); + return joins.length ? (0, pg_sql2_1.default) `\n${pg_sql2_1.default.join(joins, "\n")}` : pg_sql2_1.default.blank; +} +function buildSelect(selects, asArray = false) { + if (asArray) { + if (selects.length < 1) { + // Cannot accumulate empty arrays + return (0, pg_sql2_1.default) `select array[null]::text[]`; + } + else { + return (0, pg_sql2_1.default) `select array[\n${pg_sql2_1.default.indent(pg_sql2_1.default.join(selects, ",\n"))}\n]::text[]`; + } + } + const fragmentsWithAliases = selects.map((frag, idx) => (0, pg_sql2_1.default) `${frag} as ${pg_sql2_1.default.identifier(String(idx))}`); + const selection = fragmentsWithAliases.length > 0 + ? (0, pg_sql2_1.default) `\n${pg_sql2_1.default.indent(pg_sql2_1.default.join(fragmentsWithAliases, ",\n"))}` + : (0, pg_sql2_1.default) ` /* NOTHING?! */`; + return (0, pg_sql2_1.default) `select${selection}`; +} +function buildAliases(_symbolSubstitutes) { + const sqlAliases = []; + for (const [a, b] of _symbolSubstitutes.entries()) { + sqlAliases.push(pg_sql2_1.default.symbolAlias(a, b)); + } + return pg_sql2_1.default.join(sqlAliases, ""); +} +function createSelectResult(allVals, { first, last, fetchOneExtra, shouldReverseOrder, meta, cursorDetails, groupDetails, }) { + if (allVals == null) { + return allVals; + } + const limit = first ?? last; + const firstAndLast = first != null && last != null && last < first; + const hasMore = fetchOneExtra && limit != null && allVals.length > limit; + const trimFromStart = !shouldReverseOrder && last != null && first == null; + const limitedRows = hasMore + ? trimFromStart + ? allVals.slice(Math.max(0, allVals.length - limit)) + : allVals.slice(0, limit) + : allVals; + const slicedRows = firstAndLast && limitedRows.length > last + ? limitedRows.slice(-last) + : limitedRows; + const orderedRows = shouldReverseOrder + ? (0, grafast_1.reverseArray)(slicedRows) + : slicedRows; + return { + hasMore, + items: orderedRows, + cursorDetails, + groupDetails, + m: meta, + }; +} +function pgInlineViaJoinTransform([details, item]) { + const { meta, selectIndexes, cursorDetails, groupDetails } = details; + const items = []; + if (item != null) { + const newItem = []; + for (let i = 0, l = selectIndexes.length; i < l; i++) { + newItem[i] = item[selectIndexes[i]]; + } + items.push(newItem); + } + return { + hasMore: false, + // We return a list here because our children are going to use a + // `first` plan on us. + // NOTE: we don't need to reverse the list for relay pagination + // because it only contains one entry. + items, + cursorDetails, + groupDetails, + m: meta, + }; +} +function pgInlineViaSubqueryTransform([details, item]) { + const allVals = (0, parseArray_js_1.parseArray)(item[details.selectIndex]); + return createSelectResult(allVals, details); +} +//# sourceMappingURL=pgSelect.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelect.js.map b/grafast/dataplan-pg/dist/steps/pgSelect.js.map new file mode 100644 index 0000000000..c8aa1f93f1 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgSelect.js","sourceRoot":"","sources":["../../src/steps/pgSelect.ts"],"names":[],"mappings":";;;AA2jEA,4BAIC;AAMD,kDAyBC;AAID,8CAaC;AAID,4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B;QACpC,CAAC,CAAC,IAAA,sBAAY,EAAC,UAAU,CAAC;QAC1B,CAAC,CAAC,UAAU,CAAC;IACf,OAAO;QACL,OAAO;QACP,KAAK,EAAE,WAAW;QAClB,aAAa;QACb,YAAY;QACZ,CAAC,EAAE,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,CAAC,OAAO,EAAE,IAAI,CAG/C;IACC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IACrE,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrD,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;IACD,OAAO;QACL,OAAO,EAAE,KAAK;QACd,gEAAgE;QAChE,sBAAsB;QACtB,+DAA+D;QAC/D,sCAAsC;QACtC,KAAK;QACL,aAAa;QACb,YAAY;QACZ,CAAC,EAAE,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAS,4BAA4B,CAAC,CAAC,OAAO,EAAE,IAAI,CAGnD;IACC,MAAM,OAAO,GAAG,IAAA,0BAAU,EAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACtD,OAAO,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelectSingle.d.ts b/grafast/dataplan-pg/dist/steps/pgSelectSingle.d.ts new file mode 100644 index 0000000000..27f81a2b2c --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelectSingle.d.ts @@ -0,0 +1,102 @@ +import type { EdgeCapableStep, Step, UnbatchedExecutionExtra } from "grafast"; +import { UnbatchedStep } from "grafast"; +import type { GraphQLObjectType } from "grafast/graphql"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgCodecAttribute } from "../codecs.js"; +import type { PgResource } from "../datasource.js"; +import type { GetPgResourceAttributes, GetPgResourceCodec, GetPgResourceRelations, PgCodec, PgQueryRootStep, PgRegistry, PgSQLCallbackOrDirect, PgTypedStep } from "../interfaces.js"; +import type { PgClassExpressionStep } from "./pgClassExpression.js"; +import { PgCursorStep } from "./pgCursor.js"; +import type { PgSelectMode } from "./pgSelect.js"; +import { PgSelectStep } from "./pgSelect.js"; +export interface PgSelectSinglePlanOptions { + fromRelation?: [PgSelectSingleStep, string]; +} +/** + * Represents the single result of a unique PgSelectStep. This might be + * retrieved explicitly by PgSelectStep.single(), or implicitly (via Grafast) + * by PgSelectStep.item(). Since this is the result of a fetch it does not make + * sense to support changing `.where` or similar; however we now add methods + * such as `.get` and `.cursor` which can receive specific properties by + * telling the PgSelectStep to select the relevant expressions. + */ +export declare class PgSelectSingleStep = PgResource> extends UnbatchedStep implements PgTypedStep ? UCodec : never>, EdgeCapableStep, SQLable { + private options; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + readonly pgCodec: GetPgResourceCodec; + readonly itemStepId: number; + readonly mode: PgSelectMode; + private classStepId; + private nullCheckId; + readonly resource: TResource; + private _coalesceToEmptyObject; + private typeStepIndexList; + constructor($class: PgSelectStep, $item: Step, options?: PgSelectSinglePlanOptions); + coalesceToEmptyObject(): void; + toStringMeta(): string; + getClassStep(): PgSelectStep; + /** + * Returns a plan representing a named attribute (e.g. column) from the class + * (e.g. table). + */ + get>(attr: TAttr): PgClassExpressionStep[TAttr] extends PgCodecAttribute ? UCodec : never, TResource>; + private _getInternal; + getMeta(key: string): import("grafast").AccessStep; + /** + * Returns a plan representing the result of an expression. + */ + select(fragment: PgSQLCallbackOrDirect, codec: TExpressionCodec, guaranteedNotNull?: boolean): PgClassExpressionStep; + scopedSQL: (cb: PgSQLCallbackOrDirect) => T; + getPgRoot(): PgQueryRootStep; + /** @deprecated Use .getPgRoot().placeholder() */ + placeholder($step: PgTypedStep): SQL; + /** @deprecated Use .getPgRoot().placeholder() */ + placeholder($step: Step, codec: PgCodec): SQL; + deferredSQL($step: Step): SQL; + private existingSingleRelation; + singleRelation>(relationIdentifier: TRelationName): PgSelectSingleStep[TRelationName]["remoteResource"]>; + manyRelation>(relationIdentifier: TRelationName): PgSelectStep[TRelationName]["remoteResource"]>; + record(): PgClassExpressionStep, TResource>; + /** + * When selecting a connection we need to be able to get the cursor. The + * cursor is built from the values of the `ORDER BY` clause so that we can + * find nodes before/after it. + */ + cursor(): PgCursorStep; + /** + * For compatibility with EdgeCapableStep. + */ + node(): this; + deduplicate(peers: PgSelectSingleStep[]): PgSelectSingleStep[]; + planForType(type: GraphQLObjectType): Step; + /** + * The polymorphism if this is a "regular" (non-aggregate) request over a + * single/relational polymorphic codec; otherwise null. + */ + private singleOrRelationalPolyIfRegular; + private nonNullAttribute; + private nullCheckAttributeIndex; + optimize(): this; + finalize(): void; + handlePolymorphism?: (result: any) => any; + unbatchedExecute(_extra: UnbatchedExecutionExtra, result: string[] | null): unknown[] | null; + [$$toSQL](): SQL; +} +/** + * Given a plan that represents a single record (via + * PgSelectSingleStep.record()) this turns it back into a PgSelectSingleStep + */ +export declare function pgSelectFromRecord, any, any, PgRegistry>>(resource: TResource, $record: PgClassExpressionStep, TResource> | Step<{ + [Attr in keyof TResource["codec"]["attributes"]]: Step; +}>): PgSelectStep; +/** + * Given a plan that represents a single record (via + * PgSelectSingleStep.record()) this turns it back into a PgSelectSingleStep + */ +export declare function pgSelectSingleFromRecord>(resource: TResource, $record: PgClassExpressionStep, TResource>): PgSelectSingleStep; +//# sourceMappingURL=pgSelectSingle.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelectSingle.d.ts.map b/grafast/dataplan-pg/dist/steps/pgSelectSingle.d.ts.map new file mode 100644 index 0000000000..9a47f5389a --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelectSingle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgSelectSingle.d.ts","sourceRoot":"","sources":["../../src/steps/pgSelectSingle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAA6B,aAAa,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EAEP,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAA0B,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAQ7C,MAAM,WAAW,yBAAyB;IACxC,YAAY,CAAC,EAAE,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC;CACzD;AAmBD;;;;;;;GAOG;AACH,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I;IAoB1C;;;OAGG;IACH,OAAO,CAAC,+BAA+B;IAYvC,OAAO,CAAC,gBAAgB,CAGR;IAChB,OAAO,CAAC,uBAAuB,CAAuB;IACtD,QAAQ;IA8DR,QAAQ;IAiBR,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC;IAE1C,gBAAgB,CACd,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,GACtB,OAAO,EAAE,GAAG,IAAI;IAoBnB,CAAC,OAAO,CAAC;CAGV;AAMD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,SAAS,UAAU,CAC1B,GAAG,EACH,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC1C,GAAG,EACH,GAAG,EACH,UAAU,CACX,EAED,QAAQ,EAAE,SAAS,EACnB,OAAO,EACH,qBAAqB,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,GAC/D,IAAI,CAAC;KACF,IAAI,IAAI,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,GAAG,IAAI;CACvD,CAAC,GACL,YAAY,CAAC,SAAS,CAAC,CAQzB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAEhD,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,GACvE,kBAAkB,CAAC,SAAS,CAAC,CAM/B"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelectSingle.js b/grafast/dataplan-pg/dist/steps/pgSelectSingle.js new file mode 100644 index 0000000000..cbaa39ad4e --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelectSingle.js @@ -0,0 +1,433 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgSelectSingleStep = void 0; +exports.pgSelectFromRecord = pgSelectFromRecord; +exports.pgSelectSingleFromRecord = pgSelectSingleFromRecord; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importStar(require("pg-sql2")); +const codecs_js_1 = require("../codecs.js"); +const utils_js_1 = require("../utils.js"); +const pgClassExpression_js_1 = require("./pgClassExpression.js"); +const pgCursor_js_1 = require("./pgCursor.js"); +const pgSelect_js_1 = require("./pgSelect.js"); +const EMPTY_TUPLE = Object.freeze([]); +// Types that only take a few bytes so adding them to the selection would be +// cheap to do. +const CHEAP_ATTRIBUTE_TYPES = new Set([ + codecs_js_1.TYPES.int2, + codecs_js_1.TYPES.int, + codecs_js_1.TYPES.bigint, + codecs_js_1.TYPES.float, + codecs_js_1.TYPES.float4, + codecs_js_1.TYPES.uuid, + codecs_js_1.TYPES.boolean, + codecs_js_1.TYPES.date, + codecs_js_1.TYPES.timestamp, + codecs_js_1.TYPES.timestamptz, +]); +/** + * Represents the single result of a unique PgSelectStep. This might be + * retrieved explicitly by PgSelectStep.single(), or implicitly (via Grafast) + * by PgSelectStep.item(). Since this is the result of a fetch it does not make + * sense to support changing `.where` or similar; however we now add methods + * such as `.get` and `.cursor` which can receive specific properties by + * telling the PgSelectStep to select the relevant expressions. + */ +class PgSelectSingleStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgSelectSingleStep", + }; } + constructor($class, $item, options = Object.create(null)) { + super(); + this.options = options; + this.isSyncAndSafe = true; + this.nullCheckId = null; + this._coalesceToEmptyObject = false; + this.typeStepIndexList = null; + this.scopedSQL = (0, utils_js_1.makeScopedSQL)(this); + this.nonNullAttribute = null; + this.nullCheckAttributeIndex = null; + this.itemStepId = this.addDependency($item); + this.resource = $class.resource; + this.pgCodec = this.resource.codec; + this.mode = $class.mode; + this.classStepId = $class.id; + this.peerKey = this.resource.name; + } + coalesceToEmptyObject() { + this._coalesceToEmptyObject = true; + } + toStringMeta() { + return this.resource.name; + } + getClassStep() { + if (this.isOptimized) { + throw new Error(`Cannot ${this}.getClassStep() after we're optimized.`); + } + const plan = this.getStep(this.classStepId); + if (!(plan instanceof pgSelect_js_1.PgSelectStep)) { + throw new Error(`Expected ${this.classStepId} (${plan}) to be a PgSelectStep`); + } + return plan; + } + /** @internal */ + getItemStep() { + const plan = this.getDep(this.itemStepId); + return plan; + } + /** + * Do not rely on this, we're going to refactor it to work a different way at some point. + * + * @internal + */ + getSelfNamed() { + if (this.mode === "aggregate") { + throw new Error("Invalid call to getSelfNamed on aggregate plan"); + } + // Hack because I don't want to duplicate the code. + return this.get(""); + } + /** + * Returns a plan representing a named attribute (e.g. column) from the class + * (e.g. table). + */ + get(attr) { + return this.cacheStep("get", attr, () => this._getInternal(attr)); + } + _getInternal(attr) { + if (this.mode === "aggregate") { + throw new Error("Invalid call to .get() on aggregate plan"); + } + if (!this.resource.codec.attributes && attr !== "") { + throw new Error(`Cannot call ${this}.get() when the resource codec (${this.resource.codec.name}) has no attributes to get.`); + } + const classPlan = this.getClassStep(); + const resourceAttribute = this.resource.codec.attributes?.[attr]; + if (!resourceAttribute && attr !== "") { + throw new Error(`${this.resource} does not define an attribute named '${String(attr)}'`); + } + if (resourceAttribute?.via) { + const { relation, attribute } = this.resource.resolveVia(resourceAttribute.via, attr); + return this.singleRelation(relation).get(attribute); + } + if (resourceAttribute?.identicalVia) { + const { relation, attribute } = this.resource.resolveVia(resourceAttribute.identicalVia, attr); + const $existingPlan = this.existingSingleRelation(relation); + if ($existingPlan) { + // Relation exists already; load it from there for efficiency + return $existingPlan.get(attribute); + } + else { + // Load it from ourself instead + } + } + if (this.options.fromRelation) { + const [$fromPlan, fromRelationName] = this.options.fromRelation; + const matchingAttribute = Object.entries($fromPlan.resource.codec.attributes).find(([name, col]) => { + if (col.identicalVia) { + const { relation, attribute } = $fromPlan.resource.resolveVia(col.identicalVia, name); + if (attribute === attr && relation === fromRelationName) { + return true; + } + } + return false; + }); + if (matchingAttribute) { + return $fromPlan.get(matchingAttribute[0]); + } + } + /* + * Only cast to `::text` during select; we want to use it uncasted in + * conditions/etc. The reasons we cast to ::text include: + * + * - to make return values consistent whether they're direct or in nested + * arrays + * - to make sure that that various PostgreSQL clients we support do not + * mangle the data in unexpected ways - we take responsibility for + * decoding these string values. + */ + const sqlExpr = (0, pgClassExpression_js_1.pgClassExpression)(this, attr === "" + ? this.resource.codec + : this.resource.codec.attributes[attr].codec, resourceAttribute?.notNull); + const colPlan = resourceAttribute + ? resourceAttribute.expression + ? sqlExpr `${pg_sql2_1.default.parens(resourceAttribute.expression(classPlan.alias))}` + : sqlExpr `${classPlan.alias}.${pg_sql2_1.default.identifier(String(attr))}` + : sqlExpr `${classPlan.alias}.v`; /* single attribute */ + if (this.nonNullAttribute == null && + typeof attr === "string" && + attr.length > 0 && + resourceAttribute && + !resourceAttribute.expression && + resourceAttribute.notNull) { + // We know the row is null iff this attribute is null + this.nonNullAttribute = { attribute: resourceAttribute, attr }; + } + return colPlan; + } + getMeta(key) { + return this.getClassStep().getMeta(key); + } + /** + * Returns a plan representing the result of an expression. + */ + select(fragment, codec, guaranteedNotNull) { + const sqlExpr = (0, pgClassExpression_js_1.pgClassExpression)(this, codec, guaranteedNotNull); + return sqlExpr `${this.scopedSQL(fragment)}`; + } + /** + * Advanced method; rather than returning a plan it returns an index. + * Generally useful for PgClassExpressionStep. + * + * @internal + */ + selectAndReturnIndex(fragment) { + return this.getClassStep().selectAndReturnIndex(this.scopedSQL(fragment)); + } + getPgRoot() { + return this.getClassStep(); + } + placeholder($step, overrideCodec) { + return overrideCodec + ? this.getClassStep().placeholder($step, overrideCodec) + : this.getClassStep().placeholder($step); + } + deferredSQL($step) { + return this.getClassStep().deferredSQL($step); + } + existingSingleRelation(relationIdentifier) { + if (this.options.fromRelation) { + const [$fromPlan, fromRelationName] = this.options.fromRelation; + // check to see if we already came via this relationship + const reciprocal = this.resource.getReciprocal($fromPlan.resource.codec, fromRelationName); + if (reciprocal) { + const reciprocalRelationName = reciprocal[0]; + if (reciprocalRelationName === relationIdentifier) { + const reciprocalRelation = reciprocal[1]; + if (reciprocalRelation.isUnique) { + return $fromPlan; + } + } + } + } + return null; + } + singleRelation(relationIdentifier) { + const $existingPlan = this.existingSingleRelation(relationIdentifier); + if ($existingPlan) { + return $existingPlan; + } + const relation = this.resource.getRelation(relationIdentifier); + if (!relation || !relation.isUnique) { + throw new Error(`${String(relationIdentifier)} is not a unique relation on ${this.resource}`); + } + const { remoteResource, remoteAttributes, localAttributes } = relation; + const options = { + fromRelation: [ + this, + relationIdentifier, + ], + }; + return remoteResource.get(remoteAttributes.reduce((memo, remoteAttribute, attributeIndex) => { + memo[remoteAttribute] = this.get(localAttributes[attributeIndex]); + return memo; + }, Object.create(null)), options); + } + manyRelation(relationIdentifier) { + const relation = this.resource.getRelation(relationIdentifier); + if (!relation) { + throw new Error(`${String(relationIdentifier)} is not a relation on ${this.resource}`); + } + const { remoteResource, remoteAttributes, localAttributes } = relation; + return remoteResource.find(remoteAttributes.reduce((memo, remoteAttribute, attributeIndex) => { + memo[remoteAttribute] = this.get(localAttributes[attributeIndex]); + return memo; + }, Object.create(null))); + } + record() { + return (0, pgClassExpression_js_1.pgClassExpression)(this, this.resource.codec, undefined) `${this.getClassStep().alias}`; + } + /** + * When selecting a connection we need to be able to get the cursor. The + * cursor is built from the values of the `ORDER BY` clause so that we can + * find nodes before/after it. + */ + cursor() { + const cursorPlan = new pgCursor_js_1.PgCursorStep(this, this.getClassStep().getCursorDetails()); + return cursorPlan; + } + /** + * For compatibility with EdgeCapableStep. + */ + node() { + return this; + } + deduplicate(peers) { + // We've been careful to not store anything locally so we shouldn't + // need to move anything across to the peer. + return peers.filter((peer) => { + if (peer.resource !== this.resource) { + return false; + } + if (peer.getClassStep() !== this.getClassStep()) { + return false; + } + if (peer.getItemStep() !== this.getItemStep()) { + return false; + } + return true; + }); + } + planForType(type) { + const poly = this.resource.codec.polymorphism; + if (poly?.mode === "single") { + return this; + } + else if (poly?.mode === "relational") { + for (const spec of Object.values(poly.types)) { + if (spec.name === type.name) { + return this.singleRelation(spec.relationName); + } + } + throw new Error(`${this} Could not find matching name for relational polymorphic '${type.name}'`); + } + else { + throw new Error(`${this}: Don't know how to plan this as polymorphic for ${type}`); + } + } + /** + * The polymorphism if this is a "regular" (non-aggregate) request over a + * single/relational polymorphic codec; otherwise null. + */ + singleOrRelationalPolyIfRegular() { + const poly = this.resource.codec.polymorphism; + if (this.mode !== "aggregate" && + (poly?.mode === "single" || poly?.mode === "relational")) { + return poly; + } + else { + return null; + } + } + optimize() { + const poly = this.singleOrRelationalPolyIfRegular(); + if (poly) { + const $class = this.getClassStep(); + this.typeStepIndexList = poly.typeAttributes.map((col) => { + const attr = this.resource.codec.attributes[col]; + const expr = (0, pg_sql2_1.default) `${$class.alias}.${pg_sql2_1.default.identifier(String(col))}`; + return $class.selectAndReturnIndex(attr.codec.castFromPg + ? attr.codec.castFromPg(expr) + : (0, pg_sql2_1.default) `${expr}::text`); + }); + } + else { + this.typeStepIndexList = null; + } + const attributes = this.resource.codec.attributes; + if (attributes && this.getClassStep().mode !== "aggregate") { + // We need to see if this row is null. The cheapest way is to select a + // non-null column, but failing that we invoke the codec's + // nonNullExpression (indirectly). + const getSuitableAttribute = () => { + // We want to find a _cheap_ not-null attribute to select to prove that + // the row is not null. Critically this must be an attribute that we can + // always select (i.e. is not prevented by any column-level select + // privileges). + for (const attr of Object.keys(attributes)) { + const attribute = attributes[attr]; + if (attribute.notNull && + CHEAP_ATTRIBUTE_TYPES.has(attribute.codec) && + !attribute.restrictedAccess) { + return { + attribute, + attr, + }; + } + } + return null; + }; + const nonNullAttribute = this.nonNullAttribute ?? getSuitableAttribute(); + if (nonNullAttribute != null) { + const { attribute: { codec }, attr, } = nonNullAttribute; + const expression = (0, pg_sql2_1.default) `${this}.${pg_sql2_1.default.identifier(attr)}`; + this.nullCheckAttributeIndex = this.getClassStep().selectAndReturnIndex(codec.castFromPg + ? codec.castFromPg(expression) + : (0, pg_sql2_1.default) `${pg_sql2_1.default.parens(expression)}::text`); + } + else { + this.nullCheckId = this.getClassStep().getNullCheckIndex(); + } + } + return this; + } + finalize() { + const poly = this.singleOrRelationalPolyIfRegular(); + if (poly) { + this.handlePolymorphism = (val) => { + if (val == null) + return val; + const typeList = this.typeStepIndexList.map((i) => val[i]); + const key = String(typeList); + const entry = poly.types[key]; + if (entry) { + return (0, grafast_1.polymorphicWrap)(entry.name, val); + } + return null; + }; + } + return super.finalize(); + } + unbatchedExecute(_extra, result) { + if (result == null) { + return this._coalesceToEmptyObject ? EMPTY_TUPLE : null; + } + else if (this.nullCheckAttributeIndex != null) { + const nullIfAttributeNull = result[this.nullCheckAttributeIndex]; + if (nullIfAttributeNull == null) { + return this._coalesceToEmptyObject ? EMPTY_TUPLE : null; + } + } + else if (this.nullCheckId != null) { + const nullIfExpressionNotTrue = result[this.nullCheckId]; + if (nullIfExpressionNotTrue == null || + codecs_js_1.TYPES.boolean.fromPg(nullIfExpressionNotTrue) != true) { + return this._coalesceToEmptyObject ? EMPTY_TUPLE : null; + } + } + return this.handlePolymorphism ? this.handlePolymorphism(result) : result; + } + [pg_sql2_1.$$toSQL]() { + return this.getClassStep().alias; + } +} +exports.PgSelectSingleStep = PgSelectSingleStep; +function fromRecord(record) { + return (0, pg_sql2_1.default) `(select (${record.placeholder}).*)`; +} +/** + * Given a plan that represents a single record (via + * PgSelectSingleStep.record()) this turns it back into a PgSelectSingleStep + */ +function pgSelectFromRecord(resource, $record) { + return new pgSelect_js_1.PgSelectStep({ + resource: resource, + identifiers: [], + from: fromRecord, + args: [{ step: $record, pgCodec: resource.codec }], + joinAsLateral: true, + }); +} +/** + * Given a plan that represents a single record (via + * PgSelectSingleStep.record()) this turns it back into a PgSelectSingleStep + */ +function pgSelectSingleFromRecord(resource, $record) { + // OPTIMIZE: we should be able to optimise this so that `plan.record()` returns the original record again. + return pgSelectFromRecord(resource, $record).single(); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgSelectFromRecord, "pgSelectFromRecord"); +(0, grafast_1.exportAs)("@dataplan/pg", pgSelectSingleFromRecord, "pgSelectSingleFromRecord"); +//# sourceMappingURL=pgSelectSingle.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSelectSingle.js.map b/grafast/dataplan-pg/dist/steps/pgSelectSingle.js.map new file mode 100644 index 0000000000..07f5879ed3 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSelectSingle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgSelectSingle.js","sourceRoot":"","sources":["../../src/steps/pgSelectSingle.ts"],"names":[],"mappings":";;;AAwnBA,gDAuBC;AAMD,4DAWC;;AA/pBD,qCAAmE;AAGnE,2DAAuC;AAGvC,4CAAqC;AAarC,0CAA4C;AAE5C,iEAA2D;AAC3D,+CAA6C;AAE7C,+CAA6C;AAY7C,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,CAAY,CAAC;AAEjD,4EAA4E;AAC5E,eAAe;AACf,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,iBAAK,CAAC,IAAI;IACV,iBAAK,CAAC,GAAG;IACT,iBAAK,CAAC,MAAM;IACZ,iBAAK,CAAC,KAAK;IACX,iBAAK,CAAC,MAAM;IACZ,iBAAK,CAAC,IAAI;IACV,iBAAK,CAAC,OAAO;IACb,iBAAK,CAAC,IAAI;IACV,iBAAK,CAAC,SAAS;IACf,iBAAK,CAAC,WAAW;CAClB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAa,kBAGX,SAAQ,uBAGP;aAUM,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,oBAAoB;KACjC,AAHc,CAGb;IAYF,YACE,MAA+B,EAC/B,KAAsB,EACd,UAAqC,MAAM,CAAC,MAAM,CAAC,IAAI,CA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--git a/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.d.ts b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.d.ts new file mode 100644 index 0000000000..5089e225cf --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.d.ts @@ -0,0 +1,28 @@ +import type { ExecutionDetails, GrafastResultsList, PolymorphicData, PolymorphicStep } from "grafast"; +import { Step } from "grafast"; +import type { GraphQLObjectType } from "grafast/graphql"; +import type { PgResource } from "../datasource.js"; +import type { PgSelectSingleStep } from "./pgSelectSingle.js"; +/** + * This polymorphic plan is to support polymorphism from a single PostgreSQL + * table, typically these tables will have a "type" (or similar) attribute that + * details the type of the data in the row. This class accepts a plan that + * resolves to the GraphQLObjectType type name (a string), and a second plan + * that represents a row from this table. + */ +export declare class PgSingleTablePolymorphicStep> extends Step implements PolymorphicStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private typeStepId; + private rowStepId; + constructor($typeName: Step, $row: PgSelectSingleStep); + private rowPlan; + deduplicate(peers: PgSingleTablePolymorphicStep[]): PgSingleTablePolymorphicStep[]; + planForType(_type: GraphQLObjectType): Step; + execute({ indexMap, values, }: ExecutionDetails): GrafastResultsList> | null>; +} +export declare function pgSingleTablePolymorphic>($typeName: Step, $row: PgSelectSingleStep): PgSingleTablePolymorphicStep; +//# sourceMappingURL=pgSingleTablePolymorphic.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.d.ts.map b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.d.ts.map new file mode 100644 index 0000000000..6386949204 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgSingleTablePolymorphic.d.ts","sourceRoot":"","sources":["../../src/steps/pgSingleTablePolymorphic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAA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,4BAA4B,CAAC,SAAS,CAAC,CAEzC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.js b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.js new file mode 100644 index 0000000000..625502a729 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgSingleTablePolymorphicStep = void 0; +exports.pgSingleTablePolymorphic = pgSingleTablePolymorphic; +const grafast_1 = require("grafast"); +/** + * This polymorphic plan is to support polymorphism from a single PostgreSQL + * table, typically these tables will have a "type" (or similar) attribute that + * details the type of the data in the row. This class accepts a plan that + * resolves to the GraphQLObjectType type name (a string), and a second plan + * that represents a row from this table. + */ +class PgSingleTablePolymorphicStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgSingleTablePolymorphicStep", + }; } + constructor($typeName, $row) { + super(); + this.isSyncAndSafe = true; + this.typeStepId = this.addDependency($typeName); + this.rowStepId = this.addDependency($row); + } + rowPlan() { + return this.getDep(this.rowStepId); + } + deduplicate(peers) { + return peers; + } + planForType(_type) { + return this.rowPlan(); + } + execute({ indexMap, values, }) { + const valuesDep = values[this.typeStepId]; + return indexMap((i) => { + const v = valuesDep.at(i); + return v ? (0, grafast_1.polymorphicWrap)(v) : null; + }); + } +} +exports.PgSingleTablePolymorphicStep = PgSingleTablePolymorphicStep; +function pgSingleTablePolymorphic($typeName, $row) { + return new PgSingleTablePolymorphicStep($typeName, $row); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgSingleTablePolymorphic, "pgSingleTablePolymorphic"); +//# sourceMappingURL=pgSingleTablePolymorphic.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.js.map b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.js.map new file mode 100644 index 0000000000..3e266f8de6 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgSingleTablePolymorphic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgSingleTablePolymorphic.js","sourceRoot":"","sources":["../../src/steps/pgSingleTablePolymorphic.ts"],"names":[],"mappings":";;;AA2EA,4DAOC;AA3ED,qCAA0D;AAM1D;;;;;;GAMG;AACH,MAAa,4BAGX,SAAQ,cAAa;aAGd,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,8BAA8B;KAC3C,AAHc,CAGb;IAMF,YACE,SAA8B,EAC9B,IAAmC;QAEnC,KAAK,EAAE,CAAC;QATV,kBAAa,GAAG,IAAI,CAAC;QAUnB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAEO,OAAO;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IAED,WAAW,CACT,KAA0C;QAE1C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,WAAW,CAAC,KAAwB;QAClC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;IAED,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,GACW;QAIjB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,OAAO,QAAQ,CAEb,CAAC,CAAC,EAAE,EAAE;YACN,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1B,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,yBAAe,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;;AApDH,oEAqDC;AAED,SAAgB,wBAAwB,CAGtC,SAA8B,EAC9B,IAAmC;IAEnC,OAAO,IAAI,4BAA4B,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC;AAED,IAAA,kBAAQ,EAAC,cAAc,EAAE,wBAAwB,EAAE,0BAA0B,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgStmt.d.ts b/grafast/dataplan-pg/dist/steps/pgStmt.d.ts new file mode 100644 index 0000000000..53d0f1900a --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgStmt.d.ts @@ -0,0 +1,154 @@ +import type { __InputStaticLeafStep, ExecutionDetails, Maybe } from "grafast"; +import { Step } from "grafast"; +import { type SQL } from "pg-sql2"; +import type { PgCodec, PgGroupSpec, PgQueryRootStep, PgTypedStep } from "../interfaces.js"; +import type { PgLocker } from "../pgLocker.js"; +import type { PgSelectParsedCursorStep } from "./pgSelect.js"; +export interface QueryValue { + dependencyIndex: number; + codec: PgCodec; + alreadyEncoded: boolean; +} +/** + * Sometimes we want to refer to something that might change later - e.g. we + * might have SQL that specifies a list of explicit values, or it might later + * want to be replaced with a reference to an existing table value (e.g. when a + * query is being inlined). PgStmtDeferred allows for this kind of + * flexibility. It's really important to keep in mind that the same placeholder + * might be used in multiple different SQL queries, and in the different + * queries it might end up with different values - this is particularly + * relevant when using `@stream`/`@defer`, for example. + */ +export type PgStmtDeferredPlaceholder = { + symbol: symbol; + dependencyIndex: number; + codec: PgCodec; + alreadyEncoded: boolean; +}; +export type PgStmtDeferredSQL = { + symbol: symbol; + dependencyIndex: number; +}; +export declare abstract class PgStmtBaseStep extends Step implements PgQueryRootStep { + static $$export: { + moduleName: string; + exportName: string; + }; + protected abstract locker: PgLocker; + /** + * Values used in this plan. + */ + protected abstract placeholders: Array; + protected abstract deferreds: Array; + protected abstract firstStepId: number | null; + protected abstract lastStepId: number | null; + protected abstract fetchOneExtra: boolean; + protected abstract offsetStepId: number | null; + protected abstract beforeStepId: number | null; + protected abstract afterStepId: number | null; + protected needsCursor: boolean; + scopedSQL: (cb: import("../interfaces.js").PgSQLCallbackOrDirect) => T_1; + /** + * If we can't figure out the SQL until runtime, we can pass a step that + * resolves to an SQL fragment. + * + * IMPORTANT: this step must be a "unary" step; i.e. it can only depend on + * request-global dependencies such as variableValues, context, and input + * arguments. + */ + deferredSQL($step: Step): SQL; + placeholder($step: PgTypedStep): SQL; + placeholder($step: Step, codec: PgCodec, alreadyEncoded?: boolean): SQL; + protected makeValues(executionDetails: ExecutionDetails, name: string): { + queryValues: QueryValue[]; + placeholderValues: Map; + identifiersSymbol: symbol; + identifiersAlias: SQL; + handlePlaceholder: (placeholder: PgStmtDeferredPlaceholder) => void; + }; + protected abstract assertCursorPaginationAllowed(): void; + setFirst($first: Step>): this; + setLast($last: Step>): this; + setOffset($offset: Step>): this; + setAfter($parsedCursorPlan: PgSelectParsedCursorStep): void; + setBefore($parsedCursorPlan: PgSelectParsedCursorStep): void; + parseCursor($cursorPlan: __InputStaticLeafStep>): PgSelectParsedCursorStep; + /** + * Someone (probably pageInfo) wants to know if there's more records. To + * determine this we fetch one extra record and then throw it away. + */ + hasMore(): Step; + getPgRoot(): this; +} +export declare function getUnary(values: ExecutionDetails["values"], stepId: number): T; +export declare function getUnary(values: ExecutionDetails["values"], stepId: number | null): T | undefined; +export declare function calculateLimitAndOffsetSQL(params: { + cursorLower: Maybe; + cursorUpper: Maybe; + first: Maybe; + last: Maybe; + offset: Maybe; + fetchOneExtra: boolean; +}): SQL[]; +export interface PgStmtCommonQueryInfo { + readonly symbol: symbol | string; + readonly alias: SQL; + readonly hasSideEffects: boolean; + readonly executionDetails: ExecutionDetails; + readonly placeholderSymbols: ReadonlyArray; + readonly deferredSymbols: ReadonlyArray; + readonly fetchOneExtra: boolean; + readonly forceIdentity: boolean; + readonly needsCursor: boolean; + readonly firstStepId: number | null; + readonly lastStepId: number | null; + readonly offsetStepId: number | null; + readonly beforeStepId: number | null; + readonly afterStepId: number | null; + readonly groups: ReadonlyArray; + readonly havingConditions: ReadonlyArray; + readonly applyDepIds: ReadonlyArray; +} +export interface PgStmtCompileQueryInfo extends PgStmtCommonQueryInfo { + readonly placeholders: ReadonlyArray; + readonly deferreds: ReadonlyArray; +} +export interface MutablePgStmtCommonQueryInfo { + cursorLower: Maybe; + cursorUpper: Maybe; + first: Maybe; + last: Maybe; + shouldReverseOrder: boolean; + offset: Maybe; + cursorDigest: string | null; + readonly cursorIndicies: Array<{ + readonly index: number; + readonly codec: PgCodec; + }> | null; +} +export interface ResolvedPgStmtCommonQueryInfo { + readonly cursorLower: Maybe; + readonly cursorUpper: Maybe; + readonly first: Maybe; + readonly last: Maybe; + readonly shouldReverseOrder: boolean; + readonly offset: Maybe; + readonly cursorDigest: string | null; + readonly cursorIndicies: ReadonlyArray<{ + readonly index: number; + readonly codec: PgCodec; + }> | null; +} +export declare function calculateLimitAndOffsetSQLFromInfo(info: PgStmtCommonQueryInfo & { + readonly cursorLower: Maybe; + readonly cursorUpper: Maybe; +}): SQL[]; +export declare function applyCommonPaginationStuff(info: PgStmtCommonQueryInfo & MutablePgStmtCommonQueryInfo): void; +export declare function makeValues(info: PgStmtCommonQueryInfo & PgStmtCompileQueryInfo, name: string): { + queryValues: QueryValue[]; + placeholderValues: Map; + identifiersSymbol: symbol; + identifiersAlias: SQL; + handlePlaceholder: (placeholder: PgStmtDeferredPlaceholder) => void; +}; +//# sourceMappingURL=pgStmt.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgStmt.d.ts.map b/grafast/dataplan-pg/dist/steps/pgStmt.d.ts.map new file mode 100644 index 0000000000..49bdeea726 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgStmt.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgStmt.d.ts","sourceRoot":"","sources":["../../src/steps/pgStmt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAA8C,IAAI,EAAE,MAAM,SAAS,CAA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AAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE/B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC;QACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;KACzB,CAAC,GAAG,IAAI,CAAC;CACX;AAED,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,qBAAqB,GAAG;IAC5B,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrC,SAgBF;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,qBAAqB,GAAG,4BAA4B,GACzD,IAAI,CAuBN;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,qBAAqB,GAAG,sBAAsB,EACpD,IAAI,EAAE,MAAM;;;;;qCAe4B,yBAAyB;EA+ClE"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgStmt.js b/grafast/dataplan-pg/dist/steps/pgStmt.js new file mode 100644 index 0000000000..fd76c1a5aa --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgStmt.js @@ -0,0 +1,389 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgStmtBaseStep = void 0; +exports.getUnary = getUnary; +exports.calculateLimitAndOffsetSQL = calculateLimitAndOffsetSQL; +exports.calculateLimitAndOffsetSQLFromInfo = calculateLimitAndOffsetSQLFromInfo; +exports.applyCommonPaginationStuff = applyCommonPaginationStuff; +exports.makeValues = makeValues; +const grafast_1 = require("grafast"); +const pg_sql2_1 = require("pg-sql2"); +const utils_js_1 = require("../utils.js"); +const UNHANDLED_PLACEHOLDER = (0, pg_sql2_1.sql) `(1/0) /* ERROR! Unhandled placeholder! */`; +const UNHANDLED_DEFERRED = (0, pg_sql2_1.sql) `(1/0) /* ERROR! Unhandled deferred! */`; +class PgStmtBaseStep extends grafast_1.Step { + constructor() { + super(...arguments); + this.needsCursor = false; + this.scopedSQL = (0, utils_js_1.makeScopedSQL)(this); + } + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgStmtBaseStep", + }; } + /** + * If we can't figure out the SQL until runtime, we can pass a step that + * resolves to an SQL fragment. + * + * IMPORTANT: this step must be a "unary" step; i.e. it can only depend on + * request-global dependencies such as variableValues, context, and input + * arguments. + */ + deferredSQL($step) { + const symbol = Symbol(`deferred-${$step.id}`); + const dependencyIndex = this.addUnaryDependency($step); + this.deferreds.push({ symbol, dependencyIndex }); + return pg_sql2_1.sql.placeholder(symbol, UNHANDLED_DEFERRED); + } + placeholder($step, overrideCodec, alreadyEncoded = false) { + if (this.locker.locked) { + throw new Error(`${this}: cannot add placeholders once plan is locked`); + } + if (this.placeholders.length >= 100000) { + throw new Error(`There's already ${this.placeholders.length} placeholders; wanting more suggests there's a bug somewhere`); + } + const codec = overrideCodec ?? ("pgCodec" in $step ? $step.pgCodec : null); + if (!codec) { + console.trace(`${this}.placeholder(${$step}) call, no codec`); + throw new Error(`Step ${$step} does not contain pgCodec information, please pass the codec explicitly to the 'placeholder' method.`); + // throw new Error( + // `Step ${$step} does not contain pgCodec information, please wrap ` + + // `it in \`pgCast\`. E.g. \`pgCast($step, TYPES.boolean)\``, + // ); + } + const $evalledStep = (0, grafast_1.applyTransforms)($step); + const dependencyIndex = this.addDependency($evalledStep); + const symbol = Symbol(`placeholder-${$step.id}`); + this.placeholders.push({ + symbol, + dependencyIndex, + codec, + alreadyEncoded, + }); + // This allows us to replace the SQL that will be compiled, for example + // when we're inlining this into a parent query. + return pg_sql2_1.sql.placeholder(symbol, UNHANDLED_PLACEHOLDER); + } + makeValues(executionDetails, name) { + const { values, count } = executionDetails; + const identifiersSymbol = Symbol(name + "_identifiers"); + const identifiersAlias = pg_sql2_1.sql.identifier(identifiersSymbol); + /** + * Since this is effectively like a DataLoader it processes the data for many + * different resolvers at once. This list of (hopefully scalar) plans is used + * to represent queryValues the query will need such as identifiers for which + * records in the result set should be returned to which GraphQL resolvers, + * parameters for conditions or orders, etc. + */ + const queryValues = []; + const placeholderValues = new Map(); + const handlePlaceholder = (placeholder) => { + const { symbol, dependencyIndex, codec, alreadyEncoded } = placeholder; + const ev = values[dependencyIndex]; + if (!ev.isBatch || count === 1) { + const value = ev.at(0); + const encodedValue = value == null ? null : alreadyEncoded ? value : codec.toPg(value); + placeholderValues.set(symbol, (0, pg_sql2_1.sql) `${pg_sql2_1.sql.value(encodedValue)}::${codec.sqlType}`); + } + else { + // Fine a existing match for this dependency of this type + const existingIndex = queryValues.findIndex((v) => v.dependencyIndex === dependencyIndex && v.codec === codec); + // If none exists, add one to our query values + const idx = existingIndex >= 0 + ? existingIndex + : queryValues.push(placeholder) - 1; + // Finally alias this symbol to a reference to this placeholder + placeholderValues.set(placeholder.symbol, (0, pg_sql2_1.sql) `${identifiersAlias}.${pg_sql2_1.sql.identifier(`id${idx}`)}`); + } + }; + this.placeholders.forEach(handlePlaceholder); + // Handle deferreds + this.deferreds.forEach((placeholder) => { + const { symbol, dependencyIndex } = placeholder; + const fragment = values[dependencyIndex].unaryValue(); + if (!pg_sql2_1.sql.isSQL(fragment)) { + throw new Error(`Deferred SQL must be a valid SQL fragment`); + } + placeholderValues.set(symbol, fragment); + }); + return { + queryValues, + placeholderValues, + identifiersSymbol, + identifiersAlias, + handlePlaceholder, + }; + } + setFirst($first) { + this.locker.assertParameterUnlocked("first"); + this.firstStepId = this.addUnaryDependency($first); + this.locker.lockParameter("first"); + return this; + } + setLast($last) { + this.assertCursorPaginationAllowed(); + this.locker.assertParameterUnlocked("orderBy"); + this.locker.assertParameterUnlocked("last"); + this.lastStepId = this.addUnaryDependency($last); + this.locker.lockParameter("last"); + return this; + } + setOffset($offset) { + this.locker.assertParameterUnlocked("offset"); + this.offsetStepId = this.addUnaryDependency($offset); + this.locker.lockParameter("offset"); + return this; + } + setAfter($parsedCursorPlan) { + this.afterStepId = this.addUnaryDependency($parsedCursorPlan); + } + setBefore($parsedCursorPlan) { + this.beforeStepId = this.addUnaryDependency($parsedCursorPlan); + } + parseCursor($cursorPlan) { + this.assertCursorPaginationAllowed(); + const $parsedCursorPlan = (0, grafast_1.lambda)($cursorPlan, parseCursor); + return $parsedCursorPlan; + } + /** + * Someone (probably pageInfo) wants to know if there's more records. To + * determine this we fetch one extra record and then throw it away. + */ + hasMore() { + this.fetchOneExtra = true; + return (0, grafast_1.access)(this, "hasMore", false); + } + getPgRoot() { + return this; + } +} +exports.PgStmtBaseStep = PgStmtBaseStep; +function parseCursor(cursor) { + if (cursor == null) { + return null; + } + try { + if (typeof cursor !== "string") { + throw new Error("Invalid cursor"); + } + const decoded = JSON.parse(Buffer.from(cursor, "base64").toString("utf8")); + if (!Array.isArray(decoded)) { + throw new Error("Expected array"); + } + return decoded; + } + catch (e) { + throw new grafast_1.SafeError("Invalid cursor, please enter a cursor from a previous request, or null."); + } +} +parseCursor.isSyncAndSafe = true; // Optimization +function getUnary(values, stepId) { + return stepId == null ? undefined : values[stepId].unaryValue(); +} +function calculateLimitAndOffsetSQL(params) { + const { cursorLower, cursorUpper, first, last, offset, fetchOneExtra } = params; + let limitValue; + let offsetValue; + let innerLimitValue; + if (cursorLower != null || cursorUpper != null) { + /* + * When using cursor-base pagination with 'natural' cursors, we are actually + * applying limit/offset under the hood (presumably because we're paginating + * something that has no explicit order, like a function). + * + * If you have: + * - first: 3 + * - after: ['natural', 4] + * + * Then we want `limit 3 offset 4`. + * With `fetchOneExtra` it'd be `limit 4 offset 4`. + * + * For: + * - last: 2 + * - before: ['natural', 6] + * + * We want `limit 2 offset 4` + * With `fetchOneExtra` it'd be `limit 3 offset 3`. + * + * For: + * - last: 2 + * - before: ['natural', 3] + * + * We want `limit 2` + * With `fetchOneExtra` it'd still be `limit 2`. + * + * For: + * - last: 2 + * - before: ['natural', 4] + * + * We want `limit 2 offset 1` + * With `fetchOneExtra` it'd be `limit 3`. + * + * Using `offset` with `after`/`before` is forbidden, so we do not need to + * consider that. + * + * For: + * - after: ['natural', 2] + * - before: ['natural', 6] + * + * We want `limit 4 offset 2` + * With `fetchOneExtra` it'd be `limit 4 offset 2` still. + * + * For: + * - first: 2 + * - after: ['natural', 2] + * - before: ['natural', 6] + * + * We want `limit 2 offset 2` + * With `fetchOneExtra` it'd be `limit 3 offset 2` still. + */ + /** lower bound - exclusive (1-indexed) */ + let lower = 0; + /** upper bound - exclusive (1-indexed) */ + let upper = Infinity; + // Apply 'after', if present + if (cursorLower != null) { + lower = Math.max(0, cursorLower); + } + // Apply 'before', if present + if (cursorUpper != null) { + upper = cursorUpper; + } + // Cannot go beyond these bounds + const maxUpper = upper; + // Apply 'first', if present + if (first != null) { + upper = Math.min(upper, lower + first + 1); + } + // Apply 'last', if present + if (last != null) { + lower = Math.max(0, lower, upper - last - 1); + } + // Apply 'offset', if present + if (offset != null && offset > 0) { + lower = Math.min(lower + offset, maxUpper); + upper = Math.min(upper + offset, maxUpper); + } + // If 'fetch one extra', adjust: + if (fetchOneExtra) { + if (first != null) { + upper = upper + 1; + } + else if (last != null) { + lower = Math.max(0, lower - 1); + } + } + /** lower, but 0-indexed and inclusive */ + const lower0 = lower - 1 + 1; + /** upper, but 0-indexed and inclusive */ + const upper0 = upper - 1 - 1; + // Calculate the final limit/offset + limitValue = isFinite(upper0) ? Math.max(0, upper0 - lower0 + 1) : null; + offsetValue = lower0; + innerLimitValue = limitValue != null ? limitValue + offsetValue : null; + } + else { + limitValue = + first != null + ? first + (fetchOneExtra ? 1 : 0) + : last != null + ? last + (fetchOneExtra ? 1 : 0) + : null; + offsetValue = offset; + innerLimitValue = + first != null || last != null + ? (first ?? last ?? 0) + (offset ?? 0) + (fetchOneExtra ? 1 : 0) + : null; + } + // PERF: consider changing from `${sql.literal(v)}` to + // `${sql.value(v)}::"int4"`. (The advantage being that fewer SQL queries are + // generated, and thus chances of reusing a query are greater.) + const limitSql = limitValue == null ? pg_sql2_1.sql.blank : (0, pg_sql2_1.sql) `\nlimit ${pg_sql2_1.sql.literal(limitValue)}`; + const offsetSql = offsetValue == null || offsetValue === 0 + ? pg_sql2_1.sql.blank + : (0, pg_sql2_1.sql) `\noffset ${pg_sql2_1.sql.literal(offsetValue)}`; + const limitAndOffset = (0, pg_sql2_1.sql) `${limitSql}${offsetSql}`; + const innerLimitSQL = innerLimitValue != null + ? (0, pg_sql2_1.sql) `\nlimit ${pg_sql2_1.sql.literal(innerLimitValue)}` + : pg_sql2_1.sql.blank; + return [limitAndOffset, innerLimitSQL]; +} +function calculateLimitAndOffsetSQLFromInfo(info) { + const { executionDetails: { values }, fetchOneExtra, cursorUpper, cursorLower, } = info; + return calculateLimitAndOffsetSQL({ + first: getUnary(values, info.firstStepId), + last: getUnary(values, info.lastStepId), + offset: getUnary(values, info.offsetStepId), + cursorLower, + cursorUpper, + fetchOneExtra, + }); +} +function applyCommonPaginationStuff(info) { + const { cursorUpper, cursorLower, executionDetails: { values }, } = info; + const first = getUnary(values, info.firstStepId); + const last = getUnary(values, info.lastStepId); + const offset = getUnary(values, info.offsetStepId); + if (offset != null && last != null) { + throw new grafast_1.SafeError("Cannot use 'offset' with 'last'"); + } + info.first = first; + info.last = last; + info.offset = offset; + /** + * If `last` is in use then we reverse the order from the database and then + * re-reverse it in JS-land. + */ + info.shouldReverseOrder = + first == null && last != null && cursorLower == null && cursorUpper == null; +} +function makeValues(info, name) { + const { executionDetails, placeholders, deferreds } = info; + const { values, count } = executionDetails; + const identifiersSymbol = Symbol(name + "_identifiers"); + const identifiersAlias = pg_sql2_1.sql.identifier(identifiersSymbol); + /** + * Since this is effectively like a DataLoader it processes the data for many + * different resolvers at once. This list of (hopefully scalar) plans is used + * to represent queryValues the query will need such as identifiers for which + * records in the result set should be returned to which GraphQL resolvers, + * parameters for conditions or orders, etc. + */ + const queryValues = []; + const placeholderValues = new Map(); + const handlePlaceholder = (placeholder) => { + const { symbol, dependencyIndex, codec, alreadyEncoded } = placeholder; + const ev = values[dependencyIndex]; + if (!ev.isBatch || count === 1) { + const value = ev.at(0); + const encodedValue = value == null ? null : alreadyEncoded ? value : codec.toPg(value); + placeholderValues.set(symbol, (0, pg_sql2_1.sql) `${pg_sql2_1.sql.value(encodedValue)}::${codec.sqlType}`); + } + else { + // Fine a existing match for this dependency of this type + const existingIndex = queryValues.findIndex((v) => v.dependencyIndex === dependencyIndex && v.codec === codec); + // If none exists, add one to our query values + const idx = existingIndex >= 0 ? existingIndex : queryValues.push(placeholder) - 1; + // Finally alias this symbol to a reference to this placeholder + placeholderValues.set(placeholder.symbol, (0, pg_sql2_1.sql) `${identifiersAlias}.${pg_sql2_1.sql.identifier(`id${idx}`)}`); + } + }; + placeholders.forEach(handlePlaceholder); + // Handle deferreds + deferreds.forEach((placeholder) => { + const { symbol, dependencyIndex } = placeholder; + const fragment = values[dependencyIndex].unaryValue(); + if (!pg_sql2_1.sql.isSQL(fragment)) { + throw new Error(`Deferred SQL must be a valid SQL fragment`); + } + placeholderValues.set(symbol, fragment); + }); + return { + queryValues, + placeholderValues, + identifiersSymbol, + identifiersAlias, + handlePlaceholder, + }; +} +//# sourceMappingURL=pgStmt.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgStmt.js.map b/grafast/dataplan-pg/dist/steps/pgStmt.js.map new file mode 100644 index 0000000000..ef3ecd1d0a --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgStmt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgStmt.js","sourceRoot":"","sources":["../../src/steps/pgStmt.ts"],"names":[],"mappings":";;;AAwRA,4BAKC;AAED,gEAoJC;AA+DD,gFAoBC;AAED,gEAyBC;AAED,gCAgEC;AAlmBD,qCAA2E;AAC3E,qCAAwC;AASxC,0CAA4C;AA+B5C,MAAM,qBAAqB,GAAG,IAAA,aAAG,EAAA,2CAA2C,CAAC;AA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AAM,GAAG,GACP,aAAa,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAEzE,+DAA+D;YAC/D,iBAAiB,CAAC,GAAG,CACnB,WAAW,CAAC,MAAM,EAClB,IAAA,aAAG,EAAA,GAAG,gBAAgB,IAAI,aAAG,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,EAAE,CACvD,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;IACF,YAAY,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAExC,mBAAmB;IACnB,SAAS,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;QAChC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,WAAW,CAAC;QAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC;QACtD,IAAI,CAAC,aAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;QACD,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW;QACX,iBAAiB;QACjB,iBAAiB;QACjB,gBAAgB;QAChB,iBAAiB;KAClB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgTempTable.d.ts b/grafast/dataplan-pg/dist/steps/pgTempTable.d.ts new file mode 100644 index 0000000000..6d9c02dd4d --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgTempTable.d.ts @@ -0,0 +1,20 @@ +import type { SQL } from "pg-sql2"; +import type { PgResource } from "../datasource.js"; +import type { PgClassFilter } from "../filters/pgClassFilter.js"; +import type { PgConditionCapableParent } from "./pgCondition.js"; +import { PgCondition } from "./pgCondition.js"; +export declare class PgTempTable> implements PgConditionCapableParent { + readonly parent: PgClassFilter; + readonly resource: TResource; + static $$export: { + moduleName: string; + exportName: string; + }; + readonly alias: SQL; + readonly conditions: SQL[]; + constructor(parent: PgClassFilter, resource: TResource); + where(condition: SQL): void; + wherePlan(): PgCondition; + fromExpression(): SQL; +} +//# sourceMappingURL=pgTempTable.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgTempTable.d.ts.map b/grafast/dataplan-pg/dist/steps/pgTempTable.d.ts.map new file mode 100644 index 0000000000..99dea2ea17 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgTempTable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgTempTable.d.ts","sourceRoot":"","sources":["../../src/steps/pgTempTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,WAAW,CAAC,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAC5E,YAAW,wBAAwB;aAUjB,MAAM,EAAE,aAAa;aACrB,QAAQ,EAAE,SAAS;IATrC,MAAM,CAAC,QAAQ;;;MAGb;IAEF,SAAgB,KAAK,EAAE,GAAG,CAAC;IAC3B,SAAgB,UAAU,EAAE,GAAG,EAAE,CAAM;gBAErB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,SAAS;IAKrC,KAAK,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;IAG3B,SAAS;IAIT,cAAc;CAQf"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgTempTable.js b/grafast/dataplan-pg/dist/steps/pgTempTable.js new file mode 100644 index 0000000000..433490dae9 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgTempTable.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgTempTable = void 0; +const pg_sql2_1 = require("pg-sql2"); +const pgCondition_js_1 = require("./pgCondition.js"); +class PgTempTable { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgTempTable", + }; } + constructor(parent, resource) { + this.parent = parent; + this.resource = resource; + this.conditions = []; + this.alias = pg_sql2_1.sql.identifier(Symbol(`${resource.name}_filter`)); + } + where(condition) { + this.conditions.push(condition); + } + wherePlan() { + return new pgCondition_js_1.PgCondition(this); + } + fromExpression() { + const from = this.resource.from; + if (typeof from === "function") { + throw new Error("PgTempTable doesn't support function sources yet."); + } + else { + return from; + } + } +} +exports.PgTempTable = PgTempTable; +//# sourceMappingURL=pgTempTable.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgTempTable.js.map b/grafast/dataplan-pg/dist/steps/pgTempTable.js.map new file mode 100644 index 0000000000..b723f8b283 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgTempTable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgTempTable.js","sourceRoot":"","sources":["../../src/steps/pgTempTable.ts"],"names":[],"mappings":";;;AACA,qCAA8B;AAK9B,qDAA+C;AAE/C,MAAa,WAAW;aAGf,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,aAAa;KAC1B,AAHc,CAGb;IAIF,YACkB,MAAqB,EACrB,QAAmB;QADnB,WAAM,GAAN,MAAM,CAAe;QACrB,aAAQ,GAAR,QAAQ,CAAW;QAHrB,eAAU,GAAU,EAAE,CAAC;QAKrC,IAAI,CAAC,KAAK,GAAG,aAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,SAAc;QAClB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IACD,SAAS;QACP,OAAO,IAAI,4BAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,cAAc;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QAChC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;;AA/BH,kCAgCC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUnionAll.d.ts b/grafast/dataplan-pg/dist/steps/pgUnionAll.d.ts new file mode 100644 index 0000000000..c0b40e75c3 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUnionAll.d.ts @@ -0,0 +1,214 @@ +import type { ConnectionCapableStep, ConnectionStep, EdgeCapableStep, ExecutionDetails, GrafastResultsList, GrafastValuesList, Maybe, PolymorphicStep } from "grafast"; +import { Step } from "grafast"; +import type { GraphQLObjectType } from "grafast/graphql"; +import type { SQL } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgResource, PgResourceUnique } from "../datasource.js"; +import type { PgCodecRefPath, PgGroupSpec } from "../index.js"; +import type { PgCodec, PgQueryBuilder, PgSQLCallbackOrDirect, PgTypedStep, PgUnionAllQueryBuilderCallback, ReadonlyArrayOrDirect } from "../interfaces.js"; +import { PgLocker } from "../pgLocker.js"; +import type { PgClassExpressionStep } from "./pgClassExpression.js"; +import type { PgHavingConditionSpec, PgWhereConditionSpec } from "./pgCondition.js"; +import { PgCondition } from "./pgCondition.js"; +import type { PgCursorDetails } from "./pgCursor.js"; +import { PgCursorStep } from "./pgCursor.js"; +import type { PgPageInfoStep } from "./pgPageInfo.js"; +import type { PgSelectParsedCursorStep } from "./pgSelect.js"; +import type { PgSelectSingleStep } from "./pgSelectSingle.js"; +import type { PgStmtDeferredPlaceholder, PgStmtDeferredSQL } from "./pgStmt.js"; +import { PgStmtBaseStep } from "./pgStmt.js"; +export type PgUnionAllStepConfigAttributes = { + [attributeName in TAttributes]: { + codec: PgCodec; + notNull?: boolean; + }; +}; +export interface PgUnionAllStepMember { + typeName: TTypeNames; + resource: PgResource>, any, any>; + match?: { + [resourceAttributeName: string]: { + step: PgTypedStep; + codec?: never; + } | { + step: Step; + codec: PgCodec; + }; + }; + path?: PgCodecRefPath; +} +export interface PgUnionAllStepConfig { + resourceByTypeName: { + [typeName in TTypeNames]: PgResource; + }; + attributes?: PgUnionAllStepConfigAttributes; + members?: PgUnionAllStepMember[]; + mode?: PgUnionAllMode; + name?: string; + /** + * Set this true if your query includes any `VOLATILE` function (including + * seemingly innocuous things such as `random()`) otherwise we might only + * call the relevant function once and re-use the result. + */ + forceIdentity?: boolean; +} +export interface PgUnionAllStepCondition { + attribute: TAttributes; + callback: (fragment: SQL) => SQL; +} +export interface PgUnionAllStepOrder { + attribute: TAttributes; + direction: "ASC" | "DESC"; +} +export declare class PgUnionAllSingleStep extends Step implements PolymorphicStep, EdgeCapableStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private typeKey; + private pkKey; + private readonly spec; + constructor($parent: PgUnionAllStep, $item: Step); + planForType(objectType: GraphQLObjectType): Step; + /** + * When selecting a connection we need to be able to get the cursor. The + * cursor is built from the values of the `ORDER BY` clause so that we can + * find nodes before/after it. + */ + cursor(): PgCursorStep; + getClassStep(): PgUnionAllStep; + getMeta(key: string): import("grafast").AccessStep; + node(): this; + scopedSQL: (cb: PgSQLCallbackOrDirect) => T; + placeholder($step: PgTypedStep): SQL; + placeholder($step: Step, codec: PgCodec): SQL; + /** + * Returns a plan representing the result of an expression. + */ + expression(expression: SQL, codec: TExpressionCodec, guaranteedNotNull?: boolean): PgClassExpressionStep; + select(fragment: PgSQLCallbackOrDirect, codec: TExpressionCodec, guaranteedNotNull?: boolean): PgClassExpressionStep; + execute({ count, values: [values0], }: ExecutionDetails): GrafastResultsList; +} +export type PgUnionAllMode = "normal" | "aggregate"; +interface PgUnionAllStepResult { + m: Record; + hasMore?: boolean; + /** a tuple based on what is selected at runtime */ + items: ReadonlyArray; + cursorDetails?: PgCursorDetails; +} +/** + * Represents a `UNION ALL` statement, which can have multiple table-like + * resources, but must return a consistent data shape. + */ +export declare class PgUnionAllStep extends PgStmtBaseStep implements ConnectionCapableStep, PgSelectParsedCursorStep> { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + symbol: symbol; + alias: SQL; + private selects; + private executor; + private contextId; + /** + * Values used in this plan. + */ + protected placeholders: Array; + protected deferreds: Array; + private groups; + private havingConditions; + protected firstStepId: number | null; + protected lastStepId: number | null; + protected fetchOneExtra: boolean; + /** When using natural pagination, this index is the lower bound (and should be excluded) */ + protected lowerIndexStepId: number | null; + /** When using natural pagination, this index is the upper bound (and should be excluded) */ + protected upperIndexStepId: number | null; + /** When we calculate the limit/offset, we may be able to determine there cannot be a next page */ + private limitAndOffsetId; + protected offsetStepId: number | null; + protected beforeStepId: number | null; + protected afterStepId: number | null; + private connectionDepId; + readonly mode: PgUnionAllMode; + protected locker: PgLocker; + private memberDigests; + private _limitToTypes; + private applyDepIds; + /** + * Set this true if your query includes any `VOLATILE` function (including + * seemingly innocuous things such as `random()`) otherwise we might only + * call the relevant function once and re-use the result. + */ + forceIdentity: boolean; + static clone(cloneFrom: PgUnionAllStep, mode?: PgUnionAllMode): PgUnionAllStep; + constructor(spec: PgUnionAllStepConfig); + connectionClone($connection: ConnectionStep, mode?: PgUnionAllMode): PgUnionAllStep; + select(key: TAttribute): number; + selectAndReturnIndex(rawFragment: PgSQLCallbackOrDirect): number; + selectPk(): number; + selectExpression(rawExpression: PgSQLCallbackOrDirect, codec: PgCodec): number; + selectType(): number; + getMeta(key: string): import("grafast").AccessStep; + /** + * If this plan may only return one record, you can use `.singleAsRecord()` + * to return a plan that resolves to that record (rather than a list of + * records as it does currently). + * + * Beware: if you call this and the database might actually return more than + * one record then you're potentially in for a Bad Time. + */ + singleAsRecord(): PgUnionAllSingleStep; + single(): PgUnionAllSingleStep; + row($row: Step): PgUnionAllSingleStep; + apply($step: Step>>): void; + items(): PgUnionAllRowsStep; + listItem(itemPlan: Step): any; + pageInfo($connectionPlan: ConnectionStep): PgPageInfoStep; + where(rawWhereSpec: PgSQLCallbackOrDirect>): void; + groupBy(group: PgSQLCallbackOrDirect): void; + having(rawCondition: PgSQLCallbackOrDirect>): void; + orderBy(orderSpec: PgUnionAllStepOrder): void; + setOrderIsUnique(): void; + protected assertCursorPaginationAllowed(): void; + /** @experimental */ + limitToTypes(types: readonly string[]): void; + optimize(): this; + getCursorDetails(): Step; + private typeIdx; + finalize(): void; + execute(executionDetails: ExecutionDetails): Promise>; + [$$toSQL](): SQL; + protected shouldReverseOrderId: number | null; + protected limitAndOffsetSQL: SQL | null; +} +export declare class PgUnionAllRowsStep extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + constructor($pgUnionAll: PgUnionAllStep); + getClassStep(): PgUnionAllStep; + listItem(itemPlan: Step): any; + deduplicate(_peers: readonly Step[]): readonly Step[]; + optimize(): import("grafast").AccessStep; + execute(executionDetails: ExecutionDetails): readonly any[]; +} +export declare function pgUnionAll(spec: PgUnionAllStepConfig): PgUnionAllStep; +export interface PgUnionAllQueryBuilder extends PgQueryBuilder { + /** Instruct to add another order */ + orderBy(spec: PgUnionAllStepOrder): void; + /** Inform that the resulting order is now unique */ + setOrderIsUnique(): void; + where(whereSpec: PgWhereConditionSpec): void; + whereBuilder(): PgCondition; + having(rawCondition: PgHavingConditionSpec): void; + havingBuilder(): PgCondition; + /** Only return values of the given types */ + limitToTypes(types: readonly string[]): void; +} +export {}; +//# sourceMappingURL=pgUnionAll.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUnionAll.d.ts.map b/grafast/dataplan-pg/dist/steps/pgUnionAll.d.ts.map new file mode 100644 index 0000000000..4609a15cc4 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUnionAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgUnionAll.d.ts","sourceRoot":"","sources":["../../src/steps/pgUnionAll.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACL,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAYL,IAAI,EACL,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,SAAS,CAAC;AAChD,OAAO,EAAwB,OAAO,EAAO,MAAM,SAAS,CAAC;AAI7D,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAmB,WAAW,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EACV,OAAO,EAGP,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,8BAA8B,EAC9B,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,c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IAC1D,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,CAAC,YAAY,EAAE,qBAAqB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC1D,aAAa,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,4CAA4C;IAC5C,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CAC9C"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUnionAll.js b/grafast/dataplan-pg/dist/steps/pgUnionAll.js new file mode 100644 index 0000000000..501cc920ab --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUnionAll.js @@ -0,0 +1,1310 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgUnionAllRowsStep = exports.PgUnionAllStep = exports.PgUnionAllSingleStep = void 0; +exports.pgUnionAll = pgUnionAll; +const json_1 = require("@dataplan/json"); +const crypto_1 = require("crypto"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = require("pg-sql2"); +const codecs_js_1 = require("../codecs.js"); +const pgLocker_js_1 = require("../pgLocker.js"); +const utils_js_1 = require("../utils.js"); +const pgClassExpression_js_1 = require("./pgClassExpression.js"); +const pgCondition_js_1 = require("./pgCondition.js"); +const pgCursor_js_1 = require("./pgCursor.js"); +const pgPageInfo_js_1 = require("./pgPageInfo.js"); +const pgSelect_js_1 = require("./pgSelect.js"); +const pgStmt_js_1 = require("./pgStmt.js"); +const pgValidateParsedCursor_js_1 = require("./pgValidateParsedCursor.js"); +function isNotNullish(v) { + return v != null; +} +const rowNumberAlias = "n"; +const rowNumberIdent = pg_sql2_1.sql.identifier(rowNumberAlias); +// In future we'll allow mapping columns to different attributes/types +const digestSpecificExpressionFromAttributeName = (digest, name) => { + return pg_sql2_1.sql.identifier(name); +}; +const EMPTY_ARRAY = Object.freeze([]); +const NO_ROWS = Object.freeze({ + m: Object.create(null), + hasMore: false, + items: [], +}); +const hash = (text) => (0, crypto_1.createHash)("sha256").update(text).digest("hex").slice(0, 63); +function add([a, b]) { + return a + b; +} +add.isSyncAndSafe = true; +class PgUnionAllSingleStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgUnionAllSingleStep", + }; } + constructor($parent, $item) { + super(); + this.isSyncAndSafe = true; + this.scopedSQL = (0, utils_js_1.makeScopedSQL)(this); + this.addDependency($item); + this.spec = $parent.spec; + if ($parent.mode === "normal") { + this.typeKey = $parent.selectType(); + this.pkKey = $parent.selectPk(); + } + else { + this.typeKey = null; + this.pkKey = null; + } + } + planForType(objectType) { + if (this.pkKey === null || this.typeKey === null) { + throw new Error(`${this} not polymorphic because parent isn't in normal mode`); + } + const resource = this.spec.resourceByTypeName[objectType.name]; + if (!resource) { + // This type isn't handled; so it should never occur + return (0, grafast_1.constant)(null); + } + const pk = resource.uniques?.find((u) => u.isPrimary === true); + if (!pk) { + throw new Error(`No PK found for ${objectType.name}; this should have been caught earlier?!`); + } + const spec = Object.create(null); + const $parsed = (0, json_1.jsonParse)((0, grafast_1.access)(this, [this.pkKey])); + for (let i = 0, l = pk.attributes.length; i < l; i++) { + const col = pk.attributes[i]; + spec[col] = (0, grafast_1.access)($parsed, [i]); + } + return resource.get(spec); + } + /** + * When selecting a connection we need to be able to get the cursor. The + * cursor is built from the values of the `ORDER BY` clause so that we can + * find nodes before/after it. + */ + cursor() { + const cursorPlan = new pgCursor_js_1.PgCursorStep(this, this.getClassStep().getCursorDetails()); + return cursorPlan; + } + getClassStep() { + // TODO: we should add validation of this! + const $item = this.getDep(0); + const $rows = $item.getDep(0); + const $pgUnionAll = $rows.getDep(0); + return $pgUnionAll; + } + getMeta(key) { + return this.getClassStep().getMeta(key); + } + node() { + return this; + } + placeholder($step, overrideCodec) { + return overrideCodec + ? this.getClassStep().placeholder($step, overrideCodec) + : this.getClassStep().placeholder($step); + } + /** + * Returns a plan representing the result of an expression. + */ + expression(expression, codec, guaranteedNotNull) { + return this.select(expression, codec, guaranteedNotNull); + } + /** + * Advanced method; rather than returning a plan it returns an index. + * Generally useful for PgClassExpressionStep. + * + * @internal + */ + selectAndReturnIndex(fragment) { + return this.getClassStep().selectAndReturnIndex(fragment); + } + select(fragment, codec, guaranteedNotNull) { + const sqlExpr = (0, pgClassExpression_js_1.pgClassExpression)(this, codec, codec.notNull || guaranteedNotNull); + return sqlExpr `${this.scopedSQL(fragment)}`; + } + execute({ count, values: [values0], }) { + if (this.typeKey !== null) { + const typeKey = this.typeKey; + return values0.isBatch + ? values0.entries.map((v) => { + if (v == null) + return null; + const type = v[typeKey]; + return (0, grafast_1.polymorphicWrap)(type, v); + }) + : (0, grafast_1.arrayOfLength)(count, values0.value == null + ? null + : (0, grafast_1.polymorphicWrap)(values0.value[typeKey], values0.value)); + } + else { + return values0.isBatch + ? values0.entries + : (0, grafast_1.arrayOfLength)(count, values0.value); + } + } +} +exports.PgUnionAllSingleStep = PgUnionAllSingleStep; +/** + * Represents a `UNION ALL` statement, which can have multiple table-like + * resources, but must return a consistent data shape. + */ +class PgUnionAllStep extends pgStmt_js_1.PgStmtBaseStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgUnionAllStep", + }; } + static clone(cloneFrom, mode = cloneFrom.mode) { + const cloneFromMatchingMode = cloneFrom?.mode === mode ? cloneFrom : null; + const $clone = new PgUnionAllStep({ + ...cloneFrom.spec, + mode, + members: [], // This will be overwritten later + forceIdentity: cloneFrom.forceIdentity, + _internalCloneSymbol: cloneFrom.symbol, + _internalCloneAlias: cloneFrom.alias, + }); + if ($clone.dependencies.length !== 0) { + throw new Error(`Should not have any dependencies yet: ${$clone.dependencies}`); + } + cloneFrom.dependencies.forEach((planId, idx) => { + const myIdx = $clone.addDependency({ + ...cloneFrom.getDepOptions(idx), + skipDeduplication: true, + }); + if (myIdx !== idx) { + throw new Error(`Failed to clone ${cloneFrom}; dependency indexes did not match: ${myIdx} !== ${idx}`); + } + }); + $clone.applyDepIds = [...cloneFrom.applyDepIds]; + $clone.contextId = cloneFrom.contextId; + $clone.memberDigests = cloneFrom.memberDigests.map(cloneMemberDigest); + if (cloneFrom._limitToTypes) { + $clone._limitToTypes = [...cloneFrom._limitToTypes]; + } + $clone.placeholders = [...cloneFrom.placeholders]; + $clone.deferreds = [...cloneFrom.deferreds]; + $clone.executor = cloneFrom.executor; + $clone.isSyncAndSafe = cloneFrom.isSyncAndSafe; + $clone.alias = cloneFrom.alias; + if (cloneFromMatchingMode) { + $clone.selects = [...cloneFromMatchingMode.selects]; + $clone.groups = [...cloneFromMatchingMode.groups]; + $clone.havingConditions = [...cloneFromMatchingMode.havingConditions]; + $clone.orderSpecs = [...cloneFromMatchingMode.orderSpecs]; + $clone.firstStepId = cloneFromMatchingMode.firstStepId; + $clone.lastStepId = cloneFromMatchingMode.lastStepId; + $clone.fetchOneExtra = cloneFromMatchingMode.fetchOneExtra; + $clone.offsetStepId = cloneFromMatchingMode.offsetStepId; + $clone.beforeStepId = cloneFromMatchingMode.beforeStepId; + $clone.afterStepId = cloneFromMatchingMode.afterStepId; + $clone.lowerIndexStepId = cloneFromMatchingMode.lowerIndexStepId; + $clone.upperIndexStepId = cloneFromMatchingMode.upperIndexStepId; + $clone.limitAndOffsetId = cloneFromMatchingMode.limitAndOffsetId; + } + return $clone; + } + constructor(spec) { + super(); + this.isSyncAndSafe = false; + this.selects = []; + /** @internal */ + this.orderSpecs = []; + /** + * Values used in this plan. + */ + this.placeholders = []; + this.deferreds = []; + // GROUP BY + this.groups = []; + // HAVING + this.havingConditions = []; + // LIMIT + this.firstStepId = null; + this.lastStepId = null; + this.fetchOneExtra = false; + /** When using natural pagination, this index is the lower bound (and should be excluded) */ + this.lowerIndexStepId = null; + /** When using natural pagination, this index is the upper bound (and should be excluded) */ + this.upperIndexStepId = null; + /** When we calculate the limit/offset, we may be able to determine there cannot be a next page */ + this.limitAndOffsetId = null; + // OFFSET + this.offsetStepId = null; + // CURSORS + this.beforeStepId = null; + this.afterStepId = null; + // Connection + this.connectionDepId = null; + this.locker = new pgLocker_js_1.PgLocker(this); + this.memberDigests = []; + this.applyDepIds = []; + /** + * Set this true if your query includes any `VOLATILE` function (including + * seemingly innocuous things such as `random()`) otherwise we might only + * call the relevant function once and re-use the result. + */ + this.forceIdentity = false; + this.typeIdx = null; + // TODO: Delete these both from here and from pgStmt + this.shouldReverseOrderId = null; + this.limitAndOffsetSQL = null; + { + this.mode = spec.mode ?? "normal"; + if (this.mode === "aggregate") { + this.locker.beforeLock("orderBy", () => this.locker.lockParameter("groupBy")); + } + this.spec = spec; + // If the user doesn't specify members, we'll just build membership based + // on the provided resources. + const members = spec.members ?? + Object.entries(spec.resourceByTypeName).map(([typeName, resource]) => ({ + typeName, + resource, + })); + this.symbol = Symbol(spec.name ?? "union"); + this.alias = pg_sql2_1.sql.identifier(this.symbol); + for (const member of members) { + if (!this.executor) { + this.executor = member.resource.executor; + this.contextId = this.addDependency(this.executor.context()); + } + const { path = [] } = member; + const conditions = []; + let currentResource = member.resource; + let currentSymbol = Symbol(currentResource.name); + let currentAlias = pg_sql2_1.sql.identifier(currentSymbol); + if (this.executor !== currentResource.executor) { + throw new Error(`${this}: all resources must currently come from same executor`); + } + if (!pg_sql2_1.sql.isSQL(currentResource.from)) { + throw new Error(`${this}: parameterized resources not yet supported`); + } + if (member.match) { + for (const [attributeName, match] of Object.entries(member.match)) { + conditions.push((0, pg_sql2_1.sql) `${currentAlias}.${pg_sql2_1.sql.identifier(attributeName)} = ${match.codec + ? this.placeholder(match.step, match.codec) + : this.placeholder(match.step)}`); + } + } + let sqlSource = (0, pg_sql2_1.sql) `${currentResource.from} as ${currentAlias}`; + for (const pathEntry of path) { + const relation = currentResource.getRelation(pathEntry.relationName); + const nextResource = relation.remoteResource; + const nextSymbol = Symbol(nextResource.name); + const nextAlias = pg_sql2_1.sql.identifier(nextSymbol); + if (this.executor !== nextResource.executor) { + throw new Error(`${this}: all resources must currently come from same executor`); + } + if (!pg_sql2_1.sql.isSQL(nextResource.from)) { + throw new Error(`${this}: parameterized resources not yet supported`); + } + const nextSqlFrom = nextResource.from; + sqlSource = (0, pg_sql2_1.sql) `${sqlSource} +inner join ${nextSqlFrom} as ${nextAlias} +on (${pg_sql2_1.sql.indent(pg_sql2_1.sql.join(relation.localAttributes.map((localAttribute, i) => (0, pg_sql2_1.sql) `${nextAlias}.${pg_sql2_1.sql.identifier(String(relation.remoteAttributes[i]))} = ${currentAlias}.${pg_sql2_1.sql.identifier(String(localAttribute))}`), "\nand "))})`; + currentResource = nextResource; + currentSymbol = nextSymbol; + currentAlias = nextAlias; + } + this.memberDigests.push({ + member, + finalResource: currentResource, + symbol: currentSymbol, + alias: currentAlias, + conditions, + orders: [], + sqlSource, + }); + } + } + } + connectionClone($connection, mode) { + const $plan = PgUnionAllStep.clone(this, mode); + // In case any errors are raised + $plan.connectionDepId = $plan.addDependency($connection); + return $plan; + } + select(key) { + if (!this.spec.attributes || + !Object.prototype.hasOwnProperty.call(this.spec.attributes, key)) { + throw new Error(`Attribute '${key}' unknown`); + } + const existingIndex = this.selects.findIndex((s) => s.type === "attribute" && s.attribute === key); + if (existingIndex >= 0) { + return existingIndex; + } + const index = this.selects.push({ + type: "attribute", + attribute: key, + }) - 1; + return index; + } + selectAndReturnIndex(rawFragment) { + const fragment = this.scopedSQL(rawFragment); + const existingIndex = this.selects.findIndex((s) => s.type === "outerExpression" && + pg_sql2_1.sql.isEquivalent(s.expression, fragment)); + if (existingIndex >= 0) { + return existingIndex; + } + const index = this.selects.push({ + type: "outerExpression", + expression: fragment, + }) - 1; + return index; + } + selectPk() { + const existingIndex = this.selects.findIndex((s) => s.type === "pk"); + if (existingIndex >= 0) { + return existingIndex; + } + const index = this.selects.push({ type: "pk" }) - 1; + return index; + } + selectExpression(rawExpression, codec) { + const expression = this.scopedSQL(rawExpression); + const existingIndex = this.selects.findIndex((s) => s.type === "expression" && pg_sql2_1.sql.isEquivalent(s.expression, expression)); + if (existingIndex >= 0) { + return existingIndex; + } + const index = this.selects.push({ type: "expression", expression, codec }) - 1; + return index; + } + selectType() { + const existingIndex = this.selects.findIndex((s) => s.type === "type"); + if (existingIndex >= 0) { + return existingIndex; + } + const index = this.selects.push({ type: "type" }) - 1; + return index; + } + getMeta(key) { + return (0, grafast_1.access)(this, ["m", key]); + } + /** + * If this plan may only return one record, you can use `.singleAsRecord()` + * to return a plan that resolves to that record (rather than a list of + * records as it does currently). + * + * Beware: if you call this and the database might actually return more than + * one record then you're potentially in for a Bad Time. + */ + singleAsRecord() { + // this.setUnique(true); + return new PgUnionAllSingleStep(this, (0, grafast_1.first)(this)); + } + single() { + return this.singleAsRecord(); + } + row($row) { + return new PgUnionAllSingleStep(this, $row); + } + apply($step) { + this.applyDepIds.push(this.addUnaryDependency($step)); + } + items() { + return this.operationPlan.cacheStep(this, "items", "" /* Digest of our arguments */, () => new PgUnionAllRowsStep(this)); + } + listItem(itemPlan) { + const $single = new PgUnionAllSingleStep(this, itemPlan); + return $single; + } + pageInfo($connectionPlan) { + return (0, pgPageInfo_js_1.pgPageInfo)($connectionPlan); + } + where(rawWhereSpec) { + if (this.locker.locked) { + throw new Error(`${this}: cannot add conditions once plan is locked ('where')`); + } + const whereSpec = this.scopedSQL(rawWhereSpec); + for (const digest of this.memberDigests) { + const { alias: tableAlias, symbol } = digest; + if (pg_sql2_1.sql.isSQL(whereSpec)) { + // Merge the global where into this sub-where. + digest.conditions.push(pg_sql2_1.sql.replaceSymbol(whereSpec, this.symbol, symbol)); + } + else { + const ident = (0, pg_sql2_1.sql) `${tableAlias}.${digestSpecificExpressionFromAttributeName(digest, whereSpec.attribute)}`; + digest.conditions.push(whereSpec.callback(ident)); + } + } + } + groupBy(group) { + this.locker.assertParameterUnlocked("groupBy"); + if (this.mode !== "aggregate") { + throw new grafast_1.SafeError(`Cannot add groupBy to a non-aggregate query`); + } + this.groups.push(this.scopedSQL(group)); + } + having(rawCondition) { + if (this.locker.locked) { + throw new Error(`${this}: cannot add having conditions once plan is locked ('having')`); + } + if (this.mode !== "aggregate") { + throw new grafast_1.SafeError(`Cannot add having to a non-aggregate query`); + } + const condition = this.scopedSQL(rawCondition); + if (pg_sql2_1.sql.isSQL(condition)) { + this.havingConditions.push(condition); + } + else { + const never = condition; + console.error("Unsupported condition: ", never); + throw new Error(`Unsupported condition`); + } + } + orderBy(orderSpec) { + if (this.mode === "aggregate") { + throw new Error(`${this}: orderBy forbidden in aggregate mode`); + } + if (!this.spec.attributes) { + throw new Error(`${this}: cannot order when there's no shared attributes`); + } + this.locker.assertParameterUnlocked("orderBy"); + this.orderSpecs.push(orderSpec); + } + setOrderIsUnique() { + // TODO: should we do something here to match pgSelect? + } + assertCursorPaginationAllowed() { + if (this.mode === "aggregate") { + throw new Error("Cannot use cursor pagination on an aggregate PgSelectStep"); + } + } + /** @experimental */ + limitToTypes(types) { + if (!this._limitToTypes) { + this._limitToTypes = [...types]; + } + else { + this._limitToTypes = this._limitToTypes.filter((t) => types.includes(t)); + } + } + optimize() { + // TODO: validate the parsed cursor and throw error in connection if it + // fails. I'm not sure, but perhaps we can add this step itself (or a + // derivative thereof) as a dependency of the connection - that way, if + // this step throws (e.g. due to invalid cursor) then so does the + // connection. + /* + const $connection = this.getDep>( + this.connectionDepId, + ); + $connection.addValidation(() => { + return pgValidateParsedCursor( + $parsedCursorPlan, + digest, + orderCount, + beforeOrAfter, + ); + }); + */ + // We must lock here otherwise we might try and create cursor validation + // plans during `finalize` + this.locker.lock(); + return this; + } + getCursorDetails() { + this.needsCursor = true; + return (0, grafast_1.access)(this, "cursorDetails"); + } + // private reverse: boolean | null = null; + finalize() { + // this.locker.lock(); + const normalMode = this.mode === "normal"; + this.typeIdx = normalMode ? this.selectType() : null; + // this.reverse = normalMode ? this.shouldReverseOrder() : null; + super.finalize(); + } + // Be careful if we add streaming - ensure `shouldReverseOrder` is fine. + async execute(executionDetails) { + const { indexMap, values, extra: { eventEmitter }, } = executionDetails; + const { fetchOneExtra } = this; + const { meta, text, rawSqlValues, identifierIndex, shouldReverseOrder, name, queryValues, first, last, cursorDetails, } = buildTheQuery({ + executionDetails, + placeholders: this.placeholders, + placeholderSymbols: this.placeholders.map((p) => p.symbol), + deferreds: this.deferreds, + deferredSymbols: this.deferreds.map((d) => d.symbol), + firstStepId: this.firstStepId, + lastStepId: this.lastStepId, + offsetStepId: this.offsetStepId, + afterStepId: this.afterStepId, + beforeStepId: this.beforeStepId, + forceIdentity: this.forceIdentity, + havingConditions: this.havingConditions, + mode: this.mode, + alias: this.alias, + symbol: this.symbol, + hasSideEffects: this.hasSideEffects, + groups: this.groups, + orderSpecs: this.orderSpecs, + selects: this.selects, + typeIdx: this.typeIdx, + attributes: this.spec.attributes, + memberDigests: this.memberDigests, + limitToTypes: this._limitToTypes, + fetchOneExtra, + needsCursor: this.needsCursor, + applyDepIds: this.applyDepIds, + }); + if (first === 0 || last === 0) { + return indexMap(() => NO_ROWS); + } + const contextDep = values[this.contextId]; + if (contextDep === undefined) { + throw new Error("We have no context dependency?"); + } + const specs = indexMap((i) => { + const context = contextDep.at(i); + return { + // The context is how we'd handle different connections with different claims + context, + queryValues: identifierIndex != null + ? queryValues.map(({ dependencyIndex, codec, alreadyEncoded }) => { + const val = values[dependencyIndex].at(i); + return val == null + ? null + : alreadyEncoded + ? val + : codec.toPg(val); + }) + : EMPTY_ARRAY, + }; + }); + const executeMethod = this.operationPlan.operation.operation === "query" + ? "executeWithCache" + : "executeWithoutCache"; + const executionResult = await this.executor[executeMethod](specs, { + text, + rawSqlValues, + identifierIndex, + name, + eventEmitter, + useTransaction: false, + }); + // debugExecute("%s; result: %c", this, executionResult); + return executionResult.values.map((allVals) => { + if ((0, grafast_1.isPromiseLike)(allVals)) { + // Must be an error! + return allVals; + } + else if (allVals == null) { + return NO_ROWS; + } + const limit = first ?? last; + const firstAndLast = first != null && last != null && last < first; + const hasMore = fetchOneExtra && limit != null && allVals.length > limit; + const trimFromStart = !shouldReverseOrder && last != null && first == null; + const limitedRows = hasMore + ? trimFromStart + ? allVals.slice(Math.max(0, allVals.length - limit)) + : allVals.slice(0, limit) + : allVals; + const slicedRows = firstAndLast && last != null ? limitedRows.slice(-last) : limitedRows; + const orderedRows = shouldReverseOrder + ? (0, grafast_1.reverseArray)(slicedRows) + : slicedRows; + return { + m: meta, + hasMore, + items: orderedRows, + cursorDetails, + }; + }); + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgUnionAllStep = PgUnionAllStep; +class PgUnionAllRowsStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgUnionAllRowsStep", + }; } + constructor($pgUnionAll) { + super(); + this.addDependency($pgUnionAll); + } + getClassStep() { + return this.getDepOptions(0).step; + } + listItem(itemPlan) { + return this.getClassStep().listItem(itemPlan); + } + deduplicate(_peers) { + // We don't have any properties, and dependencies is already checked, so we're the same as our kin. + return _peers; + } + optimize() { + return (0, grafast_1.access)(this.getClassStep(), "items"); + } + execute(executionDetails) { + const value = executionDetails.values[0]; + return executionDetails.indexMap((i) => value.at(i).items); + } +} +exports.PgUnionAllRowsStep = PgUnionAllRowsStep; +function pgUnionAll(spec) { + return new PgUnionAllStep(spec); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgUnionAll, "pgUnionAll"); +function buildTheQuery(rawInfo) { + const info = { + ...rawInfo, + // Copy and make mutable + selects: [...rawInfo.selects], + orderSpecs: [...rawInfo.orderSpecs], + orders: [], + isOrderUnique: false, + groups: [...rawInfo.groups], + havingConditions: [...rawInfo.havingConditions], + memberDigests: rawInfo.memberDigests.map(cloneMemberDigest), + limitToTypes: rawInfo.limitToTypes?.slice(), + // Will be populated below + ordersForCursor: undefined, + cursorDigest: null, + cursorIndicies: rawInfo.needsCursor ? [] : null, + // Will be populated by applyConditionFromCursor + cursorLower: null, + cursorUpper: null, + // Will be populated by applyCommonPaginationStuff + first: null, + last: null, + offset: null, + shouldReverseOrder: false, + }; + const { values, count } = info.executionDetails; + function selectAndReturnIndex(expression) { + const existingIndex = info.selects.findIndex((s) => s.type === "outerExpression" && + pg_sql2_1.sql.isEquivalent(s.expression, expression)); + if (existingIndex >= 0) + return existingIndex; + return info.selects.push({ type: "outerExpression", expression }) - 1; + } + function selectAttribute(key) { + const existingIndex = info.selects.findIndex((s) => s.type === "attribute" && s.attribute === key); + if (existingIndex >= 0) { + return existingIndex; + } + const index = info.selects.push({ + type: "attribute", + attribute: key, + }) - 1; + return index; + } + function selectType() { + if (info.typeIdx != null) + return info.typeIdx; + const existingIndex = info.selects.findIndex((s) => s.type === "type"); + if (existingIndex >= 0) + return existingIndex; + info.typeIdx = info.selects.push({ type: "type" }) - 1; + return info.typeIdx; + } + function selectPk() { + const existingIndex = info.selects.findIndex((s) => s.type === "pk"); + if (existingIndex >= 0) + return existingIndex; + return info.selects.push({ type: "pk" }) - 1; + } + const meta = Object.create(null); + const queryBuilder = { + alias: info.alias, + [pg_sql2_1.$$toSQL]() { + return info.alias; + }, + setMeta(key, value) { + meta[key] = value; + }, + getMetaRaw(key) { + return meta[key]; + }, + orderBy(spec) { + if (info.mode !== "aggregate") { + info.orderSpecs.push(spec); + } + }, + setOrderIsUnique() { + info.isOrderUnique = true; + }, + where(whereSpec) { + for (const digest of info.memberDigests) { + const { alias: tableAlias, symbol } = digest; + if (pg_sql2_1.sql.isSQL(whereSpec)) { + // Merge the global where into this sub-where. + digest.conditions.push( + // TODO: do we require that info.symbol is a symbol? + typeof info.symbol === "symbol" + ? pg_sql2_1.sql.replaceSymbol(whereSpec, info.symbol, symbol) + : whereSpec); + } + else { + const ident = (0, pg_sql2_1.sql) `${tableAlias}.${digestSpecificExpressionFromAttributeName(digest, whereSpec.attribute)}`; + digest.conditions.push(whereSpec.callback(ident)); + } + } + }, + having(condition) { + if (info.mode !== "aggregate") { + throw new grafast_1.SafeError(`Cannot add having to a non-aggregate query`); + } + if (pg_sql2_1.sql.isSQL(condition)) { + info.havingConditions.push(condition); + } + else { + const never = condition; + console.error("Unsupported condition: ", never); + throw new Error(`Unsupported condition`); + } + }, + whereBuilder() { + return new pgCondition_js_1.PgCondition(this); + }, + havingBuilder() { + return new pgCondition_js_1.PgCondition(this, true); + }, + limitToTypes(types) { + if (!info.limitToTypes) { + info.limitToTypes = [...types]; + } + else { + info.limitToTypes = info.limitToTypes.filter((t) => types.includes(t)); + } + }, + }; + for (const applyDepId of info.applyDepIds) { + const val = values[applyDepId].unaryValue(); + if (Array.isArray(val)) { + val.forEach((v) => v?.(queryBuilder)); + } + else { + val?.(queryBuilder); + } + } + // Apply type limits + if (info.limitToTypes) { + info.memberDigests = info.memberDigests.filter((d) => info.limitToTypes.includes(d.member.typeName)); + } + // Now turn order specs into orders + if (info.memberDigests.length === 0) { + // We have no implementations, we'll never return anything + return { + meta, + text: `select null;`, + rawSqlValues: [], + identifierIndex: null, + first: 0, + last: 0, + queryValues: [], + cursorDetails: undefined, + shouldReverseOrder: false, + }; + } + for (const orderSpec of info.orderSpecs) { + if (!info.attributes) { + throw new Error(`Cannot order without attributes`); + } + for (const digest of info.memberDigests) { + const { alias: tableAlias } = digest; + const ident = (0, pg_sql2_1.sql) `${tableAlias}.${digestSpecificExpressionFromAttributeName(digest, orderSpec.attribute)}`; + digest.orders.push({ + fragment: ident, + direction: orderSpec.direction, + codec: info.attributes[orderSpec.attribute].codec, + }); + } + const selectedIndex = selectAttribute(orderSpec.attribute); + info.orders.push({ + fragment: pg_sql2_1.sql.identifier(String(selectedIndex)), + direction: orderSpec.direction, + codec: info.attributes[orderSpec.attribute].codec, + }); + if (info.cursorIndicies != null) { + info.cursorIndicies.push({ + index: selectedIndex, + codec: codecs_js_1.TYPES.text, + }); + } + } + if (info.cursorIndicies != null) { + info.cursorIndicies.push({ + index: selectType(), + codec: codecs_js_1.TYPES.text, + }); + info.cursorIndicies.push({ + index: selectPk(), + codec: codecs_js_1.TYPES.text, + }); + } + if (grafast_1.isDev) + Object.freeze(info.orders); + info.ordersForCursor = [ + ...info.orders, + { + fragment: (0, pg_sql2_1.sql) `${info.alias}.${pg_sql2_1.sql.identifier(String(selectType()))}`, + codec: codecs_js_1.TYPES.text, + direction: "ASC", + }, + { + fragment: (0, pg_sql2_1.sql) `${info.alias}.${pg_sql2_1.sql.identifier(String(selectPk()))}`, + codec: codecs_js_1.TYPES.json, + direction: "ASC", + }, + ]; + if (grafast_1.isDev) + Object.freeze(info.ordersForCursor); + // afterLock("orderBy"): Now the runtime orders/etc have been performed, + const after = (0, pgStmt_js_1.getUnary)(values, info.afterStepId); + const before = (0, pgStmt_js_1.getUnary)(values, info.beforeStepId); + if (info.needsCursor || after != null || before != null) { + info.cursorDigest = getOrderByDigest(info); + } + // apply conditions from the cursor + applyConditionFromCursor(info, "after", after); + applyConditionFromCursor(info, "before", before); + (0, pgStmt_js_1.applyCommonPaginationStuff)(info); + if (grafast_1.isDev) { + info.memberDigests.forEach((d) => { + Object.freeze(d.conditions); + Object.freeze(d.orders); + Object.freeze(d); + }); + Object.freeze(info.memberDigests); + // Object.freeze(info.selects); + Object.freeze(info.groups); + Object.freeze(info.havingConditions); + } + /**************************************** + * * + * ALL MUTATION NOW COMPLETE * + * * + ****************************************/ + // Except we still do selectAndReturnIndex() below, and maybe some other stuff? + const { mode, typeIdx, alias, attributes, forceIdentity, memberDigests, selects, orders, groups, havingConditions, hasSideEffects, ordersForCursor, shouldReverseOrder, cursorDigest, cursorIndicies, } = info; + const reverse = mode === "normal" ? shouldReverseOrder : null; + const memberCodecs = memberDigests.map((digest) => digest.finalResource.codec); + const makeQuery = () => { + const tables = []; + const [limitAndOffsetSQL, innerLimitSQL] = (0, pgStmt_js_1.calculateLimitAndOffsetSQLFromInfo)(info); + for (const memberDigest of memberDigests) { + const { sqlSource, alias: tableAlias, conditions, orders, finalResource, } = memberDigest; + const pk = finalResource.uniques?.find((u) => u.isPrimary === true); + if (!pk) { + throw new Error(`No PK for ${memberDigest.member.typeName} resource`); + } + const midSelects = []; + const innerSelects = selects + .map((s, selectIndex) => { + const r = (() => { + switch (s.type) { + case "attribute": { + if (!attributes) { + throw new Error(`Cannot select an attribute when there's no shared attributes`); + } + const attr = attributes[s.attribute]; + return [ + (0, pg_sql2_1.sql) `${tableAlias}.${digestSpecificExpressionFromAttributeName(memberDigest, s.attribute)}`, + attr.codec, + ]; + } + case "type": { + return [pg_sql2_1.sql.literal(memberDigest.member.typeName), codecs_js_1.TYPES.text]; + } + case "pk": { + return [ + (0, pg_sql2_1.sql) `json_build_array(${pg_sql2_1.sql.join(pk.attributes.map((c) => (0, pg_sql2_1.sql) `(${tableAlias}.${pg_sql2_1.sql.identifier(c)})::text`), ",")})`, + codecs_js_1.TYPES.json, + ]; + } + case "expression": { + return [s.expression, s.codec]; + } + case "outerExpression": { + // Only applies on outside + return null; + } + case "order": { + const orderSpec = orders[s.orderIndex]; + const [frag, codec] = (0, pgSelect_js_1.getFragmentAndCodecFromOrder)(alias, orderSpec, memberDigest.finalResource.codec); + return [frag, codec]; + } + default: { + const never = s; + throw new Error(`Couldn't match ${never.type}`); + } + } + })(); + if (!r) { + return r; + } + const [frag, _codec] = r; + const identAlias = String(selectIndex); + const ident = pg_sql2_1.sql.identifier(identAlias); + const fullIdent = (0, pg_sql2_1.sql) `${tableAlias}.${ident}`; + midSelects.push(fullIdent); + return (0, pg_sql2_1.sql) `${frag} as ${ident}`; + }) + .filter(isNotNullish); + midSelects.push(rowNumberIdent); + const ascOrDesc = reverse ? (0, pg_sql2_1.sql) `desc` : (0, pg_sql2_1.sql) `asc`; + const pkOrder = pg_sql2_1.sql.join(pk.attributes.map((c) => (0, pg_sql2_1.sql) `${tableAlias}.${pg_sql2_1.sql.identifier(c)} ${ascOrDesc}`), ",\n"); + const orderBy = (0, pg_sql2_1.sql) `order by +${pg_sql2_1.sql.indent `${orders.length > 0 + ? (0, pg_sql2_1.sql) `${pg_sql2_1.sql.join(orders.map((orderSpec) => { + const [frag] = (0, pgSelect_js_1.getFragmentAndCodecFromOrder)(tableAlias, orderSpec, finalResource.codec); + return (0, pg_sql2_1.sql) `${frag} ${Number(orderSpec.direction === "DESC") ^ Number(reverse) + ? (0, pg_sql2_1.sql) `desc` + : (0, pg_sql2_1.sql) `asc`}`; + }), `,\n`)},\n` + : pg_sql2_1.sql.blank}${pkOrder}`}`; + innerSelects.push((0, pg_sql2_1.sql) `row_number() over (${pg_sql2_1.sql.indent(orderBy)}) as ${rowNumberIdent}`); + // Can't order individual selects in a `union all` so we're using + // subqueries to do so. + const innerQuery = pg_sql2_1.sql.indent ` +select +${pg_sql2_1.sql.indent(pg_sql2_1.sql.join(innerSelects, ",\n"))} +from ${sqlSource} +${conditions.length > 0 + ? (0, pg_sql2_1.sql) `where ${pg_sql2_1.sql.join(conditions, `\nand `)}\n` + : pg_sql2_1.sql.blank}\ +${orderBy}\ +${innerLimitSQL} +`; + // Relies on Postgres maintaining the order of the subquery + const query = pg_sql2_1.sql.indent `\ +select +${pg_sql2_1.sql.indent(pg_sql2_1.sql.join(midSelects, ",\n"))} +from (${innerQuery}) as ${tableAlias}\ +`; + tables.push(query); + } + const outerSelects = selects.map((select, i) => { + if (select.type === "outerExpression") { + return (0, pg_sql2_1.sql) `${select.expression} as ${pg_sql2_1.sql.identifier(String(i))}`; + } + else if (mode === "normal") { + const sqlSrc = (0, pg_sql2_1.sql) `${alias}.${pg_sql2_1.sql.identifier(String(i))}`; + let codec; + let guaranteedNotNull; + switch (select.type) { + case "type": { + codec = codecs_js_1.TYPES.text; + break; + } + case "pk": { + codec = codecs_js_1.TYPES.json; + guaranteedNotNull = true; + break; + } + case "order": { + const order = ordersForCursor[select.orderIndex]; + codec = (0, pgSelect_js_1.getFragmentAndCodecFromOrder)(alias, order, memberCodecs)[1]; + guaranteedNotNull = order.nullable === false; + break; + } + case "attribute": { + const attr = attributes[select.attribute]; + codec = attr.codec; + guaranteedNotNull = attr.notNull; + break; + } + default: { + codec = select.codec; + } + } + return (0, pg_sql2_1.sql) `${codec.castFromPg?.(sqlSrc, guaranteedNotNull || codec.notNull) ?? + (0, pg_sql2_1.sql) `${sqlSrc}::text`} as ${pg_sql2_1.sql.identifier(String(i))}`; + } + else { + // PERF: eradicate this (aggregate mode) without breaking arrayMode + // tuple numbering + return (0, pg_sql2_1.sql) `null as ${pg_sql2_1.sql.identifier(String(i))}`; + } + }); + const unionGroupBy = mode === "aggregate" && groups.length > 0 + ? (0, pg_sql2_1.sql) `group by +${pg_sql2_1.sql.indent(pg_sql2_1.sql.join(groups.map((g) => g.fragment), ",\n"))} +` + : pg_sql2_1.sql.blank; + const unionHaving = mode === "aggregate" && havingConditions.length > 0 + ? (0, pg_sql2_1.sql) `having +${pg_sql2_1.sql.indent(pg_sql2_1.sql.join(havingConditions, ",\n"))} +` + : pg_sql2_1.sql.blank; + const unionOrderBy = mode === "aggregate" + ? pg_sql2_1.sql.blank + : (0, pg_sql2_1.sql) `\ +order by${pg_sql2_1.sql.indent ` +${orders.length + ? (0, pg_sql2_1.sql) `${pg_sql2_1.sql.join(orders.map((o) => { + return (0, pg_sql2_1.sql) `${o.fragment} ${Number(o.direction === "DESC") ^ Number(reverse) + ? (0, pg_sql2_1.sql) `desc` + : (0, pg_sql2_1.sql) `asc`}`; + }), ",\n")},\n` + : pg_sql2_1.sql.blank}\ +${pg_sql2_1.sql.identifier(String(typeIdx))} ${reverse ? (0, pg_sql2_1.sql) `desc` : (0, pg_sql2_1.sql) `asc`}, +${rowNumberIdent} asc\ +`} +`; + // Union must be ordered _before_ applying `::text`/etc transforms to + // select, so we wrap this with another select. + const unionQuery = pg_sql2_1.sql.indent ` +${pg_sql2_1.sql.join(tables, ` +union all +`)} +${unionOrderBy}\ +${limitAndOffsetSQL} +`; + // Adds all the `::text`/etc casting + const innerQuery = (0, pg_sql2_1.sql) `\ +select +${pg_sql2_1.sql.indent(pg_sql2_1.sql.join(outerSelects, ",\n"))} +from (${unionQuery}) ${alias} +${unionGroupBy}\ +${unionHaving}\ +`; + return innerQuery; + }; + const { text, rawSqlValues, identifierIndex, queryValues } = (() => { + const wrapperSymbol = Symbol("union_result"); + const wrapperAlias = pg_sql2_1.sql.identifier(wrapperSymbol); + const { queryValues, placeholderValues, identifiersAlias, identifiersSymbol, } = (0, pgStmt_js_1.makeValues)(info, "union"); + if (queryValues.length > 0 || + (count !== 1 && (forceIdentity || hasSideEffects))) { + const identifierIndex = selectAndReturnIndex((0, pg_sql2_1.sql) `${identifiersAlias}.idx`); + // IMPORTANT: this must come after the `selectExpression` call above. + const innerQuery = makeQuery(); + const { text: lateralText, values: rawSqlValues, [pg_sql2_1.$$symbolToIdentifier]: symbolToIdentifier, } = pg_sql2_1.sql.compile((0, pg_sql2_1.sql) `lateral (${pg_sql2_1.sql.indent(innerQuery)}) as ${wrapperAlias}`, { placeholderValues }); + const identifiersAliasText = symbolToIdentifier.get(identifiersSymbol); + const wrapperAliasText = symbolToIdentifier.get(wrapperSymbol); + /* + * IMPORTANT: these wrapper queries are necessary so that queries + * that have a limit/offset get the limit/offset applied _per + * identifier group_; that's why this cannot just be another "from" + * clause. + */ + const text = `\ +select ${wrapperAliasText}.* +from (select ids.ordinality - 1 as idx${queryValues.length > 0 + ? `, ${queryValues + .map(({ codec }, idx) => { + return `(ids.value->>${idx})::${pg_sql2_1.sql.compile(codec.sqlType).text} as "id${idx}"`; + }) + .join(", ")}` + : ""} from json_array_elements($${rawSqlValues.length + 1}::json) with ordinality as ids) as ${identifiersAliasText}, +${lateralText};`; + return { + text, + rawSqlValues, + identifierIndex, + queryValues, + }; + } + else { + const query = makeQuery(); + const { text, values: rawSqlValues } = pg_sql2_1.sql.compile(query, { + placeholderValues, + }); + return { text, rawSqlValues, identifierIndex: null, queryValues }; + } + })(); + // const shouldReverseOrder = this.shouldReverseOrder(); + // **IMPORTANT**: if streaming we must not reverse order (`shouldReverseOrder` must be `false`) + const cursorDetails = cursorDigest != null && cursorIndicies != null + ? { + digest: cursorDigest, + indicies: cursorIndicies, + } + : undefined; + return { + meta, + text, + rawSqlValues, + identifierIndex, + shouldReverseOrder: info.shouldReverseOrder, + name: hash(text), + queryValues, + first: info.first, + last: info.last, + cursorDetails, + }; +} +function applyConditionFromCursor(info, beforeOrAfter, parsedCursor) { + if (parsedCursor == null) + return; + const { alias, orders, ordersForCursor, memberDigests, cursorDigest } = info; + if (cursorDigest == null) { + throw new Error(`Cursor passed, but could not determine order digest.`); + } + const orderCount = ordersForCursor.length; + // Cursor validity check + (0, pgValidateParsedCursor_js_1.validateParsedCursor)(parsedCursor, cursorDigest, orderCount, beforeOrAfter); + if (orderCount === 0) { + // Natural pagination `['natural', N]` + // This will be used in upperIndex(before)/lowerIndex(after) + const n = parsedCursor[1]; + if (beforeOrAfter === "after") { + info.cursorLower = n; + } + else { + info.cursorUpper = n; + } + return; + } + const identifierPlaceholders = []; + for (let i = 0; i < orderCount; i++) { + const order = orders[i]; + if (i === orderCount - 1) { + // PK (within that polymorphic type) + // TODO: rather than using JSON here and since we now run this at runtime + // rather than plan time, lets expand this to be each individual PK + // column rather than one JSON encoding of the same. + // NOTE: this is a JSON-encoded string containing all the PK values. We + // don't want to parse it and then re-stringify it, so we'll just feed + // it in as text and tell the system it has already been encoded: + identifierPlaceholders[i] = (0, pg_sql2_1.sql) `${pg_sql2_1.sql.value(parsedCursor[i + 1])}::"json"`; + } + else if (i === orderCount - 2) { + // Polymorphic type + identifierPlaceholders[i] = (0, pg_sql2_1.sql) `${pg_sql2_1.sql.value(parsedCursor[i + 1])}::"text"`; + } + else if (memberDigests.length > 0) { + const memberCodecs = memberDigests.map((d) => d.finalResource.codec); + const [, codec] = (0, pgSelect_js_1.getFragmentAndCodecFromOrder)(alias, order, memberCodecs); + identifierPlaceholders[i] = (0, pg_sql2_1.sql) `${pg_sql2_1.sql.value(codec.toPg(parsedCursor[i + 1]))}::${codec.sqlType}`; + } + else { + // No implementations?! + } + } + for (const mutableMemberDigest of memberDigests) { + const { finalResource } = mutableMemberDigest; + const pk = finalResource.uniques?.find((u) => u.isPrimary === true); + if (!pk) { + throw new Error("No primary key; this should have been caught earlier"); + } + const max = orderCount - 1 + pk.attributes.length; + const pkPlaceholder = identifierPlaceholders[orderCount - 1]; + const pkAttributes = finalResource.codec.attributes; + const condition = (i = 0) => { + const order = mutableMemberDigest.orders[i]; + const [orderFragment, sqlValue, direction, nullable = false, nulls = null,] = (() => { + if (i >= orderCount - 1) { + // PK + const pkIndex = i - (orderCount - 1); + const pkCol = pk.attributes[pkIndex]; + return [ + (0, pg_sql2_1.sql) `${mutableMemberDigest.alias}.${pg_sql2_1.sql.identifier(pkCol)}`, + (0, pg_sql2_1.sql) `(${pkPlaceholder}->>${pg_sql2_1.sql.literal(pkIndex)})::${pkAttributes[pkCol].codec.sqlType}`, + "ASC", + false, + ]; + } + else if (i === orderCount - 2) { + // Type + return [ + pg_sql2_1.sql.literal(mutableMemberDigest.member.typeName), + identifierPlaceholders[i], + "ASC", + false, + ]; + } + else { + const [frag, _codec, isNullable] = (0, pgSelect_js_1.getFragmentAndCodecFromOrder)(alias, order, mutableMemberDigest.finalResource.codec); + return [ + frag, + identifierPlaceholders[i], + order.direction, + isNullable, + order.nulls, + ]; + } + })(); + // For the truth-table of this code, have a look at this spreadsheet: + // https://docs.google.com/spreadsheets/d/1m5H-4IRAjhx_Z8v7nd2wMTbmx1dOBof9IroW3WUYE7s/edit?usp=sharing + const gt = (direction === "ASC" && beforeOrAfter === "after") || + (direction === "DESC" && beforeOrAfter === "before"); + const nullsFirst = nulls === "FIRST" + ? true + : nulls === "LAST" + ? false + : // NOTE: PostgreSQL states that by default DESC = NULLS FIRST, + // ASC = NULLS LAST + direction === "DESC"; + // Simple less than or greater than + let fragment = (0, pg_sql2_1.sql) `${orderFragment} ${gt ? (0, pg_sql2_1.sql) `>` : (0, pg_sql2_1.sql) `<`} ${sqlValue}`; + // Nullable, so now handle if one is null but the other isn't + if (nullable) { + const useAIsNullAndBIsNotNull = (nullsFirst && beforeOrAfter === "after") || + (!nullsFirst && beforeOrAfter === "before"); + const oneIsNull = useAIsNullAndBIsNotNull + ? (0, pg_sql2_1.sql) `${orderFragment} is null and ${sqlValue} is not null` + : (0, pg_sql2_1.sql) `${orderFragment} is not null and ${sqlValue} is null`; + fragment = (0, pg_sql2_1.sql) `((${fragment}) or (${oneIsNull}))`; + } + // Finally handle if they're equal - recurse + if (i < max - 1) { + const equals = nullable ? (0, pg_sql2_1.sql) `is not distinct from` : (0, pg_sql2_1.sql) `=`; + const aEqualsB = (0, pg_sql2_1.sql) `${orderFragment} ${equals} ${sqlValue}`; + fragment = (0, pg_sql2_1.sql) `(${fragment}) +or ( +${pg_sql2_1.sql.indent `${aEqualsB} +and ${condition(i + 1)}`} +)`; + } + return pg_sql2_1.sql.parens(pg_sql2_1.sql.indent(fragment)); + }; + const finalCondition = condition(); + mutableMemberDigest.conditions.push(finalCondition); + } +} +function getOrderByDigest(info) { + const { memberDigests, orderSpecs, alias, + // TODO: satisfy placeholders and deferreds before we get this far! + placeholders, deferreds, } = info; + if (memberDigests.length === 0) { + return "natural"; + } + // The security of this hash is unimportant; the main aim is to protect the + // user from themself. If they bypass this, that's their problem (it will + // not introduce a security issue). + const hash = (0, crypto_1.createHash)("sha256"); + const memberCodecs = memberDigests.map((digest) => digest.finalResource.codec); + const tuple = [ + ...orderSpecs.map((o) => { + const [frag] = (0, pgSelect_js_1.getFragmentAndCodecFromOrder)(alias, o, memberCodecs); + const placeholderValues = new Map(); + for (let i = 0; i < placeholders.length; i++) { + const { symbol } = placeholders[i]; + placeholderValues.set(symbol, pg_sql2_1.sql.identifier(`PLACEHOLDER_${i}`)); + } + for (let i = 0; i < deferreds.length; i++) { + const { symbol } = deferreds[i]; + placeholderValues.set(symbol, pg_sql2_1.sql.identifier(`DEFERRED_${i}`)); + } + return pg_sql2_1.sql.compile(frag, { placeholderValues }).text; + }), + "type", + "pk", + ]; + const d = JSON.stringify(tuple); + hash.update(d); + const digest = hash.digest("hex").slice(0, 10); + return digest; +} +function cloneMemberDigest(memberDigest) { + return { + // Unchanging parts + symbol: memberDigest.symbol, + alias: memberDigest.alias, + member: memberDigest.member, + sqlSource: memberDigest.sqlSource, + finalResource: memberDigest.finalResource, + // Mutable parts + orders: [...memberDigest.orders], + conditions: [...memberDigest.conditions], + }; +} +//# sourceMappingURL=pgUnionAll.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUnionAll.js.map b/grafast/dataplan-pg/dist/steps/pgUnionAll.js.map new file mode 100644 index 0000000000..3546788dc6 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUnionAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgUnionAll.js","sourceRoot":"","sources":["../../src/steps/pgUnionAll.ts"],"names":[],"mappings":";;;AAmmCA,gCAOC;AA1mCD,yCAA2C;AAC3C,mCAAoC;AAYpC,qCAaiB;AAGjB,qCAA6D;AAG7D,4CAAqC;AAcrC,gDAA0C;AAC1C,0CAA4C;AAE5C,iEAA2D;AAK3D,qDAA+C;AAE/C,+CAA6C;AAE7C,mDAA6C;AAE7C,+CAA6D;AAU7D,2CAMqB;AACrB,2EAAmE;AAEnE,SAAS,YAAY,CAAI,CAAuB;IAC9C,OAAO,CAAC,IAAI,IAAI,CAAC;AACnB,CAAC;AAED,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,cAAc,GAAG,aAAG,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AAEtD,sEAAsE;AACtE,MAAM,yCAAyC,GAAG,CAChD,MAAyB,EACzB,IAAY,EACP,EAAE;IACP,OAAO,aAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,WAAW,GAAuB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACtB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,EAAE;CACc,CAAC,CAAC;AAE3B,MAAM,IAAI,GAAG,CAAC,IAAY,EAAU,EAAE,CACpC,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,C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AAE,CAAC,CAAC,CAAC;YACpE,CAAC;YACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC1C,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;gBAChC,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAAE,aAAG,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;YACjE,CAAC;YACD,OAAO,aAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC;QACvD,CAAC,CAAC;QACF,MAAM;QACN,IAAI;KACL,CAAC;IACF,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACf,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB,CACxB,YAAsC;IAEtC,OAAO;QACL,mBAAmB;QACnB,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,KAAK,EAAE,YAAY,CAAC,KAAK;QACzB,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,SAAS,EAAE,YAAY,CAAC,SAAS;QACjC,aAAa,EAAE,YAAY,CAAC,aAAa;QAEzC,gBAAgB;QAChB,MAAM,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC;QAChC,UAAU,EAAE,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC;KACzC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUpdateSingle.d.ts b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.d.ts new file mode 100644 index 0000000000..e8126035b3 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.d.ts @@ -0,0 +1,101 @@ +import type { ExecutionDetails, GrafastResultsList, Maybe, Setter, SetterCapable } from "grafast"; +import { Step } from "grafast"; +import type { SQL, SQLable } from "pg-sql2"; +import { $$toSQL } from "pg-sql2"; +import type { PgResource } from "../datasource.js"; +import type { GetPgResourceAttributes, GetPgResourceCodec, GetPgResourceUniques, ObjectForResource, PgCodecWithAttributes, PgQueryBuilder, PlanByUniques, ReadonlyArrayOrDirect } from "../interfaces.js"; +import type { PgClassExpressionStep } from "./pgClassExpression.js"; +/** + * Update a single row identified by the 'getBy' argument. + */ +export declare class PgUpdateSingleStep = PgResource> extends Step implements SQLable { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * Tells us what we're dealing with - data type, columns, where to update it, + * what it's called, etc. + */ + readonly resource: TResource; + /** + * This defaults to the name of the resource but you can override it. Aids + * in debugging. + */ + private readonly name; + /** + * To be used as the table alias, we always use a symbol unless the calling + * code specifically indicates a string to use. + */ + private readonly symbol; + /** = sql.identifier(this.symbol) */ + readonly alias: SQL; + /** + * The attributes and their dependency ids for us to find the record by. + */ + private getBys; + /** + * The attributes and their dependency ids for us to update. + */ + private attributes; + /** + * The id for the PostgreSQL context plan. + */ + private contextId; + /** + * When locked, no more values can be set, no more selects can be added + */ + private locked; + /** + * When finalized, we build the SQL query, queryValues, and note where to feed in + * the relevant queryValues. This saves repeating this work at execution time. + */ + private finalizeResults; + /** + * The list of things we're selecting. + */ + private selects; + private applyDepIds; + constructor(resource: TResource, getBy: PlanByUniques, GetPgResourceUniques>, attributes?: { + [key in keyof GetPgResourceAttributes]?: Step; + }); + toStringMeta(): string | null; + set>(name: TKey, value: Step): void; + /** + * Returns a plan representing a named attribute (e.g. column) from the newly + * updateed row. + */ + get>(attr: TAttr): PgClassExpressionStep[TAttr]["codec"], TResource>; + getMeta(key: string): import("grafast").AccessStep; + record(): PgClassExpressionStep, TResource>; + apply($step: Step>>): void; + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + execute({ indexMap, values, }: ExecutionDetails): Promise>; + finalize(): void; + [$$toSQL](): SQL; +} +/** + * Update a single row identified by the 'getBy' argument. + */ +export declare function pgUpdateSingle>(resource: TResource, getBy: PlanByUniques, GetPgResourceUniques>, attributes?: { + [key in keyof GetPgResourceAttributes]?: Step; +}): PgUpdateSingleStep; +export interface PgUpdateSingleQueryBuilder = PgResource> extends PgQueryBuilder, SetterCapable> { + set>(key: TAttributeName, value: ObjectForResource[TAttributeName]): void; + setBuilder(): Setter, this>; +} +type PgUpdateSingleQueryBuilderCallback = (qb: PgUpdateSingleQueryBuilder) => void; +export {}; +//# sourceMappingURL=pgUpdateSingle.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUpdateSingle.d.ts.map b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.d.ts.map new file mode 100644 index 0000000000..4542ba89dc --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgUpdateSingle.d.ts","sourceRoot":"","sources":["../../src/steps/pgUpdateSingle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,MAAM,EACN,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAA8C,IAAI,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAe,MAAM,SAAS,CAAC;AACzD,OAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,KAAK,EAAE,UAAU,EAAoB,MA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J,GAAG,UAAU,CAAC,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CACzD,SAAQ,cAAc,EACpB,aAAa,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7C,GAAG,CAAC,cAAc,SAAS,MAAM,iBAAiB,CAAC,SAAS,CAAC,EAC3D,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,GAClD,IAAI,CAAC;IACR,UAAU,IAAI,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;CAC1D;AAED,KAAK,kCAAkC,GAAG,CACxC,EAAE,EAAE,0BAA0B,KAC3B,IAAI,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUpdateSingle.js b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.js new file mode 100644 index 0000000000..6bc191ba05 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.js @@ -0,0 +1,319 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PgUpdateSingleStep = void 0; +exports.pgUpdateSingle = pgUpdateSingle; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importStar(require("pg-sql2")); +const codecs_js_1 = require("../codecs.js"); +const inspect_js_1 = require("../inspect.js"); +const pgClassExpression_js_1 = require("./pgClassExpression.js"); +/** + * Update a single row identified by the 'getBy' argument. + */ +class PgUpdateSingleStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgUpdateSingleStep", + }; } + constructor(resource, getBy, attributes) { + super(); + this.isSyncAndSafe = false; + /** + * The attributes and their dependency ids for us to find the record by. + */ + this.getBys = []; + /** + * The attributes and their dependency ids for us to update. + */ + this.attributes = []; + /** + * When locked, no more values can be set, no more selects can be added + */ + this.locked = false; + /** + * When finalized, we build the SQL query, queryValues, and note where to feed in + * the relevant queryValues. This saves repeating this work at execution time. + */ + this.finalizeResults = null; + /** + * The list of things we're selecting. + */ + this.selects = []; + this.applyDepIds = []; + this.hasSideEffects = true; + this.resource = resource; + this.name = resource.name; + this.symbol = Symbol(this.name); + this.alias = pg_sql2_1.default.identifier(this.symbol); + this.contextId = this.addDependency(this.resource.executor.context()); + const keys = getBy + ? Object.keys(getBy) + : []; + if (!this.resource.uniques.some((uniq) => uniq.attributes.every((key) => keys.includes(key)))) { + throw new Error(`Attempted to build 'PgUpdateSingleStep' with a non-unique getBy keys ('${keys.join("', '")}') - please ensure your 'getBy' spec uniquely identifiers a row (resource = ${this.resource}; supported uniques = ${(0, inspect_js_1.inspect)(this.resource.uniques)}).`); + } + keys.forEach((name) => { + if (grafast_1.isDev) { + if (this.getBys.some((col) => col.name === name)) { + throw new Error(`Attribute '${String(name)}' was specified more than once in ${this}'s getBy spec`); + } + } + const value = getBy[name]; + const depId = this.addDependency(value); + const attribute = this.resource.codec.attributes[name]; + const pgCodec = attribute.codec; + this.getBys.push({ name, depId, pgCodec }); + }); + if (attributes) { + Object.entries(attributes).forEach(([key, value]) => { + if (value) { + this.set(key, value); + } + }); + } + } + toStringMeta() { + return `${this.resource.name}(${this.getBys.map((g) => g.name)};${this.attributes.map((a) => a.name)})`; + } + set(name, value) { + if (this.locked) { + throw new Error("Cannot set after plan is locked."); + } + if (grafast_1.isDev) { + if (this.attributes.some((col) => col.name === name)) { + throw new Error(`Attribute '${String(name)}' was specified more than once in ${this}`); + } + } + const { codec: pgCodec } = this.resource.codec.attributes[name]; + const depId = this.addDependency(value); + this.attributes.push({ name, depId, pgCodec }); + } + /** + * Returns a plan representing a named attribute (e.g. column) from the newly + * updateed row. + */ + get(attr) { + const resourceAttribute = this.resource.codec.attributes[attr]; + if (!resourceAttribute) { + throw new Error(`${this.resource} does not define an attribute named '${String(attr)}'`); + } + if (resourceAttribute?.via) { + throw new Error(`Cannot select a 'via' attribute from PgUpdateSingleStep`); + } + /* + * Only cast to `::text` during select; we want to use it uncasted in + * conditions/etc. The reasons we cast to ::text include: + * + * - to make return values consistent whether they're direct or in nested + * arrays + * - to make sure that that various PostgreSQL clients we support do not + * mangle the data in unexpected ways - we take responsibility for + * decoding these string values. + */ + const sqlExpr = (0, pgClassExpression_js_1.pgClassExpression)(this, resourceAttribute.codec, resourceAttribute.notNull); + const colPlan = resourceAttribute.expression + ? sqlExpr `${pg_sql2_1.default.parens(resourceAttribute.expression(this.alias))}` + : sqlExpr `${this.alias}.${pg_sql2_1.default.identifier(String(attr))}`; + return colPlan; + } + getMeta(key) { + return (0, grafast_1.access)(this, ["m", key]); + } + record() { + return (0, pgClassExpression_js_1.pgClassExpression)(this, this.resource.codec, false) `${this.alias}`; + } + /** + * Advanced method; rather than returning a plan it returns an index. + * Generally useful for PgClassExpressionStep. + * + * @internal + */ + selectAndReturnIndex(fragment) { + // NOTE: it's okay to add selections after the plan is "locked" - lock only + // applies to which rows are being selected, not what is being queried + // about the rows. + // Optimisation: if we're already selecting this fragment, return the existing one. + const index = this.selects.findIndex((frag) => pg_sql2_1.default.isEquivalent(frag, fragment)); + if (index >= 0) { + return index; + } + return this.selects.push(fragment) - 1; + } + apply($step) { + this.applyDepIds.push(this.addUnaryDependency($step)); + } + /** + * `execute` will always run as a root-level query. In future we'll implement a + * `toSQL` method that allows embedding this plan within another SQL plan... + * But that's a problem for later. + * + * This runs the query for every entry in the values, and then returns an + * array of results where each entry in the results relates to the entry in + * the incoming values. + * + * NOTE: we don't know what the values being fed in are, we must feed them to + * the plans stored in this.identifiers to get actual values we can use. + */ + async execute({ indexMap, values, }) { + const { alias, contextId, finalizeResults, resource } = this; + if (!finalizeResults) { + throw new Error("Cannot execute PgSelectStep before finalizing it."); + } + const { table, returning, sqlWhere, queryValueDetailsBySymbol } = finalizeResults; + const contextDep = values[contextId]; + /* + * NOTE: Though we'd like to do bulk updates, there's no way of us + * reliably linking the data back up again given users might have + * triggers manipulating the data so we can't match it back up even using + * the same getBy specs. + * + * Currently it seems that the order returned from `update ... + * from (select ... order by ...) returning ...` is the same order as the + * `order by` was, however this is not guaranteed in the documentation + * and as such cannot be relied upon. Further the pgsql-hackers list + * explicitly declined guaranteeing this behavior: + * + * https://www.postgresql.org/message-id/CAKFQuwbgdJ_xNn0YHWGR0D%2Bv%2B3mHGVqJpG_Ejt96KHoJjs6DkA%40mail.gmail.com + * + * So we have to make do with single updates, alas. + */ + // We must execute each mutation on its own, but we can at least do so in + // parallel. Note we return a list of promises, each may reject or resolve + // without causing the others to reject. + return indexMap(async (i) => { + const context = contextDep.at(i); + const sqlSets = []; + for (const { depId, name, pgCodec } of this.attributes) { + const attVal = values[depId].at(i); + // `null` is kept, `undefined` is skipped + if (attVal !== undefined) { + const sqlIdent = pg_sql2_1.default.identifier(name); + const sqlVal = (0, codecs_js_1.sqlValueWithCodec)(attVal, pgCodec); + sqlSets.push((0, pg_sql2_1.default) `${sqlIdent} = ${sqlVal}`); + } + } + const meta = Object.create(null); + const queryBuilder = { + alias, + [pg_sql2_1.$$toSQL]() { + return alias; + }, + setMeta(key, value) { + meta[key] = value; + }, + getMetaRaw(key) { + return meta[key]; + }, + set(name, attVal) { + const pgCodec = resource.codec.attributes[name]?.codec; + if (!pgCodec) { + throw new Error(`Attribute ${name} not recognized on ${resource}`); + } + const sqlIdent = pg_sql2_1.default.identifier(name); + const sqlVal = (0, codecs_js_1.sqlValueWithCodec)(attVal, pgCodec); + sqlSets.push((0, pg_sql2_1.default) `${sqlIdent} = ${sqlVal}`); + }, + setBuilder() { + return (0, grafast_1.setter)(this); + }, + }; + for (const applyDepId of this.applyDepIds) { + const val = values[applyDepId].unaryValue(); + if (Array.isArray(val)) { + val.forEach((v) => v?.(queryBuilder)); + } + else { + val?.(queryBuilder); + } + } + if (sqlSets.length === 0) { + // No attributes to update?! This isn't allowed. + throw new grafast_1.SafeError("Attempted to update a record, but no new values were specified."); + } + const query = (0, pg_sql2_1.default) `update ${table} set ${pg_sql2_1.default.join(sqlSets, ", ")} where ${sqlWhere}${returning};`; + const { text, values: rawSqlValues } = pg_sql2_1.default.compile(query); + const sqlValues = queryValueDetailsBySymbol.size + ? rawSqlValues.map((v) => { + if (typeof v === "symbol") { + const details = queryValueDetailsBySymbol.get(v); + if (!details) { + throw new Error(`Saw unexpected symbol '${(0, inspect_js_1.inspect)(v)}'`); + } + const val = values[details.depId].at(i); + return val == null ? null : details.processor(val); + } + else { + return v; + } + }) + : rawSqlValues; + const { rows, rowCount } = await this.resource.executeMutation({ + context, + text, + values: sqlValues, + }); + if (rowCount === 0) { + // TODO: should we throw? + return null; + } + return { + __proto__: null, + m: meta, + t: rows[0] ?? [], + }; + }); + } + finalize() { + if (!this.isFinalized) { + this.locked = true; + const resourceSource = this.resource.from; + if (!pg_sql2_1.default.isSQL(resourceSource)) { + throw new Error(`Error in ${this}: can only update into resources defined as SQL, however ${this.resource} has ${(0, inspect_js_1.inspect)(this.resource.from)}`); + } + const table = (0, pg_sql2_1.default) `${resourceSource} as ${this.alias}`; + const fragmentsWithAliases = this.selects.map((frag, idx) => (0, pg_sql2_1.default) `${frag} as ${pg_sql2_1.default.identifier(String(idx))}`); + const returning = fragmentsWithAliases.length > 0 + ? (0, pg_sql2_1.default) ` returning\n${pg_sql2_1.default.indent(pg_sql2_1.default.join(fragmentsWithAliases, ",\n"))}` + : pg_sql2_1.default.blank; + const getByAttributesCount = this.getBys.length; + if (getByAttributesCount === 0) { + // No attributes specified to find the row?! This is forbidden. + throw new grafast_1.SafeError("Attempted to update a record, but no information on uniquely determining the record was specified."); + } + const queryValueDetailsBySymbol = new Map(); + const sqlWhereClauses = []; + for (let i = 0; i < getByAttributesCount; i++) { + const { name, depId, pgCodec } = this.getBys[i]; + const symbol = Symbol(name); + sqlWhereClauses[i] = pg_sql2_1.default.parens((0, pg_sql2_1.default) `${pg_sql2_1.default.identifier(this.symbol, name)} = ${pg_sql2_1.default.value( + // THIS IS A DELIBERATE HACK - we will be replacing this symbol with + // a value before executing the query. + symbol)}::${pgCodec.sqlType}`); + queryValueDetailsBySymbol.set(symbol, { + depId, + processor: pgCodec.toPg, + }); + } + this.finalizeResults = { + table, + returning, + sqlWhere: pg_sql2_1.default.parens(pg_sql2_1.default.join(sqlWhereClauses, " and ")), + queryValueDetailsBySymbol, + }; + } + super.finalize(); + } + [pg_sql2_1.$$toSQL]() { + return this.alias; + } +} +exports.PgUpdateSingleStep = PgUpdateSingleStep; +/** + * Update a single row identified by the 'getBy' argument. + */ +function pgUpdateSingle(resource, getBy, attributes) { + return new PgUpdateSingleStep(resource, getBy, attributes); +} +(0, grafast_1.exportAs)("@dataplan/pg", pgUpdateSingle, "pgUpdateSingle"); +//# sourceMappingURL=pgUpdateSingle.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgUpdateSingle.js.map b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.js.map new file mode 100644 index 0000000000..dd1fd5e93b --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgUpdateSingle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgUpdateSingle.js","sourceRoot":"","sources":["../../src/steps/pgUpdateSingle.ts"],"names":[],"mappings":";;;AA2fA,wCAaC;;AAjgBD,qCAA2E;AAE3E,2DAAuC;AAGvC,4CAAiD;AAEjD,8CAAwC;AAaxC,iEAA2D;AAgB3D;;GAEG;AACH,MAAa,kBAGX,SAAQ,cAAe;aAGhB,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,oBAAoB;KACjC,AAHc,CAGb;IAiEF,YACE,QAAmB,EACnB,KAGC,EACD,UAEC;QAED,KAAK,EAAE,CAAC;QA1EV,kBAAa,GAAG,KAAK,CAAC;QAuBtB;;WAEG;QACK,WAAM,GAIT,EAAE,CAAC;QAER;;WAEG;QACK,eAAU,GAIb,EAAE,CAAC;QAOR;;WAEG;QACK,WAAM,GAAG,KAAK,CAAC;QAEvB;;;WAGG;QACK,oBAAe,GAAuC,IAAI,CAAC;QAEnE;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ataplan-pg/dist/steps/pgValidateParsedCursor.d.ts b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.d.ts new file mode 100644 index 0000000000..2c1c52e0ad --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.d.ts @@ -0,0 +1,7 @@ +import type { ExecutableStep, Maybe } from "grafast"; +/** + * Validates the given cursor matches the given details. + */ +export declare const pgValidateParsedCursor: ($parsedCursorPlan: ExecutableStep, digest: string, orderCount: number, beforeOrAfter: "before" | "after") => PgValidateParsedCursorStep; +export declare function validateParsedCursor(decoded: Maybe, digest: string, orderCount: number, beforeOrAfter: "before" | "after"): undefined; +//# sourceMappingURL=pgValidateParsedCursor.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.d.ts.map b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.d.ts.map new file mode 100644 index 0000000000..0974f9c0e8 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pgValidateParsedCursor.d.ts","sourceRoot":"","sources":["../../src/steps/pgValidateParsedCursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAkB,KAAK,EAAE,MAAM,SAAS,CAAC;AAsDrE;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,mBAAmB,cAAc,CAAC,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,EACxD,QAAQ,MAAM,EACd,YAAY,MAAM,EAClB,eAAe,QAAQ,GAAG,OAAO,+BAOhC,CAAC;AAEJ,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,EAC9B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,QAAQ,GAAG,OAAO,aA+BlC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.js b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.js new file mode 100644 index 0000000000..dd58ded5d7 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pgValidateParsedCursor = exports.PgValidateParsedCursorStep = void 0; +exports.validateParsedCursor = validateParsedCursor; +const grafast_1 = require("grafast"); +/** + * Lightweight plan to validate cursor. We couldn't do this with a lambda + * because we want it to be optimised away, and for that we need to implement + * the deduplicate method. + * + * @internal + */ +class PgValidateParsedCursorStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "PgValidateParsedCursorStep", + }; } + constructor($parsedCursorPlan, digest, orderCount, beforeOrAfter) { + super(); + this.digest = digest; + this.orderCount = orderCount; + this.beforeOrAfter = beforeOrAfter; + this.isSyncAndSafe = true; + this.addDependency($parsedCursorPlan); + if (this.getAndFreezeIsUnary() !== true) { + throw new Error(`PgValidateParsedCursorStep must be unary, you should only use it with input variables`); + } + } + deduplicate(plans) { + return plans.filter((plan) => plan.digest === this.digest && + plan.orderCount === this.orderCount && + plan.beforeOrAfter === this.beforeOrAfter); + } + unbatchedExecute(_info, parsedCursor) { + return validateParsedCursor(parsedCursor, this.digest, this.orderCount, this.beforeOrAfter); + } +} +exports.PgValidateParsedCursorStep = PgValidateParsedCursorStep; +/** + * Validates the given cursor matches the given details. + */ +const pgValidateParsedCursor = ($parsedCursorPlan, digest, orderCount, beforeOrAfter) => new PgValidateParsedCursorStep($parsedCursorPlan, digest, orderCount, beforeOrAfter); +exports.pgValidateParsedCursor = pgValidateParsedCursor; +function validateParsedCursor(decoded, digest, orderCount, beforeOrAfter) { + if (!decoded) { + return undefined; + } + try { + const [cursorDigest, ...cursorParts] = decoded; + if (!cursorDigest || cursorDigest !== digest) { + throw new Error(`Invalid cursor digest - '${cursorDigest}' !== '${digest}'`); + } + if (cursorDigest === "natural") { + if (cursorParts.length !== 1 || typeof cursorParts[0] !== "number") { + throw new Error(`Invalid 'natural' cursor value - ${cursorParts}`); + } + } + else if (cursorParts.length !== orderCount) { + throw new Error(`Invalid cursor length - ${cursorParts.length} !== ${orderCount}`); + } + return undefined; + } + catch (e) { + if (grafast_1.isDev) { + console.error("Invalid cursor:"); + console.error(e); + } + throw new grafast_1.SafeError(`Invalid '${beforeOrAfter}' cursor - a cursor is only valid within a specific ordering, if you change the order then you'll need different cursors.`); + } +} +//# sourceMappingURL=pgValidateParsedCursor.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.js.map b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.js.map new file mode 100644 index 0000000000..f7a1cb9b5b --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/pgValidateParsedCursor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pgValidateParsedCursor.js","sourceRoot":"","sources":["../../src/steps/pgValidateParsedCursor.ts"],"names":[],"mappings":";;;AAsEA,oDAmCC;AAxGD,qCAA0D;AAE1D;;;;;;GAMG;AACH,MAAa,0BAA2B,SAAQ,uBAAwB;aAC/D,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,4BAA4B;KACzC,AAHc,CAGb;IAIF,YACE,iBAAwD,EAChD,MAAc,EACd,UAAkB,EAClB,aAAiC;QAEzC,KAAK,EAAE,CAAC;QAJA,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAoB;QAN3C,kBAAa,GAAG,IAAI,CAAC;QASnB,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,WAAW,CACT,KAAmC;QAEnC,OAAO,KAAK,CAAC,MAAM,C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AAK,UAAU,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CACb,2BAA2B,WAAW,CAAC,MAAM,QAAQ,UAAU,EAAE,CAClE,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,eAAK,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACjC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QACD,MAAM,IAAI,mBAAS,CACjB,YAAY,aAAa,2HAA2H,CACrJ,CAAC;IACJ,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/toPg.d.ts b/grafast/dataplan-pg/dist/steps/toPg.d.ts new file mode 100644 index 0000000000..bc50575081 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/toPg.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=toPg.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/toPg.d.ts.map b/grafast/dataplan-pg/dist/steps/toPg.d.ts.map new file mode 100644 index 0000000000..98ab0fdc75 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/toPg.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"toPg.d.ts","sourceRoot":"","sources":["../../src/steps/toPg.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/toPg.js b/grafast/dataplan-pg/dist/steps/toPg.js new file mode 100644 index 0000000000..6d33e868c4 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/toPg.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ToPgStep = void 0; +exports.toPg = toPg; +const grafast_1 = require("grafast"); +/** + * Converts the given value to the representation suitable for feeding into the + * PostgreSQL driver. + * + * @remarks This would have been a lambda, but we want to be able to deduplicate it. + * + * @internal + */ +class ToPgStep extends grafast_1.UnbatchedStep { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "ToPgStep", + }; } + constructor($value, codec) { + super(); + this.codec = codec; + this.isSyncAndSafe = true; + this.addDependency($value); + this.peerKey = codec.name; + } + deduplicate(peers) { + return peers.filter((peer) => peer.codec === this.codec); + } + unbatchedExecute(_extra, v) { + return v == null ? null : this.codec.toPg(v); + } +} +exports.ToPgStep = ToPgStep; +/** + * Converts the given value to the representation suitable for feeding into the + * PostgreSQL driver. + * + * @internal + */ +function toPg($value, codec) { + return new ToPgStep($value, codec); +} +//# sourceMappingURL=toPg.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/toPg.js.map b/grafast/dataplan-pg/dist/steps/toPg.js.map new file mode 100644 index 0000000000..2415bc7f67 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/toPg.js.map @@ -0,0 +1 @@ +{"version":3,"file":"toPg.js","sourceRoot":"","sources":["../../src/steps/toPg.ts"],"names":[],"mappings":";;;AA0CA,oBAEC;AA3CD,qCAAwC;AAIxC;;;;;;;GAOG;AACH,MAAa,QAAS,SAAQ,uBAAkB;aACvC,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,UAAU;KACvB,AAHc,CAGb;IAEF,YACE,MAAsB,EACd,KAAc;QAEtB,KAAK,EAAE,CAAC;QAFA,UAAK,GAAL,KAAK,CAAS;QAHxB,kBAAa,GAAG,IAAI,CAAC;QAMnB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC;IAC5B,CAAC;IACD,WAAW,CAAC,KAAiB;QAC3B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED,gBAAgB,CAAC,MAA+B,EAAE,CAAM;QACtD,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;;AApBH,4BAqBC;AAED;;;;;GAKG;AACH,SAAgB,IAAI,CAAC,MAAsB,EAAE,KAAc;IACzD,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/withPgClient.d.ts b/grafast/dataplan-pg/dist/steps/withPgClient.d.ts new file mode 100644 index 0000000000..39d9dfbb83 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/withPgClient.d.ts @@ -0,0 +1,41 @@ +import type { ExecutionDetails, GrafastResultsList } from "grafast"; +import { Step } from "grafast"; +import type { PgClient, PgExecutor, WithPgClient } from "../executor"; +export type WithPgClientStepCallback = (client: TPgClient, data: TData) => Promise; +/** + * Runs the given `callback` against the given `executor` using any plan data + * from `$data` (which can be `constant(null)` if you don't need it). Typically + * useful for running custom transactions. + */ +export declare class WithPgClientStep extends Step { + private callback; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * Tells us what we're dealing with - data type, columns, where to insert it, + * what it's called, etc. + */ + readonly executor: PgExecutor; + /** + * The id for the PostgreSQL context plan. + */ + private contextId; + /** + * The id for the data plan. + */ + private dataId; + constructor(executor: PgExecutor, $data: Step, callback: WithPgClientStepCallback); + execute({ indexMap, values, }: ExecutionDetails<[ + { + pgSettings: any; + withPgClient: WithPgClient; + }, + TData + ]>): GrafastResultsList; +} +export declare function withPgClient(executor: PgExecutor, $data: Step | (TData extends null | undefined ? null | undefined : never), callback: WithPgClientStepCallback): WithPgClientStep; +export declare function withPgClientTransaction(executor: PgExecutor, $data: Step | (TData extends null | undefined ? null | undefined : never), callback: WithPgClientStepCallback): WithPgClientStep; +//# sourceMappingURL=withPgClient.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/withPgClient.d.ts.map b/grafast/dataplan-pg/dist/steps/withPgClient.d.ts.map new file mode 100644 index 0000000000..17fb77a2a2 --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/withPgClient.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"withPgClient.d.ts","sourceRoot":"","sources":["../../src/steps/withPgClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAY,IAAI,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEtE,MAAM,MAAM,wBAAwB,CAClC,KAAK,EACL,OAAO,EACP,SAAS,SAAS,QAAQ,GAAG,QAAQ,IACnC,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEzD;;;;GAIG;AACH,qBAAa,gBAAgB,CAC3B,KAAK,GAAG,GAAG,EACX,OAAO,GAAG,GAAG,EACb,SAAS,SAAS,QAAQ,GAAG,QAAQ,CACrC,SAAQ,IAAI,CAAC,OAAO,CAAC;IA2BnB,OAAO,CAAC,QAAQ;IA1BlB,MAAM,CAAC,QAAQ;;;MAGb;IAEF,aAAa,UAAS;IAEtB;;;OAGG;IACH,SAAgB,QAAQ,EAAE,UAAU,CAAC;IAErC;;OAEG;IACH,OAAO,CAAC,SAAS,CAAS;IAE1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAS;gBAGrB,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EACV,QAAQ,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;IASvE,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,GACP,EAAE,gBAAgB,CACjB;QAAC;YAAE,UAAU,EAAE,GAAG,CAAC;YAAC,YAAY,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;SAAE;QAAE,KAAK;KAAC,CACpE,GAAG,kBAAkB,CAAC,OAAO,CAAC;CAUhC;AAED,wBAAgB,YAAY,CAC1B,KAAK,EACL,OAAO,EACP,SAAS,SAAS,QAAQ,GAAG,QAAQ,EAErC,QAAQ,EAAE,UAAU,EACpB,KAAK,EACD,IAAI,CAAC,KAAK,CAAC,GACX,CAAC,KAAK,SAAS,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,EAC/D,QAAQ,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,+CAO9D;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EACL,OAAO,EACP,SAAS,SAAS,QAAQ,GAAG,QAAQ,EAErC,QAAQ,EAAE,UAAU,EACpB,KAAK,EACD,IAAI,CAAC,KAAK,CAAC,GACX,CAAC,KAAK,SAAS,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,EAC/D,QAAQ,EAAE,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,+CAQ9D"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/withPgClient.js b/grafast/dataplan-pg/dist/steps/withPgClient.js new file mode 100644 index 0000000000..3943d1600f --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/withPgClient.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WithPgClientStep = void 0; +exports.withPgClient = withPgClient; +exports.withPgClientTransaction = withPgClientTransaction; +const grafast_1 = require("grafast"); +/** + * Runs the given `callback` against the given `executor` using any plan data + * from `$data` (which can be `constant(null)` if you don't need it). Typically + * useful for running custom transactions. + */ +class WithPgClientStep extends grafast_1.Step { + static { this.$$export = { + moduleName: "@dataplan/pg", + exportName: "WithPgClientStep", + }; } + constructor(executor, $data, callback) { + super(); + this.callback = callback; + this.isSyncAndSafe = false; + this.hasSideEffects = true; + this.executor = executor; + this.contextId = this.addDependency(this.executor.context()); + this.dataId = this.addDependency($data); + } + execute({ indexMap, values, }) { + const contextDep = values[this.contextId]; + const dataDep = values[this.dataId]; + return indexMap((i) => { + const context = contextDep.at(i); + const data = dataDep.at(i); + const { withPgClient, pgSettings } = context; + return withPgClient(pgSettings, (client) => this.callback(client, data)); + }); + } +} +exports.WithPgClientStep = WithPgClientStep; +function withPgClient(executor, $data, callback) { + return new WithPgClientStep(executor, $data ?? (0, grafast_1.constant)($data), callback); +} +function withPgClientTransaction(executor, $data, callback) { + return withPgClient(executor, $data ?? (0, grafast_1.constant)($data), (client, data) => client.withTransaction((txClient) => callback(txClient, data))); +} +//# sourceMappingURL=withPgClient.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/steps/withPgClient.js.map b/grafast/dataplan-pg/dist/steps/withPgClient.js.map new file mode 100644 index 0000000000..5d40440aaa --- /dev/null +++ b/grafast/dataplan-pg/dist/steps/withPgClient.js.map @@ -0,0 +1 @@ +{"version":3,"file":"withPgClient.js","sourceRoot":"","sources":["../../src/steps/withPgClient.ts"],"names":[],"mappings":";;;AAyEA,oCAgBC;AAED,0DAiBC;AA3GD,qCAAyC;AAUzC;;;;GAIG;AACH,MAAa,gBAIX,SAAQ,cAAa;aACd,aAAQ,GAAG;QAChB,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE,kBAAkB;KAC/B,AAHc,CAGb;IAoBF,YACE,QAAoB,EACpB,KAAkB,EACV,QAA6D;QAErE,KAAK,EAAE,CAAC;QAFA,aAAQ,GAAR,QAAQ,CAAqD;QArBvE,kBAAa,GAAG,KAAK,CAAC;QAwBpB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAA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plan-pg/dist/utils.d.ts b/grafast/dataplan-pg/dist/utils.d.ts new file mode 100644 index 0000000000..adf9e30028 --- /dev/null +++ b/grafast/dataplan-pg/dist/utils.d.ts @@ -0,0 +1,9 @@ +import { ExecutableStep } from "grafast"; +import type { SQL } from "pg-sql2"; +import type { PgResource } from "./datasource.js"; +import type { PgClassSingleStep, PgSQLCallbackOrDirect } from "./interfaces.js"; +export declare function assertPgClassSingleStep>(step: ExecutableStep | PgClassSingleStep): asserts step is PgClassSingleStep; +export declare function makeScopedSQL(that: TThis): (cb: PgSQLCallbackOrDirect) => T; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/utils.d.ts.map b/grafast/dataplan-pg/dist/utils.d.ts.map new file mode 100644 index 0000000000..68ccd7ecef --- /dev/null +++ b/grafast/dataplan-pg/dist/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,SAAS,CAAC;AAGhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,iBAAiB,EAGjB,qBAAqB,EAEtB,MAAM,iBAAiB,CAAC;AAMzB,wBAAgB,uBAAuB,CACrC,SAAS,SAAS,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAErD,IAAI,EAAE,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,GAClD,OAAO,CAAC,IAAI,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAa9C;AAED,wBAAgB,aAAa,CAAC,KAAK,SAAS;IAAE,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAA;CAAE,EAC1E,IAAI,EAAE,KAAK,GACV,CAAC,CAAC,EAAE,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,CAgBxC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/utils.js b/grafast/dataplan-pg/dist/utils.js new file mode 100644 index 0000000000..451c0e6c40 --- /dev/null +++ b/grafast/dataplan-pg/dist/utils.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertPgClassSingleStep = assertPgClassSingleStep; +exports.makeScopedSQL = makeScopedSQL; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const pg_sql2_1 = tslib_1.__importDefault(require("pg-sql2")); +const pgDeleteSingle_js_1 = require("./steps/pgDeleteSingle.js"); +const pgInsertSingle_js_1 = require("./steps/pgInsertSingle.js"); +const pgSelectSingle_js_1 = require("./steps/pgSelectSingle.js"); +const pgUpdateSingle_js_1 = require("./steps/pgUpdateSingle.js"); +function assertPgClassSingleStep(step) { + if (!(step instanceof pgSelectSingle_js_1.PgSelectSingleStep || + step instanceof pgInsertSingle_js_1.PgInsertSingleStep || + step instanceof pgUpdateSingle_js_1.PgUpdateSingleStep || + step instanceof pgDeleteSingle_js_1.PgDeleteSingleStep)) { + throw new Error(`Expected a PgSelectSingleStep, PgInsertSingleStep, PgUpdateSingleStep or PgDeleteSingleStep, however we received '${step}'.`); + } +} +function makeScopedSQL(that) { + const sqlTransformer = (sql, value) => { + if (value instanceof grafast_1.ExecutableStep && "pgCodec" in value) { + if (value.pgCodec) { + return that.placeholder(value); + } + else { + throw new Error(`${value} has invalid value for pgCodec`); + } + } + else { + return value; + } + }; + return (cb) => typeof cb === "function" + ? pg_sql2_1.default.withTransformer(sqlTransformer, cb) + : cb; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/utils.js.map b/grafast/dataplan-pg/dist/utils.js.map new file mode 100644 index 0000000000..0ad47e97ee --- /dev/null +++ b/grafast/dataplan-pg/dist/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;AAiBA,0DAiBC;AAED,sCAkBC;;AAtDD,qCAAyC;AAEzC,8DAA0B;AAU1B,iEAA+D;AAC/D,iEAA+D;AAC/D,iEAA+D;AAC/D,iEAA+D;AAE/D,SAAgB,uBAAuB,CAGrC,IAAmD;IAEnD,IACE,CAAC,CACC,IAAI,YAAY,sCAAkB;QAClC,IAAI,YAAY,sCAAkB;QAClC,IAAI,YAAY,sCAAkB;QAClC,IAAI,YAAY,sCAAkB,CACnC,EACD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,qHAAqH,IAAI,IAAI,CAC9H,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,aAAa,CAC3B,IAAW;IAEX,MAAM,cAAc,GAAsC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACvE,IAAI,KAAK,YAAY,wBAAc,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;YAC1D,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBAClB,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,gCAAgC,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;IACF,OAAO,CAAI,EAA4B,EAAE,EAAE,CACzC,OAAO,EAAE,KAAK,UAAU;QACtB,CAAC,CAAC,iBAAG,CAAC,eAAe,CAAC,cAAc,EAAE,EAAsB,CAAC;QAC7D,CAAC,CAAC,EAAE,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/version.d.ts b/grafast/dataplan-pg/dist/version.d.ts new file mode 100644 index 0000000000..184126b4d5 --- /dev/null +++ b/grafast/dataplan-pg/dist/version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "0.0.1-beta.32"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/version.d.ts.map b/grafast/dataplan-pg/dist/version.d.ts.map new file mode 100644 index 0000000000..1f99446fca --- /dev/null +++ b/grafast/dataplan-pg/dist/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/version.js b/grafast/dataplan-pg/dist/version.js new file mode 100644 index 0000000000..6bcd71f6be --- /dev/null +++ b/grafast/dataplan-pg/dist/version.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +// This file is autogenerated by /scripts/postversion.mjs +exports.version = "0.0.1-beta.32"; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/grafast/dataplan-pg/dist/version.js.map b/grafast/dataplan-pg/dist/version.js.map new file mode 100644 index 0000000000..5170c4e6f8 --- /dev/null +++ b/grafast/dataplan-pg/dist/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAC5C,QAAA,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/grafast/dataplan-pg/tsconfig.tsbuildinfo b/grafast/dataplan-pg/tsconfig.tsbuildinfo new file mode 100644 index 0000000000..2d1b3f89f4 --- /dev/null +++ b/grafast/dataplan-pg/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../grafast/dist/therecanbeonlyone.d.ts","../../utils/lru/dist/index.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../grafast/dist/constraints.d.ts","../grafast/dist/bucket.d.ts","../grafast/dist/steps/__item.d.ts","../grafast/dist/steps/__flag.d.ts","../grafast/dist/steps/access.d.ts","../grafast/dist/steps/__value.d.ts","../grafast/dist/steps/listtransform.d.ts","../grafast/dist/steps/connection.d.ts","../grafast/dist/steps/constant.d.ts","../grafast/dist/steps/each.d.ts","../grafast/dist/steps/error.d.ts","../grafast/dist/steps/filter.d.ts","../grafast/dist/steps/first.d.ts","../grafast/dist/steps/groupby.d.ts","../grafast/dist/multistep.d.ts","../grafast/dist/steps/lambda.d.ts","../grafast/dist/steps/last.d.ts","../grafast/dist/steps/list.d.ts","../grafast/dist/steps/listen.d.ts","../grafast/dist/steps/node.d.ts","../grafast/dist/steps/partitionbyindex.d.ts","../grafast/dist/steps/remapkeys.d.ts","../grafast/dist/steps/reverse.d.ts","../grafast/dist/steps/applyinput.d.ts","../grafast/dist/steps/setter.d.ts","../grafast/dist/steps/sideeffect.d.ts","../grafast/dist/steps/__inputlist.d.ts","../grafast/dist/steps/__inputobject.d.ts","../grafast/dist/steps/__inputstaticleaf.d.ts","../grafast/dist/steps/__trackedvalue.d.ts","../grafast/dist/steps/applytransforms.d.ts","../grafast/dist/steps/bakedinput.d.ts","../grafast/dist/steps/condition.d.ts","../grafast/dist/steps/graphqlresolver.d.ts","../grafast/dist/steps/load.d.ts","../grafast/dist/steps/polymorphicbranch.d.ts","../grafast/dist/steps/proxy.d.ts","../grafast/dist/steps/index.d.ts","../grafast/dist/graphqlcollectfields.d.ts","../grafast/dist/engine/executeoutputplan.d.ts","../grafast/dist/engine/outputplan.d.ts","../grafast/dist/engine/operationplan.d.ts","../grafast/dist/step.d.ts","../grafast/dist/engine/layerplan.d.ts","../grafast/dist/error.d.ts","../grafast/dist/steps/__inputdefault.d.ts","../grafast/dist/steps/__inputdynamicscalar.d.ts","../grafast/dist/deferred.d.ts","../grafast/dist/utils.d.ts","../grafast/dist/planjsoninterfaces.d.ts","../grafast/dist/interfaces.d.ts","../grafast/dist/steps/object.d.ts","../grafast/dist/exportas.d.ts","../grafast/dist/grafastprint.d.ts","../grafast/dist/makegrafastschema.d.ts","../grafast/dist/dev.d.ts","../grafast/dist/engine/lib/defaultplanresolver.d.ts","../grafast/dist/engine/lib/withgloballayerplan.d.ts","../grafast/dist/execute.d.ts","../grafast/dist/grafastgraphql.d.ts","../grafast/dist/middleware.d.ts","../grafast/dist/operationplan-input.d.ts","../grafast/dist/polymorphic.d.ts","../grafast/dist/stringifypayload.d.ts","../grafast/dist/stripansi.d.ts","../grafast/dist/subscribe.d.ts","../../node_modules/iterall/index.d.ts","../grafast/dist/args.d.ts","../grafast/dist/version.d.ts","../grafast/dist/index.d.ts","../../utils/pg-sql2/dist/therecanbeonlyone.d.ts","../../utils/pg-sql2/dist/version.d.ts","../../utils/pg-sql2/dist/index.d.ts","../../node_modules/postgres-range/index.d.ts","./src/codecutils/box.ts","./src/codecutils/point.ts","./src/codecutils/circle.ts","./src/codecutils/hstore.ts","./src/codecutils/interval.ts","./src/codecutils/line.ts","./src/codecutils/lseg.ts","./src/codecutils/path.ts","./src/codecutils/polygon.ts","./src/codecutils/index.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","./src/formatsqlfordebugging.ts","./src/inspect.ts","./src/executor.ts","./src/filters/pgbooleanfilter.ts","./src/steps/pgcondition.ts","./src/filters/pgclassfilter.ts","./src/steps/pgtemptable.ts","./src/filters/pgmanyfilter.ts","./src/filters/pgorfilter.ts","./src/steps/pginsertsingle.ts","../grafast/fwd/graphql/index.d.ts","../dataplan-json/dist/steps/jsonparse.d.ts","../dataplan-json/dist/index.d.ts","./src/parsearray.ts","./src/steps/pgvalidateparsedcursor.ts","./src/steps/pgselect.ts","./src/steps/pgpageinfo.ts","./src/steps/pgunionall.ts","./src/steps/pgcursor.ts","./src/steps/pgselectsingle.ts","./src/steps/pgupdatesingle.ts","./src/utils.ts","./src/steps/pgstmt.ts","./src/pglocker.ts","./src/pgservices.ts","./src/version.ts","./src/plugins/pgcontextplugin.ts","./src/steps/pgpolymorphic.ts","./src/steps/pgsingletablepolymorphic.ts","./src/steps/topg.ts","./src/steps/withpgclient.ts","./src/index.ts","./src/steps/pgdeletesingle.ts","./src/steps/pgclassexpression.ts","./src/datasource.ts","./src/interfaces.ts","./src/codecs.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","./src/adaptors/pg.ts","./src/examples/exampleschema.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[320,364],[289,320,364],[260,320,364],[79,81,190,260,280,302,313,320,364,420,421],[79,260,263,264,274,279,280,291,313,320,364,408],[79,260,320,364],[79,260,266,320,364],[79,265,266,267,268,269,270,271,272,273,320,364],[79,320,364],[79,260,263,275,279,280,293,297,311,313,314,320,364],[79,260,263,288,290,293,294,295,305,308,309,312,313,314,320,364,369,377,421],[79,81,260,263,275,277,278,279,320,364],[79,260,263,313,320,364],[79,260,263,282,309,320,364],[79,260,263,283,284,312,320,364],[79,275,320,364],[79,260,274,280,281,282,283,284,285,286,287,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,310,311,312,313,314,320,364],[79,260,263,280,287,293,295,297,298,310,312,314,320,364,408],[79,260,300,320,364],[79,280,320,364],[79,260,302,303,313,320,364],[79,260,263,287,295,297,298,310,312,313,320,364],[79,260,263,320,364],[79,260,295,297,309,320,364],[79,260,263,279,309,311,313,314,320,364],[79,260,263,279,311,312,313,314,320,364],[79,260,293,295,296,297,320,364],[79,260,279,288,297,311,320,364],[79,260,263,277,280,282,291,292,294,296,297,300,301,311,312,313,314,320,364,369],[79,260,263,288,293,296,299,311,312,313,314,320,364],[79,260,288,297,312,320,364],[79,260,263,293,299,301,313,320,364],[79,263,282,283,312,320,364],[79,260,263,280,282,288,290,292,293,294,296,297,299,300,301,309,311,312,313,314,320,364,369],[79,260,313,320,364],[79,260,280,320,364],[79,260,263,287,297,298,310,312,313,320,364],[189,239,241,260,320,364],[192,231,320,364],[192,227,232,233,320,364],[227,233,241,320,364],[234,260,320,364],[189,191,229,231,234,239,241,260,320,364],[81,189,192,227,230,233,234,239,241,260,320,364],[241,320,364],[92,189,239,241,260,320,364],[192,320,364],[189,228,239,260,320,364],[80,81,87,189,205,227,228,232,233,235,238,239,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,320,364],[87,93,189,190,191,214,227,228,232,233,234,235,236,237,239,240,260,320,364],[189,227,233,239,241,260,320,364],[87,320,364],[227,233,320,364],[189,227,232,233,239,241,260,320,364],[189,228,232,234,239,241,260,320,364],[193,227,233,241,320,364],[220,227,233,241,320,364],[189,199,227,233,239,241,260,320,364],[189,199,227,233,239,260,320,364],[227,233,241,260,320,364],[189,191,194,195,196,227,233,239,241,260,320,364],[195,227,233,260,320,364],[194,227,233,241,320,364],[189,227,228,233,239,241,260,320,364],[197,227,233,241,320,364],[193,197,198,227,233,320,364],[198,227,233,241,320,364],[189,227,233,239,260,320,364],[197,198,227,233,320,364],[193,194,195,196,197,198,199,200,201,202,203,204,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,242,260,320,364],[205,227,233,241,320,364],[194,199,227,233,241,320,364],[193,198,227,233,241,260,320,364],[194,205,227,233,241,260,320,364],[189,206,227,233,239,241,260,320,364],[199,227,233,241,320,364],[214,260,320,364],[92,189,239,260,320,364],[189,227,232,233,238,239,241,260,320,364],[189,239,260,320,364],[320,364,484],[320,364,680],[320,364,648,683],[320,364,648],[320,364,648,649],[320,364,705],[320,364,695,697],[320,364,695,697,698,699,700,701],[320,364,695,697,698],[320,364,695,697,698,699],[320,364,695,697,698,699,700],[320,364,648,655],[320,364,648,658],[320,364,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709],[320,364,648,649,686,687],[320,364,648,649,686],[320,364,648,649,658],[320,364,648,649,658,669],[320,364,571],[320,364,379,414],[320,364,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482],[320,364,426],[320,364,426,430],[320,364,424,426,428],[320,364,424,426],[320,364,426,432],[320,364,425,426],[320,364,437],[320,364,426,443,444,445],[320,364,426,447],[320,364,426,448,449,450,451,452,453,454,455,456,457,458,459,460],[320,364,426,429],[320,364,426,428],[320,364,426,437],[320,364,484,485,486,487,488],[320,364,484,486],[320,364,379,414,490],[320,364,370,414],[320,364,407,414,499],[320,364,379,414,490,504,505],[320,364,491,499,503],[320,364,508,536],[320,364,507,513],[320,364,518],[320,364,513],[320,364,512],[320,364,530],[320,364,526],[320,364,508,525,536],[320,364,507,508,509,510,511,512,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537],[276,320,364],[320,364,540,544],[320,364,540,541,543],[320,364,544],[320,364,539,540,541],[320,364,376,379,414,496,497,498],[320,364,491,497,499,503,546],[320,364,377,414,548,549],[320,364,376,377,414,551],[320,364,377,414],[320,364,554],[320,364,556,562],[320,364,557,558,559,560,561],[320,364,562],[320,364,376,379,381,384,396,407,414],[320,364,414],[320,364,567],[320,364,568],[320,364,573,576],[320,364,377,407,414],[276,320,364,369,414],[320,364,376,414],[320,364,581],[320,363,364,376,379,380,384,391,407,414,423,501,502,505,506,564,580],[320,364,632],[320,364,634,636,637,638,639,640,641,642,643,644,645,646],[320,364,634,635,637,638,639,640,641,642,643,644,645,646],[320,364,635,636,637,638,639,640,641,642,643,644,645,646],[320,364,634,635,636,638,639,640,641,642,643,644,645,646],[320,364,634,635,636,637,639,640,641,642,643,644,645,646],[320,364,634,635,636,637,638,640,641,642,643,644,645,646],[320,364,634,635,636,637,638,639,641,642,643,644,645,646],[320,364,634,635,636,637,638,639,640,642,643,644,645,646],[320,364,634,635,636,637,638,639,640,641,643,644,645,646],[320,364,634,635,636,637,638,639,640,641,642,644,645,646],[320,364,634,635,636,637,638,639,640,641,642,643,645,646],[320,364,634,635,636,637,638,639,640,641,642,643,644,646],[320,364,634,635,636,637,638,639,640,641,642,643,644,645],[320,364,842,843,844,845],[320,364,841],[320,364,414,841],[320,364,841,842,843,844],[320,361,364],[320,363,364],[364],[320,364,369,399],[320,364,365,370,376,377,384,396,407],[320,364,365,366,376,384],[315,316,317,320,364],[320,364,367,408],[320,364,368,369,377,385],[320,364,369,396,404],[320,364,370,372,376,384],[320,363,364,371],[320,364,372,373],[320,364,376],[320,364,374,376],[320,363,364,376],[320,364,376,377,378,396,407],[320,364,376,377,378,392,396,399],[320,359,364,412],[320,364,372,376,379,384,396,407],[320,364,376,377,379,380,384,396,404,407],[320,364,379,381,396,404,407],[318,319,320,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413],[320,364,376,382],[320,364,383,407,412],[320,364,372,376,384,396],[320,331,335,364,407],[320,331,364,396,407],[320,326,364],[320,328,331,364,404,407],[320,364,384,404],[320,326,364,414],[320,328,331,364,384,407],[320,323,324,327,330,364,376,396,407],[320,331,338,364],[320,323,329,364],[320,331,352,353,364],[320,327,331,364,399,407,414],[320,352,364,414],[320,325,326,364,414],[320,331,364],[320,325,326,327,328,329,330,331,332,333,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,353,354,355,356,357,358,364],[320,331,346,364],[320,331,338,339,364],[320,329,331,339,340,364],[320,330,364],[320,323,326,331,364],[320,331,335,339,340,364],[320,335,364],[320,329,331,334,364,407],[320,323,328,331,338,364],[320,364,396],[320,326,331,352,364,412,414],[320,364,385],[320,364,386],[320,363,364,387],[320,361,362,363,364,365,366,367,368,369,370,371,372,373,374,376,377,378,379,380,381,382,383,384,385,386,387,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413],[320,364,390],[320,364,391],[320,364,376,392,393],[320,364,392,394,408,410],[320,364,376,396,397,399],[320,364,398,399],[320,364,396,397],[320,364,399],[320,364,400],[320,361,364,396],[320,364,376,402,403],[320,364,402,403],[320,364,369,384,396,404],[320,364,405],[320,364,384,406],[320,364,379,391,407],[320,364,369,408],[320,364,396,409],[320,364,383,410],[320,364,411],[320,364,369,376,378,387,396,407,410,412],[320,364,396,413],[320,364,376,396,404,414,415,416,419,420,421],[320,364,857,858],[320,364,857],[320,364,862],[320,364,562,865,866],[320,364,861,963],[320,364,861,964],[320,364,562,865],[320,364,861,864],[320,364,855,860,861],[320,364,379,396,414],[320,364,396,414],[320,364,890,929],[320,364,890,914,929],[320,364,929],[320,364,890],[320,364,890,915,929],[320,364,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928],[320,364,915,929],[320,364,377,396,414,495],[320,364,377,504],[320,364,379,414,496,502],[320,364,936,937],[320,364,540,936],[320,364,540,937],[320,364,712],[320,364,939],[320,364,379,384,414,632],[320,364,414,943,944,945,946,947,948,949,950,951,952,953],[320,364,942,943,952],[320,364,943,952],[320,364,933,942,943,952],[320,364,942,943,944,945,946,947,948,949,950,951,953],[320,364,943],[320,364,369,942,952],[320,364,369,414,631,939,940,941,954],[320,364,376,379,381,384,407,414],[320,364,376,379,381,384,396,404,407,413,414],[320,364,960],[320,364,587,588,592,619,620,622,623,624,626,627],[320,364,585,586],[320,364,585],[320,364,587,627],[320,364,587,588,624,625,627],[320,364,627],[320,364,584,627,628],[320,364,587,588,626,627],[320,364,587,588,590,591,626,627],[320,364,587,588,589,626,627],[320,364,587,588,592,619,620,621,622,623,626,627],[320,364,584,587,588,592,624,626],[320,364,592,627],[320,364,594,595,596,597,598,599,600,601,602,603,627],[320,364,617,627],[320,364,593,604,612,613,614,615,616,618],[320,364,597,627],[320,364,605,606,607,608,609,610,611,627],[320,364,825,826,827,828,829],[320,364,823],[320,364,824,830,831],[320,364,713],[320,364,570,575],[320,364,873,875,879,880,883],[320,364,884],[320,364,875,879,882],[320,364,873,875,879,882,883,884,885],[320,364,879],[320,364,875,879,880,882],[320,364,873,875,880,881,883],[320,364,876,877,878],[320,364,377,386,414,873,874],[89,90,96,97,320,364],[98,164,165,320,364],[89,96,98,320,364],[90,98,320,364],[89,91,92,93,96,98,101,102,320,364],[91,103,117,118,320,364],[89,96,101,102,103,320,364],[89,93,96,98,100,101,102,320,364],[89,90,101,102,103,320,364],[88,104,109,116,119,120,163,166,188,320,364],[89,320,364],[90,94,95,320,364],[90,94,95,96,97,99,110,111,112,113,114,115,320,364],[90,95,96,320,364],[90,320,364],[89,90,95,96,98,111,320,364],[96,320,364],[90,96,97,320,364],[94,96,320,364],[103,117,320,364],[89,91,92,93,96,101,320,364],[89,96,99,102,320,364],[91,100,101,102,105,106,107,108,320,364],[102,320,364],[89,93,96,98,100,102,320,364],[98,101,320,364],[98,320,364],[89,96,102,320,364],[90,96,101,112,320,364],[101,167,320,364],[98,102,320,364],[96,101,320,364],[101,320,364],[89,99,320,364],[89,96,320,364],[96,101,102,320,364],[121,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,320,364],[101,102,320,364],[93,96,320,364],[89,96,100,101,102,114,320,364],[89,93,96,102,320,364],[89,93,96,320,364],[122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,320,364],[114,122,320,364],[122,320,364],[89,96,98,101,121,122,320,364],[89,96,98,100,101,102,114,121,320,364],[320,364,573],[275,320,364,574],[320,364,714],[320,364,715,757],[320,364,538,715,753,756],[320,364,755,757],[320,364,508,536,715,754,755,761,833,834],[320,364,711,715,754,755,756,757,758,759,761,835,836,837],[320,364,715,754,756,757],[320,364,648,710],[320,364,757,761,835],[320,364,761],[320,364,508,536,754,761,822,832,838],[320,364,754,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821],[320,364,508,536,754,761],[320,364,715,760,822],[320,364,715],[320,364,508,536,538,715,754],[320,364,376,400,414],[320,364,414,416,417,418],[320,364,396,414,416],[320,364,852],[320,364,572],[320,364,887],[320,364,377,886],[320,364,629],[320,364,541,583,628],[320,364,541,629],[320,364,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745],[320,364,731],[320,364,731,742],[320,364,717,733],[320,364,733],[320,364,740],[320,364,716],[320,364,717],[320,364,725],[320,364,747],[320,364,746,748,749,750,751,752],[320,364,749],[320,364,748],[320,364,379,384,404,407,410,540,545,583,629,630,631],[82,320,364],[82,83,320,364],[82,83,84,85,86,320,364],[261,262,320,364]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"516f341210dea50c84646ee54f7d0cfee42efc76756b45dd46b09c34758e786b","impliedFormat":1},{"version":"4ffd67840b9c111b0147391cec4e17634adacbcaa7ab66aabbf19819583b8786","impliedFormat":1},{"version":"aa7540691d60e42d4d7f082fad0fb3dc4e50592fc91b8e2f01688c31c40364b6","impliedFormat":1},{"version":"5c53ec3e7d027ebc6bd54189cd2b511406797ab2b7b31a2cd54b1ecf1636719f","impliedFormat":1},{"version":"89aa93a24c68a1049f93c14ae53c06ee1fcc4d095f56273a58504485984d4c8e","signature":"dd10e13f8460b7843b1dd45f6d6cd8610805b34c1e309e212d623fc7e71b3a20","impliedFormat":1},{"version":"917df542ae9bf3f46e3be95bfd8ce2b8ee4ea86cfbc138982c84d2428cc76811","signature":"3fd0e3f06216c76348ea8873b9447b486a3dbd12528c007c59a34436bc840f71","impliedFormat":1},{"version":"7ceedc648c231752bd4785cc4569ab36ca0de68ecc057101c2597c2191b85ce9","signature":"6e2666d8a71db78d13e8c7a9af3de6b3d7ec7943f720beb3c82c559a62260cf9","impliedFormat":1},{"version":"51b5a17eb69785b5c76799851b51e9379d79e1e51531b7b7e0de9b3bd67ec87d","signature":"e1fdc2be6f8bce5802d26b1f7c9207fd334a930c6b65832cdfc5fc0596cd5c1a","impliedFormat":1},{"version":"b83be930f50207a461697f2657861c8e7336bfa3c815135fc4de21b6a2218474","signature":"190d71370381a8153240ba29f2596c8f79c8da8d89304e6a6825fc6d6ff213ea","impliedFormat":1},{"version":"9dde38c72e30c1e297412a33590d4119d0a06f41f7638bba9d2c3d111209311d","signature":"93af727a1d56a8e799165d99c5ca24627d77fa26b30c70f8f3ed0df37623a3f9","impliedFormat":1},{"version":"a3251dc357f1e93a0f9c51150fcbf373b126c48e3defa751b30e4e1946bda67e","signature":"0c0ca987db3ac1227cc075ffe8e07d829975cfb41f77ad8ed692a7382598eade","impliedFormat":1},{"version":"0a1ee1a493f46c277aa6897447daae27cef198bb6f0221b342699183085fd4b1","signature":"088f1fdd19db3be3a6bcbd8d09c3a0a2f6f2ae59d8520f4f0ad7da8fa9383fa9","impliedFormat":1},{"version":"514bb405e32eda484e15acb7cb36203c80384ce70edd9829a78369288e229781","signature":"a4badbe9c95ce7712450285ee98f34a9d2c72240096eee7d683b405b91c6b639","impliedFormat":1},{"version":"033f859cfefa0ac474c26b5eb0a497dfb9d6d11e32d5e922ad86e6ae17229ada","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"1555fe4a827e768b46b14e19823399cd10d357196d1bf757db224c08c9af2f6b","signature":"e7ed94ee951c2ccc38fa87f7400d3b9d6ab739c924cb211cb216d1331e5af7a6","impliedFormat":1},{"version":"595ec9cfd45edf272e35bb1a723a2bc0161aa699f2d2fa08bc3bb62a7107c7b6","signature":"d751081230981b36b832737b9a64081b67b29a778905a388d2aa9091e6fc3629","impliedFormat":1},{"version":"d657b615a3caae3c28254fe3dd3ce7f2758e0c2a2eba7983a797993163ea52d2","signature":"958bcb3ff5cf43a1b07ff81e76a89876cb1af79839f8a086ab2a4319770c0d92","impliedFormat":1},{"version":"c0a227eefa6f3ed83831ea0187f9a0152b240b5ce1f667897282f8acd0d4df1d","signature":"0e09d07ddd69a4b558e89f89cd0ed0f401fd62be5509990191fa0a29f2204d70","impliedFormat":1},{"version":"3a711eb68d51315896bbb26dc048f9a60ead1b20a67acb73d09fd06c64183a17","signature":"ac5a2b48e429edade182c4e19e35fc9c7afba95e15c078b8d37d458d82c6d241","impliedFormat":1},{"version":"2201c32f8dedd037c89d5c2a0fe7fbe8db4a589db3303fa0c0a6c568c1e94e24","signature":"1b9a4dc7f32dee424a1fa47750aed7f9e99b09dfa75d0b75ae49160c8bbcd519","impliedFormat":1},{"version":"c90eee9adbef710ec95be8007446069783afd02d5f7bc4d225c2aac52d7b3f4c","signature":"f688ca2343e82e9ba3674234e637bc544e1156c096bd1fbe05db709aae8068d5","impliedFormat":1},{"version":"2af0fd749f1dcfcc3c2358e83c8e03992ca10c98d5ae422b981e179da8acd6fc","signature":"29cef6f9233836d7a0442e7ce29a793ee2a72d492d45043fa8a51d16a3adb055","impliedFormat":1},{"version":"bf2b9073b8ea6418066ea4367a1dbc31296699c0cd02d6c7dba770e7411426cd","signature":"52e82648cc5768685ad19c908d4a89933aaff00ab46877829309bfb9a10b384b","impliedFormat":1},{"version":"4e418a28f638271b142c6a889cef250ca54852d6a11a7e9e2ca7c2ae382d334d","signature":"64d81faf35b6a4ccb4ab25f9e12f1797c60bed4407ce5d8c96c956653be3cf72","impliedFormat":1},{"version":"00c167f32444b220a604a8308f4466cb83b1e3de66ccffdcdefb65a49c26f161","impliedFormat":1},{"version":"a300b3d1fd727ce517240746c0d70c6f620a5bb97ae06b84f92c32acb8458949","impliedFormat":1},{"version":"fa2bec09f892e9cbb2b86167134b987c2008d0e5654123bb0d533037b0982cd4","impliedFormat":1},{"version":"6de62634fda519f5ad38c4731fdf0b9c7ab01de0abbc18ce8661dcba9e26c7bc","signature":"de97b49044946e0aa214d7995a3586ea9b177c6abb0de3b3b29afdb6124e71d2","impliedFormat":1},{"version":"cd487c1f81cfa691ba766099c2be0320dec8ab69e547fe7df399c739ae92c58b","signature":"ff29c4cf0469f5dd7d3eac9b467f81822928819ba78e639b13e6c78105c749e5","impliedFormat":1},{"version":"3bd506102fa10d85899e5f6e93aeeef8983fb6d19d805ab32eadd194c308d5ac","signature":"4659c220fb2f447f5b2f7a2890211f76c7d15b19713fa95aeee1373b1b147273","impliedFormat":1},{"version":"6f7d109872ba5c9017b0e4a935530dfc98196bb8d20dc20d2be6796eaebac367","signature":"68377f04568ea6488e2be3a854ac6f71e0158644e1941f3fe262d1fb06b2cec3","impliedFormat":1},{"version":"8f7375844c17d83905b23ac6bb9fbb872959b039b7adb56af829719ba74722ac","signature":"88b54688a5eda5e2ad9e99c0662c95151093caddec114791ac24b82188aa6746","impliedFormat":1},{"version":"99d6809456a01c9c7f377556f733b37313220a7cfb5ab1dfdef406f4b02587c8","signature":"29b804c93ed84d6157ca548eed3101a087eb55e5ca955efd8e1b7c038d099f25","impliedFormat":1},{"version":"9fc2a2bfaf1f4a524f28a2b27ae013bb67e9e62b4aafc63a4c5c848f02f9f503","signature":"6b97cdb90865a8f80c0b028dd91de05896e7eb8df037b3c83c8cd802be5291d5","impliedFormat":1},{"version":"2dd20c6256788772edce1ceca1f1ab1a7edf2ff688563aae2cbfcc10b7e17da5","signature":"d0bf945d8100fea4749732c5ec05cc52a2bd180f4916c5c8c47381dd7474098c","impliedFormat":1},{"version":"bd6b6a1e6e7827722bdab701e2cfbd4e1c687f667f293b107b0884d1042a6aaf","signature":"46b70b5bd03cf1825abc765ec2a7f0929376750e585daeaaf2f8b90868f0e765","impliedFormat":1},{"version":"cda6ef6edd54325ae0314c730c909ffaeb6b1deb6c4c9997cf9b54654adc71cb","signature":"7f1fd092746175f884edc0ec18daca9c904c67830ae865454456a28cbeaadcdc","impliedFormat":1},{"version":"d2f701839547af5ab6a8fbb71a33ce708a4b1e546cb86d5f2518ec3c48182382","signature":"493949712102eb0e9f2ce218477df8e6a95b4bc82f10cf3c645e3385f38e3eda","impliedFormat":1},{"version":"72a2d9a769cead8cd22f3c0a52d9f06f6b06058a32ebb97296ac717b33e85eb2","signature":"54052d53a08df28c7fd71955fc7953ade19b0ab882c1cb106527002c3ad3bbab","impliedFormat":1},{"version":"23f2b48802b1511061c6a350fb761eabd08baf5b3d45e9d047d6621cda42daa0","signature":"23afa72921e474c1d2fa3f7df310cfc84f9b89287b6b0eb9026628b25cc12f85","impliedFormat":1},{"version":"c757a3ef7a37ae2bab4d8c2f13676564e374c8ccb22039fe346bcd98d92b7a95","signature":"4e2735f31dfd30eba8a1e2fb19a065d460d1a7649374f68545a769aca229a341","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea064f4b0c3662d7b35e4a311d64d477d486190c753135bb0018dc3082b906a6","signature":"ec0d421fa486ed96b1f70a84c7eb5019e4c2e2d00d9ecbdbc1c3fadcaf0f419b","impliedFormat":1},{"version":"2019780f0054f6c8322cb7cb345fd2e3e2f26ab7e2119f23707d98125c178b3e","signature":"b86985b96dc8877652e6708f86f50a49293380d17b2a56430542317fed6cd0a1","impliedFormat":1},{"version":"c717dab4e621c113c3ef2e8accf0121b2217860081b8c0b8f5b751fdc0879454","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"ad7ac8425cba35a71e470a36f847b9918600e4337cdfa296a1a61d8784789026","signature":"d27a2d113d5051cb297b91ab5026a714196d343c58bd3392371eac361d4760c5","impliedFormat":1},{"version":"b626ab00c800a70894dbafc5494c282b0b867e53dec7aa19b4b6a0dd118f9030","signature":"7f0466f8eded73b2a801307f761744bceb5f5f3690d24effa64af8ae8e85a5bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb4ebe8c1a5f372f45afba4c64e6957f257cb850d9e268c4329a91fae7818da3","signature":"63d5e71e01b06135f70038c4870884ea1ddc213e9f0a3b6ab2f39524ecb155ed","impliedFormat":1},{"version":"5bdf3b820e609fa7298e53a6f95a95008b1a61f387acf68a83724a8224e3d345","signature":"8026db154f04a9fa97599d327ae5e1481f4468238e8380437e382827c275dbb8","impliedFormat":1},{"version":"aaa5bd027797615fde56eb76415c5f0ab1f69a9f78b993d132845781e4e6a413","signature":"5a351530ecc309ffa33ae34ab65b43db7aaf89477a466559d3ec4f280b7cd2f2","impliedFormat":1},{"version":"8685dd092d9ddf5002af0de99aa4e427a8dc92272f06b88e49a384db82479a51","signature":"0fa269c73ba7136c928893f0456f79f45f879133bb2b4294bc03c53d9a0fb0ec","impliedFormat":1},{"version":"2265960cba050c012ec1f020e61d6dd8d638f1ddd513cc8c7f5c3c564dd0e73b","signature":"388d98e84155f138e926f8a8ed53a9917b3885fc369efec3720ba24ad0d5e0c7","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"4bad2f2148a072f31924e78190a5afe365c8c147d38c1fceaded3455352ba34f","signature":"8520d238e767c8f03f72c8c8ae8fddddf884c1eb638159d49b0680a2c374eb99","affectsGlobalScope":true,"impliedFormat":1},{"version":"4956593d98af8850e5b07a0fce7e86c5a278cfc09c2fcf7116169a91c7886e5d","signature":"fccd6b364b9d996aa561b684d794c881ca7be37ad5b6dc2b31f043254760e12f","impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[[265,274],[278,287],[291,314],421,422],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":9,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[962,1],[321,1],[290,2],[289,3],[421,4],[314,5],[265,6],[267,7],[268,6],[274,8],[269,9],[270,6],[271,6],[272,7],[266,6],[273,7],[312,10],[422,11],[280,12],[281,13],[283,14],[285,15],[286,13],[278,16],[309,17],[279,9],[313,18],[291,9],[301,19],[302,20],[304,21],[311,22],[282,23],[296,24],[310,25],[287,26],[294,27],[305,28],[293,29],[297,30],[306,31],[300,32],[284,33],[295,34],[298,26],[292,6],[307,35],[308,36],[299,37],[303,9],[258,38],[192,1],[191,1],[238,1],[246,1],[230,39],[234,40],[247,41],[248,42],[232,43],[231,44],[235,45],[249,46],[243,1],[250,46],[244,47],[229,48],[260,49],[241,50],[245,51],[251,52],[205,53],[252,54],[240,45],[253,45],[233,55],[194,56],[236,57],[237,51],[217,51],[218,58],[219,59],[193,60],[220,61],[196,62],[195,63],[214,64],[221,53],[222,51],[223,41],[198,65],[199,41],[200,66],[201,41],[202,66],[203,67],[224,68],[204,69],[228,70],[206,71],[207,67],[208,72],[209,56],[197,73],[225,74],[210,75],[242,76],[211,69],[226,68],[227,41],[212,41],[213,41],[215,77],[216,71],[254,45],[255,1],[256,78],[80,1],[239,79],[259,1],[288,80],[686,1],[486,81],[484,1],[648,1],[682,82],[681,82],[680,1],[684,83],[685,83],[683,1],[651,1],[649,84],[652,85],[650,85],[653,1],[692,1],[693,1],[697,1],[694,1],[704,84],[703,1],[705,1],[706,86],[698,87],[702,88],[699,89],[695,1],[700,90],[701,91],[696,1],[668,84],[664,84],[667,84],[666,84],[665,84],[661,84],[660,84],[663,84],[662,84],[655,84],[656,92],[654,1],[659,93],[657,84],[710,94],[689,95],[691,95],[690,95],[687,96],[688,95],[708,1],[707,1],[709,1],[669,97],[670,1],[673,1],[676,1],[671,1],[678,1],[679,98],[675,1],[672,1],[674,1],[677,1],[658,1],[570,1],[572,99],[571,1],[423,100],[388,1],[424,1],[425,1],[426,1],[483,101],[427,102],[472,103],[429,104],[428,105],[430,102],[431,102],[433,106],[432,102],[434,107],[435,107],[436,102],[438,108],[439,102],[440,108],[441,102],[443,102],[444,102],[445,102],[446,109],[442,102],[447,1],[448,110],[449,110],[450,110],[451,110],[452,110],[461,111],[453,110],[454,110],[455,110],[456,110],[458,110],[457,110],[459,110],[460,110],[462,102],[463,102],[437,102],[464,108],[466,112],[465,102],[467,102],[468,102],[469,113],[471,102],[470,102],[473,102],[475,102],[476,114],[474,102],[477,102],[478,102],[479,102],[480,102],[481,102],[482,102],[489,115],[485,81],[487,116],[488,81],[491,117],[492,118],[493,1],[494,1],[500,119],[490,100],[501,1],[506,120],[504,121],[507,1],[509,122],[510,122],[511,1],[512,1],[514,123],[515,1],[516,1],[517,122],[518,1],[519,1],[520,124],[521,1],[522,1],[523,125],[524,1],[525,126],[526,1],[527,1],[528,1],[529,1],[532,1],[531,127],[508,1],[533,128],[534,1],[530,1],[535,1],[536,122],[537,129],[538,130],[277,131],[545,132],[544,133],[543,134],[539,1],[542,135],[540,1],[499,136],[547,137],[546,136],[550,138],[513,1],[552,139],[553,140],[555,141],[557,142],[558,142],[559,142],[556,1],[562,143],[560,144],[561,144],[563,1],[564,1],[502,1],[565,145],[566,146],[567,1],[568,147],[569,148],[577,149],[541,1],[548,150],[549,1],[578,151],[505,1],[579,152],[582,153],[580,153],[581,154],[633,155],[635,156],[636,157],[634,158],[637,159],[638,160],[639,161],[640,162],[641,163],[642,164],[643,165],[644,166],[645,167],[646,168],[647,141],[495,1],[551,1],[839,1],[840,1],[846,169],[843,170],[842,171],[845,172],[841,1],[844,170],[276,1],[847,146],[361,173],[362,173],[363,174],[320,175],[364,176],[365,177],[366,178],[315,1],[318,179],[316,1],[317,1],[367,180],[368,181],[369,182],[370,183],[371,184],[372,185],[373,185],[375,186],[374,187],[376,188],[377,189],[378,190],[360,191],[319,1],[379,192],[380,193],[381,194],[414,195],[382,196],[383,197],[384,198],[338,199],[348,200],[337,199],[358,201],[329,202],[328,203],[357,146],[351,204],[356,205],[331,206],[345,207],[330,208],[354,209],[326,210],[325,146],[355,211],[327,212],[332,213],[333,1],[336,213],[323,1],[359,214],[349,215],[340,216],[341,217],[343,218],[339,219],[342,220],[352,146],[334,221],[335,222],[344,223],[324,224],[347,215],[346,213],[350,1],[353,225],[385,226],[386,227],[387,228],[389,229],[390,230],[391,231],[392,232],[393,232],[394,233],[395,1],[396,234],[398,235],[397,236],[399,237],[400,238],[401,239],[402,240],[403,241],[404,242],[405,243],[406,244],[407,245],[408,246],[409,247],[410,248],[411,249],[412,250],[413,251],[848,146],[849,1],[850,1],[420,252],[415,1],[851,1],[854,1],[855,1],[856,1],[497,1],[859,253],[858,254],[498,1],[863,255],[868,256],[867,257],[870,256],[869,258],[866,259],[864,1],[865,260],[860,1],[862,261],[871,262],[872,1],[889,263],[914,264],[915,265],[890,266],[893,266],[912,264],[913,264],[903,264],[902,267],[900,264],[895,264],[908,264],[906,264],[910,264],[894,264],[907,264],[911,264],[896,264],[897,264],[909,264],[891,264],[898,264],[899,264],[901,264],[905,264],[916,268],[904,264],[892,264],[929,269],[928,1],[923,268],[925,270],[924,268],[917,268],[918,268],[920,268],[922,268],[926,270],[927,270],[919,270],[921,270],[496,271],[931,272],[930,121],[503,273],[932,100],[933,1],[934,1],[935,1],[938,274],[937,275],[936,276],[713,277],[712,1],[940,278],[554,1],[956,279],[954,280],[953,281],[944,282],[945,283],[952,284],[946,283],[947,282],[948,282],[949,282],[950,285],[943,286],[951,281],[942,1],[955,287],[957,288],[958,1],[959,289],[960,1],[961,290],[628,291],[585,1],[587,292],[586,293],[591,294],[626,295],[623,296],[625,297],[588,296],[589,298],[593,298],[592,299],[590,300],[624,301],[622,296],[627,302],[620,1],[621,1],[594,303],[599,296],[601,296],[596,296],[597,303],[603,296],[604,304],[595,296],[600,296],[602,296],[598,296],[618,305],[617,296],[619,306],[613,296],[615,296],[614,296],[610,296],[616,307],[611,296],[612,308],[605,296],[606,296],[607,296],[608,296],[609,296],[584,1],[941,1],[322,1],[275,1],[861,1],[830,309],[826,1],[827,1],[825,1],[828,1],[829,1],[831,1],[823,1],[824,310],[832,311],[714,312],[190,1],[576,313],[884,314],[885,315],[883,316],[886,317],[880,318],[881,319],[882,320],[876,318],[877,318],[879,321],[878,318],[875,322],[98,323],[166,324],[165,325],[164,326],[103,327],[119,328],[117,329],[118,330],[104,331],[189,332],[89,1],[93,1],[91,333],[92,1],[96,334],[99,1],[116,335],[94,1],[111,336],[97,337],[112,338],[115,339],[113,339],[110,340],[90,1],[95,1],[114,341],[120,342],[108,1],[102,343],[100,344],[109,345],[106,346],[105,346],[101,347],[107,348],[185,349],[179,350],[172,351],[171,352],[180,353],[181,339],[173,354],[186,355],[167,356],[168,357],[169,358],[188,359],[170,352],[174,355],[175,360],[182,361],[183,337],[184,360],[187,339],[176,358],[121,362],[177,363],[178,364],[163,365],[161,366],[162,366],[125,366],[126,366],[127,366],[128,366],[129,366],[130,366],[131,366],[132,366],[133,366],[153,366],[134,366],[135,366],[136,366],[137,366],[138,366],[139,366],[160,366],[140,366],[141,366],[142,366],[143,366],[158,366],[144,366],[159,366],[145,366],[156,366],[157,366],[146,366],[147,366],[148,366],[154,366],[155,366],[149,366],[150,366],[151,366],[152,366],[124,367],[123,368],[122,369],[88,1],[257,1],[574,370],[575,371],[874,1],[715,372],[758,373],[757,374],[756,375],[759,1],[835,376],[834,1],[838,377],[836,378],[711,379],[837,380],[760,381],[833,382],[822,383],[762,384],[763,384],[764,384],[765,384],[766,384],[819,384],[767,384],[768,384],[769,384],[770,384],[771,384],[772,384],[773,384],[774,384],[818,384],[775,384],[776,384],[777,384],[778,384],[779,384],[780,384],[781,384],[782,384],[783,384],[784,384],[785,384],[786,384],[821,384],[787,384],[788,384],[789,384],[790,384],[791,384],[792,384],[793,384],[794,384],[795,384],[796,384],[797,384],[798,384],[820,384],[799,384],[800,384],[801,384],[802,384],[803,384],[804,384],[805,384],[806,384],[807,384],[808,384],[809,384],[810,384],[811,384],[812,384],[813,384],[814,384],[815,384],[816,384],[817,384],[761,385],[754,386],[755,387],[873,388],[419,389],[416,146],[418,390],[417,1],[264,1],[852,1],[853,391],[573,392],[888,393],[887,394],[630,395],[629,396],[583,397],[939,1],[631,1],[857,254],[79,1],[746,398],[732,399],[743,400],[716,1],[734,401],[733,1],[735,402],[741,403],[740,1],[717,1],[738,1],[739,1],[725,404],[720,1],[719,405],[718,1],[727,1],[744,406],[723,404],[726,1],[731,1],[724,404],[721,405],[722,1],[728,405],[729,405],[742,1],[737,1],[745,1],[736,1],[747,1],[730,1],[748,407],[749,407],[753,408],[750,409],[751,410],[752,409],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[632,411],[83,412],[84,413],[87,414],[82,1],[85,412],[86,412],[81,1],[263,415],[261,1],[262,1]],"latestChangedDtsFile":"./dist/examples/exampleSchema.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/grafast/dist/args.d.ts b/grafast/grafast/dist/args.d.ts new file mode 100644 index 0000000000..045e17179a --- /dev/null +++ b/grafast/grafast/dist/args.d.ts @@ -0,0 +1,6 @@ +import type { ExecutionArgs } from "graphql"; +import type { GrafastExecutionArgs, PromiseOrDirect } from "./interfaces.js"; +/** @deprecated Pass `resolvedPreset` and `requestContext` via args directly */ +export declare function hookArgs(rawArgs: ExecutionArgs, resolvedPreset: GraphileConfig.ResolvedPreset, ctx: Partial): PromiseOrDirect; +export declare function hookArgs(rawArgs: GrafastExecutionArgs): PromiseOrDirect; +//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/args.d.ts.map b/grafast/grafast/dist/args.d.ts.map new file mode 100644 index 0000000000..e9b8d9770d --- /dev/null +++ b/grafast/grafast/dist/args.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EACV,oBAAoB,EAEpB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAQzB,+EAA+E;AAC/E,wBAAgB,QAAQ,CACtB,OAAO,EAAE,aAAa,EACtB,cAAc,EAAE,cAAc,CAAC,cAAc,EAC7C,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GACnC,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AAC1C,wBAAgB,QAAQ,CACtB,OAAO,EAAE,oBAAoB,GAC5B,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/args.js b/grafast/grafast/dist/args.js new file mode 100644 index 0000000000..18581c094c --- /dev/null +++ b/grafast/grafast/dist/args.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hookArgs = hookArgs; +const interfaces_js_1 = require("./interfaces.js"); +const middleware_js_1 = require("./middleware.js"); +const utils_js_1 = require("./utils.js"); +const EMPTY_OBJECT = Object.freeze(Object.create(null)); +const $$writeTest = Symbol("grafastWriteTest"); +/** + * Applies Graphile Config hooks to your GraphQL request, e.g. to + * populate context or similar. + * + * @experimental + */ +function hookArgs(rawArgs, legacyResolvedPreset, legacyCtx) { + if (legacyResolvedPreset !== undefined) { + rawArgs.resolvedPreset = legacyResolvedPreset; + } + if (legacyCtx !== undefined) { + rawArgs.requestContext = rawArgs.requestContext ?? legacyCtx; + } + const { middleware: rawMiddleware, resolvedPreset, contextValue: rawContextValue, } = rawArgs; + try { + rawContextValue[$$writeTest] = true; + } + catch (e) { + // Make context mutable + rawArgs.contextValue = Object.assign(Object.create(null), rawContextValue); + } + const middleware = rawMiddleware === undefined && resolvedPreset != null + ? (0, middleware_js_1.getGrafastMiddleware)(resolvedPreset) + : (rawMiddleware ?? null); + if (rawMiddleware === undefined) { + rawArgs.middleware = middleware; + } + const args = rawArgs; + // Assert that args haven't already been hooked + if (args[interfaces_js_1.$$hooked]) { + throw new Error("Must not call hookArgs twice!"); + } + args[interfaces_js_1.$$hooked] = true; + if (middleware != null) { + return middleware.run("prepareArgs", { args }, finalizeWithEvent); + } + else { + return finalize(args); + } +} +function finalize(args) { + const userContext = args.resolvedPreset?.grafast?.context; + const contextValue = args.contextValue; + if (typeof userContext === "function") { + const result = userContext(args.requestContext ?? EMPTY_OBJECT, args); + if ((0, utils_js_1.isPromiseLike)(result)) { + // Deliberately shadowed 'result' + return result.then((result) => { + Object.assign(contextValue, result); + return args; + }); + } + else { + Object.assign(contextValue, result); + return args; + } + } + else if (typeof userContext === "object" && userContext !== null) { + Object.assign(contextValue, userContext); + return args; + } + else { + return args; + } +} +function finalizeWithEvent(event) { + return finalize(event.args); +} +//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/args.js.map b/grafast/grafast/dist/args.js.map new file mode 100644 index 0000000000..41612576d0 --- /dev/null +++ b/grafast/grafast/dist/args.js.map @@ -0,0 +1 @@ +{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":";;AA6BA,4BAyCC;AA/DD,mDAA2C;AAC3C,mDAAuD;AACvD,yCAA2C;AAC3C,MAAM,YAAY,GAA0B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAE/E,MAAM,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAW/C;;;;;GAKG;AACH,SAAgB,QAAQ,CACtB,OAA6B,EAC7B,oBAAoD,EACpD,SAA2C;IAE3C,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,CAAC,cAAc,GAAG,oBAAoB,CAAC;IAChD,CAAC;IACD,IAAI,SAAS,KAAK,S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O,EAAE,OAAO,CAAC;IAC1D,MAAM,YAAY,GAAG,IAAI,CAAC,YAAwC,CAAC;IACnE,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,cAAc,IAAI,YAAY,EAAE,IAAI,CAAC,CAAC;QACtE,IAAI,IAAA,wBAAa,EAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,iCAAiC;YACjC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;gBAC5B,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;SAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACnE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAuB;IAChD,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/assert.d.ts b/grafast/grafast/dist/assert.d.ts new file mode 100644 index 0000000000..c0425ce5b9 --- /dev/null +++ b/grafast/grafast/dist/assert.d.ts @@ -0,0 +1,5 @@ +/** Equivalent to `assert.ok(...)` */ +export declare function ok(val: any, message: string): asserts val; +/** Equivalent to `assert.strictEqual(...)` */ +export declare function strictEqual(actual: any, expected: T, message: string): asserts actual is T; +//# sourceMappingURL=assert.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/assert.d.ts.map b/grafast/grafast/dist/assert.d.ts.map new file mode 100644 index 0000000000..b74c470cfa --- /dev/null +++ b/grafast/grafast/dist/assert.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":"AAOA,qCAAqC;AACrC,wBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAIzD;AAED,8CAA8C;AAC9C,wBAAgB,WAAW,CAAC,CAAC,EAC3B,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,IAAI,CAAC,CAIrB"} \ No newline at end of file diff --git a/grafast/grafast/dist/assert.js b/grafast/grafast/dist/assert.js new file mode 100644 index 0000000000..8da82ed1fb --- /dev/null +++ b/grafast/grafast/dist/assert.js @@ -0,0 +1,23 @@ +"use strict"; +/* + * Due to the following Jest issue, GraphQL's `instanceof Error` test + * cannot pass for Node assertions. So we have to define our own. + * + * https://github.com/facebook/jest/issues/2549 + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ok = ok; +exports.strictEqual = strictEqual; +/** Equivalent to `assert.ok(...)` */ +function ok(val, message) { + if (!val) { + throw new Error(message); + } +} +/** Equivalent to `assert.strictEqual(...)` */ +function strictEqual(actual, expected, message) { + if (actual !== expected) { + throw new Error(message + ` (${actual} !== ${expected})`); + } +} +//# sourceMappingURL=assert.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/assert.js.map b/grafast/grafast/dist/assert.js.map new file mode 100644 index 0000000000..511920426d --- /dev/null +++ b/grafast/grafast/dist/assert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"assert.js","sourceRoot":"","sources":["../src/assert.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAGH,gBAIC;AAGD,kCAQC;AAhBD,qCAAqC;AACrC,SAAgB,EAAE,CAAC,GAAQ,EAAE,OAAe;IAC1C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC;AAED,8CAA8C;AAC9C,SAAgB,WAAW,CACzB,MAAW,EACX,QAAW,EACX,OAAe;IAEf,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,OAAO,GAAG,KAAK,MAAM,QAAQ,QAAQ,GAAG,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/bucket.d.ts b/grafast/grafast/dist/bucket.d.ts new file mode 100644 index 0000000000..d207480cc4 --- /dev/null +++ b/grafast/grafast/dist/bucket.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=bucket.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/bucket.d.ts.map b/grafast/grafast/dist/bucket.d.ts.map new file mode 100644 index 0000000000..958bfc3f9a --- /dev/null +++ b/grafast/grafast/dist/bucket.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bucket.d.ts","sourceRoot":"","sources":["../src/bucket.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/grafast/dist/bucket.js b/grafast/grafast/dist/bucket.js new file mode 100644 index 0000000000..dd81ee6257 --- /dev/null +++ b/grafast/grafast/dist/bucket.js @@ -0,0 +1,4 @@ +"use strict"; +// import type { GraphQLScalarType } from "graphql"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=bucket.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/bucket.js.map b/grafast/grafast/dist/bucket.js.map new file mode 100644 index 0000000000..cefa2700be --- /dev/null +++ b/grafast/grafast/dist/bucket.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bucket.js","sourceRoot":"","sources":["../src/bucket.ts"],"names":[],"mappings":";AAAA,oDAAoD"} \ No newline at end of file diff --git a/grafast/grafast/dist/config.d.ts b/grafast/grafast/dist/config.d.ts new file mode 100644 index 0000000000..94d3c20bca --- /dev/null +++ b/grafast/grafast/dist/config.d.ts @@ -0,0 +1,2 @@ +export declare const NULL_PRESET: GraphileConfig.ResolvedPreset; +//# sourceMappingURL=config.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/config.d.ts.map b/grafast/grafast/dist/config.d.ts.map new file mode 100644 index 0000000000..f7e163b493 --- /dev/null +++ b/grafast/grafast/dist/config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,cAExC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/config.js b/grafast/grafast/dist/config.js new file mode 100644 index 0000000000..e9f223ee63 --- /dev/null +++ b/grafast/grafast/dist/config.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NULL_PRESET = void 0; +exports.NULL_PRESET = Object.freeze(Object.create(null)); +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/config.js.map b/grafast/grafast/dist/config.js.map new file mode 100644 index 0000000000..d417104fe8 --- /dev/null +++ b/grafast/grafast/dist/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAkC,MAAM,CAAC,MAAM,CACrE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CACpB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/constraints.d.ts b/grafast/grafast/dist/constraints.d.ts new file mode 100644 index 0000000000..bf7b2d69c9 --- /dev/null +++ b/grafast/grafast/dist/constraints.d.ts @@ -0,0 +1,75 @@ +/** + * Asserts that a value strictly matches. + */ +interface ValueConstraint { + type: "value"; + path: (string | number)[]; + value: unknown; +} +/** + * Asserts that `(value === expectedValue)` is always equal to `pass`. + */ +interface EqualityConstraint { + type: "equal"; + path: (string | number)[]; + expectedValue: unknown; + pass: boolean; +} +/** + * Asserts that the property at the given path exists. + * + * Let `tail` be the last entry in `path`, and `rest` be the rest of `path`. + * The value at path `rest` must be an object, and that object must have an + * attribute `tail` which is not `undefined`. + */ +interface ExistsConstraint { + type: "exists"; + path: (string | number)[]; + exists: boolean; +} +/** + * If `keys` is null: asserts that there is no value at the given + * path. + * + * Otherwise: asserts that the value at the given path has the exact same keys. + */ +interface KeysConstraint { + type: "keys"; + path: (string | number)[]; + /** + * If this is null it implies that the object did not exist. + */ + keys: ReadonlyArray | null; +} +/** + * If `expectedLength` is null: asserts that there is no value at the given + * path. + * + * Otherwise: asserts that the value at the given path is an array containing + * `expectedLength` entries. + */ +interface LengthConstraint { + type: "length"; + path: (string | number)[]; + /** + * If this is null it implies that the array did not exist. + */ + expectedLength: number | null; +} +/** + * Checks if the object at the given path matches the `isEmpty` property + * (implying no keys). Objects are empty if and only if they exist and have no + * keys. + */ +interface IsEmptyConstraint { + type: "isEmpty"; + path: (string | number)[]; + isEmpty: boolean; +} +export type Constraint = ValueConstraint | EqualityConstraint | ExistsConstraint | LengthConstraint | IsEmptyConstraint | KeysConstraint; +/** + * Implements the `MatchesConstraints` algorithm. + */ +export declare function matchesConstraints(constraints: Constraint[], object: unknown): boolean; +export {}; +//# sourceMappingURL=constraints.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/constraints.d.ts.map b/grafast/grafast/dist/constraints.d.ts.map new file mode 100644 index 0000000000..1ea0125bda --- /dev/null +++ b/grafast/grafast/dist/constraints.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../src/constraints.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,UAAU,eAAe;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;GAMG;AACH,UAAU,gBAAgB;IACxB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;GAMG;AACH,UAAU,gBAAgB;IACxB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;;;GAIG;AACH,UAAU,iBAAiB;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,UAAU,GAClB,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,CAAC;AAuGnB;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,UAAU,EAAE,EACzB,MAAM,EAAE,OAAO,GACd,OAAO,CAST"} \ No newline at end of file diff --git a/grafast/grafast/dist/constraints.js b/grafast/grafast/dist/constraints.js new file mode 100644 index 0000000000..ce5b516f62 --- /dev/null +++ b/grafast/grafast/dist/constraints.js @@ -0,0 +1,110 @@ +"use strict"; +// PERF: optimise constraint matching, e.g. by collapsing redundant constraints +// and then compiling (JIT-style) remaining constraints into a function using +// tamedevil +Object.defineProperty(exports, "__esModule", { value: true }); +exports.matchesConstraints = matchesConstraints; +function valueAtPath(object, path) { + let value = object; + for (let i = 0, l = path.length; i < l; i++) { + const key = path[i]; + const expectArray = typeof key === "number"; + const isArray = Array.isArray(value); + if (expectArray !== isArray) { + return undefined; + } + else { + if (value == null) { + return undefined; + } + value = value[key]; + if (typeof value === "undefined") { + return undefined; + } + } + } + return value; +} +/** + * Implements the `MatchesConstraint` algorithm. + */ +function matchesConstraint(constraint, object) { + const value = valueAtPath(object, constraint.path); + switch (constraint.type) { + case "length": { + const actualLength = Array.isArray(value) ? value.length : null; + return actualLength === constraint.expectedLength; + } + case "exists": { + return (value !== undefined) === constraint.exists; + } + case "equal": { + return (value === constraint.expectedValue) === constraint.pass; + } + case "value": { + return value === constraint.value; + } + case "isEmpty": { + const isEmpty = typeof value === "object" && + value !== null && + Object.keys(value).length === 0; + return isEmpty === constraint.isEmpty; + } + case "keys": { + const { keys: expectedKeys } = constraint; + if (expectedKeys === null) { + return value == null || typeof value !== "object"; + } + else if (value == null || typeof value !== "object") { + return false; + } + else { + // keys are always in order of the gql type; see coerceInputValue and __InputObjectStep ctor + const valueKeys = Object.keys(value); + const valueKeyCount = valueKeys.length; + const expectedKeyCount = expectedKeys.length; + // Optimization: early bail + if (valueKeyCount < expectedKeyCount) { + return false; + } + /** + * This is `i` but adjusted so that `undefined` doesn't increment it. + * Should match index in `expectedKeys`. + */ + let definedRawKeyCount = 0; + for (let i = 0; i < valueKeyCount; i++) { + const valueKey = valueKeys[i]; + if (value[valueKey] !== undefined) { + if (valueKey !== expectedKeys[definedRawKeyCount]) { + return false; + } + definedRawKeyCount++; + } + } + // Make sure there aren't any additional expected keys + if (definedRawKeyCount !== expectedKeyCount) { + return false; + } + return true; + } + } + default: { + const never = constraint; + throw new Error(`Unsupported constraint type '${never.type}'`); + } + } +} +/** + * Implements the `MatchesConstraints` algorithm. + */ +function matchesConstraints(constraints, object) { + // In my testing, verbose loops are still about 20% faster than for...of + for (let i = 0, l = constraints.length; i < l; i++) { + const constraint = constraints[i]; + if (!matchesConstraint(constraint, object)) { + return false; + } + } + return true; +} +//# sourceMappingURL=constraints.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/constraints.js.map b/grafast/grafast/dist/constraints.js.map new file mode 100644 index 0000000000..ed058ad0aa --- /dev/null +++ b/grafast/grafast/dist/constraints.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constraints.js","sourceRoot":"","sources":["../src/constraints.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,YAAY;;AA4LZ,gDAYC;AApHD,SAAS,WAAW,CAClB,MAAe,EACf,IAAyB;IAEzB,IAAI,KAAK,GAAG,MAAM,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC;QAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,WAAW,KAAK,OAAO,EAAE,CAAC;YAC5B,OAAO,SAAS,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;gBAClB,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,KAAK,GAAI,KAAa,CAAC,GAAG,CAAC,CAAC;YAC5B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;gBACjC,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;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AAG,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACnD,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/deferred.d.ts b/grafast/grafast/dist/deferred.d.ts new file mode 100644 index 0000000000..795aafed51 --- /dev/null +++ b/grafast/grafast/dist/deferred.d.ts @@ -0,0 +1,13 @@ +/** + * A promise that can be `.resolve()`-ed or `.reject()`-ed at a later time. + */ +export interface Deferred extends PromiseLike { + resolve: (input: T | PromiseLike) => void; + reject: (error: Error) => void; +} +/** + * Returns a promise that can be `.resolve()`-ed or `.reject()`-ed at a later + * time. + */ +export declare function defer(): Deferred; +//# sourceMappingURL=deferred.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/deferred.d.ts.map b/grafast/grafast/dist/deferred.d.ts.map new file mode 100644 index 0000000000..79458dfaf5 --- /dev/null +++ b/grafast/grafast/dist/deferred.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deferred.d.ts","sourceRoot":"","sources":["../src/deferred.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACjD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAChC;AAID;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAgB7C"} \ No newline at end of file diff --git a/grafast/grafast/dist/deferred.js b/grafast/grafast/dist/deferred.js new file mode 100644 index 0000000000..40292dd7c2 --- /dev/null +++ b/grafast/grafast/dist/deferred.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defer = defer; +function NOOP() { } +/** + * Returns a promise that can be `.resolve()`-ed or `.reject()`-ed at a later + * time. + */ +function defer() { + let resolve; + let reject; + const promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + promise.resolve = resolve; + promise.reject = reject; + // PERF: this is to avoid unhandledPromiseRejection errors; generally + // deferred errors are handled at a later time (or can be safely ignored if + // another error wins). Maybe there's a better way? + promise.then(null, NOOP); + return promise; +} +//# sourceMappingURL=deferred.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/deferred.js.map b/grafast/grafast/dist/deferred.js.map new file mode 100644 index 0000000000..1e40bdda72 --- /dev/null +++ b/grafast/grafast/dist/deferred.js.map @@ -0,0 +1 @@ +{"version":3,"file":"deferred.js","sourceRoot":"","sources":["../src/deferred.ts"],"names":[],"mappings":";;AAcA,sBAgBC;AAtBD,SAAS,IAAI,KAAI,CAAC;AAElB;;;GAGG;AACH,SAAgB,KAAK;IACnB,IAAI,OAA6C,CAAC;IAClD,IAAI,MAA+B,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,QAAQ,EAAE,OAAO,EAAQ,EAAE;QACzD,OAAO,GAAG,QAAQ,CAAC;QACnB,MAAM,GAAG,OAAO,CAAC;IACnB,CAAC,CAA2B,CAAC;IAC7B,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IAC1B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;IAExB,qEAAqE;IACrE,2EAA2E;IAC3E,mDAAmD;IACnD,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAEzB,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/dev.d.ts b/grafast/grafast/dist/dev.d.ts new file mode 100644 index 0000000000..bab0b16dc3 --- /dev/null +++ b/grafast/grafast/dist/dev.d.ts @@ -0,0 +1,3 @@ +export declare const isTest: boolean; +export declare function noop(): void; +//# sourceMappingURL=dev.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/dev.d.ts.map b/grafast/grafast/dist/dev.d.ts.map new file mode 100644 index 0000000000..cb0c2aadfc --- /dev/null +++ b/grafast/grafast/dist/dev.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,SAAkB,CAAC;AACtC,wBAAgB,IAAI,IAAI,IAAI,CAAG"} \ No newline at end of file diff --git a/grafast/grafast/dist/dev.js b/grafast/grafast/dist/dev.js new file mode 100644 index 0000000000..b504b01215 --- /dev/null +++ b/grafast/grafast/dist/dev.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isTest = exports.isDev = void 0; +exports.noop = noop; +/** + * @internal + */ +const graphileEnv = typeof process !== "undefined" ? process.env.GRAPHILE_ENV : undefined; +const nodeEnv = typeof process !== "undefined" ? process.env.NODE_ENV : undefined; +const mode = graphileEnv !== undefined ? graphileEnv : nodeEnv; +/** + * @internal + */ +exports.isDev = mode === "development" || mode === "test"; +exports.isTest = mode === "test"; +function noop() { } +if (typeof process !== "undefined" && + typeof graphileEnv === "undefined" && + typeof nodeEnv === "undefined") { + console.warn(`The GRAPHILE_ENV environmental variable is not set; Grafast will run in production mode. In your development environments, it's recommended that you set \`GRAPHILE_ENV=development\` to opt in to additional checks that will provide guidance and help you to catch issues in your code earlier, and other changes such as formatting to improve your development experience.`); +} +else if (exports.isDev && !exports.isTest && typeof graphileEnv === "undefined") { + console.warn(`Grafast is running in development mode due to \`NODE_ENV=${nodeEnv}\`; this is recommended for development environments (and strongly discouraged in production), but will impact on performance - in particular, planning will be significantly more expensive. To remove this warning, make this explicit with \`GRAPHILE_ENV=development\` envvar.`); +} +//# sourceMappingURL=dev.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/dev.js.map b/grafast/grafast/dist/dev.js.map new file mode 100644 index 0000000000..f84125f744 --- /dev/null +++ b/grafast/grafast/dist/dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dev.js","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":";;;AAaA,oBAA+B;AAb/B;;GAEG;AACH,MAAM,WAAW,GACf,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;AACxE,MAAM,OAAO,GACX,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AACpE,MAAM,IAAI,GAAG,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC;AAC/D;;GAEG;AACU,QAAA,KAAK,GAAG,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,MAAM,CAAC;AAClD,QAAA,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACtC,SAAgB,IAAI,KAAU,CAAC;AAE/B,IACE,OAAO,OAAO,KAAK,WAAW;IAC9B,OAAO,WAAW,KAAK,WAAW;IAClC,OAAO,OAAO,KAAK,WAAW,EAC9B,CAAC;IACD,OAAO,CAAC,IAAI,CACV,iXAAiX,CAClX,CAAC;AACJ,CAAC;KAAM,IAAI,aAAK,IAAI,CAAC,cAAM,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;IAClE,OAAO,CAAC,IAAI,CACV,4DAA4D,OAAO,oRAAoR,CACxV,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/LayerPlan.d.ts b/grafast/grafast/dist/engine/LayerPlan.d.ts new file mode 100644 index 0000000000..d17ece1d60 --- /dev/null +++ b/grafast/grafast/dist/engine/LayerPlan.d.ts @@ -0,0 +1,125 @@ +import type { Bucket } from "../bucket.js"; +import type { Step } from "../step"; +import type { OperationPlan } from "./OperationPlan"; +/** Non-branching, non-deferred */ +export interface LayerPlanReasonRoot { + type: "root"; +} +/** Non-branching, non-deferred */ +export interface LayerPlanReasonNullableField { + type: "nullableBoundary"; + /** + * Can be used such that the same LayerPlan can be used for two selection + * sets for the same parent plan. In this case an additional output plan + * would be added to the LayerPlan. + * + * Also needed for execution (see `executeBucket`). + */ + parentStep: Step; +} +export interface LayerPlanReasonListItemStream { + initialCountStepId?: number; + ifStepId?: number; + labelStepId?: number; +} +/** Non-branching, non-deferred */ +export interface LayerPlanReasonListItem { + type: "listItem"; + /** + * Can be used such that the same LayerPlan can be used for two lists for + * the same parent plan. In this case an additional output plan would be + * added to the LayerPlan. + * + * Also needed for execution (see `executeBucket`). + */ + parentStep: Step; + /** + * If this listItem is to be streamed, the configuration for that streaming. + */ + stream?: LayerPlanReasonListItemStream; +} +/** Non-branching, deferred */ +export interface LayerPlanReasonSubscription { + type: "subscription"; +} +/** Non-branching, deferred */ +export interface LayerPlanReasonMutationField { + type: "mutationField"; + mutationIndex: number; +} +/** Non-branching, deferred */ +export interface LayerPlanReasonDefer { + type: "defer"; + label?: string; +} +/** Branching, non-deferred */ +export interface LayerPlanReasonPolymorphic { + type: "polymorphic"; + typeNames: string[]; + /** + * Needed for execution (see `executeBucket`). + */ + parentStep: Step; + polymorphicPaths: Set; +} +/** Non-branching, non-deferred */ +export interface LayerPlanReasonSubroutine { + type: "subroutine"; + parentStep: Step; +} +export declare function isBranchingLayerPlan(layerPlan: LayerPlan): boolean; +export declare function isDeferredLayerPlan(layerPlan: LayerPlan): boolean; +export declare function isPolymorphicLayerPlan(layerPlan: LayerPlan): boolean; +export type LayerPlanReason = LayerPlanReasonRoot | LayerPlanReasonNullableField | LayerPlanReasonListItem | LayerPlanReasonSubscription | LayerPlanReasonMutationField | LayerPlanReasonDefer | LayerPlanReasonPolymorphic | LayerPlanReasonSubroutine; +export type HasParent = A extends any ? A extends { + parentStep: Step; +} ? A : never : never; +export type LayerPlanReasonsWithParentStep = HasParent; +/** + * A LayerPlan represents (via "reason") either the root (root), when something + * happens at a later time (mutationField, defer), when plurality changes + * (list, stream, subscription, polymorphic), or when a subprocess needs to be + * computed (subroutine). + * + * Layer plans belong to an operation plan. + * + * Every layer plan (except for the root layer plan) has exactly one parent + * layer plan. + * + * Every layer plan is caused by a parent step. + * + * The LayerPlan of a step influences: + * + * 1. how steps are deduplicated + * 2. the order in which the steps are executed + * 3. where the result of executing the step is stored + * 4. when the step execution cache is allowed to be GC'd + * + * NOTE: `__ListTransformStep`'s effectively have a temporary bucket inside + * them (built on the `__Item`) that's thrown away once the transform is + * complete. + * + */ +export declare class LayerPlan { + readonly operationPlan: OperationPlan; + parentLayerPlan: LayerPlan | null; + readonly reason: TReason; + id: number; + /** How "deep" this layer plan is (how many ancestors it has). The root layer plan has a depth of 0. */ + depth: number; + /** The depth at which a "defer boundary" occurs (OperationPlan.getPeers cannot pass a defer boundary), or 0. */ + deferBoundaryDepth: number; + /** + * An optimization for OperationPlan.getPeers; this tracks the steps in this + * layer plan, grouped by their step class. + */ + stepsByConstructor: Map>; + constructor(operationPlan: OperationPlan, parentLayerPlan: LayerPlan | null, reason: TReason); + toString(): string; + print(depth?: number): string; + _hasSetRootStep: boolean; + setRootStep($root: Step): void; + finalize(): void; + newBucket(parentBucket: Bucket): Bucket | null; +} +//# sourceMappingURL=LayerPlan.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/LayerPlan.d.ts.map b/grafast/grafast/dist/engine/LayerPlan.d.ts.map new file mode 100644 index 0000000000..3c50853948 --- /dev/null +++ b/grafast/grafast/dist/engine/LayerPlan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerPlan.d.ts","sourceRoot":"","sources":["../../src/engine/LayerPlan.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAA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;IAuBvB,QAAQ,IAAI,IAAI;IAahB,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAwWtD"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/LayerPlan.js b/grafast/grafast/dist/engine/LayerPlan.js new file mode 100644 index 0000000000..0c21d438d6 --- /dev/null +++ b/grafast/grafast/dist/engine/LayerPlan.js @@ -0,0 +1,654 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LayerPlan = void 0; +exports.isBranchingLayerPlan = isBranchingLayerPlan; +exports.isDeferredLayerPlan = isDeferredLayerPlan; +exports.isPolymorphicLayerPlan = isPolymorphicLayerPlan; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const tamedevil_1 = tslib_1.__importDefault(require("tamedevil")); +const assert = tslib_1.__importStar(require("../assert.js")); +const inspect_js_1 = require("../inspect.js"); +const interfaces_js_1 = require("../interfaces.js"); +const polymorphic_js_1 = require("../polymorphic.js"); +const executeBucket_js_1 = require("./executeBucket.js"); +function isBranchingLayerPlan(layerPlan) { + return layerPlan.reason.type === "polymorphic"; +} +function isDeferredLayerPlan(layerPlan) { + const t = layerPlan.reason.type; + return ((t === "listItem" && layerPlan.reason.stream != null) || + t === "subscription" || + t === "mutationField" || + t === "defer"); +} +function isPolymorphicLayerPlan(layerPlan) { + const t = layerPlan.reason.type; + return t === "polymorphic"; +} +/** + * A LayerPlan represents (via "reason") either the root (root), when something + * happens at a later time (mutationField, defer), when plurality changes + * (list, stream, subscription, polymorphic), or when a subprocess needs to be + * computed (subroutine). + * + * Layer plans belong to an operation plan. + * + * Every layer plan (except for the root layer plan) has exactly one parent + * layer plan. + * + * Every layer plan is caused by a parent step. + * + * The LayerPlan of a step influences: + * + * 1. how steps are deduplicated + * 2. the order in which the steps are executed + * 3. where the result of executing the step is stored + * 4. when the step execution cache is allowed to be GC'd + * + * NOTE: `__ListTransformStep`'s effectively have a temporary bucket inside + * them (built on the `__Item`) that's thrown away once the transform is + * complete. + * + */ +class LayerPlan { + constructor(operationPlan, parentLayerPlan, reason) { + this.operationPlan = operationPlan; + this.parentLayerPlan = parentLayerPlan; + this.reason = reason; + /** + * Every layer plan has a "root step" that shapes the value the layer + * returns. Note that this step may be dependent on other steps included in + * the LayerPlan, or could be provided externally. + * + * The root step is different for different layer step reasons: + * + * - root: the `operationPlan.rootValue` + * - listItem: the `__ItemStep` + * - subscription: also the `__ItemStep` + * - mutationField: the result plan of the mutation field + * - defer: the parent layer's rootStep (defer always results in an object, unless an error occurs) + * - polymorphic: the plan for the particular type + * - subroutine: the result (returned) plan of the subroutine + * + * @internal + */ + this.rootStep = null; + /** + * Which steps the results for which are available in a parent bucket need to + * be "copied across" to this bucket because steps in this bucket still + * reference them? + * + * @internal + */ + this.copyStepIds = []; + /** @internal */ + this.children = []; + /** @internal */ + this.steps = []; + /** @internal */ + this.pendingSteps = []; + /** + * This goes along with `parentStep` in the reason, except it applies to all + * layer plan types and we figure it out automatically from the parent layer + * plan. If this step has an error at a given index, then it should be + * treated as if the parentStep had an error at that same index. + * + * @internal + */ + this.parentSideEffectStep = null; + /** + * This tracks the latest seen side effect at the current point in planning + * (such that created steps take this to be their implicitSideEffectStep). + * This isn't used once planning is complete. + * + * @internal + */ + this.latestSideEffectStep = null; + /** + * Describes the order in which the steps within this LayerPlan are executed. + * + * Special attention must be paid to steps that have side effects. + * + * @internal + */ + this.phases = []; + this._hasSetRootStep = false; + // This layer plan is dependent on the latest side effect. Note that when + // we set a `rootStep` later, if the root step is dependent on this step + // (directly or indirectly) we will clear this property. + this.parentSideEffectStep = parentLayerPlan?.latestSideEffectStep ?? null; + // There has yet to be any side effects created in this layer. + this.latestSideEffectStep = null; + this.stepsByConstructor = new Map(); + if (parentLayerPlan !== null) { + this.depth = parentLayerPlan.depth + 1; + this.ancestry = [...parentLayerPlan.ancestry, this]; + if (isDeferredLayerPlan(this)) { + this.deferBoundaryDepth = this.depth; + } + else { + this.deferBoundaryDepth = parentLayerPlan.deferBoundaryDepth; + } + } + else { + this.depth = 0; + this.ancestry = [this]; + this.deferBoundaryDepth = 0; + } + this.id = operationPlan.addLayerPlan(this); + if (!parentLayerPlan) { + assert.strictEqual(this.id, 0, "All but the first LayerPlan must have a parent"); + } + else { + assert.ok(reason.type != "root", "Non-root LayerPlan must have a parentStep"); + parentLayerPlan.children.push(this); + } + } + toString() { + let chain = ""; + // eslint-disable-next-line @typescript-eslint/no-this-alias + let current = this; + while ((current = current.parentLayerPlan)) { + chain = chain + `∈${current.id}`; + } + const reasonExtra = this.reason.type === "polymorphic" + ? `{${this.reason.typeNames.join(",")}}` + : ""; + const deps = this.copyStepIds.length > 0 ? `/${this.copyStepIds}` : ""; + return `LayerPlan<${this.id}${chain}${this.parentSideEffectStep ? `^${this.parentSideEffectStep.id}` : ""}?${this.reason.type}${reasonExtra}!${this.rootStep?.id ?? "x"}${deps}>`; + } + print(depth = 0) { + const output = [`${" ".repeat(depth * 2)}${this}`]; + for (const child of this.children) { + output.push(child.print(depth + 1)); + } + return output.join("\n"); + } + setRootStep($root) { + if (this._hasSetRootStep) { + throw new Error(`Set root step on ${this} more than once`); + } + this._hasSetRootStep = true; + this.operationPlan.stepTracker.setLayerPlanRootStep(this, $root); + // NOTE: we may clear `this.parentSideEffectStep` based on the `$root` step + // having an explicit dependency on `this.parentSideEffectStep`; but that + // will be done as part of `OperationPlan::finalizeLayerPlans()` because + // steps aren't assigned `implicitSideEffectStep`s until that point. + } + /** @internal Use plan.getStep(id) instead. */ + getStep(id, requestingStep) { + return this.operationPlan.getStep(id, requestingStep); + } + /** @internal */ + _addStep(step) { + return this.operationPlan._addStep(step); + } + finalize() { + if ( + // this.reason.type === "nullableBoundary" || + this.reason.type === "listItem") { + const u = this.copyStepIds.length; + const signature = `${this.reason.type[0]}_${u}`; + withNewBucketFactory(signature, u, this.reason.type, (fn) => { + this.newBucket = fn(this.copyStepIds); + }); + } + } + newBucket(parentBucket) { + const { copyStepIds } = this; + const store = new Map(); + const polymorphicPathList = this.reason.type === "mutationField" + ? parentBucket.polymorphicPathList + : []; + const iterators = this.reason.type === "mutationField" ? parentBucket.iterators : []; + const map = new Map(); + const $parentSideEffect = this.parentSideEffectStep; + let parentSideEffectValue; + if ($parentSideEffect) { + parentSideEffectValue = parentBucket.store.get($parentSideEffect.id); + } + else { + parentSideEffectValue = null; + } + let size = 0; + switch (this.reason.type) { + case "nullableBoundary": { + if (this.rootStep == null) { + throw new Error("GrafastInternalError: nullableStepStore layer plan has no rootStepId"); + } + const itemStepId = this.rootStep.id; + // PERF: if parent bucket has no nulls/errors in `itemStepId` + // then we can just copy everything wholesale rather than building + // new arrays and looping. + const hasNoNullsOrErrors = false; + if (this.rootStep._isUnary) { + const fieldValue = parentBucket.store.get(itemStepId); + const forbiddenFlags = fieldValue._entryFlags & interfaces_js_1.FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS; + if (forbiddenFlags) { + size = 0; + } + else { + store.set(itemStepId, fieldValue); + for (const stepId of copyStepIds) { + store.set(stepId, parentBucket.store.get(stepId)); + } + const parentBucketSize = parentBucket.size; + for (let originalIndex = 0; originalIndex < parentBucketSize; originalIndex++) { + if (parentSideEffectValue === null || + !(parentSideEffectValue._flagsAt(originalIndex) & interfaces_js_1.FLAG_ERROR)) { + const newIndex = size++; + map.set(originalIndex, newIndex); + polymorphicPathList[newIndex] = + parentBucket.polymorphicPathList[originalIndex]; + iterators[newIndex] = parentBucket.iterators[originalIndex]; + } + } + } + } + else if (hasNoNullsOrErrors) { + const nullableStepStore = parentBucket.store.get(itemStepId); + if (!nullableStepStore) { + throw new Error(`GrafastInternalError<017dc8bf-1db1-4983-a41e-e69c6652e4c7>: could not find entry '${itemStepId}' (${parentBucket.layerPlan.operationPlan.dangerouslyGetStep(itemStepId)}) in store for ${parentBucket.layerPlan}`); + } + store.set(itemStepId, nullableStepStore); + for (const stepId of copyStepIds) { + store.set(stepId, parentBucket.store.get(stepId)); + } + for (let originalIndex = 0; originalIndex < parentBucket.size; originalIndex++) { + const newIndex = size++; + map.set(originalIndex, newIndex); + polymorphicPathList[newIndex] = + parentBucket.polymorphicPathList[originalIndex]; + iterators[newIndex] = parentBucket.iterators[originalIndex]; + } + } + else { + const itemStepIdList = []; + store.set(itemStepId, (0, executeBucket_js_1.batchExecutionValue)(itemStepIdList)); + for (const stepId of copyStepIds) { + const ev = parentBucket.store.get(stepId); + if (ev.isBatch) { + // Prepare store with an empty list for each copyPlanId + store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + else { + store.set(stepId, ev); + } + } + const nullableStepStore = parentBucket.store.get(itemStepId); + if (!nullableStepStore) { + throw new Error(`GrafastInternalError<017dc8bf-1db1-4983-a41e-e69c6652e4c7>: could not find entry '${itemStepId}' (${parentBucket.layerPlan.operationPlan.dangerouslyGetStep(itemStepId)}) in store for ${parentBucket.layerPlan}`); + } + // We'll typically be creating fewer nullableBoundary bucket entries + // than we have parent bucket entries (because we exclude nulls), so + // we must "multiply up" (down) the store entries. + for (let originalIndex = 0; originalIndex < parentBucket.size; originalIndex++) { + if ((parentSideEffectValue === null || + !(parentSideEffectValue._flagsAt(originalIndex) & interfaces_js_1.FLAG_ERROR)) && + !(nullableStepStore._flagsAt(originalIndex) & interfaces_js_1.FLAG_NULL)) { + const newIndex = size++; + map.set(originalIndex, newIndex); + const fieldValue = nullableStepStore.at(originalIndex); + itemStepIdList[newIndex] = fieldValue; + polymorphicPathList[newIndex] = + parentBucket.polymorphicPathList[originalIndex]; + iterators[newIndex] = parentBucket.iterators[originalIndex]; + for (const stepId of copyStepIds) { + const ev = store.get(stepId); + if (ev.isBatch) { + const orig = parentBucket.store.get(stepId); + ev._copyResult(newIndex, orig, originalIndex); + } + } + } + } + } + break; + } + case "listItem": { + const listStepId = this.reason.parentStep.id; + const listStepStore = parentBucket.store.get(listStepId); + if (!listStepStore) { + throw new Error(`GrafastInternalError<314865b0-f7e8-4e81-b966-56e5a0de562e>: could not find entry '${listStepId}' (${parentBucket.layerPlan.operationPlan.dangerouslyGetStep(listStepId)}) in store for layerPlan ${parentBucket.layerPlan}`); + } + if (this.rootStep == null) { + throw new Error("GrafastInternalError: listItem layer plan has no rootStepId"); + } + const itemStepId = this.rootStep.id; + // Item steps are **NOT** unary + if (this.rootStep._isUnary) { + throw new Error("listItem layer plan can't have a unary root step!"); + } + const ev = (0, executeBucket_js_1.batchExecutionValue)([]); + store.set(itemStepId, ev); + for (const stepId of copyStepIds) { + // Deliberate shadowing + const ev = parentBucket.store.get(stepId); + if (ev.isBatch) { + // Prepare store with an empty list for each copyPlanId + store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + else { + store.set(stepId, ev); + } + } + // We'll typically be creating more listItem bucket entries than we + // have parent buckets, so we must "multiply up" the store entries. + for (let originalIndex = 0; originalIndex < parentBucket.size; originalIndex++) { + const list = listStepStore.at(originalIndex); + if ((parentSideEffectValue === null || + !(parentSideEffectValue._flagsAt(originalIndex) & interfaces_js_1.FLAG_ERROR)) && + Array.isArray(list)) { + const newIndexes = []; + map.set(originalIndex, newIndexes); + for (let j = 0, l = list.length; j < l; j++) { + const newIndex = size++; + newIndexes.push(newIndex); + ev.entries[newIndex] = list[j]; + // TODO: are these the right flags? + ev._flags[newIndex] = list[j] == null ? interfaces_js_1.FLAG_NULL : interfaces_js_1.NO_FLAGS; + polymorphicPathList[newIndex] = + parentBucket.polymorphicPathList[originalIndex]; + iterators[newIndex] = parentBucket.iterators[originalIndex]; + for (const stepId of copyStepIds) { + const ev = store.get(stepId); + if (ev.isBatch) { + const orig = parentBucket.store.get(stepId); + ev._copyResult(newIndex, orig, originalIndex); + } + } + } + } + } + break; + } + case "mutationField": { + // This is a 1-to-1 map, so we can mostly just copy from parent bucket + size = parentBucket.size; + for (let i = 0; i < parentBucket.size; i++) { + map.set(i, i); + } + for (const stepId of copyStepIds) { + store.set(stepId, parentBucket.store.get(stepId)); + } + break; + } + case "polymorphic": { + const polymorphicPlanId = this.reason.parentStep.id; + const polymorphicPlanStore = parentBucket.store.get(polymorphicPlanId); + if (!polymorphicPlanStore) { + throw new Error(`GrafastInternalError: Entry for '${parentBucket.layerPlan.operationPlan.dangerouslyGetStep(polymorphicPlanId)}' not found in bucket for '${parentBucket.layerPlan}'`); + } + // We're only copying over the entries that match this type (note: + // they may end up being null, but that's okay) + const targetTypeNames = this.reason.typeNames; + for (const stepId of copyStepIds) { + const ev = parentBucket.store.get(stepId); + if (!ev) { + throw new Error(`GrafastInternalError<548f0d84-4556-4189-8655-fb16aa3345a6>: new bucket for ${this} wants to copy ${this.operationPlan.dangerouslyGetStep(stepId)}, but bucket for ${parentBucket.layerPlan} doesn't contain that plan`); + } + if (ev.isBatch) { + store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + else { + store.set(stepId, ev); + } + } + for (let originalIndex = 0; originalIndex < parentBucket.size; originalIndex++) { + const flags = polymorphicPlanStore._flagsAt(originalIndex); + if (flags & (interfaces_js_1.FLAG_ERROR | interfaces_js_1.FLAG_INHIBITED | interfaces_js_1.FLAG_NULL)) { + continue; + } + if (parentSideEffectValue !== null && + parentSideEffectValue._flagsAt(originalIndex) & interfaces_js_1.FLAG_ERROR) { + continue; + } + const value = polymorphicPlanStore.at(originalIndex); + const typeName = (0, polymorphic_js_1.resolveType)(value); + if (!targetTypeNames.includes(typeName)) { + continue; + } + const newIndex = size++; + map.set(originalIndex, newIndex); + // PERF: might be faster if we look this up as a constant rather than using concatenation here + const newPolymorphicPath = (parentBucket.polymorphicPathList[originalIndex] ?? "") + + ">" + + typeName; + polymorphicPathList[newIndex] = newPolymorphicPath; + iterators[newIndex] = parentBucket.iterators[originalIndex]; + for (const planId of copyStepIds) { + const ev = store.get(planId); + if (ev.isBatch) { + const orig = parentBucket.store.get(planId); + ev._copyResult(newIndex, orig, originalIndex); + } + } + } + break; + } + case "subscription": + case "defer": { + // TODO + throw new Error("TODO"); + } + case "subroutine": { + throw new Error("Subroutines are experimental and must currently handle their own bucket creation"); + } + case "root": { + throw new Error( + // *confused emoji* + "GrafastInternalError<05fb7069-81b5-43f7-ae71-f62547d2c2b7>: root cannot be not the root (...)"); + } + default: { + const never = this.reason; + throw new Error(`GrafastInternalError<8162e6c2-3d66-4d67-ba03-5310a4f9a6d4>: unhandled reason '${(0, inspect_js_1.inspect)(never)}'`); + } + } + if (size > 0) { + // Reference + const childBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan: this, + size, + store, + // PERF: not necessarily, if we don't copy the errors, we don't have the errors. + flagUnion: parentBucket.flagUnion, + polymorphicPathList, + iterators, + }, parentBucket.metaByMetaKey); + parentBucket.children[this.id] = { + bucket: childBucket, + map, + }; + return childBucket; + } + else { + return null; + } + } +} +exports.LayerPlan = LayerPlan; +const makeNewBucketCache = new lru_1.default({ + maxLength: 1000, +}); +const makingNewBucketCallbacks = new Map(); +const te_parentBucketDotPolymorphicPathList = (0, tamedevil_1.default) `parentBucket.polymorphicPathList`; +const te_parentBucketDotIterators = (0, tamedevil_1.default) `parentBucket.iterators`; +const te_emptyArray = (0, tamedevil_1.default) `[]`; +const ref_newBucket = tamedevil_1.default.ref(executeBucket_js_1.newBucket, "newBucket"); +const ref_batchExecutionValue = tamedevil_1.default.ref(executeBucket_js_1.batchExecutionValue, "batchExecutionValue"); +function makeNewBucketExpression(signature, reasonType, inner) { + const expr = (0, tamedevil_1.default) `\ +(function ${tamedevil_1.default.identifier(`newBucket_${signature}`)}(parentBucket) { + const store = new Map(); + const polymorphicPathList = ${reasonType === "mutationField" + ? te_parentBucketDotPolymorphicPathList + : te_emptyArray}; + const iterators = ${reasonType === "mutationField" ? te_parentBucketDotIterators : te_emptyArray}; + const map = new Map(); + let size = 0; + +${inner} + + if (size > 0) { + // Reference + const childBucket = ${ref_newBucket}({ + layerPlan: this, + size, + store, + // PERF: not necessarily, if we don't copy the errors, we don't have the errors. + flagUnion: parentBucket.flagUnion, + polymorphicPathList, + iterators, + }, parentBucket.metaByMetaKey); + // PERF: set ourselves in more places so that we never have to call 'getChildBucketAndIndex'. + parentBucket.children[this.id] = { bucket: childBucket, map }; + + return childBucket; + } else { + return null; + } +})`; + // te.debug(expr); + return expr; +} +function newBucketFactoryInnerExpression(signature, copyCount, reasonType) { + if (reasonType === "nullableBoundary") { + if (Math.random() < 2) { + throw new Error("This code no longer works since we added unary steps."); + } + // PERF: if parent bucket has no nulls/errors in itemStepId + // then we can just copy everything wholesale rather than building + // new arrays and looping. + const blocks = []; + const copyBlocks = []; + for (let i = 0; i < copyCount; i++) { + const te_source = tamedevil_1.default.identifier(`source${i}`); + const te_target = tamedevil_1.default.identifier(`target${i}`); + const te_i = tamedevil_1.default.lit(i); + blocks.push((0, tamedevil_1.default) `\ + const ${te_source} = parentBucket.store.get(copyStepIds[${te_i}]); + const ${te_target} = ${te_source}.isBatch ? ${ref_batchExecutionValue}([]) : ${te_source}; + store.set(copyStepIds[${te_i}], ${te_target}); +`); + copyBlocks.push((0, tamedevil_1.default) `\ + if(${te_target}.isBatch) { + ${te_target}.entries[newIndex] = ${te_source}.at(originalIndex); + } +`); + } + return makeNewBucketExpression(signature, reasonType, (0, tamedevil_1.default) `\ + const itemStepId = this.rootStep.id; + const nullableStepStore = parentBucket.store.get(itemStepId); + + const itemStepIdList = []; + store.set(itemStepId, ${ref_batchExecutionValue}(itemStepIdList)); + + // Prepare store with an empty list for each copyPlanId +${tamedevil_1.default.join(blocks, "")} + + // We'll typically be creating fewer nullableBoundary bucket entries + // than we have parent bucket entries (because we exclude nulls), so + // we must "multiply up" (down) the store entries. + for ( + let originalIndex = 0; + originalIndex < parentBucket.size; + originalIndex++ + ) { + const fieldValue = nullableStepStore.at(originalIndex); + if (fieldValue != null) { + const newIndex = size++; + map.set(originalIndex, newIndex); + itemStepIdList[newIndex] = fieldValue; + + polymorphicPathList[newIndex] = parentBucket.polymorphicPathList[originalIndex]; + iterators[newIndex] = parentBucket.iterators[originalIndex]; +${tamedevil_1.default.join(copyBlocks, "")} + } + } +`); + } + else if (reasonType === "listItem") { + const blocks = []; + const copyBlocks = []; + for (let i = 0; i < copyCount; i++) { + const te_source = tamedevil_1.default.identifier(`source${i}`); + const te_target = tamedevil_1.default.identifier(`target${i}`); + const te_i = tamedevil_1.default.lit(i); + blocks.push((0, tamedevil_1.default) `\ + const ${te_source} = parentBucket.store.get(copyStepIds[${te_i}]); + const ${te_target} = ${te_source}.isBatch ? ${ref_batchExecutionValue}([]) : ${te_source}; + store.set(copyStepIds[${te_i}], ${te_target}); + `); + copyBlocks.push((0, tamedevil_1.default) `\ + if (${te_target}.isBatch) { + ${te_target}.entries[newIndex] = ${te_source}.at(originalIndex); + } + `); + } + return makeNewBucketExpression(signature, reasonType, (0, tamedevil_1.default) `\ + const listStepId = this.reason.parentStep.id; + const listStepStore = parentBucket.store.get(listStepId); + + const itemStepIdList = []; + store.set(this.rootStep.id, ${ref_batchExecutionValue}(itemStepIdList)); + + // Prepare store with an empty list for each copyPlanId + ${tamedevil_1.default.join(blocks, "")} + + // We'll typically be creating more listItem bucket entries than we + // have parent buckets, so we must "multiply up" the store entries. + for ( + let originalIndex = 0; + originalIndex < parentBucket.size; + originalIndex++ + ) { + const list = listStepStore.at(originalIndex); + if (Array.isArray(list)) { + const newIndexes = []; + map.set(originalIndex, newIndexes); + for (let j = 0, l = list.length; j < l; j++) { + const newIndex = size++; + newIndexes.push(newIndex); + itemStepIdList[newIndex] = list[j]; + + polymorphicPathList[newIndex] = parentBucket.polymorphicPathList[originalIndex]; + iterators[newIndex] = parentBucket.iterators[originalIndex]; + ${tamedevil_1.default.join(copyBlocks, "")} + } + } + } + +`); + } + else { + const never = reasonType; + return never; + } +} +function withNewBucketFactory(signature, copyCount, reasonType, callback) { + const fn = makeNewBucketCache.get(signature); + if (fn !== undefined) { + return callback(fn); + } + const building = makingNewBucketCallbacks.get(signature); + if (building !== undefined) { + building.push(callback); + return; + } + const callbacks = [callback]; + makingNewBucketCallbacks.set(signature, callbacks); + const executorExpression = newBucketFactoryInnerExpression(signature, copyCount, reasonType); + const factoryExpression = (0, tamedevil_1.default) `\ +function ${tamedevil_1.default.identifier(`layerPlanNewBucketFactory_${signature}`)}(copyStepIds) { + return ${executorExpression}; +}`; + tamedevil_1.default.runInBatch(factoryExpression, (factory) => { + makeNewBucketCache.set(signature, factory); + makingNewBucketCallbacks.delete(signature); + for (const callback of callbacks) { + callback(factory); + } + }); +} +//# sourceMappingURL=LayerPlan.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/LayerPlan.js.map b/grafast/grafast/dist/engine/LayerPlan.js.map new file mode 100644 index 0000000000..879f410c07 --- /dev/null +++ b/grafast/grafast/dist/engine/LayerPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LayerPlan.js","sourceRoot":"","sources":["../../src/engine/LayerPlan.ts"],"names":[],"mappings":";;;AA0GA,oDAEC;AACD,kDAQC;AACD,wDAGC;;AAzHD,gEAAgC;AAEhC,kEAA2B;AAE3B,6DAAuC;AAEvC,8CAAwC;AAExC,oDAM0B;AAC1B,sDAAgD;AAEhD,yDAAoE;AAyFpE,SAAgB,oBAAoB,CAAC,SAAoB;IACvD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,KAAK,aAAa,CAAC;AACjD,CAAC;AACD,SAAgB,mBAAmB,CAAC,SAAoB;IACtD,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;IAChC,OAAO,CACL,CAAC,CAAC,KAAK,UAAU,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC;QACrD,CAAC,KAAK,cAAc;QACpB,CAAC,KAAK,eAAe;QACrB,CAAC,KAAK,OAAO,CACd,CAAC;AACJ,CAAC;AACD,SAAgB,sBAAsB,CAAC,SAAoB;IACzD,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;IAChC,OAAO,CAAC,KAAK,aAAa,CAAC;AAC7B,CAAC;AAoED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAa,SAAS;IA2FpB,YACkB,aA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ACxD,SAAS,EACT,SAAS,EACT,UAAU,CACX,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAA,mBAAE,EAAA;WACnB,mBAAE,CAAC,UAAU,CACpB,6BAA6B,SAAS,EAAE,CACzC;WACQ,kBAAkB;EAC3B,CAAC;IACD,mBAAE,CAAC,UAAU,CAAU,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE;QACpD,kBAAkB,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC3C,wBAAwB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3C,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OperationPlan.d.ts b/grafast/grafast/dist/engine/OperationPlan.d.ts new file mode 100644 index 0000000000..cd1822a7b4 --- /dev/null +++ b/grafast/grafast/dist/engine/OperationPlan.d.ts @@ -0,0 +1,208 @@ +import type { FragmentDefinitionNode, GraphQLFieldMap, GraphQLObjectType, GraphQLSchema, GraphQLUnionType, OperationDefinitionNode } from "graphql"; +import type { Constraint } from "../constraints.js"; +import type { SelectionSetDigest } from "../graphqlCollectFields.js"; +import type { GrafastPlanJSON } from "../index.js"; +import { Step } from "../index.js"; +import { $$timeout, $$ts } from "../interfaces.js"; +import type { LayerPlanReasonSubroutine } from "./LayerPlan.js"; +import { LayerPlan } from "./LayerPlan.js"; +import { OutputPlan } from "./OutputPlan.js"; +export declare const POLYMORPHIC_ROOT_PATH: null; +export declare const POLYMORPHIC_ROOT_PATHS: ReadonlySet | null; +/** Beware: the list of phases may change over time... @experimental */ +export type OperationPlanPhase = "init" | "plan" | "validate" | "optimize" | "finalize" | "ready"; +export interface MetaByMetaKey { + [metaKey: string | number | symbol]: Record; +} +export declare class OperationPlan { + readonly schema: GraphQLSchema; + readonly operation: OperationDefinitionNode; + readonly fragments: { + [fragmentName: string]: FragmentDefinitionNode; + }; + readonly variableValues: { + [key: string]: any; + }; + readonly context: { + [key: string]: any; + }; + readonly rootValue: any; + private readonly planningTimeout; + readonly [$$timeout]: undefined; + readonly [$$ts]: undefined; + readonly queryType: GraphQLObjectType; + readonly mutationType: GraphQLObjectType | null; + readonly subscriptionType: GraphQLObjectType | null; + readonly unionsContainingObjectType: { + [objectTypeName: string]: ReadonlyArray; + }; + private operationType; + /** + * What state is the OpPlan in? + * + * 1. init + * 2. plan + * 3. validate + * 5. optimize + * 6. finalize + * 7. ready + * + * Once in 'ready' state we can execute the plan. + */ + phase: OperationPlanPhase; + /** + * Gets updated as we work our way through the plan, useful for making errors more helpful. + */ + loc: string[] | null; + /** + * If true, then this operation doesn't use (custom) resolvers. + */ + pure: boolean; + private startTime; + private previousLap; + private laps; + private optimizeMeta; + private scalarPlanInfo; + constructor(schema: GraphQLSchema, operation: OperationDefinitionNode, fragments: { + [fragmentName: string]: FragmentDefinitionNode; + }, variableValuesConstraints: Constraint[], variableValues: { + [key: string]: any; + }, contextConstraints: Constraint[], context: { + [key: string]: any; + }, rootValueConstraints: Constraint[], rootValue: any, planningTimeout: number | null); + private lap; + private checkTimeout; + private planOperation; + /** + * Plans a GraphQL query operation. + */ + private planQuery; + /** + * Implements the `PlanOpPlanMutation` algorithm. + */ + private planMutation; + /** + * Implements the `PlanOpPlanSubscription` algorithm. + */ + private planSubscription; + /** + * Gets the item plan for a given parent list plan - this ensures we only + * create one item plan per parent plan. + */ + private itemStepForListStep; + processGroupedFieldSet(outputPlan: OutputPlan, path: readonly string[], polymorphicPath: string | null, polymorphicPaths: ReadonlySet | null, parentStep: Step, objectType: GraphQLObjectType, objectTypeFields: GraphQLFieldMap, isMutation: boolean, groupedFieldSet: SelectionSetDigest): void; + /** + * + * @param outputPlan - The output plan that this selection set is being added to + * @param path - The path within the outputPlan that we're adding stuff (only for root/object OutputPlans) + * @param parentStep - The step that represents the selection set root + * @param objectType - The object type that this selection set is being evaluated for (note polymorphic selection should already have been handled by this point) + * @param selections - The GraphQL selections (fields, fragment spreads, inline fragments) to evaluate + * @param isMutation - If true this selection set should be executed serially rather than in parallel (each field gets its own LayerPlan) + */ + private planSelectionSet; + private internalDependency; + private planIntoOutputPlan; + private polymorphicLayerPlanByPathByLayerPlan; + private getPolymorphicLayerPlan; + private planField; + /** + * A replacement for GraphQL's + * `CoerceArgumentValues` that factors in tracked variables. + * + * @see https://spec.graphql.org/draft/#CoerceArgumentValues() + */ + private getTrackedArguments; + /** + * Sets up tracking for the given value (variableValues, context, rootValue). + */ + private track; + /** + * Checks that no step has a property on it whose value is another step. It + * should addDependency instead. + */ + private validateSteps; + private replaceStep; + private processStep; + /** + * Peers are steps of the same type (but not the same step!) that are in + * compatible layers and have the same dependencies. Peers must not have side + * effects. A step is not its own peer. + */ + private getPeers; + private isImmoveable; + /** + * Attempts to hoist the step into a higher layerPlan to maximize + * deduplication. + */ + private hoistStep; + /** + * Attempts to push the step into the lowest layerPlan to minimize the need + * for copying between layer plans. + */ + private pushDown; + private _deduplicateInnerLogic; + private deduplicateStep; + private deduplicateStepsProcess; + /** + * Gives us a chance to replace nearly-duplicate plans with other existing + * plans (and adding the necessary transforms); this means that by the time + * we come to optimize the plan tree should already be simpler. For example + * if you have two plans at the same level that both request row data from + * the same database table with the same identifiers, `WHERE`, `LIMIT`, + * `OFFSET` and `ORDER BY`, but different `SELECT`s we could merge the two + * plans together by replacing the latter with the former and having the + * former SELECT additional fields, then transform the results back to what + * our child plans would be expecting. + */ + private deduplicateSteps; + private hoistAndDeduplicate; + private hoistSteps; + private pushDownSteps; + /** + * Calls the 'optimize' method on a plan, which may cause the plan to + * communicate with its (deep) dependencies, and even to replace itself with + * a different plan. + */ + private optimizeStep; + /** + * Note that we work through dependents first so we can make sure that we + * know all our dependent's needs before we optimise ourself. + */ + private optimizeSteps; + private inlineSteps; + /** Finalizes each step */ + private finalizeSteps; + private finalizeLayerPlans; + /** Optimizes each output plan */ + private optimizeOutputPlans; + /** Finalizes each output plan */ + private finalizeOutputPlans; + private walkOutputPlans; + generatePlanJSON(): GrafastPlanJSON; + finishSubroutine(subroutineStep: Step, layerPlan: LayerPlan): void; + getStepsByMetaKey(metaKey: string | number | symbol): Step[]; + getStepsByStepClass(klass: { + new (...args: any[]): TClass; + }): TClass[]; + private _cacheStepStoreByLayerPlanAndActionKey; + /** + * Cache a generated step by a given identifier (cacheKey) such that we don't + * need to regenerate it on future calls, significantly reducing the load on + * deduplication later. + * + * Note: automatically extends the cached step into other (relevant) + * polymorphic paths; if this shouldn't be the case then don't use cacheStep + * and instead rely on deduplication as usual. + * + * @experimental + */ + cacheStep(ownerStep: Step, actionKey: string, cacheKey: symbol | string | number | boolean | null | undefined, cb: () => T): T; + /** + * Clears the cache, typically due to side effects having taken place. Called + * from setting hasSideEffects on an ExecutableStep, among other places. + */ + resetCache(): void; + withRootLayerPlan(cb: () => T): T; +} +//# sourceMappingURL=OperationPlan.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OperationPlan.d.ts.map b/grafast/grafast/dist/engine/OperationPlan.d.ts.map new file mode 100644 index 0000000000..0844e3bb4d --- /dev/null +++ b/grafast/grafast/dist/engine/OperationPlan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"OperationPlan.d.ts","sourceRoot":"","sources":["../../src/engine/OperationPlan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,sBAAsB,EAGtB,eAAe,EAEf,iBAAiB,EAEjB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EAExB,MAAM,SAAS,CAAC;AAKjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAMrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EASL,IAAI,EAEL,MAAM,aAAa,CAAC;AAgBrB,OAAO,EAGL,SAA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E,IAAI,EACpB,SAAS,EAAE,SAAS,CAAC,yBAAyB,CAAC,GAC9C,IAAI;IA8BP,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE;IAU5D,mBAAmB,CAAC,MAAM,SAAS,IAAI,EAAE,KAAK,EAAE;QAC9C,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;KAC9B,GAAG,MAAM,EAAE;IAUZ,OAAO,CAAC,sCAAsC,CAGtB;IACxB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,CAAC,SAAS,IAAI,EACtB,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAC/D,EAAE,EAAE,MAAM,CAAC,GACV,CAAC;IA0CJ;;;OAGG;IACI,UAAU;IAIV,iBAAiB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;CAG5C"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OperationPlan.js b/grafast/grafast/dist/engine/OperationPlan.js new file mode 100644 index 0000000000..a09743324e --- /dev/null +++ b/grafast/grafast/dist/engine/OperationPlan.js @@ -0,0 +1,2857 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperationPlan = exports.POLYMORPHIC_ROOT_PATHS = exports.POLYMORPHIC_ROOT_PATH = void 0; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const graphql = tslib_1.__importStar(require("graphql")); +const tamedevil_1 = tslib_1.__importDefault(require("tamedevil")); +const assert = tslib_1.__importStar(require("../assert.js")); +const graphqlCollectFields_js_1 = require("../graphqlCollectFields.js"); +const graphqlMergeSelectionSets_js_1 = require("../graphqlMergeSelectionSets.js"); +const index_js_1 = require("../index.js"); +const input_js_1 = require("../input.js"); +const inspect_js_1 = require("../inspect.js"); +const interfaces_js_1 = require("../interfaces.js"); +const operationPlan_input_js_1 = require("../operationPlan-input.js"); +const step_js_1 = require("../step.js"); +const connection_js_1 = require("../steps/connection.js"); +const constant_js_1 = require("../steps/constant.js"); +const graphqlResolver_js_1 = require("../steps/graphqlResolver.js"); +const timeSource_js_1 = require("../timeSource.js"); +const utils_js_1 = require("../utils.js"); +const LayerPlan_js_1 = require("./LayerPlan.js"); +const defaultPlanResolver_js_1 = require("./lib/defaultPlanResolver.js"); +const withGlobalLayerPlan_js_1 = require("./lib/withGlobalLayerPlan.js"); +const lock_js_1 = require("./lock.js"); +const OutputPlan_js_1 = require("./OutputPlan.js"); +const StepTracker_js_1 = require("./StepTracker.js"); +const atpe = typeof process !== "undefined" && process.env.ALWAYS_THROW_PLANNING_ERRORS; +const ALWAYS_THROW_PLANNING_ERRORS = atpe === "1"; +const THROW_PLANNING_ERRORS_ON_SIDE_EFFECTS = atpe === "2"; +/** + * Returns true for steps that the system populates automatically without executing. + */ +function isPrepopulatedStep(step) { + return step instanceof index_js_1.__ItemStep || step instanceof index_js_1.__ValueStep; +} +if (atpe && + atpe !== "0" && + !(ALWAYS_THROW_PLANNING_ERRORS || THROW_PLANNING_ERRORS_ON_SIDE_EFFECTS)) { + throw new Error(`Invalid value for envvar 'ALWAYS_THROW_PLANNING_ERRORS' - expected '1' or '2', but received '${atpe}'`); +} +// Work around TypeScript CommonJS `graphql_1.isListType` unoptimal access. +const { assertObjectType, defaultFieldResolver, getNamedType, getNullableType, isEnumType, isInterfaceType, isListType, isNonNullType, isObjectType, isScalarType, isUnionType, } = graphql; +/** + * This value allows the first few plans to take more time whilst the JIT warms + * up - planning can easily go from 400ms down to 80ms after just a few + * executions thanks to V8's JIT. + */ +let planningTimeoutWarmupMultiplier = 5; +const EMPTY_ARRAY = Object.freeze([]); +exports.POLYMORPHIC_ROOT_PATH = null; +exports.POLYMORPHIC_ROOT_PATHS = null; +Object.freeze(exports.POLYMORPHIC_ROOT_PATHS); +/** How many times will we try re-optimizing before giving up */ +const MAX_OPTIMIZATION_LOOPS = 10; +const REASON_ROOT = Object.freeze({ type: "root" }); +const OUTPUT_PLAN_TYPE_NULL = Object.freeze({ mode: "null" }); +const OUTPUT_PLAN_TYPE_ARRAY = Object.freeze({ mode: "array" }); +const newValueStepCallback = (isImmutable) => new index_js_1.__ValueStep(isImmutable); +const NO_ARGS = { + get() { + throw new Error(`This field doesn't have any arguments`); + }, +}; +class OperationPlan { + constructor(schema, operation, fragments, variableValuesConstraints, variableValues, contextConstraints, context, rootValueConstraints, rootValue, planningTimeout) { + this.schema = schema; + this.operation = operation; + this.fragments = fragments; + this.variableValues = variableValues; + this.context = context; + this.rootValue = rootValue; + this.planningTimeout = planningTimeout; + /** + * What state is the OpPlan in? + * + * 1. init + * 2. plan + * 3. validate + * 5. optimize + * 6. finalize + * 7. ready + * + * Once in 'ready' state we can execute the plan. + */ + this.phase = "init"; + /** + * Gets updated as we work our way through the plan, useful for making errors more helpful. + */ + this.loc = index_js_1.isDev + ? [] + : null /* forbid loc in production */; + /** @internal */ + this.stepTracker = new StepTracker_js_1.StepTracker(this); + /** + * @internal + */ + this.itemStepIdByListStepId = Object.create(null); + /** + * If true, then this operation doesn't use (custom) resolvers. + */ + this.pure = true; + this.startTime = timeSource_js_1.timeSource.now(); + this.previousLap = this.startTime; + this.laps = []; + this.optimizeMeta = new Map(); + /** @internal */ + this.valueNodeToStaticValueCache = new Map(); + /** @internal Use plan.getStep(id) instead. */ + this.getStep = index_js_1.isDev + ? (id, requestingStep) => { + if (!["plan", "validate", "optimize"].includes(this.phase)) { + throw new Error(`Getting a step during the '${this.phase}' phase is forbidden - please do so before or during the optimize phase.`); + } + // Check that requestingStep is allowed to get steps + if (requestingStep.isOptimized && + (this.phase !== "optimize" || + !requestingStep.allowMultipleOptimizations)) { + throw new Error(`Optimized step ${requestingStep} is not permitted to request other steps (requested '${id}')`); + } + const step = this.stepTracker.getStepById(id); + if (step == null) { + throw new Error(`Programming error: step with id '${id}' no longer exists (attempted access from ${requestingStep}). Most likely this means that ${requestingStep} has an illegal reference to this step, you should only maintain references to steps via dependencies.`); + } + return step[interfaces_js_1.$$proxy] ?? step; + } + : (id, _requestingStep) => { + const step = this.stepTracker.getStepById(id); + return step[interfaces_js_1.$$proxy] ?? step; + }; + this.polymorphicLayerPlanByPathByLayerPlan = new Map(); + this._cacheStepStoreByLayerPlanAndActionKey = Object.create(null); + this.variableValuesConstraints = variableValuesConstraints; + this.contextConstraints = contextConstraints; + this.rootValueConstraints = rootValueConstraints; + this.scalarPlanInfo = { schema: this.schema }; + const queryType = schema.getQueryType(); + assert.ok(queryType, "Schema must have a query type"); + this.queryType = queryType; + this.mutationType = schema.getMutationType() ?? null; + this.subscriptionType = schema.getSubscriptionType() ?? null; + const allTypes = Object.values(schema.getTypeMap()); + const allUnions = []; + const allObjectTypes = []; + this.unionsContainingObjectType = Object.create(null); + for (const type of allTypes) { + if (isUnionType(type)) { + allUnions.push(type); + const members = type.getTypes(); + for (const memberType of members) { + if (!this.unionsContainingObjectType[memberType.name]) { + this.unionsContainingObjectType[memberType.name] = [type]; + } + else { + this.unionsContainingObjectType[memberType.name].push(type); + } + } + } + else if (isObjectType(type)) { + allObjectTypes.push(type); + if (!this.unionsContainingObjectType[type.name]) { + this.unionsContainingObjectType[type.name] = []; + } + } + } + this.operationType = operation.operation; + this.phase = "plan"; + this.rootLayerPlan = new LayerPlan_js_1.LayerPlan(this, null, REASON_ROOT); + // Set up the shared steps for variables, context and rootValue + [this.variableValuesStep, this.trackedVariableValuesStep] = this.track(variableValues, this.variableValuesConstraints, this.operation.variableDefinitions); + [this.contextStep, this.trackedContextStep] = this.track(context, this.contextConstraints); + [this.rootValueStep, this.trackedRootValueStep] = this.track(rootValue, this.rootValueConstraints); + // this.rootLayerPlan.parentStep = this.trackedRootValueStep; + this.deduplicateSteps(); + this.lap("init"); + // Plan the operation + this.planOperation(); + this.checkTimeout(); + this.lap("planOperation"); + // Now perform hoisting (and repeat deduplication) + this.hoistSteps(); + this.checkTimeout(); + this.lap("hoistSteps", "planOperation"); + if (index_js_1.isDev) { + this.phase = "validate"; + this.resetCache(); + // Helpfully check steps don't do forbidden things. + this.validateSteps(); + this.lap("validateSteps"); + } + this.phase = "optimize"; + this.resetCache(); + // Get rid of temporary steps before `optimize` triggers side-effects. + // (Critical due to steps that may have been discarded due to field errors + // or similar.) + this.stepTracker.treeShakeSteps(); + this.checkTimeout(); + this.lap("treeShakeSteps", "optimize"); + // Replace/inline/optimise steps + tamedevil_1.default.batch(() => { + this.optimizeSteps(); + }); + this.checkTimeout(); + this.lap("optimizeSteps"); + this.inlineSteps(); + this.checkTimeout(); + this.lap("inlineSteps"); + this.phase = "finalize"; + this.resetCache(); + this.stepTracker.finalizeSteps(); + // Get rid of steps that are no longer needed after optimising outputPlans + // (we shouldn't see any new steps or dependencies after here) + this.stepTracker.treeShakeSteps(); + this.checkTimeout(); + this.lap("treeShakeSteps", "finalize"); + // Now shove steps as deep down as they can go (opposite of hoist) + this.pushDownSteps(); + this.checkTimeout(); + this.lap("pushDownSteps"); + // Plans are expected to execute later; they may take steps here to prepare + // themselves (e.g. compiling SQL queries ahead of time). + tamedevil_1.default.batch(() => { + this.finalizeSteps(); + }); + this.lap("finalizeSteps"); + // Replace access plans with direct access, etc (must come after finalizeSteps) + tamedevil_1.default.batch(() => { + this.optimizeOutputPlans(); + }); + this.checkTimeout(); + this.lap("optimizeOutputPlans"); + // AccessSteps may have been removed + this.stepTracker.treeShakeSteps(); + this.checkTimeout(); + this.lap("treeShakeSteps", "optimizeOutputPlans"); + this.stepTracker.finalizeOutputPlans(); + tamedevil_1.default.batch(() => { + this.finalizeLayerPlans(); + }); + this.lap("finalizeLayerPlans"); + tamedevil_1.default.batch(() => { + this.finalizeOutputPlans(); + }); + this.lap("finalizeOutputPlans"); + this.phase = "ready"; + this.resetCache(); + // this.walkFinalizedPlans(); + // this.preparePrefetches(); + const allMetaKeys = new Set(); + for (const step of this.stepTracker.activeSteps) { + if (step.metaKey !== undefined) { + allMetaKeys.add(step.metaKey); + } + } + const allMetaKeysList = [...allMetaKeys]; + this.makeMetaByMetaKey = makeMetaByMetaKeysFactory(allMetaKeysList); + this.lap("ready"); + const elapsed = timeSource_js_1.timeSource.now() - this.startTime; + /* + console.log(`Planning took ${elapsed.toFixed(1)}ms`); + const entries: Array<{ process: string; duration: string }> = []; + for (const lap of this.laps) { + const elapsed = lap.elapsed; + entries.push({ + process: `${lap.category}${ + lap.subcategory ? `[${lap.subcategory}]` : `` + }`, + duration: `${elapsed.toFixed(1)}ms`, + }); + } + console.table(entries); + */ + // Allow this to be garbage collected + this.optimizeMeta = null; + context?.grafastMetricsEmitter?.emit("plan", { + elapsed, + laps: this.laps, + }); + if (planningTimeoutWarmupMultiplier > 1) { + planningTimeoutWarmupMultiplier = Math.max(1, planningTimeoutWarmupMultiplier - 0.5); + } + } + lap(category, subcategory) { + const now = timeSource_js_1.timeSource.now(); + const elapsed = now - this.previousLap; + this.previousLap = now; + this.laps.push({ category, subcategory, elapsed }); + } + checkTimeout() { + if (this.planningTimeout === null) + return; + const now = timeSource_js_1.timeSource.now(); + const elapsed = now - this.startTime; + if (elapsed > this.planningTimeout * planningTimeoutWarmupMultiplier) { + throw new index_js_1.SafeError("Operation took too long to plan and was aborted. Please simplify the request and try again.", { + [interfaces_js_1.$$timeout]: this.planningTimeout, + [interfaces_js_1.$$ts]: now, + }); + } + } + /** + * Called by the LayerPlan's constructor when it wants to get a new id to use. + * + * @internal + */ + addLayerPlan(layerPlan) { + return this.stepTracker.addLayerPlan(layerPlan); + } + /** + * Adds a plan to the known steps and returns the number to use as the plan + * id. ONLY to be used from Step, user code should never call this directly. + * + * @internal + */ + _addStep(plan) { + if (!["plan", "validate", "optimize"].includes(this.phase)) { + throw new Error(`Creating a plan during the '${this.phase}' phase is forbidden.`); + } + return this.stepTracker.addStep(plan); + } + /** + * Get a plan without specifying who requested it; this disables all the + * caller checks. Only intended to be called from internal code. + * + * @internal + */ + dangerouslyGetStep(id) { + return this.stepTracker.getStepById(id); + } + planOperation() { + try { + switch (this.operationType) { + case "query": { + this.planQuery(); + break; + } + case "mutation": { + this.planMutation(); + break; + } + case "subscription": { + this.planSubscription(); + break; + } + default: { + const never = this.operationType; + throw new index_js_1.SafeError(`Unsupported operation type '${never}'.`); + } + } + } + catch (e) { + // LOGGING: raise this somewhere critical + if (this.loc != null) { + console.error(`Error occurred during query planning (at ${this.loc.join(" > ")}): \n${e.stack || e}`); + } + else { + console.error(`Error occurred during query planning: \n${e.stack || e}`); + } + throw new Error(`Query planning error: ${e.message}`, { cause: e }); + } + } + /** + * Plans a GraphQL query operation. + */ + planQuery() { + if (this.loc !== null) + this.loc.push("planQuery()"); + const rootType = this.queryType; + if (!rootType) { + throw new index_js_1.SafeError("No query type found in schema"); + } + const locationDetails = { + node: this.operation.selectionSet.selections, + parentTypeName: null, + // WHAT SHOULD fieldName be here?! + fieldName: null, + }; + const outputPlan = new OutputPlan_js_1.OutputPlan(this.rootLayerPlan, this.rootValueStep, { + mode: "root", + typeName: this.queryType.name, + }, locationDetails); + this.rootOutputPlan = outputPlan; + this.planSelectionSet(outputPlan, [], exports.POLYMORPHIC_ROOT_PATH, exports.POLYMORPHIC_ROOT_PATHS, this.trackedRootValueStep, rootType, this.operation.selectionSet.selections, true); + if (this.loc !== null) + this.loc.pop(); + } + /** + * Implements the `PlanOpPlanMutation` algorithm. + */ + planMutation() { + if (this.loc !== null) + this.loc.push("planMutation()"); + const rootType = this.mutationType; + if (!rootType) { + throw new index_js_1.SafeError("No mutation type found in schema"); + } + this.deduplicateSteps(); + const locationDetails = { + node: this.operation.selectionSet.selections, + parentTypeName: null, + // WHAT SHOULD fieldName be here?! + fieldName: null, + }; + const outputPlan = new OutputPlan_js_1.OutputPlan(this.rootLayerPlan, this.rootValueStep, { + mode: "root", + typeName: rootType.name, + }, locationDetails); + this.rootOutputPlan = outputPlan; + this.planSelectionSet(outputPlan, [], exports.POLYMORPHIC_ROOT_PATH, exports.POLYMORPHIC_ROOT_PATHS, this.trackedRootValueStep, rootType, this.operation.selectionSet.selections, true, true); + if (this.loc !== null) + this.loc.pop(); + } + /** + * Implements the `PlanOpPlanSubscription` algorithm. + */ + planSubscription() { + if (this.loc !== null) + this.loc.push("planSubscription"); + const rootType = this.subscriptionType; + if (!rootType) { + throw new index_js_1.SafeError("No subscription type found in schema"); + } + const selectionSet = this.operation.selectionSet; + const groupedFieldSet = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, graphqlCollectFields_js_1.graphqlCollectFields, null, this, this.trackedRootValueStep.id, rootType, selectionSet.selections, (0, graphqlCollectFields_js_1.newSelectionSetDigest)(false)); + if (groupedFieldSet.deferred !== undefined) { + throw new index_js_1.SafeError("@defer forbidden on subscription root selection set"); + } + let firstKey = undefined; + for (const key of groupedFieldSet.fields.keys()) { + if (firstKey !== undefined) { + throw new index_js_1.SafeError("subscriptions may only have one top-level field"); + } + firstKey = key; + } + assert.ok(firstKey != null, "selection set cannot be empty"); + const fields = groupedFieldSet.fields.get(firstKey); + if (!fields) { + throw new index_js_1.SafeError("Consistency error."); + } + // All grouped fields are equivalent, as mandated by GraphQL validation rules. Thus we can take the first one. + const field = fields[0]; + const fieldName = field.name.value; // Unaffected by alias. + const rootTypeFields = rootType.getFields(); + const fieldSpec = rootTypeFields[fieldName]; + const rawSubscriptionPlanResolver = fieldSpec.extensions?.grafast?.subscribePlan; + const path = [field.alias?.value ?? fieldName]; + const locationDetails = { + parentTypeName: rootType.name, + fieldName, + node: this.operation.selectionSet.selections, + }; + const subscriptionPlanResolver = rawSubscriptionPlanResolver; + const fieldArgsSpec = fieldSpec.args; + const trackedArguments = fieldArgsSpec.length > 0 + ? (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, this.getTrackedArguments, this, fieldArgsSpec, field) + : NO_ARGS; + if (subscriptionPlanResolver !== undefined) { + // PERF: optimize this + const { haltTree, step: subscribeStep } = this.planField(rootType.name, fieldName, this.rootLayerPlan, path, exports.POLYMORPHIC_ROOT_PATHS, subscriptionPlanResolver, "subscribePlan", this.trackedRootValueStep, fieldSpec, trackedArguments, true); + if (haltTree) { + throw new index_js_1.SafeError("Failed to setup subscription"); + } + this.rootLayerPlan.setRootStep(subscribeStep); + const subscriptionEventLayerPlan = new LayerPlan_js_1.LayerPlan(this, this.rootLayerPlan, { + type: "subscription", + }); + const $__item = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(subscriptionEventLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, () => new index_js_1.__ItemStep(subscribeStep)); + subscriptionEventLayerPlan.setRootStep($__item); + let streamItemPlan = (0, utils_js_1.hasItemPlan)(subscribeStep) + ? (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(subscriptionEventLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, subscribeStep.itemPlan, subscribeStep, $__item) + : $__item; + // WE MUST RE-FETCH STEPS AFTER DEDUPLICATION! + this.deduplicateSteps(); + streamItemPlan = this.stepTracker.getStepById(streamItemPlan.id); + const outputPlan = new OutputPlan_js_1.OutputPlan(subscriptionEventLayerPlan, this.rootValueStep, { mode: "root", typeName: rootType.name }, locationDetails); + this.rootOutputPlan = outputPlan; + this.planSelectionSet(outputPlan, [], exports.POLYMORPHIC_ROOT_PATH, exports.POLYMORPHIC_ROOT_PATHS, streamItemPlan, rootType, selectionSet.selections, false); + } + else { + const subscribeStep = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, () => { + const $args = (0, index_js_1.object)(field.arguments?.reduce((memo, arg) => { + memo[arg.name.value] = trackedArguments.get(arg.name.value); + return memo; + }, Object.create(null)) ?? Object.create(null)); + const rawResolver = fieldSpec.resolve; + const rawSubscriber = fieldSpec.subscribe; + return (0, graphqlResolver_js_1.graphqlResolver)(rawResolver, rawSubscriber, this.trackedRootValueStep, $args, { + fieldName, + fieldNodes: fields, + fragments: this.fragments, + operation: this.operation, + parentType: this.subscriptionType, + returnType: fieldSpec.type, + schema: this.schema, + // @ts-ignore + path: { + typename: this.subscriptionType.name, + key: fieldName, + prev: undefined, + }, + }); + }); + subscribeStep._stepOptions.stream = {}; + subscribeStep._stepOptions.walkIterable = true; + this.rootLayerPlan.setRootStep(subscribeStep); + const subscriptionEventLayerPlan = new LayerPlan_js_1.LayerPlan(this, this.rootLayerPlan, { + type: "subscription", + }); + const $__item = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(subscriptionEventLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, () => new index_js_1.__ItemStep(subscribeStep)); + subscriptionEventLayerPlan.setRootStep($__item); + let streamItemPlan = (0, utils_js_1.hasItemPlan)(subscribeStep) + ? (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(subscriptionEventLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, subscribeStep.itemPlan, subscribeStep, $__item) + : $__item; + // WE MUST RE-FETCH STEPS AFTER DEDUPLICATION! + this.deduplicateSteps(); + streamItemPlan = this.stepTracker.getStepById(streamItemPlan.id); + const outputPlan = new OutputPlan_js_1.OutputPlan(subscriptionEventLayerPlan, this.rootValueStep, { mode: "root", typeName: rootType.name }, locationDetails); + this.rootOutputPlan = outputPlan; + this.planSelectionSet(outputPlan, [], exports.POLYMORPHIC_ROOT_PATH, exports.POLYMORPHIC_ROOT_PATHS, streamItemPlan, rootType, selectionSet.selections, true); + } + if (this.loc !== null) + this.loc.pop(); + } + /** + * Gets the item plan for a given parent list plan - this ensures we only + * create one item plan per parent plan. + */ + itemStepForListStep(parentLayerPlan, listStep, depth, stream) { + const itemStepId = this.itemStepIdByListStepId[listStep.id]; + if (itemStepId !== undefined) { + return this.stepTracker.getStepById(itemStepId); + } + // Create a new LayerPlan for this list item + const layerPlan = new LayerPlan_js_1.LayerPlan(this, parentLayerPlan, { + type: "listItem", + parentStep: listStep, + stream, + }); + const itemPlan = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(layerPlan, listStep.polymorphicPaths, () => new index_js_1.__ItemStep(listStep, depth)); + layerPlan.setRootStep(itemPlan); + this.itemStepIdByListStepId[listStep.id] = itemPlan.id; + return itemPlan; + } + processGroupedFieldSet( + // Deliberately shadows + outputPlan, path, polymorphicPath, polymorphicPaths, parentStep, objectType, objectTypeFields, isMutation, groupedFieldSet) { + // `__typename` shouldn't bump the mutation index since it has no side effects. + let mutationIndex = -1; + const $sideEffect = outputPlan.layerPlan.latestSideEffectStep; + for (const [responseKey, fieldNodes] of groupedFieldSet.fields.entries()) { + let resolverEmulation = groupedFieldSet.resolverEmulation; + try { + // All grouped fields are equivalent, as mandated by GraphQL validation rules. Thus we can take the first one. + const field = fieldNodes[0]; + const fieldName = field.name.value; + const locationDetails = { + parentTypeName: objectType.name, + fieldName, + node: fieldNodes, + }; + // explicit matches are the fastest: https://jsben.ch/ajZNf + if (fieldName === "__typename") { + outputPlan.addChild(objectType, responseKey, { + type: "__typename", + locationDetails, + }); + continue; + } + else if (fieldName === "__schema" || fieldName === "__type") { + const variableNames = (0, utils_js_1.findVariableNamesUsed)(this, field); + outputPlan.addChild(objectType, responseKey, { + type: "outputPlan", + isNonNull: fieldName === "__schema", + outputPlan: new OutputPlan_js_1.OutputPlan(outputPlan.layerPlan, this.rootValueStep, { + mode: "introspection", + field, + variableNames, + // PERF: if variableNames.length === 0 we should be able to optimize this! + introspectionCacheByVariableValues: new lru_1.default({ + maxLength: 3, + }), + }, locationDetails), + locationDetails, + }); + continue; + } + const objectField = objectTypeFields[fieldName]; + if (!objectField) { + // Field does not exist; this should have been caught by validation + // but the spec says to just skip it. + continue; + } + const fieldType = objectField.type; + const rawPlanResolver = objectField.extensions?.grafast?.plan; + if (rawPlanResolver) { + resolverEmulation = false; + (0, utils_js_1.assertNotAsync)(rawPlanResolver, `${objectType.name}.${fieldName}.plan`); + } + const namedReturnType = getNamedType(fieldType); + const resolvedResolver = objectField.resolve; + const subscriber = objectField.subscribe; + const usesDefaultResolver = resolvedResolver == null || resolvedResolver === defaultFieldResolver; + const isPolymorphic = isUnionType(namedReturnType) || isInterfaceType(namedReturnType); + // We should use a resolver if: + // 1. they give us a non-default resolver + // 2. we're emulating resolvers AND the field is polymorphic + const resolver = resolvedResolver && !usesDefaultResolver + ? resolvedResolver + : resolverEmulation && isPolymorphic + ? defaultFieldResolver + : null; + // Apply a default plan to fields that do not have a plan nor a resolver. + const planResolver = rawPlanResolver ?? (resolver ? undefined : defaultPlanResolver_js_1.defaultPlanResolver); + /* + * When considering resolvers on fields, there's three booleans to + * consider: + * + * - typeIsPlanned: Does the type the field is defined on expect a plan? + * - NOTE: the root types (Query, Mutation, Subscription) implicitly + * expect the "root plan" + * - fieldHasPlan: Does the field define a `plan()` method? + * - resultIsPlanned: Does the named type that the field returns (the + * "named field type") expect a plan? + * - NOTE: only object types, unions and interfaces may expect plans; + * but not all of them do. + * - NOTE: a union/interface expects a plan iff ANY of its object + * types expect plans + * - NOTE: if ANY object type in an interface/union expects a plan + * then ALL object types within the interface/union must expect + * plans. + * - NOTE: scalars and enums never expect a plan. + * + * These booleans impact: + * + * - Whether there must be a `plan()` declaration and what the "parent" + * argument is to the same + * - If typeIsPlanned: + * - Assert: `fieldHasPlan` must be true + * - Pass through the parent plan + * - Else, if resultIsPlanned: + * - Assert: `fieldHasPlan` must be true + * - Pass through a `__ValueStep` representing the parent value. + * - Else, if fieldHasPlan: + * - Pass through a `__ValueStep` representing the parent value. + * - Else + * - No action necessary. + * - If the field may define `resolve()` and what the "parent" argument + * is to the same + * - If resultIsPlanned + * - Assert: there must not be a `resolve()` + * - Grafast provides pure resolver. + * - Else if fieldHasPlan (which may be implied by typeIsPlanned + * above) + * - If `resolve()` is not set: + * - grafast will return the value from the plan directly + * - Otherwise: + * - Grafast will wrap this resolver and will call `resolve()` (or + * default resolver) with the plan result. IMPORTANT: you may + * want to use an `ObjectStep` so that the parent object is of + * the expected shape; e.g. your plan might return + * `object({username: $username})` for a `User.username` field. + * - Else + * - Leave `resolve()` untouched - do not even wrap it. + * - (Failing that, use a __ValueStep and return the result + * directly.) + */ + if (resolver !== null) { + this.pure = false; + if (!rawPlanResolver) { + resolverEmulation = true; + } + } + const resultIsPlanned = (0, utils_js_1.isTypePlanned)(this.schema, namedReturnType); + const fieldHasPlan = !!planResolver; + if (resultIsPlanned && + !fieldHasPlan && + !objectType.extensions?.grafast?.assertStep) { + throw new Error(`Field ${objectType.name}.${fieldName} returns a ${namedReturnType.name} which expects a plan to be available; however this field has no plan() method to produce such a plan; please add 'extensions.grafast.plan' to this field.`); + } + if (resultIsPlanned && resolver) { + throw new Error(`Field ${objectType.name}.${fieldName} returns a ${namedReturnType.name} which expects a plan to be available; this means that ${objectType.name}.${fieldName} is forbidden from defining a GraphQL resolver.`); + } + let step; + let haltTree = false; + const fieldLayerPlan = isMutation + ? new LayerPlan_js_1.LayerPlan(this, outputPlan.layerPlan, { + type: "mutationField", + mutationIndex: ++mutationIndex, + }) + : outputPlan.layerPlan; + const objectFieldArgs = objectField.args; + const trackedArguments = objectFieldArgs.length > 0 + ? (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, this.getTrackedArguments, this, objectFieldArgs, field) + : NO_ARGS; + const fieldPath = [...path, responseKey]; + let streamDetails = null; + const isList = isListType(getNullableType(fieldType)); + if (isList) { + // read the @stream directive, if present + // TODO: Check SameStreamDirective still exists in @stream spec at release. + /* + * `SameStreamDirective` + * (https://github.com/graphql/graphql-spec/blob/26fd78c4a89a79552dcc0c7e0140a975ce654400/spec/Section%205%20--%20Validation.md#L450-L458) + * ensures that every field that has `@stream` must have the same + * `@stream` arguments; so we can just check the first node in the + * merged set to see our stream options. NOTE: if this changes before + * release then we may need to find the stream with the largest + * `initialCount` to figure what to do; something like: + * + * const streamDirective = firstField.directives?.filter( + * (d) => d.name.value === "stream", + * ).sort( + * (a, z) => getArg(z, 'initialCount', 0) - getArg(a, 'initialCount', 0) + * )[0] + */ + for (const n of fieldNodes) { + const streamDirective = n.directives?.find((d) => d.name.value === "stream"); + if (streamDirective === undefined) { + // Undo any previous stream details; the non-@stream wins. + streamDetails = null; + break; + } + else if (streamDetails !== null) { + // Validation promises the values are the same + continue; + } + else { + // Create streamDetails + streamDetails = this.withRootLayerPlan(() => ({ + initialCount: this.internalDependency((0, utils_js_1.directiveArgument)(this, streamDirective, "initialCount", graphql.Kind.INT) ?? (0, constant_js_1.constant)(0)), + if: this.internalDependency((0, utils_js_1.directiveArgument)(this, streamDirective, "if", graphql.Kind.BOOLEAN) ?? (0, constant_js_1.constant)(true)), + label: this.internalDependency((0, utils_js_1.directiveArgument)(this, streamDirective, "label", graphql.Kind.STRING) ?? (0, constant_js_1.constant)(undefined)), + })); + } + } + } + if (typeof planResolver === "function") { + ({ step, haltTree } = this.planField(objectType.name, fieldName, fieldLayerPlan, fieldPath, polymorphicPaths, planResolver, "plan", parentStep, objectField, trackedArguments, isList ? (streamDetails ?? false) : null)); + } + else { + // No plan resolver (or plan resolver fallback) so there must be a + // `resolve` method, so we'll feed the full parent step into the + // resolver. + assert.ok(resolver !== null, "GraphileInternalError<81652257-617a-4d1a-8306-903d0e3d2ddf>: The field has no resolver, so planResolver should exist (either as the field.plan or as the default plan resolver)."); + // ENHANCEMENT: should we do `step = parentStep.object()` (i.e. + // `$pgSelectSingle.record()`) or similar for "opaque" steps to become + // suitable for consumption by resolvers? + // Maybe `parentStep.forResolver()` or `parentStep.hydrate()` or `parentStep.toFullObject()`? + step = parentStep; + } + if (resolver !== null) { + step = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(fieldLayerPlan, polymorphicPaths, () => { + const $args = (0, index_js_1.object)(field.arguments?.reduce((memo, arg) => { + memo[arg.name.value] = trackedArguments.get(arg.name.value); + return memo; + }, Object.create(null)) ?? Object.create(null)); + return (0, graphqlResolver_js_1.graphqlResolver)(resolver, subscriber, step, $args, { + fieldName, + fieldNodes, + fragments: this.fragments, + operation: this.operation, + parentType: objectType, + returnType: fieldType, + schema: this.schema, + }); + }); + } + // May have changed due to deduplicate + step = this.stepTracker.getStepById(step.id); + if (haltTree) { + const isNonNull = isNonNullType(fieldType); + outputPlan.addChild(objectType, responseKey, { + type: "outputPlan", + outputPlan: new OutputPlan_js_1.OutputPlan(fieldLayerPlan, step, OUTPUT_PLAN_TYPE_NULL, locationDetails), + isNonNull, + locationDetails, + }); + } + else { + this.planIntoOutputPlan(outputPlan, fieldLayerPlan, fieldPath, polymorphicPath, polymorphicPaths, + // If one field has a selection set, they all have a selection set (guaranteed by validation). + field.selectionSet != null + ? fieldNodes.flatMap((n) => n.selectionSet.selections) + : undefined, objectType, responseKey, fieldType, step, locationDetails, resolverEmulation, 0, streamDetails); + } + } + finally { + outputPlan.layerPlan.latestSideEffectStep = $sideEffect; + } + } + if (groupedFieldSet.deferred !== undefined) { + for (const deferred of groupedFieldSet.deferred) { + const deferredLayerPlan = new LayerPlan_js_1.LayerPlan(this, outputPlan.layerPlan, { + type: "defer", + label: deferred.label, + }); + const deferredOutputPlan = new OutputPlan_js_1.OutputPlan(deferredLayerPlan, outputPlan.rootStep, { + mode: "object", + deferLabel: deferred.label, + typeName: objectType.name, + }, + // LOGGING: the location details should be tweaked to reference this + // fragment + outputPlan.locationDetails); + const $sideEffect = deferredOutputPlan.layerPlan.latestSideEffectStep; + try { + outputPlan.deferredOutputPlans.push(deferredOutputPlan); + this.processGroupedFieldSet(deferredOutputPlan, path, polymorphicPath, polymorphicPaths, parentStep, objectType, objectTypeFields, isMutation, deferred); + } + finally { + deferredOutputPlan.layerPlan.latestSideEffectStep = $sideEffect; + } + } + } + } + /** + * + * @param outputPlan - The output plan that this selection set is being added to + * @param path - The path within the outputPlan that we're adding stuff (only for root/object OutputPlans) + * @param parentStep - The step that represents the selection set root + * @param objectType - The object type that this selection set is being evaluated for (note polymorphic selection should already have been handled by this point) + * @param selections - The GraphQL selections (fields, fragment spreads, inline fragments) to evaluate + * @param isMutation - If true this selection set should be executed serially rather than in parallel (each field gets its own LayerPlan) + */ + planSelectionSet(outputPlan, path, polymorphicPath, polymorphicPaths, parentStep, objectType, selections, resolverEmulation, isMutation = false) { + if (this.loc !== null) { + this.loc.push(`planSelectionSet(${objectType.name} @ ${outputPlan.layerPlan.id} @ ${path.join(".")} @ ${polymorphicPath ?? ""})`); + } + if (index_js_1.isDev) { + assertObjectType(objectType); + } + const groupedFieldSet = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(outputPlan.layerPlan, polymorphicPaths, graphqlCollectFields_js_1.graphqlCollectFields, null, this, parentStep.id, objectType, selections, (0, graphqlCollectFields_js_1.newSelectionSetDigest)(resolverEmulation), isMutation); + const objectTypeFields = objectType.getFields(); + this.processGroupedFieldSet(outputPlan, path, polymorphicPath, polymorphicPaths, parentStep, objectType, objectTypeFields, isMutation, groupedFieldSet); + if (this.loc !== null) + this.loc.pop(); + } + internalDependency($step) { + this.stepTracker.internalDependencies.add($step); + return $step; + } + // Similar to the old 'planFieldReturnType' + planIntoOutputPlan(parentOutputPlan, + // Typically this is parentOutputPlan.layerPlan; but in the case of mutationFields it isn't. + parentLayerPlan, + // This is the LAYER-RELATIVE path, not the absolute path! It resets! + path, polymorphicPath, polymorphicPaths, selections, parentObjectType, responseKey, fieldType, $step, locationDetails, resolverEmulation, listDepth, streamDetails) { + const nullableFieldType = getNullableType(fieldType); + const isNonNull = nullableFieldType !== fieldType; + if (isListType(nullableFieldType)) { + const $list = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(parentLayerPlan, polymorphicPaths, connection_js_1.itemsOrStep, null, $step); + if ($list !== $step) { + $list._stepOptions.stream = $step._stepOptions.stream; + } + $list._stepOptions.walkIterable = true; + const listOutputPlan = new OutputPlan_js_1.OutputPlan(parentLayerPlan, $list, OUTPUT_PLAN_TYPE_ARRAY, locationDetails); + parentOutputPlan.addChild(parentObjectType, responseKey, { + type: "outputPlan", + outputPlan: listOutputPlan, + isNonNull, + locationDetails, + }); + const stream = streamDetails + ? { + // These are already marked as internal dependencies + initialCountStepId: streamDetails.initialCount.id, + ifStepId: streamDetails.if.id, + labelStepId: streamDetails.label.id, + } + : undefined; + let $__item = this.itemStepForListStep(parentLayerPlan, $list, listDepth, stream); + const $sideEffect = $__item.layerPlan.latestSideEffectStep; + try { + let $item; + if ((0, step_js_1.isListCapableStep)($list)) { + $item = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)($__item.layerPlan, $__item.polymorphicPaths, $list.listItem, $list, $__item); + this.deduplicateSteps(); + // Refetch steps following deduplicate + $__item = this.stepTracker.getStepById($__item.id); + $item = this.stepTracker.getStepById($item.id); + } + else { + $item = $__item; + } + this.planIntoOutputPlan(listOutputPlan, $item.layerPlan, path, polymorphicPath, polymorphicPaths, selections, null, null, nullableFieldType.ofType, $item, locationDetails, resolverEmulation, listDepth + 1, null); + } + finally { + $__item.layerPlan.latestSideEffectStep = $sideEffect; + } + } + else if (isScalarType(nullableFieldType)) { + const scalarPlanResolver = nullableFieldType.extensions?.grafast?.plan; + const fnDescription = `${nullableFieldType.name}.plan`; + (0, utils_js_1.assertNotAsync)(scalarPlanResolver, fnDescription); + const $sideEffect = parentLayerPlan.latestSideEffectStep; + try { + const $leaf = typeof scalarPlanResolver === "function" + ? (0, utils_js_1.assertNotPromise)((0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(parentLayerPlan, polymorphicPaths, scalarPlanResolver, null, $step, this.scalarPlanInfo), scalarPlanResolver, fnDescription) + : $step; + parentOutputPlan.addChild(parentObjectType, responseKey, { + type: "outputPlan", + isNonNull, + outputPlan: new OutputPlan_js_1.OutputPlan(parentLayerPlan, $leaf, { + mode: "leaf", + // stepId: $leaf.id, + graphqlType: nullableFieldType, + }, locationDetails), + locationDetails, + }); + } + finally { + parentLayerPlan.latestSideEffectStep = $sideEffect; + } + } + else if (isEnumType(nullableFieldType)) { + const $sideEffect = parentLayerPlan.latestSideEffectStep; + try { + parentOutputPlan.addChild(parentObjectType, responseKey, { + type: "outputPlan", + isNonNull, + outputPlan: new OutputPlan_js_1.OutputPlan(parentLayerPlan, $step, { + mode: "leaf", + graphqlType: nullableFieldType, + }, locationDetails), + locationDetails, + }); + } + finally { + parentLayerPlan.latestSideEffectStep = $sideEffect; + } + } + else if (isObjectType(nullableFieldType)) { + if (index_js_1.isDev) { + // Check that the plan we're dealing with is the one the user declared + /** Either an assertion function or a step class */ + const stepAssertion = nullableFieldType.extensions?.grafast?.assertStep; + if (stepAssertion != null) { + try { + if (stepAssertion === index_js_1.Step || + stepAssertion.prototype instanceof index_js_1.Step) { + if (!($step instanceof stepAssertion)) { + throw new Error(`Step mis-match: expected ${stepAssertion.name}, but instead found ${$step.constructor.name} (${$step})`); + } + } + else { + stepAssertion($step); + } + } + catch (e) { + throw new Error(`The step returned by '${path.join(".")}${"[]".repeat(listDepth)}' is not compatible with the GraphQL object type '${nullableFieldType.name}': ${e.message}`, { cause: e }); + } + } + if (!selections) { + throw new Error(`GrafastInternalError<7fe4f7d1-01d2-4f1e-add6-5aa6936938c9>: no selections on a GraphQLObjectType?!`); + } + } + let objectLayerPlan; + if (isNonNull || + (parentLayerPlan.reason.type === "nullableBoundary" && + parentLayerPlan.rootStep === $step)) { + objectLayerPlan = parentLayerPlan; + } + else { + // Find existing match + const match = parentLayerPlan.children.find((clp) => clp.reason.type === "nullableBoundary" && + clp.reason.parentStep === $step); + if (match !== undefined) { + objectLayerPlan = match; + } + else { + objectLayerPlan = new LayerPlan_js_1.LayerPlan(this, parentLayerPlan, { + type: "nullableBoundary", + parentStep: $step, + }); + objectLayerPlan.setRootStep($step); + } + } + const $sideEffect = objectLayerPlan.latestSideEffectStep; + try { + const objectOutputPlan = new OutputPlan_js_1.OutputPlan(objectLayerPlan, $step, { + mode: "object", + deferLabel: undefined, + typeName: nullableFieldType.name, + }, locationDetails); + parentOutputPlan.addChild(parentObjectType, responseKey, { + type: "outputPlan", + outputPlan: objectOutputPlan, + isNonNull, + locationDetails, + }); + this.planSelectionSet(objectOutputPlan, path, polymorphicPath, polymorphicPaths, $step, nullableFieldType, selections, resolverEmulation); + } + finally { + objectLayerPlan.latestSideEffectStep = $sideEffect; + } + } + else { + // Polymorphic + const isUnion = isUnionType(nullableFieldType); + const isInterface = isInterfaceType(nullableFieldType); + if (!(isUnion || isInterface)) { + throw new Error(`GrafastInternalError: Wasn't expecting ${nullableFieldType}`); + } + assert.ok(selections, "GrafastInternalError: A polymorphic type with no selections is invalid"); + /* + * Planning for polymorphic types is somewhat more complicated than for + * other types. + * + * First, we figure out the list of `possibleTypes` based on the + * union/interface and any other constraints that we know. NOTE: we can't + * discount a type just because it doesn't have any fragments that apply + * to it - instead we must still plan an empty selection set (or one just + * using `{__typename}`), and we need to know it exists for that. See + * https://github.com/graphql/graphql-spec/issues/951#issuecomment-1140957685 + */ + const allPossibleObjectTypes = isUnion + ? nullableFieldType.getTypes() + : this.schema.getImplementations(nullableFieldType).objects; + if (allPossibleObjectTypes.length === 0) { + /* If there are no implementations, simply stop via a null output plan */ + const nullOutputPlan = new OutputPlan_js_1.OutputPlan(parentLayerPlan, $step, OUTPUT_PLAN_TYPE_NULL, locationDetails); + parentOutputPlan.addChild(parentObjectType, responseKey, { + type: "outputPlan", + outputPlan: nullOutputPlan, + isNonNull, + locationDetails, + }); + } + else { + /* + * Next, we ensure we're dealing with a polymorphic step. + */ + if (!(0, step_js_1.isPolymorphicStep)($step)) { + throw new Error(`${$step} is not a polymorphic capable step, it must have a planForType method`); + } + /* + * An output plan for it (knows how to branch the different object + * output plans). + */ + const polymorphicOutputPlan = new OutputPlan_js_1.OutputPlan(parentLayerPlan, $step, { + mode: "polymorphic", + deferLabel: undefined, + typeNames: allPossibleObjectTypes.map((t) => t.name), + }, locationDetails); + parentOutputPlan.addChild(parentObjectType, responseKey, { + type: "outputPlan", + outputPlan: polymorphicOutputPlan, + isNonNull, + locationDetails, + }); + /* + * Now a polymorphic layer plan for all the plans to live in + */ + const polymorphicLayerPlan = this.getPolymorphicLayerPlan(parentLayerPlan, path, $step, allPossibleObjectTypes); + /* + * Now we need to loop through each type and plan it. + */ + const polyBase = polymorphicPath ?? ""; + const $oldStep = $step; + for (const type of allPossibleObjectTypes) { + const $sideEffect = polymorphicLayerPlan.latestSideEffectStep; + try { + /* TODO: this $oldStep / $step dance turned out to be necessary + * because `$step` was being replaced in the following query against + * the graphilecrystaltest `polymorpic` schema; but I'm not sure this is the + * right behavior - shouldn't deduplication have been temporarily + * disabled during this? + * + * ```graphql + * { + * allSingleTableItems { + * nodes { + * id + * type + * singleTableItemsByParentIdList { + * id + * position + * } + * } + * } + * } + * ``` + */ + const $step = this.stepTracker.getStepById($oldStep.id); + // Bit of a hack, but saves passing it around through all the arguments + const newPolymorphicPath = `${polyBase}>${type.name}`; + polymorphicLayerPlan.reason.polymorphicPaths.add(newPolymorphicPath); + const newPolymorphicPaths = new Set(); + newPolymorphicPaths.add(newPolymorphicPath); + const $root = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(polymorphicLayerPlan, newPolymorphicPaths, $step.planForType, $step, type); + const objectOutputPlan = new OutputPlan_js_1.OutputPlan(polymorphicLayerPlan, $root, { + mode: "object", + deferLabel: undefined, + typeName: type.name, + }, locationDetails); + // find all selections compatible with `type` + const fieldNodes = (0, graphqlMergeSelectionSets_js_1.fieldSelectionsForType)(this, type, selections); + this.planSelectionSet(objectOutputPlan, path, newPolymorphicPath, newPolymorphicPaths, $root, type, fieldNodes, false); + polymorphicOutputPlan.addChild(type, null, { + type: "outputPlan", + isNonNull, + outputPlan: objectOutputPlan, + locationDetails, + }); + } + finally { + polymorphicLayerPlan.latestSideEffectStep = $sideEffect; + } + } + } + } + } + getPolymorphicLayerPlan(parentLayerPlan, path, $step, allPossibleObjectTypes) { + // OPTIMIZE: I added the $step.id to pathString to fix a planning issue; but maybe we can do this without branching? + // https://github.com/benjie/crystal/issues/109 + const pathString = `${path.join("|")}!${$step.id}`; + const polymorphicLayerPlanByPath = this.polymorphicLayerPlanByPathByLayerPlan.get(parentLayerPlan) ?? + new Map(); + if (polymorphicLayerPlanByPath.size === 0) { + this.polymorphicLayerPlanByPathByLayerPlan.set(parentLayerPlan, polymorphicLayerPlanByPath); + } + const prev = polymorphicLayerPlanByPath.get(pathString); + if (prev !== undefined) { + // NOTE: this is typically hit when you have a polymorphic field inside + // another polymorphic field - in these cases rather than having the + // polymorphism multiply out, we can aim for fewer polymorphic buckets + // keeping the plan simpler (and more efficient). + const { stepId, layerPlan } = prev; + const stepByStepId = this.stepTracker.getStepById(stepId); + const stepBy$stepId = this.stepTracker.getStepById($step.id); + if (stepByStepId !== stepBy$stepId) { + throw new Error(`GrafastInternalError: unexpected inconsistency when determining the polymorphic LayerPlan to use (pathString = ${pathString}, ${stepByStepId} (${stepId}) != ${stepBy$stepId} (${$step.id}))`); + } + for (const t of allPossibleObjectTypes) { + if (!layerPlan.reason.typeNames.includes(t.name)) { + // Since we're re-using an existing LayerPlan, we should be careful to + // ensure none of the previous assumptions have been broken. + layerPlan.reason.typeNames.push(t.name); + } + } + return layerPlan; + } + else { + const layerPlan = new LayerPlan_js_1.LayerPlan(this, parentLayerPlan, { + type: "polymorphic", + typeNames: allPossibleObjectTypes.map((t) => t.name), + parentStep: $step, + polymorphicPaths: new Set(), + }); + polymorphicLayerPlanByPath.set(pathString, { + stepId: $step.id, + layerPlan, + }); + return layerPlan; + } + } + planField(typeName, fieldName, layerPlan, path, polymorphicPaths, planResolver, applyAfterMode, rawParentStep, field, trackedArguments, + // If 'true' this is a subscription rather than a stream + // If 'false' this is a list but it will never stream + // If 'null' this is neither subscribe field nor list field + // Otherwise, it's a list field that has the `@stream` directive applied + streamDetails, deduplicate = true) { + const coordinate = `${typeName}.${fieldName}`; + // The step may have been de-duped whilst sibling steps were planned + // PERF: this should be handled in the parent? + const parentStep = this.stepTracker.getStepById(rawParentStep.id); + const previousStepCount = this.stepTracker.stepCount; + const previousSideEffectStep = layerPlan.latestSideEffectStep; + if (this.loc !== null) + this.loc.push(`planField(${path.join(".")})`); + try { + let step = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(layerPlan, polymorphicPaths, operationPlan_input_js_1.withFieldArgsForArguments, null, this, trackedArguments, field, parentStep, applyAfterMode, coordinate, (fieldArgs) => planResolver(parentStep, fieldArgs, { + fieldName, + field, + schema: this.schema, + })); + let haltTree = false; + if (step === null || (step instanceof constant_js_1.ConstantStep && step.isNull())) { + // Constantly null; do not step any further in this tree. + step = + step || + // `withGlobalLayerPlan(layerPlan, polymorphicPaths, () => constant(null))` but with reduced memory allocation + (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(layerPlan, polymorphicPaths, constant_js_1.constant, null, null); + haltTree = true; + } + (0, step_js_1.assertExecutableStep)(step); + if (streamDetails === true) { + // subscription + step._stepOptions.stream = {}; + step._stepOptions.walkIterable = true; + } + else if (streamDetails === false) { + step._stepOptions.walkIterable = true; + } + else if (streamDetails != null) { + step._stepOptions.stream = { + initialCountStepId: streamDetails.initialCount.id, + ifStepId: streamDetails.if.id, + labelStepId: streamDetails.label.id, + }; + step._stepOptions.walkIterable = true; + } + if (deduplicate) { + // Now that the field has been planned (including arguments, but NOT + // including selection set) we can deduplicate it to see if any of its + // peers are identical. + this.deduplicateSteps(); + // After deduplication, this step may have been substituted; get the + // updated reference. + step = this.stepTracker.getStepById(step.id); + } + return { step, haltTree }; + } + catch (e) { + if (ALWAYS_THROW_PLANNING_ERRORS) { + throw e; + } + if (THROW_PLANNING_ERRORS_ON_SIDE_EFFECTS) { + for (let i = previousStepCount; i < this.stepTracker.stepCount; i++) { + const step = this.stepTracker.stepById[i]; + if (step && step.hasSideEffects) { + throw e; + } + } + } + try { + this.stepTracker.purgeBackTo(previousStepCount); + layerPlan.latestSideEffectStep = previousSideEffectStep; + } + catch (e2) { + console.error(`Cleanup error occurred whilst trying to recover from field planning error: ${e2.stack}`); + throw e; + } + const step = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(layerPlan, polymorphicPaths, index_js_1.error, null, e); + const haltTree = true; + // PERF: consider deleting all steps that were allocated during this. For + // now we'll just rely on tree-shaking. + return { step, haltTree }; + } + finally { + if (this.loc !== null) + this.loc.pop(); + } + } + /** + * A replacement for GraphQL's + * `CoerceArgumentValues` that factors in tracked variables. + * + * @see https://spec.graphql.org/draft/#CoerceArgumentValues() + */ + getTrackedArguments(argumentDefinitions, field) { + const argumentValues = field.arguments; + const trackedArgumentValues = Object.create(null); + for (const argumentDefinition of argumentDefinitions) { + const argumentName = argumentDefinition.name; + if (index_js_1.isDev && trackedArgumentValues[argumentName]) { + throw new index_js_1.SafeError(`Argument name '${argumentName}' seen twice; aborting.`); + } + const argumentType = argumentDefinition.type; + const defaultValue = argumentDefinition.defaultValue + ? (0, utils_js_1.defaultValueToValueNode)(argumentType, argumentDefinition.defaultValue) + : undefined; + const argumentValue = argumentValues?.find((v) => v.name.value === argumentName); + const argumentPlan = (0, input_js_1.inputStep)(this, argumentType, argumentValue?.value, defaultValue); + trackedArgumentValues[argumentName] = argumentPlan; + } + return { + get(name) { + return trackedArgumentValues[name]; + }, + }; + } + /** + * Sets up tracking for the given value (variableValues, context, rootValue). + */ + track(value, constraints, variableDefinitions) { + const valueStep = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, newValueStepCallback, null, variableDefinitions != null); + const trackedObjectStep = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, () => new index_js_1.__TrackedValueStep(value, valueStep, constraints, [], variableDefinitions != null, variableDefinitions)); + return [valueStep, trackedObjectStep]; + } + /** + * Checks that no step has a property on it whose value is another step. It + * should addDependency instead. + */ + validateSteps(offset = 0) { + const errors = []; + for (const step of this.stepTracker.activeSteps) { + if (step.id < offset) + continue; + for (const key in step) { + const val = step[key]; + if (key !== "implicitSideEffectStep" && + val instanceof index_js_1.Step) { + errors.push(new Error(`ERROR: ExecutableStep ${step} has illegal reference via property '${key}' to step ${val}. You must not reference steps directly, instead add the step as a dependency (\`depId = this.addDependency($step)\`) and use \`this.getDep(depId)\` to look the step up (or, if the step is not a dependency, store the step ID and use \`this.getStep(stepId)\` each time you need to reference it). Failure to comply could result in subtle breakage during optimisation.`)); + } + } + } + if (errors.length > 0) { + console.error(errors.map((e) => e.message).join("\n")); + throw errors[0]; + } + } + replaceStep($original, $replacement) { + this.stepTracker.replaceStep($original, $replacement); + } + processStep(actionDescription, order, isReadonly, callback, processed, step) { + // MUST come before anything else, otherwise infinite loops may occur + processed.add(step); + if (!this.stepTracker.activeSteps.has(step)) { + return step; + } + if (order === "dependents-first") { + // used for: pushDown, optimize + for (let i = 0; i < step.dependents.length; i++) { + const entry = step.dependents[i]; + const { step: $processFirst } = entry; + if (!processed.has($processFirst)) { + this.processStep(actionDescription, order, isReadonly, callback, processed, $processFirst); + if (step.dependents[i] !== entry) { + // The world has change; go back to the start + i = -1; + } + } + } + const subroutineLayerPlan = step[interfaces_js_1.$$subroutine]; + if (subroutineLayerPlan !== null) { + const $root = subroutineLayerPlan.rootStep; + if ($root) { + this.processStep(actionDescription, order, isReadonly, callback, processed, $root); + } + } + } + else { + // used for: hoist + for (const $processFirst of (0, utils_js_1.sudo)(step).dependencies) { + if (!processed.has($processFirst)) { + this.processStep(actionDescription, order, isReadonly, callback, processed, $processFirst); + } + } + } + // Check again, processing another step may have invalidated this one. + if (!this.stepTracker.activeSteps.has(step)) { + return step; + } + let replacementStep = step; + try { + replacementStep = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(step.layerPlan, step.polymorphicPaths, callback, this, step); + } + catch (e) { + console.error(`Error occurred during ${actionDescription}; whilst processing ${step} in ${order} mode an error occurred:`, e); + throw e; + } + if (!replacementStep) { + throw new Error(`The callback did not return a step during ${actionDescription}`); + } + if (isReadonly) { + if (replacementStep !== step) { + throw new Error(`Replacing step in readonly mode is not permitted!`); + } + } + else { + if (replacementStep !== step) { + this.replaceStep(step, replacementStep); + } + this.deduplicateSteps(); + } + return replacementStep; + } + // PERF: optimize + /** + * Process the given steps, either dependencies first (root to leaf) or + * dependents first (leaves to root). + * + * @internal + */ + processSteps(actionDescription, order, isReadonly, callback) { + if (index_js_1.isDev) + this.stepTracker.lockNewSteps(); + const previousStepCount = this.stepTracker.stepCount; + const processed = new Set(); + for (let i = 0; i < this.stepTracker.stepCount; i++) { + const step = this.stepTracker.getStepById(i, true); + // Check it hasn't been tree-shaken away, or already processed + if (!step || step.id !== i || processed.has(step)) + continue; + const resultStep = this.processStep(actionDescription, order, isReadonly, callback, processed, step); + if (index_js_1.isDev) { + const plansAdded = this.stepTracker.stepCount - previousStepCount; + // NOTE: whilst processing steps new steps may be added, thus we must loop + // ascending and we must re-evaluate this.stepTracker.stepCount on each loop + // iteration. + if (plansAdded > 100000) { + throw new Error(`Whilst processing steps as part of ${actionDescription}Plans, ${plansAdded} new steps have been created... That seems like it's likely a bug in the relevant method of one of your steps. The last plan processed was ${resultStep}`); + } + } + if ((isReadonly || index_js_1.isDev) && + this.stepTracker.stepCount > previousStepCount) { + if (isReadonly) { + throwNoNewStepsError(this, actionDescription, step, previousStepCount, "Creating steps in isReadonly mode is forbidden"); + } + if (index_js_1.isDev) + this.stepTracker.lockNewSteps(); + } + } + if (!isReadonly && + this.phase !== "plan" && + this.stepTracker.stepCount > previousStepCount) { + // Any time new steps are added we should validate them. All plans are + // validated once "plan" is finished, so no need to do it here for that + // phase. + this.validateSteps(previousStepCount); + } + } + /** + * Peers are steps of the same type (but not the same step!) that are in + * compatible layers and have the same dependencies. Peers must not have side + * effects. A step is not its own peer. + */ + getPeers(step) { + if (step.hasSideEffects) { + // Plans with side effects have no peers. + return EMPTY_ARRAY; + } + if (step._stepOptions.stream) { + // Streams have no peers - we cannot reference the stream more + // than once (and we aim to not cache the stream because we want its + // entries to be garbage collected). + // + // HOWEVER! There may be lifecycle parts that need to be called... So + // call the function with an empty array; ignore the result. + return EMPTY_ARRAY; + } + // NOTE: Streams have no peers - we cannot reference the stream more than + // once (and we aim to not cache the stream because we want its entries to + // be garbage collected) - however if we're already fetching the list then + // we shouldn't fetch it again via stream... We should deduplicate a stream + // to return a non-stream. + if (step._stepOptions.stream != null) { + // TODO: remove this if block when we implement the new stream/defer - + // deduplicating a stream should be fine. (Not subscriptions though - may + // need a check for that!) + return EMPTY_ARRAY; + } + if (this.stepTracker.internalDependencies.has(step)) { + // PERF: we need to set up correct tracking, then internal deps can be deduped + return EMPTY_ARRAY; + } + const sstep = (0, utils_js_1.sudo)(step); + const { dependencies: deps, dependencyForbiddenFlags: flags, dependencyOnReject: onReject, layerPlan: layerPlan, constructor: stepConstructor, peerKey, } = sstep; + // const streamInitialCount = sstep._stepOptions.stream?.initialCount; + const dependencyCount = deps.length; + if (dependencyCount === 0) { + let allPeers = null; + const stepsWithNoDependencies = this.stepTracker.stepsWithNoDependenciesByConstructor.get(step.constructor) ?? new Set(); + for (const possiblyPeer of stepsWithNoDependencies) { + if (possiblyPeer !== step && + !possiblyPeer.hasSideEffects && + possiblyPeer.layerPlan === layerPlan && + possiblyPeer._stepOptions.stream == null && + possiblyPeer.peerKey === peerKey + // && possiblyPeer._stepOptions.stream?.initialCount === streamInitialCount + ) { + if (allPeers === null) { + allPeers = [possiblyPeer]; + } + else { + allPeers.push(possiblyPeer); + } + } + } + return allPeers === null ? EMPTY_ARRAY : allPeers; + } + else if (dependencyCount === 1) { + // Optimized form for steps that have one dependency (extremely common!) + const dependencyIndex = 0; + const { ancestry, deferBoundaryDepth } = layerPlan; + const dep = deps[dependencyIndex]; + const dl = dep.dependents.length; + if (dl === 1) { + // We're the only dependent; therefore we have no peers (since peers + // share dependencies) + return EMPTY_ARRAY; + } + const minDepth = Math.max(deferBoundaryDepth, dep.layerPlan.depth); + let allPeers = null; + for (const { dependencyIndex: peerDependencyIndex, step: rawPossiblyPeer, } of dep.dependents) { + if (peerDependencyIndex !== dependencyIndex || + rawPossiblyPeer === step || + rawPossiblyPeer.hasSideEffects || + rawPossiblyPeer._stepOptions.stream != null || + rawPossiblyPeer.constructor !== stepConstructor || + rawPossiblyPeer.peerKey !== peerKey + // || rawPossiblyPeer._stepOptions.stream?.initialCount !== streamInitialCount + ) { + continue; + } + const possiblyPeer = (0, utils_js_1.sudo)(rawPossiblyPeer); + const { layerPlan: peerLayerPlan, dependencyForbiddenFlags: peerFlags, dependencyOnReject: peerOnReject, } = possiblyPeer; + if (peerLayerPlan.depth >= minDepth && + possiblyPeer.dependencies.length === dependencyCount && + peerLayerPlan === ancestry[peerLayerPlan.depth] && + peerFlags[dependencyIndex] === flags[dependencyIndex] && + peerOnReject[dependencyIndex] === onReject[dependencyIndex]) { + if (allPeers === null) { + allPeers = [possiblyPeer]; + } + else { + allPeers.push(possiblyPeer); + } + } + } + return allPeers === null ? EMPTY_ARRAY : allPeers; + } + else { + const { ancestry, deferBoundaryDepth } = layerPlan; + /** + * "compatible" layer plans are calculated by walking up the layer plan tree, + * however: + * + * - do not pass the LayerPlan of one of the dependencies + * - do not pass a "deferred" layer plan + * + * Compatible layer plans are no less deep than minDepth. + */ + let minDepth = deferBoundaryDepth; + const possiblePeers = []; + // Loop backwards since last dependency is most likely to be most unique + for (let dependencyIndex = dependencyCount - 1; dependencyIndex >= 0; dependencyIndex--) { + const dep = deps[dependencyIndex]; + const dl = dep.dependents.length; + if (dl === 1) { + // We're the only dependent; therefore we have no peers (since peers + // share dependencies) + return EMPTY_ARRAY; + } + if (dependencyIndex === dependencyCount - 1) { + // Check the final dependency - this is likely to have the fewest + // dependents (since it was added last it's more likely to be + // unique). + for (const { dependencyIndex: peerDependencyIndex, step: rawPossiblyPeer, } of dep.dependents) { + if (peerDependencyIndex !== dependencyIndex || + rawPossiblyPeer === step || + rawPossiblyPeer.hasSideEffects || + rawPossiblyPeer._stepOptions.stream != null || + rawPossiblyPeer.constructor !== stepConstructor || + rawPossiblyPeer.peerKey !== peerKey + // || rawPossiblyPeer._stepOptions.stream?.initialCount !== streamInitialCount + ) { + continue; + } + const possiblyPeer = (0, utils_js_1.sudo)(rawPossiblyPeer); + const { layerPlan: peerLayerPlan, dependencyForbiddenFlags: peerFlags, dependencyOnReject: peerOnReject, dependencies: peerDependencies, } = possiblyPeer; + if (peerDependencies.length === dependencyCount && + peerLayerPlan === ancestry[peerLayerPlan.depth] && + peerFlags[dependencyIndex] === flags[dependencyIndex] && + peerOnReject[dependencyIndex] === onReject[dependencyIndex]) { + possiblePeers.push(possiblyPeer); + } + } + } + const d = dep.layerPlan.depth; + if (d > minDepth) { + minDepth = d; + } + } + if (possiblePeers.length === 0) { + return EMPTY_ARRAY; + } + let allPeers = null; + outerloop: for (const possiblyPeer of possiblePeers) { + if (possiblyPeer.layerPlan.depth < minDepth) + continue; + // We know the final dependency matches and the dependency count + // matches - check the other dependencies match. + for (let i = 0; i < dependencyCount - 1; i++) { + if (deps[i] !== (0, utils_js_1.sudo)(possiblyPeer).dependencies[i]) { + continue outerloop; + } + } + if (allPeers === null) { + allPeers = [possiblyPeer]; + } + else { + allPeers.push(possiblyPeer); + } + } + return allPeers === null ? EMPTY_ARRAY : allPeers; + } + } + isImmoveable(step) { + if (step.hasSideEffects) { + return true; + } + if (isPrepopulatedStep(step)) { + return true; + } + if (step[interfaces_js_1.$$subroutine] !== null) { + // Don't hoist steps that are the parent of a subroutine + // PERF: we _should_ be able to hoist, but care must be taken. Currently it causes test failures. + return true; + } + return false; + } + /** + * Attempts to hoist the step into a higher layerPlan to maximize + * deduplication. + */ + hoistStep(step) { + if (this.isImmoveable(step)) { + return; + } + // PERF: would be nice to prevent ConstantStep from being hoisted - we + // don't want to keep multiplying up and up its data as it traverses the buckets - would be better + // to push the step down to the furthest level and then have it run there straight away. + // PERF: actually... might be better to specifically replace all + // ConstantStep dependencies with a bucket-local ConstantStep as one of the + // final steps of optimize. + /* // This is disabled because it breaks pgSelect's `mergePlaceholdersInto` logic. + if (step instanceof __InputStaticLeafStep || step instanceof ConstantStep) { + // More optimal to not hoist these - they convert to `constant()` which executes to produce a filled array incredibly efficiently. + return true; + } + */ + if (step.layerPlan.parentLayerPlan?.reason.type === "mutationField") { + // Never hoist into a mutation layer + return; + } + switch (step.layerPlan.reason.type) { + case "root": { + // There is no higher layerPlan + return; + } + case "subscription": + case "defer": { + // Should be deferred, don't evaluate early (unless it's cheap to do so) + if (step.isSyncAndSafe) { + // It's cheap, try and hoist it + break; + } + else { + return; + } + } + case "polymorphic": { + // May only need to be evaluated for certain types, so avoid hoisting anything expensive. + if (step.isSyncAndSafe && + step.polymorphicPaths.size === + step.layerPlan.reason.polymorphicPaths.size) { + // It's cheap and covers all types, try and hoist it. + // NOTE: I have concerns about whether this is safe or not, but I + // have not been able to come up with a counterexample that is + // unsafe. Should we do so, we should remove this. + break; + } + else if (step instanceof index_js_1.__FlagStep) { + break; + } + else { + return; + } + } + case "subroutine": { + // Should be safe to hoist. + break; + } + case "nullableBoundary": { + // Safe to hoist _unless_ it depends on the root step of the nullableBoundary. + const $root = step.layerPlan.reason.parentStep; + if ((0, utils_js_1.sudo)(step).dependencies.includes($root)) { + return; + } + else { + break; + } + } + case "listItem": { + // Should be safe to hoist so long as it doesn't depend on the + // `__ItemStep` itself (which is just a regular dependency, so it'll be + // checked later). + // NOTE: this is true even if the listItem streams. + break; + } + case "mutationField": { + // NOTE: It's the user's responsibility to ensure that steps that have + // side effects are marked as such via `step.hasSideEffects = true`. + if (step.isSyncAndSafe && !step.hasSideEffects) { + if (step.layerPlan.reason.mutationIndex === 0) { + // Safe to hoist inside first mutation; but all later mutations may be impacted by previous actions. + break; + } + // OPTIMIZE: figure out under which circumstances it is safe to hoist here. + // break; + return; + } + else if (step instanceof index_js_1.__FlagStep) { + break; + } + else { + // Plans that rely on external state shouldn't be hoisted because + // their results may change after a mutation, so the mutation should + // run first. + return; + } + } + default: { + const never = step.layerPlan.reason; + throw new Error(`GrafastInternalError<81e3a7d4-aaa0-416b-abbb-a887734007bc>: unhandled layer plan reason ${(0, inspect_js_1.inspect)(never)}`); + } + } + // Finally, check that none of its dependencies are in the same bucket. + const deps = (0, utils_js_1.sudo)(step).dependencies; + if (deps.some((dep) => dep.layerPlan === step.layerPlan)) { + return; + } + // All our checks passed, hoist it. + assert.ok(step.layerPlan.parentLayerPlan !== null, "GrafastInternalError<55c8940f-e8ac-4985-8b34-96fc6f81d62d>: A non-root layer plan had no parent?!"); + // 1: adjust polymorphicPaths to fit new layerPlan + if (step.layerPlan.reason.type === "polymorphic") { + // PERF: this is cacheable + /** The closest ancestor layer plan that is polymorphic */ + let ancestor = step.layerPlan; + while ((ancestor = ancestor.parentLayerPlan)) { + if (ancestor.reason.type === "polymorphic") { + break; + } + } + const parentPolymorphicPaths = ancestor + ? ancestor.reason + .polymorphicPaths + : exports.POLYMORPHIC_ROOT_PATHS; + const myPaths = [...step.polymorphicPaths]; + if (parentPolymorphicPaths?.has(myPaths[0])) { + // All the others must be valid too + } + else if (parentPolymorphicPaths === null) { + step.polymorphicPaths = null; + } + else { + const layerPaths = [...step.layerPlan.reason.polymorphicPaths]; + const newPaths = new Set(); + for (const path of parentPolymorphicPaths) { + const prefix = path + ">"; + const matches = myPaths.filter((p) => p.startsWith(prefix)); + const layerMatches = layerPaths.filter((p) => p.startsWith(prefix)); + if (matches.length !== layerMatches.length) { + // Can't hoist because it's not used for all polymorphicPaths of this type + return; + } + else if (matches.length > 0) { + newPaths.add(path); + } + } + step.polymorphicPaths = newPaths; + } + } + const $subroutine = step.layerPlan.reason.type === "subroutine" + ? step.layerPlan.reason.parentStep + : null; + // 2: move it up a layer + this.stepTracker.moveStepToLayerPlan(step, step.layerPlan.parentLayerPlan); + // 3: if it's was in a subroutine, the subroutine parent plan needs to list it as a dependency + if ($subroutine) { + // Naughty naughty + $subroutine.addDependency(step); + } + // Now try and hoist it again! + this.hoistStep(step); + } + /** + * Attempts to push the step into the lowest layerPlan to minimize the need + * for copying between layer plans. + */ + pushDown(step) { + if (this.isImmoveable(step)) { + return step; + } + if (step._isUnary) { + step._isUnaryLocked = true; + // Don't push unary steps down + return step; + } + switch (step.layerPlan.reason.type) { + case "root": + case "subscription": + case "defer": + case "polymorphic": + case "subroutine": + case "nullableBoundary": + case "listItem": { + // Fine to push lower + break; + } + case "mutationField": { + // NOTE: It's the user's responsibility to ensure that steps that have + // side effects are marked as such via `step.hasSideEffects = true`. + if (step.isSyncAndSafe && !step.hasSideEffects) { + break; + } + else { + // Side effects should take place inside the mutation field plan + // (that's the whole point), so we should not push these down. + return step; + } + } + default: { + const never = step.layerPlan.reason; + throw new Error(`GrafastInternalError<81e3a7d4-aaa0-416b-abbb-a887734009bc>: unhandled layer plan reason ${(0, inspect_js_1.inspect)(never)}`); + } + } + // Now find the lowest bucket that still satisfies all of it's dependents. + const dependentLayerPlans = new Set(); + const outputPlans = this.stepTracker.outputPlansByRootStep.get(step); + if (outputPlans !== undefined) { + for (const outputPlan of outputPlans) { + if (outputPlan.layerPlan === step.layerPlan) { + return step; + } + else { + dependentLayerPlans.add(outputPlan.layerPlan); + } + } + } + for (const { step: s } of step.dependents) { + if (s.layerPlan === step.layerPlan) { + return step; + } + else { + dependentLayerPlans.add(s.layerPlan); + } + } + const layerPlansByParent = this.stepTracker.layerPlansByParentStep.get(step); + if (layerPlansByParent !== undefined) { + for (const layerPlan of layerPlansByParent) { + if (layerPlan.parentLayerPlan === step.layerPlan) { + return step; + } + else { + dependentLayerPlans.add(layerPlan.parentLayerPlan); + } + } + } + const layerPlansByRoot = this.stepTracker.layerPlansByRootStep.get(step); + if (layerPlansByRoot !== undefined) { + for (const layerPlan of layerPlansByRoot) { + if (layerPlan === step.layerPlan) { + return step; + } + else { + dependentLayerPlans.add(layerPlan); + } + } + } + if (dependentLayerPlans.size === 0) { + throw new Error(`Nothing depends on ${step}?!`); + } + if (dependentLayerPlans.has(step.layerPlan)) { + throw new Error(`GrafastInternalError: This should already have been caught`); + } + const paths = []; + let minPathLength = Infinity; + for (const dependentLayerPlan of dependentLayerPlans) { + let lp = dependentLayerPlan; + const path = [lp]; + while (lp.parentLayerPlan != step.layerPlan) { + const parent = lp.parentLayerPlan; + if (!parent) { + throw new Error(`GrafastInternalError<64c07427-4fe2-43c4-9858-272d33bee0b8>: invalid layer plan heirarchy`); + } + lp = parent; + path.push(lp); + } + paths.push(path); + minPathLength = Math.min(path.length, minPathLength); + } + const dependentLayerPlanCount = dependentLayerPlans.size; + let deepest = step.layerPlan; + outerloop: for (let i = 0; i < minPathLength; i++) { + const expected = paths[0][i]; + if (expected.reason.type === "polymorphic") { + // PERF: reconsider + // Let's not pass polymorphic boundaries for now + break; + } + if (expected.reason.type === "subroutine") { + // PERF: reconsider + // Let's not pass subroutine boundaries for now + break; + } + if (expected.reason.type === "mutationField") { + // Let's not pass mutationField boundaries for now + break; + } + for (let j = 1; j < dependentLayerPlanCount; j++) { + const actual = paths[j][i]; + if (expected != actual) { + break outerloop; + } + } + deepest = expected; + } + if (deepest === step.layerPlan) { + return step; + } + // All our checks passed, shove it down! + // 1: no need to adjust polymorphicPaths, since we don't cross polymorphic boundary + // const targetPolymorphicPaths = deepest.polymorphicPaths; + // if (!targetPolymorphicPaths.has([...step.polymorphicPaths][0])) { + // throw new Error( + // `GrafastInternalError<53907e56-940a-4173-979d-bc620e4f1ff8>: polymorphic assumption doesn't hold. Mine = ${[ + // ...step.polymorphicPaths, + // ]}; theirs = ${[...deepest.polymorphicPaths]}`, + // ); + // } + // 2: move it to target layer + this.stepTracker.moveStepToLayerPlan(step, deepest); + return step; + } + _deduplicateInnerLogic(step) { + if (step instanceof index_js_1.__ItemStep) { + // __ItemStep cannot be deduplicated + return null; + } + const peers = this.getPeers(step); + // Even if there are no peers, we must still deduplicate because + // `deduplicate` is called to indicate that the field is done being + // planned, which the step class may want to acknowledge by locking certain + // facets of its functionality (such as adding filters). We'll simplify its + // work though by giving it an empty array to filter. + const wasLocked = index_js_1.isDev && (0, lock_js_1.unlock)(step); + const equivalentSteps = step.deduplicate(peers); + if (wasLocked) + (0, lock_js_1.lock)(step); + if (equivalentSteps.length === 0) { + // No other equivalents + return null; + } + if (index_js_1.isDev) { + if (!equivalentSteps.every((replacementStep) => peers.includes(replacementStep))) { + throw new Error(`deduplicatePlan error: '${step}.deduplicate' may only return steps from its peers peers (peers = ${peers}), but it returned ${equivalentSteps}. This is currently forbidden because it could cause confusion during the optimization process, instead apply this change in 'optimize', or make sure that any child selections aren't applied until the optimize/finalize phase so that no mapping is required during deduplicate.`); + } + } + // Prefer the step that's closest to the root LayerPlan; failing that, prefer the step with the lowest id. + let minDepth = step.layerPlan.depth; + let stepsAtMinDepth = [step]; + for (const step of equivalentSteps) { + const depth = step.layerPlan.depth; + if (depth < minDepth) { + minDepth = depth; + stepsAtMinDepth = [step]; + } + else if (depth === minDepth) { + stepsAtMinDepth.push(step); + } + } + stepsAtMinDepth.sort((a, z) => a.id - z.id); + return { stepsAtMinDepth, equivalentSteps }; + } + deduplicateStep(step) { + // Conditions applied to this step are now finalized, though we may still + // tell the step to do more stuff (like fetch extra data), it can no longer + // change its order, conditions, etc. + step.isArgumentsFinalized = true; + // If a step is unary at this point, it must always remain unary. + if (step._isUnary) { + step._isUnaryLocked = true; + } + if (step.deduplicate == null) + return step; + const result = this._deduplicateInnerLogic(step); + if (result == null) { + return step; + } + const { stepsAtMinDepth, equivalentSteps } = result; + // Hooray, one winning layer! Find the first one by id. + const winner = stepsAtMinDepth[0]; + if (winner.polymorphicPaths !== null) { + const polymorphicPaths = new Set(); + for (const s of stepsAtMinDepth) { + for (const p of s.polymorphicPaths) { + polymorphicPaths.add(p); + } + } + winner.polymorphicPaths = polymorphicPaths; + } + // Equivalent steps cannot be streaming; so we can no longer stream either. + if (equivalentSteps.length > 0) { + winner._stepOptions.stream = null; + } + // Give the steps a chance to pass their responsibilities to the winner. + if (winner !== step) { + const wasLocked = index_js_1.isDev && (0, lock_js_1.unlock)(step); + step.deduplicatedWith?.(winner); + if (wasLocked) + (0, lock_js_1.lock)(step); + this.stepTracker.replaceStep(step, winner); + } + for (const target of equivalentSteps) { + if (winner !== target) { + const wasLocked = index_js_1.isDev && (0, lock_js_1.unlock)(target); + target.deduplicatedWith?.(winner); + if (wasLocked) + (0, lock_js_1.lock)(target); + this.stepTracker.replaceStep(target, winner); + } + } + return winner; + } + /* + * PERF: calculation if peers for deduplicate is too expensive, and shouldn't + * be done in an expensive loop. Alternative: + * + * 1. build a `list` of the steps to deduplicate + * 2. sort this `list` into "dependencies first" order + * 3. for each step in this `list`: + * 1. calculate the list of "compatible" LayerPlans for this step (using + * cache of results of this step where possible) + * 2. find all the "peer" steps within these LayerPlans + * 3. calculate the equivalents for this step + * 4. pick the winning equivalent, replace all other instances with this + * 5. remove the replaced (and winning) steps from the `list` + * + * "compatible" layer plans are calculated by walking up the layer plan tree, + * however: + * - do not pass the LayerPlan of one of the dependencies + * - do not pass a "deferred" layer plan + * + * "Pick the winning equivalent" is challenging, here's current thought: + * + * 1. find the shallowest LayerPlans (logic already written above) + * 2. if just one shallowest LayerPlan, winner is lowest-id plan from this LayerPlan + * 3. otherwise, if all shallowest LayerPlans are polymorphic... ARGH! + * + * ARGH! WHAT DOES THIS MEAN FOR BRANCHING/NON-BRANCHING PLANS. We can + * guarantee that the dependencies must be at least a layer up (otherwise how + * can these be peers with the same dependencies?). For non-branching + * non-deferred plans, push it a layer up. + */ + deduplicateStepsProcess(processed, start, step) { + processed.add(step); + for (const dep of (0, utils_js_1.sudo)(step).dependencies) { + if (dep.id >= start && !processed.has(dep)) { + this.deduplicateStepsProcess(processed, start, dep); + } + } + (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(step.layerPlan, step.polymorphicPaths, this.phase === "plan" ? this.deduplicateStep : this.hoistAndDeduplicate, this, step); + } + /** + * Gives us a chance to replace nearly-duplicate plans with other existing + * plans (and adding the necessary transforms); this means that by the time + * we come to optimize the plan tree should already be simpler. For example + * if you have two plans at the same level that both request row data from + * the same database table with the same identifiers, `WHERE`, `LIMIT`, + * `OFFSET` and `ORDER BY`, but different `SELECT`s we could merge the two + * plans together by replacing the latter with the former and having the + * former SELECT additional fields, then transform the results back to what + * our child plans would be expecting. + */ + deduplicateSteps(depth = 0) { + const start = this.stepTracker.nextStepIdToDeduplicate; + const end = this.stepTracker.stepCount; + if (end === start) { + return; + } + const processed = new Set(); + for (let i = start; i < end; i++) { + const step = this.stepTracker.stepById[i]; + if (!step || step.id !== i || processed.has(step)) + continue; + this.deduplicateStepsProcess(processed, start, step); + } + this.stepTracker.nextStepIdToDeduplicate = end; + if (this.stepTracker.stepCount > end) { + // More steps were created during deduplicate; let's deduplicate those! + const MAX_DEPTH = 5; + if (depth > MAX_DEPTH) { + const newSteps = []; + for (let i = end, l = this.stepTracker.stepCount; i < l; i++) { + newSteps.push(this.stepTracker.stepById[i]); + } + throw new Error(`Whilst deduplicating steps, more steps were created; whilst deduplicating those, even more steps were created. This happened ${MAX_DEPTH} times, which suggests this might go on infinitely. Please check the deduplicate/deduplicatedWith methods on ${newSteps + .map((s) => String(s)) + .join(", ")}.`); + } + return this.deduplicateSteps(depth + 1); + } + } + hoistAndDeduplicate(step) { + this.hoistStep(step); + // Even if step wasn't hoisted, its deps may have been so we should still + // re-deduplicate it. + return step.deduplicate ? this.deduplicateStep(step) : step; + } + hoistSteps() { + this.processSteps("hoist", "dependencies-first", false, this.hoistAndDeduplicate); + } + pushDownSteps() { + this.processSteps("pushDown", "dependents-first", false, this.pushDown); + } + /** + * Calls the 'optimize' method on a plan, which may cause the plan to + * communicate with its (deep) dependencies, and even to replace itself with + * a different plan. + */ + optimizeStep(inStep) { + const step = inStep.allowMultipleOptimizations && inStep.deduplicate + ? this.deduplicateStep(inStep) + : inStep; + if (!step.optimize) { + step.isOptimized = true; + return step; + } + if (step.isOptimized && !step.allowMultipleOptimizations) { + return step; + } + // We know if it's streaming or not based on the LayerPlan it's contained within. + // const stepOptions = step._stepOptions; + let meta; + if (step.optimizeMetaKey !== undefined) { + meta = this.optimizeMeta.get(step.optimizeMetaKey); + if (!meta) { + meta = Object.create(null); + this.optimizeMeta.set(step.optimizeMetaKey, meta); + } + } + const wasLocked = index_js_1.isDev && (0, lock_js_1.unlock)(step); + const replacementStep = step.optimize({ + stream: step._stepOptions.stream + ? { + // We could add more details here, but for now we don't really need them? + } + : null, + meta, + }); + if (wasLocked) + (0, lock_js_1.lock)(step); + if (!replacementStep) { + throw new Error(`Bug in ${step}'s class: the 'optimize' method must return a step. Hint: did you forget 'return this;'?`); + } + step.isOptimized = true; + return replacementStep; + } + /** + * Note that we work through dependents first so we can make sure that we + * know all our dependent's needs before we optimise ourself. + */ + optimizeSteps() { + const thirdAndFutureLoopReplacedPlans = []; + for (let loops = 0; loops < MAX_OPTIMIZATION_LOOPS; loops++) { + let replacedPlan = false; + this.processSteps("optimize", "dependents-first", false, loops === 0 + ? (step) => { + const newStep = this.optimizeStep(step); + if (newStep !== step) { + replacedPlan = true; + } + return newStep; + } + : (step) => { + if (step.allowMultipleOptimizations) { + const replacement = this.optimizeStep(step); + if (replacement !== step) { + replacedPlan = true; + if (loops >= 3) { + thirdAndFutureLoopReplacedPlans.push(step); + } + } + return replacement; + } + else { + return step; + } + }); + if (!replacedPlan) { + return; + } + } + console.warn(`Optimize steps looped ${MAX_OPTIMIZATION_LOOPS} times, and was still replacing steps at the end - this could indicate a very complex plan, or badly behaved steps. Here are some of the steps that were replaced after the second loop: ${thirdAndFutureLoopReplacedPlans + .slice(0, 10) + .join(", ")}`); + } + inlineSteps() { + flagLoop: for (const $flag of this.stepTracker.activeSteps) { + if ($flag instanceof index_js_1.__FlagStep) { + // We can only inline it if it's not used by an output plan or layer plan + { + const usages = this.stepTracker.outputPlansByRootStep.get($flag); + if (usages?.size) { + continue; + } + } + { + const usages = this.stepTracker.layerPlansByRootStep.get($flag); + if (usages?.size) { + continue; + } + } + { + const usages = this.stepTracker.layerPlansByParentStep.get($flag); + if (usages?.size) { + continue; + } + } + // We're only going to inline one if we can inline all. + const toInline = []; + for (const dependent of $flag.dependents) { + const { step, dependencyIndex } = dependent; + const $dependent = (0, utils_js_1.sudo)(step); + const inlineDetails = $flag.inline($dependent.getDepOptions(dependencyIndex)); + if (inlineDetails === null) { + continue flagLoop; + } + toInline.push({ + $dependent, + dependencyIndex, + inlineDetails, + dependent, + }); + } + // All of them pass the check, let's inline them + for (const todo of toInline) { + const { $dependent, dependencyIndex, inlineDetails: { onReject, acceptFlags = interfaces_js_1.DEFAULT_ACCEPT_FLAGS }, } = todo; + (0, utils_js_1.writeableArray)($dependent.dependencyOnReject)[dependencyIndex] = + onReject; + (0, utils_js_1.writeableArray)($dependent.dependencyForbiddenFlags)[dependencyIndex] = + interfaces_js_1.ALL_FLAGS & ~acceptFlags; + } + const $flagDep = (0, utils_js_1.sudo)($flag).dependencies[0]; + this.stepTracker.replaceStep($flag, $flagDep); + } + } + } + /** Finalizes each step */ + finalizeSteps() { + const initialStepCount = this.stepTracker.stepCount; + for (const step of this.stepTracker.activeSteps) { + const wasLocked = index_js_1.isDev && (0, lock_js_1.unlock)(step); + step.finalize(); + if (wasLocked) + (0, lock_js_1.lock)(step); + (0, step_js_1.assertFinalized)(step); + if (index_js_1.isDev && this.stepTracker.stepCount !== initialStepCount) { + throw new Error(`When calling ${step}.finalize() a new plan was created; this is forbidden!`); + } + } + } + finalizeLayerPlans() { + /** + * Adds the `dep` plan to the `copyPlanIds` for `layerPlan` and any + * ancestor layers until we hit the layerPlan that `dep` is from. + */ + const ensurePlanAvailableInLayer = (dep, layerPlan) => { + let currentLayerPlan = layerPlan; + while (dep.layerPlan !== currentLayerPlan) { + if (currentLayerPlan.copyStepIds.includes(dep.id)) { + break; + } + const targetStep = this.stepTracker.getStepById(dep.id); + if (index_js_1.isDev && targetStep !== dep) { + throw new Error(`GrafastInternalError: Plan mismatch; are we using a replaced step? Step ID: ${dep.id}; step: ${dep}; stepById: ${this.stepTracker.getStepById(dep.id)}`); + } + if (targetStep._isUnary) { + targetStep._isUnaryLocked = true; + } + currentLayerPlan.copyStepIds.push(dep.id); + currentLayerPlan = currentLayerPlan.parentLayerPlan; + if (!currentLayerPlan) { + throw new Error(`GrafastInternalError<8c1640b9-fa3c-440d-99e5-7693d0d7e5d1>: could not find layer plan for '${dep}' in chain from layer plan ${layerPlan}`); + } + } + }; + for (const layerPlan of this.stepTracker.layerPlans) { + if (!layerPlan) { + continue; + } + layerPlan.steps = []; + } + for (const step of this.stepTracker.activeSteps) { + step.layerPlan.steps.push(step); + } + for (const layerPlan of this.stepTracker.layerPlans) { + if (!layerPlan) { + continue; + } + layerPlan.pendingSteps = layerPlan.steps.filter((s) => !(step_js_1.$$noExec in s)); + const sideEffectSteps = layerPlan.pendingSteps.filter((s) => s.hasSideEffects); + const pending = new Set(layerPlan.pendingSteps); + const processed = new Set(); + const latestSideEffectStepByPolymorphicPath = new Map(); + function getLatestSideEffectStepFor(step) { + const polymorphicPaths = [...(step.polymorphicPaths ?? [""])]; + const latestSideEffectStep = latestSideEffectStepByPolymorphicPath.get(polymorphicPaths[0]); + for (let i = 1, l = polymorphicPaths.length; i < l; i++) { + const se = latestSideEffectStepByPolymorphicPath.get(polymorphicPaths[i]); + if (se !== latestSideEffectStep) { + throw new Error(`You shouldn't have side effects in polymorphic positions; ${step} exists in ${polymorphicPaths} but these positions have mixed side effects`); + } + } + return latestSideEffectStep; + } + function setLatestSideEffectStep(step) { + const polymorphicPaths = [...(step.polymorphicPaths ?? [""])]; + // Store this side effect for use from now on + for (let i = 0, l = polymorphicPaths.length; i < l; i++) { + latestSideEffectStepByPolymorphicPath.set(polymorphicPaths[i], step); + } + } + const processSideEffectPlan = (step) => { + if (processed.has(step) || isPrepopulatedStep(step)) { + return; + } + const sstep = (0, utils_js_1.sudo)(step); + processed.add(step); + pending.delete(step); + const sideEffectDeps = []; + const rest = []; + for (const dep of sstep.dependencies) { + if (dep.layerPlan !== layerPlan) { + continue; + } + if (processed.has(dep)) { + continue; + } + if (dep.hasSideEffects) { + sideEffectDeps.push(dep); + } + else { + rest.push(dep); + } + } + // Call any side effects we're dependent on + for (const sideEffectDep of sideEffectDeps) { + processSideEffectPlan(sideEffectDep); + } + // PERF: this is silly, we should be able to group them together and + // run them in parallel, and they don't even have side effects! + for (const dep of rest) { + processSideEffectPlan(dep); + } + const latestSideEffectStep = getLatestSideEffectStepFor(step); + if (latestSideEffectStep !== undefined && + !(0, utils_js_1.stepADependsOnStepB)(sstep, latestSideEffectStep)) { + sstep.implicitSideEffectStep = latestSideEffectStep; + } + if (step.hasSideEffects) { + setLatestSideEffectStep(step); + } + const phase = /*#__INLINE__*/ newLayerPlanPhase(); + phase.checkTimeout = true; + phase.normalSteps = [{ step }]; + phase._allSteps.push(step); + layerPlan.phases.push(phase); + }; + for (const sideEffectStep of sideEffectSteps) { + processSideEffectPlan(sideEffectStep); + } + const readyToExecute = (step) => { + for (const dep of (0, utils_js_1.sudo)(step).dependencies) { + if (dep.layerPlan === layerPlan && pending.has(dep)) { + return false; + } + } + return true; + }; + while (pending.size > 0) { + const nextSteps = []; + for (const step of pending) { + if (readyToExecute(step)) { + nextSteps.push(step); + } + } + if (nextSteps.length === 0) { + throw new Error(`GrafastInternalError<2904ebbf-6344-4f2b-9305-8db9c1ff29c5>: Could not compute execution order?! Remaining: ${[ + ...pending, + ]} (processed: ${[...processed]}; all: ${layerPlan.pendingSteps})`); + } + // Do not add to processed until whole layer is known + const phase = /*#__INLINE__*/ newLayerPlanPhase(); + for (const step of nextSteps) { + processed.add(step); + pending.delete(step); + const sstep = (0, utils_js_1.sudo)(step); + const latestSideEffectStep = getLatestSideEffectStepFor(step); + if (latestSideEffectStep !== undefined && + !(0, utils_js_1.stepADependsOnStepB)(sstep, latestSideEffectStep)) { + sstep.implicitSideEffectStep = latestSideEffectStep; + } + if (step.isSyncAndSafe && (0, step_js_1.isUnbatchedStep)(step)) { + if (phase.unbatchedSyncAndSafeSteps !== undefined) { + phase.unbatchedSyncAndSafeSteps.push({ + step, + scratchpad: undefined, + }); + } + else { + phase.unbatchedSyncAndSafeSteps = [ + { step, scratchpad: undefined }, + ]; + } + } + else { + if (!step.isSyncAndSafe || step.hasSideEffects) { + phase.checkTimeout = true; + } + if (phase.normalSteps !== undefined) { + phase.normalSteps.push({ step }); + } + else { + phase.normalSteps = [{ step }]; + } + } + } + // Add more isSyncAndSafe unbatched steps if possible + let foundOne = false; + do { + foundOne = false; + for (const step of pending) { + if (step.isSyncAndSafe && (0, step_js_1.isUnbatchedStep)(step)) { + if (readyToExecute(step)) { + processed.add(step); + pending.delete(step); + const sstep = (0, utils_js_1.sudo)(step); + const latestSideEffectStep = getLatestSideEffectStepFor(step); + if (latestSideEffectStep !== undefined && + !(0, utils_js_1.stepADependsOnStepB)(sstep, latestSideEffectStep)) { + sstep.implicitSideEffectStep = latestSideEffectStep; + } + foundOne = true; + if (phase.unbatchedSyncAndSafeSteps !== undefined) { + phase.unbatchedSyncAndSafeSteps.push({ + step, + scratchpad: undefined, + }); + } + else { + phase.unbatchedSyncAndSafeSteps = [ + { step, scratchpad: undefined }, + ]; + } + } + } + } + } while (foundOne); + if (phase.normalSteps !== undefined) { + for (const { step } of phase.normalSteps) { + phase._allSteps.push(step); + } + } + if (phase.unbatchedSyncAndSafeSteps !== undefined) { + for (const { step } of phase.unbatchedSyncAndSafeSteps) { + phase._allSteps.push(step); + } + } + layerPlan.phases.push(phase); + } + // PERF: this could probably be faster. + // Populate copyPlanIds for each step + for (const step of layerPlan.steps) { + // Items shouldn't have their "list" copied in. + if (step_js_1.$$noExec in step) { + continue; + } + for (const dep of (0, utils_js_1.sudo)(step).dependencies) { + ensurePlanAvailableInLayer(dep, layerPlan); + } + if (step.implicitSideEffectStep) { + ensurePlanAvailableInLayer(step.implicitSideEffectStep, layerPlan); + } + } + const $root = layerPlan.rootStep; + if ($root) { + ensurePlanAvailableInLayer($root, layerPlan); + // If $root explicitly dependends on `layerPlan.parentSideEffectStep` + // then we should remove the implicit layerPlan dependency (e.g. so + // that if you `trap()` the error it does not interfere). + if (layerPlan.parentSideEffectStep) { + if (layerPlan.parentSideEffectStep === $root || + layerPlan.parentSideEffectStep === $root.implicitSideEffectStep || + (0, utils_js_1.stepADependsOnStepB)($root, layerPlan.parentSideEffectStep)) { + layerPlan.parentSideEffectStep = null; + } + } + } + const $sideEffect = layerPlan.parentSideEffectStep; + if ($sideEffect) { + // We read it from the parent layer plan at newBucket time, but we + // don't need to actually scale it up/down. + // + // If parentSideEffectStep exists then parentLayerPlan must exist. + ensurePlanAvailableInLayer($sideEffect, layerPlan.parentLayerPlan); + } + // Copy polymorphic parentStepId + if (layerPlan.reason.type === "polymorphic") { + const parentStep = layerPlan.reason.parentStep; + ensurePlanAvailableInLayer(parentStep, layerPlan); + } + // Ensure list is accessible in parent layerPlan + if (layerPlan.reason.type === "listItem") { + const parentStep = layerPlan.reason.parentStep; + ensurePlanAvailableInLayer(parentStep, layerPlan.parentLayerPlan); + const stream = layerPlan.reason.stream; + if (stream != null) { + if (stream.initialCountStepId) { + ensurePlanAvailableInLayer(this.stepTracker.getStepById(stream.initialCountStepId), layerPlan.parentLayerPlan); + } + if (stream.ifStepId) { + ensurePlanAvailableInLayer(this.stepTracker.getStepById(stream.ifStepId), layerPlan.parentLayerPlan); + } + if (stream.labelStepId) { + ensurePlanAvailableInLayer(this.stepTracker.getStepById(stream.labelStepId), layerPlan.parentLayerPlan); + } + } + } + } + // Populate copyPlanIds for output plans' rootStepId + this.stepTracker.allOutputPlans.forEach((outputPlan) => { + ensurePlanAvailableInLayer(outputPlan.rootStep, outputPlan.layerPlan); + }); + for (const layerPlan of this.stepTracker.layerPlans) { + if (layerPlan !== null) { + layerPlan.finalize(); + } + } + } + /** Optimizes each output plan */ + optimizeOutputPlans() { + this.stepTracker.allOutputPlans.forEach((outputPlan) => outputPlan.optimize()); + } + /** Finalizes each output plan */ + finalizeOutputPlans() { + this.stepTracker.allOutputPlans.forEach((outputPlan) => outputPlan.finalize()); + } + walkOutputPlans(outputPlan, callback) { + callback(outputPlan); + if (outputPlan.child !== null) { + this.walkOutputPlans(outputPlan.child, callback); + } + if (outputPlan.childByTypeName !== undefined) { + Object.values(outputPlan.childByTypeName).forEach((childOutputPlan) => { + this.walkOutputPlans(childOutputPlan, callback); + }); + } + for (const spec of Object.values(outputPlan.keys)) { + if (spec.type === "outputPlan") { + this.walkOutputPlans(spec.outputPlan, callback); + } + } + for (const defer of outputPlan.deferredOutputPlans) { + this.walkOutputPlans(defer, callback); + } + } + generatePlanJSON() { + function printStep(step) { + const metaString = step.toStringMeta(); + const sstep = (0, utils_js_1.sudo)(step); + return { + id: step.id, + stepClass: step.constructor.name, + metaString: metaString ? (0, index_js_1.stripAnsi)(metaString) : metaString, + isUnary: step._isUnary, + bucketId: step.layerPlan.id, + implicitSideEffectStepId: step.implicitSideEffectStep?.id ?? null, + dependencyIds: sstep.dependencies.map((d) => d.id), + dependencyForbiddenFlags: sstep.dependencyForbiddenFlags.slice(), + dependencyOnReject: sstep.dependencyOnReject.map((or) => or ? String(or) : or), + polymorphicPaths: step.polymorphicPaths + ? [...step.polymorphicPaths] + : undefined, + isSyncAndSafe: step.isSyncAndSafe || undefined, + supportsUnbatched: typeof step.unbatchedExecute === "function" || undefined, + hasSideEffects: step.hasSideEffects || undefined, + stream: step._stepOptions.stream + ? { initialCountStepId: step._stepOptions.stream.initialCountStepId } + : undefined, + extra: step.planJSONExtra(), + }; + } + function printPhase(phase) { + return { + normalStepIds: phase.normalSteps?.map((s) => s.step.id), + unbatchedStepIds: phase.unbatchedSyncAndSafeSteps?.map((s) => s.step.id), + }; + } + function printBucketReason(reason) { + switch (reason.type) { + case "root": { + const { type } = reason; + return { type }; + } + case "nullableBoundary": { + const { type, parentStep } = reason; + return { type, parentStepId: parentStep.id }; + } + case "listItem": { + const { type, parentStep, stream } = reason; + return { type, parentStepId: parentStep.id, stream }; + } + case "subscription": { + const { type } = reason; + return { type }; + } + case "mutationField": { + const { type, mutationIndex } = reason; + return { type, mutationIndex }; + } + case "defer": { + const { type, label } = reason; + return { type, label }; + } + case "polymorphic": { + const { type, typeNames, parentStep, polymorphicPaths } = reason; + return { + type, + typeNames, + parentStepId: parentStep.id, + polymorphicPaths: [...polymorphicPaths], + }; + } + case "subroutine": { + const { type, parentStep } = reason; + return { type, parentStepId: parentStep.id }; + } + default: { + const never = reason; + throw new Error(`Failed to process layer plan reason ${(0, inspect_js_1.inspect)(never)}`); + } + } + } + function printBucket(lp) { + lp.reason; + return { + id: lp.id, + reason: printBucketReason(lp.reason), + parentSideEffectStepId: lp.parentSideEffectStep?.id ?? null, + copyStepIds: lp.copyStepIds, + phases: lp.phases.map(printPhase), + steps: lp.steps.map(printStep), + children: lp.children.map(printBucket), + rootStepId: lp.rootStep ? lp.rootStep.id : null, + }; + } + return { + version: "v1", + rootBucket: printBucket(this.rootLayerPlan), + }; + } + finishSubroutine(subroutineStep, layerPlan) { + // Now find anything that these plans are dependent on and make ourself + // dependent on them. + const process = (lp, known) => { + for (const step of this.stepTracker.activeSteps) { + if (step.layerPlan === lp) { + for (const dep of (0, utils_js_1.sudo)(step).dependencies) { + if (!known.includes(dep.layerPlan)) { + // Naughty naughty + subroutineStep.addDependency(dep); + } + } + } + } + for (const child of lp.children) { + process(child, [...known, child]); + } + }; + process(layerPlan, [layerPlan]); + } + /** + * HIGHLY EXPERIMENTAL! + * + * @internal + */ + deleteLayerPlan(layerPlan) { + this.stepTracker.deleteLayerPlan(layerPlan); + } + getStepsByMetaKey(metaKey) { + const matches = []; + for (const step of this.stepTracker.activeSteps) { + if (step.metaKey === metaKey) { + matches.push(step); + } + } + return matches; + } + getStepsByStepClass(klass) { + const matches = []; + for (const step of this.stepTracker.activeSteps) { + if (step instanceof klass) { + matches.push(step); + } + } + return matches; + } + /** + * Cache a generated step by a given identifier (cacheKey) such that we don't + * need to regenerate it on future calls, significantly reducing the load on + * deduplication later. + * + * Note: automatically extends the cached step into other (relevant) + * polymorphic paths; if this shouldn't be the case then don't use cacheStep + * and instead rely on deduplication as usual. + * + * @experimental + */ + cacheStep(ownerStep, actionKey, cacheKey, cb) { + const layerPlan = (0, withGlobalLayerPlan_js_1.currentLayerPlan)(); + const paths = (0, withGlobalLayerPlan_js_1.currentPolymorphicPaths)(); + const cache = (this._cacheStepStoreByLayerPlanAndActionKey[`${actionKey}|${layerPlan.id}|${ownerStep.id}`] ??= new Map()); + const cacheIt = () => { + const stepToCache = cb(); + if (!(stepToCache instanceof index_js_1.Step)) { + throw new Error(`The callback passed to cacheStep must always return an ExecutableStep; but this call from ${ownerStep} returned instead ${(0, inspect_js_1.inspect)(stepToCache)}`); + } + cache.set(cacheKey, stepToCache.id); + return stepToCache; + }; + if (!cache.has(cacheKey)) { + return cacheIt(); + } + const cachedStepId = cache.get(cacheKey); + const cachedStep = this.stepTracker.stepById[cachedStepId]; + if (cachedStep) { + // Fix poly paths + if (paths && cachedStep.polymorphicPaths) { + const polymorphicPaths = new Set([ + ...cachedStep.polymorphicPaths, + ...paths, + ]); + cachedStep.polymorphicPaths = polymorphicPaths; + } + return cachedStep; + } + else { + return cacheIt(); + } + } + /** + * Clears the cache, typically due to side effects having taken place. Called + * from setting hasSideEffects on an ExecutableStep, among other places. + */ + resetCache() { + this._cacheStepStoreByLayerPlanAndActionKey = Object.create(null); + } + withRootLayerPlan(cb) { + return (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.rootLayerPlan, exports.POLYMORPHIC_ROOT_PATHS, cb); + } +} +exports.OperationPlan = OperationPlan; +function makeMetaByMetaKeysFactory(allMetaKeysList) { + const l = allMetaKeysList.length; + // Optimize the common cases + if (l === 0) { + return makeMetaByMetaKeys0; + } + else if (l === 1) { + return makeMetaByMetaKeys1Factory(allMetaKeysList[0]); + } + else if (l === 2) { + return makeMetaByMetaKeys2Factory(allMetaKeysList[0], allMetaKeysList[1]); + } + else if (l === 3) { + return makeMetaByMetaKeys3Factory(allMetaKeysList[0], allMetaKeysList[1], allMetaKeysList[2]); + } + else if (l === 4) { + return makeMetaByMetaKeys4Factory(allMetaKeysList[0], allMetaKeysList[1], allMetaKeysList[2], allMetaKeysList[3]); + } + else if (l === 5) { + return makeMetaByMetaKeys5Factory(allMetaKeysList[0], allMetaKeysList[1], allMetaKeysList[2], allMetaKeysList[3], allMetaKeysList[4]); + } + else if (l === 6) { + return makeMetaByMetaKeys6Factory(allMetaKeysList[0], allMetaKeysList[1], allMetaKeysList[2], allMetaKeysList[3], allMetaKeysList[4], allMetaKeysList[5]); + } + return function makeMetaByMetaKey() { + const metaByMetaKey = Object.create(null); + for (let i = 0; i < l; i++) { + metaByMetaKey[allMetaKeysList[i]] = Object.create(null); + } + return metaByMetaKey; + }; +} +const EMPTY_OBJECT = Object.freeze(Object.create(null)); +function makeMetaByMetaKeys0() { + return EMPTY_OBJECT; +} +function makeMetaByMetaKeys1Factory(key1) { + return function makeMetaByMetaKeys1() { + const obj = Object.create(null); + obj[key1] = Object.create(null); + return obj; + }; +} +function makeMetaByMetaKeys2Factory(key1, key2) { + return function makeMetaByMetaKeys2() { + const obj = Object.create(null); + obj[key1] = Object.create(null); + obj[key2] = Object.create(null); + return obj; + }; +} +function makeMetaByMetaKeys3Factory(key1, key2, key3) { + return function makeMetaByMetaKeys3() { + const obj = Object.create(null); + obj[key1] = Object.create(null); + obj[key2] = Object.create(null); + obj[key3] = Object.create(null); + return obj; + }; +} +function makeMetaByMetaKeys4Factory(key1, key2, key3, key4) { + return function makeMetaByMetaKeys4() { + const obj = Object.create(null); + obj[key1] = Object.create(null); + obj[key2] = Object.create(null); + obj[key3] = Object.create(null); + obj[key4] = Object.create(null); + return obj; + }; +} +function makeMetaByMetaKeys5Factory(key1, key2, key3, key4, key5) { + return function makeMetaByMetaKeys5() { + const obj = Object.create(null); + obj[key1] = Object.create(null); + obj[key2] = Object.create(null); + obj[key3] = Object.create(null); + obj[key4] = Object.create(null); + obj[key5] = Object.create(null); + return obj; + }; +} +function makeMetaByMetaKeys6Factory(key1, key2, key3, key4, key5, key6) { + return function makeMetaByMetaKeys6() { + const obj = Object.create(null); + obj[key1] = Object.create(null); + obj[key2] = Object.create(null); + obj[key3] = Object.create(null); + obj[key4] = Object.create(null); + obj[key5] = Object.create(null); + obj[key6] = Object.create(null); + return obj; + }; +} +function newLayerPlanPhase() { + return { + checkTimeout: false, + normalSteps: undefined, + unbatchedSyncAndSafeSteps: undefined, + _allSteps: [], + }; +} +function throwNoNewStepsError(operationPlan, actionDescription, step, previousStepCount, message) { + const newSteps = []; + for (let i = previousStepCount, l = operationPlan.stepTracker.stepCount; i < l; i++) { + newSteps.push(operationPlan.stepTracker.stepById[i]); + } + throw new Error(`${message}; whilst performing ${actionDescription} of ${step} the following new steps were created: ${newSteps + .map((s) => String(s)) + .join(", ")}`); +} +//# sourceMappingURL=OperationPlan.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OperationPlan.js.map b/grafast/grafast/dist/engine/OperationPlan.js.map new file mode 100644 index 0000000000..88c85b03e1 --- /dev/null +++ b/grafast/grafast/dist/engine/OperationPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OperationPlan.js","sourceRoot":"","sources":["../../src/engine/OperationPlan.ts"],"names":[],"mappings":";;;;AAAA,gEAAgC;AAehC,yDAAmC;AACnC,kEAA2B;AAE3B,6DAAuC;AAGvC,wEAGoC;AACpC,kFAAyE;AAEzE,0CAWqB;AACrB,0CAAwC;AACxC,8CAAwC;AAcxC,oDAO0B;AAE1B,sEAAsE;AAEtE,wCAOoB;AAEpB,0DAAqD;AACrD,sDAA8D;AAC9D,oEAA8D;AAC9D,oDAA8C;AAE9C,0CAWqB;AAQrB,iDAA2C;AAC3C,yEAAmE;AACnE,yEAIsC;AACtC,uCAAyC;AACzC,mDAA6C;AAC7C,qDAA+C;AAE/C,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;AAC7E,MAAM,4BAA4B,GAAG,IAAI,KAAK,GAAG,CAAC;AAClD,MAAM,qCAAqC,GAAG,IAAI,KAAK,GAAG,CAAC;AAE3D;;GAEG;AACH,SAAS,kBAAkB,CAAC,IAAU;IACpC,OAAO,IAAI,YAAY,qBAAU,IAAI,IAAI,YAAY,sBAAW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GAAG,CAAC,EACL,CAAC,EAAE,EACH,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,MAAM,IAAI,KAAK,CACb,GAAG,OAAO,uBAAuB,iBAAiB,OAAO,IAAI,0CAA0C,QAAQ;SAC5G,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACrB,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OutputPlan.d.ts b/grafast/grafast/dist/engine/OutputPlan.d.ts new file mode 100644 index 0000000000..01ea763ba0 --- /dev/null +++ b/grafast/grafast/dist/engine/OutputPlan.d.ts @@ -0,0 +1,176 @@ +import LRU from "@graphile/lru"; +import type { FieldNode, GraphQLEnumType, GraphQLObjectType, GraphQLScalarType } from "graphql"; +import * as graphql from "graphql"; +import type { Bucket } from "../bucket.js"; +import type { ExecutionEntryFlags, JSONValue, LocationDetails } from "../interfaces.js"; +import type { Step } from "../step.js"; +import type { PayloadRoot } from "./executeOutputPlan.js"; +import type { LayerPlan } from "./LayerPlan.js"; +export type OutputPlanTypeIntrospection = { + mode: "introspection"; + /** + * The GraphQL introspection field selection (may include arguments/etc). We + * can build a GraphQL document from this and issue it to graphql-js rather + * than replicating that effort. + */ + field: FieldNode; + /** + * The names of the variables used in this document. + */ + variableNames: string[]; + /** + * No need to re-run the introspection each time, may as well cache it, + * right? + * + * Key: canonical JSON stringify of the variables used. + * Value: the GraphQL result (`{data, errors}`) for this. + */ + introspectionCacheByVariableValues: LRU; +}; +export type OutputPlanTypeRoot = { + /** + * Always return `{}` + */ + mode: "root"; + typeName: string; +}; +export type OutputPlanTypeObject = { + /** + * Return `{}` if non-null + */ + mode: "object"; + typeName: string; + deferLabel: string | undefined; +}; +export type OutputPlanTypePolymorphicObject = { + /** + * Return `{}` if non-null + */ + mode: "polymorphic"; + typeNames: string[]; + deferLabel: string | undefined; +}; +export type OutputPlanTypeArray = { + /** + * Return a list of the same length if an array + */ + mode: "array"; +}; +export type OutputPlanTypeLeaf = { + /** + * Return the value. + */ + mode: "leaf"; + graphqlType: GraphQLScalarType | GraphQLEnumType; +}; +export type OutputPlanTypeNull = { + mode: "null"; +}; +/** + * Thanks to `@stream`, output plans must handle their own nullability concerns + * and we might need an output plan for any of these: + * + * - A concrete object + * - A polymorphic object + * - A leaf (enum/scalar) + * - Something we know will always be null + * - A list of any of the above + * - A list of lists + * + * In addition to the above, we also need to cover + * + * - The root object (which is like a concrete object, except it's never null) + * - Introspection + */ +export type OutputPlanType = OutputPlanTypeRoot | OutputPlanTypeObject | OutputPlanTypePolymorphicObject | OutputPlanTypeLeaf | OutputPlanTypeNull | OutputPlanTypeArray | OutputPlanTypeIntrospection; +export type OutputPlanKeyValueOutputPlan = { + type: "outputPlan"; + outputPlan: OutputPlan; + isNonNull: boolean; + locationDetails: LocationDetails; +}; +export type OutputPlanKeyValueTypeName = { + type: "__typename"; + locationDetails: LocationDetails; +}; +export type OutputPlanKeyValue = OutputPlanKeyValueOutputPlan | OutputPlanKeyValueTypeName; +export type OutputPlanKeyValueOutputPlanWithCachedBits = OutputPlanKeyValueOutputPlan & { + layerPlanId: number; +}; +/** + * Defines a way of taking a layerPlan and converting it into an output value. + * + * The result of executing an output plan will be the following: + * + * - data?: the data for this layer, could be object, array or leaf (see OutputPlanMode) + * - errors: a list of errors that occurred (if any), including path details _within the output plan_ + * - streams: a list of streams that were created + */ +export declare class OutputPlan { + layerPlan: LayerPlan; + readonly type: TType; + /** For errors */ + readonly locationDetails: LocationDetails; + /** + * The step that represents the root value. How this is used depends on the + * OutputPlanMode. + */ + readonly rootStep: Step; + /** + * If this output plan should resolve to an error if a side effect step + * raises an error, this is that side effect. + */ + readonly sideEffectStep: Step | null; + /** + * For root/object output plans, the keys to set on the resulting object + * grouped by the concrete object type name. + * + * IMPORTANT: the order of these keys is significant, they MUST match the + * order in the request otherwise we break GraphQL spec compliance! + */ + keys: { + [key: string]: OutputPlanKeyValueTypeName | OutputPlanKeyValueOutputPlanWithCachedBits; + }; + /** + * For list output plans, the output plan that describes the list children. + */ + child: OutputPlan | null; + childIsNonNull: boolean; + /** + * For polymorphic output plans, the Object output plan for each specific type. + */ + childByTypeName: { + [typeName: string]: OutputPlan; + } | undefined; + /** + * For object output plan types only. + */ + deferredOutputPlans: OutputPlan[]; + constructor(layerPlan: LayerPlan, + /** + * For root, this should always be an object. + * + * For object this could represent an object or null. + * + * For polymorphic this could represent a polymorphic object or null. + * + * For array it's the list itself (or null) and dictates the length of the result. + * + * For leaf, it's the leaf plan itself. + * + * For `introspection`, `null` it's irrelevant. Use `constant(null)` or whatever. + */ + rootStep: Step, type: TType, locationDetails: LocationDetails); + print(): string; + toString(): string; + addChild(type: GraphQLObjectType | null, key: string | null, child: OutputPlanKeyValue): void; + getLayerPlans(layerPlans?: Set>): Set; + makeNextStepByLayerPlan(): Record; + execute(this: OutputPlan, _root: PayloadRoot, _mutablePath: ReadonlyArray, _bucket: Bucket, _bucketIndex: number, _rawBucketRootValue?: any, _bucketRootFlags?: ExecutionEntryFlags): JSONValue; + executeString(this: OutputPlan, _root: PayloadRoot, _mutablePath: ReadonlyArray, _bucket: Bucket, _bucketIndex: number, _rawBucketRootValue?: any, _bucketRootFlags?: ExecutionEntryFlags): string; + optimize(): void; + finalize(): void; +} +export declare function coerceError(error: Error, locationDetails: LocationDetails, path: ReadonlyArray): graphql.GraphQLError; +export declare function nonNullError(locationDetails: LocationDetails, path: readonly (string | number)[]): graphql.GraphQLError; +//# sourceMappingURL=OutputPlan.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OutputPlan.d.ts.map b/grafast/grafast/dist/engine/OutputPlan.d.ts.map new file mode 100644 index 0000000000..a5fc961ef2 --- /dev/null +++ b/grafast/grafast/dist/engine/OutputPlan.d.ts.map @@ -0,0 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AAC,EAAE,mBAAmB,GACrC,MAAM;IAIT,QAAQ,IAAI,IAAI;IAkChB,QAAQ,IAAI,IAAI;CA8IjB;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,GACnC,OAAO,CAAC,YAAY,CA2BtB;AAED,wBAAgB,YAAY,CAC1B,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GACjC,OAAO,CAAC,YAAY,CAsBtB"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OutputPlan.js b/grafast/grafast/dist/engine/OutputPlan.js new file mode 100644 index 0000000000..c9a162580b --- /dev/null +++ b/grafast/grafast/dist/engine/OutputPlan.js @@ -0,0 +1,1047 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OutputPlan = void 0; +exports.coerceError = coerceError; +exports.nonNullError = nonNullError; +exports.getChildBucketAndIndex = getChildBucketAndIndex; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const graphql = tslib_1.__importStar(require("graphql")); +const tamedevil_1 = tslib_1.__importStar(require("tamedevil")); +const assert = tslib_1.__importStar(require("../assert.js")); +const dev_js_1 = require("../dev.js"); +const index_js_1 = require("../index.js"); +const inspect_js_1 = require("../inspect.js"); +const interfaces_js_1 = require("../interfaces.js"); +const polymorphic_js_1 = require("../polymorphic.js"); +const access_js_1 = require("../steps/access.js"); +const { executeSync, GraphQLBoolean, GraphQLError, GraphQLFloat, GraphQLID, GraphQLInt, GraphQLString, isObjectType, Kind, OperationTypeNode, } = graphql; +/** + * Defines a way of taking a layerPlan and converting it into an output value. + * + * The result of executing an output plan will be the following: + * + * - data?: the data for this layer, could be object, array or leaf (see OutputPlanMode) + * - errors: a list of errors that occurred (if any), including path details _within the output plan_ + * - streams: a list of streams that were created + */ +class OutputPlan { + constructor(layerPlan, + /** + * For root, this should always be an object. + * + * For object this could represent an object or null. + * + * For polymorphic this could represent a polymorphic object or null. + * + * For array it's the list itself (or null) and dictates the length of the result. + * + * For leaf, it's the leaf plan itself. + * + * For `introspection`, `null` it's irrelevant. Use `constant(null)` or whatever. + */ + rootStep, type, locationDetails) { + this.layerPlan = layerPlan; + this.type = type; + /** + * Appended to the root step when accessed to avoid the need for AccessSteps + * + * @internal + */ + this.processRoot = null; + /** + * For root/object output plans, the keys to set on the resulting object + * grouped by the concrete object type name. + * + * IMPORTANT: the order of these keys is significant, they MUST match the + * order in the request otherwise we break GraphQL spec compliance! + */ + this.keys = Object.create(null); + /** + * For list output plans, the output plan that describes the list children. + */ + this.child = null; + this.childIsNonNull = false; + /** + * For object output plan types only. + */ + this.deferredOutputPlans = []; + this.locationDetails = locationDetails; + this.rootStep = rootStep; + layerPlan.operationPlan.stepTracker.addOutputPlan(this); + this.childByTypeName = + this.type.mode === "polymorphic" ? Object.create(null) : undefined; + // NOTE: this may be cleared during `this.finalize()` + this.sideEffectStep = layerPlan.latestSideEffectStep; + } + print() { + const type = this.type; + switch (type.mode) { + case "root": + case "object": { + return `${this.toString()}\n${Object.entries(this.keys) + .map(([fieldName, val]) => { + return `.${fieldName}: ${val.type === "__typename" ? "" : val.isNonNull ? "!" : "?"}${val.type === "__typename" + ? `__typename(${type.typeName})` + : val.outputPlan.print().replace(/\n/g, "\n ")}`; + }) + .join("\n")}`; + } + case "polymorphic": { + return `${this.toString()}\n${Object.entries(this.childByTypeName) + .map(([typeName, outputPlan]) => { + return `? ${typeName}: ${outputPlan + .print() + .replace(/\n/g, "\n ")}`; + }) + .join("\n")}`; + } + case "array": { + return `${this.toString()}\n ${this.childIsNonNull ? "!" : "?"}${this.child.print().replace(/\n/g, "\n ")}`; + } + default: { + return this.toString(); + } + } + } + toString() { + return `OutputPlan<${this.type.mode}${this.sideEffectStep ? `^${this.sideEffectStep.id}` : ""}∈${this.layerPlan.id}!${this.rootStep.id}>`; + } + addChild(type, key, child) { + if (this.type.mode === "root" || this.type.mode === "object") { + if (dev_js_1.isDev) { + if (typeof key !== "string") { + throw new Error(`GrafastInternalError<7334ec50-23dc-442a-8ffa-19664c9eb79f>: Key must be provided in ${this.type.mode} OutputPlan mode`); + } + if (type == null) { + throw new Error(`GrafastInternalError<638cebef-4ec6-49f4-b681-2f390fb1c0fc>: Type must be provided in ${this.type.mode} OutputPlan mode.`); + } + if (!isObjectType(type)) { + throw new Error(`GrafastInternalError: Type must provided in ${this.type.mode} OutputPlan mode must be an object type, instead saw '${type}'.`); + } + assert.ok(["root", "object"].includes(this.type.mode), "Can only addChild on root/object output plans"); + if (this.keys[key] !== undefined) { + throw new Error(`GrafastInternalError<5ceecb19-8c2c-4797-9be5-9be1b207fa45>: child already set for key '${key}'`); + } + } + this.keys[key] = + child.type === "outputPlan" + ? { + ...child, + layerPlanId: child.outputPlan.layerPlan.id, + } + : child; + } + else if (this.type.mode === "array") { + if (dev_js_1.isDev) { + if (key != null) { + throw new Error(`GrafastInternalError<7de67325-a02f-4619-b118-61bb2d84f33b>: Key must not be provided in ${this.type.mode} OutputPlan mode`); + } + assert.ok(type == null, "Array should not specify type"); + if (this.child !== null) { + throw new Error(`GrafastInternalError<07059d9d-a47d-441f-b834-683cca1d856a>: child already set`); + } + } + if (child.type === "outputPlan") { + this.child = child.outputPlan; + this.childIsNonNull = child.isNonNull; + } + else { + throw new Error(`GrafastInternalError<7525c854-9145-4c6d-8d60-79c14f040519>: Array child must be an outputPlan`); + } + } + else if (this.type.mode === "polymorphic") { + if (dev_js_1.isDev) { + assert.ok(type && this.type.typeNames.includes(type.name), "GrafastInternalError<566a34ac-1138-4dbf-943e-f704819431dd>: polymorphic output plan can only addChild for a matching type"); + assert.strictEqual(key, null, "GrafastInternalError<4346ebda-a02d-4489-b767-7a6d621a73c7>: addChild for polymorphic OutputPlan should not specify a key"); + assert.ok(child.type === "outputPlan", "GrafastInternalError: polymorphic OutputPlan child must be an outputPlan"); + assert.ok(child.outputPlan.type.mode === "object", "GrafastInternalError<203469c6-4bfa-4cd1-ae82-cc5d0132ca16>: polymorphic OutputPlan child must be an object outputPlan"); + } + this.childByTypeName[type.name] = child.outputPlan; + } + else { + throw new Error(`GrafastInternalError<5667df5f-30b7-48d3-be3f-a0065ed9c05c>: Doesn't make sense to set a child in mode '${this.type.mode}'`); + } + } + getLayerPlans(layerPlans = new Set()) { + // Find all the layerPlans referenced + layerPlans.add(this.layerPlan); + if (this.child !== null) { + if (this.child.layerPlan != this.layerPlan) { + this.child.getLayerPlans(layerPlans); + } + else { + throw new Error("GrafastInternalError<4013e05f-b8ed-41ea-a869-204232d02763>: how could the child be in the same layer?"); + } + } + for (const key in this.keys) { + const spec = this.keys[key]; + if (spec.type === "outputPlan") { + if (spec.outputPlan.layerPlan !== this.layerPlan) { + spec.outputPlan.getLayerPlans(layerPlans); + layerPlans.add(spec.outputPlan.layerPlan); + } + } + } + return layerPlans; + } + makeNextStepByLayerPlan() { + const layerPlans = this.getLayerPlans(); + const map = Object.create(null); + for (const layerPlan of layerPlans) { + map[layerPlan.id] = []; + } + return map; + } + // This gets replaced with a mode-specific executor + execute(_root, + // By just reusing the same path over and over we don't need to allocate + // more memory for more arrays; but we must be _incredibly_ careful to + // ensure any changes to it are reversed. + _mutablePath, _bucket, _bucketIndex, _rawBucketRootValue, _bucketRootFlags) { + throw new Error(`OutputPlan.execute has yet to be built!`); + } + // This gets replaced with a mode-specific executor + executeString(_root, + // By just reusing the same path over and over we don't need to allocate + // more memory for more arrays; but we must be _incredibly_ careful to + // ensure any changes to it are reversed. + _mutablePath, _bucket, _bucketIndex, _rawBucketRootValue, _bucketRootFlags) { + throw new Error(`OutputPlan.executeString has yet to be built!`); + } + optimize() { + // This optimization works by ridding us of access steps at the very end of + // paths and just accessing properties directly. In rare circumstances + // involving untethered side effects in earlier versions this could lead to + // errors being skipped and data generated previous to the error being + // returned; but OutputPlans now check the latestSideEffectStep so this + // should be safe aga. + const $root = this.layerPlan.operationPlan.dangerouslyGetStep(this.rootStep.id); + if ($root instanceof index_js_1.AccessStep && + $root.fallback === undefined && + $root.implicitSideEffectStep === null && + (!this.sideEffectStep || !(0, index_js_1.stepADependsOnStepB)($root, this.sideEffectStep))) { + const expressionDetails = $root.unbatchedExecute[access_js_1.expressionSymbol]; + if (expressionDetails !== undefined) { + // @ts-ignore + const { step: $parent } = $root.getDepOptions(0); + this.layerPlan.operationPlan.stepTracker.setOutputPlanRootStep(this, $parent); + const [path, fallback] = expressionDetails; + withFastExpression(path, fallback, (fn) => { + this.processRoot = fn; + }); + } + } + } + finalize() { + // Clear the sideEffectStep if the rootStep explicitly depends on it. + // NOTE: this occurs here since more dependencies could have been added to + // $root after `this` was created. + const $sideEffect = this.sideEffectStep; + if ($sideEffect) { + const $root = this.rootStep; + if ($root === $sideEffect || + $root.implicitSideEffectStep === $sideEffect || + (0, index_js_1.stepADependsOnStepB)($root, $sideEffect)) { + // It's marked readonly, but we override it anyway + this.sideEffectStep = null; + } + } + // Build the executor + switch (this.type.mode) { + case "null": { + this.execute = nullExecutor; + this.executeString = nullExecutorString; + break; + } + case "leaf": { + this.execute = leafExecutor; + if (this.type.graphqlType.serialize === GraphQLID.serialize || + this.type.graphqlType.serialize === GraphQLString.serialize) { + // String types + this.executeString = stringLeafExecutorString; + } + else if (this.type.graphqlType.serialize === GraphQLInt.serialize) { + this.executeString = intLeafExecutorString; + } + else if (this.type.graphqlType.serialize === GraphQLFloat.serialize) { + this.executeString = floatLeafExecutorString; + } + else if (this.type.graphqlType.serialize === GraphQLBoolean.serialize) { + // Boolean type + this.executeString = booleanLeafExecutorString; + } + else { + // PERF: we could probably optimize enums too + this.executeString = leafExecutorString; + } + break; + } + case "introspection": { + this.execute = introspectionExecutor; + this.executeString = introspectionExecutorString; + break; + } + case "polymorphic": { + this.execute = polymorphicExecutor; + this.executeString = polymorphicExecutorString; + break; + } + case "array": { + if (!this.child) { + throw new Error("GrafastInternalError<48fabdc8-ce84-45ec-ac20-35a2af9098e0>: No child output plan for list bucket?"); + } + const childIsNonNull = this.childIsNonNull; + let directLayerPlanChild = this.child.layerPlan; + while (directLayerPlanChild.parentLayerPlan !== this.layerPlan) { + const parent = directLayerPlanChild.parentLayerPlan; + if (!parent) { + throw new Error(`GrafastInternalError: Invalid heirarchy - could not find direct layerPlan child of ${this}`); + } + directLayerPlanChild = parent; + } + const canStream = directLayerPlanChild.reason.type === "listItem" && + !!directLayerPlanChild.reason.stream; + if (childIsNonNull) { + if (canStream) { + this.execute = arrayExecutor_nonNullable_streaming; + this.executeString = arrayExecutorString_nonNullable_streaming; + } + else { + this.execute = arrayExecutor_nonNullable; + this.executeString = arrayExecutorString_nonNullable; + } + } + else { + if (canStream) { + this.execute = arrayExecutor_nullable_streaming; + this.executeString = arrayExecutorString_nullable_streaming; + } + else { + this.execute = arrayExecutor_nullable; + this.executeString = arrayExecutorString_nullable; + } + } + break; + } + case "root": + case "object": { + const type = this.type; + const digestFieldTypes = Object.create(null); + for (const [responseKey, spec] of Object.entries(this.keys)) { + digestFieldTypes[responseKey] = { + fieldType: spec.type === "__typename" + ? "__typename" + : spec.isNonNull + ? "outputPlan!" + : "outputPlan?", + sameBucket: spec.type === "__typename" || + spec.outputPlan.layerPlan.id === this.layerPlan.id, + }; + } + this.execute = makeObjectExecutor(type.typeName, digestFieldTypes, this.deferredOutputPlans.length > 0, type.mode === "root", false); + this.executeString = makeObjectExecutor(type.typeName, digestFieldTypes, this.deferredOutputPlans.length > 0, type.mode === "root", true); + break; + } + default: { + const never = this.type; + throw new Error(`GrafastInternalError: Could not build executor for OutputPlan with type ${(0, inspect_js_1.inspect)(never)}}`); + } + } + } +} +exports.OutputPlan = OutputPlan; +function coerceError(error, locationDetails, path) { + // Ensure it's a GraphQL error + if (error instanceof GraphQLError) { + if (error.path !== undefined) { + return error; + } + else { + return new GraphQLError(error.message, locationDetails.node, null, null, path, error.originalError ?? error, error.extensions); + } + } + else { + return new GraphQLError(error?.message ?? String(error), locationDetails.node, null, null, path, error, null); + } +} +function nonNullError(locationDetails, path) { + const { parentTypeName, fieldName, node } = locationDetails; + if (!parentTypeName || !fieldName) { + return new GraphQLError(`GrafastInternalError: null bubbled to root`, node, null, null, path, null, null); + } + return new GraphQLError(`Cannot return null for non-nullable field ${parentTypeName}.${fieldName}.`, node, null, null, path, null, null); +} +/** + * We're currently running OutputPlan `outputPlan` in bucket `bucket` at index + * `bucketIndex`. If this is an array OutputPlan then we're looping over the + * entries in our list and we're currently at index `inArrayIndex` (otherwise + * this is null). + * + * Now we want to run `childOutputPlan`, but to do so we need to find the + * related `childBucket` and `childBucketIndex`. + * + * @internal + */ +function getChildBucketAndIndex(layerPlan, outputPlan, bucket, bucketIndex, arrayIndex = null) { + if (bucket.layerPlan === layerPlan) { + return [bucket, bucketIndex]; + } + if ((arrayIndex == null) === + (outputPlan != null && outputPlan.type.mode === "array")) { + throw new Error("GrafastInternalError<83d0e3cc-7eec-4185-85b4-846540288162>: arrayIndex must be supplied iff outputPlan is an array"); + } + if (outputPlan != null && layerPlan === bucket.layerPlan) { + // Same layer; straightforward + return [bucket, bucketIndex]; + } + const reversePath = [layerPlan]; + let current = layerPlan; + while (!bucket.children[current.id]) { + current = current.parentLayerPlan; + if (!current) { + return null; + } + reversePath.push(current); + } + let currentBucket = bucket; + let currentIndex = bucketIndex; + for (let l = reversePath.length, i = l - 1; i >= 0; i--) { + const layerPlan = reversePath[i]; + const child = currentBucket.children[layerPlan.id]; + if (!child) { + return null; + } + const out = child.map.get(currentIndex); + if (out == null) { + return null; + } + /* + * TEST: I think this '|| i !== l - 1' check is saying that an array can + * only occur at the furthest ancestor and everything since then must be + * non-array. Presumably in the case of nested arrays there would be an + * intermediary bucket, hence why this check is allowed, but that should be + * tested. Also, are there any confounding factors when it comes to steps + * themselves using arrays for object values - for example pgSelectSingle is + * represented by an array (tuple), but that doesn't make it a list so it should + * be fine. Use tests to validate this is all fine. + */ + if (arrayIndex == null || i !== l - 1) { + if (Array.isArray(out)) { + throw new Error("GrafastInternalError: Was expecting an arrayIndex, but none was provided"); + } + currentBucket = child.bucket; + currentIndex = out; + } + else { + if (!Array.isArray(out)) { + throw new Error(`GrafastInternalError<8190d09f-dc75-46ec-8162-b20ad516de41>: Cannot access array index in non-array ${(0, inspect_js_1.inspect)(out)}`); + } + if (!(out.length > arrayIndex)) { + throw new Error(`GrafastInternalError<1f596c22-368b-4d0d-94df-fb3df632b064>: Attempted to retrieve array index '${arrayIndex}' which is out of bounds of array with length '${out.length}'`); + } + currentBucket = child.bucket; + currentIndex = out[arrayIndex]; + } + } + if (currentIndex == null) { + return null; + } + return [currentBucket, currentIndex]; +} +function makeExecutor(config) { + const { preamble = null, inner, asString, nameExtra, skipNullHandling = false, } = config; + const fn = function (root, mutablePath, bucket, bucketIndex, rawBucketRootValue = bucket.store.get(this.rootStep.id).at(bucketIndex), bucketRootFlags = bucket.store.get(this.rootStep.id)._flagsAt(bucketIndex)) { + if (this.sideEffectStep !== null) { + const sideEffectBucketDetails = getChildBucketAndIndex(this.sideEffectStep.layerPlan, null, bucket, bucketIndex); + if (sideEffectBucketDetails) { + const [sideEffectBucket, sideEffectBucketIndex] = sideEffectBucketDetails; + const ev = sideEffectBucket.store.get(this.sideEffectStep.id); + if (!ev) { + throw new Error(`GrafastInternalError: ${(0, index_js_1.stripAnsi)(String(this.sideEffectStep))} has no entry in ${bucket}`); + } + const seFlags = ev._flagsAt(sideEffectBucketIndex); + if (seFlags & interfaces_js_1.FLAG_ERROR) { + const seVal = ev.at(sideEffectBucketIndex); + throw coerceError(seVal, this.locationDetails, mutablePath.slice(1)); + } + } + } + if (bucketRootFlags & interfaces_js_1.FLAG_ERROR) { + throw coerceError(rawBucketRootValue, this.locationDetails, mutablePath.slice(1)); + } + const bucketRootValue = this.processRoot !== null + ? this.processRoot(rawBucketRootValue, bucketRootFlags) + : rawBucketRootValue; + const earlyReturn = preamble?.call(this, bucketRootValue); + if (earlyReturn !== undefined) { + return earlyReturn; + } + if (!skipNullHandling) { + if (bucketRootValue == null) + return (asString ? "null" : null); + } + return inner.call(this, bucketRootValue, root, mutablePath, bucket, bucketIndex, rawBucketRootValue, bucketRootFlags); + }; + fn.displayName = `outputPlan${asString ? "String" : ""}_${nameExtra}`; + return fn; +} +function executeChildPlan(that, locationDetails, childOutputPlan, isNonNull, asString, childBucket, childBucketIndex, bucket, bucketIndex, mutablePath, mutablePathIndex, root, rawBucketRootValue, bucketRootFlags) { + const $sideEffect = childOutputPlan.layerPlan.parentSideEffectStep; + if ($sideEffect !== null) { + // Check if there's an error + const sideEffectBucketDetails = getChildBucketAndIndex($sideEffect.layerPlan, null, bucket, bucketIndex); + if (sideEffectBucketDetails) { + const [sideEffectBucket, sideEffectBucketIndex] = sideEffectBucketDetails; + const ev = sideEffectBucket.store.get($sideEffect.id); + if (!ev) { + throw new Error(`GrafastInternalError: ${(0, index_js_1.stripAnsi)(String($sideEffect))} has no entry in ${bucket}`); + } + const flags = ev._flagsAt(sideEffectBucketIndex); + if (flags & interfaces_js_1.FLAG_ERROR) { + const e = coerceError(ev.at(sideEffectBucketIndex), locationDetails, mutablePath.slice(1)); + if (isNonNull) { + throw e; + } + else { + const streamCount = root.streams.length; + const queueCount = root.queue.length; + commonErrorHandler(e, locationDetails, mutablePath, mutablePathIndex, root, streamCount, queueCount); + return asString ? "null" : null; + } + } + } + } + // This is the code that changes based on if the field is nullable or not + if (isNonNull) { + // No need to catch error + if (childBucket === bucket) { + //noop + } + else { + if (childBucket == null) { + throw nonNullError(locationDetails, mutablePath.slice(1)); + } + } + const fieldResult = childOutputPlan[asString ? "executeString" : "execute"](root, mutablePath, childBucket, childBucketIndex, + // NOTE: the previous code may have had a bug here, it referenced childBucket.rootStep + childOutputPlan.rootStep === that.rootStep + ? rawBucketRootValue + : undefined, childOutputPlan.rootStep === that.rootStep ? bucketRootFlags : undefined); + if (fieldResult == (asString ? "null" : null)) { + throw nonNullError(locationDetails, mutablePath.slice(1)); + } + return fieldResult; + } + else { + // Need to catch error and set null + const streamCount = root.streams.length; + const queueCount = root.queue.length; + try { + if (childBucket !== bucket && childBucket == null) { + return asString ? "null" : null; + } + else { + return childOutputPlan[asString ? "executeString" : "execute"](root, mutablePath, childBucket, childBucketIndex, + // NOTE: the previous code may have had a bug here, it referenced childBucket.rootStep + childOutputPlan.rootStep === that.rootStep + ? rawBucketRootValue + : undefined, childOutputPlan.rootStep === that.rootStep + ? bucketRootFlags + : undefined); + } + } + catch (e) { + commonErrorHandler(e, locationDetails, mutablePath, mutablePathIndex, root, streamCount, queueCount); + return asString ? "null" : null; + } + } +} +function commonErrorHandler(e, locationDetails, mutablePath, mutablePathIndex, root, streamCount, queueCount) { + if (root.streams.length > streamCount) { + root.streams.splice(streamCount); + } + if (root.queue.length > queueCount) { + root.queue.splice(queueCount); + } + const error = coerceError(e, locationDetails, mutablePath.slice(1)); + const pathLengthTarget = mutablePathIndex + 1; + const overSize = mutablePath.length - pathLengthTarget; + if (overSize > 0) { + mutablePath.splice(pathLengthTarget, overSize); + } + root.errors.push(error); +} +const nullExecutor = makeExecutor({ + inner: () => null, + nameExtra: "null", + asString: false, +}); +const nullExecutorString = makeExecutor({ + inner: () => "null", + nameExtra: `null`, + asString: true, +}); +/* This is what leafExecutor should use if insideGraphQL (which isn't currently + * supported) + `\ + if (root.insideGraphQL) { + // Don't serialize to avoid the double serialization problem + return bucketRootValue; + } else { + return this.type.graphqlType.serialize(bucketRootValue); + } + ` */ +const leafExecutor = makeExecutor({ + inner(bucketRootValue) { + return this.type.graphqlType.serialize(bucketRootValue); + }, + nameExtra: `leaf`, + asString: false, +}); +const leafExecutorString = makeExecutor({ + inner(bucketRootValue) { + return (0, tamedevil_1.stringifyJSON)(this.type.graphqlType.serialize(bucketRootValue)); + }, + nameExtra: `leaf`, + asString: true, +}); +const booleanLeafExecutorString = makeExecutor({ + inner(bucketRootValue) { + const val = this.type.graphqlType.serialize(bucketRootValue); + return val === true ? "true" : "false"; + }, + nameExtra: `booleanLeaf`, + asString: true, + skipNullHandling: false, + preamble(bucketRootValue) { + if (bucketRootValue === true) + return "true"; + if (bucketRootValue === false) + return "false"; + }, +}); +const intLeafExecutorString = makeExecutor({ + inner(bucketRootValue) { + return "" + this.type.graphqlType.serialize(bucketRootValue); + }, + nameExtra: `intLeaf`, + asString: true, + skipNullHandling: false, + // Fast check to see if number is 32 bit integer + preamble(bucketRootValue) { + if ((bucketRootValue | 0) === bucketRootValue) { + return "" + bucketRootValue; + } + }, +}); +const floatLeafExecutorString = makeExecutor({ + inner(bucketRootValue) { + return String(this.type.graphqlType.serialize(bucketRootValue)); + }, + nameExtra: `floatLeaf`, + asString: true, + skipNullHandling: false, + preamble(bucketRootValue) { + if (Number.isFinite(bucketRootValue)) { + return "" + bucketRootValue; + } + }, +}); +const stringLeafExecutorString = makeExecutor({ + inner(bucketRootValue) { + return (0, tamedevil_1.stringifyString)(this.type.graphqlType.serialize(bucketRootValue)); + }, + nameExtra: `stringLeaf`, + asString: true, + skipNullHandling: false, + preamble(bucketRootValue) { + if (typeof bucketRootValue === "string") { + return (0, tamedevil_1.stringifyString)(bucketRootValue); + } + }, +}); +// NOTE: the reference to $$concreteType here is a (temporary) optimization; it +// should be `resolveType(bucketRootValue)` but it's not worth the function +// call overhead. Longer term it should just be read directly from a different +// store. +function makePolymorphicExecutor(asString) { + return makeExecutor({ + inner(bucketRootValue, root, mutablePath, bucket, bucketIndex) { + if (dev_js_1.isDev) { + if (!(0, polymorphic_js_1.isPolymorphicData)(bucketRootValue)) { + throw coerceError(new Error("GrafastInternalError: Expected polymorphic data"), this.locationDetails, mutablePath.slice(1)); + } + } + const typeName = bucketRootValue[interfaces_js_1.$$concreteType]; + const childOutputPlan = this.childByTypeName[typeName]; + if (dev_js_1.isDev) { + assert.ok(typeName, "GrafastInternalError: Could not determine concreteType for object"); + assert.ok(childOutputPlan, `GrafastInternalError: Could not determine the OutputPlan to use for '${typeName}' from '${bucket.layerPlan}'`); + } + const directChild = bucket.children[childOutputPlan.layerPlan.id]; + if (directChild !== undefined) { + return childOutputPlan[asString ? "executeString" : "execute"](root, mutablePath, directChild.bucket, directChild.map.get(bucketIndex)); + } + else { + const c = getChildBucketAndIndex(childOutputPlan.layerPlan, this, bucket, bucketIndex); + if (!c) { + throw new Error("GrafastInternalError<691509d8-31fa-4cfe-a6df-dcba21bd521f>: polymorphic executor couldn't determine child bucket"); + } + const [childBucket, childBucketIndex] = c; + return childOutputPlan[asString ? "executeString" : "execute"](root, mutablePath, childBucket, childBucketIndex); + } + }, + nameExtra: "polymorphic", + asString, + }); +} +const polymorphicExecutor = makePolymorphicExecutor(false); +const polymorphicExecutorString = makePolymorphicExecutor(true); +function makeArrayExecutor(childIsNonNull, canStream, asString) { + return makeExecutor({ + inner(bucketRootValue, root, mutablePath, bucket, bucketIndex, rawBucketRootValue, bucketRootFlags) { + if (!Array.isArray(bucketRootValue)) { + console.warn(`Hit fallback for value ${(0, inspect_js_1.inspect)(bucketRootValue)} coercion to mode 'array'`); + return (asString ? "null" : null); + } + if (this.child === null) { + throw new Error(`GrafastInternalError<365fd45e-2939-411b-92a6-4f6875d8fbd3>: ${this} has no child output plan?!`); + } + const childOutputPlan = this.child; + const l = bucketRootValue.length; + let string; + let data; + if (l === 0) { + if (asString) { + string = "[]"; + } + else { + data = []; + } + } + else { + if (asString) { + string = "["; + } + else { + data = []; + } + const mutablePathIndex = mutablePath.push(-1) - 1; + // Now to populate the children... + const directChild = bucket.children[childOutputPlan.layerPlan.id]; + let childBucket, childBucketIndex, lookup; + if (directChild !== undefined) { + childBucket = directChild.bucket; + lookup = directChild.map.get(bucketIndex); + } + for (let i = 0; i < l; i++) { + if (directChild !== undefined) { + childBucketIndex = lookup[i]; + } + else { + const c = getChildBucketAndIndex(childOutputPlan.layerPlan, this, bucket, bucketIndex, i); + if (c !== null) { + [childBucket, childBucketIndex] = c; + } + else { + childBucket = childBucketIndex = null; + } + } + mutablePath[mutablePathIndex] = i; + if (asString) { + if (i > 0) { + string += ","; + } + } + const val = executeChildPlan(this, this.locationDetails, childOutputPlan, childIsNonNull, asString, childBucket, childBucketIndex, bucket, bucketIndex, mutablePath, mutablePathIndex, root, rawBucketRootValue, bucketRootFlags); + if (asString) { + string += val; + } + else { + data[i] = val; + } + } + mutablePath.length = mutablePathIndex; + if (asString) { + string += "]"; + } + } + if (canStream) { + const stream = bucketRootValue[interfaces_js_1.$$streamMore]; + if (stream !== undefined) { + const labelStepId = childOutputPlan.layerPlan.reason.stream?.labelStepId; + root.streams.push({ + root, + path: mutablePath.slice(1), + bucket, + bucketIndex, + outputPlan: childOutputPlan, + label: labelStepId != null + ? bucket.store.get(labelStepId)?.unaryValue() + : undefined, + stream, + startIndex: bucketRootValue.length, + }); + } + } + return (asString ? string : data); + }, + nameExtra: `array${childIsNonNull ? "_nonNull" : ""}${canStream ? "_stream" : ""}`, + asString, + }); +} +const arrayExecutor_nullable = makeArrayExecutor(false, false, false); +const arrayExecutor_nullable_streaming = makeArrayExecutor(false, true, false); +const arrayExecutor_nonNullable = makeArrayExecutor(true, false, false); +const arrayExecutor_nonNullable_streaming = makeArrayExecutor(true, true, false); +const arrayExecutorString_nullable = makeArrayExecutor(false, false, true); +const arrayExecutorString_nullable_streaming = makeArrayExecutor(false, true, true); +const arrayExecutorString_nonNullable = makeArrayExecutor(true, false, true); +const arrayExecutorString_nonNullable_streaming = makeArrayExecutor(true, true, true); +/** + * This piggy-backs off of GraphQL.js by rewriting the request, executing it in + * GraphQL.js, and then patching it into our response. It's a temporary + * workaround until we can afford the time to write our own introspection + * execution. + * + * ENHANCE: write our own introspection execution! + */ +function introspect(root, outputPlan, mutablePath, asString) { + const { locationDetails } = outputPlan; + const { field: rawField, introspectionCacheByVariableValues, variableNames, } = outputPlan.type; + const field = { + ...rawField, + alias: { kind: Kind.NAME, value: "a" }, + }; + const document = { + definitions: [ + { + kind: Kind.OPERATION_DEFINITION, + operation: OperationTypeNode.QUERY, + selectionSet: { + kind: Kind.SELECTION_SET, + selections: [field], + }, + variableDefinitions: outputPlan.layerPlan.operationPlan.operation.variableDefinitions?.filter((d) => variableNames.includes(d.variable.name.value)), + }, + ...Object.values(outputPlan.layerPlan.operationPlan.fragments), + ], + kind: Kind.DOCUMENT, + }; + const variableValues = Object.create(null); + const sortedVariableNames = [...variableNames].sort(); + for (const variableName of sortedVariableNames) { + variableValues[variableName] = root.variables[variableName]; + } + // "canonical" only to one level, but given introspection doesn't really + // accept objects this should be mostly sufficient for decent optimization + // level. + const canonical = JSON.stringify(variableValues); + const cached = introspectionCacheByVariableValues.get(canonical); + if (cached !== undefined) { + return (asString ? JSON.stringify(cached) : cached); + } + const graphqlResult = executeSync({ + schema: outputPlan.layerPlan.operationPlan.schema, + document, + variableValues, + }); + if (graphqlResult.errors !== undefined) { + // NOTE: we should map the introspection path, however that might require + // us to be able to raise multiple errors. Theoretically if the query + // validates we shouldn't be able to get errors out of the introspection + // system, so we'll skip over this for now. When we get around to + // implementing introspection natively in Grafast rather than piggy-backing + // off of GraphQL.js then this problem will go away on its own. + console.error("INTROSPECTION FAILED!"); + console.error(graphqlResult); + const { node } = locationDetails; + throw new GraphQLError("INTROSPECTION FAILED!", node, null, null, mutablePath.slice(1), null, null); + } + const result = graphqlResult.data.a; + introspectionCacheByVariableValues.set(canonical, result); + return (asString ? JSON.stringify(result) : result); +} +const introspectionExecutor = makeExecutor({ + inner(_bucketRootValue, root, mutablePath) { + return introspect(root, this, mutablePath, false); + }, + nameExtra: `introspection`, + asString: false, + skipNullHandling: true, +}); +const introspectionExecutorString = makeExecutor({ + inner(_bucketRootValue, root, mutablePath) { + return introspect(root, this, mutablePath, true); + }, + nameExtra: `introspection`, + asString: true, + skipNullHandling: true, +}); +const SAFE_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/; +function makeObjectExecutor(typeName, fieldTypes, hasDeferredOutputPlans, +// this.type.mode === "root", +isRoot, asString) { + if (!SAFE_NAME.test(typeName)) { + throw new Error(`Unsafe type name: ${typeName}; doesn't conform to 'Name' in the GraphQL spec`); + } + if (dev_js_1.isDev) { + if (Object.getPrototypeOf(fieldTypes) !== null) { + throw new Error(`GrafastInternalError<3d8e3547-d818-44e1-a076-16b828e3a34d>: fieldTypes must have a null prototype`); + } + } + const fieldDigests = Object.entries(fieldTypes).map(([responseKey, fieldSpec], i) => { + // NOTE: this code relies on the fact that fieldName and typeName do + // not require any quoting in JSON/JS - they must conform to GraphQL + // `Name`. + if (!SAFE_NAME.test(responseKey)) { + // This should not be able to happen if the GraphQL operation is valid + throw new Error(`Unsafe key: ${responseKey}; doesn't conform to 'Name' in the GraphQL spec`); + } + const { fieldType, sameBucket } = fieldSpec; + const addComma = asString && i > 0; + switch (fieldType) { + case "__typename": { + return { + isTypeName: true, + addComma, + responseKey, + stringValue: asString ? `"${responseKey}":"${typeName}"` : null, + }; + } + case "outputPlan!": + case "outputPlan?": { + return { + isTypeName: false, + addComma, + responseKey, + stringPrefix: asString ? `"${responseKey}":` : null, + sameBucket, + isNonNull: fieldType === "outputPlan!", + }; + } + default: { + const never = fieldType; + throw new Error(`GrafastInternalError<879082f4-fe6f-4112-814f-852b9932ca83>: unsupported key type ${never}`); + } + } + }); + return makeExecutor({ + inner(bucketRootValue, root, mutablePath, bucket, bucketIndex, rawBucketRootValue, bucketRootFlags) { + let string = asString ? "{" : undefined; + const obj = asString + ? undefined + : Object.create(null); + const keys = this.keys; + const mutablePathIndex = mutablePath.push("!") - 1; + for (const digest of fieldDigests) { + if (digest.addComma) { + string += ","; + } + const responseKey = digest.responseKey; + if (digest.isTypeName) { + if (asString) { + string += digest.stringValue; + } + else { + obj[responseKey] = typeName; + } + } + else { + mutablePath[mutablePathIndex] = responseKey; + const spec = keys[responseKey]; + if (digest.sameBucket) { + const val = executeChildPlan(this, spec.locationDetails, spec.outputPlan, digest.isNonNull, asString, bucket, bucketIndex, bucket, bucketIndex, mutablePath, mutablePathIndex, root, rawBucketRootValue, bucketRootFlags); + if (asString) { + string += digest.stringPrefix; + string += val; + } + else { + obj[responseKey] = val; + } + } + else { + const directChild = bucket.children[spec.outputPlan.layerPlan.id]; + let childBucket, childBucketIndex; + if (directChild !== undefined) { + childBucket = directChild.bucket; + childBucketIndex = directChild.map.get(bucketIndex); + } + else { + const c = getChildBucketAndIndex(spec.outputPlan.layerPlan, this, bucket, bucketIndex); + if (c !== null) { + [childBucket, childBucketIndex] = c; + } + else { + childBucket = childBucketIndex = null; + } + } + const val = executeChildPlan(this, spec.locationDetails, spec.outputPlan, digest.isNonNull, asString, childBucket, childBucketIndex, bucket, bucketIndex, mutablePath, mutablePathIndex, root, rawBucketRootValue, bucketRootFlags); + if (asString) { + string += digest.stringPrefix; + string += val; + } + else { + obj[responseKey] = val; + } + } + } + } + mutablePath.length = mutablePathIndex; + if (asString) { + string += "}"; + } + if (hasDeferredOutputPlans) { + // Everything seems okay; queue any deferred payloads + for (const defer of this.deferredOutputPlans) { + root.queue.push({ + root, + path: mutablePath.slice(1), + bucket, + bucketIndex, + outputPlan: defer, + label: defer.type.deferLabel, + }); + } + } + return (asString ? string : obj); + }, + nameExtra: "object", + asString, + skipNullHandling: isRoot, + }); +} +const makeCache = new lru_1.default({ + maxLength: 1000, +}); +const makingCache = new Map(); +function withFastExpression(path, fallback, callback) { + const signature = (fallback === undefined ? "d" : "f") + "_" + path.join("|"); + const existing = makeCache.get(signature); + if (existing !== undefined) { + callback(existing); + return; + } + const existingCallbacks = makingCache.get(signature); + if (existingCallbacks !== undefined) { + existingCallbacks.push(callback); + return; + } + const callbacks = [callback]; + makingCache.set(signature, callbacks); + const jitParts = []; + for (let i = 0, l = path.length; i < l; i++) { + const part = path[i]; + jitParts.push(tamedevil_1.default.optionalGet(part)); + } + const expression = tamedevil_1.default.join(jitParts, ""); + tamedevil_1.default.runInBatch((0, tamedevil_1.default) `(value => (value${expression})${fallback !== undefined ? (0, tamedevil_1.default) ` ?? ${tamedevil_1.default.lit(fallback)}` : tamedevil_1.default.blank})`, (fn) => { + makeCache.set(signature, fn); + makingCache.delete(signature); + for (const callback of callbacks) { + callback(fn); + } + }); +} +//# sourceMappingURL=OutputPlan.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/OutputPlan.js.map b/grafast/grafast/dist/engine/OutputPlan.js.map new file mode 100644 index 0000000000..9c5af844b5 --- /dev/null +++ b/grafast/grafast/dist/engine/OutputPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OutputPlan.js","sourceRoot":"","sources":["../../src/engine/OutputPlan.ts"],"names":[],"mappings":";;;AAinBA,kCA+BC;AAED,oCAyBC;AAaD,wDAuFC;;AA/wBD,gEAAgC;AAQhC,yDAAmC;AAEnC,+DAA+D;AAE/D,6DAAuC;AAEvC,sCAAkC;AAClC,0CAAyE;AACzE,8CAAwC;AAMxC,oDAA4E;AAC5E,sDAAsD;AAEtD,kDAAsD;AAItD,MAAM,EACJ,WAAW,EACX,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,iBAAiB,GAClB,GAAG,OAAO,CAAC;AAgHZ;;;;;;;;GAQG;AACH,MAAa,UAAU;IA0DrB,YACS,SAAoB;IAC3B;;;;;;;;;;;;OAYG;IACH,QAAc,EACE,IAAW,EAC3B,eAAgC;QAhBzB,cAAS,GAAT,SAAS,CAAW;QAeX,SAAI,GAAJ,IAAI,CAAO;QA3D7B;;;;WAIG;QACI,gBAAW,GAChB,IAAI,CAAC;QAEP;;;;;;WAMG;QACI,SAAI,GAIP,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAExB;;WAEG;QACI,UAAK,GAAsB,IAAI,CAAC;QAChC,mBAAc,GAAG,KAAK,CAAC;QAW9B;;WAEG;QACI,wBAAmB,GAEpB,EAAE,CAAC;QAqBP,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,eAA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C,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC7B,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC9B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACf,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/StepTracker.d.ts b/grafast/grafast/dist/engine/StepTracker.d.ts new file mode 100644 index 0000000000..73b594dc37 --- /dev/null +++ b/grafast/grafast/dist/engine/StepTracker.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=StepTracker.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/StepTracker.d.ts.map b/grafast/grafast/dist/engine/StepTracker.d.ts.map new file mode 100644 index 0000000000..77b1788055 --- /dev/null +++ b/grafast/grafast/dist/engine/StepTracker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StepTracker.d.ts","sourceRoot":"","sources":["../../src/engine/StepTracker.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/StepTracker.js b/grafast/grafast/dist/engine/StepTracker.js new file mode 100644 index 0000000000..313190cb18 --- /dev/null +++ b/grafast/grafast/dist/engine/StepTracker.js @@ -0,0 +1,598 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StepTracker = void 0; +const dev_js_1 = require("../dev.js"); +const inspect_js_1 = require("../inspect.js"); +const interfaces_js_1 = require("../interfaces.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const lock_js_1 = require("./lock.js"); +/** + * This class keeps track of all of our steps, and the dependencies between + * steps and other steps, layer plans and steps, and output plans and steps. + * + * When a step is replaced by another step, all the dependencies are updated + * such that the replaced step simply evaporates. + * + * @internal + */ +class StepTracker { + constructor(operationPlan) { + this.operationPlan = operationPlan; + /** @internal */ + this.stepCount = 0; + /** @internal */ + this.lockedStepCount = 0; + /** @internal */ + this.activeSteps = new Set(); + /** @internal */ + this.stepById = []; + /** @internal */ + this.aliasesById = []; + /** @internal */ + this.stepsWithNoDependenciesByConstructor = new Map(); + /** @internal */ + this.internalDependencies = new Set(); + /** @internal */ + this.outputPlansByRootStep = new Map(); + /** @internal */ + this.layerPlansByRootStep = new Map(); + /** @internal */ + this.layerPlansByParentStep = new Map(); + /** @internal */ + this.layerPlans = []; + /** + * All the OutputPlans that were created to allow a more efficient + * walkOutputPlans implementation. + * + * @internal + */ + this.allOutputPlans = []; + this.nextStepIdToDeduplicate = 0; + } + newStepsSince(oldStepCount) { + return this.stepById.slice(oldStepCount); + } + forbid(key) { + this[key] = () => { + throw new Error(`StepTracker.${key}(...) is forbidden after 'finalize' phase`); + }; + } + /** Called when OperationPlan enters finalize phase. */ + finalizeSteps() { + this.forbid("addStep"); + this.forbid("addLayerPlan"); + this.forbid("addOutputPlan"); + this.forbid("deleteLayerPlan"); + this.forbid("addStepDependency"); + this.forbid("setLayerPlanRootStep"); + this.forbid("replaceStep"); + } + /** Called when OperationPlan is about to finalize the output plans. */ + finalizeOutputPlans() { + this.forbid("setOutputPlanRootStep"); + } + addStep($step) { + const stepId = this.stepCount++; + this.activeSteps.add($step); + const ctor = $step.constructor; + let stepsWithNoDependencies = this.stepsWithNoDependenciesByConstructor.get(ctor); + if (!stepsWithNoDependencies) { + stepsWithNoDependencies ??= new Set(); + this.stepsWithNoDependenciesByConstructor.set(ctor, stepsWithNoDependencies); + } + stepsWithNoDependencies.add($step); + this.stepById[stepId] = $step; + this.aliasesById[stepId] = undefined; + this.addStepToItsLayerPlan($step); + return stepId; + } + /** + * @internal + */ + addLayerPlan(layerPlan) { + const id = this.layerPlans.push(layerPlan) - 1; + switch (layerPlan.reason.type) { + case "root": + case "subscription": + case "mutationField": + case "defer": { + break; + } + case "nullableBoundary": + case "listItem": + case "polymorphic": { + const store = this.layerPlansByParentStep.get(layerPlan.reason.parentStep); + if (store !== undefined) { + store.add(layerPlan); + } + else { + const layerPlans = new Set(); + layerPlans.add(layerPlan); + this.layerPlansByParentStep.set(layerPlan.reason.parentStep, layerPlans); + } + break; + } + case "subroutine": { + const parent = layerPlan.reason.parentStep; + if (parent[interfaces_js_1.$$subroutine] !== null) { + throw new Error(`Steps may currently only have one subroutine. If you have need for a step with multiple subroutines, please get in touch.`); + } + parent[interfaces_js_1.$$subroutine] = + layerPlan; + break; + } + default: { + const never = layerPlan.reason; + throw new Error(`Unexpected layerPlan reason ${never.type}`); + } + } + return id; + } + /** + * @internal + */ + addOutputPlan(outputPlan) { + if (dev_js_1.isDev && !this.activeSteps.has(outputPlan.rootStep)) { + throw new Error(`GrafastInternalError<84485250-c4f3-4175-ab0c-360e073fa69f>: Root step '${outputPlan.rootStep}' is not active; perhaps it was replaced (replacement: ${this.getStepById(outputPlan.rootStep.id)})`); + } + this.allOutputPlans.push(outputPlan); + const store = this.outputPlansByRootStep.get(outputPlan.rootStep); + if (store !== undefined) { + store.add(outputPlan); + } + else { + const outputPlans = new Set(); + outputPlans.add(outputPlan); + this.outputPlansByRootStep.set(outputPlan.rootStep, outputPlans); + } + } + /** + * HIGHLY EXPERIMENTAL! + * + * @internal + */ + deleteLayerPlan(layerPlan) { + if (dev_js_1.isDev) { + if (layerPlan.children.length > 0) { + throw new Error("This layer plan has children... should we really be deleting it?!"); + } + this.allOutputPlans.forEach((o) => { + if (o.layerPlan === layerPlan) { + throw new Error("An output plan depends on this layer plan... should we really be deleting it?!"); + } + }); + } + this.layerPlans[layerPlan.id] = null; + // Remove layerPlan from its parent + if (layerPlan.parentLayerPlan !== null) { + const idx = layerPlan.parentLayerPlan.children.indexOf(layerPlan); + if (idx >= 0) { + layerPlan.parentLayerPlan.children.splice(idx, 1); + } + } + // Remove references + const $root = layerPlan.rootStep; + if ($root) { + this.layerPlansByRootStep.get($root).delete(layerPlan); + } + if (layerPlan.reason.type !== "subroutine") { + const $parent = "parentStep" in layerPlan.reason ? layerPlan.reason.parentStep : null; + if ($parent) { + this.layerPlansByParentStep + .get($parent) + .delete(layerPlan); + } + } + // Remove all plans in this layer + const handled = new Set(); + const handle = (step) => { + if (handled.has(step)) + return; + handled.add(step); + // Handle dependents first + for (const dependent of step.dependents) { + if (dependent.step.layerPlan === layerPlan) { + handle(dependent.step); + } + } + this.eradicate(step); + }; + for (const step of this.activeSteps) { + if (step.layerPlan === layerPlan) { + handle(step); + } + } + } + getStepById(id, allowUnset = false) { + const step = this.stepById[id]; + if (!step && !allowUnset) { + throw new Error(`Illegal step access? Step with id ${id} doesn't exist`); + } + if (dev_js_1.isDev) { + if (step && !this.activeSteps.has(step)) { + throw new Error(`${step} is not active, but we retrieved it from stepTracker.getStepById(${id}, ${allowUnset})`); + } + } + return step; + } + addStepDependency(raw$dependent, options) { + const $dependent = (0, utils_js_1.sudo)(raw$dependent); + const $dependency = (0, utils_js_1.sudo)(options.step); + if (!this.activeSteps.has($dependent)) { + throw new Error(`Cannot add ${$dependency} as a dependency of ${$dependent}; the latter is deleted!`); + } + if (!this.activeSteps.has($dependency)) { + throw new Error(`Cannot add ${$dependency} as a dependency of ${$dependent}; the former is deleted!`); + } + if ($dependent.isFinalized) { + throw new Error("You cannot add a dependency after the step is finalized."); + } + if (!($dependency instanceof step_js_1.Step)) { + throw new Error(`Error occurred when adding dependency for '${$dependent}', value passed was not a step, it was '${(0, inspect_js_1.inspect)($dependency)}'`); + } + if (dev_js_1.isDev) { + // Check that we can actually add this as a dependency + if (!$dependent.layerPlan.ancestry.includes($dependency.layerPlan)) { + throw new Error( + //console.error( + // This is not a GrafastInternalError + `Attempted to add '${$dependency}' (${$dependency.layerPlan}) as a dependency of '${$dependent}' (${$dependent.layerPlan}), but we cannot because that LayerPlan isn't an ancestor`); + } + } + const dependentDependencies = (0, utils_js_1.writeableArray)($dependent.dependencies); + const dependentDependencyForbiddenFlags = (0, utils_js_1.writeableArray)($dependent.dependencyForbiddenFlags); + const dependentDependencyOnReject = (0, utils_js_1.writeableArray)($dependent.dependencyOnReject); + const { skipDeduplication, acceptFlags = interfaces_js_1.ALL_FLAGS & ~$dependent.defaultForbiddenFlags, onReject, } = options; + // When copying dependencies between classes, we might not want to + // deduplicate because we might refer to the dependency by its index. As + // such, we should only dedupe by default but allow opting out. + // TODO: change this to `!skipDeduplication` + if (skipDeduplication === false) { + const existingIndex = dependentDependencies.indexOf($dependency); + if (existingIndex >= 0) { + return existingIndex; + } + } + if (!$dependency._isUnary && $dependent._isUnary) { + if ($dependent._isUnaryLocked) { + throw new Error(`Attempted to add non-unary step ${$dependency} as a dependency of ${$dependent}; but the latter is unary, so it cannot depend on batch steps`); + } + $dependent._isUnary = false; + } + const forbiddenFlags = interfaces_js_1.ALL_FLAGS & ~(acceptFlags & interfaces_js_1.TRAPPABLE_FLAGS); + this.stepsWithNoDependenciesByConstructor + .get($dependent.constructor) + ?.delete($dependent); + const dependencyIndex = dependentDependencies.push($dependency) - 1; + dependentDependencyForbiddenFlags[dependencyIndex] = forbiddenFlags; + dependentDependencyOnReject[dependencyIndex] = onReject; + (0, utils_js_1.writeableArray)($dependency.dependents).push({ + step: $dependent, + dependencyIndex, + }); + return dependencyIndex; + } + addStepUnaryDependency($dependent, options) { + const $dependency = options.step; + if (!$dependency._isUnary) { + const { nonUnaryMessage = defaultNonUnaryMessage } = options; + throw new Error(nonUnaryMessage($dependent, $dependency)); + } + $dependency._isUnaryLocked = true; + return this.addStepDependency($dependent, options); + } + setOutputPlanRootStep(outputPlan, $dependency) { + if (!this.activeSteps.has($dependency)) { + throw new Error(`Cannot add ${$dependency} to ${outputPlan} because it's deleted`); + } + const $existing = outputPlan.rootStep; + if ($existing) { + const outputPlansBy$existing = this.outputPlansByRootStep.get($existing); + if (!outputPlansBy$existing) { + throw new Error(`GrafastInternalError: ${outputPlan}.rootStep (${$existing}) isn't in 'outputPlansByRootStep'`); + } + outputPlansBy$existing.delete(outputPlan); + if (outputPlansBy$existing.size === 0) { + // PERF: Cleanup, tree shake, etc + } + } + outputPlan.rootStep = $dependency; + const store = this.outputPlansByRootStep.get($dependency); + if (store !== undefined) { + store.add(outputPlan); + } + else { + const outputPlans = new Set(); + outputPlans.add(outputPlan); + this.outputPlansByRootStep.set($dependency, outputPlans); + } + } + setLayerPlanRootStep(layerPlan, $dependency) { + if (!this.activeSteps.has($dependency)) { + throw new Error(`Cannot add ${$dependency} to ${layerPlan} because it's deleted`); + } + const $existing = layerPlan.rootStep; + if ($existing) { + const layerPlansBy$existing = this.layerPlansByRootStep.get($existing); + if (!layerPlansBy$existing) { + throw new Error(`GrafastInternalError<7b5b7fe6-d403-48bd-a75f-1c9557b9a030>: ${layerPlan}.rootStep (${$existing}) isn't in 'layerPlansByRootStep'`); + } + layerPlansBy$existing.delete(layerPlan); + if (layerPlansBy$existing.size === 0) { + this.layerPlansByRootStep.delete($existing); + // PERF: Cleanup, tree shake, etc + } + } + layerPlan.rootStep = $dependency; + const store = this.layerPlansByRootStep.get($dependency); + if (store !== undefined) { + store.add(layerPlan); + } + else { + const layerPlans = new Set(); + layerPlans.add(layerPlan); + this.layerPlansByRootStep.set($dependency, layerPlans); + } + } + /** @internal */ + replaceStep($original, $replacement) { + if (!this.activeSteps.has($original)) { + // OPTIMIZE: seems like there's unnecessary work being done here. + // console.trace(`${$original} should be replaced with ${$replacement} but it's no longer alive`); + // Already handled + return; + } + // Replace all references to $original with $replacement + const oldAliases = this.aliasesById[$original.id]; + const newAliases = this.aliasesById[$replacement.id] ?? [$replacement.id]; + this.aliasesById[$replacement.id] = newAliases; + if (oldAliases !== undefined) { + for (const id of oldAliases) { + this.stepById[id] = $replacement; + newAliases.push(id); + } + this.aliasesById[$original.id] = undefined; + } + else { + this.stepById[$original.id] = $replacement; + newAliases.push($original.id); + } + { + // Transfer step dependents of $original to $replacement + const dependents = $original.dependents; + if (dependents.length > 0) { + const replacementDependents = (0, utils_js_1.writeableArray)($replacement.dependents); + for (const dependent of dependents) { + (0, utils_js_1.writeableArray)((0, utils_js_1.sudo)(dependent.step).dependencies)[dependent.dependencyIndex] = $replacement; + replacementDependents.push(dependent); + } + $original.dependents = []; + } + } + { + // Convert root step of output plans from $original to $replacement + const outputPlans = this.outputPlansByRootStep.get($original); + if (outputPlans?.size) { + let outputPlansByReplacementStep = this.outputPlansByRootStep.get($replacement); + if (!outputPlansByReplacementStep) { + outputPlansByReplacementStep = new Set(); + this.outputPlansByRootStep.set($replacement, outputPlansByReplacementStep); + } + for (const outputPlan of outputPlans) { + outputPlan.rootStep = $replacement; + outputPlansByReplacementStep.add(outputPlan); + } + outputPlans.clear(); + } + } + { + // Convert root step of layer plans from $original to $replacement + const layerPlans = this.layerPlansByRootStep.get($original); + if (layerPlans?.size) { + let layerPlansByReplacementRootStep = this.layerPlansByRootStep.get($replacement); + if (!layerPlansByReplacementRootStep) { + layerPlansByReplacementRootStep = new Set(); + this.layerPlansByRootStep.set($replacement, layerPlansByReplacementRootStep); + } + for (const layerPlan of layerPlans) { + layerPlan.rootStep = $replacement; + layerPlansByReplacementRootStep.add(layerPlan); + } + layerPlans.clear(); + } + } + // NOTE: had to add the code ensuring all the layer plan parentStepId's + // existed to fix polymorphism, but it feels wrong. Should we be doing + // something different? + { + // Convert parent step of layer plans from $original to $replacement + const layerPlans = this.layerPlansByParentStep.get($original); + if (layerPlans?.size) { + let layerPlansByReplacementParentStep = this.layerPlansByParentStep.get($replacement); + if (!layerPlansByReplacementParentStep) { + layerPlansByReplacementParentStep = new Set(); + this.layerPlansByParentStep.set($replacement, layerPlansByReplacementParentStep); + } + for (const layerPlan of layerPlans) { + layerPlan.reason.parentStep = $replacement; + layerPlansByReplacementParentStep.add(layerPlan); + } + layerPlans.clear(); + } + } + // NOTE: I don't think side-effect plans need any special handling, since + // they cannot be deduplicated. + // NOTE: there may be more work required here for 'subprocedure' layerPlans + // (e.g. making sure their steps are retained), but it's not clear what + // work is necessary and we've not seen any issues from this yet. + // Remove this step (and perform localized tree-shaking) + this.eradicate($original); + } + treeShakeSteps() { + for (const $step of this.activeSteps) { + if (this.isNotNeeded($step)) { + this.eradicate($step); + } + } + } + /** + * Return true if this step can be tree-shaken. + */ + isNotNeeded($step) { + if ($step.dependents.length !== 0) + return false; + if ($step.hasSideEffects) + return false; + if (this.internalDependencies.has($step)) { + return false; + } + const s1 = this.outputPlansByRootStep.get($step); + if (s1 && s1.size !== 0) + return false; + const s2 = this.layerPlansByRootStep.get($step); + if (s2 && s2.size !== 0) + return false; + const s3 = this.layerPlansByParentStep.get($step); + if (s3 && s3.size !== 0) + return false; + return true; + } + /** + * Only for use during planField. + */ + purgeBackTo(count) { + const upper = this.stepCount; + const toRemove = new Set(); + for (let i = count; i < upper; i++) { + const step = this.stepById[i]; + if (step) { + toRemove.add(step); + } + } + const remove = (step) => { + if (this.stepById[step.id] !== step) { + return; + } + if (toRemove.has(step)) { + for (const dependent of step.dependents) { + if (dependent.step.id >= count) { + remove(dependent.step); + } + } + this.eradicate(step); + toRemove.delete(step); + } + }; + for (const step of toRemove) { + remove(step); + } + } + /** + * ONLY CALL THIS IF NOTHING DEPENDS ON $original! It's intended to be called + * from `replaceStep` or from itself. + * + * This method removes $original from the various maps/sets/lists, and also + * removes the fact that it was dependent on other steps. If these other + * steps no longer have any dependents (steps, layer plans or output plans) + * then they can also be eradicated _except_ during the 'plan' phase. + */ + eradicate($original) { + if ($original[interfaces_js_1.$$subroutine] !== null) { + this.deleteLayerPlan($original[interfaces_js_1.$$subroutine]); + } + this.removeStepFromItsLayerPlan($original); + const oldAliases = this.aliasesById[$original.id]; + if (oldAliases !== undefined) { + for (const id of oldAliases) { + // Nothing needs us, so set ourself null (DELIBERATELY BYPASSES TYPESCRIPT!) + this.stepById[id] = null; + } + this.aliasesById[$original.id] = undefined; + } + else if (this.stepById[$original.id] === $original) { + this.stepById[$original.id] = null; + } + // Since this step is being removed, it doesn't need its dependencies any more + const oldDependencies = (0, utils_js_1.sudo)($original).dependencies; + for (const $dependency of oldDependencies) { + // $dependency is no longer a dependent of $original, since we're getting + // rid of $original + $dependency.dependents = $dependency.dependents.filter((dependent) => dependent.step !== $original); + // If we've done our first tree-shake, let's keep it tidy in here. + if (this.operationPlan.phase !== "plan" && + this.isNotNeeded($dependency)) { + // Nothing depends on $dependency and it has no side effects - we can get rid of it! + this.eradicate($dependency); + } + } + // Ensure nothing depends on this step - steps, layer plans, output plans. + // This should already be the case, so we just do it in dev as a + // consistency check. + if (dev_js_1.isDev) { + if ($original.dependents.length > 0) { + throw new Error(`${$original} eradicated, but it is needed by ${$original.dependents.map((d) => d.step)}`); + } + const outputPlansByRoot = this.outputPlansByRootStep.get($original); + if (outputPlansByRoot && outputPlansByRoot.size !== 0) { + throw new Error(`${$original} eradicated, but it is needed by ${[ + ...outputPlansByRoot, + ]}`); + } + const layerPlansByRoot = this.layerPlansByRootStep.get($original); + if (layerPlansByRoot && layerPlansByRoot.size !== 0) { + throw new Error(`${$original} eradicated, but it is needed by ${[ + ...layerPlansByRoot, + ]}`); + } + const layerPlansByParent = this.layerPlansByParentStep.get($original); + if (layerPlansByParent && layerPlansByParent.size !== 0) { + throw new Error(`${$original} eradicated, but it is needed by ${[ + ...layerPlansByParent, + ]}`); + } + } + this.stepsWithNoDependenciesByConstructor + .get($original.constructor) + ?.delete($original); + this.outputPlansByRootStep.delete($original); + this.layerPlansByRootStep.delete($original); + this.layerPlansByParentStep.delete($original); + this.activeSteps.delete($original); + // Referencing $original after this will likely cause errors. + $original.destroy(); + } + moveStepToLayerPlan(step, targetLayerPlan) { + this.removeStepFromItsLayerPlan(step); + step.layerPlan = targetLayerPlan; + this.addStepToItsLayerPlan(step); + } + addStepToItsLayerPlan(step) { + const { layerPlan: { stepsByConstructor }, constructor, } = step; + let set = stepsByConstructor.get(constructor); + if (!set) { + set = new Set(); + stepsByConstructor.set(constructor, set); + } + set.add(step); + } + removeStepFromItsLayerPlan(step) { + step.layerPlan.stepsByConstructor.get(step.constructor).delete(step); + } + lockNewSteps() { + if (!dev_js_1.isDev) + return; + for (let i = this.lockedStepCount; i < this.stepCount; i++) { + const step = this.getStepById(i, true); + if (step && step.id === i) { + (0, lock_js_1.lock)(step); + } + } + this.lockedStepCount = this.stepCount; + } +} +exports.StepTracker = StepTracker; +function defaultNonUnaryMessage($dependent, $dependency) { + return `${$dependent} attempted to create a unary step dependency on ${$dependency}, but that step is not unary. See https://err.red/gud`; +} +//# sourceMappingURL=StepTracker.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/StepTracker.js.map b/grafast/grafast/dist/engine/StepTracker.js.map new file mode 100644 index 0000000000..05adba6338 --- /dev/null +++ b/grafast/grafast/dist/engine/StepTracker.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StepTracker.js","sourceRoot":"","sources":["../../src/engine/StepTracker.ts"],"names":[],"mappings":";;;AAAA,sCAAkC;AAElC,8CAAwC;AAExC,oDAA4E;AAC5E,wCAAkC;AAElC,0CAAmD;AAMnD,uCAAiC;AAGjC;;;;;;;;GAQG;AACH,MAAa,WAAW;IA8CtB,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QA7CzD,gBAAgB;QACT,cAAS,GAAG,CAAC,CAAC;QACrB,gBAAgB;QACT,oBAAe,GAAG,CAAC,CAAC;QAC3B,gBAAgB;QACT,gBAAW,GAAG,IAAI,GAAG,EAAQ,CAAC;QACrC,gBAAgB;QACT,aAAQ,GAEX,EAAE,CAAC;QACP,gBAAgB;QACR,gBAAW,GAEf,EAAE,CAAC;QACP,gBAAgB;QACT,yCAAoC,GAAG,IAAI,GAAG,EAIlD,CAAC;QAEJ,gBAAgB;QACT,yBAAoB,GAAG,IAAI,GAAG,EAAQ,CAAC;QAC9C,gBAAgB;QACT,0BAAqB,GAAG,IAAI,GAAG,EAAyB,CAAC;QAChE,gBAAgB;QACT,yBAAoB,GAAG,IAAI,GAAG,EAAwB,CAAC;QAC9D,gBAAgB;QACT,2BAAsB,GAAG,IAAI,GAAG,EAGpC,CAAC;QAEJ,gBAAgB;QACT,eAAU,GAA4B,EAAE,CAAC;QAChD;;;;;WAKG;QACI,mBAAc,GAAiB,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;AAttBD,kCAstBC;AAED,SAAS,sBAAsB,CAAC,UAAgB,EAAE,WAAiB;IACjE,OAAO,GAAG,UAAU,mDAAmD,WAAW,uDAAuD,CAAC;AAC5I,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeBucket.d.ts b/grafast/grafast/dist/engine/executeBucket.d.ts new file mode 100644 index 0000000000..853baef2a2 --- /dev/null +++ b/grafast/grafast/dist/engine/executeBucket.d.ts @@ -0,0 +1,6 @@ +import type { Bucket } from "../bucket.js"; +import type { BatchExecutionValue, ExecutionEntryFlags, UnaryExecutionValue } from "../interfaces.js"; +export declare function bucketToString(this: Bucket): string; +export declare function batchExecutionValue(entries: TData[], _flags?: ExecutionEntryFlags[]): BatchExecutionValue; +export declare function unaryExecutionValue(value: TData, _entryFlags?: ExecutionEntryFlags): UnaryExecutionValue; +//# sourceMappingURL=executeBucket.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeBucket.d.ts.map b/grafast/grafast/dist/engine/executeBucket.d.ts.map new file mode 100644 index 0000000000..f91351de7a --- /dev/null +++ b/grafast/grafast/dist/engine/executeBucket.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"executeBucket.d.ts","sourceRoot":"","sources":["../../src/engine/executeBucket.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,cAAc,CAAC;AAIzD,OAAO,KAAK,EACV,mBAAmB,EAInB,mBAAmB,EAUnB,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAwsC1B,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAE1C;AAWD,wBAAgB,mBAAmB,CAAC,KAAK,EACvC,OAAO,EAAE,KAAK,EAAE,EAChB,MAAM,GAAE,mBAAmB,EAAqC,GAC/D,mBAAmB,CAAC,KAAK,CAAC,CAe5B;AAGD,wBAAgB,mBAAmB,CAAC,KAAK,EACvC,KAAK,EAAE,KAAK,EACZ,WAAW,GAAE,mBAAuB,GACnC,mBAAmB,CAAC,KAAK,CAAC,CAc5B"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeBucket.js b/grafast/grafast/dist/engine/executeBucket.js new file mode 100644 index 0000000000..6a7739e29c --- /dev/null +++ b/grafast/grafast/dist/engine/executeBucket.js @@ -0,0 +1,1102 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.executeBucket = executeBucket; +exports.newBucket = newBucket; +exports.bucketToString = bucketToString; +exports.batchExecutionValue = batchExecutionValue; +exports.unaryExecutionValue = unaryExecutionValue; +const tslib_1 = require("tslib"); +const iterall_1 = require("iterall"); +const assert = tslib_1.__importStar(require("../assert.js")); +const dev_js_1 = require("../dev.js"); +const error_js_1 = require("../error.js"); +const inspect_js_1 = require("../inspect.js"); +const interfaces_js_1 = require("../interfaces.js"); +const timeSource_js_1 = require("../timeSource.js"); +const utils_js_1 = require("../utils.js"); +const timeoutError = Object.freeze(new error_js_1.SafeError("Execution timeout exceeded, please simplify or add limits to your request.", Object.freeze({ [interfaces_js_1.$$timeout]: true }))); +function noop() { + /*noop*/ +} +/** + * Takes a list of `results` (shorter than `resultCount`) and an object with + * errors and indexes; returns a list of length `resultCount` with the results + * from `results` but with errors injected at the indexes specified in + * `errors`. + * + * ASSERT: `results.length + Object.values(errors).length === resultCount` + * + * @internal + */ +function mergeErrorsBackIn(results, forcedValues, resultCount) { + const finalFlags = []; + const finalResults = []; + /** The index within `results`, which is shorter than `resultCount` */ + let resultIndex = 0; + for (let finalIndex = 0; finalIndex < resultCount; finalIndex++) { + const flags = forcedValues.flags[finalIndex]; + if (flags !== undefined) { + const value = forcedValues.results[finalIndex]; + finalResults[finalIndex] = value; + finalFlags[finalIndex] = flags; + } + else { + finalResults[finalIndex] = results[resultIndex++]; + finalFlags[finalIndex] = 0; + } + } + return { flags: finalFlags, results: finalResults }; +} +/** @internal */ +function executeBucket(bucket, requestContext) { + /** + * Execute the step directly; since there's no errors we can pass the + * dependencies through verbatim. + */ + function reallyExecuteStepWithoutFiltering(size, step, dependencies, extra) { + const results = executeOrStream(size, step, dependencies, extra); + const flags = (0, utils_js_1.arrayOfLength)(size, interfaces_js_1.NO_FLAGS); + if ((0, utils_js_1.isPromiseLike)(results)) { + return results.then((results) => ({ flags, results })); + } + else { + return { flags, results }; + } + } + const { stopTime, eventEmitter, args } = requestContext; + const { middleware } = args; + const { metaByMetaKey, size, store, layerPlan: { phases, children: childLayerPlans }, } = bucket; + const phaseCount = phases.length; + // Like a `for(i = 0; i < phaseCount; i++)` loop with some `await`s in it, except it does promise + // handling manually so that it can complete synchronously (no promises) if + // possible. + const nextPhase = (phaseIndex) => { + if (phaseIndex >= phaseCount) { + return; + } + const phase = phases[phaseIndex]; + const { _allSteps } = phase; + /** + * To ensure we don't enter a situation where an "unhandled" promise + * rejection causes Node to exit, we must process each completed step during the + * same tick in which it completes. + */ + let indexesPendingLoopOver = []; + let executePromises = null; + let executePromiseResultIndex = null; + const resultList = []; + if (phase.checkTimeout && + stopTime !== null && + timeSource_js_1.timeSource.now() >= stopTime) { + // ABORT! + if (phase.normalSteps !== undefined) { + const normalSteps = phase.normalSteps; + for (let normalStepIndex = 0, l = normalSteps.length; normalStepIndex < l; normalStepIndex++) { + const step = normalSteps[normalStepIndex].step; + const stepSize = step._isUnary ? 1 : bucket.size; + const r = timeoutError; + const results = (0, utils_js_1.arrayOfLength)(stepSize, r); + const flags = (0, utils_js_1.arrayOfLength)(stepSize, interfaces_js_1.FLAG_ERROR); + resultList[normalStepIndex] = { flags, results }; + indexesPendingLoopOver.push(normalStepIndex); + // TODO: I believe we can remove this line? + bucket.flagUnion |= interfaces_js_1.FLAG_ERROR; + } + } + } + else if (phase.normalSteps !== undefined) { + const normalSteps = phase.normalSteps; + for (let normalStepIndex = 0, l = normalSteps.length; normalStepIndex < l; normalStepIndex++) { + const step = normalSteps[normalStepIndex].step; + const stepSize = step._isUnary ? 1 : bucket.size; + try { + const r = executeStep(step); + if ((0, utils_js_1.isPromiseLike)(r)) { + resultList[normalStepIndex] = undefined /* will populate shortly */; + if (!executePromises) { + executePromises = [r]; + executePromiseResultIndex = [normalStepIndex]; + } + else { + const newIndex = executePromises.push(r) - 1; + executePromiseResultIndex[newIndex] = normalStepIndex; + } + } + else { + resultList[normalStepIndex] = r; + indexesPendingLoopOver.push(normalStepIndex); + } + } + catch (e) { + const r = e; + const results = (0, utils_js_1.arrayOfLength)(stepSize, r); + const flags = (0, utils_js_1.arrayOfLength)(stepSize, interfaces_js_1.FLAG_ERROR); + resultList[normalStepIndex] = { flags, results }; + indexesPendingLoopOver.push(normalStepIndex); + // TODO: I believe we can remove this line? + bucket.flagUnion |= interfaces_js_1.FLAG_ERROR; + } + } + } + const next = () => { + return nextPhase(phaseIndex + 1); + }; + /** + * Loops over (and resets) the indexesPendingLoopOver array, ensuring that + * all errors are handled. + */ + const loopOverResults = () => { + if (indexesPendingLoopOver.length === 0) + return; + const indexesToProcess = indexesPendingLoopOver; + indexesPendingLoopOver = []; + // Validate executed steps + for (const allStepsIndex of indexesToProcess) { + const finishedStep = _allSteps[allStepsIndex]; + const internalResult = resultList[allStepsIndex]; + if (!internalResult) { + throw new Error(`GrafastInternalError<166ef53d-b80d-4bea-8b54-803c2694112a>: Result from ${finishedStep} should exist`); + } + const { /* flags, */ results } = internalResult; + const resultLength = results?.length; + const expectedSize = finishedStep._isUnary ? 1 : size; + if (resultLength !== expectedSize) { + if (!Array.isArray(results)) { + throw new Error(`Result from ${finishedStep} should be an array, instead received ${(0, inspect_js_1.inspect)(results, { colors: true })}`); + } + throw new Error(`Result array from ${finishedStep} should have length ${expectedSize}${finishedStep._isUnary ? " (because it's unary)" : ""}, instead it had length ${results.length}`); + } + if (finishedStep._isUnary) { + // Handled later + } + else { + bucket.store.set(finishedStep.id, batchExecutionValue((0, utils_js_1.arrayOfLength)(size))); + } + } + // Need to complete promises, check for errors, etc. + // **DO NOT THROW, DO NOT ALLOW AN ERROR TO BE RAISED!** + // **USE DEFENSIVE PROGRAMMING HERE!** + /** PROMISES ADDED HERE MUST NOT REJECT */ + let promises; + let pendingPromises; + let pendingPromiseIndexes; + // TODO: it seems that if this throws an error it results in a permanent + // hang of defers? In the mean time... Don't throw any errors here! + const success = (finishedStep, bucket, resultIndex, value, flags) => { + // Fast lanes + if (typeof value !== "object") { + // non-objects + bucket.setResult(finishedStep, resultIndex, value, flags); + return; + } + else if (value === null) { + // nulls + const finalFlags = flags | interfaces_js_1.FLAG_NULL; + bucket.setResult(finishedStep, resultIndex, null, finalFlags); + return; + } + else if ((0, error_js_1.isFlaggedValue)(value)) { + // flagged values + const finalFlags = flags | value.flags; + bucket.setResult(finishedStep, resultIndex, value.value, finalFlags); + return; + } + let valueIsAsyncIterable; + if (finishedStep._stepOptions.walkIterable && + // PERF: do we want to handle arrays differently? + ((valueIsAsyncIterable = (0, iterall_1.isAsyncIterable)(value)) || (0, iterall_1.isIterable)(value))) { + // PERF: we've already calculated this once; can we reference that again here? + const stream = evaluateStream(bucket, finishedStep); + const initialCount = stream?.initialCount ?? Infinity; + const iterator = valueIsAsyncIterable + ? value[Symbol.asyncIterator]() + : value[Symbol.iterator](); + // Here we track the iterator via the bucket, this allows us to + // ensure that the iterator is terminated even if the stream is never + // consumed (e.g. if an error is thrown/caught during execution of + // the output plan). + if (!bucket.iterators[resultIndex]) { + bucket.iterators[resultIndex] = new Set(); + } + bucket.iterators[resultIndex].add(iterator); + if (initialCount === 0) { + // Optimization - defer everything + const arr = []; + arr[interfaces_js_1.$$streamMore] = iterator; + bucket.setResult(finishedStep, resultIndex, arr, flags); + } + else { + // Evaluate the first initialCount entries, rest is streamed. + const promise = (async () => { + try { + let valuesSeen = 0; + const arr = []; + /* + * We need to "shift" a few entries off the top of the + * iterator, but still keep it iterable for the later + * stream. To accomplish this we have to do manual + * looping + */ + let resultPromise; + while ((resultPromise = iterator.next())) { + const resolvedResult = await resultPromise; + if (resolvedResult.done) { + break; + } + arr.push(await resolvedResult.value); + if (++valuesSeen >= initialCount) { + // This is safe to do in the `while` since we checked + // the `0` entries condition in the optimization + // above. + arr[interfaces_js_1.$$streamMore] = iterator; + break; + } + } + bucket.setResult(finishedStep, resultIndex, arr, flags); + } + catch (e) { + bucket.setResult(finishedStep, resultIndex, e, flags | interfaces_js_1.FLAG_ERROR); + } + })(); + if (!promises) { + promises = [promise]; + } + else { + promises.push(promise); + } + } + } + else { + bucket.setResult(finishedStep, resultIndex, value, flags); + } + }; + for (const allStepsIndex of indexesToProcess) { + const step = _allSteps[allStepsIndex]; + const internalResult = resultList[allStepsIndex]; + if (!internalResult) { + throw new Error(`GrafastInternalError: Result from ${step} should exist`); + } + const { flags, results } = internalResult; + const count = step._isUnary ? 1 : size; + for (let dataIndex = 0; dataIndex < count; dataIndex++) { + const val = results[dataIndex]; + if (step.isSyncAndSafe || !(0, utils_js_1.isPromiseLike)(val)) { + if (flags[dataIndex] == null) { + throw new Error(`GraphileInternalError<75df71bb-0f76-4a98-9664-9167d502296a>: result for ${step} has no flag at index ${dataIndex} (value = ${(0, inspect_js_1.inspect)(val)})`); + } + success(step, bucket, dataIndex, val, flags[dataIndex]); + } + else { + if (!pendingPromises) { + pendingPromises = [val]; + pendingPromiseIndexes = [{ s: allStepsIndex, i: dataIndex }]; + } + else { + pendingPromises.push(val); + pendingPromiseIndexes.push({ s: allStepsIndex, i: dataIndex }); + } + } + } + } + if (pendingPromises !== undefined) { + return Promise.allSettled(pendingPromises) + .then((resultSettledResult) => { + for (let i = 0, pendingPromisesLength = resultSettledResult.length; i < pendingPromisesLength; i++) { + const settledResult = resultSettledResult[i]; + const { s: allStepsIndex, i: dataIndex } = pendingPromiseIndexes[i]; + const finishedStep = _allSteps[allStepsIndex]; + if (settledResult.status === "fulfilled") { + success(finishedStep, bucket, dataIndex, settledResult.value, interfaces_js_1.NO_FLAGS); + } + else { + const error = settledResult.reason; + bucket.setResult(finishedStep, dataIndex, error, interfaces_js_1.FLAG_ERROR); + } + } + return promises ? Promise.all(promises) : undefined; + }) + .then(null, (e) => { + // THIS SHOULD NEVER HAPPEN! + console.error(`GrafastInternalError<1e9731b4-005e-4b0e-bc61-43baa62e6444>: this error should never occur! Please file an issue against grafast. Details: ${e}`); + bucket.flagUnion |= interfaces_js_1.FLAG_ERROR; + for (let i = 0, pendingPromisesLength = pendingPromises.length; i < pendingPromisesLength; i++) { + const { s: allStepsIndex, i: dataIndex } = pendingPromiseIndexes[i]; + const finishedStep = _allSteps[allStepsIndex]; + const error = new Error(`GrafastInternalError<1e9731b4-005e-4b0e-bc61-43baa62e6444>: error occurred whilst performing completedStep(${finishedStep.id})`); + bucket.setResult(finishedStep, dataIndex, error, interfaces_js_1.FLAG_ERROR); + } + }); + } + else { + return promises ? Promise.all(promises) : undefined; + } + }; + const runSyncSteps = () => { + const executedLength = resultList.length; + if (dev_js_1.isDev) { + assert.strictEqual(executedLength, phase.normalSteps?.length ?? 0, "Expected only and all normalSteps to have executed"); + } + if (!phase.unbatchedSyncAndSafeSteps) { + return next(); + } + const allStepsLength = _allSteps.length; + const extras = []; + for (let allStepsIndex = executedLength; allStepsIndex < allStepsLength; allStepsIndex++) { + const step = _allSteps[allStepsIndex]; + const meta = step.metaKey !== undefined ? metaByMetaKey[step.metaKey] : undefined; + extras[allStepsIndex] = { + stopTime, + meta, + eventEmitter, + stream: evaluateStream(bucket, step), + _bucket: bucket, + _requestContext: requestContext, + }; + if (step._isUnary) { + // Handled later + } + else { + bucket.store.set(step.id, batchExecutionValue((0, utils_js_1.arrayOfLength)(size))); + } + } + for (let dataIndex = 0; dataIndex < size; dataIndex++) { + stepLoop: for (let allStepsIndex = executedLength; allStepsIndex < allStepsLength; allStepsIndex++) { + const step = (0, utils_js_1.sudo)(_allSteps[allStepsIndex]); + // Unary steps only need to be processed once + if (step._isUnary && dataIndex !== 0) { + continue; + } + // Check if the side effect errored + const $sideEffect = step.implicitSideEffectStep; + if ($sideEffect) { + let currentPolymorphicPath; + if ($sideEffect.polymorphicPaths === null || + (currentPolymorphicPath = + bucket.polymorphicPathList[dataIndex]) === null || + $sideEffect.polymorphicPaths.has(currentPolymorphicPath)) { + const depExecutionValue = bucket.store.get($sideEffect.id); + if (depExecutionValue === undefined) { + throw new Error(`GrafastInternalError: failed to get result for side effect ${$sideEffect} which impacts ${step}`); + } + const depFlags = depExecutionValue._flagsAt(dataIndex); + if (depFlags & interfaces_js_1.FLAG_POLY_SKIPPED) { + /* noop */ + } + else if (depFlags & interfaces_js_1.FLAG_ERROR) { + if (step._isUnary) { + // COPY the unary value + bucket.store.set(step.id, depExecutionValue); + bucket.flagUnion |= depFlags; + } + else { + const depVal = depExecutionValue.at(dataIndex); + bucket.setResult(step, dataIndex, depVal, depFlags); + } + continue stepLoop; + } + } + } + try { + const deps = []; + const extra = extras[allStepsIndex]; + let forceIndexValue = undefined; + let rejectValue = undefined; + let indexFlags = interfaces_js_1.NO_FLAGS; + for (let i = 0, l = step.dependencies.length; i < l; i++) { + const $dep = step.dependencies[i]; + const forbiddenFlags = step.dependencyForbiddenFlags[i]; + const onReject = step.dependencyOnReject[i]; + const depExecutionVal = bucket.store.get($dep.id); + // Search for "f2b3b1b3" for similar block + const flags = depExecutionVal._flagsAt(dataIndex); + const disallowedFlags = flags & forbiddenFlags; + if (disallowedFlags) { + indexFlags |= disallowedFlags; + // If there's a reject behavior and we're FRESHLY rejected (weren't + // already inhibited), use that as a fallback. + // TODO: validate this. + // If dep is inhibited and we don't allow inhibited, copy through (null or error). + // If dep is inhibited and we do allow inhibited, but we're disallowed, use our onReject. + // If dep is not inhibited, but we're disallowed, use our onReject. + if (onReject !== undefined && + (disallowedFlags & (interfaces_js_1.FLAG_INHIBITED | interfaces_js_1.FLAG_ERROR)) === interfaces_js_1.NO_FLAGS) { + rejectValue ||= onReject; + } + if (forceIndexValue == null) { + if ((flags & interfaces_js_1.FLAG_ERROR) !== 0) { + const v = depExecutionVal.at(dataIndex); + forceIndexValue = v; + } + else { + forceIndexValue = null; + } + } + else { + // First error wins, ignore this second error. + } + // End "f2b3b1b3" block + } + else if (forceIndexValue === undefined) { + const depVal = depExecutionVal.at(dataIndex); + let depFlags; + if ((bucket.flagUnion & interfaces_js_1.FLAG_ERROR) === interfaces_js_1.FLAG_ERROR && + ((depFlags = depExecutionVal._flagsAt(dataIndex)) & + interfaces_js_1.FLAG_ERROR) === + interfaces_js_1.FLAG_ERROR) { + if (step._isUnary) { + // COPY the unary value + bucket.store.set(step.id, depExecutionVal); + bucket.flagUnion |= depFlags; + } + else { + bucket.setResult(step, dataIndex, depVal, interfaces_js_1.FLAG_ERROR); + } + continue stepLoop; + } + deps.push(depVal); + } + } + let stepResult, stepFlags; + if (forceIndexValue !== undefined) { + // Search for "17217999b7a7" for similar block + if (forceIndexValue == null && rejectValue != null) { + indexFlags |= interfaces_js_1.FLAG_ERROR; + forceIndexValue = rejectValue; + } + else { + indexFlags |= interfaces_js_1.FLAG_INHIBITED; + } + // End "17217999b7a7" block + stepResult = forceIndexValue; + stepFlags = indexFlags; + } + else { + const rawStepResult = step.unbatchedExecute(extra, ...deps); + if (typeof rawStepResult === "object" && + rawStepResult !== null && + (0, error_js_1.isFlaggedValue)(rawStepResult)) { + stepResult = rawStepResult.value; + stepFlags = rawStepResult.flags; + } + else { + stepResult = rawStepResult; + stepFlags = rawStepResult == null ? interfaces_js_1.FLAG_NULL : interfaces_js_1.NO_FLAGS; + } + } + // TODO: what if stepResult is _returned_ error (as opposed to + // thrown)? + // NOTE: we are in `runSyncSteps` so this step is guaranteed to + // be "isSyncAndSafe". As such, we don't need to worry about it + // returning an error (unsafe) or a promise (async), we only + // need to check if it's null. + bucket.setResult(step, dataIndex, stepResult, stepFlags); + } + catch (e) { + bucket.setResult(step, dataIndex, e, interfaces_js_1.FLAG_ERROR); + } + } + } + return next(); + }; + if (executePromises !== null) { + const processedPromises = []; + if (indexesPendingLoopOver.length > 0) { + // This **must be done in the same tick** + const promiseOrNot = loopOverResults(); + if ((0, utils_js_1.isPromiseLike)(promiseOrNot)) { + processedPromises.push(promiseOrNot); + } + } + for (let i = 0, l = executePromises.length; i < l; i++) { + const executePromise = executePromises[i]; + const index = executePromiseResultIndex[i]; + processedPromises.push(executePromise.then((promiseResult) => { + resultList[index] = promiseResult; + indexesPendingLoopOver.push(index); + // We must loop over the results in the same tick in which the + // promise resolved. + return loopOverResults(); + })); + } + return Promise.all(processedPromises).then(runSyncSteps); + } + else { + const promiseOrNot = loopOverResults(); + if ((0, utils_js_1.isPromiseLike)(promiseOrNot)) { + return promiseOrNot.then(runSyncSteps); + } + else { + return runSyncSteps(); + } + } + }; + const promise = nextPhase(0); + if ((0, utils_js_1.isPromiseLike)(promise)) { + return promise.then(executeSamePhaseChildren); + } + else { + return executeSamePhaseChildren(); + } + // Function definitions below here + function executeOrStream(count, step, values, extra) { + if (dev_js_1.isDev && step._isUnary && count !== 1) { + throw new Error(`GrafastInternalError<84a6cdfa-e8fe-4dea-85fe-9426a6a78027>: ${step} is a unary step, but we're attempting to pass it ${count} (!= 1) values`); + } + if (step.execute.length > 1) { + throw new Error(`${step} is using a legacy form of 'execute' which accepts multiple arguments, please see https://err.red/gev2`); + } + const executeDetails = { + indexMap: makeIndexMap(count), + indexForEach: makeIndexForEach(count), + count, + values, + extra, + stream: evaluateStream(bucket, step), + }; + if (!step.isSyncAndSafe && middleware != null) { + return middleware.run("executeStep", { args, step, executeDetails }, executeStepFromEvent); + } + else { + return step.execute(executeDetails); + } + } + // Slow mode... + /** + * Execute the step, filtering out errors and entries with non-matching + * polymorphicPaths from the input dependencies and then padding the lists + * back out at the end. + */ + function reallyExecuteStepWithFiltering(step, dependenciesIncludingSideEffects, dependencyForbiddenFlags, dependencyOnReject, polymorphicPathList, extra) { + const expectedSize = step._isUnary ? 1 : size; + const forcedValues = { + flags: (0, utils_js_1.arrayOfLength)(expectedSize, undefined), + results: (0, utils_js_1.arrayOfLength)(expectedSize, undefined), + }; + /** + * If there's errors/forbidden values, we must manipulate the arrays being + * passed into the step execution + */ + let needsTransform = false; + /** If all we see is errors, there's no need to execute! */ + let newSize = 0; + let stepPolymorphicPaths = step.polymorphicPaths; + const legitDepsCount = (0, utils_js_1.sudo)(step).dependencies.length; + const dependenciesIncludingSideEffectsCount = dependenciesIncludingSideEffects.length; + let dependencies = dependenciesIncludingSideEffectsCount > legitDepsCount + ? dependenciesIncludingSideEffects.slice(0, legitDepsCount) + : dependenciesIncludingSideEffects; + // OPTIM: if unariesIncludingSideEffects.some(isGrafastError) then shortcut execution because everything fails + let hasPolyMatch = true; + if (step._isUnary && stepPolymorphicPaths !== null) { + // Check that at least one datapoint matches one of our paths + hasPolyMatch = false; + for (let dataIndex = 0; dataIndex < size; dataIndex++) { + if (stepPolymorphicPaths.has(polymorphicPathList[dataIndex])) { + hasPolyMatch = true; + break; + } + } + stepPolymorphicPaths = null; + } + for (let dataIndex = 0; dataIndex < expectedSize; dataIndex++) { + let forceIndexValue = hasPolyMatch + ? undefined + : null; + let rejectValue = undefined; + let indexFlags = hasPolyMatch + ? interfaces_js_1.NO_FLAGS + : interfaces_js_1.FLAG_POLY_SKIPPED; + if (stepPolymorphicPaths !== null && + !stepPolymorphicPaths.has(polymorphicPathList[dataIndex])) { + indexFlags |= interfaces_js_1.FLAG_POLY_SKIPPED; + forceIndexValue = null; + } + else if (extra._bucket.flagUnion) { + for (let i = 0; i < dependenciesIncludingSideEffectsCount; i++) { + const depExecutionVal = dependenciesIncludingSideEffects[i]; + const forbiddenFlags = dependencyForbiddenFlags[i]; + const onReject = dependencyOnReject[i]; + // Search for "f2b3b1b3" for similar block + const flags = depExecutionVal._flagsAt(dataIndex); + const disallowedFlags = flags & forbiddenFlags; + if (disallowedFlags) { + indexFlags |= disallowedFlags; + // If there's a reject behavior and we're FRESHLY rejected (weren't + // already inhibited), use that as a fallback. + // TODO: validate this. + // If dep is inhibited and we don't allow inhibited, copy through (null or error). + // If dep is inhibited and we do allow inhibited, but we're disallowed, use our onReject. + // If dep is not inhibited, but we're disallowed, use our onReject. + if (onReject !== undefined && + (disallowedFlags & (interfaces_js_1.FLAG_INHIBITED | interfaces_js_1.FLAG_ERROR)) === interfaces_js_1.NO_FLAGS) { + rejectValue ||= onReject; + } + if (forceIndexValue == null) { + if ((flags & interfaces_js_1.FLAG_ERROR) !== 0) { + const v = depExecutionVal.at(dataIndex); + forceIndexValue = v; + } + else { + forceIndexValue = null; + } + } + else { + // First error wins, ignore this second error. + } + // End "f2b3b1b3" block + break; + } + } + } + else { + // All good + } + if (forceIndexValue !== undefined) { + if (!needsTransform) { + needsTransform = true; + // Clone up until this point, make mutable, don't add self + dependencies = dependencies.map((ev) => ev.isBatch + ? // TODO: move this creation to happen once the full list is + // already built, ideally we shouldn't be mutating an execution + // value later. + batchExecutionValue(ev.entries.slice(0, dataIndex)) + : ev); + } + // Search for "17217999b7a7" for similar block + if (forceIndexValue == null && rejectValue != null) { + indexFlags |= interfaces_js_1.FLAG_ERROR; + forceIndexValue = rejectValue; + } + else { + indexFlags |= interfaces_js_1.FLAG_INHIBITED; + } + // End "17217999b7a7" block + forcedValues.flags[dataIndex] = indexFlags; + forcedValues.results[dataIndex] = forceIndexValue; + } + else { + newSize++; + if (needsTransform) { + // dependenciesWithoutErrors has limited content; add this non-error value + for (let depListIndex = 0; depListIndex < legitDepsCount; depListIndex++) { + const depList = dependencies[depListIndex]; + if (depList.isBatch) { + const depVal = dependenciesIncludingSideEffects[depListIndex]; + depList.entries.push(depVal.at(dataIndex)); + depList._flags.push(depVal._flagsAt(dataIndex)); + } + } + } + } + } + if (newSize === 0) { + // Everything is errors; we can skip execution + return forcedValues; + } + else if (needsTransform) { + const resultWithoutErrors = executeOrStream(newSize, step, dependencies, extra); + if ((0, utils_js_1.isPromiseLike)(resultWithoutErrors)) { + return resultWithoutErrors.then((r) => mergeErrorsBackIn(r, forcedValues, expectedSize)); + } + else { + return mergeErrorsBackIn(resultWithoutErrors, forcedValues, expectedSize); + } + } + else { + if (dev_js_1.isDev) { + assert.ok(newSize === expectedSize, "GrafastInternalError<47fca4ab-069c-428f-8374-267479c7fd27>: Expected newSize to equal expectedSize"); + } + return reallyExecuteStepWithoutFiltering(newSize, step, dependencies, extra); + } + } + /** + * This function MIGHT throw or reject, so be sure to handle that. + */ + function executeStep(step) { + // DELIBERATE SHADOWING! + const size = step._isUnary ? 1 : bucket.size; + try { + const meta = step.metaKey !== undefined ? metaByMetaKey[step.metaKey] : undefined; + const extra = { + stopTime, + meta, + eventEmitter, + stream: evaluateStream(bucket, step), + _bucket: bucket, + _requestContext: requestContext, + }; + /** Only mutate this inside `addDependency` */ + const _rawDependencies = []; + const _rawForbiddenFlags = []; + const _rawOnReject = []; + const dependencies = _rawDependencies; + let needsFiltering = false; + const defaultForbiddenFlags = (0, utils_js_1.sudo)(step).defaultForbiddenFlags; + const addDependency = ($dep, forbiddenFlags, onReject) => { + if (step._isUnary && !$dep._isUnary) { + throw new Error(`GrafastInternalError<58bc38e2-8722-4c19-ba38-fd01a020654b>: unary step ${step} cannot be made dependent on non-unary step ${$dep}!`); + } + const executionValue = store.get($dep.id); + if (executionValue === undefined) { + throw new Error(`GrafastInternalError: ${$dep} data couldn't be found, but required by ${step} (with side effect ${step.implicitSideEffectStep})!`); + } + _rawDependencies.push(executionValue); + _rawForbiddenFlags.push(forbiddenFlags); + _rawOnReject.push(onReject); + if (!needsFiltering && (bucket.flagUnion & forbiddenFlags) !== 0) { + const flags = executionValue._getStateUnion(); + needsFiltering = (flags & forbiddenFlags) !== 0; + } + }; + const sstep = (0, utils_js_1.sudo)(step); + const depCount = sstep.dependencies.length; + if (depCount > 0) { + for (let i = 0, l = depCount; i < l; i++) { + const $dep = sstep.dependencies[i]; + addDependency($dep, sstep.dependencyForbiddenFlags[i], sstep.dependencyOnReject[i]); + } + } + const $sideEffect = step.implicitSideEffectStep; + if ($sideEffect) { + if ($sideEffect._isUnary || !step._isUnary) { + addDependency($sideEffect, defaultForbiddenFlags, undefined); + } + } + if (dev_js_1.isDev && + step.layerPlan.reason.type === "polymorphic" && + step.polymorphicPaths === null) { + throw new Error(`GrafastInternalError: a step without polymorphic paths cannot belong to a polymorphic bucket`); + } + if (!needsFiltering) { + const isSelectiveStep = step.layerPlan.reason.type === "polymorphic" && + step.polymorphicPaths.size !== + step.layerPlan.reason.polymorphicPaths.size; + needsFiltering ||= isSelectiveStep; + } + const result = needsFiltering + ? reallyExecuteStepWithFiltering(step, dependencies, _rawForbiddenFlags, _rawOnReject, bucket.polymorphicPathList, extra) + : reallyExecuteStepWithoutFiltering(size, step, $sideEffect ? dependencies.slice(0, depCount) : dependencies, extra); + if ((0, utils_js_1.isPromiseLike)(result)) { + return result.then(null, (error) => { + // Don't need to do this here, it will be done where the + // ExecutionValue is created: + // bucket.hasNonZeroStatus = true; + return { + flags: (0, utils_js_1.arrayOfLength)(size, interfaces_js_1.FLAG_ERROR | interfaces_js_1.FLAG_STOPPED), + results: (0, utils_js_1.arrayOfLength)(size, error), + }; + }); + } + else { + return result; + } + } + catch (error) { + // Don't need to do this here, it will be done where the + // ExecutionValue is created: + // bucket.hasNonZeroStatus = true; + return { + flags: (0, utils_js_1.arrayOfLength)(size, interfaces_js_1.FLAG_ERROR | interfaces_js_1.FLAG_STOPPED), + results: (0, utils_js_1.arrayOfLength)(size, error), + }; + } + } + function executeSamePhaseChildren() { + // PERF: create a JIT factory for this at planning time + const childPromises = []; + // This promise should never reject + let mutationQueue = null; + /** + * Ensures that callback is only called once all other enqueued callbacks + * are called. + */ + const enqueue = (callback) => { + const result = mutationQueue ? mutationQueue.then(callback) : callback(); + if ((0, utils_js_1.isPromiseLike)(result)) { + mutationQueue = result.then(noop, noop); + } + return result; + }; + loop: for (const childLayerPlan of childLayerPlans) { + switch (childLayerPlan.reason.type) { + case "nullableBoundary": + case "listItem": + case "polymorphic": { + const childBucket = childLayerPlan.newBucket(bucket); + if (childBucket !== null) { + // Execute + const result = executeBucket(childBucket, requestContext); + if ((0, utils_js_1.isPromiseLike)(result)) { + childPromises.push(result); + } + } + break; + } + case "mutationField": { + const childBucket = childLayerPlan.newBucket(bucket); + if (childBucket !== null) { + // Enqueue for execution (mutations must run in order) + const promise = enqueue(() => executeBucket(childBucket, requestContext)); + if ((0, utils_js_1.isPromiseLike)(promise)) { + childPromises.push(promise); + } + } + break; + } + case "subroutine": + case "subscription": + case "defer": { + // Ignore; these are handled elsewhere + continue loop; + } + case "root": { + throw new Error( + // *confused emoji* + "GrafastInternalError<05fb7069-81b5-43f7-ae71-f62547d2c2b7>: root cannot be not the root (...)"); + } + default: { + const never = childLayerPlan.reason; + throw new Error(`GrafastInternalError: unhandled reason '${(0, inspect_js_1.inspect)(never)}'`); + } + } + } + if (childPromises.length > 0) { + return Promise.all(childPromises).then(() => { + bucket.isComplete = true; + return; + }); + } + else { + bucket.isComplete = true; + return; + } + } +} +/** @internal */ +function newBucket(spec, parentMetaByMetaKey) { + if (dev_js_1.isDev) { + // Some validations + if (!(spec.size > 0)) { + throw new Error("GrafastInternalError: No need to create an empty bucket!"); + } + assert.strictEqual(spec.polymorphicPathList.length, spec.size, "polymorphicPathList length must match bucket size"); + /* + for (let i = 0, l = spec.size; i < l; i++) { + const p = spec.polymorphicPathList[i]; + assert.strictEqual( + typeof p, + "string", + `Entry ${i} in polymorphicPathList for bucket for ${spec.layerPlan} was not a string`, + ); + } + */ + for (const [key, list] of spec.store.entries()) { + assert.ok(typeof list.isBatch === "boolean", `Store entry for step '${key}' for layerPlan '${spec.layerPlan.id}' should be an ExecutionValue`); + if (list.isBatch) { + assert.strictEqual(list.entries.length, spec.size, `Store entry for step '${key}' for layerPlan '${spec.layerPlan.id}' should have same length as bucket`); + } + } + if (!spec.iterators) { + throw new Error(`newBucket called but no iterators array was specified`); + } + } + const type = spec.layerPlan.reason.type; + const metaByMetaKey = parentMetaByMetaKey === null || + type === "root" || + type === "mutationField" || + type === "subscription" + ? // Reset the metaByMetaKey + spec.layerPlan.operationPlan.makeMetaByMetaKey() + : parentMetaByMetaKey; + // Copy from spec + const { layerPlan, store, size, flagUnion, polymorphicPathList, iterators } = spec; + const children = Object.create(null); + return { + toString: bucketToString, + layerPlan, + store, + size, + flagUnion, + polymorphicPathList, + iterators, + metaByMetaKey, + isComplete: false, + children, + setResult(step, index, value, flags) { + const stepId = step.id; + if (index >= size) { + throw new Error(`GrafastInternalError<9465db89-cc9d-415c-97e7-57bb19ddebe0>: attempt to write to out of bounds index ${index} for bucket of size ${size} for step ${step}`); + } + if (flags !== 0) { + this.flagUnion |= flags; + } + if (step._isUnary) { + if (dev_js_1.isDev && store.has(stepId)) { + const ev = store.get(stepId); + console.error(`GrafastInternalWarning<603e635f-af46-4feb-abb1-bac184bf7ef2>: value for step ${step} has already been stored to bucket ${layerPlan}; overwriting.`, { + isBatch: ev?.isBatch, + value0: ev?.at(0), + flags0: ev?._flagsAt(0), + }, { isBatch: false, value, flags }); + } + const ev = unaryExecutionValue(value, flags); + store.set(stepId, ev); + } + else { + const storeEntry = store.get(stepId); + if (!storeEntry || !storeEntry.isBatch) { + if (!storeEntry) { + throw new Error(`GrafastInternalError: value for step ${step} expected to be a batch value, but is not set`); + } + else { + throw new Error(`GrafastInternalError: value for step ${step} expected to be a batch value, but is unary (non-batch)`); + } + } + storeEntry._setResult(index, value, flags); + } + }, + }; +} +function bucketToString() { + return `Bucket<${this.layerPlan}>`; +} +// NOTE: I evaluated using `__proto__: batchExecutionValueProto` to extract the +// shared properties of these objects to see if performance was improved, but +// this was actually a net loss in performance. +// +// This is also evidence that you shouldn't trust ChatGPT for performance +// advice, and should always run your own benchmarks instead: +// https://chatgpt.com/share/67d1746f-4da8-8012-bdf8-707e54a4238e +// TODO: memoize? +function batchExecutionValue(entries, _flags = (0, utils_js_1.arrayOfLength)(entries.length, 0)) { + return { + // Try and keep these properties in the same order as unaryExecutionValue + isBatch: true, + at: batchEntriesAt, + unaryValue: batchThrowNotUnary, + _flagsAt: batchFlagsAt, + _getStateUnion: batchGetStateUnion, + _setResult: batchSetResult, + _copyResult: batchCopyResult, + entries, + _flags, + _cachedStateUnion: null, + }; +} +// TODO: memoize? +function unaryExecutionValue(value, _entryFlags = 0) { + return { + // Try and keep these properties in the same order as batchExecutionValue + isBatch: false, + at: unaryAt, + unaryValue: unaryThisDotValue, + _flagsAt: unaryFlagsAt, + _getStateUnion: unaryGetStateUnion, + _setResult: unarySetResult, + _copyResult: unaryCopyResult, + value, + _entryFlags, + }; +} +function batchThrowNotUnary() { + throw new Error(`This is not a unary value so we cannot get the single value - there may be more than one!`); +} +function batchGetStateUnion() { + if (this._cachedStateUnion === null) { + let u = interfaces_js_1.NO_FLAGS; + for (const flag of this._flags) { + u = u | flag; + } + this._cachedStateUnion = u; + } + return this._cachedStateUnion; +} +function batchEntriesAt(i) { + return this.entries[i]; +} +function batchFlagsAt(i) { + return this._flags[i]; +} +function batchSetResult(i, value, flags) { + this.entries[i] = value; + this._flags[i] = flags; +} +// NOTE: batchCopyResult and unaryCopyResult are **identical**, but we don't +// want a single megamorphic function so we define it twice. +function batchCopyResult(targetIndex, source, sourceIndex) { + this._setResult(targetIndex, source.at(sourceIndex), source._flagsAt(sourceIndex)); +} +function unaryCopyResult(targetIndex, source, sourceIndex) { + this._setResult(targetIndex, source.at(sourceIndex), source._flagsAt(sourceIndex)); +} +function unaryThisDotValue() { + return this.value; +} +function unaryAt() { + return this.value; +} +function unaryFlagsAt() { + return this._entryFlags; +} +function unaryGetStateUnion() { + return this._entryFlags; +} +function unarySetResult(i, value, flags) { + if (i !== 0) { + throw new Error(`Unary step only expects one result`); + } + this.value = value; + this._entryFlags = flags; +} +const indexMapCache = new Map(); +function makeIndexMap(count) { + const existing = indexMapCache.get(count); + if (existing !== undefined) { + return existing; + } + const result = (callback) => { + const results = []; + for (let i = 0; i < count; i++) { + results.push(callback(i)); + } + return results; + }; + if (count <= 100) { + indexMapCache.set(count, result); + } + return result; +} +const indexForEachCache = new Map(); +function makeIndexForEach(count) { + const existing = indexForEachCache.get(count); + if (existing !== undefined) { + return existing; + } + const result = (callback) => { + for (let i = 0; i < count; i++) { + callback(i); + } + }; + if (count <= 100) { + indexForEachCache.set(count, result); + } + return result; +} +function executeStepFromEvent(event) { + return event.step.execute(event.executeDetails); +} +function evaluateStream(bucket, step) { + const stream = step._stepOptions.stream; + if (!stream) + return null; + const shouldStream = stream.ifStepId == null + ? true + : (bucket.store.get(stream.ifStepId)?.unaryValue() ?? true); + if (!shouldStream) + return null; + const initialCount = stream.initialCountStepId == null + ? 0 + : (bucket.store.get(stream.initialCountStepId)?.unaryValue() ?? 0); + return { initialCount }; +} +//# sourceMappingURL=executeBucket.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeBucket.js.map b/grafast/grafast/dist/engine/executeBucket.js.map new file mode 100644 index 0000000000..c4530ad98c --- /dev/null +++ b/grafast/grafast/dist/engine/executeBucket.js.map @@ -0,0 +1 @@ +{"version":3,"file":"executeBucket.js","sourceRoot":"","sources":["../../src/engine/executeBucket.ts"],"names":[],"mappings":";;AAwFA,sCA8gCC;AAGD,8BAqHC;AAED,wCAEC;AAWD,kDAkBC;AAGD,kDAiBC;;AAnxCD,qCAAsD;AAEtD,6DAAuC;AAEvC,sCAAkC;AAClC,0CAAwD;AACxD,8CAAwC;AAmBxC,oDAS0B;AAI1B,oDAA8C;AAC9C,0CAAiE;AAGjE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAChC,IAAI,oBAAS,CACX,4EAA4E,EAC5E,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,yBAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CACrC,CACF,CAAC;AAEF,SAAS,IAAI;IACX,QAAQ;AACV,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,iBAAiB,CACxB,OAA2B,EAC3B,YAA0B,EAC1B,WAAmB;IAEnB,MAAM,UAAU,GAA0B,EAAE,CAAC;IAC7C,MAAM,YAAY,GAAU,EAAE,CAAC;IAC/B,sEAAsE;IACtE,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,KAAK,IAAI,UAAU,GAAG,CAAC,EAAE,UAAU,GAAG,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;QAChE,MAAM,KAAK,GAAG,YAAY,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AAG,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,IAAI,CAAC,CAAC;IAChE,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAE/B,MAAM,YAAY,GAChB,MAAM,CAAC,kBAAkB,IAAI,IAAI;QAC/B,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAEvE,OAAO,EAAE,YAAY,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeOutputPlan.d.ts b/grafast/grafast/dist/engine/executeOutputPlan.d.ts new file mode 100644 index 0000000000..d080331315 --- /dev/null +++ b/grafast/grafast/dist/engine/executeOutputPlan.d.ts @@ -0,0 +1,30 @@ +import type { Bucket, RequestTools } from "../bucket.js"; +import type { OutputPlan } from "./OutputPlan.js"; +export type OutputPath = Array; +export interface OutputStream { + asyncIterable: AsyncIterableIterator; +} +export interface OutputPlanContext { + requestContext: RequestTools; + root: PayloadRoot; + path: ReadonlyArray; +} +export interface SubsequentPayloadSpec { + root: PayloadRoot; + path: ReadonlyArray; + bucket: Bucket; + bucketIndex: number; + outputPlan: OutputPlan; + label: string | undefined; +} +export interface SubsequentStreamSpec { + root: PayloadRoot; + path: ReadonlyArray; + bucket: Bucket; + bucketIndex: number; + outputPlan: OutputPlan; + label: string | undefined; + stream: AsyncIterator | Iterator; + startIndex: number; +} +//# sourceMappingURL=executeOutputPlan.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeOutputPlan.d.ts.map b/grafast/grafast/dist/engine/executeOutputPlan.d.ts.map new file mode 100644 index 0000000000..063b5b55b3 --- /dev/null +++ b/grafast/grafast/dist/engine/executeOutputPlan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"executeOutputPlan.d.ts","sourceRoot":"","sources":["../../src/engine/executeOutputPlan.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlD,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAChD,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;CAC3C;AAoDD,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,YAAY,CAAC;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IAIpC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IAInC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeOutputPlan.js b/grafast/grafast/dist/engine/executeOutputPlan.js new file mode 100644 index 0000000000..16b61c603f --- /dev/null +++ b/grafast/grafast/dist/engine/executeOutputPlan.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.executeOutputPlan = executeOutputPlan; +const tslib_1 = require("tslib"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const assert = tslib_1.__importStar(require("../assert.js")); +const dev_js_1 = require("../dev.js"); +const debug = (0, debug_1.default)("grafast:OutputPlan"); +const debugVerbose = debug.extend("verbose"); +/** + * @internal + */ +function executeOutputPlan(ctx, outputPlan, bucket, bucketIndex, outputDataAsString) { + if (debugVerbose.enabled) { + debugVerbose("Executing %c with data:\n%c", outputPlan, bucket); + } + if (dev_js_1.isDev) { + assert.strictEqual(bucket.isComplete, true, "Can only process an output plan for a completed bucket"); + } + // PERF: feels like this path could be done more efficiently + const mutablePath = ["SOMEONE_FORGOT_TO_SLICE_THE_PATH!", ...ctx.path]; + return outputDataAsString + ? outputPlan.executeString(ctx.root, mutablePath, bucket, bucketIndex) + : outputPlan.execute(ctx.root, mutablePath, bucket, bucketIndex); +} +//# sourceMappingURL=executeOutputPlan.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/executeOutputPlan.js.map b/grafast/grafast/dist/engine/executeOutputPlan.js.map new file mode 100644 index 0000000000..e79cb420cf --- /dev/null +++ b/grafast/grafast/dist/engine/executeOutputPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"executeOutputPlan.js","sourceRoot":"","sources":["../../src/engine/executeOutputPlan.ts"],"names":[],"mappings":";;AAsGA,8CAsBC;;AA5HD,0DAAiC;AAGjC,6DAAuC;AAEvC,sCAAkC;AAIlC,MAAM,KAAK,GAAG,IAAA,eAAY,EAAC,oBAAoB,CAAC,CAAC;AACjD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAyF7C;;GAEG;AACH,SAAgB,iBAAiB,CAC/B,GAAsB,EACtB,UAAsB,EACtB,MAAc,EACd,WAAmB,EACnB,kBAA2B;IAE3B,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;QACzB,YAAY,CAAC,6BAA6B,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,cAAK,EAAE,CAAC;QACV,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,UAAU,EACjB,IAAI,EACJ,wDAAwD,CACzD,CAAC;IACJ,CAAC;IACD,4DAA4D;IAC5D,MAAM,WAAW,GAAG,CAAC,mCAAmC,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IACvE,OAAO,kBAAkB;QACvB,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC;QACtE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/defaultPlanResolver.d.ts b/grafast/grafast/dist/engine/lib/defaultPlanResolver.d.ts new file mode 100644 index 0000000000..33ca61732e --- /dev/null +++ b/grafast/grafast/dist/engine/lib/defaultPlanResolver.d.ts @@ -0,0 +1,6 @@ +import type { FieldPlanResolver } from "../../interfaces.js"; +import type { Step } from "../../step.js"; +export declare const defaultPlanResolver: FieldPlanResolver Step; +}, any>; +//# sourceMappingURL=defaultPlanResolver.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/defaultPlanResolver.d.ts.map b/grafast/grafast/dist/engine/lib/defaultPlanResolver.d.ts.map new file mode 100644 index 0000000000..ee7d34c6e5 --- /dev/null +++ b/grafast/grafast/dist/engine/lib/defaultPlanResolver.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultPlanResolver.d.ts","sourceRoot":"","sources":["../../../src/engine/lib/defaultPlanResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CACjD,GAAG,EACH,IAAI,GAAG;IAAE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,EACxC,GAAG,CAKJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/defaultPlanResolver.js b/grafast/grafast/dist/engine/lib/defaultPlanResolver.js new file mode 100644 index 0000000000..fd24cc476d --- /dev/null +++ b/grafast/grafast/dist/engine/lib/defaultPlanResolver.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultPlanResolver = void 0; +const access_js_1 = require("../../steps/access.js"); +const defaultPlanResolver = ($step, _, { fieldName }) => { + return typeof $step.get === "function" + ? $step.get(fieldName) + : (0, access_js_1.access)($step, [fieldName]); +}; +exports.defaultPlanResolver = defaultPlanResolver; +//# sourceMappingURL=defaultPlanResolver.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/defaultPlanResolver.js.map b/grafast/grafast/dist/engine/lib/defaultPlanResolver.js.map new file mode 100644 index 0000000000..0bcfca1e96 --- /dev/null +++ b/grafast/grafast/dist/engine/lib/defaultPlanResolver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultPlanResolver.js","sourceRoot":"","sources":["../../../src/engine/lib/defaultPlanResolver.ts"],"names":[],"mappings":";;;AAEA,qDAA+C;AAExC,MAAM,mBAAmB,GAI5B,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IAC9B,OAAO,OAAO,KAAK,CAAC,GAAG,KAAK,UAAU;QACpC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;QACtB,CAAC,CAAC,IAAA,kBAAM,EAAC,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC;AARW,QAAA,mBAAmB,uBAQ9B"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.d.ts b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.d.ts new file mode 100644 index 0000000000..75ddf1b183 --- /dev/null +++ b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.d.ts @@ -0,0 +1,7 @@ +import type { Step } from "../.."; +import type { LayerPlan } from "../LayerPlan"; +export declare function withGlobalLayerPlan(layerPlan: LayerPlan, polymorphicPaths: ReadonlySet | null, callback: (this: TThis, ...args: TArgs) => T, callbackThis?: TThis, ...callbackArgs: TArgs): T; +export declare function currentLayerPlan(): LayerPlan; +export declare function currentPolymorphicPaths(): ReadonlySet | null; +export declare function isUnaryStep($step: Step): boolean; +//# sourceMappingURL=withGlobalLayerPlan.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.d.ts.map b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.d.ts.map new file mode 100644 index 0000000000..4e0a570676 --- /dev/null +++ b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"withGlobalLayerPlan.d.ts","sourceRoot":"","sources":["../../../src/engine/lib/withGlobalLayerPlan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAM9C,wBAAgB,mBAAmB,CACjC,CAAC,EACD,KAAK,GAAG,GAAG,EACX,KAAK,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC,EAEjD,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,EAC5C,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC,EAC5C,YAAY,CAAC,EAAE,KAAK,EACpB,GAAG,YAAY,EAAE,KAAK,GACrB,CAAC,CAWH;AAED,wBAAgB,gBAAgB,IAAI,SAAS,CAQ5C;AAED,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAOpE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAEhD"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.js b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.js new file mode 100644 index 0000000000..87634da14d --- /dev/null +++ b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withGlobalLayerPlan = withGlobalLayerPlan; +exports.currentLayerPlan = currentLayerPlan; +exports.currentPolymorphicPaths = currentPolymorphicPaths; +exports.isUnaryStep = isUnaryStep; +let globalData_layerPlan = undefined; +let globalData_polymorphicPaths = undefined; +function withGlobalLayerPlan(layerPlan, polymorphicPaths, callback, callbackThis, ...callbackArgs) { + const oldLayerPlan = globalData_layerPlan; + globalData_layerPlan = layerPlan; + const oldPolymorphicPaths = globalData_polymorphicPaths; + globalData_polymorphicPaths = polymorphicPaths; + try { + return callback.apply(callbackThis, callbackArgs); + } + finally { + globalData_layerPlan = oldLayerPlan; + globalData_polymorphicPaths = oldPolymorphicPaths; + } +} +function currentLayerPlan() { + if (globalData_layerPlan === undefined) { + throw new Error( + // Must only be called from inside `withGlobalLayerPlan`! + "Now is not a valid time to call `currentLayerPlan`. This error typically occurs when you attempt to call a Grafast step function from outside of the planning lifecycle - it's important to note that Grafast plans must be resolved synchronously, so check for 'async' or 'setTimeout' or any location where a step function is called outside of a plan resolver. For more information, read about plan resolvers: https://grafast.org/grafast/plan-resolvers"); + } + return globalData_layerPlan; +} +function currentPolymorphicPaths() { + if (globalData_polymorphicPaths === undefined) { + throw new Error("GrafastInternalError: currentPolymorphicPaths called out of turn; must only called within a withGlobalLayerPlan callback"); + } + return globalData_polymorphicPaths; +} +function isUnaryStep($step) { + return $step._isUnary; +} +//# sourceMappingURL=withGlobalLayerPlan.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.js.map b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.js.map new file mode 100644 index 0000000000..812acde8e6 --- /dev/null +++ b/grafast/grafast/dist/engine/lib/withGlobalLayerPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"withGlobalLayerPlan.js","sourceRoot":"","sources":["../../../src/engine/lib/withGlobalLayerPlan.ts"],"names":[],"mappings":";;AAOA,kDAqBC;AAED,4CAQC;AAED,0DAOC;AAED,kCAEC;AAhDD,IAAI,oBAAoB,GAA0B,SAAS,CAAC;AAC5D,IAAI,2BAA2B,GAC7B,SAAS,CAAC;AAEZ,SAAgB,mBAAmB,CAKjC,SAAoB,EACpB,gBAA4C,EAC5C,QAA4C,EAC5C,YAAoB,EACpB,GAAG,YAAmB;IAEtB,MAAM,YAAY,GAAG,oBAAoB,CAAC;IAC1C,oBAAoB,GAAG,SAAS,CAAC;IACjC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;IACxD,2BAA2B,GAAG,gBAAgB,CAAC;IAC/C,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,KAAK,CAAC,YAAqB,EAAE,YAAY,CAAC,CAAC;IAC7D,CAAC;YAAS,CAAC;QACT,oBAAoB,GAAG,YAAY,CAAC;QACpC,2BAA2B,GAAG,mBAAmB,CAAC;IACpD,CAAC;AACH,CAAC;AAED,SAAgB,gBAAgB;IAC9B,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK;QACb,yDAAyD;QACzD,kcAAkc,CACnc,CAAC;IACJ,CAAC;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,SAAgB,uBAAuB;IACrC,IAAI,2BAA2B,KAAK,SAAS,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CACb,gKAAgK,CACjK,CAAC;IACJ,CAAC;IACD,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,SAAgB,WAAW,CAAC,KAAW;IACrC,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lock.d.ts b/grafast/grafast/dist/engine/lock.d.ts new file mode 100644 index 0000000000..80971a099d --- /dev/null +++ b/grafast/grafast/dist/engine/lock.d.ts @@ -0,0 +1,4 @@ +import type { Step } from ".."; +export declare function lock($step: Step): void; +export declare function unlock($step: Step): boolean; +//# sourceMappingURL=lock.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lock.d.ts.map b/grafast/grafast/dist/engine/lock.d.ts.map new file mode 100644 index 0000000000..95b22c270b --- /dev/null +++ b/grafast/grafast/dist/engine/lock.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/engine/lock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAc/B,wBAAgB,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAkDtC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAO3C"} \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lock.js b/grafast/grafast/dist/engine/lock.js new file mode 100644 index 0000000000..6852960c05 --- /dev/null +++ b/grafast/grafast/dist/engine/lock.js @@ -0,0 +1,82 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.$$unlock = void 0; +exports.lock = lock; +exports.unlock = unlock; +/** + * Used internally to prevent steps using other steps' optimize/finalize/etc + * methods. + * + * @internal + */ +exports.$$unlock = Symbol("unlock"); +function isLocked($step) { + return $step[exports.$$unlock] !== undefined; +} +function lock($step) { + if (!isLocked($step)) { + const { optimize, finalize, deduplicate, deduplicatedWith } = $step; + if (optimize) { + $step.optimize = optimizeLocked; + } + if (typeof finalize === "function") { + $step.finalize = finalizeLocked; + } + if (deduplicate) { + $step.deduplicate = deduplicateLocked; + } + if (deduplicatedWith) { + $step.deduplicatedWith = deduplicatedWithLocked; + } + $step[exports.$$unlock] = () => { + $step[exports.$$unlock] = undefined; + if (optimize && $step.optimize !== optimizeLocked) { + console.warn(`Warning: ${$step}'s optimize method changed whilst locked`); + } + else { + $step.optimize = optimize; + } + if (typeof finalize === "function" && $step.finalize !== finalizeLocked) { + console.warn(`Warning: ${$step}'s finalize method changed whilst locked`); + } + else { + $step.finalize = finalize; + } + if (deduplicate && $step.deduplicate !== deduplicateLocked) { + console.warn(`Warning: ${$step}'s deduplicate method changed whilst locked`); + } + else { + $step.deduplicate = deduplicate; + } + if (deduplicatedWith && + $step.deduplicatedWith !== deduplicatedWithLocked) { + console.warn(`Warning: ${$step}'s deduplicatedWith method changed whilst locked`); + } + else { + $step.deduplicatedWith = deduplicatedWith; + } + }; + } +} +function unlock($step) { + if (isLocked($step)) { + $step[exports.$$unlock](); + return true; + } + else { + return false; + } +} +function optimizeLocked() { + throw new Error(`Only Grafast may call a step's optimize method; rather than calling optimize on the steps your class depends on, consider opting in to multiple optimization passes via \`allowMultipleOptimizations\`.`); +} +function finalizeLocked() { + throw new Error(`Only Grafast may call a step's finalize method; steps should not attempt to interact with other steps during finalize.`); +} +function deduplicateLocked() { + throw new Error(`Only Grafast may call a step's deduplicate method.`); +} +function deduplicatedWithLocked() { + throw new Error(`Only Grafast may call a step's deduplicatedWith method.`); +} +//# sourceMappingURL=lock.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/engine/lock.js.map b/grafast/grafast/dist/engine/lock.js.map new file mode 100644 index 0000000000..80490dcd7d --- /dev/null +++ b/grafast/grafast/dist/engine/lock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/engine/lock.ts"],"names":[],"mappings":";;;AAcA,oBAkDC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AAC,QAAQ,GAAG,QAAQ,CAAC;YAC5B,CAAC;YACD,IAAI,WAAW,IAAI,KAAK,CAAC,WAAW,KAAK,iBAAiB,EAAE,CAAC;gBAC3D,OAAO,CAAC,IAAI,CACV,YAAY,KAAK,6CAA6C,CAC/D,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;YAClC,CAAC;YACD,IACE,gBAAgB;gBAChB,KAAK,CAAC,gBAAgB,KAAK,sBAAsB,EACjD,CAAC;gBACD,OAAO,CAAC,IAAI,CACV,YAAY,KAAK,kDAAkD,CACpE,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YAC5C,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,MAAM,CAAC,KAAW;IAChC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACpB,KAAK,CAAC,gBAAQ,CAAC,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,MAAM,IAAI,KAAK,CACb,yMAAyM,CAC1M,CAAC;AACJ,CAAC;AAED,SAAS,cAAc;IACrB,MAAM,IAAI,KAAK,CACb,wHAAwH,CACzH,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;AACxE,CAAC;AACD,SAAS,sBAAsB;IAC7B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/envelop.d.ts b/grafast/grafast/dist/envelop.d.ts new file mode 100644 index 0000000000..4ab6eef24c --- /dev/null +++ b/grafast/grafast/dist/envelop.d.ts @@ -0,0 +1,19 @@ +import type { Plugin as EnvelopPlugin } from "@envelop/core"; +export interface UseGrafastOptions { + /** + * Set this to 'true' to allow all explains; set it to a list of the allowed + * explains to allow only those, set it to false to disable explains. + */ + explainAllowed?: boolean | string[]; +} +/** + * An Envelop plugin that uses Grafast to prepare and execute the GraphQL + * query. + */ +export declare const useGrafast: (options?: UseGrafastOptions) => EnvelopPlugin; +/** + * An Envelop plugin that will make any GraphQL errors easier to read from + * inside of GraphiQL. + */ +export declare const useMoreDetailedErrors: () => EnvelopPlugin; +//# sourceMappingURL=envelop.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/envelop.d.ts.map b/grafast/grafast/dist/envelop.d.ts.map new file mode 100644 index 0000000000..e7be6432a0 --- /dev/null +++ b/grafast/grafast/dist/envelop.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"envelop.d.ts","sourceRoot":"","sources":["../src/envelop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AAQ7D,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACrC;AA4BD;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,UAAS,iBAAsB,KAAG,aAiD5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAO,aAcvC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/envelop.js b/grafast/grafast/dist/envelop.js new file mode 100644 index 0000000000..349d11a6d5 --- /dev/null +++ b/grafast/grafast/dist/envelop.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.useMoreDetailedErrors = exports.useGrafast = void 0; +const graphile_config_1 = require("graphile-config"); +const execute_js_1 = require("./execute.js"); +const stripAnsi_js_1 = require("./stripAnsi.js"); +const subscribe_js_1 = require("./subscribe.js"); +function processExplain(explainAllowed, explainHeaders) { + if (explainAllowed === false || + (Array.isArray(explainAllowed) && explainAllowed.length === 0)) { + return undefined; + } + const explainHeader = Array.isArray(explainHeaders) + ? explainHeaders.join(",") + : explainHeaders; + if (typeof explainHeader !== "string") { + return undefined; + } + const explainParts = explainHeader.split(","); + if (explainAllowed === true || explainAllowed === undefined) { + return explainParts; + } + // Assumption: explainAllowed is relatively short (and unique). + // PERF: there's probably a faster way to do this... + return explainAllowed.filter((p) => explainParts.includes(p)); +} +/** + * An Envelop plugin that uses Grafast to prepare and execute the GraphQL + * query. + */ +const useGrafast = (options = {}) => { + const { explainAllowed = true } = options; + return { + async onExecute(opts) { + const explainHeaders = opts.args.contextValue?.req?.headers["x-graphql-explain"]; + const explain = processExplain(explainAllowed, explainHeaders); + opts.setExecuteFn((args) => (0, execute_js_1.execute)(args, (0, graphile_config_1.resolvePreset)({ + grafast: { explain }, + }))); + }, + async onSubscribe(opts) { + const ctx = opts.args.contextValue; + const headersObj = ctx?.req?.headers || + ctx?.request?.headers || + ctx?.normalizedConnectionParams || + ctx?.connectionParams; + let explainHeaders; + if (headersObj) { + explainHeaders = headersObj["x-graphql-explain"]; + if (explainHeaders == null) { + const key = Object.keys(headersObj).find((k) => k.toLowerCase() === "x-graphql-explain"); + if (key != null) { + explainHeaders = headersObj[key]; + } + } + } + const explain = processExplain(explainAllowed, explainHeaders); + opts.setSubscribeFn(async (args) => (0, subscribe_js_1.subscribe)(args, (0, graphile_config_1.resolvePreset)({ + grafast: { explain }, + }))); + }, + }; +}; +exports.useGrafast = useGrafast; +/** + * An Envelop plugin that will make any GraphQL errors easier to read from + * inside of GraphiQL. + */ +const useMoreDetailedErrors = () => ({ + onExecute: () => ({ + onExecuteDone({ result }) { + if ("errors" in result && result.errors) { + result.errors = result.errors.map((e) => { + const obj = e.toJSON(); + return Object.assign(obj, { + message: (0, stripAnsi_js_1.stripAnsi)(obj.message), + extensions: { stack: (0, stripAnsi_js_1.stripAnsi)(e.stack ?? "").split("\n") }, + }); + }); + } + }, + }), +}); +exports.useMoreDetailedErrors = useMoreDetailedErrors; +//# sourceMappingURL=envelop.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/envelop.js.map b/grafast/grafast/dist/envelop.js.map new file mode 100644 index 0000000000..f176b82b1f --- /dev/null +++ b/grafast/grafast/dist/envelop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"envelop.js","sourceRoot":"","sources":["../src/envelop.ts"],"names":[],"mappings":";;;AACA,qDAAgD;AAGhD,6CAAyD;AACzD,iDAA2C;AAC3C,iDAA+D;AAU/D,SAAS,cAAc,CACrB,cAA8C,EAC9C,cAA6C;IAE7C,IACE,cAAc,KAAK,KAAK;QACxB,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,EAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC;QACjD,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC;QAC1B,CAAC,CAAC,cAAc,CAAC;IACnB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QACtC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAI,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QAC5D,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,+DAA+D;IAC/D,oDAAoD;IACpD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACI,MAAM,UAAU,GAAG,CAAC,UAA6B,EAAE,EAAiB,EAAE;IAC3E,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC1C,OAAO;QACL,KAAK,CAAC,SAAS,CAA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Aa,EAAC;gBACZ,OAAO,EAAE,EAAE,OAAO,EAAE;aACrB,CAAC,CACH,CACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,UAAU,cAiDrB;AAEF;;;GAGG;AACI,MAAM,qBAAqB,GAAG,GAAkB,EAAE,CAAC,CAAC;IACzD,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;QAChB,aAAa,CAAC,EAAE,MAAM,EAAE;YACtB,IAAI,QAAQ,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBACvC,MAAM,CAAC,MAAc,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;oBAC/C,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;oBACvB,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;wBACxB,OAAO,EAAE,IAAA,wBAAS,EAAC,GAAG,CAAC,OAAO,CAAC;wBAC/B,UAAU,EAAE,EAAE,KAAK,EAAE,IAAA,wBAAS,EAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;qBAC5D,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;CACH,CAAC,CAAC;AAdU,QAAA,qBAAqB,yBAc/B"} \ No newline at end of file diff --git a/grafast/grafast/dist/error.d.ts b/grafast/grafast/dist/error.d.ts new file mode 100644 index 0000000000..5efaf6783e --- /dev/null +++ b/grafast/grafast/dist/error.d.ts @@ -0,0 +1,31 @@ +import type { ExecutionEntryFlags } from "./interfaces.js"; +import { $$safeError } from "./interfaces.js"; +declare const $$flagged: unique symbol; +/** + * Wrapper for errors to return (rather than throw or reject) from user code. + */ +export interface FlaggedValue { + [$$flagged]: true; + flags: ExecutionEntryFlags; + value: TValue; + planId: number | null; + toString(): string; +} +export declare const $$inhibit: FlaggedValue; +/** + * Used to wrap error values to have Grafast treat them as if they were + * thrown/rejected (rather than just regular values). + */ +export declare function flagError(value: TError, planId?: number | null): FlaggedValue; +export declare class SafeError | undefined = Record | undefined> extends Error { + extensions: TExtensions; + static $$export: { + moduleName: string; + exportName: string; + }; + [$$safeError]: boolean; + constructor(message: string, extensions?: TExtensions, errorOptions?: ErrorOptions); +} +export declare function isSafeError(error: Error): error is SafeError; +export {}; +//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/error.d.ts.map b/grafast/grafast/dist/error.d.ts.map new file mode 100644 index 0000000000..3f60aafad1 --- /dev/null +++ b/grafast/grafast/dist/error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,WAAW,EAIZ,MAAM,iBAAiB,CAAC;AAEzB,QAAA,MAAM,SAAS,eAAgC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,MAAM,GAAG,GAAG;IACxC,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAClB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,IAAI,MAAM,CAAC;CACpB;AAsCD,eAAO,MAAM,SAAS,oBAIrB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,SAAS,KAAK,GAAG,KAAK,EACpD,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,MAAM,GAAG,IAAW,GAC3B,YAAY,CAAC,MAAM,CAAC,CAEtB;AAWD,qBAAa,SAAS,CACpB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GAC/C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,SAAS,CACb,SAAQ,KAAK;IAQJ,UAAU,EAAE,WAAW;IAPhC,MAAM,CAAC,QAAQ;;;MAGb;IACF,CAAC,WAAW,CAAC,UAAQ;gBAEnB,OAAO,EAAE,MAAM,EACR,UAAU,GAAE,WAAsC,EACzD,YAAY,CAAC,EAAE,YAAY;CAK9B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,SAAS,CAE5D"} \ No newline at end of file diff --git a/grafast/grafast/dist/error.js b/grafast/grafast/dist/error.js new file mode 100644 index 0000000000..610cac9e5c --- /dev/null +++ b/grafast/grafast/dist/error.js @@ -0,0 +1,73 @@ +"use strict"; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SafeError = exports.$$inhibit = void 0; +exports.flagError = flagError; +exports.isFlaggedValue = isFlaggedValue; +exports.isSafeError = isSafeError; +const dev_js_1 = require("./dev.js"); +const inspect_js_1 = require("./inspect.js"); +const interfaces_js_1 = require("./interfaces.js"); +const $$flagged = Symbol("grafastFlaggedValue"); +function flaggedValueToString() { + if (this.flags & interfaces_js_1.FLAG_ERROR && this.value instanceof Error) { + return String(this.value); + } + else if (this.flags & interfaces_js_1.FLAG_INHIBITED && this.value === null) { + return "INHIBIT"; + } + else { + return `${this.flags}/${(0, inspect_js_1.inspect)(this.value)}`; + } +} +function flaggedValue(flags, value, planId) { + if (dev_js_1.isDev) { + if (value === null && !(flags & interfaces_js_1.FLAG_NULL)) { + throw new Error(`flaggedValue called with null, but not flagged as null.`); + } + if (value === null && !(flags & interfaces_js_1.FLAG_INHIBITED)) { + throw new Error(`flaggedValue called with null, but not flagged as inhibited.`); + } + } + return { + [$$flagged]: true, + flags, + value, + planId, + toString: flaggedValueToString, + }; +} +exports.$$inhibit = flaggedValue(interfaces_js_1.FLAG_NULL | interfaces_js_1.FLAG_INHIBITED, null, null); +/** + * Used to wrap error values to have Grafast treat them as if they were + * thrown/rejected (rather than just regular values). + */ +function flagError(value, planId = null) { + return flaggedValue(interfaces_js_1.FLAG_ERROR, value, planId); +} +/** + * Is this a flagged value? + * + * @internal + */ +function isFlaggedValue(value) { + return Object.hasOwn(value, $$flagged); +} +class SafeError extends Error { + static { _a = interfaces_js_1.$$safeError; } + static { this.$$export = { + moduleName: "grafast", + exportName: "SafeError", + }; } + constructor(message, extensions = undefined, errorOptions) { + super(message, errorOptions); + this.extensions = extensions; + this[_a] = true; + Object.setPrototypeOf(this, SafeError.prototype); + } +} +exports.SafeError = SafeError; +function isSafeError(error) { + return error[interfaces_js_1.$$safeError]; +} +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/error.js.map b/grafast/grafast/dist/error.js.map new file mode 100644 index 0000000000..af1d89e03b --- /dev/null +++ b/grafast/grafast/dist/error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;;;AAqEA,8BAKC;AAOD,wCAEC;AAsBD,kCAEC;AA3GD,qCAAiC;AACjC,6CAAuC;AAEvC,mDAKyB;AAEzB,MAAM,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAahD,SAAS,oBAAoB;IAC3B,IAAI,IAAI,CAAC,KAAK,GAAG,0BAAU,IAAI,IAAI,CAAC,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3D,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;SAAM,IAAI,IAAI,CAAC,KAAK,GAAG,8BAAc,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC;IACnB,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,IAAA,oBAAO,EAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IAChD,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CACnB,KAA0B,EAC1B,KAAU,EACV,MAAqB;IAErB,IAAI,cAAK,EAAE,CAAC;QACV,IA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a,CAAC,2BAAW,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/establishOperationPlan.d.ts b/grafast/grafast/dist/establishOperationPlan.d.ts new file mode 100644 index 0000000000..3b7e7928ef --- /dev/null +++ b/grafast/grafast/dist/establishOperationPlan.d.ts @@ -0,0 +1,12 @@ +import type { GraphQLSchema, OperationDefinitionNode } from "graphql"; +import { OperationPlan } from "./index.js"; +import type { BaseGraphQLRootValue, BaseGraphQLVariables, Fragments } from "./interfaces.js"; +/** + * Implements the `EstablishOpPlan` algorithm. + * + * @remarks Though EstablishOpPlan accepts document and operationName, we + * instead accept operation and fragments since they're easier to get a hold of + * in GraphQL.js. + */ +export declare function establishOperationPlan(schema: GraphQLSchema, operation: OperationDefinitionNode, fragments: Fragments, variableValues: TVariables, context: TContext, rootValue: TRootValue, planningTimeout?: number | null): OperationPlan; +//# sourceMappingURL=establishOperationPlan.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/establishOperationPlan.d.ts.map b/grafast/grafast/dist/establishOperationPlan.d.ts.map new file mode 100644 index 0000000000..787a424b50 --- /dev/null +++ b/grafast/grafast/dist/establishOperationPlan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"establishOperationPlan.d.ts","sourceRoot":"","sources":["../src/establishOperationPlan.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAKtE,OAAO,EAAE,aAAa,EAAa,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EAEpB,SAAS,EAEV,MAAM,iBAAiB,CAAC;AAoFzB;;;;;;GAMG;AAEH,wBAAgB,sBAAsB,CACpC,UAAU,SAAS,oBAAoB,GAAG,oBAAoB,EAC9D,QAAQ,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,EAClD,UAAU,SAAS,oBAAoB,GAAG,oBAAoB,EAE9D,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,uBAAuB,EAClC,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,UAAU,EAC1B,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,UAAU,EACrB,eAAe,GAAE,MAAM,GAAG,IAAW,GACpC,aAAa,CAqJf"} \ No newline at end of file diff --git a/grafast/grafast/dist/establishOperationPlan.js b/grafast/grafast/dist/establishOperationPlan.js new file mode 100644 index 0000000000..bb8c176b47 --- /dev/null +++ b/grafast/grafast/dist/establishOperationPlan.js @@ -0,0 +1,201 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.establishOperationPlan = establishOperationPlan; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const debug_1 = tslib_1.__importDefault(require("debug")); +const constraints_js_1 = require("./constraints.js"); +const dev_js_1 = require("./dev.js"); +const index_js_1 = require("./index.js"); +const interfaces_js_1 = require("./interfaces.js"); +const timeSource_js_1 = require("./timeSource.js"); +const debug = (0, debug_1.default)("grafast:establishOperationPlan"); +// How long is a timeout valid for? Here I've set it to 60 seconds. +const TIMEOUT_TIMEOUT = (typeof process !== "undefined" && + typeof process.env.GRAFAST_TIMEOUT_VALIDITY_MS === "string" + ? parseInt(process.env.GRAFAST_TIMEOUT_VALIDITY_MS, 10) + : null) || 60_000; +// OPTIMIZE: we should consider increasing the timeout once the process has been +// running a while (since the JIT should have kicked in) - we could even use +// `setTimeout` to trigger it after certain amount of time elapsed. +/** + * This is a development-only validation to check fragments do, in fact, match + * - even if the objects themselves differ. + */ +function reallyAssertFragmentsMatch(oldFragments, fragments) { + if (oldFragments !== fragments) { + debug("fragments aren't `===` for same operation"); + // Consistency check - we assume that if the operation is the same then + // the fragments will be, but this may not be the case depending on if + // GraphQL.js caches the operation node. + const oldKeys = Object.keys(oldFragments).sort(); + const newKeys = Object.keys(fragments).sort(); + const oldKeyStr = oldKeys.join(","); + const newKeyStr = newKeys.join(","); + if (oldKeyStr.length !== newKeyStr.length) { + throw new Error(`Inconsistency error: operation matches, but fragment keys differ: '${oldKeyStr}' != '${newKeyStr}'.`); + } + for (const key of newKeys) { + if (oldFragments[key] !== fragments[key]) { + throw new Error(`Inconsistency error: operation matches, fragment names match, but fragment '${key}' is not '===' to the previous value.`); + } + } + } +} +// Optimise this away in production. +const assertFragmentsMatch = !dev_js_1.isDev ? dev_js_1.noop : reallyAssertFragmentsMatch; +/** + * Implements the `IsOpPlanCompatible` algorithm. + * + * @remarks Due to the optimisation in `establishOperationPlan`, the schema, document + * and operationName checks have already been performed. + */ +function isOperationPlanResultCompatible(operationPlan, variableValues, context, rootValue) { + const { variableValuesConstraints, contextConstraints, rootValueConstraints, } = operationPlan; + if (!(0, constraints_js_1.matchesConstraints)(variableValuesConstraints, variableValues)) { + return false; + } + if (!(0, constraints_js_1.matchesConstraints)(contextConstraints, context)) { + return false; + } + if (!(0, constraints_js_1.matchesConstraints)(rootValueConstraints, rootValue)) { + return false; + } + return true; +} +/** + * Implements the `EstablishOpPlan` algorithm. + * + * @remarks Though EstablishOpPlan accepts document and operationName, we + * instead accept operation and fragments since they're easier to get a hold of + * in GraphQL.js. + */ +// eslint-disable-next-line @typescript-eslint/ban-types +function establishOperationPlan(schema, operation, fragments, variableValues, context, rootValue, planningTimeout = null) { + let cacheByOperation = schema.extensions.grafast?.[interfaces_js_1.$$cacheByOperation]; + let cache = cacheByOperation?.get(operation); + // These two variables to make it easy to trim the linked list later. + let count = 0; + let lastButOneItem = null; + if (cache !== undefined) { + // Dev-only validation + assertFragmentsMatch(cache.fragments, fragments); + let previousItem = null; + let linkedItem = cache.possibleOperationPlans; + while (linkedItem) { + const value = linkedItem.value; + if (isOperationPlanResultCompatible(value, variableValues, context, rootValue)) { + const { error, operationPlan } = value; + if (error != null) { + if (error instanceof index_js_1.SafeError) { + if (error.extensions?.[interfaces_js_1.$$timeout] != null) { + if (error.extensions[interfaces_js_1.$$ts] < timeSource_js_1.timeSource.now() - TIMEOUT_TIMEOUT) { + // Remove this out of date timeout + linkedItem = linkedItem.next; + if (previousItem !== null) { + previousItem.next = linkedItem; + } + else { + cache.possibleOperationPlans = linkedItem; + } + continue; + } + if (planningTimeout !== null && + error.extensions[interfaces_js_1.$$timeout] >= planningTimeout) { + // It was a timeout error - do not retry + throw error; + } + else { + // That's Not My Timeout, let's try again. + } + } + else { + // Not a timeout error - this will always fail in the same way? + throw error; + } + } + else { + // Not a timeout error - this will always fail in the same way? + throw error; + } + } + else { + // Hoist to top of linked list + if (previousItem !== null) { + // Remove linkedItem from existing chain + previousItem.next = linkedItem.next; + // Add rest of chain after linkedItem + linkedItem.next = cache.possibleOperationPlans; + // linkedItem is now head of chain + cache.possibleOperationPlans = linkedItem; + } + // We found a suitable OperationPlan - use that! + return operationPlan; + } + } + count++; + lastButOneItem = previousItem; + previousItem = linkedItem; + linkedItem = linkedItem.next; + } + } + // No suitable OperationPlan found, time to make one. + let operationPlan; + let error; + const variableValuesConstraints = []; + const contextConstraints = []; + const rootValueConstraints = []; + try { + operationPlan = new index_js_1.OperationPlan(schema, operation, fragments, variableValuesConstraints, variableValues, contextConstraints, context, rootValueConstraints, rootValue, planningTimeout); + } + catch (e) { + error = e; + } + // Store it to the cache + if (!cacheByOperation) { + if (!schema.extensions.grafast) { + schema.extensions.grafast = Object.create(null); + } + cacheByOperation = new lru_1.default({ + maxLength: schema.extensions.grafast.operationsCacheMaxLength ?? 500, + }); + schema.extensions.grafast[interfaces_js_1.$$cacheByOperation] = cacheByOperation; + } + const establishOperationPlanResult = { + variableValuesConstraints, + contextConstraints, + rootValueConstraints, + ...(operationPlan ? { operationPlan } : { error: error }), + }; + if (!cache) { + cache = { + fragments, + possibleOperationPlans: { + value: establishOperationPlanResult, + next: null, + }, + }; + cacheByOperation.set(operation, cache); + } + else { + const max = schema.extensions.grafast.operationOperationPlansCacheMaxLength ?? 50; + if (count >= max) { + // Remove the tail to ensure we never grow too big + lastButOneItem.next = null; + count--; + // LOGGING: we should announce this so that people know there's something that needs fixing in their schema (too much eval?) + } + // Add new operationPlan to top of the linked list. + cache.possibleOperationPlans = { + value: establishOperationPlanResult, + next: cache.possibleOperationPlans, + }; + } + if (error !== undefined) { + throw error; + } + else { + return operationPlan; + } +} +//# sourceMappingURL=establishOperationPlan.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/establishOperationPlan.js.map b/grafast/grafast/dist/establishOperationPlan.js.map new file mode 100644 index 0000000000..3eaddacca8 --- /dev/null +++ b/grafast/grafast/dist/establishOperationPlan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"establishOperationPlan.js","sourceRoot":"","sources":["../src/establishOperationPlan.ts"],"names":[],"mappings":";;AA0GA,wDAiKC;;AA3QD,gEAAgC;AAChC,0DAAiC;AAIjC,qDAAsD;AACtD,qCAAuC;AACvC,yCAAsD;AAQtD,mDAAsE;AACtE,mDAA6C;AAE7C,MAAM,KAAK,GAAG,IAAA,eAAY,EAAC,gCAAgC,CAAC,CAAC;AAE7D,mEAAmE;AACnE,MAAM,eAAe,GACnB,CAAC,OAAO,OAAO,KAAK,WAAW;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,QAAQ;IACzD,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,CAAC;IACvD,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC;AACtB,gFAAgF;AAChF,4EAA4E;AAC5E,mEAAmE;AAEnE;;;GAGG;AACH,SAAS,0BAA0B,CACjC,YAAuB,EACvB,SAAoB;IAEpB,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACnD,uEAAuE;QACvE,sEAAsE;QACtE,wCAAwC;QACxC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;QACjD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAA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CAAC;YAC5B,KAAK,EAAE,CAAC;YACR,4HAA4H;QAC9H,CAAC;QAED,mDAAmD;QACnD,KAAK,CAAC,sBAAsB,GAAG;YAC7B,KAAK,EAAE,4BAA4B;YACnC,IAAI,EAAE,KAAK,CAAC,sBAAsB;SACnC,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,KAAK,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,aAAc,CAAC;IACxB,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/execute.d.ts b/grafast/grafast/dist/execute.d.ts new file mode 100644 index 0000000000..23c3f26e3a --- /dev/null +++ b/grafast/grafast/dist/execute.d.ts @@ -0,0 +1,14 @@ +import type { AsyncExecutionResult, ExecutionArgs, ExecutionResult } from "graphql"; +import type { PromiseOrValue } from "graphql/jsutils/PromiseOrValue"; +import type { GrafastExecutionArgs } from "./interfaces.js"; +/** + * @deprecated Second and third parameters should be passed as part of args, + * specifically `resolvedPreset` and `outputDataAsString`. + */ +export declare function execute(args: ExecutionArgs, resolvedPreset: GraphileConfig.ResolvedPreset | undefined, outputDataAsString?: boolean): PromiseOrValue>; +/** + * Use this instead of GraphQL.js' execute method and we'll automatically + * run grafastPrepare for you and handle the result. + */ +export declare function execute(args: GrafastExecutionArgs): PromiseOrValue>; +//# sourceMappingURL=execute.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/execute.d.ts.map b/grafast/grafast/dist/execute.d.ts.map new file mode 100644 index 0000000000..19f2d236fb --- /dev/null +++ b/grafast/grafast/dist/execute.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,KAAK,EAIV,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAgFzB;;;GAGG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,aAAa,EACnB,cAAc,EAAE,cAAc,CAAC,cAAc,GAAG,SAAS,EACzD,kBAAkB,CAAC,EAAE,OAAO,GAC3B,cAAc,CACf,eAAe,GAAG,cAAc,CAAC,oBAAoB,EAAE,IAAI,EAAE,SAAS,CAAC,CACxE,CAAC;AACF;;;GAGG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,oBAAoB,GACzB,cAAc,CACf,eAAe,GAAG,cAAc,CAAC,oBAAoB,EAAE,IAAI,EAAE,SAAS,CAAC,CACxE,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/execute.js b/grafast/grafast/dist/execute.js new file mode 100644 index 0000000000..e066d01058 --- /dev/null +++ b/grafast/grafast/dist/execute.js @@ -0,0 +1,96 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withGrafastArgs = withGrafastArgs; +exports.execute = execute; +const tslib_1 = require("tslib"); +const eventemitter3_1 = tslib_1.__importDefault(require("eventemitter3")); +const dev_js_1 = require("./dev.js"); +const inspect_js_1 = require("./inspect.js"); +const interfaces_js_1 = require("./interfaces.js"); +const middleware_js_1 = require("./middleware.js"); +const prepare_js_1 = require("./prepare.js"); +const utils_js_1 = require("./utils.js"); +/** + * Used by `execute` and `subscribe`. + * @internal + */ +function withGrafastArgs(args) { + const options = args.resolvedPreset?.grafast; + if (dev_js_1.isDev) { + if (args.rootValue != null && + (typeof args.rootValue !== "object" || + Object.keys(args.rootValue).length > 0)) { + throw new Error(`Grafast executor doesn't support there being a rootValue (found ${(0, inspect_js_1.inspect)(args.rootValue)})`); + } + } + if (args.rootValue == null) { + args.rootValue = Object.create(null); + } + if (typeof args.rootValue !== "object" || args.rootValue == null) { + throw new Error("Grafast requires that the 'rootValue' be an object"); + } + const explain = options?.explain; + const shouldExplain = !!explain; + let unlisten = null; + if (shouldExplain) { + const eventEmitter = new eventemitter3_1.default(); + const explainOperations = []; + args.rootValue = Object.assign(Object.create(null), args.rootValue, { + [interfaces_js_1.$$eventEmitter]: eventEmitter, + [interfaces_js_1.$$extensions]: { + explain: { + operations: explainOperations, + }, + }, + }); + const handleExplainOperation = ({ operation, }) => { + if (explain === true || (explain && explain.includes(operation.type))) { + explainOperations.push(operation); + } + }; + eventEmitter.on("explainOperation", handleExplainOperation); + unlisten = () => { + eventEmitter.removeListener("explainOperation", handleExplainOperation); + }; + } + const rootValue = (0, prepare_js_1.grafastPrepare)(args, { + explain: options?.explain, + timeouts: options?.timeouts, + // TODO: Delete this + outputDataAsString: args.outputDataAsString, + }); + if (unlisten !== null) { + Promise.resolve(rootValue).then(unlisten, unlisten); + } + // Convert from PromiseOrDirect to PromiseOrValue + if ((0, utils_js_1.isPromiseLike)(rootValue)) { + return Promise.resolve(rootValue); + } + else { + return rootValue; + } +} +function execute(args, legacyResolvedPreset, legacyOutputDataAsString) { + // TODO: remove legacy compatibility + if (legacyResolvedPreset !== undefined) { + args.resolvedPreset = legacyResolvedPreset; + } + if (legacyOutputDataAsString !== undefined) { + args.outputDataAsString = legacyOutputDataAsString; + } + const { resolvedPreset } = args; + const middleware = args.middleware === undefined && resolvedPreset != null + ? (0, middleware_js_1.getGrafastMiddleware)(resolvedPreset) + : (args.middleware ?? null); + if (args.middleware === undefined) { + args.middleware = middleware; + } + if (middleware !== null) { + return middleware.run("execute", { args }, executeMiddlewareCallback); + } + else { + return withGrafastArgs(args); + } +} +const executeMiddlewareCallback = (event) => withGrafastArgs(event.args); +//# sourceMappingURL=execute.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/execute.js.map b/grafast/grafast/dist/execute.js.map new file mode 100644 index 0000000000..cd708c70d9 --- /dev/null +++ b/grafast/grafast/dist/execute.js.map @@ -0,0 +1 @@ +{"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":";;AAyBA,0CAoEC;AAsBD,0BA4BC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I,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,oBAAoB,CAAC;IAC7C,CAAC;IACD,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;QAC3C,IAAI,CAAC,kBAAkB,GAAG,wBAAwB,CAAC;IACrD,CAAC;IAED,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,UAAU,GACd,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,cAAc,IAAI,IAAI;QACrD,CAAC,CAAC,IAAA,oCAAoB,EAAC,cAAc,CAAC;QACtC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC;IAChC,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IACD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,yBAAyB,CAAC,CAAC;IACxE,CAAC;SAAM,CAAC;QACN,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,MAAM,yBAAyB,GAAG,CAAC,KAAmB,EAAE,EAAE,CACxD,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/exportAs.d.ts b/grafast/grafast/dist/exportAs.d.ts new file mode 100644 index 0000000000..edbe8d3fb7 --- /dev/null +++ b/grafast/grafast/dist/exportAs.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=exportAs.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/exportAs.d.ts.map b/grafast/grafast/dist/exportAs.d.ts.map new file mode 100644 index 0000000000..7824d9145e --- /dev/null +++ b/grafast/grafast/dist/exportAs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exportAs.d.ts","sourceRoot":"","sources":["../src/exportAs.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/grafast/dist/exportAs.js b/grafast/grafast/dist/exportAs.js new file mode 100644 index 0000000000..738df34515 --- /dev/null +++ b/grafast/grafast/dist/exportAs.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exportAs = exportAs; +exports.exportAsMany = exportAsMany; +const utils_js_1 = require("./utils.js"); +/** + * Marks that `thing` is exported from the `grafast` module as + * `exportName` so that `graphile-export` can convert references to `thing` + * into an `import` statement. + * + * @internal + */ +function exportAs(moduleName, thing, exportName) { + if (!("$$export" in thing)) { + Object.defineProperty(thing, "$$export", { + value: { moduleName, exportName }, + }); + } + else { + const e = thing.$$export; + if (e.moduleName !== moduleName) { + throw new Error(`Attempted to export ${thing} as '${moduleName}.${exportName}', but it's already exported as '${e.moduleName}.${e.exportName}' (module name mismatch)`); + } + if (typeof e.exportName === "string" || exportName === "string") { + if (e.exportName !== exportName) { + throw new Error(`Attempted to export ${thing} as '${moduleName}.${exportName}', but it's already exported as '${e.moduleName}.${e.exportName}' (export name mismatch)`); + } + } + else { + // Must be arrays + if (!Array.isArray(e.exportName) || + !Array.isArray(exportName) || + !(0, utils_js_1.arraysMatch)(e.exportName, exportName)) { + throw new Error(`Attempted to export ${thing} as '${moduleName}.${exportName}', but it's already exported as '${e.moduleName}.${e.exportName}' (export name path mismatch)`); + } + } + } + return thing; +} +/** + * Marks that each value in `all` is exported from the `grafast` + * module as the key in the `all` object so that `graphile-export` can + * convert references to these values into `import` statements. + * + * @internal + */ +function exportAsMany(moduleName, all) { + for (const key of Object.keys(all)) { + const value = all[key]; + if ((typeof value === "object" || typeof value === "function") && + value !== null) { + exportAs(moduleName, all[key], key); + } + } +} +//# sourceMappingURL=exportAs.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/exportAs.js.map b/grafast/grafast/dist/exportAs.js.map new file mode 100644 index 0000000000..cc520596d1 --- /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AAI,KAAK,CACb,uBAAuB,KAAK,QAAQ,UAAU,IAAI,UAAU,oCAAoC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,+BAA+B,CAC5J,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,UAAkB,EAClB,GAA2B;IAE3B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IACE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC;YAC1D,KAAK,KAAK,IAAI,EACd,CAAC;YACD,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/global.d.ts b/grafast/grafast/dist/global.d.ts new file mode 100644 index 0000000000..118bf81eb4 --- /dev/null +++ b/grafast/grafast/dist/global.d.ts @@ -0,0 +1,3 @@ +export declare function setDebug(newDebug: boolean): void; +export declare function getDebug(): boolean; +//# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/global.d.ts.map b/grafast/grafast/dist/global.d.ts.map new file mode 100644 index 0000000000..979e1634fd --- /dev/null +++ b/grafast/grafast/dist/global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../src/global.ts"],"names":[],"mappings":"AACA,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAEhD;AACD,wBAAgB,QAAQ,IAAI,OAAO,CAElC"} \ No newline at end of file diff --git a/grafast/grafast/dist/global.js b/grafast/grafast/dist/global.js new file mode 100644 index 0000000000..4be7cfc949 --- /dev/null +++ b/grafast/grafast/dist/global.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setDebug = setDebug; +exports.getDebug = getDebug; +let debug = false; +function setDebug(newDebug) { + debug = newDebug; +} +function getDebug() { + return debug; +} +//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/global.js.map b/grafast/grafast/dist/global.js.map new file mode 100644 index 0000000000..cf6d25172b --- /dev/null +++ b/grafast/grafast/dist/global.js.map @@ -0,0 +1 @@ +{"version":3,"file":"global.js","sourceRoot":"","sources":["../src/global.ts"],"names":[],"mappings":";;AACA,4BAEC;AACD,4BAEC;AAND,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,SAAgB,QAAQ,CAAC,QAAiB;IACxC,KAAK,GAAG,QAAQ,CAAC;AACnB,CAAC;AACD,SAAgB,QAAQ;IACtB,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/grafastGraphql.d.ts b/grafast/grafast/dist/grafastGraphql.d.ts new file mode 100644 index 0000000000..df84a18b81 --- /dev/null +++ b/grafast/grafast/dist/grafastGraphql.d.ts @@ -0,0 +1,15 @@ +import type { AsyncExecutionResult, ExecutionResult } from "graphql"; +import type { PromiseOrValue } from "graphql/jsutils/PromiseOrValue"; +import type { GrafastArgs } from "./interfaces.js"; +/** + * A replacement for GraphQL.js' `graphql` method that calls Grafast's + * execute instead + */ +export declare function grafast(args: GrafastArgs): PromiseOrValue>; +/** + * @deprecated Second and third parameters should be passed as part of args, + * specifically `resolvedPreset` and `requestContext`. + */ +export declare function grafast(args: GrafastArgs, legacyResolvedPreset?: GraphileConfig.ResolvedPreset | undefined, legacyCtx?: Partial | undefined): PromiseOrValue>; +export declare function grafastSync(args: GrafastArgs, legacyResolvedPreset?: GraphileConfig.ResolvedPreset, legacyRequestContext?: Partial): ExecutionResult; +//# sourceMappingURL=grafastGraphql.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/grafastGraphql.d.ts.map b/grafast/grafast/dist/grafastGraphql.d.ts.map new file mode 100644 index 0000000000..fb33eb2f35 --- /dev/null +++ b/grafast/grafast/dist/grafastGraphql.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"grafastGraphql.d.ts","sourceRoot":"","sources":["../src/grafastGraphql.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EAEpB,eAAe,EAEhB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE,OAAO,KAAK,EACV,WAAW,EAIZ,MAAM,iBAAiB,CAAC;AAqGzB;;;GAGG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,WAAW,GAChB,cAAc,CACf,eAAe,GAAG,cAAc,CAAC,oBAAoB,EAAE,IAAI,EAAE,SAAS,CAAC,CACxE,CAAC;AACF;;;GAGG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,WAAW,EACjB,oBAAoB,CAAC,EAAE,cAAc,CAAC,cAAc,GAAG,SAAS,EAChE,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,GACtD,cAAc,CACf,eAAe,GAAG,cAAc,CAAC,oBAAoB,EAAE,IAAI,EAAE,SAAS,CAAC,CACxE,CAAC;AAyFF,wBAAgB,WAAW,CACzB,IAAI,EAAE,WAAW,EACjB,oBAAoB,CAAC,EAAE,cAAc,CAAC,cAAc,EACpD,oBAAoB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GACrD,eAAe,CAMjB"} \ No newline at end of file diff --git a/grafast/grafast/dist/grafastGraphql.js b/grafast/grafast/dist/grafastGraphql.js new file mode 100644 index 0000000000..950e8f9231 --- /dev/null +++ b/grafast/grafast/dist/grafastGraphql.js @@ -0,0 +1,152 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.grafast = grafast; +exports.grafastSync = grafastSync; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const graphql = tslib_1.__importStar(require("graphql")); +const error_js_1 = require("./error.js"); +const execute_js_1 = require("./execute.js"); +const index_js_1 = require("./index.js"); +const interfaces_js_1 = require("./interfaces.js"); +const middleware_js_1 = require("./middleware.js"); +const utils_js_1 = require("./utils.js"); +const { GraphQLError, parse, Source, validate, validateSchema } = graphql; +/** Rough average size per query */ +const CACHE_MULTIPLIER = 100000; +const MEGABYTE = 1024 * 1024; +const queryCacheMaxSizeInBytes = 50 * MEGABYTE; +const defaultQueryCacheMaxSize = Math.max(2, Math.ceil(queryCacheMaxSizeInBytes / CACHE_MULTIPLIER)); +// If we can use crypto to create a hash, great. Otherwise just use the string. +let calculateQueryHash; +try { + let lastString; + let lastHash; + const createHash = require("crypto").createHash; + if (typeof createHash !== "function") { + throw new Error("Failed to load createHash"); + } + calculateQueryHash = (queryString) => { + if (queryString !== lastString) { + lastString = queryString; + lastHash = createHash("sha1").update(queryString).digest("base64"); + } + return lastHash; + }; +} +catch { + calculateQueryHash = (str) => str; +} +const parseAndValidate = (gqlSchema, stringOrSource) => { + let queryCache = gqlSchema.extensions.grafast?.[interfaces_js_1.$$queryCache]; + if (!queryCache) { + const cacheSize = gqlSchema.extensions.grafast?.queryCacheMaxLength ?? + defaultQueryCacheMaxSize; + queryCache = new lru_1.default({ maxLength: cacheSize }); + if (!gqlSchema.extensions.grafast) { + gqlSchema.extensions.grafast = Object.create(null); + } + gqlSchema.extensions.grafast[interfaces_js_1.$$queryCache] = queryCache; + } + // Only cache queries that are less than 100kB, we don't want DOS attacks + // attempting to exhaust our memory. + const hash = calculateQueryHash(typeof stringOrSource === "string" ? stringOrSource : stringOrSource.body); + const result = queryCache.get(hash); + if (result !== undefined) { + return result; + } + else { + const source = typeof stringOrSource === "string" + ? new Source(stringOrSource, "GraphQL Http Request") + : stringOrSource; + let queryDocumentAst; + // Catch an errors while parsing so that we can set the `statusCode` to + // 400. Otherwise we don’t need to parse this way. + try { + queryDocumentAst = parse(source); + // Validate our GraphQL query using given rules. + const validationErrors = validate(gqlSchema, queryDocumentAst); + const cacheResult = validationErrors.length > 0 ? validationErrors : queryDocumentAst; + queryCache.set(hash, cacheResult); + return cacheResult; + } + catch (error) { + const cacheResult = [ + error instanceof GraphQLError + ? error + : new GraphQLError("Validation error occurred", undefined, undefined, undefined, undefined, error), + ]; + queryCache.set(hash, cacheResult); + return cacheResult; + } + } +}; +function grafast(args, legacyResolvedPreset, legacyCtx) { + // Convert legacy args to properties on `args`: + if (legacyResolvedPreset !== undefined) { + args.resolvedPreset = args.resolvedPreset ?? legacyResolvedPreset; + } + if (legacyCtx !== undefined) { + args.requestContext = args.requestContext ?? legacyCtx; + } + const { schema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver, resolvedPreset, requestContext, middleware: rawMiddleware, } = args; + const middleware = rawMiddleware !== undefined + ? rawMiddleware + : resolvedPreset != null + ? (0, middleware_js_1.getGrafastMiddleware)(resolvedPreset) + : null; + // Validate Schema + const schemaValidationErrors = middleware != null && resolvedPreset != null + ? middleware.runSync("validateSchema", { schema, resolvedPreset }, validateSchemaWithEvent) + : validateSchema(schema); + if (schemaValidationErrors.length > 0) { + return { errors: schemaValidationErrors }; + } + // Cached parse and validate + const documentOrErrors = middleware != null && resolvedPreset != null + ? middleware.runSync("parseAndValidate", { resolvedPreset, schema, source }, parseAndValidateWithEvent) + : parseAndValidate(schema, source); + if (Array.isArray(documentOrErrors)) { + return { errors: documentOrErrors }; + } + const document = documentOrErrors; + const executionArgs = { + schema, + document, + rootValue, + contextValue, + variableValues, + operationName, + fieldResolver, + typeResolver, + middleware, + resolvedPreset, + requestContext, + }; + if (resolvedPreset && requestContext) { + const argsOrPromise = (0, index_js_1.hookArgs)(executionArgs); + if ((0, utils_js_1.isPromiseLike)(argsOrPromise)) { + return Promise.resolve(argsOrPromise).then(execute_js_1.execute); + } + else { + return (0, execute_js_1.execute)(argsOrPromise); + } + } + else { + return (0, execute_js_1.execute)(executionArgs); + } +} +function grafastSync(args, legacyResolvedPreset, legacyRequestContext) { + const result = grafast(args, legacyResolvedPreset, legacyRequestContext); + if ((0, utils_js_1.isPromiseLike)(result)) { + throw new error_js_1.SafeError("Grafast execution failed to complete synchronously."); + } + return result; +} +function validateSchemaWithEvent(event) { + return validateSchema(event.schema); +} +function parseAndValidateWithEvent(event) { + return parseAndValidate(event.schema, event.source); +} +//# sourceMappingURL=grafastGraphql.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/grafastGraphql.js.map b/grafast/grafast/dist/grafastGraphql.js.map new file mode 100644 index 0000000000..a1a8e943c0 --- /dev/null +++ b/grafast/grafast/dist/grafastGraphql.js.map @@ -0,0 +1 @@ +{"version":3,"file":"grafastGraphql.js","sourceRoot":"","sources":["../src/grafastGraphql.ts"],"names":[],"mappings":";;AA2IA,0BAsFC;AAED,kCAUC;;AA7OD,gEAAgC;AAOhC,yDAAmC;AAGnC,yCAAuC;AACvC,6CAAuC;AACvC,yCAAsC;AAOtC,mDAA+C;AAC/C,mDAAuD;AACvD,yCAA2C;AAE3C,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;AAE1E,mCAAmC;AACnC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7B,MAAM,wBAAwB,GAAG,EAAE,GAAG,QAAQ,CAAC;AAC/C,MAAM,wBAAwB,GAAG,IAAI,CAAC,GAAG,CACvC,CAAC,EACD,IAAI,CAAC,IAAI,CAAC,wBAAwB,GAAG,gBAAgB,CAAC,CACvD,CAAC;AAEF,+EAA+E;AAC/E,IAAI,kBAAmD,CAAC;AACxD,IAAI,CAAC;IACH,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAgB,CAAC;IACrB,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,UAAU,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/grafast/grafast/dist/grafastPrint.d.ts b/grafast/grafast/dist/grafastPrint.d.ts new file mode 100644 index 0000000000..34ae76287c --- /dev/null +++ b/grafast/grafast/dist/grafastPrint.d.ts @@ -0,0 +1,16 @@ +import type { Bucket } from "./bucket.js"; +export declare function _grafastPrint(symbol: string | symbol | symbol[] | Record | Map, seen: Set): string; +export declare function recursivePrintBucket(bucket: Bucket, indentLevel?: number): string; +export declare function printStore(bucket: Bucket): string; +export declare function grafastColor(text: string, n: number): string; +/** + * Prints something grafast-style (i.e. concise, coloured, with helpful detail) + */ +export declare function grafastPrint(symbol: symbol | symbol[] | Record | Map | any): string; +/** + * An ANSI-aware pad function; strips ANSI sequences from the string, figures + * out how much it needs to pad it by, and then pads the original string by + * that amount. + */ +export declare function ansiPad(ansiString: string, targetLength: number, fill: string, position: "start" | "end"): string; +//# sourceMappingURL=grafastPrint.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/grafastPrint.d.ts.map b/grafast/grafast/dist/grafastPrint.d.ts.map new file mode 100644 index 0000000000..f825545321 --- /dev/null +++ b/grafast/grafast/dist/grafastPrint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"grafastPrint.d.ts","sourceRoot":"","sources":["../src/grafastPrint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA+C1C,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EACxE,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,GACb,MAAM,CAsFR;AA2BD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,SAAI,GAAG,MAAM,CAW5E;AAkBD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAuCjD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5D;AAmCD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,GACpE,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,OAAO,GAAG,KAAK,GACxB,MAAM,CAaR"} \ No newline at end of file diff --git a/grafast/grafast/dist/grafastPrint.js b/grafast/grafast/dist/grafastPrint.js new file mode 100644 index 0000000000..40fb2c54d3 --- /dev/null +++ b/grafast/grafast/dist/grafastPrint.js @@ -0,0 +1,238 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports._grafastPrint = _grafastPrint; +exports.recursivePrintBucket = recursivePrintBucket; +exports.printStore = printStore; +exports.grafastColor = grafastColor; +exports.grafastPrint = grafastPrint; +exports.ansiPad = ansiPad; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const executeBucket_js_1 = require("./engine/executeBucket.js"); +const OutputPlan_js_1 = require("./engine/OutputPlan.js"); +const inspect_js_1 = require("./inspect.js"); +const step_js_1 = require("./step.js"); +const stripAnsi_js_1 = require("./stripAnsi.js"); +const utils_js_1 = require("./utils.js"); +/* + * This file contains utilities used with the `debug` module primarily (but + * also used elsewhere) that are useful for outputting Grafast stuff in a + * more helpful way - typically with more relevant detail and colours to help + * you (me) digest things. + */ +const COLORS = [ + //chalk.black, + chalk_1.default.yellow, + chalk_1.default.magenta, + //chalk.cyan, + chalk_1.default.red, + //chalk.white, + //chalk.blackBright, + chalk_1.default.greenBright, + chalk_1.default.yellowBright, + chalk_1.default.blueBright, + chalk_1.default.magentaBright, + chalk_1.default.cyanBright, + chalk_1.default.redBright, + chalk_1.default.blue, + chalk_1.default.green, + //chalk.whiteBright, +]; +const BG_COLORS = [ + // chalk.bgRgb(53, 0, 0), + // chalk.bgRgb(0, 53, 0), + // chalk.bgRgb(0, 0, 53), + chalk_1.default.visible, + chalk_1.default.underline, +]; +function _grafastPrint(symbol, seen) { + if ((0, utils_js_1.isDeferred)(symbol)) { + return chalk_1.default.gray ``; + } + if ((0, utils_js_1.isPromise)(symbol)) { + return chalk_1.default.gray ``; + } + if (symbol === utils_js_1.ROOT_VALUE_OBJECT) { + return chalk_1.default.gray `(blank)`; + } + if (symbol instanceof step_js_1.Step) { + return String(symbol); + } + if (Array.isArray(symbol)) { + if (seen.has(symbol)) { + return chalk_1.default.gray `(loop)`; + } + seen.add(symbol); + return `[${symbol + .map((value, i) => BG_COLORS[i % BG_COLORS.length](_grafastPrint(value, new Set(seen)))) + .join(", ")}]`; + } + if (symbol instanceof Map) { + if (seen.has(symbol)) { + return chalk_1.default.gray `(loop)`; + } + seen.add(symbol); + const pairs = []; + let i = 0; + for (const [key, value] of symbol.entries()) { + pairs.push(BG_COLORS[i % BG_COLORS.length](`${_grafastPrint(key, new Set(seen))}: ${_grafastPrint(value, new Set(seen))}`)); + i++; + } + return `Map{${pairs.join(", ")}}`; + } + if (isBucket(symbol)) { + return recursivePrintBucket(symbol); + } + if (typeof symbol === "object" && symbol) { + if (symbol instanceof Error) { + return chalk_1.default.red(`ERROR<${(0, stripAnsi_js_1.stripAnsi)(String(symbol.message)) + .replace(/\s+/g, " ") + .substring(0, 30) + "..."}>`); + } + if (symbol instanceof OutputPlan_js_1.OutputPlan) { + return symbol.print(); + } + if (![null, Object.prototype, utils_js_1.sharedNull].includes(Object.getPrototypeOf(symbol))) { + return chalk_1.default.red(`OBJECT<${(0, stripAnsi_js_1.stripAnsi)(String(symbol))}>`); + } + if (seen.has(symbol)) { + return chalk_1.default.gray `(loop)`; + } + seen.add(symbol); + return `{${[...Object.keys(symbol), ...Object.getOwnPropertySymbols(symbol)] + .map((key, i) => BG_COLORS[i % BG_COLORS.length](`${_grafastPrint(key, new Set(seen))}: ${_grafastPrint(symbol[key], new Set(seen))}`)) + .join(", ")}}`; + } + if (typeof symbol !== "symbol") { + return (0, inspect_js_1.inspect)(symbol, { colors: true }); + } + return grafastPrintSymbol(symbol); +} +function isBucket(thing) { + return (typeof thing === "object" && + thing !== null && + thing.toString === executeBucket_js_1.bucketToString); +} +function _grafastSymbolDescription(symbol) { + if (!symbol.description) { + return chalk_1.default.green("Symbol()"); + } + const nStr = symbol.description?.replace(/[^0-9]/g, "") || ""; + const n = parseInt(nStr, 10) || 0; + if (n > 0) { + return grafastColor(symbol.description, n); + } + else { + return chalk_1.default.cyan(`$$${symbol.description}`); + } +} +function indent(level, string) { + return " ".repeat(level) + string.replace(/\n/g, `\n${" ".repeat(level)}`); +} +function recursivePrintBucket(bucket, indentLevel = 0) { + return indent(indentLevel, `Bucket for ${bucket.layerPlan} (size = ${bucket.size}): + Store: +${indent(4, printStore(bucket))} + Children: +${Object.entries(bucket.children) + .map(([_id, { bucket }]) => indent(4, recursivePrintBucket(bucket))) + .join("\n")}`); +} +const PRINT_STORE_INSPECT_OPTIONS = { + colors: true, + depth: 0, + showHidden: false, + maxArrayLength: 5, + maxStringLength: 50, +}; +function indentIfMultiline(string) { + if (string.includes("\n")) { + return indent(4, "\n" + string); + } + else { + return string; + } +} +function printStore(bucket) { + const output = []; + for (const [key, val] of bucket.store) { + const printKey = String(key).padStart(3, " "); + if (bucket.layerPlan.copyStepIds.includes(key)) { + output.push(`${printKey} (copy)`); + } + else if (val.isBatch) { + const step = bucket.layerPlan.operationPlan.stepTracker.getStepById(key, true); + output.push(`${printKey} (BATCH): ${step ?? "-"}\n${indent(2, val.entries + .map((e, i) => `${String(i).padStart(3, " ")}: flags=${String(val._flagsAt(i)).padStart(2, " ")} value=${indentIfMultiline((0, inspect_js_1.inspect)(val.at(i), PRINT_STORE_INSPECT_OPTIONS))}`) + .join("\n"))}`); + } + else { + const step = bucket.layerPlan.operationPlan.stepTracker.getStepById(key, true); + output.push(`${printKey} (UNARY/${String(val._entryFlags).padStart(2, " ")}) ${step ?? "-"}\n${indent(4, (0, inspect_js_1.inspect)(val.value, PRINT_STORE_INSPECT_OPTIONS))}`); + } + } + return output.join("\n") || "EMPTY"; +} +function grafastColor(text, n) { + const color = COLORS[Math.abs(n) % COLORS.length]; + return color(text); +} +const symbolsByAlias = new Map(); +let symbolClear = null; +/** + * Returns a text description for a symbol that helps differentiate similar + * symbols by keeping track of the symbols/descriptions it has seen and adding + * numeric identifiers to the output. Only tracks symbols over a short period + * so counts will reset very frequently. + */ +function grafastPrintSymbol(symbol) { + const description = _grafastSymbolDescription(symbol); + if (!symbolClear) { + // Only cache symbols for a few milliseconds, we don't want a memory leak! + symbolClear = setTimeout(() => { + symbolClear = null; + symbolsByAlias.clear(); + }, 200); + } + const symbols = symbolsByAlias.get(description); + if (!symbols) { + symbolsByAlias.set(description, [symbol]); + return description; + } + let idx = symbols.indexOf(symbol); + if (idx === 0) { + return description; + } + if (idx < 0) { + idx = symbols.push(symbol) - 1; + } + return `${description}${chalk_1.default.gray(`:${idx + 1}`)}`; +} +/** + * Prints something grafast-style (i.e. concise, coloured, with helpful detail) + */ +function grafastPrint(symbol) { + return _grafastPrint(symbol, new Set()); +} +/** + * An ANSI-aware pad function; strips ANSI sequences from the string, figures + * out how much it needs to pad it by, and then pads the original string by + * that amount. + */ +function ansiPad(ansiString, targetLength, fill, position) { + const string = (0, stripAnsi_js_1.stripAnsi)(ansiString); + const fillLength = targetLength - string.length; + if (fillLength >= 0) { + const fillString = fill.repeat(fillLength); + if (position === "start") { + return fillString + ansiString; + } + else { + return ansiString + fillString; + } + } + else { + return ansiString; + } +} +//# sourceMappingURL=grafastPrint.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/grafastPrint.js.map b/grafast/grafast/dist/grafastPrint.js.map new file mode 100644 index 0000000000..670568d236 --- /dev/null +++ b/grafast/grafast/dist/grafastPrint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"grafastPrint.js","sourceRoot":"","sources":["../src/grafastPrint.ts"],"names":[],"mappings":";;AAiDA,sCAyFC;AA2BD,oDAWC;AAkBD,gCAuCC;AAED,oCAGC;AAsCD,oCAIC;AAOD,0BAkBC;;AAjTD,0DAA0B;AAG1B,gEAA2D;AAC3D,0DAAoD;AACpD,6CAAuC;AACvC,uCAAiC;AACjC,iDAA2C;AAC3C,yCAKoB;AAEpB;;;;;GAKG;AAEH,MAAM,MAAM,GAAG;IACb,cAAc;IACd,eAAK,CAAC,MAAM;IACZ,eAAK,CAAC,OAAO;IACb,aAAa;IACb,eAAK,CAAC,GAAG;IACT,cAAc;IACd,oBAAoB;IACpB,eAAK,CAAC,WAAW;IACjB,eAAK,CAAC,YAAY;IAClB,eAAK,CAAC,UAAU;IAChB,eAAK,CAAC,aAAa;IACnB,eAAK,CAAC,UAAU;IAChB,eAAK,CAAC,SAAS;IACf,eAAK,CAAC,IAAI;IACV,eAAK,CAAC,KAAK;IACX,oBAAoB;CACZ,CAAC;AAEX,MAAM,SAAS,GAAG;IAChB,yBAAyB;IACzB,yBAAyB;IACzB,yBAAyB;IACzB,eAAK,CAAC,OAAO;IACb,eAAK,CAAC,SAAS;CACP,CAAC;AAEX,SAAgB,aAAa,CAC3B,MAAwE,EACxE,IAAc;IAEd,IAAI,IAAA,qBAAU,EAAC,MAAM,CAAC,EAAE,CAAC;QACvB,OAAO,eAAK,CAAC,IAAI,CAAA,YAAY,CAAC;IAChC,CAAC;IACD,IAAI,IAAA,oBAAS,EAAC,MAAM,CAAC,EAAE,CAAC;QACtB,OAAO,eAAK,CAAC,IAAI,CAAA,WAAW,CAAC;IAC/B,CAAC;IACD,IAAI,MAAM,KAAK,4BAAiB,EAAE,CAAC;QACjC,OAAO,eAAK,CAAC,IAAI,CAAA,SAAS,CAAC;IAC7B,CAAC;IACD,IAAI,MAAM,YAAY,cAAI,EAAE,CAAC;Q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,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY,CAC1B,MAAqE;IAErE,OAAO,aAAa,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CACrB,UAAkB,EAClB,YAAoB,EACpB,IAAY,EACZ,QAAyB;IAEzB,MAAM,MAAM,GAAG,IAAA,wBAAS,EAAC,UAAU,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,IAAI,UAAU,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YACzB,OAAO,UAAU,GAAG,UAAU,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,UAAU,GAAG,UAAU,CAAC;QACjC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlCollectFields.d.ts b/grafast/grafast/dist/graphqlCollectFields.d.ts new file mode 100644 index 0000000000..7df95cb5e3 --- /dev/null +++ b/grafast/grafast/dist/graphqlCollectFields.d.ts @@ -0,0 +1,10 @@ +import type { DirectiveNode } from "graphql"; +import type { __TrackedValueStep } from "./steps/index.js"; +export declare function evalDirectiveArgDirect(directive: DirectiveNode, argumentName: string, variableValuesStep: __TrackedValueStep, defaultValue: T): T | undefined; +export declare function newSelectionSetDigest(resolverEmulation: boolean): { + label: undefined; + fields: Map; + deferred: undefined; + resolverEmulation: boolean; +}; +//# sourceMappingURL=graphqlCollectFields.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlCollectFields.d.ts.map b/grafast/grafast/dist/graphqlCollectFields.d.ts.map new file mode 100644 index 0000000000..2122d93ecc --- /dev/null +++ b/grafast/grafast/dist/graphqlCollectFields.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"graphqlCollectFields.d.ts","sourceRoot":"","sources":["../src/graphqlCollectFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EAId,MAAM,SAAS,CAAC;AAKjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAmD3D,wBAAgB,sBAAsB,CAAC,CAAC,GAAG,OAAO,EAChD,SAAS,EAAE,aAAa,EACxB,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,CAAC,GACd,CAAC,GAAG,SAAS,CAmCf;AA+FD,wBAAgB,qBAAqB,CAAC,iBAAiB,EAAE,OAAO;;;;;EAO/D"} \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlCollectFields.js b/grafast/grafast/dist/graphqlCollectFields.js new file mode 100644 index 0000000000..27a3348417 --- /dev/null +++ b/grafast/grafast/dist/graphqlCollectFields.js @@ -0,0 +1,228 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.evalDirectiveArg = evalDirectiveArg; +exports.evalDirectiveArgDirect = evalDirectiveArgDirect; +exports.newSelectionSetDigest = newSelectionSetDigest; +exports.graphqlCollectFields = graphqlCollectFields; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const error_js_1 = require("./error.js"); +const { GraphQLError, GraphQLInterfaceType, GraphQLObjectType, GraphQLUnionType, } = graphql; +/** + * Given a selection, finds the first directive named `directiveName`. + * + * @internal + * + * PERF: inline. + */ +function getDirective(selection, directiveName) { + return selection.directives?.find((d) => d.name.value === directiveName); +} +/** + * Given a selection, finds the first directive named `directiveName` and, if + * found, extracts and returns the value from the argument named + * `argumentName`, tracking variable access if necessary. + * + * @remarks Currently only supports booleans. + * + * @internal + * + * PERF: inline. + */ +function evalDirectiveArg(selection, directiveName, argumentName, variableValuesStep, defaultValue) { + const directive = getDirective(selection, directiveName); + if (!directive) + return undefined; + return evalDirectiveArgDirect(directive, argumentName, variableValuesStep, defaultValue); +} +function evalDirectiveArgDirect(directive, argumentName, variableValuesStep, defaultValue) { + if (!directive.arguments) + return defaultValue; + const argument = directive.arguments.find((a) => a.name.value === argumentName); + if (argument !== undefined) { + const value = argument.value; + switch (value.kind) { + case "Variable": { + return variableValuesStep.get(value.name.value).eval(); + } + case "BooleanValue": { + return value.value; + } + case "IntValue": { + return parseInt(value.value, 10); + } + case "FloatValue": { + return parseFloat(value.value); + } + case "StringValue": { + return value.value; + } + case "NullValue": { + return null; + } + default: { + throw new error_js_1.SafeError(`Unsupported @${directive.name}(${argumentName}:) argument; expected Variable, Boolean or null; but received '${value.kind}'`); + } + } + } + else { + return defaultValue; + } +} +/** + * Implements the `DoesFragmentTypeApply` algorithm from the GraphQL + * specification. + * + * @see https://spec.graphql.org/draft/#DoesFragmentTypeApply() + * + * @internal + */ +function graphqlDoesFragmentTypeApply(objectType, fragmentType) { + if (fragmentType instanceof GraphQLObjectType) { + return objectType === fragmentType; + } + else if (fragmentType instanceof GraphQLInterfaceType) { + const interfaces = objectType.getInterfaces(); + return interfaces.includes(fragmentType); + } + else if (fragmentType instanceof GraphQLUnionType) { + const types = fragmentType.getTypes(); + return types.includes(objectType); + } + else { + throw new Error("Invalid call to graphqlDoesFragmentTypeApply"); + } +} +const processFragment = (operationPlan, parentStepId, objectType, isMutation, selectionSetDigest, selection, fragmentSelectionSet, visitedFragments) => { + const trackedVariableValuesStep = operationPlan.trackedVariableValuesStep; + const defer = selection.directives?.find((d) => d.name.value === "defer"); + const deferIf = defer + ? (evalDirectiveArgDirect(defer, "if", trackedVariableValuesStep, true) ?? true) + : undefined; + const label = defer + ? (evalDirectiveArgDirect(defer, "label", trackedVariableValuesStep, null) ?? undefined) + : undefined; + const deferredDigest = deferIf === true + ? { + label, + fields: new Map(), + deferred: undefined, + resolverEmulation: selectionSetDigest.resolverEmulation, + } + : null; + if (deferredDigest !== null) { + if (selectionSetDigest.deferred === undefined) { + selectionSetDigest.deferred = [deferredDigest]; + } + else { + selectionSetDigest.deferred.push(deferredDigest); + } + } + graphqlCollectFields(operationPlan, parentStepId, objectType, fragmentSelectionSet.selections, deferredDigest ?? selectionSetDigest, isMutation, visitedFragments); +}; +function newSelectionSetDigest(resolverEmulation) { + return { + label: undefined, + fields: new Map(), + deferred: undefined, + resolverEmulation, + }; +} +/** + * Implements the `GraphQLCollectFields` algorithm - like `CollectFields` the + * GraphQL spec, but modified such that access to variables is tracked. + * + * @see https://spec.graphql.org/draft/#CollectFields() + * + * @internal + */ +function graphqlCollectFields(operationPlan, parentStepId, objectType, selections, selectionSetDigest, isMutation = false, +// This is significantly faster than an array or a Set +visitedFragments = Object.create(null)) { + // const objectTypeFields = objectType.getFields(); + const trackedVariableValuesStep = operationPlan.trackedVariableValuesStep; + for (let i = 0, l = selections.length; i < l; i++) { + const selection = selections[i]; + if (selection.directives !== undefined) { + if (evalDirectiveArg(selection, "skip", "if", trackedVariableValuesStep, true) === true) { + continue; + } + if (evalDirectiveArg(selection, "include", "if", trackedVariableValuesStep, true) === false) { + continue; + } + } + switch (selection.kind) { + case "Field": { + const field = selection; + const responseKey = field.alias ? field.alias.value : field.name.value; + let groupForResponseKey = selectionSetDigest.fields.get(responseKey); + if (groupForResponseKey === undefined) { + groupForResponseKey = [field]; + selectionSetDigest.fields.set(responseKey, groupForResponseKey); + } + else { + groupForResponseKey.push(field); + } + break; + } + case "FragmentSpread": { + const fragmentSpreadName = selection.name.value; + if (visitedFragments[fragmentSpreadName]) { + continue; + } + const fragment = operationPlan.fragments[fragmentSpreadName]; + // This is forbidden by validation + if (fragment == null) + continue; + const fragmentTypeName = fragment.typeCondition.name.value; + if (fragmentTypeName === objectType.name) { + // No further checks needed + } + else { + const fragmentType = operationPlan.schema.getType(fragmentTypeName); + // This is forbidden by validation + if (!fragmentType) + continue; + if (fragmentType.constructor === GraphQLObjectType || + /* According to validation, this must be the case */ + // !(isInterfaceType(fragmentType) || isUnionType(fragmentType)) || + !graphqlDoesFragmentTypeApply(objectType, fragmentType)) { + continue; + } + } + const fragmentSelectionSet = fragment.selectionSet; + const newVisitedFragments = Object.assign(Object.create(null), visitedFragments); + newVisitedFragments[fragmentSpreadName] = true; + processFragment(operationPlan, parentStepId, objectType, isMutation, selectionSetDigest, selection, fragmentSelectionSet, newVisitedFragments); + break; + } + case "InlineFragment": { + const fragmentTypeAst = selection.typeCondition; + if (fragmentTypeAst != null) { + const fragmentTypeName = fragmentTypeAst.name.value; + if (fragmentTypeName === objectType.name) { + // No further checks required + } + else { + const fragmentType = operationPlan.schema.getType(fragmentTypeName); + // This is forbidden by validation + if (fragmentType == null) { + throw new GraphQLError(`We don't have a type named '${fragmentTypeName}'`); + } + if (fragmentType.constructor === GraphQLObjectType || + /* According to validation, this must be the case */ + // !(isInterfaceType(fragmentType) || isUnionType(fragmentType)) || + !graphqlDoesFragmentTypeApply(objectType, fragmentType)) { + continue; + } + } + } + const fragmentSelectionSet = selection.selectionSet; + processFragment(operationPlan, parentStepId, objectType, isMutation, selectionSetDigest, selection, fragmentSelectionSet, visitedFragments); + break; + } + } + } + return selectionSetDigest; +} +//# sourceMappingURL=graphqlCollectFields.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlCollectFields.js.map b/grafast/grafast/dist/graphqlCollectFields.js.map new file mode 100644 index 0000000000..00ce41a76a --- /dev/null +++ b/grafast/grafast/dist/graphqlCollectFields.js.map @@ -0,0 +1 @@ +{"version":3,"file":"graphqlCollectFields.js","sourceRoot":"","sources":["../src/graphqlCollectFields.ts"],"names":[],"mappings":";;AA4CA,4CAeC;AAED,wDAwCC;AA+FD,sDAOC;AAUD,oDA2JC;;AA1WD,yDAAmC;AAGnC,yCAAuC;AAGvC,MAAM,EACJ,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,GAAG,OAAO,CAAC;AAEZ;;;;;;GAM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phqlMergeSelectionSets.d.ts b/grafast/grafast/dist/graphqlMergeSelectionSets.d.ts new file mode 100644 index 0000000000..821023b82d --- /dev/null +++ b/grafast/grafast/dist/graphqlMergeSelectionSets.d.ts @@ -0,0 +1,8 @@ +import type { FieldNode, GraphQLObjectType, SelectionNode } from "graphql"; +import type { OperationPlan } from "./index.js"; +/** + * Given a list of polymorphic selections, return a list of the nested field + * selections that apply to the object type `type`. + */ +export declare function fieldSelectionsForType(operationPlan: OperationPlan, type: GraphQLObjectType, selections: ReadonlyArray, result?: Array): ReadonlyArray; +//# sourceMappingURL=graphqlMergeSelectionSets.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlMergeSelectionSets.d.ts.map b/grafast/grafast/dist/graphqlMergeSelectionSets.d.ts.map new file mode 100644 index 0000000000..027f265be3 --- /dev/null +++ b/grafast/grafast/dist/graphqlMergeSelectionSets.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"graphqlMergeSelectionSets.d.ts","sourceRoot":"","sources":["../src/graphqlMergeSelectionSets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EAEjB,aAAa,EACd,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA4BhD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,aAAa,CAAC,aAAa,CAAC,EACxC,MAAM,GAAE,KAAK,CAAC,SAAS,CAAM,GAC5B,aAAa,CAAC,SAAS,CAAC,CAgD1B"} \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlMergeSelectionSets.js b/grafast/grafast/dist/graphqlMergeSelectionSets.js new file mode 100644 index 0000000000..3a35f16b89 --- /dev/null +++ b/grafast/grafast/dist/graphqlMergeSelectionSets.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fieldSelectionsForType = fieldSelectionsForType; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const inspect_js_1 = require("./inspect.js"); +const { Kind } = graphql; +// PERF: this is incredibly inefficient +function typeMatchesCondition(operationPlan, type, condition) { + const name = condition.name.value; + if (type.name === name) { + return true; + } + if (type.getInterfaces().some((i) => i.name === name)) { + return true; + } + if (operationPlan.unionsContainingObjectType[type.name].some((u) => u.name === name)) { + return true; + } + return false; +} +/** + * Given a list of polymorphic selections, return a list of the nested field + * selections that apply to the object type `type`. + */ +function fieldSelectionsForType(operationPlan, type, selections, result = []) { + for (let i = 0, l = selections.length; i < l; i++) { + const selection = selections[i]; + switch (selection.kind) { + case Kind.FRAGMENT_SPREAD: { + // Assumed to exist because query passed validation. + const fragment = operationPlan.fragments[selection.name.value]; + const typeCondition = fragment.typeCondition; + if (typeMatchesCondition(operationPlan, type, typeCondition)) { + fieldSelectionsForType(operationPlan, type, fragment.selectionSet.selections, result); + } + break; + } + case Kind.INLINE_FRAGMENT: { + const typeCondition = selection.typeCondition; + if (!typeCondition || + typeMatchesCondition(operationPlan, type, typeCondition)) { + fieldSelectionsForType(operationPlan, type, selection.selectionSet.selections, result); + } + break; + } + case Kind.FIELD: { + result.push(selection); + break; + } + default: { + const never = selection; + throw new Error(`GrafastInternalError<10b01e35-cf2b-4f48-9c66-486cdef00323>: cannot process selection '${(0, inspect_js_1.inspect)(never)}'`); + } + } + } + return result; +} +//# sourceMappingURL=graphqlMergeSelectionSets.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/graphqlMergeSelectionSets.js.map b/grafast/grafast/dist/graphqlMergeSelectionSets.js.map new file mode 100644 index 0000000000..d94968facb --- /dev/null +++ b/grafast/grafast/dist/graphqlMergeSelectionSets.js.map @@ -0,0 +1 @@ +{"version":3,"file":"graphqlMergeSelectionSets.js","sourceRoot":"","sources":["../src/graphqlMergeSelectionSets.ts"],"names":[],"mappings":";;AAwCA,wDAqDC;;AAvFD,yDAAm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B,CAAC,aAAa,EAAE,IAAI,EAAE,aAAa,CAAC,EAAE,CAAC;oBAC7D,sBAAsB,CACpB,aAAa,EACb,IAAI,EACJ,QAAQ,CAAC,YAAY,CAAC,UAAU,EAChC,MAAM,CACP,CAAC;gBACJ,CAAC;gBACD,MAAM;YACR,CAAC;YACD,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;gBAC1B,MAAM,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC;gBAC9C,IACE,CAAC,aAAa;oBACd,oBAAoB,CAAC,aAAa,EAAE,IAAI,EAAE,aAAa,CAAC,EACxD,CAAC;oBACD,sBAAsB,CACpB,aAAa,EACb,IAAI,EACJ,SAAS,CAAC,YAAY,CAAC,UAAU,EACjC,MAAM,CACP,CAAC;gBACJ,CAAC;gBACD,MAAM;YACR,CAAC;YACD,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBACvB,MAAM;YACR,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,KAAK,GAAU,SAAS,CAAC;gBAC/B,MAAM,IAAI,KAAK,CACb,yFAAyF,IAAA,oBAAO,EAC9F,KAAK,CACN,GAAG,CACL,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/index.d.ts b/grafast/grafast/dist/index.d.ts new file mode 100644 index 0000000000..32b356ab34 --- /dev/null +++ b/grafast/grafast/dist/index.d.ts @@ -0,0 +1,201 @@ +import "./thereCanBeOnlyOne.js"; +import type LRU from "@graphile/lru"; +import type { MiddlewareHandlers } from "graphile-config"; +import type { DocumentNode, GraphQLError, OperationDefinitionNode } from "graphql"; +import type { DataFromObjectSteps } from "./steps/object.js"; +type PromiseOrValue = T | Promise; +import { exportAs, exportAsMany } from "./exportAs.js"; +import { grafastPrint } from "./grafastPrint.js"; +import { EnumPlans, FieldPlans, GrafastPlans, InputObjectPlans, InterfaceOrUnionPlans, makeGrafastSchema, ObjectPlans, ScalarPlans } from "./makeGrafastSchema.js"; +import { defer, Deferred } from "./deferred.js"; +import { isDev, noop } from "./dev.js"; +import { defaultPlanResolver } from "./engine/lib/defaultPlanResolver.js"; +import { isUnaryStep } from "./engine/lib/withGlobalLayerPlan.js"; +import { OperationPlan } from "./engine/OperationPlan.js"; +import { $$inhibit, flagError, isSafeError, SafeError } from "./error.js"; +import { execute } from "./execute.js"; +import { grafast, grafastSync } from "./grafastGraphql.js"; +import type { $$cacheByOperation, $$hooked, $$queryCache, ArgumentApplyPlanResolver, BatchExecutionValue, CacheByOperationEntry, DataFromStep, EnumValueApplyResolver, EstablishOperationPlanEvent, ExecuteEvent, ExecuteStepEvent, ExecutionValue, GrafastExecutionArgs, GrafastTimeouts, InputObjectFieldApplyResolver, InputObjectTypeBakedInfo, InputObjectTypeBakedResolver, ParseAndValidateEvent, PrepareArgsEvent, ScalarInputPlanResolver, UnaryExecutionValue, ValidateSchemaEvent } from "./interfaces.js"; +import { $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$verbatim, BaseEventMap, BaseGraphQLArguments, BaseGraphQLRootValue, BaseGraphQLVariables, EventCallback, EventMapKey, ExecutionDetails, ExecutionDetailsStream, ExecutionEventEmitter, ExecutionEventMap, ExecutionExtra, ExecutionResults, ExecutionResultValue, FieldArg, FieldArgs, FieldInfo, FieldPlanResolver, GrafastArgumentConfig, GrafastFieldConfig, GrafastFieldConfigArgumentMap, GrafastInputFieldConfig, GrafastPlanJSON, GrafastResultsList, GrafastResultStreamList, GrafastSubscriber, GrafastValuesList, JSONArray, JSONObject, JSONValue, Maybe, NodeIdCodec, NodeIdHandler, OutputPlanForType, PolymorphicData, PromiseOrDirect, ScalarPlanResolver, StepOptimizeOptions, StepStreamOptions, TypedEventEmitter, UnbatchedExecutionExtra } from "./interfaces.js"; +import { getGrafastMiddleware } from "./middleware.js"; +import type { Multistep, UnwrapMultistep } from "./multistep.js"; +import { multistep } from "./multistep.js"; +import { getNullableInputTypeAtPath } from "./operationPlan-input.js"; +import { polymorphicWrap } from "./polymorphic.js"; +import { assertExecutableStep, assertListCapableStep, assertStep, isExecutableStep, isListCapableStep, isListLikeStep, isObjectLikeStep, isStep, ListCapableStep, ListLikeStep, ObjectLikeStep, PolymorphicStep, Step, UnbatchedStep } from "./step.js"; +import { __FlagStep, __InputListStep, __InputObjectStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __TrackedValueStepWithDollars, __ValueStep, access, AccessStep, ActualKeyByDesiredKey, applyInput, ApplyInputStep, applyTransforms, ApplyTransformsStep, assertEdgeCapableStep, assertModifier, assertNotNull, assertPageInfoCapableStep, bakedInput, bakedInputRuntime, BakedInputStep, condition, ConditionStep, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, createObjectAndApplyChildren, debugPlans, each, EdgeCapableStep, EdgeStep, error, ErrorStep, filter, FilterPlanMemo, first, FirstStep, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, inhibitOnNull, isModifier, lambda, LambdaStep, last, LastStep, list, listen, ListenStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, makeDecodeNodeId, makeDecodeNodeIdRuntime, Modifier, node, nodeIdFromNode, NodeStep, object, ObjectPlanMeta, ObjectStep, operationPlan, PageInfoCapableStep, partitionByIndex, polymorphicBranch, PolymorphicBranchMatcher, PolymorphicBranchMatchers, PolymorphicBranchStep, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, rootValue, Setter, setter, SetterCapable, sideEffect, SideEffectStep, specFromNodeId, trackedContext, trackedRootValue, trap, TRAP_ERROR, TRAP_ERROR_OR_INHIBITED, TRAP_INHIBITED } from "./steps/index.js"; +import { stringifyPayload } from "./stringifyPayload.js"; +import { stripAnsi } from "./stripAnsi.js"; +import { subscribe } from "./subscribe.js"; +import { arrayOfLength, arraysMatch, getEnumValueConfig, getEnumValueConfigs, GrafastInputFieldConfigMap, GrafastInputObjectType, GrafastObjectType, inputObjectFieldSpec, InputObjectTypeSpec, isPromiseLike, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, objectFieldSpec, objectSpec, ObjectTypeFields, ObjectTypeSpec, stepADependsOnStepB, stepAMayDependOnStepB, stepsAreInSamePhase } from "./utils.js"; +export { isAsyncIterable } from "iterall"; +export { __FlagStep, __InputListStep, __InputObjectStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __TrackedValueStepWithDollars, __ValueStep, $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$inhibit, $$verbatim, access, AccessStep, ActualKeyByDesiredKey, applyInput, ApplyInputStep, applyTransforms, ApplyTransformsStep, arrayOfLength, arraysMatch, assertEdgeCapableStep, assertExecutableStep, assertListCapableStep, assertModifier, assertNotNull, assertPageInfoCapableStep, assertStep, bakedInput, bakedInputRuntime, BakedInputStep, BaseEventMap, BaseGraphQLArguments, BaseGraphQLRootValue, BaseGraphQLVariables, BatchExecutionValue, condition, ConditionStep, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, createObjectAndApplyChildren, DataFromObjectSteps, DataFromStep, debugPlans, defaultPlanResolver, defer, Deferred, each, EdgeCapableStep, EdgeStep, EnumPlans, error, ErrorStep, EventCallback, EventMapKey, Step as ExecutableStep, execute, ExecutionDetails, ExecutionDetailsStream, ExecutionEventEmitter, ExecutionEventMap, ExecutionExtra, ExecutionResults, ExecutionResultValue, ExecutionValue, exportAs, exportAsMany, FieldArg, FieldArgs, FieldInfo, FieldPlanResolver, FieldPlans, filter, FilterPlanMemo, first, FirstStep, flagError, getEnumValueConfig, getEnumValueConfigs, getGrafastMiddleware, getNullableInputTypeAtPath, grafast, GrafastArgumentConfig, GrafastExecutionArgs, GrafastFieldConfig, GrafastFieldConfigArgumentMap, grafast as grafastGraphql, grafastSync as grafastGraphqlSync, GrafastInputFieldConfig, GrafastInputFieldConfigMap, GrafastInputObjectType, GrafastObjectType, GrafastPlanJSON, GrafastPlans, grafastPrint, GrafastResultsList, GrafastResultStreamList, GrafastSubscriber, grafastSync, GrafastValuesList, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, inhibitOnNull, InputObjectFieldApplyResolver, inputObjectFieldSpec, InputObjectPlans, InputObjectTypeBakedInfo, InputObjectTypeBakedResolver, InputObjectTypeSpec, InterfaceOrUnionPlans, isDev, isExecutableStep, isListCapableStep, isListLikeStep, isModifier, isObjectLikeStep, isPromiseLike, isSafeError, isStep, isUnaryStep, JSONArray, JSONObject, JSONValue, lambda, LambdaStep, last, LastStep, list, ListCapableStep, listen, ListenStep, ListLikeStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, makeDecodeNodeId, makeDecodeNodeIdRuntime, makeGrafastSchema, Maybe, Modifier, Multistep, multistep, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, node, NodeIdCodec, nodeIdFromNode, NodeIdHandler, NodeStep, noop, object, objectFieldSpec, ObjectLikeStep, ObjectPlanMeta, ObjectPlans, objectSpec, ObjectStep, ObjectTypeFields, ObjectTypeSpec, OperationPlan, operationPlan, OutputPlanForType, PageInfoCapableStep, partitionByIndex, polymorphicBranch, PolymorphicBranchMatcher, PolymorphicBranchMatchers, PolymorphicBranchStep, PolymorphicData, PolymorphicStep, polymorphicWrap, PromiseOrDirect, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, rootValue, SafeError, ScalarPlanResolver, ScalarPlans, Setter, setter, SetterCapable, sideEffect, SideEffectStep, specFromNodeId, Step, stepADependsOnStepB, stepAMayDependOnStepB, StepOptimizeOptions, stepsAreInSamePhase, StepStreamOptions, stringifyPayload, stripAnsi, subscribe, trackedContext, trackedRootValue, trap, TRAP_ERROR, TRAP_ERROR_OR_INHIBITED, TRAP_INHIBITED, TypedEventEmitter, UnaryExecutionValue, UnbatchedStep as UnbatchedExecutableStep, UnbatchedExecutionExtra, UnbatchedStep, UnwrapMultistep, }; +export { hookArgs } from "./args.js"; +export { version } from "./version.js"; +/** @deprecated Renamed to 'applyTransforms' */ +export declare const deepEval: typeof applyTransforms; +/** @deprecated Renamed to 'ApplyTransformsStep' */ +export declare const DeepEvalStep: typeof ApplyTransformsStep; +declare global { + namespace Grafast { + type ExecutionArgs = Pick & { + [$$hooked]?: boolean; + contextValue: Grafast.Context; + }; + /** + * Details about the incoming GraphQL request - e.g. if it was sent over an + * HTTP request, the request itself so headers can be interrogated. + * + * It's anticipated this will be expanded via declaration merging, e.g. if + * your server is Koa v2 then `RequestContext.koav2` might be added. + */ + interface RequestContext { + } + /** + * The GraphQL context our schemas expect, generally generated from details in Grafast.RequestContext + */ + interface Context { + } + interface FieldExtensions { + plan?: FieldPlanResolver; + subscribePlan?: FieldPlanResolver; + } + interface ArgumentExtensions { + applyPlan?: ArgumentApplyPlanResolver; + applySubscribePlan?: ArgumentApplyPlanResolver; + inputPlan?: never; + autoApplyAfterParentPlan?: never; + autoApplyAfterParentSubscribePlan?: never; + } + interface InputObjectTypeExtensions { + baked?: InputObjectTypeBakedResolver; + } + interface InputFieldExtensions { + apply?: InputObjectFieldApplyResolver; + inputPlan?: never; + applyPlan?: never; + autoApplyAfterParentInputPlan?: never; + autoApplyAfterParentApplyPlan?: never; + } + interface ObjectTypeExtensions { + assertStep?: ((step: Step) => asserts step is Step) | { + new (...args: any[]): Step; + } | null; + } + interface EnumTypeExtensions { + } + interface EnumValueExtensions { + /** + * EXPERIMENTAL! + * + * @experimental + */ + apply?: EnumValueApplyResolver; + applyPlan?: never; + } + interface ScalarTypeExtensions { + plan?: ScalarPlanResolver; + inputPlan?: ScalarInputPlanResolver; + /** + * Set true if `serialize(serialize(foo)) === serialize(foo)` for all foo + */ + idempotent?: boolean; + } + interface SchemaExtensions { + /** + * Maximum number of queries to store in this schema's query cache. + */ + queryCacheMaxLength?: number; + /** + * The underlying query cache + */ + [$$queryCache]?: LRU>; + /** + * Maximum number of operations to store an operation plan lookup cache for + */ + operationsCacheMaxLength?: number; + /** + * Maximum number of operation plans to store in a single operation's cache + */ + operationOperationPlansCacheMaxLength?: number; + /** + * The starting point for finding/storing the relevant OperationPlan for a request. + */ + [$$cacheByOperation]?: LRU; + } + } + namespace GraphileConfig { + interface GrafastOptions { + /** + * An object to merge into the GraphQL context. Alternatively, pass an + * (optionally asynchronous) function that returns an object to merge into + * the GraphQL context. + */ + context?: Partial | ((ctx: Partial, args: Grafast.ExecutionArgs) => PromiseOrValue>); + /** + * A list of 'explain' types that should be included in `extensions.explain`. + * + * - `plan` will cause the plan JSON to be included + * - other values are dependent on the plugins in play + * + * If set to `true` then all possible explain types will be exposed. + */ + explain?: boolean | string[]; + timeouts?: GrafastTimeouts; + } + interface Preset { + /** + * Options that control how `grafast` should execute your GraphQL + * operations. + */ + grafast?: GraphileConfig.GrafastOptions; + } + interface GrafastMiddleware { + /** Synchronous! */ + validateSchema(event: ValidateSchemaEvent): readonly GraphQLError[]; + /** Synchronous! */ + parseAndValidate(event: ParseAndValidateEvent): DocumentNode | readonly GraphQLError[]; + prepareArgs(event: PrepareArgsEvent): PromiseOrDirect; + execute(event: ExecuteEvent): ReturnType; + subscribe(event: ExecuteEvent): ReturnType; + /** Synchronous! */ + establishOperationPlan(event: EstablishOperationPlanEvent): OperationPlan; + executeStep(event: ExecuteStepEvent): PromiseOrDirect>; + } + interface Plugin { + grafast?: { + middleware?: MiddlewareHandlers; + }; + } + } +} +declare module "graphql" { + interface GraphQLFieldExtensions<_TSource, _TContext, _TArgs = any> { + grafast?: Grafast.FieldExtensions; + } + interface GraphQLArgumentExtensions { + grafast?: Grafast.ArgumentExtensions; + } + interface GraphQLInputObjectTypeExtensions { + grafast?: Grafast.InputObjectTypeExtensions; + } + interface GraphQLInputFieldExtensions { + grafast?: Grafast.InputFieldExtensions; + } + interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> { + grafast?: Grafast.ObjectTypeExtensions; + } + interface GraphQLEnumTypeExtensions { + grafast?: Grafast.EnumTypeExtensions; + } + interface GraphQLEnumValueExtensions { + grafast?: Grafast.EnumValueExtensions; + } + interface GraphQLScalarTypeExtensions { + grafast?: Grafast.ScalarTypeExtensions; + } + interface GraphQLSchemaExtensions { + grafast?: Grafast.SchemaExtensions; + } +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/index.d.ts.map b/grafast/grafast/dist/index.d.ts.map new file mode 100644 index 0000000000..2fe96d2f2b --- /dev/null +++ b/grafast/grafast/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AAErC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAA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uB;QAC/B,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;KACpC;CACF"} \ No newline at end of file diff --git a/grafast/grafast/dist/index.js b/grafast/grafast/dist/index.js new file mode 100644 index 0000000000..cb9342c00f --- /dev/null +++ b/grafast/grafast/dist/index.js @@ -0,0 +1,328 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.execute = exports.ExecutableStep = exports.ErrorStep = exports.error = exports.EdgeStep = exports.each = exports.defer = exports.defaultPlanResolver = exports.debugPlans = exports.createObjectAndApplyChildren = exports.context = exports.ConstantStep = exports.constant = exports.ConnectionStep = exports.connection = exports.ConditionStep = exports.condition = exports.BakedInputStep = exports.bakedInputRuntime = exports.bakedInput = exports.assertStep = exports.assertPageInfoCapableStep = exports.assertNotNull = exports.assertModifier = exports.assertListCapableStep = exports.assertExecutableStep = exports.assertEdgeCapableStep = exports.arraysMatch = exports.arrayOfLength = exports.ApplyTransformsStep = exports.applyTransforms = exports.ApplyInputStep = exports.applyInput = exports.AccessStep = exports.access = exports.$$verbatim = exports.$$inhibit = exports.$$idempotent = exports.$$extensions = exports.$$eventEmitter = exports.$$bypassGraphQL = exports.__ValueStep = exports.__TrackedValueStep = exports.__ListTransformStep = exports.__ItemStep = exports.__InputStaticLeafStep = exports.__InputObjectStep = exports.__InputListStep = exports.__FlagStep = exports.isAsyncIterable = void 0; +exports.makeGrafastSchema = exports.makeDecodeNodeIdRuntime = exports.makeDecodeNodeId = exports.LoadStep = exports.loadOneCallback = exports.loadOne = exports.loadManyCallback = exports.loadMany = exports.LoadedRecordStep = exports.listTransform = exports.ListStep = exports.ListenStep = exports.listen = exports.list = exports.LastStep = exports.last = exports.LambdaStep = exports.lambda = exports.isUnaryStep = exports.isStep = exports.isSafeError = exports.isPromiseLike = exports.isObjectLikeStep = exports.isModifier = exports.isListLikeStep = exports.isListCapableStep = exports.isExecutableStep = exports.isDev = exports.inputObjectFieldSpec = exports.inhibitOnNull = exports.groupBy = exports.GraphQLResolverStep = exports.graphqlResolver = exports.graphqlItemHandler = exports.GraphQLItemHandler = exports.grafastSync = exports.grafastPrint = exports.grafastGraphqlSync = exports.grafastGraphql = exports.grafast = exports.getNullableInputTypeAtPath = exports.getGrafastMiddleware = exports.getEnumValueConfigs = exports.getEnumValueConfig = exports.flagError = exports.FirstStep = exports.first = exports.filter = exports.exportAsMany = exports.exportAs = void 0; +exports.version = exports.hookArgs = exports.UnbatchedStep = exports.UnbatchedExecutableStep = exports.TRAP_INHIBITED = exports.TRAP_ERROR_OR_INHIBITED = exports.TRAP_ERROR = exports.trap = exports.trackedRootValue = exports.trackedContext = exports.subscribe = exports.stripAnsi = exports.stringifyPayload = exports.stepsAreInSamePhase = exports.stepAMayDependOnStepB = exports.stepADependsOnStepB = exports.Step = exports.specFromNodeId = exports.SideEffectStep = exports.sideEffect = exports.setter = exports.Setter = exports.SafeError = exports.rootValue = exports.ReverseStep = exports.reverseArray = exports.reverse = exports.RemapKeysStep = exports.remapKeys = exports.ProxyStep = exports.proxy = exports.polymorphicWrap = exports.PolymorphicBranchStep = exports.polymorphicBranch = exports.partitionByIndex = exports.operationPlan = exports.OperationPlan = exports.ObjectStep = exports.objectSpec = exports.objectFieldSpec = exports.object = exports.noop = exports.NodeStep = exports.nodeIdFromNode = exports.node = exports.newObjectTypeBuilder = exports.newInputObjectTypeBuilder = exports.newGrafastFieldConfigBuilder = exports.multistep = exports.Modifier = void 0; +exports.DeepEvalStep = exports.deepEval = void 0; +const tslib_1 = require("tslib"); +require("./thereCanBeOnlyOne.js"); +const debug_1 = tslib_1.__importDefault(require("debug")); +const exportAs_js_1 = require("./exportAs.js"); +Object.defineProperty(exports, "exportAs", { enumerable: true, get: function () { return exportAs_js_1.exportAs; } }); +Object.defineProperty(exports, "exportAsMany", { enumerable: true, get: function () { return exportAs_js_1.exportAsMany; } }); +const grafastPrint_js_1 = require("./grafastPrint.js"); +Object.defineProperty(exports, "grafastPrint", { enumerable: true, get: function () { return grafastPrint_js_1.grafastPrint; } }); +const makeGrafastSchema_js_1 = require("./makeGrafastSchema.js"); +Object.defineProperty(exports, "makeGrafastSchema", { enumerable: true, get: function () { return makeGrafastSchema_js_1.makeGrafastSchema; } }); +// HACK: doing this here feels "naughty". +debug_1.default.formatters.c = grafastPrint_js_1.grafastPrint; +const deferred_js_1 = require("./deferred.js"); +Object.defineProperty(exports, "defer", { enumerable: true, get: function () { return deferred_js_1.defer; } }); +// Handy for debugging +const dev_js_1 = require("./dev.js"); +Object.defineProperty(exports, "isDev", { enumerable: true, get: function () { return dev_js_1.isDev; } }); +Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return dev_js_1.noop; } }); +const defaultPlanResolver_js_1 = require("./engine/lib/defaultPlanResolver.js"); +Object.defineProperty(exports, "defaultPlanResolver", { enumerable: true, get: function () { return defaultPlanResolver_js_1.defaultPlanResolver; } }); +const withGlobalLayerPlan_js_1 = require("./engine/lib/withGlobalLayerPlan.js"); +Object.defineProperty(exports, "isUnaryStep", { enumerable: true, get: function () { return withGlobalLayerPlan_js_1.isUnaryStep; } }); +const OperationPlan_js_1 = require("./engine/OperationPlan.js"); +Object.defineProperty(exports, "OperationPlan", { enumerable: true, get: function () { return OperationPlan_js_1.OperationPlan; } }); +const error_js_1 = require("./error.js"); +Object.defineProperty(exports, "$$inhibit", { enumerable: true, get: function () { return error_js_1.$$inhibit; } }); +Object.defineProperty(exports, "flagError", { enumerable: true, get: function () { return error_js_1.flagError; } }); +Object.defineProperty(exports, "isSafeError", { enumerable: true, get: function () { return error_js_1.isSafeError; } }); +Object.defineProperty(exports, "SafeError", { enumerable: true, get: function () { return error_js_1.SafeError; } }); +const execute_js_1 = require("./execute.js"); +Object.defineProperty(exports, "execute", { enumerable: true, get: function () { return execute_js_1.execute; } }); +const grafastGraphql_js_1 = require("./grafastGraphql.js"); +Object.defineProperty(exports, "grafast", { enumerable: true, get: function () { return grafastGraphql_js_1.grafast; } }); +Object.defineProperty(exports, "grafastGraphql", { enumerable: true, get: function () { return grafastGraphql_js_1.grafast; } }); +Object.defineProperty(exports, "grafastGraphqlSync", { enumerable: true, get: function () { return grafastGraphql_js_1.grafastSync; } }); +Object.defineProperty(exports, "grafastSync", { enumerable: true, get: function () { return grafastGraphql_js_1.grafastSync; } }); +const interfaces_js_1 = require("./interfaces.js"); +Object.defineProperty(exports, "$$bypassGraphQL", { enumerable: true, get: function () { return interfaces_js_1.$$bypassGraphQL; } }); +Object.defineProperty(exports, "$$eventEmitter", { enumerable: true, get: function () { return interfaces_js_1.$$eventEmitter; } }); +Object.defineProperty(exports, "$$extensions", { enumerable: true, get: function () { return interfaces_js_1.$$extensions; } }); +Object.defineProperty(exports, "$$idempotent", { enumerable: true, get: function () { return interfaces_js_1.$$idempotent; } }); +Object.defineProperty(exports, "$$verbatim", { enumerable: true, get: function () { return interfaces_js_1.$$verbatim; } }); +const middleware_js_1 = require("./middleware.js"); +Object.defineProperty(exports, "getGrafastMiddleware", { enumerable: true, get: function () { return middleware_js_1.getGrafastMiddleware; } }); +const multistep_js_1 = require("./multistep.js"); +Object.defineProperty(exports, "multistep", { enumerable: true, get: function () { return multistep_js_1.multistep; } }); +const operationPlan_input_js_1 = require("./operationPlan-input.js"); +Object.defineProperty(exports, "getNullableInputTypeAtPath", { enumerable: true, get: function () { return operationPlan_input_js_1.getNullableInputTypeAtPath; } }); +const polymorphic_js_1 = require("./polymorphic.js"); +Object.defineProperty(exports, "polymorphicWrap", { enumerable: true, get: function () { return polymorphic_js_1.polymorphicWrap; } }); +const step_js_1 = require("./step.js"); +Object.defineProperty(exports, "assertExecutableStep", { enumerable: true, get: function () { return step_js_1.assertExecutableStep; } }); +Object.defineProperty(exports, "assertListCapableStep", { enumerable: true, get: function () { return step_js_1.assertListCapableStep; } }); +Object.defineProperty(exports, "assertStep", { enumerable: true, get: function () { return step_js_1.assertStep; } }); +Object.defineProperty(exports, "isExecutableStep", { enumerable: true, get: function () { return step_js_1.isExecutableStep; } }); +Object.defineProperty(exports, "isListCapableStep", { enumerable: true, get: function () { return step_js_1.isListCapableStep; } }); +Object.defineProperty(exports, "isListLikeStep", { enumerable: true, get: function () { return step_js_1.isListLikeStep; } }); +Object.defineProperty(exports, "isObjectLikeStep", { enumerable: true, get: function () { return step_js_1.isObjectLikeStep; } }); +Object.defineProperty(exports, "isStep", { enumerable: true, get: function () { return step_js_1.isStep; } }); +Object.defineProperty(exports, "ExecutableStep", { enumerable: true, get: function () { return step_js_1.Step; } }); +Object.defineProperty(exports, "Step", { enumerable: true, get: function () { return step_js_1.Step; } }); +Object.defineProperty(exports, "UnbatchedExecutableStep", { enumerable: true, get: function () { return step_js_1.UnbatchedStep; } }); +Object.defineProperty(exports, "UnbatchedStep", { enumerable: true, get: function () { return step_js_1.UnbatchedStep; } }); +const index_js_1 = require("./steps/index.js"); +Object.defineProperty(exports, "__FlagStep", { enumerable: true, get: function () { return index_js_1.__FlagStep; } }); +Object.defineProperty(exports, "__InputListStep", { enumerable: true, get: function () { return index_js_1.__InputListStep; } }); +Object.defineProperty(exports, "__InputObjectStep", { enumerable: true, get: function () { return index_js_1.__InputObjectStep; } }); +Object.defineProperty(exports, "__InputStaticLeafStep", { enumerable: true, get: function () { return index_js_1.__InputStaticLeafStep; } }); +Object.defineProperty(exports, "__ItemStep", { enumerable: true, get: function () { return index_js_1.__ItemStep; } }); +Object.defineProperty(exports, "__ListTransformStep", { enumerable: true, get: function () { return index_js_1.__ListTransformStep; } }); +Object.defineProperty(exports, "__TrackedValueStep", { enumerable: true, get: function () { return index_js_1.__TrackedValueStep; } }); +Object.defineProperty(exports, "__ValueStep", { enumerable: true, get: function () { return index_js_1.__ValueStep; } }); +Object.defineProperty(exports, "access", { enumerable: true, get: function () { return index_js_1.access; } }); +Object.defineProperty(exports, "AccessStep", { enumerable: true, get: function () { return index_js_1.AccessStep; } }); +Object.defineProperty(exports, "applyInput", { enumerable: true, get: function () { return index_js_1.applyInput; } }); +Object.defineProperty(exports, "ApplyInputStep", { enumerable: true, get: function () { return index_js_1.ApplyInputStep; } }); +Object.defineProperty(exports, "applyTransforms", { enumerable: true, get: function () { return index_js_1.applyTransforms; } }); +Object.defineProperty(exports, "ApplyTransformsStep", { enumerable: true, get: function () { return index_js_1.ApplyTransformsStep; } }); +Object.defineProperty(exports, "assertEdgeCapableStep", { enumerable: true, get: function () { return index_js_1.assertEdgeCapableStep; } }); +Object.defineProperty(exports, "assertModifier", { enumerable: true, get: function () { return index_js_1.assertModifier; } }); +Object.defineProperty(exports, "assertNotNull", { enumerable: true, get: function () { return index_js_1.assertNotNull; } }); +Object.defineProperty(exports, "assertPageInfoCapableStep", { enumerable: true, get: function () { return index_js_1.assertPageInfoCapableStep; } }); +Object.defineProperty(exports, "bakedInput", { enumerable: true, get: function () { return index_js_1.bakedInput; } }); +Object.defineProperty(exports, "bakedInputRuntime", { enumerable: true, get: function () { return index_js_1.bakedInputRuntime; } }); +Object.defineProperty(exports, "BakedInputStep", { enumerable: true, get: function () { return index_js_1.BakedInputStep; } }); +Object.defineProperty(exports, "condition", { enumerable: true, get: function () { return index_js_1.condition; } }); +Object.defineProperty(exports, "ConditionStep", { enumerable: true, get: function () { return index_js_1.ConditionStep; } }); +Object.defineProperty(exports, "connection", { enumerable: true, get: function () { return index_js_1.connection; } }); +Object.defineProperty(exports, "ConnectionStep", { enumerable: true, get: function () { return index_js_1.ConnectionStep; } }); +Object.defineProperty(exports, "constant", { enumerable: true, get: function () { return index_js_1.constant; } }); +Object.defineProperty(exports, "ConstantStep", { enumerable: true, get: function () { return index_js_1.ConstantStep; } }); +Object.defineProperty(exports, "context", { enumerable: true, get: function () { return index_js_1.context; } }); +Object.defineProperty(exports, "createObjectAndApplyChildren", { enumerable: true, get: function () { return index_js_1.createObjectAndApplyChildren; } }); +Object.defineProperty(exports, "debugPlans", { enumerable: true, get: function () { return index_js_1.debugPlans; } }); +Object.defineProperty(exports, "each", { enumerable: true, get: function () { return index_js_1.each; } }); +Object.defineProperty(exports, "EdgeStep", { enumerable: true, get: function () { return index_js_1.EdgeStep; } }); +Object.defineProperty(exports, "error", { enumerable: true, get: function () { return index_js_1.error; } }); +Object.defineProperty(exports, "ErrorStep", { enumerable: true, get: function () { return index_js_1.ErrorStep; } }); +Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return index_js_1.filter; } }); +Object.defineProperty(exports, "first", { enumerable: true, get: function () { return index_js_1.first; } }); +Object.defineProperty(exports, "FirstStep", { enumerable: true, get: function () { return index_js_1.FirstStep; } }); +Object.defineProperty(exports, "GraphQLItemHandler", { enumerable: true, get: function () { return index_js_1.GraphQLItemHandler; } }); +Object.defineProperty(exports, "graphqlItemHandler", { enumerable: true, get: function () { return index_js_1.graphqlItemHandler; } }); +Object.defineProperty(exports, "graphqlResolver", { enumerable: true, get: function () { return index_js_1.graphqlResolver; } }); +Object.defineProperty(exports, "GraphQLResolverStep", { enumerable: true, get: function () { return index_js_1.GraphQLResolverStep; } }); +Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return index_js_1.groupBy; } }); +Object.defineProperty(exports, "inhibitOnNull", { enumerable: true, get: function () { return index_js_1.inhibitOnNull; } }); +Object.defineProperty(exports, "isModifier", { enumerable: true, get: function () { return index_js_1.isModifier; } }); +Object.defineProperty(exports, "lambda", { enumerable: true, get: function () { return index_js_1.lambda; } }); +Object.defineProperty(exports, "LambdaStep", { enumerable: true, get: function () { return index_js_1.LambdaStep; } }); +Object.defineProperty(exports, "last", { enumerable: true, get: function () { return index_js_1.last; } }); +Object.defineProperty(exports, "LastStep", { enumerable: true, get: function () { return index_js_1.LastStep; } }); +Object.defineProperty(exports, "list", { enumerable: true, get: function () { return index_js_1.list; } }); +Object.defineProperty(exports, "listen", { enumerable: true, get: function () { return index_js_1.listen; } }); +Object.defineProperty(exports, "ListenStep", { enumerable: true, get: function () { return index_js_1.ListenStep; } }); +Object.defineProperty(exports, "ListStep", { enumerable: true, get: function () { return index_js_1.ListStep; } }); +Object.defineProperty(exports, "listTransform", { enumerable: true, get: function () { return index_js_1.listTransform; } }); +Object.defineProperty(exports, "LoadedRecordStep", { enumerable: true, get: function () { return index_js_1.LoadedRecordStep; } }); +Object.defineProperty(exports, "loadMany", { enumerable: true, get: function () { return index_js_1.loadMany; } }); +Object.defineProperty(exports, "loadManyCallback", { enumerable: true, get: function () { return index_js_1.loadManyCallback; } }); +Object.defineProperty(exports, "loadOne", { enumerable: true, get: function () { return index_js_1.loadOne; } }); +Object.defineProperty(exports, "loadOneCallback", { enumerable: true, get: function () { return index_js_1.loadOneCallback; } }); +Object.defineProperty(exports, "LoadStep", { enumerable: true, get: function () { return index_js_1.LoadStep; } }); +Object.defineProperty(exports, "makeDecodeNodeId", { enumerable: true, get: function () { return index_js_1.makeDecodeNodeId; } }); +Object.defineProperty(exports, "makeDecodeNodeIdRuntime", { enumerable: true, get: function () { return index_js_1.makeDecodeNodeIdRuntime; } }); +Object.defineProperty(exports, "Modifier", { enumerable: true, get: function () { return index_js_1.Modifier; } }); +Object.defineProperty(exports, "node", { enumerable: true, get: function () { return index_js_1.node; } }); +Object.defineProperty(exports, "nodeIdFromNode", { enumerable: true, get: function () { return index_js_1.nodeIdFromNode; } }); +Object.defineProperty(exports, "NodeStep", { enumerable: true, get: function () { return index_js_1.NodeStep; } }); +Object.defineProperty(exports, "object", { enumerable: true, get: function () { return index_js_1.object; } }); +Object.defineProperty(exports, "ObjectStep", { enumerable: true, get: function () { return index_js_1.ObjectStep; } }); +Object.defineProperty(exports, "operationPlan", { enumerable: true, get: function () { return index_js_1.operationPlan; } }); +Object.defineProperty(exports, "partitionByIndex", { enumerable: true, get: function () { return index_js_1.partitionByIndex; } }); +Object.defineProperty(exports, "polymorphicBranch", { enumerable: true, get: function () { return index_js_1.polymorphicBranch; } }); +Object.defineProperty(exports, "PolymorphicBranchStep", { enumerable: true, get: function () { return index_js_1.PolymorphicBranchStep; } }); +Object.defineProperty(exports, "proxy", { enumerable: true, get: function () { return index_js_1.proxy; } }); +Object.defineProperty(exports, "ProxyStep", { enumerable: true, get: function () { return index_js_1.ProxyStep; } }); +Object.defineProperty(exports, "remapKeys", { enumerable: true, get: function () { return index_js_1.remapKeys; } }); +Object.defineProperty(exports, "RemapKeysStep", { enumerable: true, get: function () { return index_js_1.RemapKeysStep; } }); +Object.defineProperty(exports, "reverse", { enumerable: true, get: function () { return index_js_1.reverse; } }); +Object.defineProperty(exports, "reverseArray", { enumerable: true, get: function () { return index_js_1.reverseArray; } }); +Object.defineProperty(exports, "ReverseStep", { enumerable: true, get: function () { return index_js_1.ReverseStep; } }); +Object.defineProperty(exports, "rootValue", { enumerable: true, get: function () { return index_js_1.rootValue; } }); +Object.defineProperty(exports, "Setter", { enumerable: true, get: function () { return index_js_1.Setter; } }); +Object.defineProperty(exports, "setter", { enumerable: true, get: function () { return index_js_1.setter; } }); +Object.defineProperty(exports, "sideEffect", { enumerable: true, get: function () { return index_js_1.sideEffect; } }); +Object.defineProperty(exports, "SideEffectStep", { enumerable: true, get: function () { return index_js_1.SideEffectStep; } }); +Object.defineProperty(exports, "specFromNodeId", { enumerable: true, get: function () { return index_js_1.specFromNodeId; } }); +Object.defineProperty(exports, "trackedContext", { enumerable: true, get: function () { return index_js_1.trackedContext; } }); +Object.defineProperty(exports, "trackedRootValue", { enumerable: true, get: function () { return index_js_1.trackedRootValue; } }); +Object.defineProperty(exports, "trap", { enumerable: true, get: function () { return index_js_1.trap; } }); +Object.defineProperty(exports, "TRAP_ERROR", { enumerable: true, get: function () { return index_js_1.TRAP_ERROR; } }); +Object.defineProperty(exports, "TRAP_ERROR_OR_INHIBITED", { enumerable: true, get: function () { return index_js_1.TRAP_ERROR_OR_INHIBITED; } }); +Object.defineProperty(exports, "TRAP_INHIBITED", { enumerable: true, get: function () { return index_js_1.TRAP_INHIBITED; } }); +const stringifyPayload_js_1 = require("./stringifyPayload.js"); +Object.defineProperty(exports, "stringifyPayload", { enumerable: true, get: function () { return stringifyPayload_js_1.stringifyPayload; } }); +const stripAnsi_js_1 = require("./stripAnsi.js"); +Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return stripAnsi_js_1.stripAnsi; } }); +const subscribe_js_1 = require("./subscribe.js"); +Object.defineProperty(exports, "subscribe", { enumerable: true, get: function () { return subscribe_js_1.subscribe; } }); +const utils_js_1 = require("./utils.js"); +Object.defineProperty(exports, "arrayOfLength", { enumerable: true, get: function () { return utils_js_1.arrayOfLength; } }); +Object.defineProperty(exports, "arraysMatch", { enumerable: true, get: function () { return utils_js_1.arraysMatch; } }); +Object.defineProperty(exports, "getEnumValueConfig", { enumerable: true, get: function () { return utils_js_1.getEnumValueConfig; } }); +Object.defineProperty(exports, "getEnumValueConfigs", { enumerable: true, get: function () { return utils_js_1.getEnumValueConfigs; } }); +Object.defineProperty(exports, "inputObjectFieldSpec", { enumerable: true, get: function () { return utils_js_1.inputObjectFieldSpec; } }); +Object.defineProperty(exports, "isPromiseLike", { enumerable: true, get: function () { return utils_js_1.isPromiseLike; } }); +Object.defineProperty(exports, "newGrafastFieldConfigBuilder", { enumerable: true, get: function () { return utils_js_1.newGrafastFieldConfigBuilder; } }); +Object.defineProperty(exports, "newInputObjectTypeBuilder", { enumerable: true, get: function () { return utils_js_1.newInputObjectTypeBuilder; } }); +Object.defineProperty(exports, "newObjectTypeBuilder", { enumerable: true, get: function () { return utils_js_1.newObjectTypeBuilder; } }); +Object.defineProperty(exports, "objectFieldSpec", { enumerable: true, get: function () { return utils_js_1.objectFieldSpec; } }); +Object.defineProperty(exports, "objectSpec", { enumerable: true, get: function () { return utils_js_1.objectSpec; } }); +Object.defineProperty(exports, "stepADependsOnStepB", { enumerable: true, get: function () { return utils_js_1.stepADependsOnStepB; } }); +Object.defineProperty(exports, "stepAMayDependOnStepB", { enumerable: true, get: function () { return utils_js_1.stepAMayDependOnStepB; } }); +Object.defineProperty(exports, "stepsAreInSamePhase", { enumerable: true, get: function () { return utils_js_1.stepsAreInSamePhase; } }); +var iterall_1 = require("iterall"); +Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: function () { return iterall_1.isAsyncIterable; } }); +(0, exportAs_js_1.exportAsMany)("grafast", { + exportAs: exportAs_js_1.exportAs, + exportAsMany: exportAs_js_1.exportAsMany, + grafastPrint: grafastPrint_js_1.grafastPrint, + makeGrafastSchema: makeGrafastSchema_js_1.makeGrafastSchema, + OperationPlan: OperationPlan_js_1.OperationPlan, + defer: deferred_js_1.defer, + execute: execute_js_1.execute, + getNullableInputTypeAtPath: operationPlan_input_js_1.getNullableInputTypeAtPath, + getGrafastMiddleware: middleware_js_1.getGrafastMiddleware, + grafast: grafastGraphql_js_1.grafast, + grafastSync: grafastGraphql_js_1.grafastSync, + subscribe: subscribe_js_1.subscribe, + __InputListStep: index_js_1.__InputListStep, + stringifyPayload: stringifyPayload_js_1.stringifyPayload, + __InputObjectStep: index_js_1.__InputObjectStep, + __InputStaticLeafStep: index_js_1.__InputStaticLeafStep, + assertExecutableStep: step_js_1.assertExecutableStep, + assertStep: step_js_1.assertStep, + assertListCapableStep: step_js_1.assertListCapableStep, + assertModifier: index_js_1.assertModifier, + isStep: step_js_1.isStep, + isListCapableStep: step_js_1.isListCapableStep, + isModifier: index_js_1.isModifier, + isObjectLikeStep: step_js_1.isObjectLikeStep, + isListLikeStep: step_js_1.isListLikeStep, + __ItemStep: index_js_1.__ItemStep, + __ListTransformStep: index_js_1.__ListTransformStep, + __TrackedValueStep: index_js_1.__TrackedValueStep, + __ValueStep: index_js_1.__ValueStep, + access: index_js_1.access, + AccessStep: index_js_1.AccessStep, + applyInput: index_js_1.applyInput, + ApplyInputStep: index_js_1.ApplyInputStep, + bakedInput: index_js_1.bakedInput, + bakedInputRuntime: index_js_1.bakedInputRuntime, + BakedInputStep: index_js_1.BakedInputStep, + operationPlan: index_js_1.operationPlan, + connection: index_js_1.connection, + assertEdgeCapableStep: index_js_1.assertEdgeCapableStep, + assertPageInfoCapableStep: index_js_1.assertPageInfoCapableStep, + ConnectionStep: index_js_1.ConnectionStep, + EdgeStep: index_js_1.EdgeStep, + condition: index_js_1.condition, + ConditionStep: index_js_1.ConditionStep, + constant: index_js_1.constant, + ConstantStep: index_js_1.ConstantStep, + context: index_js_1.context, + rootValue: index_js_1.rootValue, + trackedContext: index_js_1.trackedContext, + trackedRootValue: index_js_1.trackedRootValue, + inhibitOnNull: index_js_1.inhibitOnNull, + assertNotNull: index_js_1.assertNotNull, + trap: index_js_1.trap, + __FlagStep: index_js_1.__FlagStep, + TRAP_ERROR: index_js_1.TRAP_ERROR, + TRAP_ERROR_OR_INHIBITED: index_js_1.TRAP_ERROR_OR_INHIBITED, + TRAP_INHIBITED: index_js_1.TRAP_INHIBITED, + debugPlans: index_js_1.debugPlans, + each: index_js_1.each, + error: index_js_1.error, + ErrorStep: index_js_1.ErrorStep, + groupBy: index_js_1.groupBy, + filter: index_js_1.filter, + partitionByIndex: index_js_1.partitionByIndex, + listTransform: index_js_1.listTransform, + first: index_js_1.first, + node: index_js_1.node, + specFromNodeId: index_js_1.specFromNodeId, + nodeIdFromNode: index_js_1.nodeIdFromNode, + polymorphicBranch: index_js_1.polymorphicBranch, + PolymorphicBranchStep: index_js_1.PolymorphicBranchStep, + makeDecodeNodeId: index_js_1.makeDecodeNodeId, + makeDecodeNodeIdRuntime: index_js_1.makeDecodeNodeIdRuntime, + proxy: index_js_1.proxy, + applyTransforms: index_js_1.applyTransforms, + ApplyTransformsStep: index_js_1.ApplyTransformsStep, + ProxyStep: index_js_1.ProxyStep, + graphqlResolver: index_js_1.graphqlResolver, + GraphQLResolverStep: index_js_1.GraphQLResolverStep, + GraphQLItemHandler: index_js_1.GraphQLItemHandler, + graphqlItemHandler: index_js_1.graphqlItemHandler, + NodeStep: index_js_1.NodeStep, + FirstStep: index_js_1.FirstStep, + last: index_js_1.last, + LastStep: index_js_1.LastStep, + lambda: index_js_1.lambda, + LambdaStep: index_js_1.LambdaStep, + sideEffect: index_js_1.sideEffect, + SideEffectStep: index_js_1.SideEffectStep, + list: index_js_1.list, + ListStep: index_js_1.ListStep, + remapKeys: index_js_1.remapKeys, + RemapKeysStep: index_js_1.RemapKeysStep, + object: index_js_1.object, + ObjectStep: index_js_1.ObjectStep, + reverse: index_js_1.reverse, + reverseArray: index_js_1.reverseArray, + ReverseStep: index_js_1.ReverseStep, + setter: index_js_1.setter, + createObjectAndApplyChildren: index_js_1.createObjectAndApplyChildren, + Setter: index_js_1.Setter, + listen: index_js_1.listen, + ListenStep: index_js_1.ListenStep, + polymorphicWrap: polymorphic_js_1.polymorphicWrap, + stripAnsi: stripAnsi_js_1.stripAnsi, + arraysMatch: utils_js_1.arraysMatch, + inputObjectFieldSpec: utils_js_1.inputObjectFieldSpec, + newGrafastFieldConfigBuilder: utils_js_1.newGrafastFieldConfigBuilder, + newInputObjectTypeBuilder: utils_js_1.newInputObjectTypeBuilder, + newObjectTypeBuilder: utils_js_1.newObjectTypeBuilder, + objectFieldSpec: utils_js_1.objectFieldSpec, + objectSpec: utils_js_1.objectSpec, + arrayOfLength: utils_js_1.arrayOfLength, + stepADependsOnStepB: utils_js_1.stepADependsOnStepB, + stepAMayDependOnStepB: utils_js_1.stepAMayDependOnStepB, + stepsAreInSamePhase: utils_js_1.stepsAreInSamePhase, + isPromiseLike: utils_js_1.isPromiseLike, + isDev: dev_js_1.isDev, + noop: dev_js_1.noop, + getEnumValueConfig: utils_js_1.getEnumValueConfig, + getEnumValueConfigs: utils_js_1.getEnumValueConfigs, + loadOne: index_js_1.loadOne, + loadMany: index_js_1.loadMany, + loadOneCallback: index_js_1.loadOneCallback, + loadManyCallback: index_js_1.loadManyCallback, + LoadedRecordStep: index_js_1.LoadedRecordStep, + LoadStep: index_js_1.LoadStep, + isSafeError: error_js_1.isSafeError, + $$inhibit: error_js_1.$$inhibit, + flagError: error_js_1.flagError, + SafeError: error_js_1.SafeError, + isUnaryStep: withGlobalLayerPlan_js_1.isUnaryStep, + defaultPlanResolver: defaultPlanResolver_js_1.defaultPlanResolver, + multistep: multistep_js_1.multistep, +}); +var args_js_1 = require("./args.js"); +Object.defineProperty(exports, "hookArgs", { enumerable: true, get: function () { return args_js_1.hookArgs; } }); +var version_js_1 = require("./version.js"); +Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_js_1.version; } }); +/** @deprecated Renamed to 'applyTransforms' */ +exports.deepEval = index_js_1.applyTransforms; +/** @deprecated Renamed to 'ApplyTransformsStep' */ +exports.DeepEvalStep = index_js_1.ApplyTransformsStep; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/index.js.map b/grafast/grafast/dist/index.js.map new file mode 100644 index 0000000000..3f8a57b1a0 --- /dev/null +++ b/grafast/grafast/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,kCAAgC;AAGhC,0DAAiC;AAajC,+CAAuD;AAwUrD,yFAxUO,sBAAQ,OAwUP;AACR,6FAzUiB,0BAAY,OAyUjB;AAxUd,uDAAiD;AAoW/C,6FApWO,8BAAY,OAoWP;AAnWd,iEASgC;AAoZ9B,kGAvZA,wCAAiB,OAuZA;AAlZnB,yCAAyC;AACzC,eAAY,CAAC,UAAU,CAAC,CAAC,GAAG,8BAAY,CAAC;AAEzC,+CAAgD;AAoS9C,sFApSO,mBAAK,OAoSP;AAnSP,sBAAsB;AACtB,qCAAuC;AAuWrC,sFAvWO,cAAK,OAuWP;AAmDL,qFA1Zc,aAAI,OA0Zd;AAzZN,gFAA0E;AAgSxE,oGAhSO,4CAAmB,OAgSP;AA/RrB,gFAAkE;AA8WhE,4FA9WO,oCAAW,OA8WP;AA7Wb,gEAA0D;AAiaxD,8FAjaO,gCAAa,OAiaP;AAhaf,yCAA0E;AAuPxE,0FAvPO,oBAAS,OAuPP;AAsET,0FA7TkB,oBAAS,OA6TlB;AA6CT,4FA1W6B,sBAAW,OA0W7B;AA2EX,0FArb0C,oBAAS,OAqb1C;AApbX,6CAAuC;AAwSrC,wFAxSO,oBAAO,OAwSP;AAvST,2DAA2D;AAgUzD,wFAhUO,2BAAO,OAgUP;AAKI,+FArUJ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IACR,WAAW,EAAX,sBAAW;IACX,SAAS,EAAT,oBAAS;IACT,SAAS,EAAT,oBAAS;IACT,SAAS,EAAT,oBAAS;IACT,WAAW,EAAX,oCAAW;IACX,mBAAmB,EAAnB,4CAAmB;IACnB,SAAS,EAAT,wBAAS;CACV,CAAC,CAAC;AAEH,qCAAqC;AAA5B,mGAAA,QAAQ,OAAA;AACjB,2CAAuC;AAA9B,qGAAA,OAAO,OAAA;AAEhB,+CAA+C;AAClC,QAAA,QAAQ,GAAG,0BAAe,CAAC;AACxC,mDAAmD;AACtC,QAAA,YAAY,GAAG,8BAAmB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/input.d.ts b/grafast/grafast/dist/input.d.ts new file mode 100644 index 0000000000..ed6ec84ca3 --- /dev/null +++ b/grafast/grafast/dist/input.d.ts @@ -0,0 +1,6 @@ +import type { GraphQLType, ListTypeNode, NamedTypeNode, NonNullTypeNode } from "graphql"; +import type { OperationPlan } from "./engine/OperationPlan.js"; +import type { AnyInputStep } from "./interfaces.js"; +export declare function assertInputStep(itemPlan: unknown): asserts itemPlan is AnyInputStep; +export declare function graphqlGetTypeForNode(operationPlan: OperationPlan, node: NamedTypeNode | ListTypeNode | NonNullTypeNode): GraphQLType; +//# sourceMappingURL=input.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/input.d.ts.map b/grafast/grafast/dist/input.d.ts.map new file mode 100644 index 0000000000..037c6e9820 --- /dev/null +++ b/grafast/grafast/dist/input.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,eAAe,EAEhB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4BpD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,YAAY,CAMlC;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,aAAa,GAAG,YAAY,GAAG,eAAe,GACnD,WAAW,CAwBb"} \ No newline at end of file diff --git a/grafast/grafast/dist/input.js b/grafast/grafast/dist/input.js new file mode 100644 index 0000000000..84362513ed --- /dev/null +++ b/grafast/grafast/dist/input.js @@ -0,0 +1,206 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertInputStep = assertInputStep; +exports.graphqlGetTypeForNode = graphqlGetTypeForNode; +exports.inputStep = inputStep; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const inspect_js_1 = require("./inspect.js"); +const __inputDefault_js_1 = require("./steps/__inputDefault.js"); +const __inputDynamicScalar_js_1 = require("./steps/__inputDynamicScalar.js"); +const __inputObject_js_1 = require("./steps/__inputObject.js"); +const index_js_1 = require("./steps/index.js"); +const utils_js_1 = require("./utils.js"); +const { assertScalarType, GraphQLError, GraphQLList, GraphQLNonNull, isInputType, isLeafType, isInputObjectType, Kind, } = graphql; +function assertInputStep(itemPlan) { + if (itemPlan instanceof index_js_1.__TrackedValueStep) + return; + if (itemPlan instanceof index_js_1.__InputListStep) + return; + if (itemPlan instanceof index_js_1.__InputStaticLeafStep) + return; + if (itemPlan instanceof __inputObject_js_1.__InputObjectStep) + return; + throw new Error(`Expected an InputStep, but found ${itemPlan}`); +} +function graphqlGetTypeForNode(operationPlan, node) { + switch (node.kind) { + case Kind.NAMED_TYPE: { + const type = operationPlan.schema.getType(node.name.value); + if (!type) { + // Should not happen since the GraphQL operation has already been + // validated against the schema. + throw new Error(`Could not find type with name '${node.name.value}' in the schema`); + } + return type; + } + case Kind.LIST_TYPE: + return new GraphQLList(graphqlGetTypeForNode(operationPlan, node.type)); + case Kind.NON_NULL_TYPE: + return new GraphQLNonNull(graphqlGetTypeForNode(operationPlan, node.type)); + default: { + const never = node; + throw new Error(`Unknown node kind; node: ${(0, inspect_js_1.inspect)(never)}`); + } + } +} +/** + * Returns a plan for the given `rawInputValue` AST node which could be a + * variable or a literal, and could be nested so that a variable (or more than + * one) appears somewhere. More than one plan may be created. + * + * @internal + */ +function inputStep(operationPlan, inputType, inputValue, defaultValue = undefined) { + const { valueNodeToStaticValueCache } = operationPlan; + if (inputValue === undefined) { + // Definitely can't be or contain a variable! + if (defaultValue === undefined) { + return (0, index_js_1.constant)(undefined); + } + else { + return valueNodeToCachedStaticValueConstantStep(valueNodeToStaticValueCache, defaultValue, inputType); + } + } + const isObj = isInputObjectType(inputType); + if (inputValue.kind === "Variable") { + // Note: this is the only other place where `defaultValue` might be used + // we know `inputValue` is not a variable. + const variableName = inputValue.name.value; + const variableDefinition = operationPlan.operation.variableDefinitions?.find((def) => def.variable.name.value === variableName); + if (!variableDefinition) { + // Should not happen since the GraphQL operation has already been + // validated. + throw new Error(`No definition for variable '${variableName}' found`); + } + const variableType = graphqlGetTypeForNode(operationPlan, variableDefinition.type); + if (!isInputType(variableType)) { + throw new Error(`Expected varible type to be an input type`); + } + const variableWillDefinitelyBeSet = variableType instanceof GraphQLNonNull || + variableDefinition.defaultValue != null; + return inputVariablePlan(operationPlan, variableName, variableType, inputType, defaultValue, variableWillDefinitelyBeSet); + } + else if (inputType instanceof GraphQLNonNull) { + const innerType = inputType.ofType; + if (inputValue.kind === Kind.NULL) { + throw new Error(`Null found in non-null position; this should have been prevented by validation.`); + } + const valuePlan = inputStep(operationPlan, innerType, inputValue, undefined); + return inputNonNullPlan(operationPlan, valuePlan); + } + else if (inputValue.kind === Kind.NULL) { + return (0, index_js_1.constant)(null); + } + else if (inputType instanceof GraphQLList) { + const variableNames = new Set(); + (0, utils_js_1.findVariableNamesUsedInValueNode)(inputValue, variableNames); + if (variableNames.size === 0) { + return valueNodeToCachedStaticValueConstantStep(valueNodeToStaticValueCache, inputValue, inputType); + } + return new index_js_1.__InputListStep(inputType, inputValue); + } + else if (isLeafType(inputType)) { + if (inputValue?.kind === Kind.OBJECT || inputValue?.kind === Kind.LIST) { + const scalarType = assertScalarType(inputType); + return new __inputDynamicScalar_js_1.__InputDynamicScalarStep(scalarType, inputValue); + } + else { + // Variable is already ruled out, so it must be one of: Kind.INT | Kind.FLOAT | Kind.STRING | Kind.BOOLEAN | Kind.NULL | Kind.ENUM + // none of which can contain a variable: + return new index_js_1.__InputStaticLeafStep(inputType, inputValue); + } + } + else if (isObj) { + return new __inputObject_js_1.__InputObjectStep(inputType, inputValue); + } + else { + const never = inputType; + throw new Error(`Unsupported type in inputPlan: '${(0, inspect_js_1.inspect)(never)}'`); + } +} +function doTypesMatch(variableType, expectedType) { + if (variableType instanceof GraphQLNonNull && + expectedType instanceof GraphQLNonNull) { + return doTypesMatch(variableType.ofType, expectedType.ofType); + } + else if (variableType instanceof GraphQLNonNull) { + // Variable is stricter than input type, that's fine + return doTypesMatch(variableType.ofType, expectedType); + } + else if (variableType instanceof GraphQLList && + expectedType instanceof GraphQLList) { + return doTypesMatch(variableType.ofType, expectedType.ofType); + } + else { + return variableType === expectedType; + } +} +/** + * Returns a step representing a variable's value. + * + * @param operationPlan - + * @param variableName - + * @param variableType - + * @param inputType - + * @param defaultValue - + * @param variableWillDefinitelyBeSet - If `true` the variable is either + * non-null _or_ it has a default value (including null). In this case, the + * variable will never be `undefined` and thus an input position's defaultValue + * will never be invoked where it is used. + */ +function inputVariablePlan(operationPlan, variableName, variableType, inputType, defaultValue, variableWillDefinitelyBeSet) { + if (variableType instanceof GraphQLNonNull && + !(inputType instanceof GraphQLNonNull)) { + const unwrappedVariableType = variableType.ofType; + return inputVariablePlan(operationPlan, variableName, unwrappedVariableType, inputType, defaultValue, variableWillDefinitelyBeSet); + } + const typesMatch = doTypesMatch(variableType, inputType); + if (!typesMatch) { + // REF: https://spec.graphql.org/draft/#IsVariableUsageAllowed() + if (inputType instanceof GraphQLNonNull && + !(variableType instanceof GraphQLNonNull)) { + const variablePlan = inputVariablePlan(operationPlan, variableName, variableType, inputType.ofType, defaultValue, variableWillDefinitelyBeSet); + // TODO: find a way to do this without doing eval. For example: track list of variables that may not be nullish. + if (variablePlan.evalIs(null) || + (!variableWillDefinitelyBeSet && variablePlan.evalIs(undefined))) { + throw new GraphQLError(`Expected non-null value of type ${inputType.ofType.toString()}`); + } + return variablePlan; + } + throw new Error("Expected variable and input types to match"); + } + const $variableValue = operationPlan.trackedVariableValuesStep.get(variableName); + if (defaultValue === undefined) { + // There's no default value and thus the default will not be used; use the variable. + return $variableValue; + } + else if (variableWillDefinitelyBeSet) { + // The variable will DEFINITELY be set (even if it is set to null, possibly + // by a default), so the input position's default value will never apply. + return $variableValue; + } + else { + // Here: + // - the variable is nullable, optional, and has no default value + // - the input position has a default value + // We thus need a step that results in `variableValue === undefined ? defaultValue : variableValue` + const runtimeDefaultValue = (0, utils_js_1.valueNodeToStaticValue)(defaultValue, inputType); + return new __inputDefault_js_1.__InputDefaultStep($variableValue, runtimeDefaultValue); + } +} +/** + * Implements `InputNonNullStep`. + */ +function inputNonNullPlan(_operationPlan, innerPlan) { + return innerPlan; +} +function valueNodeToCachedStaticValueConstantStep(cache, valueNode, inputType) { + let step = cache.get(valueNode); + if (!step) { + step = (0, index_js_1.constant)((0, utils_js_1.valueNodeToStaticValue)(valueNode, inputType), false); + cache.set(valueNode, step); + } + return step; +} +//# sourceMappingURL=input.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/input.js.map b/grafast/grafast/dist/input.js.map new file mode 100644 index 0000000000..014f9b61c0 --- /dev/null +++ b/grafast/grafast/dist/input.js.map @@ -0,0 +1 @@ +{"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":";;AAyCA,0CAQC;AAED,sDA2BC;AASD,8BAkGC;;AAhLD,yDAAmC;AAGnC,6CAAuC;AAEvC,iEAA+D;AAC/D,6EAA2E;AAE3E,+DAA6D;AAE7D,+CAK0B;AAC1B,yCAGoB;AAEpB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AAmB,GAAG,IAAA,iCAAsB,EAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QAC5E,OAAO,IAAI,sCAAkB,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CACvB,cAA6B,EAC7B,SAAuB;IAEvB,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,wCAAwC,CAC/C,KAAmC,EACnC,SAAoB,EACpB,SAA2B;IAE3B,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,IAAA,mBAAQ,EAAC,IAAA,iCAAsB,EAAC,SAAS,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,CAAC;QACrE,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/inspect.d.ts b/grafast/grafast/dist/inspect.d.ts new file mode 100644 index 0000000000..055d98ae5a --- /dev/null +++ b/grafast/grafast/dist/inspect.d.ts @@ -0,0 +1,10 @@ +export declare let inspect: { + (obj: any, options?: { + colors?: boolean; + depth?: number; + compact?: boolean | number; + breakLength?: number; + }): string; + custom: symbol; +}; +//# sourceMappingURL=inspect.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/inspect.d.ts.map b/grafast/grafast/dist/inspect.d.ts.map new file mode 100644 index 0000000000..390b857b51 --- /dev/null +++ b/grafast/grafast/dist/inspect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,OAAO,EAAE;IAClB,CACE,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GACA,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/inspect.js b/grafast/grafast/dist/inspect.js new file mode 100644 index 0000000000..35c376300a --- /dev/null +++ b/grafast/grafast/dist/inspect.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.inspect = void 0; +try { + exports.inspect = require("util").inspect; + if (typeof exports.inspect !== "function") { + throw new Error("Failed to load inspect"); + } +} +catch { + exports.inspect = Object.assign((obj) => { + return Array.isArray(obj) || + !obj || + Object.getPrototypeOf(obj) === null || + Object.getPrototypeOf(obj) === Object.prototype + ? String(JSON.stringify(obj)) + : String(obj); + }, { custom: Symbol.for("nodejs.util.inspect.custom") }); +} +//# sourceMappingURL=inspect.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/inspect.js.map b/grafast/grafast/dist/inspect.js.map new file mode 100644 index 0000000000..3c586db9d3 --- /dev/null +++ b/grafast/grafast/dist/inspect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":";;;AAaA,IAAI,CAAC;IACH,eAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;IAClC,IAAI,OAAO,eAAO,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC;AAAC,MAAM,CAAC;IACP,eAAO,GAAG,MAAM,CAAC,MAAM,CACrB,CAAC,GAAQ,EAAE,EAAE;QACX,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YACvB,CAAC,GAAG;YACJ,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,IAAI;YACnC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,SAAS;YAC/C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC7B,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,EACD,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,EAAE,CACrD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/interfaces.d.ts b/grafast/grafast/dist/interfaces.d.ts new file mode 100644 index 0000000000..ea9c7af594 --- /dev/null +++ b/grafast/grafast/dist/interfaces.d.ts @@ -0,0 +1,575 @@ +import type EventEmitter from "eventemitter3"; +import type { Middleware } from "graphile-config"; +import type { ASTNode, ExecutionArgs, FragmentDefinitionNode, GraphQLArgs, GraphQLArgument, GraphQLArgumentConfig, GraphQLField, GraphQLFieldConfig, GraphQLInputField, GraphQLInputFieldConfig, GraphQLInputObjectType, GraphQLInputType, GraphQLList, GraphQLNonNull, GraphQLOutputType, GraphQLScalarType, GraphQLSchema, GraphQLType, OperationDefinitionNode, Source, ValueNode, VariableNode } from "graphql"; +import type { ObjMap } from "graphql/jsutils/ObjMap.js"; +import type { Constraint } from "./constraints.js"; +import type { LayerPlanReasonListItemStream } from "./engine/LayerPlan.js"; +import type { OperationPlan } from "./engine/OperationPlan.js"; +import type { FlaggedValue, SafeError } from "./error.js"; +import type { ListCapableStep, Step } from "./step.js"; +import type { __InputDefaultStep } from "./steps/__inputDefault.js"; +import type { __InputDynamicScalarStep } from "./steps/__inputDynamicScalar.js"; +import type { ApplyableExecutableStep } from "./steps/applyInput.js"; +import type { __InputListStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __TrackedValueStepWithDollars, ConstantStep, ObjectStep } from "./steps/index.js"; +import type { GrafastObjectType } from "./utils.js"; +export interface GrafastTimeouts { + /** + * How many milliseconds should we allow for planning. Remember: planning is + * synchronous, so whilst it is happening the event loop is blocked. + */ + planning?: number; + /** + * How many milliseconds should we allow for execution. We will only check + * this immediately before triggering the execution of an asynchronous step, + * and if it is exceeded it will only prevent the execution of asynchronous + * steps, not synchronous ones. + * + * IMPORTANT: since we only check this _before_ an asynchronous step + * executes, there's nothing to stop an asynchronous step from continuing to + * execute long after the timeout has expired - therefore it's the + * responsibility of each step to abort itself if it goes over the allocated + * time budget (which is detailed in `ExecutionExtra.stopTime`). + */ + execution?: number; +} +export declare const $$queryCache: unique symbol; +/** + * We store the cache directly onto the GraphQLSchema so that it gets garbage + * collected along with the schema when it's not needed any more. To do so, we + * attach it using this symbol. + */ +export declare const $$cacheByOperation: unique symbol; +export type Fragments = { + [key: string]: FragmentDefinitionNode; +}; +export interface IEstablishOperationPlanResult { + variableValuesConstraints: Constraint[]; + contextConstraints: Constraint[]; + rootValueConstraints: Constraint[]; +} +export interface EstablishOperationPlanResultSuccess extends IEstablishOperationPlanResult { + error?: never; + operationPlan: OperationPlan; +} +export interface EstablishOperationPlanResultError extends IEstablishOperationPlanResult { + error: Error | SafeError<{ + [$$timeout]: number; + [$$ts]: number; + } | { + [$$timeout]?: undefined; + [$$ts]?: undefined; + } | undefined>; + operationPlan?: never; +} +export type EstablishOperationPlanResult = EstablishOperationPlanResultSuccess | EstablishOperationPlanResultError; +/** + * This represents the list of possible operationPlans for a specific document. + * + * @remarks + * + * It also includes the fragments for validation, but generally we trust that + * if the OperationDefinitionNode is the same then the request is equivalent. + */ +export interface CacheByOperationEntry { + /** + * Implemented as a linked list so the hot operationPlans can be kept at the top of the + * list, and if the list grows beyond a maximum size we can drop the last + * element. + */ + possibleOperationPlans: LinkedList | null; + fragments: Fragments; +} +export interface LinkedList { + value: T; + next: LinkedList | null; +} +export declare const $$hooked: unique symbol; +export declare const $$grafastContext: unique symbol; +export declare const $$planResults: unique symbol; +export declare const $$id: unique symbol; +/** Return the value verbatim, don't execute */ +export declare const $$verbatim: unique symbol; +/** + * If we're sure the data is the right shape and valid, we can set this key and + * it can be returned directly + */ +export declare const $$bypassGraphQL: unique symbol; +export declare const $$data: unique symbol; +/** + * For attaching additional metadata to the GraphQL execution result, for + * example details of the plan or SQL queries or similar that were executed. + */ +export declare const $$extensions: unique symbol; +/** + * The "GraphQLObjectType" type name, useful when dealing with polymorphism. + */ +export declare const $$concreteType: unique symbol; +/** + * Set this key on a type if that type's serialization is idempotent (that is + * to say `serialize(serialize(thing)) === serialize(thing)`). This means we + * don't have to "roll-back" serialization if we need to fallback to graphql-js + * execution. + */ +export declare const $$idempotent: unique symbol; +/** + * The event emitter used for outputting execution events. + */ +export declare const $$eventEmitter: unique symbol; +/** + * Used to indicate that an array has more results available via a stream. + */ +export declare const $$streamMore: unique symbol; +export declare const $$proxy: unique symbol; +/** + * If an error has this property set then it's safe to send through to the user + * without being masked. + */ +export declare const $$safeError: unique symbol; +/** The layerPlan used as a subroutine for this step */ +export declare const $$subroutine: unique symbol; +/** For tracking the timeout a TimeoutError happened from */ +export declare const $$timeout: unique symbol; +/** For tracking _when_ the timeout happened (because once the JIT has warmed it might not need so long) */ +export declare const $$ts: unique symbol; +/** + * When dealing with a polymorphic thing we need to be able to determine what + * the concrete type of it is, we use the $$concreteType property for that. + */ +export interface PolymorphicData { + [$$concreteType]: TType; + [$$data]?: TData; +} +export interface IndexByListItemStepId { + [listItemStepId: number]: number; +} +export type GrafastValuesList = ReadonlyArray; +export type PromiseOrDirect = PromiseLike | T; +export type ExecutionResultValue = T | FlaggedValue | FlaggedValue; +export type GrafastResultsList = ReadonlyArray>>; +export type GrafastResultStreamList = ReadonlyArray>>> | PromiseLike>; +export type AwaitedExecutionResults = ReadonlyArray | AsyncIterable ? UStreamItem : never>>>>>; +export type ExecutionResults = PromiseOrDirect> | PromiseLike; +export type BaseGraphQLRootValue = any; +export interface BaseGraphQLVariables { + [key: string]: unknown; +} +export interface BaseGraphQLArguments { + [key: string]: any; +} +export type BaseGraphQLInputObject = BaseGraphQLArguments; +export type FieldArgs = { + /** @deprecated Use bakedInput() step instead. */ + get?: never; + getRaw(path?: string | ReadonlyArray): AnyInputStep | ObjectStep<{ + [argName: string]: AnyInputStep; + }>; + typeAt(path: string | ReadonlyArray): GraphQLInputType; + /** This also works (without path) to apply each list entry against $target */ + apply($target: ApplyableExecutableStep, path?: string | ReadonlyArray, getTargetFromParent?: (parent: TArg, inputValue: any) => object | undefined): void; + apply($target: ApplyableExecutableStep, getTargetFromParent: (parent: TArg, inputValue: any) => object | undefined, justTargetFromParent?: never): void; +} & AnyInputStepDollars; +export type FieldArg = { + /** @deprecated Use bakedInput() step instead. */ + get?: never; + getRaw(path?: string | ReadonlyArray): AnyInputStep; + typeAt(path: string | ReadonlyArray): GraphQLInputType; + /** This also works (without path) to apply each list entry against $target */ + apply($target: ApplyableExecutableStep, path?: string | ReadonlyArray, getTargetFromParent?: (parent: TArg, inputValue: any) => object | undefined): void; + apply($target: ApplyableExecutableStep, getTargetFromParent: (parent: TArg, inputValue: any) => object | undefined, justTargetFromParent?: never): void; +}; +export type AnyInputStep = __TrackedValueStepWithDollars | __InputListStep | __InputStaticLeafStep | __InputDynamicScalarStep | __InputObjectStepWithDollars | __InputDefaultStep | ConstantStep; +export type AnyInputStepWithDollars = AnyInputStep & AnyInputStepDollars; +/** + * Lies to make it easier to write TypeScript code like + * `{ $input: { $user: { $username } } }` without having to pass loads of + * generics. + */ +export type AnyInputStepDollars = { + [key in string as `$${key}`]: AnyInputStepWithDollars; +}; +export interface FieldInfo { + fieldName: string; + field: GraphQLField; + schema: GraphQLSchema; +} +/** + * Step resolvers are like regular resolvers except they're called beforehand, + * they return plans rather than values, and they only run once for lists + * rather than for each item in the list. + * + * The idea is that the plan resolver returns a plan object which later will + * process the data and feed that into the actual resolver functions + * (preferably using the default resolver function?). + * + * They are stored onto `.extensions.grafast.plan` + * + * @returns a plan for this field. + * + * @remarks + * We're using `TrackedObject<...>` so we can later consider caching these + * executions. + */ +export type FieldPlanResolver<_TArgs extends BaseGraphQLArguments, TParentStep extends Step | null, TResultStep extends Step | null> = ($parentPlan: TParentStep, args: FieldArgs, info: FieldInfo) => TResultStep; +export type InputObjectFieldApplyResolver = (target: TParent, input: any, // Don't use unknown here, otherwise users can't easily cast it +info: { + schema: GraphQLSchema; + fieldName: string; + field: GraphQLInputField; +}) => any; +export type InputObjectTypeBakedInfo = { + schema: GraphQLSchema; + type: GraphQLInputObjectType; + applyChildren(val: any): void; +}; +export type InputObjectTypeBakedResolver = (input: Record, info: InputObjectTypeBakedInfo) => any; +export type ArgumentApplyPlanResolver = ($parentPlan: TParentStep, $fieldPlan: TFieldStep, input: FieldArg, info: { + schema: GraphQLSchema; + arg: GraphQLArgument; + argName: string; +}) => void; +/** + * GraphQLScalarTypes can have plans, these are passed the field plan and must + * return an executable plan. + */ +export type ScalarPlanResolver = ($parentPlan: TParentStep, info: { + schema: GraphQLSchema; +}) => TResultStep; +/** + * GraphQLScalarTypes can have plans, these are passed the field plan and must + * return an executable plan. + */ +export type ScalarInputPlanResolver = ($inputValue: AnyInputStep, info: { + schema: GraphQLSchema; + type: GraphQLScalarType; +}) => TResultStep; +/** + * EXPERIMENTAL! + * + * NOTE: this is an `any` because we want to allow users to specify + * subclasses of ExecutableStep but TypeScript only wants to allow + * superclasses. + * + * @experimental + */ +export type EnumValueApplyResolver = (parent: TParent) => void; +type OutputPlanForNamedType = TType extends GrafastObjectType ? TStep : Step; +export type OutputPlanForType = TType extends GraphQLNonNull>> ? ListCapableStep> | Step> : TType extends GraphQLNonNull> ? ListCapableStep> | Step> : TType extends GraphQLList> ? ListCapableStep> | Step> : TType extends GraphQLList ? ListCapableStep> | Step> : TType extends GraphQLNonNull ? OutputPlanForNamedType : OutputPlanForNamedType; +/** + * Basically GraphQLFieldConfig but with an easy to access `plan` method. + */ +export type GrafastFieldConfig, but that results in everything thinking it should be a ListStep +TArgs extends BaseGraphQLArguments> = Omit, "args" | "type"> & { + type: TType; + plan?: FieldPlanResolver; + subscribePlan?: FieldPlanResolver; + args?: GrafastFieldConfigArgumentMap; +}; +/** + * Basically GraphQLFieldConfigArgumentMap but allowing for args to have plans. + */ +export type GrafastFieldConfigArgumentMap = { + [argName: string]: GrafastArgumentConfig; +}; +/** + * Basically GraphQLArgumentConfig but allowing for a plan. + */ +export type GrafastArgumentConfig = Omit & { + type: TInputType; + applyPlan?: ArgumentApplyPlanResolver; + applySubscribePlan?: ArgumentApplyPlanResolver; + inputPlan?: never; + autoApplyAfterParentPlan?: never; + autoApplyAfterParentSubscribePlan?: never; +}; +/** + * Basically GraphQLInputFieldConfig but allowing for the field to have a plan. + */ +export type GrafastInputFieldConfig = Omit & { + type: TInputType; + apply?: InputObjectFieldApplyResolver; + inputPlan?: never; + applyPlan?: never; + autoApplyAfterParentInputPlan?: never; + autoApplyAfterParentApplyPlan?: never; +}; +/** + * The args passed to a field plan resolver, the values are plans. + */ +export type TrackedArguments = { + get(key: TKey): AnyInputStep; +}; +/** + * `@stream` directive meta. + */ +export interface StepStreamOptions extends LayerPlanReasonListItemStream { +} +/** + * Additional details about the planning for a field; currently only relates to + * the `@stream` directive. + */ +export interface StepOptions { + /** + * Details for the `@stream` directive. + */ + stream: StepStreamOptions | null; + /** + * Should we walk an iterable if presented. This is important because we + * don't want to walk things like Map/Set except if we're doing it as part of + * a list step. + */ + walkIterable: boolean; +} +/** + * Options passed to the `optimize` method of a plan to give more context. + */ +export interface StepOptimizeOptions { + /** + * If null, this step will not stream. If non-null, this step _might_ stream, + * but it's not guaranteed - it may be dependent on user variables, e.g. the + * `if` parameter. + */ + stream: null | {}; + meta: Record | undefined; +} +/** + * A subscriber provides realtime data, a SubscribeStep can subscribe to a + * given topic (string) and will receive an AsyncIterableIterator with messages + * published to that topic (standard pub/sub semantics). + */ +export type GrafastSubscriber = { + subscribe(topic: TTopic): PromiseOrDirect>; + release?(): PromiseOrDirect; +}; +/** + * Specifically relates to the stringification of NodeIDs, e.g. `["User", 1]` + * to/from `WyJVc2VyIiwgMV0=` + */ +export interface NodeIdCodec { + name: string; + encode(value: T): string | null; + decode(value: string): T; +} +/** + * Determines if a NodeID relates to a given object type, and also relates to + * encoding the NodeID for that type. + */ +export type NodeIdHandler = NodeIdCodec, TNodeStep extends Step = Step, TSpec = any> = { + /** + * The name of the object type this handler is for. + */ + typeName: string; + /** + * Which codec are we using to encode/decode the NodeID string? + */ + codec: TCodec; + /** + * Returns true if the given decoded Node ID value represents this type. + */ + match(specifier: TCodec extends NodeIdCodec ? U : any): boolean; + /** + * Returns the underlying identifiers extracted from the decoded NodeID + * value. + */ + getIdentifiers(value: TCodec extends NodeIdCodec ? U : any): TIdentifiers; + /** + * Returns a plan that returns the value ready to be encoded. When the result + * of this plan is fed into `match`, it should return `true`. + */ + plan($thing: TNodeStep): Step ? U : any>; + /** + * Returns a specification based on the Node ID, this can be in any format + * you like. It is intended to then be fed into `get` or handled in your own + * code as you see fit. (When used directly, it's primarily useful for + * referencing a node without actually fetching it - e.g. allowing you to + * delete a node by its ID without first fetching it.) + */ + getSpec(plan: Step ? U : any>): TSpec; + /** + * Combined with `getSpec`, this forms the recprocal of `plan`; i.e. + * `get(getSpec( plan(node) ))` should return a plan that results in the + * original node. + */ + get(spec: TSpec): TNodeStep; + deprecationReason?: string; +}; +export type BaseEventMap = Record; +export type EventMapKey = string & keyof TEventMap; +export type EventCallback = (params: TPayload) => void; +export interface TypedEventEmitter extends EventEmitter { + addListener>(eventName: TEventName, callback: EventCallback): this; + on>(eventName: TEventName, callback: EventCallback): this; + once>(eventName: TEventName, callback: EventCallback): this; + removeListener>(eventName: TEventName, callback: EventCallback): this; + off>(eventName: TEventName, callback: EventCallback): this; + emit>(eventName: TEventName, params: TEventMap[TEventName]): boolean; +} +export type ExecutionEventMap = { + /** + * Something that can be added to the + * ExecutionResult.extensions.explain.operations list. + */ + explainOperation: { + operation: Record & { + type: string; + title: string; + }; + }; +}; +export type ExecutionEventEmitter = TypedEventEmitter; +export interface ExecutionExtraBase { + /** The `performance.now()` at which your step should stop executing */ + stopTime: number | null; + /** If you have set a `metaKey` on your step, the relevant meta object which you can write into (e.g. for caching) */ + meta: Record | undefined; + eventEmitter: ExecutionEventEmitter | undefined; +} +export interface ExecutionExtra extends ExecutionExtraBase { +} +export interface UnbatchedExecutionExtra extends ExecutionExtraBase { + stream: ExecutionDetailsStream | null; +} +/** + * A bitwise number representing a number of flags: + * + * - 0: normal execution value + * - 1: errored (trappable) + * - 2: null (trappable) + * - 4: inhibited (trappable) + * - 8: disabled due to polymorphism (untrappable) + * - 16: stopped (untrappable) - e.g. due to fatal (unrecoverable) error + * - 32: ... + */ +export type ExecutionEntryFlags = number & { + readonly tsBrand?: unique symbol; +}; +export declare const NO_FLAGS: ExecutionEntryFlags; +export declare const FLAG_ERROR: ExecutionEntryFlags; +export declare const FLAG_NULL: ExecutionEntryFlags; +export declare const FLAG_INHIBITED: ExecutionEntryFlags; +export declare const FLAG_POLY_SKIPPED: ExecutionEntryFlags; +export declare const FLAG_STOPPED: ExecutionEntryFlags; +export declare const ALL_FLAGS: ExecutionEntryFlags; +/** By default, accept null values as an input */ +export declare const DEFAULT_ACCEPT_FLAGS: ExecutionEntryFlags; +export declare const TRAPPABLE_FLAGS: ExecutionEntryFlags; +export declare const DEFAULT_FORBIDDEN_FLAGS: ExecutionEntryFlags; +export declare const FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS: ExecutionEntryFlags; +export type ExecutionValue = BatchExecutionValue | UnaryExecutionValue; +interface ExecutionValueBase { + at(i: number): TData; + isBatch: boolean; + /** Returns this.value for a unary execution value; throws if non-unary */ + unaryValue(): TData; +} +export interface BatchExecutionValue extends ExecutionValueBase { + isBatch: true; + entries: ReadonlyArray; + /** Always throws, since this should only be called on unary execution values */ + unaryValue(): never; +} +export interface UnaryExecutionValue extends ExecutionValueBase { + isBatch: false; + value: TData; + /** Same as getting .value */ + unaryValue(): TData; +} +export type IndexMap = (callback: (i: number) => T) => ReadonlyArray; +export type IndexForEach = (callback: (i: number) => any) => void; +export interface ExecutionDetailsStream { + initialCount: number; +} +export interface ExecutionDetails { + count: number; + indexMap: IndexMap; + indexForEach: IndexForEach; + values: { + [DepIdx in keyof TDeps]: ExecutionValue; + } & { + length: TDeps["length"]; + map: ReadonlyArray>["map"]; + }; + extra: ExecutionExtra; + stream: ExecutionDetailsStream | null; +} +export interface LocationDetails { + node: ASTNode | readonly ASTNode[]; + /** This should only be null for the root selection */ + parentTypeName: string | null; + /** This should only be null for the root selection */ + fieldName: string | null; +} +export type UnwrapPlanTuple = { + [Index in keyof TIn]: DataFromStep; +}; +export type NotVariableValueNode = Exclude; +export type StreamMaybeMoreableArray = Array & { + [$$streamMore]?: AsyncIterator | Iterator; +}; +export type StreamMoreableArray = Array & { + [$$streamMore]: AsyncIterator | Iterator; +}; +export interface GrafastArgs extends GraphQLArgs { + resolvedPreset?: GraphileConfig.ResolvedPreset; + requestContext?: Partial; + middleware?: Middleware | null; +} +export type Maybe = T | null | undefined; +export * from "./planJSONInterfaces.js"; +export interface AddDependencyOptions { + step: TStep; + skipDeduplication?: boolean; + /** @defaultValue `FLAG_NULL` */ + acceptFlags?: ExecutionEntryFlags; + onReject?: Maybe; + nonUnaryMessage?: ($dependent: Step, $dependency: Step) => string; +} +export interface DependencyOptions { + step: TStep; + acceptFlags: ExecutionEntryFlags; + onReject: Maybe; +} +export type DataFromStep = TStep extends Step ? TData : never; +export interface GrafastExecutionArgs extends ExecutionArgs { + resolvedPreset?: GraphileConfig.ResolvedPreset; + middleware?: Middleware | null; + requestContext?: Partial; + outputDataAsString?: boolean; +} +export interface ValidateSchemaEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + schema: GraphQLSchema; +} +export interface ParseAndValidateEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + schema: GraphQLSchema; + source: string | Source; +} +export interface PrepareArgsEvent { + args: Grafast.ExecutionArgs; +} +export interface ExecuteEvent { + args: GrafastExecutionArgs; +} +export interface SubscribeEvent { + args: GrafastExecutionArgs; +} +export interface EstablishOperationPlanEvent { + schema: GraphQLSchema; + operation: OperationDefinitionNode; + fragments: ObjMap; + variableValues: Record; + context: any; + rootValue: any; + planningTimeout: number | undefined; + args: GrafastExecutionArgs; +} +export interface ExecuteStepEvent { + args: GrafastExecutionArgs; + step: Step; + executeDetails: ExecutionDetails; +} +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/interfaces.d.ts.map b/grafast/grafast/dist/interfaces.d.ts.map new file mode 100644 index 0000000000..5b564f2a0e --- /dev/null +++ b/grafast/grafast/dist/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,uBAAuB,EACvB,MAAM,EACN,SAAS,EACT,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,M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AI,CAAC;IACX,cAAc,EAAE,gBAAgB,CAAC;CAClC"} \ No newline at end of file diff --git a/grafast/grafast/dist/interfaces.js b/grafast/grafast/dist/interfaces.js new file mode 100644 index 0000000000..0f87dba226 --- /dev/null +++ b/grafast/grafast/dist/interfaces.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.$$deepDepSkip = exports.FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS = exports.DEFAULT_FORBIDDEN_FLAGS = exports.TRAPPABLE_FLAGS = exports.DEFAULT_ACCEPT_FLAGS = exports.ALL_FLAGS = exports.FLAG_STOPPED = exports.FLAG_POLY_SKIPPED = exports.FLAG_INHIBITED = exports.FLAG_NULL = exports.FLAG_ERROR = exports.NO_FLAGS = exports.$$ts = exports.$$timeout = exports.$$subroutine = exports.$$safeError = exports.$$proxy = exports.$$streamMore = exports.$$eventEmitter = exports.$$idempotent = exports.$$concreteType = exports.$$extensions = exports.$$data = exports.$$bypassGraphQL = exports.$$verbatim = exports.$$id = exports.$$planResults = exports.$$grafastContext = exports.$$hooked = exports.$$cacheByOperation = exports.$$queryCache = void 0; +const tslib_1 = require("tslib"); +exports.$$queryCache = Symbol("queryCache"); +/** + * We store the cache directly onto the GraphQLSchema so that it gets garbage + * collected along with the schema when it's not needed any more. To do so, we + * attach it using this symbol. + */ +exports.$$cacheByOperation = Symbol("cacheByOperation"); +exports.$$hooked = Symbol("hookArgsApplied"); +exports.$$grafastContext = Symbol("context"); +exports.$$planResults = Symbol("planResults"); +exports.$$id = Symbol("id"); +/** Return the value verbatim, don't execute */ +exports.$$verbatim = Symbol("verbatim"); +/** + * If we're sure the data is the right shape and valid, we can set this key and + * it can be returned directly + */ +exports.$$bypassGraphQL = Symbol("bypassGraphQL"); +exports.$$data = Symbol("data"); +/** + * For attaching additional metadata to the GraphQL execution result, for + * example details of the plan or SQL queries or similar that were executed. + */ +exports.$$extensions = Symbol("extensions"); +/** + * The "GraphQLObjectType" type name, useful when dealing with polymorphism. + */ +exports.$$concreteType = Symbol("concreteType"); +/** + * Set this key on a type if that type's serialization is idempotent (that is + * to say `serialize(serialize(thing)) === serialize(thing)`). This means we + * don't have to "roll-back" serialization if we need to fallback to graphql-js + * execution. + */ +exports.$$idempotent = Symbol("idempotent"); +/** + * The event emitter used for outputting execution events. + */ +exports.$$eventEmitter = Symbol("executionEventEmitter"); +/** + * Used to indicate that an array has more results available via a stream. + */ +exports.$$streamMore = Symbol("streamMore"); +exports.$$proxy = Symbol("proxy"); +/** + * If an error has this property set then it's safe to send through to the user + * without being masked. + */ +exports.$$safeError = Symbol("safeError"); +/** The layerPlan used as a subroutine for this step */ +exports.$$subroutine = Symbol("subroutine"); +/** For tracking the timeout a TimeoutError happened from */ +exports.$$timeout = Symbol("timeout"); +/** For tracking _when_ the timeout happened (because once the JIT has warmed it might not need so long) */ +exports.$$ts = Symbol("timestamp"); +function flag(f) { + return f; +} +exports.NO_FLAGS = flag(0); +exports.FLAG_ERROR = flag(1 << 0); +exports.FLAG_NULL = flag(1 << 1); +exports.FLAG_INHIBITED = flag(1 << 2); +exports.FLAG_POLY_SKIPPED = flag(1 << 3); +exports.FLAG_STOPPED = flag(1 << 4); +exports.ALL_FLAGS = flag(exports.FLAG_ERROR | exports.FLAG_NULL | exports.FLAG_INHIBITED | exports.FLAG_POLY_SKIPPED | exports.FLAG_STOPPED); +/** By default, accept null values as an input */ +exports.DEFAULT_ACCEPT_FLAGS = flag(exports.FLAG_NULL); +exports.TRAPPABLE_FLAGS = flag(exports.FLAG_ERROR | exports.FLAG_NULL | exports.FLAG_INHIBITED); +exports.DEFAULT_FORBIDDEN_FLAGS = flag(exports.ALL_FLAGS & ~exports.DEFAULT_ACCEPT_FLAGS); +exports.FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS = flag(exports.FLAG_NULL | exports.FLAG_POLY_SKIPPED); +tslib_1.__exportStar(require("./planJSONInterfaces.js"), exports); +/** + * @internal + */ +exports.$$deepDepSkip = Symbol("deepDepSkip_experimental"); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/interfaces.js.map b/grafast/grafast/dist/interfaces.js.map new file mode 100644 index 0000000000..1c8a92c997 --- /dev/null +++ b/grafast/grafast/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;;AA0Ea,QAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEjD;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAoDhD,QAAA,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAErC,QAAA,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AACrC,QAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AACtC,QAAA,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AACjC,+CAA+C;AAClC,QAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC7C;;;GAGG;AACU,QAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC1C,QAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACrC;;;GAGG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEjD;;GAEG;AACU,QAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAErD;;;;;GAKG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEjD;;GAEG;AACU,QAAA,cAAc,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAE9D;;GAEG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAEpC,QAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEvC;;;GAGG;AACU,QAA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at end of file diff --git a/grafast/grafast/dist/makeGrafastSchema.d.ts b/grafast/grafast/dist/makeGrafastSchema.d.ts new file mode 100644 index 0000000000..7a5d3d39ca --- /dev/null +++ b/grafast/grafast/dist/makeGrafastSchema.d.ts @@ -0,0 +1,85 @@ +import type { GraphQLFieldResolver, GraphQLScalarLiteralParser, GraphQLScalarSerializer, GraphQLScalarValueParser } from "graphql"; +import { GraphQLSchema } from "graphql"; +import * as graphql from "graphql"; +import type { ArgumentApplyPlanResolver, EnumValueApplyResolver, FieldPlanResolver, InputObjectFieldApplyResolver, InputObjectTypeBakedResolver, ScalarPlanResolver } from "./interfaces.js"; +import type { Step } from "./step.js"; +/** + * When defining a field with `typeDefs/plans` you can declare the field plan + * directly, or you can define a configuration object that accepts the plan and + * more. + */ +export type FieldPlans = FieldPlanResolver | { + plan?: FieldPlanResolver; + subscribePlan?: FieldPlanResolver; + resolve?: GraphQLFieldResolver; + subscribe?: GraphQLFieldResolver; + args?: { + [argName: string]: ArgumentApplyPlanResolver | { + applyPlan?: ArgumentApplyPlanResolver; + applySubscribePlan?: ArgumentApplyPlanResolver; + extensions?: graphql.GraphQLArgumentExtensions; + }; + }; +}; +/** + * The plans/config for each field of a GraphQL object type. + */ +export type ObjectPlans = { + __assertStep?: ((step: Step) => asserts step is Step) | { + new (...args: any[]): Step; + }; +} & { + [fieldName: string]: FieldPlans; +}; +/** + * The plans for each field of a GraphQL input object type. + */ +export type InputObjectPlans = { + __baked?: InputObjectTypeBakedResolver; +} & { + [fieldName: string]: InputObjectFieldApplyResolver | { + apply?: InputObjectFieldApplyResolver; + extensions?: graphql.GraphQLInputFieldExtensions; + }; +}; +/** + * The plan config for an interface or union type. + */ +export type InterfaceOrUnionPlans = { + __resolveType?: (o: unknown) => string; +}; +/** + * The config for a GraphQL scalar type. + */ +export type ScalarPlans = { + serialize?: GraphQLScalarSerializer; + parseValue?: GraphQLScalarValueParser; + parseLiteral?: GraphQLScalarLiteralParser; + plan?: ScalarPlanResolver; +}; +/** + * The values/configs for the entries in a GraphQL enum type. + */ +export type EnumPlans = { + [enumValueName: string]: EnumValueApplyResolver | string | number | boolean | { + value?: unknown; + extensions?: graphql.GraphQLEnumValueExtensions; + apply?: EnumValueApplyResolver; + }; +}; +/** + * A map from GraphQL named type to the config for that type. + */ +export interface GrafastPlans { + [typeName: string]: ObjectPlans | InputObjectPlans | InterfaceOrUnionPlans | ScalarPlans | EnumPlans; +} +/** + * Takes a GraphQL schema definition in Interface Definition Language (IDL/SDL) + * syntax and configs for the types in it and returns a GraphQL schema. + */ +export declare function makeGrafastSchema(details: { + typeDefs: string; + plans: GrafastPlans; + enableDeferStream?: boolean; +}): GraphQLSchema; +//# sourceMappingURL=makeGrafastSchema.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/makeGrafastSchema.d.ts.map b/grafast/grafast/dist/makeGrafastSchema.d.ts.map new file mode 100644 index 0000000000..55f1c114e7 --- /dev/null +++ b/grafast/grafast/dist/makeGrafastSchema.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"makeGrafastSchema.d.ts","sourceRoot":"","sources":["../src/makeGrafastSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAetC;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAClB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAChC;IACE,IAAI,CAAC,EAAE,iBAAiB,CAAC,GA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,GAAG;IACxB,SAAS,CAAC,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,wBAAwB,CAAC,GAAG,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,0BAA0B,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,CAAC,EAAE,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IAEtB,CAAC,aAAa,EAAE,MAAM,GAClB,sBAAsB,GACtB,MAAM,GACN,MAAM,GACN,OAAO,GACP;QACE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,UAAU,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC;QAChD,KAAK,CAAC,EAAE,sBAAsB,CAAC;KAChC,CAAC;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,CAAC,QAAQ,EAAE,MAAM,GACb,WAAW,GACX,gBAAgB,GAChB,qBAAqB,GACrB,WAAW,GACX,SAAS,CAAC;CACf;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,GAAG,aAAa,CAyehB"} \ No newline at end of file diff --git a/grafast/grafast/dist/makeGrafastSchema.js b/grafast/grafast/dist/makeGrafastSchema.js new file mode 100644 index 0000000000..43a370d8d3 --- /dev/null +++ b/grafast/grafast/dist/makeGrafastSchema.js @@ -0,0 +1,394 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeGrafastSchema = makeGrafastSchema; +const tslib_1 = require("tslib"); +const graphql_1 = require("graphql"); +const graphql = tslib_1.__importStar(require("graphql")); +const utils_js_1 = require("./utils.js"); +const { buildASTSchema, isEnumType, isInputObjectType, isInterfaceType, isObjectType, isScalarType, isUnionType, parse, } = graphql; +/** + * Takes a GraphQL schema definition in Interface Definition Language (IDL/SDL) + * syntax and configs for the types in it and returns a GraphQL schema. + */ +function makeGrafastSchema(details) { + const { typeDefs, plans, enableDeferStream = false } = details; + const astSchema = buildASTSchema(parse(typeDefs), { + enableDeferStream, + }); + const schemaConfig = astSchema.toConfig(); + const typeByName = new Map(); + function mapType(type) { + if (graphql.isNonNullType(type)) { + return new graphql.GraphQLNonNull(mapType(type.ofType)); + } + else if (graphql.isListType(type)) { + return new graphql.GraphQLList(mapType(type.ofType)); + } + else { + const replacementType = typeByName.get(type.name); + if (!replacementType) { + throw new Error(`Failed to find replaced type '${type.name}'`); + } + return replacementType; + } + } + for (const [typeName, _spec] of Object.entries(plans)) { + const astTypeIndex = schemaConfig.types.findIndex((t) => t.name === typeName); + const astType = schemaConfig.types[astTypeIndex]; + if (!astType) { + console.warn(`'plans' specified configuration for type '${typeName}', but that type was not present in the schema`); + continue; + } + } + const BUILT_IN_TYPE_NAMES = ["String", "Int", "Float", "Boolean", "ID"]; + // Now mod the types + const rawTypes = schemaConfig.types; + schemaConfig.types = rawTypes.map((astType) => { + const typeName = astType.name; + const replacementType = (() => { + if (typeName.startsWith("__") || BUILT_IN_TYPE_NAMES.includes(typeName)) { + return astType; + } + if (isObjectType(astType)) { + const rawConfig = astType.toConfig(); + const objectPlans = plans[astType.name]; + const rawFields = rawConfig.fields; + const rawInterfaces = rawConfig.interfaces; + const config = { + ...rawConfig, + extensions: { + ...rawConfig.extensions, + }, + }; + if (objectPlans) { + for (const [fieldName, rawFieldSpec] of Object.entries(objectPlans)) { + if (fieldName === "__assertStep") { + (0, utils_js_1.exportNameHint)(rawFieldSpec, `${typeName}_assertStep`); + config.extensions.grafast = { assertStep: rawFieldSpec }; + continue; + } + else if (fieldName.startsWith("__")) { + throw new Error(`Unsupported field name '${fieldName}'; perhaps you meant '__assertStep'?`); + } + const fieldSpec = rawFieldSpec; + const field = rawFields[fieldName]; + if (!field) { + console.warn(`'plans' specified configuration for object type '${typeName}' field '${fieldName}', but that field was not present in the type`); + continue; + } + if ("args" in fieldSpec && + typeof fieldSpec.args === "object" && + fieldSpec.args != null) { + for (const [argName, _argSpec] of Object.entries(fieldSpec.args)) { + const arg = field.args?.[argName]; + if (!arg) { + console.warn(`'plans' specified configuration for object type '${typeName}' field '${fieldName}' arg '${argName}', but that arg was not present on the field`); + continue; + } + } + } + } + } + config.interfaces = function () { + return rawInterfaces.map((t) => mapType(t)); + }; + config.fields = function () { + const fields = Object.create(null); + for (const [fieldName, rawFieldSpec] of Object.entries(rawFields)) { + if (fieldName.startsWith("__")) { + continue; + } + const fieldSpec = objectPlans && Object.hasOwn(objectPlans, fieldName) + ? objectPlans[fieldName] + : undefined; + const fieldConfig = { + ...rawFieldSpec, + type: mapType(rawFieldSpec.type), + }; + fields[fieldName] = fieldConfig; + if (fieldConfig.args) { + for (const [_argName, arg] of Object.entries(fieldConfig.args)) { + arg.type = mapType(arg.type); + } + } + if (fieldSpec) { + if (typeof fieldSpec === "function") { + (0, utils_js_1.exportNameHint)(fieldSpec, `${typeName}_${fieldName}_plan`); + // it's a plan + fieldConfig.extensions.grafast = { + plan: fieldSpec, + }; + } + else { + // it's a spec + const grafastExtensions = Object.create(null); + fieldConfig.extensions.grafast = grafastExtensions; + if (typeof fieldSpec.resolve === "function") { + (0, utils_js_1.exportNameHint)(fieldSpec.resolve, `${typeName}_${fieldName}_resolve`); + fieldConfig.resolve = fieldSpec.resolve; + } + if (typeof fieldSpec.subscribe === "function") { + (0, utils_js_1.exportNameHint)(fieldSpec.subscribe, `${typeName}_${fieldName}_subscribe`); + fieldConfig.subscribe = fieldSpec.subscribe; + } + if (typeof fieldSpec.plan === "function") { + (0, utils_js_1.exportNameHint)(fieldSpec.plan, `${typeName}_${fieldName}_plan`); + grafastExtensions.plan = fieldSpec.plan; + } + if (typeof fieldSpec.subscribePlan === "function") { + (0, utils_js_1.exportNameHint)(fieldSpec.subscribePlan, `${typeName}_${fieldName}_subscribePlan`); + grafastExtensions.subscribePlan = fieldSpec.subscribePlan; + } + if (fieldConfig.args) { + for (const [argName, arg] of Object.entries(fieldConfig.args)) { + const argSpec = fieldSpec.args?.[argName]; + if (typeof argSpec === "function") { + const applyPlan = argSpec; + (0, utils_js_1.exportNameHint)(applyPlan, `${typeName}_${fieldName}_${argName}_applyPlan`); + Object.assign(arg.extensions, { + grafast: { applyPlan }, + }); + } + else if (typeof argSpec === "object" && + argSpec !== null) { + const { extensions, applyPlan, applySubscribePlan } = argSpec; + if (extensions) { + Object.assign(arg.extensions, extensions); + } + if (applyPlan || applySubscribePlan) { + (0, utils_js_1.exportNameHint)(applyPlan, `${typeName}_${fieldName}_${argName}_applyPlan`); + (0, utils_js_1.exportNameHint)(applySubscribePlan, `${typeName}_${fieldName}_${argName}_applySubscribePlan`); + Object.assign(arg.extensions, { + grafast: { + applyPlan, + applySubscribePlan, + }, + }); + } + } + } + } + } + } + } + return fields; + }; + return new graphql.GraphQLObjectType(config); + } + else if (isInputObjectType(astType)) { + const rawConfig = astType.toConfig(); + const config = { + ...rawConfig, + extensions: { + ...rawConfig.extensions, + grafast: { + ...rawConfig.extensions?.grafast, + }, + }, + }; + const inputObjectPlans = plans[astType.name]; + if (inputObjectPlans) { + for (const [fieldName, fieldSpec] of Object.entries(inputObjectPlans)) { + if (fieldName === "__baked") { + config.extensions.grafast.baked = + fieldSpec; + continue; + } + if (config.extensions?.grafast?.baked) { + (0, utils_js_1.exportNameHint)(config.extensions.grafast.baked, `${typeName}__baked`); + } + const field = rawConfig.fields[fieldName]; + if (!field) { + console.warn(`'plans' specified configuration for input object type '${typeName}' field '${fieldName}', but that field was not present in the type`); + continue; + } + } + } + const rawFields = rawConfig.fields; + config.fields = function () { + const fields = Object.create(null); + for (const [fieldName, rawFieldConfig] of Object.entries(rawFields)) { + const fieldSpec = inputObjectPlans && Object.hasOwn(inputObjectPlans, fieldName) + ? inputObjectPlans[fieldName] + : undefined; + const fieldConfig = { + ...rawFieldConfig, + type: mapType(rawFieldConfig.type), + }; + fields[fieldName] = fieldConfig; + if (fieldSpec) { + const grafastExtensions = Object.create(null); + fieldConfig.extensions.grafast = grafastExtensions; + if (typeof fieldSpec === "function") { + (0, utils_js_1.exportNameHint)(fieldSpec, `${typeName}_${fieldName}_apply`); + grafastExtensions.apply = fieldSpec; + } + else { + const { apply, extensions } = fieldSpec; + if (extensions) { + Object.assign(fieldConfig.extensions, extensions); + } + if (apply) { + (0, utils_js_1.exportNameHint)(fieldSpec.apply, `${typeName}_${fieldName}_apply`); + Object.assign(grafastExtensions, { apply }); + } + } + } + } + return fields; + }; + return new graphql.GraphQLInputObjectType(config); + } + else if (isInterfaceType(astType)) { + const rawConfig = astType.toConfig(); + const config = { + ...rawConfig, + }; + const rawFields = rawConfig.fields; + config.fields = function () { + const fields = Object.create(null); + for (const [fieldName, rawFieldSpec] of Object.entries(rawFields)) { + const fieldConfig = { + ...rawFieldSpec, + type: mapType(rawFieldSpec.type), + }; + fields[fieldName] = fieldConfig; + if (fieldConfig.args) { + for (const [_argName, arg] of Object.entries(fieldConfig.args)) { + arg.type = mapType(arg.type); + } + } + } + return fields; + }; + const rawInterfaces = rawConfig.interfaces; + config.interfaces = function () { + return rawInterfaces.map((t) => mapType(t)); + }; + const polyPlans = plans[astType.name]; + if (polyPlans?.__resolveType) { + (0, utils_js_1.exportNameHint)(polyPlans.__resolveType, `${typeName}_resolveType`); + config.resolveType = polyPlans.__resolveType; + } + return new graphql.GraphQLInterfaceType(config); + } + else if (isUnionType(astType)) { + const rawConfig = astType.toConfig(); + const config = { + ...rawConfig, + }; + const rawTypes = rawConfig.types; + config.types = function () { + return rawTypes.map((t) => mapType(t)); + }; + const polyPlans = plans[astType.name]; + if (polyPlans?.__resolveType) { + (0, utils_js_1.exportNameHint)(polyPlans.__resolveType, `${typeName}_resolveType`); + config.resolveType = polyPlans.__resolveType; + } + return new graphql.GraphQLUnionType(config); + } + else if (isScalarType(astType)) { + const rawConfig = astType.toConfig(); + const config = { + ...rawConfig, + extensions: { + ...rawConfig.extensions, + }, + }; + const scalarPlans = plans[astType.name]; + if (typeof scalarPlans?.serialize === "function") { + (0, utils_js_1.exportNameHint)(scalarPlans.serialize, `${typeName}_serialize`); + config.serialize = scalarPlans.serialize; + } + if (typeof scalarPlans?.parseValue === "function") { + (0, utils_js_1.exportNameHint)(scalarPlans.parseValue, `${typeName}_parseValue`); + config.parseValue = scalarPlans.parseValue; + } + if (typeof scalarPlans?.parseLiteral === "function") { + (0, utils_js_1.exportNameHint)(scalarPlans.parseLiteral, `${typeName}_parseLiteral`); + config.parseLiteral = scalarPlans.parseLiteral; + } + if (typeof scalarPlans?.plan === "function") { + (0, utils_js_1.exportNameHint)(scalarPlans.plan, `${typeName}_plan`); + config.extensions.grafast = { plan: scalarPlans.plan }; + } + return new graphql.GraphQLScalarType(config); + } + else if (isEnumType(astType)) { + const rawConfig = astType.toConfig(); + const config = { + ...rawConfig, + }; + const enumPlans = plans[astType.name]; + const enumValues = config.values; + if (enumPlans) { + for (const [enumValueName, enumValueSpec] of Object.entries(enumPlans)) { + const enumValue = enumValues[enumValueName]; + if (!enumValue) { + console.warn(`'plans' specified configuration for enum type '${typeName}' value '${enumValueName}', but that value was not present in the type`); + continue; + } + if (typeof enumValueSpec === "function") { + (0, utils_js_1.exportNameHint)(enumValueSpec, `${typeName}_${enumValueName}_apply`); + // It's a plan + if (!enumValue.extensions) { + enumValue.extensions = Object.create(null); + } + enumValue.extensions.grafast = { + apply: enumValueSpec, + }; + } + else if (typeof enumValueSpec === "object" && + enumValueSpec != null) { + // It's a full spec + if (enumValueSpec.extensions) { + (0, utils_js_1.exportNameHint)(enumValueSpec.extensions, `${typeName}_${enumValueName}_extensions`); + Object.assign(enumValue.extensions, enumValueSpec.extensions); + } + if (enumValueSpec.apply) { + (0, utils_js_1.exportNameHint)(enumValueSpec.apply, `${typeName}_${enumValueName}_apply`); + enumValue.extensions.grafast = { + apply: enumValueSpec.apply, + }; + } + if ("value" in enumValueSpec) { + enumValue.value = enumValueSpec.value; + } + } + else { + // It must be the value + enumValue.value = enumValueSpec; + } + } + } + return new graphql.GraphQLEnumType(config); + } + else { + const never = astType; + throw new Error(`Unhandled type ${never}`); + } + })(); + typeByName.set(typeName, replacementType); + return replacementType; + }); + if (schemaConfig.query) { + schemaConfig.query = mapType(schemaConfig.query); + } + if (schemaConfig.mutation) { + schemaConfig.mutation = mapType(schemaConfig.mutation); + } + if (schemaConfig.subscription) { + schemaConfig.subscription = mapType(schemaConfig.subscription); + } + if (schemaConfig.directives) { + for (const directiveConfig of schemaConfig.directives) { + for (const argConfig of directiveConfig.args) { + argConfig.type = mapType(argConfig.type); + } + } + } + const schema = new graphql_1.GraphQLSchema(schemaConfig); + return schema; +} +//# sourceMappingURL=makeGrafastSchema.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/makeGrafastSchema.js.map b/grafast/grafast/dist/makeGrafastSchema.js.map new file mode 100644 index 0000000000..2a3eb4ef65 --- /dev/null +++ b/grafast/grafast/dist/makeGrafastSchema.js.map @@ -0,0 +1 @@ +{"version":3,"file":"makeGrafastSchema.js","sourceRoot":"","sources":["../src/makeGrafastSchema.ts"],"names":[],"mappings":";;AAmIA,8CA6eC;;AAzmBD,qCAAwC;AACxC,yDAAmC;AAWnC,yCAA4C;AAE5C,MAAM,EACJ,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,KAAK,GACN,GAAG,OAAO,CAAC;AAiGZ;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,OAIjC;IACC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAE/D,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QAChD,iBAAiB;KAClB,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,EAEtC,CAAC;IAEF,MAAM,UAA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K,EAAE,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;QACL,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;QAC1C,OAAO,eAAe,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;QACvB,YAAY,CAAC,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC1B,YAAY,CAAC,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,YAAY,CAAC,YAAY,EAAE,CAAC;QAC9B,YAAY,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;QAC5B,KAAK,MAAM,eAAe,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;YACtD,KAAK,MAAM,SAAS,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC;gBAC7C,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,uBAAa,CAAC,YAAY,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/mermaid.d.ts b/grafast/grafast/dist/mermaid.d.ts new file mode 100644 index 0000000000..a77c30706d --- /dev/null +++ b/grafast/grafast/dist/mermaid.d.ts @@ -0,0 +1,17 @@ +import type { GrafastPlanJSON } from "./interfaces"; +/** + * An array of hex colour codes that we use for colouring the buckets/steps in + * the mermaid-js plan diagram. + * + * Generated by mokole.com/palette.html; re-ordered by Jem + */ +export declare const COLORS: string[]; +export interface PrintPlanGraphOptions { + printPathRelations?: boolean; + includePaths?: boolean; + concise?: boolean; + skipBuckets?: boolean; +} +export declare function planToMermaid(planJSON: GrafastPlanJSON, { concise, skipBuckets, }?: PrintPlanGraphOptions): string; +export * from "./planJSONInterfaces.js"; +//# sourceMappingURL=mermaid.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/mermaid.d.ts.map b/grafast/grafast/dist/mermaid.d.ts.map new file mode 100644 index 0000000000..6da18612b4 --- /dev/null +++ b/grafast/grafast/dist/mermaid.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mermaid.d.ts","sourceRoot":"","sources":["../src/mermaid.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,cAAc,CAAC;AAGtB;;;;;GAKG;AACH,eAAO,MAAM,MAAM,UAkBlB,CAAC;AAsCF,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAUD,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,EACzB,EAEE,OAAe,EACf,WAAuE,GACxE,GAAE,qBAA0B,GAC5B,MAAM,CA2WR;AASD,cAAc,yBAAyB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/mermaid.js b/grafast/grafast/dist/mermaid.js new file mode 100644 index 0000000000..bc34d43041 --- /dev/null +++ b/grafast/grafast/dist/mermaid.js @@ -0,0 +1,402 @@ +"use strict"; +/* + * This file contains all our utilities for dealing with Mermaid-js + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mermaidEscape = exports.COLORS = void 0; +exports.planToMermaid = planToMermaid; +const tslib_1 = require("tslib"); +const stripAnsi_js_1 = require("./stripAnsi.js"); +/** + * An array of hex colour codes that we use for colouring the buckets/steps in + * the mermaid-js plan diagram. + * + * Generated by mokole.com/palette.html; re-ordered by Jem + */ +exports.COLORS = [ + "#696969", + "#00bfff", + "#7f007f", + "#ffa500", + "#0000ff", + "#7fff00", + "#ff1493", + "#808000", + "#dda0dd", + "#ff0000", + "#ffff00", + "#00ffff", + "#4169e1", + "#3cb371", + "#a52a2a", + "#ff00ff", + "#f5deb3", +]; +/** + * Given a string, escapes the string so that it can be embedded as the description of a node in a mermaid chart. + * + * 1. If it's already safe, returns it verbatim + * 2. If it contains disallowed characters, escape them by replacing them with similar-looking characters, + * 3. Wrap the string in quote marks. + * + * @remarks + * + * NOTE: rather than doing literal escapes, we replace with lookalike characters because: + * + * 1. Mermaid has a bug when calculating the width of the node that doesn't respect escapes, + * 2. It's easier to read the raw mermaid markup with substitutes rather than messy escapes. + * + * @internal + */ +const mermaidEscape = (str) => { + if (str.match(/^[a-z0-9 ]+$/i)) { + return str; + } + // Technically we should replace with escapes like this: + //.replace(/[#"]/g, (l) => ({ "#": "#35;", '"': "#quot;" }[l as any])) + // However there's a bug in Mermaid's rendering that causes the node to use + // the escaped string as the width for the node rather than the unescaped + // string. Thus we replace with similar looking characters. + return `"${(0, stripAnsi_js_1.stripAnsi)(str.trim()) + .replace(/[#"<>]/g, (l) => ({ "#": "ꖛ", '"': "”", "<": "ᐸ", ">": "ᐳ" })[l]) + .replace(/\r?\n/g, "
")}"`; +}; +exports.mermaidEscape = mermaidEscape; +function isGrafastPlanJSONv1(json) { + return json.version === "v1"; +} +function shouldHideStep(step) { + return step.extra?.constant?.type === "undefined"; +} +function planToMermaid(planJSON, { +// printPathRelations = false, +concise = false, skipBuckets = global.grafastExplainMermaidSkipBuckets ?? false, } = {}) { + if (!isGrafastPlanJSONv1(planJSON)) { + throw new Error("planToMermaid only supports v1 plan JSON"); + } + const stepById = Object.create(null); + const layerPlanById = Object.create(null); + const dependentsByStepId = Object.create(null); + const sortedSteps = []; + const extractSteps = (bucket) => { + layerPlanById[bucket.id] = bucket; + // Shallowest bucket first, then most dependencies + const sorted = [...bucket.steps].sort((a, z) => z.dependencyIds.length - a.dependencyIds.length); + for (const step of sorted) { + if (stepById[step.id]) { + throw new Error(`Step ${step.id} (${step.stepClass}/${step.metaString}) duplicated in plan?!`); + } + stepById[step.id] = step; + sortedSteps.push(step); + for (const depId of step.dependencyIds) { + if (!dependentsByStepId[depId]) { + dependentsByStepId[depId] = [step]; + } + else { + dependentsByStepId[depId].push(step); + } + } + } + for (const child of bucket.children) { + extractSteps(child); + } + }; + extractSteps(planJSON.rootBucket); + const color = (i) => { + return exports.COLORS[i % exports.COLORS.length]; + }; + const planStyle = `fill:#fff,stroke-width:1px,color:#000`; + const itemplanStyle = `fill:#fff,stroke-width:2px,color:#000`; + const unbatchedplanStyle = `fill:#dff,stroke-width:1px,color:#000`; + const sideeffectplanStyle = `fill:#fcc,stroke-width:2px,color:#000`; + const graph = [ + `%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%`, + `${concise ? "flowchart" : "graph"} TD`, + ` classDef path fill:#eee,stroke:#000,color:#000`, + ` classDef plan ${planStyle}`, + ` classDef itemplan ${itemplanStyle}`, + ` classDef unbatchedplan ${unbatchedplanStyle}`, + ` classDef sideeffectplan ${sideeffectplanStyle}`, + ` classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left`, + ``, + ]; + const squish = (str, start = 8, end = 8) => { + if (str.length > start + end + 4) { + return `${str.slice(0, start)}...${str.slice(str.length - end)}`; + } + return str; + }; + const planIdMap = Object.create(null); + const planId = (plan) => { + if (!planIdMap[plan.id]) { + if (shouldHideStep(plan)) { + console.warn(`Was expecting to hide step ${plan.id}, but we're rendering it anyway?`); + } + const planName = plan.stepClass.replace(/Step$/, ""); + const planNode = `${planName}${plan.id}`; + planIdMap[plan.id] = planNode; + const rawMeta = plan.metaString; + const strippedMeta = rawMeta != null ? (0, stripAnsi_js_1.stripAnsi)(rawMeta) : null; + const meta = concise && strippedMeta ? squish(strippedMeta) : strippedMeta; + const isUnbatched = plan.supportsUnbatched; + const polyPaths = pp(plan.polymorphicPaths); + const depIdsInSameBucket = plan.dependencyIds.filter((id) => stepById[id].bucketId === plan.bucketId); + const polyPathsAreSame = depIdsInSameBucket.length >= 1 && + depIdsInSameBucket.every((id) => pp(stepById[id].polymorphicPaths) === polyPaths); + const polyPathsIfDifferent = polyPathsAreSame ? "" : `\n${polyPaths}`; + const planString = `${planName}[${plan.id}${`∈${plan.bucketId}`}${plan.stream ? "@s" : ""}]${plan.isUnary ? " ➊" : ""}${polyPathsAreSame && polyPaths !== "" ? "^" : ""}${meta ? `\n<${meta}>` : ""}${polyPathsIfDifferent}`; + const [lBrace, rBrace] = plan.stepClass === "__ItemStep" + ? ["[/", "\\]"] + : plan.isSyncAndSafe + ? isUnbatched + ? ["{{", "}}"] + : ["[", "]"] + : ["[[", "]]"]; + const planClass = plan.hasSideEffects + ? "sideeffectplan" + : plan.stepClass === "__ItemStep" + ? "itemplan" + : isUnbatched && !plan.isSyncAndSafe + ? "unbatchedplan" + : "plan"; + graph.push(` ${planNode}${lBrace}${(0, exports.mermaidEscape)(planString)}${rBrace}:::${planClass}`); + } + return planIdMap[plan.id]; + }; + graph.push(""); + graph.push(" %% plan dependencies"); + const chainByDep = Object.create(null); + const depDeets = (step, idx) => { + const forbiddenFlags = step.dependencyForbiddenFlags[idx]; + const onReject = step.dependencyOnReject[idx]; + const info = []; + if (forbiddenFlags) { + if ((forbiddenFlags & 2) === 2) { + info.push("rejectNull"); + } + if ((forbiddenFlags & 1) === 0) { + info.push("trapError"); + } + if ((forbiddenFlags & 4) === 0) { + info.push("trapInhibited"); + } + if (onReject) { + info.push(`onReject=${trim((0, stripAnsi_js_1.stripAnsi)(onReject))}`); + } + } + const str = info.join(";"); + if (str) { + return `|${(0, exports.mermaidEscape)(str)}|`; + } + else { + return ""; + } + }; + sortedSteps.forEach( + // This comment is here purely to maintain the previous formatting to reduce a git diff. + (plan) => { + if (shouldHideStep(plan)) + return; + const planNode = planId(plan); + const depNodes = plan.dependencyIds + .map((depId) => { + const step = stepById[depId]; + if (shouldHideStep(step)) { + return null; + } + else { + return planId(step); + } + }) + .filter((n) => n !== null); + const transformItemPlanNode = null; + /* + plan.stepClass === '__ListTransformStep' + ? planId( + steps[operationPlan.transformDependencyPlanIdByTransformStepId[plan.id]], + ) + : null; + */ + if (depNodes.length > 0) { + if (plan.stepClass === "__ItemStep") { + const [firstDep, ...rest] = depNodes; + const arrow = plan.extra?.transformStepId == null ? "==>" : "-.->"; + graph.push(` ${firstDep} ${arrow}${depDeets(plan, 0)} ${planNode}`); + if (rest.length > 0) { + const normal = []; + for (let i = 0; i < rest.length; i++) { + const r = rest[i]; + const deets = depDeets(plan, i + 1); + if (deets) { + graph.push(` ${r} -->${deets} ${planNode}`); + } + else { + normal.push(r); + } + } + outputGroupedNormalLinks(graph, planNode, normal); + } + } + else { + if (concise && + !dependentsByStepId[plan.id] && + depNodes.length === 1) { + // Try alternating the nodes so they render closer together + const depNode = depNodes[0]; + if (chainByDep[depNode] === undefined) { + graph.push(` ${depNode} -->${depDeets(plan, 0)} ${planNode}`); + } + else { + graph.push(` ${chainByDep[depNode]} o--o${depDeets(plan, 0)} ${planNode}`); + } + chainByDep[depNode] = planNode; + } + else { + const normal = []; + for (let i = 0; i < depNodes.length; i++) { + const r = depNodes[i]; + const deets = depDeets(plan, i + 1); + if (deets) { + graph.push(` ${r} -->${deets} ${planNode}`); + } + else { + normal.push(r); + } + } + outputGroupedNormalLinks(graph, planNode, normal); + } + } + } + if (transformItemPlanNode) { + graph.push(` ${transformItemPlanNode} -.-> ${planNode}`); + } + return plan; + }); + graph.push(""); + graph.push(" %% define steps"); + sortedSteps.forEach((step) => { + if (!shouldHideStep(step)) { + planId(step); + } + }); + const stepToString = (step) => { + return `${step.stepClass.replace(/Step$/, "")}${step.bucketId === 0 ? "" : `{${step.bucketId}}`}${step.metaString ? `<${step.metaString}>` : ""}[${step.id}]`; + }; + let firstSideEffect = true; + sortedSteps.forEach((step) => { + if (step.implicitSideEffectStepId) { + if (firstSideEffect) { + graph.push(""); + graph.push(" %% implicit side effects"); + firstSideEffect = false; + } + const sideEffectStep = stepById[step.implicitSideEffectStepId]; + graph.push(` ${planId(sideEffectStep)} -.-o ${planId(step)}`); + } + }); + graph.push(""); + if (!concise && !skipBuckets) + graph.push(" subgraph Buckets"); + const layerPlans = Object.values(layerPlanById); + for (let i = 0, l = layerPlans.length; i < l; i++) { + const layerPlan = layerPlans[i]; + const steps = layerPlan.steps; + const raisonDEtre = ` (${layerPlan.reason.type})` + + (layerPlan.reason.type === "polymorphic" + ? `\n${layerPlan.reason.typeNames}` + : ``); + if (!skipBuckets) { + graph.push(` Bucket${layerPlan.id}(${(0, exports.mermaidEscape)(`Bucket ${layerPlan.id}${raisonDEtre}${layerPlan.parentSideEffectStepId != null + ? `\nParent side effect step: ${stepById[layerPlan.parentSideEffectStepId].id}` + : ""}${layerPlan.copyStepIds.length > 0 + ? `\nDeps: ${layerPlan.copyStepIds + .map((pId) => stepById[pId].id) + .join(", ")}` + : ""}${layerPlan.reason.type === "polymorphic" + ? "\n" + pp(layerPlan.reason.polymorphicPaths) + : ""}\n${layerPlan.rootStepId != null && layerPlan.reason.type !== "root" + ? `\nROOT ${stepToString(stepById[layerPlan.rootStepId])}` + : ""}${startSteps(layerPlan)}`)}):::bucket`); + } + graph.push(` classDef bucket${layerPlan.id} stroke:${color(layerPlan.id)}`); + graph.push(` class ${[ + `Bucket${layerPlan.id}`, + ...steps.filter((s) => !shouldHideStep(s)).map(planId), + ].join(",")} bucket${layerPlan.id}`); + } + if (!skipBuckets) { + for (let i = 0, l = layerPlans.length; i < l; i++) { + const layerPlan = layerPlans[i]; + const childNodes = layerPlan.children.map((c) => `Bucket${c.id}`); + if (childNodes.length > 0) { + graph.push(` Bucket${layerPlan.id} --> ${childNodes.join(" & ")}`); + } + } + } + if (!concise && !skipBuckets) + graph.push(" end"); + const graphString = graph.join("\n"); + return graphString; + function startSteps(layerPlan) { + function shortStep(step) { + return `${step.stepClass.replace(/Step$/, "") ?? ""}[${step.id}]`; + } + function shortSteps(steps) { + if (!steps) { + return ""; + } + const str = steps.map(shortStep).join(", "); + if (str.length < 40) { + return str; + } + else { + return steps.map((s) => s.id).join(", "); + } + } + return layerPlan.phases.length === 1 + ? `` + : `\n${layerPlan.phases + .map((phase, i) => `${i + 1}: ${shortSteps(phase.normalStepIds?.map((id) => stepById[id]))}${phase.unbatchedStepIds + ? `\n>: ${shortSteps(phase.unbatchedStepIds.map((id) => stepById[id]))}` + : ""}`) + .join("\n")}`; + } +} +function pp(polymorphicPaths) { + if (!polymorphicPaths) { + return ""; + } + return polymorphicPaths.map((p) => `${p}`).join("\n"); +} +tslib_1.__exportStar(require("./planJSONInterfaces.js"), exports); +function trim(string, length = 15) { + if (string.length > length) { + return string.substring(0, length - 2) + "…"; + } + else { + return string; + } +} +function outputGroupedNormalLinks(graph, planNode, normal) { + if (normal.length) { + const counts = Object.create(null); + for (const n of normal) { + if (counts[n]) { + counts[n]++; + } + else { + counts[n] = 1; + } + } + const oners = Object.keys(counts).filter((n) => counts[n] === 1); + if (oners.length >= 1) { + graph.push(` ${oners.join(" & ")} --> ${planNode}`); + } + for (const [n, c] of Object.entries(counts)) { + if (c !== 1) { + graph.push(` ${n} -- ${c} --> ${planNode}`); + } + } + } +} +//# sourceMappingURL=mermaid.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/mermaid.js.map b/grafast/grafast/dist/mermaid.js.map new file mode 100644 index 0000000000..f393c16628 --- /dev/null +++ b/grafast/grafast/dist/mermaid.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mermaid.js","sourceRoot":"","sources":["../src/mermaid.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAuFH,sCAkXC;;AAjcD,iDAA2C;AAE3C;;;;;GAKG;AACU,QAAA,MAAM,GAAG;IACpB,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS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grafast/grafast/dist/middleware.d.ts new file mode 100644 index 0000000000..fc4b60af6e --- /dev/null +++ b/grafast/grafast/dist/middleware.d.ts @@ -0,0 +1,7 @@ +import { Middleware } from "graphile-config"; +declare const $$middleware: unique symbol; +export declare function getGrafastMiddleware(resolvedPreset: GraphileConfig.ResolvedPreset & { + [$$middleware]?: Middleware | null; +}): Middleware | null; +export {}; +//# sourceMappingURL=middleware.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/middleware.d.ts.map b/grafast/grafast/dist/middleware.d.ts.map new file mode 100644 index 0000000000..018c2c1045 --- /dev/null +++ b/grafast/grafast/dist/middleware.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AAE3D,QAAA,MAAM,YAAY,eAAuB,CAAC;AAC1C,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,cAAc,CAAC,cAAc,GAAG;IAC9C,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;CACtE,uDAoBF"} \ No newline at end of file diff --git a/grafast/grafast/dist/middleware.js b/grafast/grafast/dist/middleware.js new file mode 100644 index 0000000000..96065ae802 --- /dev/null +++ b/grafast/grafast/dist/middleware.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getGrafastMiddleware = getGrafastMiddleware; +const graphile_config_1 = require("graphile-config"); +const $$middleware = Symbol("middleware"); +function getGrafastMiddleware(resolvedPreset) { + if (resolvedPreset[$$middleware] !== undefined) { + return resolvedPreset[$$middleware]; + } + let middleware = null; + (0, graphile_config_1.orderedApply)(resolvedPreset.plugins, (p) => p.grafast?.middleware, (name, fn, _plugin) => { + if (!middleware) + middleware = new graphile_config_1.Middleware(); + middleware.register(name, fn); + }); + try { + resolvedPreset[$$middleware] = middleware; + } + catch { + // Ignore - preset must be readonly + } + return middleware; +} +//# sourceMappingURL=middleware.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/middleware.js.map b/grafast/grafast/dist/middleware.js.map new file mode 100644 index 0000000000..ae63263670 --- /dev/null +++ b/grafast/grafast/dist/middleware.js.map @@ -0,0 +1 @@ +{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":";;AAGA,oDAuBC;AA1BD,qDAA2D;AAE3D,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAC1C,SAAgB,oBAAoB,CAClC,cAEC;IAED,IAAI,cAAc,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;QAC/C,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,UAAU,GAAwD,IAAI,CAAC;IAC3E,IAAA,8BAAY,EACV,cAAc,CAAC,OAAO,EACtB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,EAC5B,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;QACpB,IAAI,CAAC,UAAU;YAAE,UAAU,GAAG,IAAI,4BAAU,EAAE,CAAC;QAC/C,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAS,CAAC,CAAC;IACvC,CAAC,CACF,CAAC;IACF,IAAI,CAAC;QACH,cAAc,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,mCAAmC;IACrC,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/multistep.d.ts b/grafast/grafast/dist/multistep.d.ts new file mode 100644 index 0000000000..b232b2d1b0 --- /dev/null +++ b/grafast/grafast/dist/multistep.d.ts @@ -0,0 +1,19 @@ +import { Step } from "./step.js"; +/** + * When using this, always use `const`! Otherwise tuples will show up as arrays + * and break things. + */ +export type Multistep = null | undefined | Step | readonly [...(readonly Step[])] | Record; +export type UnwrapMultistep = TMultistepSpec extends null ? null : TMultistepSpec extends undefined ? undefined : TMultistepSpec extends Step ? U : TMultistepSpec extends readonly [...(readonly any[])] ? { + [index in keyof TMultistepSpec]: TMultistepSpec[index] extends Step ? V : never; +} : { + [key in keyof TMultistepSpec]: TMultistepSpec[key] extends Step ? V : never; +}; +interface MultistepCacheConfig { + identifier: string; + cacheSize: number; +} +export declare function multistep(spec: TMultistepSpec, stable?: string | true | MultistepCacheConfig): Step>; +export declare function isMultistep(spec: any): spec is TMultistepSpec; +export {}; +//# sourceMappingURL=multistep.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/multistep.d.ts.map b/grafast/grafast/dist/multistep.d.ts.map new file mode 100644 index 0000000000..1b18ad6090 --- /dev/null +++ b/grafast/grafast/dist/multistep.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"multistep.d.ts","sourceRoot":"","sources":["../src/multistep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAMjC;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,IAAI,GACJ,SAAS,GACT,IAAI,GACJ,SAAS,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAEzB,MAAM,MAAM,eAAe,CAAC,cAAc,SAAS,SAAS,IAC1D,cAAc,SAAS,IAAI,GACvB,IAAI,GACJ,cAAc,SAAS,SAAS,GAC9B,SAAS,GACT,cAAc,SAAS,IAAI,CAAC,MAAM,CAAC,CAAC,GAClC,CAAC,GACD,cAAc,SAAS,SAAS,CAAC,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,GACnD;KACG,KAAK,IAAI,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,SAAS,IAAI,CACjE,MAAM,CAAC,CACR,GACG,CAAC,GACD,KAAK;CACV,GACD;KACG,GAAG,IAAI,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,SAAS,IAAI,CAC7D,MAAM,CAAC,CACR,GACG,CAAC,GACD,KAAK;CACV,CAAC;AAEd,UAAU,oBAAoB;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,KAAK,CAAC,cAAc,SAAS,SAAS,EAC9D,IAAI,EAAE,cAAc,EACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,oBAAoB,GAC5C,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAwBvC;AAED,wBAAgB,WAAW,CAAC,KAAK,CAAC,cAAc,SAAS,SAAS,EAChE,IAAI,EAAE,GAAG,GACR,IAAI,IAAI,cAAc,CAexB"} \ No newline at end of file diff --git a/grafast/grafast/dist/multistep.js b/grafast/grafast/dist/multistep.js new file mode 100644 index 0000000000..494007ddc0 --- /dev/null +++ b/grafast/grafast/dist/multistep.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multistep = multistep; +exports.isMultistep = isMultistep; +const step_js_1 = require("./step.js"); +const constant_js_1 = require("./steps/constant.js"); +const list_js_1 = require("./steps/list.js"); +const object_js_1 = require("./steps/object.js"); +const utils_js_1 = require("./utils.js"); +function multistep(spec, stable) { + if (spec == null) { + return (0, constant_js_1.constant)(spec); + } + else if (spec instanceof step_js_1.Step) { + return spec; + } + else if ((0, utils_js_1.isTuple)(spec)) { + const config = stable === true + ? { identifier: `multistep` } + : typeof stable === "string" + ? { identifier: stable } + : stable; + const $step = (0, list_js_1.list)(spec, config); + return $step; + } + else { + const config = stable === true + ? { identifier: `multistep` } + : typeof stable === "string" + ? { identifier: stable } + : stable; + const $step = (0, object_js_1.object)(spec, config); + return $step; + } +} +function isMultistep(spec) { + if (spec == null) { + return true; + } + else if (spec instanceof step_js_1.Step) { + return true; + } + else if ((0, utils_js_1.isTuple)(spec) && spec.every((s) => s instanceof step_js_1.Step)) { + return true; + } + else if (typeof spec === "object" && + Object.values(spec).every((s) => s instanceof step_js_1.Step)) { + return true; + } + else { + return false; + } +} +//# sourceMappingURL=multistep.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/multistep.js.map b/grafast/grafast/dist/multistep.js.map new file mode 100644 index 0000000000..ac08ba2ad8 --- /dev/null +++ b/grafast/grafast/dist/multistep.js.map @@ -0,0 +1 @@ +{"version":3,"file":"multistep.js","sourceRoot":"","sources":["../src/multistep.ts"],"names":[],"mappings":";;AA6CA,8BA2BC;AAED,kCAiBC;AA3FD,uCAAiC;AACjC,qDAA+C;AAC/C,6CAAuC;AACvC,iDAA2C;AAC3C,yCAAqC;AAyCrC,SAAgB,SAAS,CACvB,IAAoB,EACpB,MAA6C;IAE7C,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,IAAA,sBAAQ,EAAC,IAAI,CAAQ,CAAC;IAC/B,CAAC;SAAM,IAAI,IAAI,YAAY,cAAI,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAA,kBAAO,EAAC,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,MAAM,GACV,MAAM,KAAK,IAAI;YACb,CAAC,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE;YAC7B,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ;gBAC1B,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE;gBACxB,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,KAAK,GAAG,IAAA,cAAI,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACjC,OAAO,KAAY,CAAC;IACtB,CAAC;SAAM,CAAC;QACN,MAAM,MAAM,GACV,MAAM,KAAK,IAAI;YACb,CAAC,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE;YAC7B,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ;gBAC1B,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE;gBACxB,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,KAAK,GAAG,IAAA,kBAAM,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,KAAY,CAAC;IACtB,CAAC;AACH,CAAC;AAED,SAAgB,WAAW,CACzB,IAAS;IAET,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAI,YAAY,cAAI,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAA,kBAAO,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,cAAI,CAAC,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IACL,OAAO,IAAI,KAAK,QAAQ;QACxB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,cAAI,CAAC,EACnD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/operationPlan-input.d.ts b/grafast/grafast/dist/operationPlan-input.d.ts new file mode 100644 index 0000000000..c24ea49706 --- /dev/null +++ b/grafast/grafast/dist/operationPlan-input.d.ts @@ -0,0 +1,8 @@ +import type { GraphQLField, GraphQLInputType, GraphQLNullableType } from "graphql"; +import type { OperationPlan } from "./engine/OperationPlan.js"; +import type { FieldArgs, TrackedArguments } from "./interfaces.js"; +import type { Step } from "./step.js"; +export type ApplyAfterModeArg = "plan" | "subscribePlan"; +export declare function withFieldArgsForArguments(operationPlan: OperationPlan, $all: TrackedArguments, field: GraphQLField, $parent: Step, applyAfterMode: ApplyAfterModeArg, coordinate: string, callback: (fieldArgs: FieldArgs) => T | null | undefined): Exclude | null; +export declare function getNullableInputTypeAtPath(startType: GraphQLInputType, path: ReadonlyArray): GraphQLInputType & GraphQLNullableType; +//# sourceMappingURL=operationPlan-input.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/operationPlan-input.d.ts.map b/grafast/grafast/dist/operationPlan-input.d.ts.map new file mode 100644 index 0000000000..d0f68de284 --- /dev/null +++ b/grafast/grafast/dist/operationPlan-input.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"operationPlan-input.d.ts","sourceRoot":"","sources":["../src/operationPlan-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAS/D,OAAO,KAAK,EAGV,SAAS,EACT,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAMtC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,eAAe,CAAC;AAUzD,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,IAAI,EACtD,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAClC,OAAO,EAAE,IAAI,EACb,cAAc,EAAE,iBAAiB,EACjC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,CAAC,GAAG,IAAI,GAAG,SAAS,GACvD,OAAO,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG,IAAI,CA4KrC;AAiED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,gBAAgB,EAC3B,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,GACnC,gBAAgB,GAAG,mBAAmB,CA8BxC"} \ No newline at end of file diff --git a/grafast/grafast/dist/operationPlan-input.js b/grafast/grafast/dist/operationPlan-input.js new file mode 100644 index 0000000000..f79b97904c --- /dev/null +++ b/grafast/grafast/dist/operationPlan-input.js @@ -0,0 +1,228 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withFieldArgsForArguments = withFieldArgsForArguments; +exports.getNullableInputTypeAtPath = getNullableInputTypeAtPath; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const index_js_1 = require("./index.js"); +const inspect_js_1 = require("./inspect.js"); +const utils_js_1 = require("./utils.js"); +const { getNullableType, isInputObjectType, isListType } = graphql; +function assertNotRuntime(operationPlan, description) { + if (operationPlan.phase === "ready") { + throw new Error(`${description} may only be called at planning time; however you have code that has attempted to call it during execution time. Please revisit your plan resolvers to locate the issue.`); + } +} +function withFieldArgsForArguments(operationPlan, $all, field, $parent, applyAfterMode, coordinate, callback) { + if (operationPlan.loc !== null) + operationPlan.loc.push(`withFieldArgsForArguments(${field.name})`); + const args = Object.create(null); + for (const arg of field.args) { + args[arg.name] = arg; + } + const applied = new Map(); + let explicitlyApplied = false; + const fieldArgs = { + typeAt(path) { + if (typeof path === "string") { + return args[path].type; + } + else { + if (path.length === 0) { + throw new Error(`typeAt can only be used with a non-empty path since arguments themselves don't belong to a type but a field.`); + } + const argName = path[0]; + let type = args[argName]?.type; + if (!type) { + throw new Error(`Argument ${argName} does not exist`); + } + for (let i = 1, l = path.length; i < l; i++) { + const segment = path[i]; + type = graphql.isNonNullType(type) ? type.ofType : type; + if (typeof segment === "number") { + if (!isListType(type)) { + throw new Error(`Invalid path ${path.slice(1)} within argument ${argName}; expected a list at path index ${i - 1}`); + } + type = type.ofType; + } + else { + if (!isInputObjectType(type)) { + throw new Error(`Invalid path ${path.slice(1)} within argument ${argName}; expected an object at path index ${i - 1}`); + } + const arg = type.getFields()[segment]; + if (!arg) { + throw new Error(`Invalid path ${path.slice(1)} within argument ${argName}; ${type} does not have a field '${segment}'`); + } + type = arg.type; + } + } + return type; + } + }, + getRaw(path) { + assertNotRuntime(operationPlan, `fieldArgs.getRaw()`); + if (path === undefined) { + return (0, index_js_1.object)(Object.fromEntries(Object.keys(args).map((argName) => [argName, $all.get(argName)]))); + } + else if (typeof path === "string") { + return $all.get(path); + } + else if (Array.isArray(path)) { + const [first, ...rest] = path; + if (!first) { + throw new Error(`getRaw() must be called with a non-empty path`); + } + let $entry = $all.get(first); + for (const pathSegment of rest) { + if (typeof pathSegment === "number" && "at" in $entry) { + $entry = $entry.at(pathSegment); + } + else if ("get" in $entry) { + $entry = $entry.get(pathSegment); + } + else { + throw new Error(`'getRaw' path must only relate to input objects right now; path was: '${path}' (failed at '${pathSegment}')`); + } + } + return $entry; + } + else { + throw new Error(`Invalid path passed to FieldArgs.getRaw(); please check your code. Path: ${(0, inspect_js_1.inspect)(path)}`); + } + }, + apply($target, inPathOrGetTargetFromParent, maybeGetTargetFromParent) { + const inPath = typeof inPathOrGetTargetFromParent === "function" + ? undefined + : inPathOrGetTargetFromParent; + const getTargetFromParent = typeof inPathOrGetTargetFromParent === "function" + ? inPathOrGetTargetFromParent + : maybeGetTargetFromParent; + assertNotRuntime(operationPlan, `fieldArgs.apply()`); + const path = Array.isArray(inPath) ? inPath : inPath ? [inPath] : []; + const pathString = path.join("."); + const $existing = applied.get(pathString); + if ($existing) { + throw new Error(`Attempted to apply 'applyPlan' at input path ${pathString} more than once - first time to ${$existing}, second time to ${$target}. Multiple applications are not currently supported.`); + } + if (path.length === 0) { + explicitlyApplied = true; + // Auto-apply all the arguments + for (const argName of Object.keys(args)) { + fieldArgs.apply($target, [argName]); + } + } + else { + const [argName, ...rest] = path; + if (typeof argName !== "string") { + throw new Error(`Invalid path; argument '${argName}' is an invalid argument name`); + } + const arg = args[argName]; + if (!arg) { + throw new Error(`Invalid path; argument '${argName}' does not exist`); + } + const typeAtPath = getNullableInputTypeAtPath(arg.type, rest); + const $valueAtPath = fieldArgs.getRaw(inPath); + if ($valueAtPath instanceof index_js_1.ConstantStep && + $valueAtPath.data === undefined) { + // Skip applying! + } + else { + $target.apply((0, index_js_1.applyInput)(typeAtPath, $valueAtPath, getTargetFromParent)); + } + } + }, + }; + for (const argName of Object.keys(args)) { + let val; + Object.defineProperty(fieldArgs, `$${argName}`, { + get() { + return (val ??= fieldArgs.getRaw(argName)); + }, + }); + } + const result = callback(fieldArgs); + (0, utils_js_1.assertNotPromise)(result, callback, operationPlan.loc?.join(">") ?? "???"); + if (!explicitlyApplied && result != null) { + processAfter($parent, fieldArgs, result, args, applyAfterMode, coordinate); + } + if (operationPlan.loc !== null) + operationPlan.loc.pop(); + return (result ?? null); +} +function processAfter($parent, rootFieldArgs, $result, args, applyAfterMode, coordinate) { + const schema = $parent.operationPlan.schema; + for (const [argName, arg] of Object.entries(args)) { + const autoApply = applyAfterMode === "plan" + ? arg.extensions.grafast?.applyPlan + : applyAfterMode === "subscribePlan" + ? arg.extensions.grafast?.applySubscribePlan + : null; + if (autoApply) { + if (arg.defaultValue === undefined) { + const $argVal = rootFieldArgs.getRaw(argName); + if ($argVal instanceof index_js_1.ConstantStep && $argVal.data === undefined) { + // no action necessary + continue; + } + } + // TODO: should this have dollars on it for accessing subkeys? + const input = { + typeAt(path) { + return rootFieldArgs.typeAt(concatPath(argName, path)); + }, + getRaw(path) { + return rootFieldArgs.getRaw(concatPath(argName, path)); + }, + apply($target, pathOrTargetGetter, maybeTargetGetter) { + if (typeof pathOrTargetGetter === "function") { + return rootFieldArgs.apply($target, [argName], pathOrTargetGetter); + } + else { + return rootFieldArgs.apply($target, concatPath(argName, pathOrTargetGetter), maybeTargetGetter); + } + }, + }; + const result = autoApply($parent, $result, input, { + schema, + arg, + argName, + }); + if (result !== undefined) { + const fullCoordinate = `${coordinate}(${argName}:)`; + throw new Error(`Argument ${fullCoordinate}'s applyPlan returned a value. This may indicate a bug in that method, please see https://err.red/gaap#coord=${encodeURIComponent(fullCoordinate)}`); + } + } + } +} +function getNullableInputTypeAtPath(startType, path) { + let type = getNullableType(startType); + for (let i = 0, l = path.length; i < l; i++) { + const segment = path[i]; + if (typeof segment === "number") { + // Expect list + if (!isListType(type)) { + throw new Error(`Invalid path passed to fieldArgs.get(); expected list type, but found ${type}`); + } + type = getNullableType(type.ofType); + } + else { + // Must be a string + if (!isInputObjectType(type)) { + throw new Error(`Invalid path passed to fieldArgs.get(); expected object type, but found ${type}`); + } + const field = type.getFields()[segment]; + if (!field) { + throw new Error(`Invalid path passed to fieldArgs.get(); ${type} has no field named ${segment}`); + } + type = getNullableType(field.type); + } + } + return type; +} +function concatPath(argName, subpath) { + if (subpath == null) + return [argName]; + const localPath = Array.isArray(subpath) ? subpath : [subpath]; + return [argName, ...localPath]; +} +//# sourceMappingURL=operationPlan-input.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/operationPlan-input.js.map b/grafast/grafast/dist/operationPlan-input.js.map new file mode 100644 index 0000000000..8336eb632d --- /dev/null +++ b/grafast/grafast/dist/operationPlan-input.js.map @@ -0,0 +1 @@ +{"version":3,"file":"operationPlan-input.js","sourceRoot":"","sources":["../src/operationPlan-input.ts"],"names":[],"mappings":";;AAuCA,8DAoLC;AAiED,gEAiCC;;AAvTD,yDAAmC;AAGnC,yCAMoB;AACpB,6CAAuC;AASvC,yCAA8C;AAE9C,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;AAInE,SAAS,gBAAgB,CAAC,aAA4B,EAAE,WAAmB;IACzE,IAAI,aAAa,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,GAAG,WAAW,0KAA0K,CACzL,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,yBAAyB,CACvC,aAA4B,EAC5B,IAAsB,EACtB,KAAkC,EAClC,OAAa,EACb,cAAiC,EACjC,UAAkB,EAClB,QAAwD;IAExD,IAAI,aAAa,CAAC,GAAG,KA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ACD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CACb,2CAA2C,IAAI,uBAAuB,OAAO,EAAE,CAChF,CAAC;YACJ,CAAC;YACD,IAAI,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CACZ,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,UAAU,CACjB,OAAe,EACf,OAA4D;IAE5D,IAAI,OAAO,IAAI,IAAI;QAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC/D,OAAO,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/planJSONInterfaces.d.ts b/grafast/grafast/dist/planJSONInterfaces.d.ts new file mode 100644 index 0000000000..ef70f4bcd0 --- /dev/null +++ b/grafast/grafast/dist/planJSONInterfaces.d.ts @@ -0,0 +1,94 @@ +import type { ExecutionEntryFlags } from "./interfaces"; +export interface GrafastPlanJSON { + version: "v1" | "v2"; +} +export interface GrafastPlanStepJSONv1 { + id: string | number; + stepClass: string; + metaString: string | null; + isUnary: boolean; + bucketId: string | number; + implicitSideEffectStepId: string | number | null; + dependencyIds: ReadonlyArray; + dependencyForbiddenFlags: ReadonlyArray; + dependencyOnReject: ReadonlyArray; + polymorphicPaths: readonly string[] | undefined; + isSyncAndSafe: boolean | undefined; + supportsUnbatched: boolean | undefined; + hasSideEffects: boolean | undefined; + stream: { + initialCountStepId?: number; + } | undefined; + extra?: Record; +} +export interface GrafastPlanBucketPhaseJSONv1 { + normalStepIds?: ReadonlyArray; + unbatchedStepIds?: ReadonlyArray; +} +export type GrafastPlanBucketReasonJSONv1 = GrafastPlanBucketReasonRootJSONv1 | GrafastPlanBucketReasonNullableFieldJSONv1 | GrafastPlanBucketReasonListItemJSONv1 | GrafastPlanBucketReasonSubscriptionJSONv1 | GrafastPlanBucketReasonMutationFieldJSONv1 | GrafastPlanBucketReasonDeferJSONv1 | GrafastPlanBucketReasonPolymorphicJSONv1 | GrafastPlanBucketReasonSubroutineJSONv1; +export interface GrafastPlanBucketReasonRootJSONv1 { + type: "root"; +} +/** Non-branching, non-deferred */ +export interface GrafastPlanBucketReasonNullableFieldJSONv1 { + type: "nullableBoundary"; + parentStepId: string | number; +} +/** Non-branching, non-deferred */ +export interface GrafastPlanBucketReasonListItemJSONv1 { + type: "listItem"; + parentStepId: string | number; + /** If this listItem is to be streamed, the configuration for that streaming */ + stream?: { + initialCountStepId?: number; + ifStepId?: number; + labelStepId?: number; + }; +} +/** Non-branching, deferred */ +export interface GrafastPlanBucketReasonSubscriptionJSONv1 { + type: "subscription"; +} +/** Non-branching, deferred */ +export interface GrafastPlanBucketReasonMutationFieldJSONv1 { + type: "mutationField"; + mutationIndex: number; +} +/** Non-branching, deferred */ +export interface GrafastPlanBucketReasonDeferJSONv1 { + type: "defer"; + label?: string; +} +/** Branching, non-deferred */ +export interface GrafastPlanBucketReasonPolymorphicJSONv1 { + type: "polymorphic"; + typeNames: readonly string[]; + parentStepId: string | number; + polymorphicPaths: ReadonlyArray; +} +/** Non-branching, non-deferred */ +export interface GrafastPlanBucketReasonSubroutineJSONv1 { + type: "subroutine"; + parentStepId: string | number; +} +export interface GrafastPlanBucketJSONv1 { + id: number; + reason: GrafastPlanBucketReasonJSONv1; + parentSideEffectStepId: string | number | null; + copyStepIds: ReadonlyArray; + steps: ReadonlyArray; + rootStepId: string | number | null; + phases: ReadonlyArray; + children: ReadonlyArray; +} +export interface GrafastPlanJSONv1 extends GrafastPlanJSON { + version: "v1"; + rootBucket: GrafastPlanBucketJSONv1; +} +export type JSONValue = boolean | number | string | null | JSONObject | JSONArray; +export interface JSONObject { + [key: string]: JSONValue; +} +export interface JSONArray extends Array { +} +//# sourceMappingURL=planJSONInterfaces.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/planJSONInterfaces.d.ts.map b/grafast/grafast/dist/planJSONInterfaces.d.ts.map new file mode 100644 index 0000000000..c9962cc9cf --- /dev/null +++ b/grafast/grafast/dist/planJSONInterfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"planJSONInterfaces.d.ts","sourceRoot":"","sources":["../src/planJSONInterfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,wBAAwB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACjD,aAAa,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC9C,wBAAwB,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC7D,kBAAkB,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IAC7D,gBAAgB,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAChD,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE;QAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACpD,KAAK,CAAC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AAE,SAAS,MAAM,EAAE,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACzC;AACD,kCAAkC;AAClC,MAAM,WAAW,uCAAuC;IACtD,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,6BAA6B,CAAC;IACtC,sBAAsB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/C,WAAW,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,KAAK,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;IACpD,QAAQ,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,OAAO,EAAE,IAAI,CAAC;IACd,UAAU,EAAE,uBAAuB,CAAC;CACrC;AAED,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,GACJ,UAAU,GACV,SAAS,CAAC;AACd,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AACD,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC;CAAG"} \ No newline at end of file diff --git a/grafast/grafast/dist/planJSONInterfaces.js b/grafast/grafast/dist/planJSONInterfaces.js new file mode 100644 index 0000000000..7efe6f0690 --- /dev/null +++ b/grafast/grafast/dist/planJSONInterfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=planJSONInterfaces.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/planJSONInterfaces.js.map b/grafast/grafast/dist/planJSONInterfaces.js.map new file mode 100644 index 0000000000..51f4f78ba7 --- /dev/null +++ b/grafast/grafast/dist/planJSONInterfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"planJSONInterfaces.js","sourceRoot":"","sources":["../src/planJSONInterfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/grafast/dist/polymorphic.d.ts b/grafast/grafast/dist/polymorphic.d.ts new file mode 100644 index 0000000000..4bcb04f0fb --- /dev/null +++ b/grafast/grafast/dist/polymorphic.d.ts @@ -0,0 +1,14 @@ +import type { PolymorphicData } from "./interfaces.js"; +export declare function isPolymorphicData(data: unknown): data is PolymorphicData; +export declare function assertPolymorphicData(data: unknown): asserts data is PolymorphicData; +/** + * Returns an object with the given concrete type (and, optionally, associated + * data) + */ +export declare function polymorphicWrap(type: TType, data?: TData): PolymorphicData; +/** + * All polymorphic objects in Grafast have a $$concreteType property which + * contains the GraphQL object's type name; we simply return that. + */ +export declare function resolveType(o: unknown): string; +//# sourceMappingURL=polymorphic.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/polymorphic.d.ts.map b/grafast/grafast/dist/polymorphic.d.ts.map new file mode 100644 index 0000000000..1eb7e75437 --- /dev/null +++ b/grafast/grafast/dist/polymorphic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../src/polymorphic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,eAAe,CAQxE;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,IAAI,eAAe,CAIjC;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK,EACzD,IAAI,EAAE,KAAK,EAEX,IAAI,GAAE,KAA2B,GAChC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAyB/B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAG9C"} \ No newline at end of file diff --git a/grafast/grafast/dist/polymorphic.js b/grafast/grafast/dist/polymorphic.js new file mode 100644 index 0000000000..a7b1079466 --- /dev/null +++ b/grafast/grafast/dist/polymorphic.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPolymorphicData = isPolymorphicData; +exports.assertPolymorphicData = assertPolymorphicData; +exports.polymorphicWrap = polymorphicWrap; +exports.resolveType = resolveType; +const inspect_js_1 = require("./inspect.js"); +const interfaces_js_1 = require("./interfaces.js"); +function isPolymorphicData(data) { + if (typeof data !== "object" || data === null) { + return false; + } + if (typeof data[interfaces_js_1.$$concreteType] !== "string") { + return false; + } + return true; +} +function assertPolymorphicData(data) { + if (!isPolymorphicData(data)) { + throw new Error(`Expected a polymorphic object, received ${(0, inspect_js_1.inspect)(data)}`); + } +} +// const EMPTY_OBJECT = Object.freeze(Object.create(null)); +/** + * Returns an object with the given concrete type (and, optionally, associated + * data) + */ +function polymorphicWrap(type, +// TODO: when we stop mutating `data` we can replace this with `EMPTY_OBJECT` +data = Object.create(null)) { + // ENHANCE: validate type further, e.g. that it's a valid object type + if (typeof type !== "string") { + throw new Error(`Expected a GraphQLObjectType name, but received ${(0, inspect_js_1.inspect)(type)}`); + } + if (data == null) { + throw new Error(`polymorphicWrap mustn't receive null-like data`); + } + Object.defineProperty(data, interfaces_js_1.$$concreteType, { + value: type, + enumerable: false, + writable: false, + configurable: false, + }); + // TODO: should NOT mutate `data`, instead use a wrapper object and rewire + // through the pipeline. + return data; + /* + return Object.assign(Object.create(null), { + [$$concreteType]: type, + [$$data]: data, + }); + */ +} +/** + * All polymorphic objects in Grafast have a $$concreteType property which + * contains the GraphQL object's type name; we simply return that. + */ +function resolveType(o) { + assertPolymorphicData(o); + return o[interfaces_js_1.$$concreteType]; +} +/* TODO: we should be extracting data from a subproperty when we rewrite how polymorphism works. +/* * + * All polymorphic objects in Grafast have a $$concreteType property which + * contains the GraphQL object's type name; we simply return that. + * / +export function resolveData(o: unknown): string { + assertPolymorphicData(o); + return o[$$data]; +} +*/ +//# sourceMappingURL=polymorphic.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/polymorphic.js.map b/grafast/grafast/dist/polymorphic.js.map new file mode 100644 index 0000000000..e391159315 --- /dev/null +++ b/grafast/grafast/dist/polymorphic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polymorphic.js","sourceRoot":"","sources":["../src/polymorphic.ts"],"names":[],"mappings":";;AAIA,8CAQC;AAED,sDAMC;AAQD,0CA6BC;AAMD,kCAGC;AAlED,6CAAuC;AAEvC,mDAAiD;AAEjD,SAAgB,iBAAiB,CAAC,IAAa;IAC7C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,OAAQ,IAAY,CAAC,8BAAc,CAAC,KAAK,QAAQ,EAAE,CAAC;QACtD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,qBAAqB,CACnC,IAAa;IAEb,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,2CAA2C,IAAA,oBAAO,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC;AAED,2DAA2D;AAE3D;;;GAGG;AACH,SAAgB,eAAe,CAC7B,IAAW;AACX,6EAA6E;AAC7E,OAAc,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAEjC,qEAAqE;IACrE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,mDAAmD,IAAA,oBAAO,EAAC,IAAI,CAAC,EAAE,CACnE,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,8BAAc,EAAE;QAC1C,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;IACH,0EAA0E;IAC1E,wBAAwB;IACxB,OAAO,IAAgD,CAAC;IACxD;;;;;MAKE;AACJ,CAAC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,CAAU;IACpC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACzB,OAAO,CAAC,CAAC,8BAAc,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;;;EASE"} \ No newline at end of file diff --git a/grafast/grafast/dist/prepare.d.ts b/grafast/grafast/dist/prepare.d.ts new file mode 100644 index 0000000000..7e64e67aee --- /dev/null +++ b/grafast/grafast/dist/prepare.d.ts @@ -0,0 +1,28 @@ +import type { GrafastPlanJSON } from "./index.js"; +import type { GrafastTimeouts } from "./interfaces.js"; +declare const $$contextPlanCache: unique symbol; +export interface GrafastPrepareOptions { + /** + * A list of 'explain' types that should be included in `extensions.explain`. + * + * - `plan` will cause the plan JSON to be included + * - other values are dependent on the plugins in play + * + * If set to `true` then all possible explain types will be exposed. + */ + explain?: boolean | string[]; + /** + * If true, the result will be returned as a string rather than an object - + * this is an optimization for returning the data over a network socket or + * similar. + */ + outputDataAsString?: boolean; + timeouts?: GrafastTimeouts; +} +declare module "./engine/OperationPlan.js" { + interface OperationPlan { + [$$contextPlanCache]?: GrafastPlanJSON; + } +} +export {}; +//# sourceMappingURL=prepare.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/prepare.d.ts.map b/grafast/grafast/dist/prepare.d.ts.map new file mode 100644 index 0000000000..222a77dbeb --- /dev/null +++ b/grafast/grafast/dist/prepare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAEV,eAAe,EAKhB,MAAM,iBAAiB,CAAC;AAazB,QAAA,MAAM,kBAAkB,eAA6B,CAAC;AAGtD,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAE7B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AA+cD,OAAO,QAAQ,2BAA2B,CAAC;IACzC,UAAU,aAAa;QACrB,CAAC,kBAAkB,CAAC,CAAC,EAAE,eAAe,CAAC;KACxC;CACF"} \ No newline at end of file diff --git a/grafast/grafast/dist/prepare.js b/grafast/grafast/dist/prepare.js new file mode 100644 index 0000000000..09d163a00e --- /dev/null +++ b/grafast/grafast/dist/prepare.js @@ -0,0 +1,792 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.grafastPrepare = grafastPrepare; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const execute_1 = require("graphql/execution/execute"); +const iterall_1 = require("iterall"); +const assert = tslib_1.__importStar(require("./assert.js")); +const deferred_js_1 = require("./deferred.js"); +const dev_js_1 = require("./dev.js"); +const executeBucket_js_1 = require("./engine/executeBucket.js"); +const executeOutputPlan_js_1 = require("./engine/executeOutputPlan.js"); +const OperationPlan_js_1 = require("./engine/OperationPlan.js"); +const OutputPlan_js_1 = require("./engine/OutputPlan.js"); +const establishOperationPlan_js_1 = require("./establishOperationPlan.js"); +const interfaces_js_1 = require("./interfaces.js"); +const timeSource_js_1 = require("./timeSource.js"); +const utils_js_1 = require("./utils.js"); +const { GraphQLError } = graphql; +const $$contextPlanCache = Symbol("contextPlanCache"); +const $$bypassGraphQL = Symbol("bypassGraphQL"); +const bypassGraphQLObj = Object.assign(Object.create(null), { + [$$bypassGraphQL]: true, +}); +function noop() { } +function processRoot( +// errors should already have been handled, and this ctx isn't suitable to be reused. +ctx, iterator, outputDataAsString) { + const { streams, queue } = ctx.root; + if (dev_js_1.isDev) { + // Cannot add to streams/queue now - we're finished. The streams/queue + // get their own new roots where addition streams/queue can be added. + Object.freeze(streams); + Object.freeze(queue); + } + const promises = []; + for (const stream of streams) { + promises.push(processStream(ctx.requestContext, iterator, stream, outputDataAsString)); + } + for (const deferred of queue) { + promises.push(processDeferred(ctx.requestContext, iterator, deferred, outputDataAsString)); + } + // Terminate the iterator when we're done + if (promises.length !== 0) { + return Promise.all(promises).then(noop); + } +} +function releaseUnusedIterators(bucket, bucketIndex, streams) { + const allStreams = bucket.iterators[bucketIndex]; + if (!allStreams) { + if (streams && streams.length > 0) { + console.error(`GrafastInternalError: Untracked stream detected!`); + } + return; + } + if (streams) { + for (const streamSpec of streams) { + const { stream } = streamSpec; + if (!allStreams.delete(stream)) { + console.error(`GrafastInternalError<1e43efdf-f901-43dd-8a82-768246e61478>: Stream was returned from an output plan, but that stream wasn't tracked via the bucket.`); + } + } + } + if (allStreams.size > 0) { + for (const stream of allStreams) { + if (stream.return) { + stream.return(); + } + else if (stream.throw) { + stream.throw(new Error(`Iterator no longer needed (due to OutputPlan branch being skipped)`)); + } + } + } +} +const finalize = (data, ctx, extensions, outputDataAsString) => { + if ((0, iterall_1.isAsyncIterable)(data)) { + // It's a subscription! Batch execute the child bucket for + // each entry in the stream, and then the output plan for that. + assert.strictEqual(ctx.root.queue.length, 0, "Subscription cannot also queue"); + throw new Error("TODO<172acb34-c9d4-48f5-a26f-1b37260ecc14>: subscription"); + } + else { + if (ctx.root.streams.length > 0 || ctx.root.queue.length > 0) { + // Return an async iterator + let _alive = true; + const iterator = newIterator(() => { + // ENHANCE: AbortSignal or similar, feed into `processRoot`? + _alive = false; + }); + const payload = Object.create(null); + if (data !== undefined) { + payload.data = data; + } + const errors = ctx.root.errors; + if (errors.length > 0) { + payload.errors = errors; + } + if (extensions != null) { + payload.extensions = extensions; + } + payload.hasNext = true; + iterator.push(payload); + const promise = processRoot(ctx, iterator, outputDataAsString); + if ((0, utils_js_1.isPromiseLike)(promise)) { + promise.then(() => { + iterator.push({ hasNext: false }); + iterator.return(undefined); + }, (e) => { + iterator.throw(e); + }); + } + else { + iterator.push({ hasNext: false }); + iterator.return(undefined); + } + return iterator; + } + else { + const result = Object.create(null); + if (data !== undefined) { + result.data = data; + } + const errors = ctx.root.errors; + if (errors.length > 0) { + result.errors = errors; + } + if (extensions !== undefined) { + result.extensions = extensions; + } + return result; + } + } +}; +function outputBucket(outputPlan, rootBucket, rootBucketIndex, requestContext, path, variables, asString) { + const operationPlan = rootBucket.layerPlan.operationPlan; + const root = { + insideGraphQL: false, + errors: [], + queue: [], + streams: [], + variables, + }; + const ctx = { + requestContext, + root, + path, + }; + let childBucket; + let childBucketIndex; + if (outputPlan.layerPlan === rootBucket.layerPlan) { + childBucket = rootBucket; + childBucketIndex = rootBucketIndex; + } + else { + const c = (0, OutputPlan_js_1.getChildBucketAndIndex)(outputPlan.layerPlan, null, rootBucket, rootBucketIndex, null); + if (!c) { + throw new Error(`GrafastInternalError<8bbf56c1-8e2a-4ee9-b5fc-724fd0ee222b>: could not find relevant bucket for output plan`); + } + [childBucket, childBucketIndex] = c; + } + try { + const result = (0, executeOutputPlan_js_1.executeOutputPlan)(ctx, outputPlan, childBucket, childBucketIndex, asString); + return [ctx, result ?? null]; + } + catch (e) { + const error = (0, OutputPlan_js_1.coerceError)(e, operationPlan.rootOutputPlan.locationDetails, []); + ctx.root.errors.push(error); + return [ctx, null]; + } + finally { + releaseUnusedIterators(rootBucket, rootBucketIndex, ctx.root.streams); + } +} +function executePreemptive(args, operationPlan, variableValues, context, rootValue, outputDataAsString, executionTimeout) { + const rootBucketIndex = 0; + const size = 1; + const polymorphicPathList = [OperationPlan_js_1.POLYMORPHIC_ROOT_PATH]; + const iterators = [new Set()]; + const store = new Map(); + store.set(operationPlan.variableValuesStep.id, (0, executeBucket_js_1.unaryExecutionValue)(variableValues)); + store.set(operationPlan.contextStep.id, (0, executeBucket_js_1.unaryExecutionValue)(context)); + store.set(operationPlan.rootValueStep.id, (0, executeBucket_js_1.unaryExecutionValue)(rootValue)); + const rootBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan: operationPlan.rootLayerPlan, + size, + store, + flagUnion: 0, + polymorphicPathList, + iterators, + }, null); + const startTime = timeSource_js_1.timeSource.now(); + const stopTime = executionTimeout !== null ? startTime + executionTimeout : null; + const requestContext = { + args, + startTime, + stopTime, + // toSerialize: [], + eventEmitter: rootValue?.[interfaces_js_1.$$eventEmitter], + insideGraphQL: false, + }; + const bucketPromise = (0, executeBucket_js_1.executeBucket)(rootBucket, requestContext); + const subscriptionLayerPlan = rootBucket.layerPlan.children.find((c) => c.reason.type === "subscription"); + function executeStreamPayload(payload, index) { + const layerPlan = subscriptionLayerPlan; + const { rootStep } = layerPlan; + // PERF: we could consider batching this. + const store = new Map(); + const ZERO = 0; + for (const depId of layerPlan.copyStepIds) { + const executionVal = rootBucket.store.get(depId); + // Normally this would need scaling, but not this time since we know it only represents a single entry + store.set(depId, executionVal); + } + const rootExecutionValue = rootStep._isUnary + ? (0, executeBucket_js_1.unaryExecutionValue)(payload) + : (0, executeBucket_js_1.batchExecutionValue)([payload]); + store.set(rootStep.id, rootExecutionValue); + const subscriptionBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan, + store, + flagUnion: rootBucket.flagUnion, + polymorphicPathList: [OperationPlan_js_1.POLYMORPHIC_ROOT_PATH], + iterators: [new Set()], + size: 1, //store.size + }, rootBucket.metaByMetaKey); + const bucketPromise = (0, executeBucket_js_1.executeBucket)(subscriptionBucket, requestContext); + function outputStreamBucket() { + const [ctx, result] = outputBucket(operationPlan.rootOutputPlan, subscriptionBucket, ZERO, requestContext, [], rootBucket.store + .get(operationPlan.variableValuesStep.id) + .at(rootBucketIndex), outputDataAsString); + return finalize(result, ctx, index === 0 ? (rootValue[interfaces_js_1.$$extensions] ?? undefined) : undefined, outputDataAsString); + } + if ((0, utils_js_1.isPromiseLike)(bucketPromise)) { + return bucketPromise.then(outputStreamBucket); + } + else { + return outputStreamBucket(); + } + } + function output() { + // Later we'll need to loop + // If it's a subscription we need to use the stream + const bucketRootEValue = rootBucket.layerPlan.rootStep != null && + rootBucket.layerPlan.rootStep.id != null + ? rootBucket.store.get(rootBucket.layerPlan.rootStep.id) + : null; + const bucketRootValue = bucketRootEValue?.at(rootBucketIndex); + const bucketRootFlags = bucketRootEValue?._flagsAt(rootBucketIndex) ?? interfaces_js_1.NO_FLAGS; + if (bucketRootFlags & interfaces_js_1.FLAG_ERROR) { + releaseUnusedIterators(rootBucket, rootBucketIndex, null); + // Something major went wrong! + const errors = [ + new GraphQLError(bucketRootValue.message, operationPlan.rootOutputPlan.locationDetails.node, // node + undefined, // source + null, // positions + null, // path + bucketRootValue, // originalError + null), + ]; + const payload = Object.create(null); + payload.errors = errors; + const extensions = bucketRootValue[interfaces_js_1.$$extensions]; + if (extensions != null) { + payload.extensions = extensions; + } + return payload; + } + // NOTE: this is where we determine whether to stream or not + if (bucketRootValue != null && + subscriptionLayerPlan != null && + Array.isArray(bucketRootValue) && + bucketRootValue[interfaces_js_1.$$streamMore]) { + // We expect exactly one streamable, we should not need to + // `releaseUnusedIterators(rootBucket, rootBucketIndex, null)` here. + const arr = bucketRootValue; + const stream = arr[interfaces_js_1.$$streamMore]; + // Do the async iterable + let stopped = false; + const abort = (0, deferred_js_1.defer)(); + const iterator = newIterator((e) => { + stopped = true; + abort.resolve(undefined); + if (e != null) { + stream.throw?.(e); + } + else { + stream.return?.(); + } + }); + (async () => { + let i = 0; + // eslint-disable-next-line no-constant-condition + while (true) { + const next = await Promise.race([abort, stream.next()]); + if (stopped || !next) { + break; + } + if (!next) { + iterator.throw(new Error("Invalid iteration")); + break; + } + const { done, value } = next; + if (done) { + break; + } + const payload = await Promise.race([ + abort, + executeStreamPayload(value, i), + ]); + if (payload === undefined) { + break; + } + if ((0, iterall_1.isAsyncIterable)(payload)) { + // FIXME: do we need to avoid 'for await' because it can cause the + // stream to exit late if we're waiting on a promise and the stream + // exits in the interrim? We're assuming that no promises will be + // sufficiently long-lived for this to be an issue right now. + // TODO: should probably tie all this into an AbortController/signal too + for await (const entry of payload) { + iterator.push(entry); + } + } + else { + iterator.push(payload); + } + i++; + } + })().then(() => iterator.return(), (e) => { + iterator.throw(e); + }); + return iterator; + } + const [ctx, result] = outputBucket(operationPlan.rootOutputPlan, rootBucket, rootBucketIndex, requestContext, [], rootBucket.store.get(operationPlan.variableValuesStep.id).at(0), outputDataAsString); + return finalize(result, ctx, rootValue[interfaces_js_1.$$extensions] ?? undefined, outputDataAsString); + } + if ((0, utils_js_1.isPromiseLike)(bucketPromise)) { + return bucketPromise.then(output); + } + else { + return output(); + } +} +function establishOperationPlanFromEvent(event) { + return (0, establishOperationPlan_js_1.establishOperationPlan)(event.schema, event.operation, event.fragments, event.variableValues, event.context, event.rootValue, event.planningTimeout); +} +/** + * @internal + */ +function grafastPrepare(args, options = {}) { + const { schema, contextValue: context, rootValue = Object.create(null), + // operationName, + // document, + middleware, } = args; + const exeContext = (0, execute_1.buildExecutionContext)(args); + // If a list of errors was returned, abort + if (Array.isArray(exeContext) || "length" in exeContext) { + return Object.assign(Object.create(bypassGraphQLObj), { + errors: exeContext, + extensions: rootValue[interfaces_js_1.$$extensions], + }); + } + const { operation, fragments, variableValues } = exeContext; + const planningTimeout = options.timeouts?.planning; + let operationPlan; + try { + if (middleware != null) { + operationPlan = middleware.runSync("establishOperationPlan", { + schema, + operation, + fragments, + variableValues, + context: context, + rootValue, + planningTimeout, + args, + }, establishOperationPlanFromEvent); + } + else { + operationPlan = (0, establishOperationPlan_js_1.establishOperationPlan)(schema, operation, fragments, variableValues, context, rootValue, planningTimeout); + } + } + catch (error) { + const graphqlError = error instanceof GraphQLError + ? error + : new GraphQLError(error.message, undefined, undefined, undefined, undefined, error, error.extensions ?? null); + return { errors: [graphqlError] }; + } + if (options.explain === true || + (options.explain && options.explain.includes("plan"))) { + // Only build the plan once + if (operationPlan[$$contextPlanCache] == null) { + operationPlan[$$contextPlanCache] = operationPlan.generatePlanJSON(); + } + rootValue[interfaces_js_1.$$extensions]?.explain?.operations.push({ + type: "plan", + title: "Plan", + plan: operationPlan[$$contextPlanCache], + }); + } + const executionTimeout = options.timeouts?.execution ?? null; + return executePreemptive(args, operationPlan, variableValues, context, rootValue, options.outputDataAsString ?? false, executionTimeout); +} +function newIterator(abort) { + const valueQueue = []; + const pullQueue = []; + let done = false; + return { + [Symbol.asyncIterator]() { + return this; + }, + async [Symbol.asyncDispose]() { + await this.return(); + }, + push(v) { + if (done) { + // LOGGING: should we raise this as a bigger issue? + console.warn("GrafastWarning<85e02385-d3d2-48a1-b791-b4cf87817899>: value pushed into iterable after done; ignoring"); + return; + } + const cbs = pullQueue.shift(); + if (cbs !== undefined) { + if ((0, utils_js_1.isPromiseLike)(v)) { + v.then((v) => cbs[0]({ done: false, value: v }), (e) => { + try { + const r = cbs[1](e); + if ((0, utils_js_1.isPromiseLike)(r)) { + r.then(null, noop); + } + } + catch (e) { + // ignore + } + this.throw(e); + }); + } + else { + cbs[0]({ done: false, value: v }); + } + } + else { + valueQueue.push(v); + } + }, + next() { + if (valueQueue.length > 0) { + return Promise.resolve(valueQueue.shift()).then((value) => ({ + done: false, + value, + })); + } + else if (done) { + return Promise.resolve({ + done: true, + value: undefined, + }); + } + else { + return new Promise((resolve, reject) => { + pullQueue.push([resolve, reject]); + }); + } + }, + return() { + if (!done) { + done = true; + abort(); + for (const entry of pullQueue) { + try { + entry[0]({ done: true, value: undefined }); + } + catch (e) { + // ignore + } + } + } + return Promise.resolve({ done: true, value: undefined }); + }, + throw(e) { + if (!done) { + done = true; + abort(e); + for (const entry of pullQueue) { + try { + entry[0]({ done, value: undefined }); + } + catch (e) { + // ignore + } + } + } + return Promise.reject(e); + }, + }; +} +async function processStream(requestContext, iterator, spec, outputDataAsString) { + /** Resolve this when finished */ + const whenDone = (0, deferred_js_1.defer)(); + let queue = null; + let timeout = null; + timeout; + const _processQueue = (entries) => { + const size = entries.length; + const store = new Map(); + const polymorphicPathList = []; + const iterators = []; + let directLayerPlanChild = spec.outputPlan.layerPlan; + while (directLayerPlanChild.parentLayerPlan !== spec.bucket.layerPlan) { + const parent = directLayerPlanChild.parentLayerPlan; + if (!parent) { + throw new Error(`GrafastInternalError: Invalid heirarchy - could not find direct layerPlan child of ${spec.bucket.layerPlan}`); + } + directLayerPlanChild = parent; + } + const { id: listItemStepId, _isUnary: isUnary } = directLayerPlanChild.rootStep; + for (const copyStepId of directLayerPlanChild.copyStepIds) { + const executionValue = spec.bucket.store.get(copyStepId); + if (!executionValue) { + throw new Error(`GrafastInternalError<2db7b749-399f-486b-bd12-7ca337b937e4>: ${spec.bucket.layerPlan} doesn't seem to include ${copyStepId} (required by ${directLayerPlanChild} via ${spec.outputPlan})`); + } + if (executionValue.isBatch) { + const values = (0, utils_js_1.arrayOfLength)(size, executionValue.at(spec.bucketIndex)); + store.set(copyStepId, (0, executeBucket_js_1.batchExecutionValue)(values)); + } + else { + store.set(copyStepId, executionValue); + } + } + if (isUnary) { + assert.ok(entries.length === 0, "Unary step should only have one index"); + store.set(listItemStepId, (0, executeBucket_js_1.unaryExecutionValue)(entries[0][0])); + } + else { + const listItemStepIdList = entries.map((e) => e[0]); + store.set(listItemStepId, (0, executeBucket_js_1.batchExecutionValue)(listItemStepIdList)); + } + for (let bucketIndex = 0; bucketIndex < size; bucketIndex++) { + polymorphicPathList[bucketIndex] = + spec.bucket.polymorphicPathList[spec.bucketIndex]; + iterators[bucketIndex] = new Set(); + } + // const childBucket = newBucket(directLayerPlanChild, noDepsList, store); + // const childBucketIndex = 0; + const rootBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan: directLayerPlanChild, + size, + store, + flagUnion: 0, + polymorphicPathList, + iterators, + }, spec.bucket.metaByMetaKey); + const bucketPromise = (0, executeBucket_js_1.executeBucket)(rootBucket, requestContext); + const output = () => { + const promises = []; + for (let bucketIndex = 0; bucketIndex < size; bucketIndex++) { + const actualIndex = entries[bucketIndex][1]; + const [ctx, result] = outputBucket(spec.outputPlan, rootBucket, bucketIndex, requestContext, [...spec.path, actualIndex], spec.root.variables, outputDataAsString); + const iteratorPayload = Object.create(null); + if (result !== undefined) { + iteratorPayload.data = result; + } + iteratorPayload.hasNext = true; + if (spec.label != null) { + iteratorPayload.label = spec.label; + } + if (ctx.root.errors.length > 0) { + iteratorPayload.errors = ctx.root.errors; + } + iteratorPayload.path = ctx.path; + // TODO: extensions? + iterator.push(iteratorPayload); + const promise = processRoot(ctx, iterator, outputDataAsString); + if ((0, utils_js_1.isPromiseLike)(promise)) { + promises.push(promise); + } + } + if (promises.length !== 0) { + return Promise.all(promises).then(noop); + } + }; + if ((0, utils_js_1.isPromiseLike)(bucketPromise)) { + return bucketPromise.then(output); + } + else { + return output(); + } + }; + let pendingQueues = 0; + const queueComplete = () => { + pendingQueues--; + if (loopComplete && pendingQueues <= 0) { + whenDone.resolve(); + } + }; + const processQueue = () => { + timeout = null; + assert.ok(queue, "GrafastInternalError: processQueue called with no queue"); + // This is guaranteed to have at least one entry in it + const entries = queue; + queue = null; + try { + const result = _processQueue(entries); + if ((0, utils_js_1.isPromiseLike)(result)) { + result.then(queueComplete, (e) => { + whenDone.reject(e); + }); + } + else { + queueComplete(); + } + } + catch (e) { + whenDone.reject(e); + } + }; + const processResult = (result, payloadIndex) => { + if (queue !== null) { + queue.push([result, payloadIndex]); + } + else { + pendingQueues++; + queue = [[result, payloadIndex]]; + // OPTIMIZE: tune this delay + timeout = setTimeout(processQueue, 1); + } + }; + let loopComplete = false; + try { + let payloadIndex = spec.startIndex; + let nextValuePromise; + while ((nextValuePromise = spec.stream.next())) { + const iteratorResult = await nextValuePromise; + if (iteratorResult.done) { + break; + } + const result = iteratorResult.value; + processResult(result, payloadIndex); + payloadIndex++; + } + } + finally { + loopComplete = true; + if (pendingQueues === 0) { + whenDone.resolve(); + } + // TODO: cleanup + } + return whenDone; +} +function processSingleDeferred(requestContext, outputPlan, specs, asString) { + const size = specs.length; + const store = new Map(); + const polymorphicPathList = []; + const iterators = []; + // HACK: when we re-write stream/defer this needs fixing. + const firstBucket = specs[0][1].bucket; + if (dev_js_1.isDev) { + for (const spec of specs) { + if (spec[1].bucket !== firstBucket) { + throw new Error(`GrafastInternalError: sorry, it seems the unary dependencies feature broke our incremental delivery support. This incremental delivery is going to be fully rewritten at some point anyway, so we recommend you avoid using it for now (the spec itself has changed since we implemented it).`); + } + } + } + for (const copyStepId of outputPlan.layerPlan.copyStepIds) { + const executionValue = firstBucket.store.get(copyStepId); + if (executionValue.isBatch) { + const values = specs.map(([, spec]) => executionValue.at(spec.bucketIndex)); + store.set(copyStepId, (0, executeBucket_js_1.batchExecutionValue)(values)); + } + else { + store.set(copyStepId, executionValue); + } + } + for (let bucketIndex = 0; bucketIndex < size; bucketIndex++) { + const spec = specs[bucketIndex][1]; + polymorphicPathList[bucketIndex] = + spec.bucket.polymorphicPathList[spec.bucketIndex]; + iterators[bucketIndex] = new Set(); + } + // const childBucket = newBucket(spec.outputPlan.layerPlan, noDepsList, store); + // const childBucketIndex = 0; + const rootBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan: outputPlan.layerPlan, + size, + store, + flagUnion: 0, + polymorphicPathList, + iterators, + }, null); + const bucketPromise = (0, executeBucket_js_1.executeBucket)(rootBucket, requestContext); + const output = () => { + const promises = []; + for (let bucketIndex = 0; bucketIndex < size; bucketIndex++) { + const [iterator, spec] = specs[bucketIndex]; + const [ctx, result] = outputBucket(spec.outputPlan, rootBucket, bucketIndex, requestContext, spec.path, spec.root.variables, asString); + const iteratorPayload = Object.create(null); + if (result !== undefined) { + iteratorPayload.data = result; + } + iteratorPayload.hasNext = true; + if (spec.label != null) { + iteratorPayload.label = spec.label; + } + if (ctx.root.errors.length > 0) { + iteratorPayload.errors = ctx.root.errors; + } + // TODO: extensions? + iteratorPayload.path = ctx.path; + iterator.push(iteratorPayload); + const promise = processRoot(ctx, iterator, asString); + if ((0, utils_js_1.isPromiseLike)(promise)) { + promises.push(promise); + } + } + if (promises.length !== 0) { + return Promise.all(promises).then(noop); + } + }; + if ((0, utils_js_1.isPromiseLike)(bucketPromise)) { + return bucketPromise.then(output); + } + else { + return output(); + } +} +function processBatches(batchesByRequestTools, whenDone, asString) { + // Key is only used for batching + const promises = []; + for (const [requestContext, batches] of batchesByRequestTools.entries()) { + for (const [outputPlan, specs] of batches.entries()) { + const promise = processSingleDeferred(requestContext, outputPlan, specs, asString); + if ((0, utils_js_1.isPromiseLike)(promise)) { + promises.push(promise); + } + } + } + if (promises.length > 0) { + Promise.all(promises).then(() => whenDone.resolve(), (e) => whenDone.reject(e)); + } + else { + whenDone.resolve(); + } +} +function processBatchAsString() { + const batchesByRequestContext = deferredBatchesByRequestToolsAsString; + deferredBatchesByRequestToolsAsString = new Map(); + const whenDone = nextBatchAsString; + nextBatchAsString = null; + processBatches(batchesByRequestContext, whenDone, true); +} +function processBatchNotAsString() { + const batchesByRequestContext = deferredBatchesByRequestToolsNotAsString; + deferredBatchesByRequestToolsNotAsString = new Map(); + const whenDone = nextBatchNotAsString; + nextBatchNotAsString = null; + processBatches(batchesByRequestContext, whenDone, false); +} +let deferredBatchesByRequestToolsAsString = new Map(); +let deferredBatchesByRequestToolsNotAsString = new Map(); +let nextBatchAsString = null; +let nextBatchNotAsString = null; +function processDeferred(requestContext, iterator, spec, outputDataAsString) { + const deferredBatchesByRequestTools = outputDataAsString + ? deferredBatchesByRequestToolsAsString + : deferredBatchesByRequestToolsNotAsString; + let deferredBatches = deferredBatchesByRequestTools.get(requestContext); + if (!deferredBatches) { + deferredBatches = new Map(); + deferredBatchesByRequestTools.set(requestContext, deferredBatches); + } + const list = deferredBatches.get(spec.outputPlan); + if (list !== undefined) { + list.push([iterator, spec]); + } + else { + deferredBatches.set(spec.outputPlan, [[iterator, spec]]); + } + if (outputDataAsString) { + if (!nextBatchAsString) { + nextBatchAsString = (0, deferred_js_1.defer)(); + setTimeout(processBatchAsString, 1); + } + return nextBatchAsString; + } + else { + if (!nextBatchNotAsString) { + nextBatchNotAsString = (0, deferred_js_1.defer)(); + setTimeout(processBatchNotAsString, 1); + } + return nextBatchNotAsString; + } +} +//# sourceMappingURL=prepare.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/prepare.js.map b/grafast/grafast/dist/prepare.js.map new file mode 100644 index 0000000000..5e41e37b6e --- /dev/null +++ b/grafast/grafast/dist/prepare.js.map @@ -0,0 +1 @@ +{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":";;AAijBA,wCA+FC;;AAhpBD,yDAAmC;AAKnC,uDAAkE;AAClE,qCAA0C;AAE1C,4DAAsC;AAGtC,+CAAsC;AACtC,qCAAiC;AACjC,gEAKmC;AAOnC,wEAAkE;AAClE,gEAAkE;AAElE,0DAA6E;AAC7E,2EAAqE;AAcrE,mDAMyB;AACzB,mDAA6C;AAC7C,yCAA0D;AAE1D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;AAEjC,MAAM,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACtD,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAuBhD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;IAC1D,CAAC,eAAe,CAAC,EAAE,IAAI;CACxB,CAAC,CAAC;AAEH,SAAS,IAAI,KAAI,CAAC;AAElB,SAAS,WAAW;AAClB,qFAAqF;AACrF,GAAsC,EACtC,QAAwB,EACxB,kBAA2B;IAE3B,MAAM,EAAE,OA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AAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,kBAAkB,EAAE,CAAC;QACvB,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,iBAAiB,GAAG,IAAA,mBAAK,GAAE,CAAC;YAC5B,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,iBAAiB,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC1B,oBAAoB,GAAG,IAAA,mBAAK,GAAE,CAAC;YAC/B,UAAU,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/step.d.ts b/grafast/grafast/dist/step.d.ts new file mode 100644 index 0000000000..0c413f4f68 --- /dev/null +++ b/grafast/grafast/dist/step.d.ts @@ -0,0 +1,243 @@ +import type { GraphQLObjectType } from "graphql"; +import type { LayerPlan, LayerPlanReasonSubroutine } from "./engine/LayerPlan.js"; +import type { OperationPlan } from "./engine/OperationPlan.js"; +import type { AddDependencyOptions, DependencyOptions, ExecutionDetails, ExecutionEntryFlags, ExecutionResults, GrafastResultsList, JSONValue, PromiseOrDirect, StepOptimizeOptions, UnbatchedExecutionExtra } from "./interfaces.js"; +import { $$subroutine } from "./interfaces.js"; +import type { __FlagStep, __ItemStep } from "./steps/index.js"; +declare function reallyAssertFinalized(plan: Step): void; +export declare const assertFinalized: typeof reallyAssertFinalized; +/** + * Executable plans are the plans associated with leaves on the GraphQL tree, + * they must be able to execute to return values. + */ +export declare class Step { + readonly operationPlan: OperationPlan; + [$$subroutine]: LayerPlan | null; + isArgumentsFinalized: boolean; + isFinalized: boolean; + debug: boolean; + static $$export: any; + /** + * Setting this true is a performance optimisation, but it comes with strong + * rules; we do not test you comply with these rules (as that would undo the + * performance gains) but should you break them the behaviour is undefined + * (and, basically, the schema may no longer be GraphQL compliant). + * + * Do not set this true unless the following hold: + * + * - The `execute` method must be a regular (not async) function + * - The `execute` method must NEVER return a promise + * - The values within the list returned from `execute` must NEVER include + * promises or FlaggedValue objects + * - The result of calling `execute` should not differ after a + * `step.hasSideEffects` has executed (i.e. it should be pure, only + * dependent on its deps and use no external state) + * + * It's acceptable for the `execute` method to throw if it needs to. + * + * This optimisation applies to the majority of the built in plans and allows + * the engine to execute without needing to resolve any promises which saves + * precious event-loop ticks. + */ + isSyncAndSafe: boolean; + /** + * (default = ALL_FLAGS & ~FLAG_NULL) + */ + protected readonly defaultForbiddenFlags: ExecutionEntryFlags; + /** + * The plan this plan will need data from in order to execute. + */ + protected readonly dependencies: ReadonlyArray; + /** + * Unique identifier for this step within the plan. + */ + readonly id: number; + /** + /** + * True when `optimize` has been called at least once. + */ + isOptimized: boolean; + /** + * Set this true if your plan's optimize method can be called a second time; + * note that in this situation it's likely that your dependencies will not be + * what you expect them to be (e.g. a PgSelectSingleStep might become an + * AccessStep). + */ + allowMultipleOptimizations: boolean; + /** + * Set the metaKey so `execute` will be passed a meta object to use. + * Depending on what you set it to, you can share execution meta between + * multiple steps of the same class (or even a family of step classes). + * + * A sensible value for it is `this.metaKey = this.id;`. + */ + metaKey: number | string | symbol | undefined; + /** + * Like `metaKey` but for the optimize phase + */ + optimizeMetaKey: number | string | symbol | undefined; + /** + * If the peerKey of two steps do not match, then they are definitely not + * peers. Use this to reduce the load on deduplicate by more quickly + * eradicating definitely-not-peers. + * + * Note: we may well change this to be a function in future, so it's advised + * that you don't use this unless you're working inside the graphile/crystal + * core codebase. + * + * @experimental + */ + peerKey: string | null; + /** + * Set this true for plans that implement mutations; this will prevent them + * from being tree-shaken. + */ + hasSideEffects: boolean; + constructor(); + /** + * Generally you should only use this once the dependencies of a step are + * established, if you use it beforehand and it returns `true` then adding a + * non-unary dependency later will result in an error. + */ + getAndFreezeIsUnary(): boolean; + protected withMyLayerPlan(callback: () => T): T; + /** @experimental */ + withLayerPlan(callback: () => T): T; + protected getStep(id: number): Step; + protected getDepOptions(depId: number): DependencyOptions; + protected getDep(_depId: number): TStep | __FlagStep; + protected getDep(_depId: number, throwOnFlagged: true): TStep; + protected maybeGetDep(depId: number | null | undefined): TStep | __FlagStep | null; + protected maybeGetDep(depId: number | null | undefined, throwOnFlagged: true): TStep | null; + protected getDepOrConstant(_depId: number | null, _fallback: TData): Step; + /** + * Like getDep, except it skips over __ItemStep and similar steps to get to + * where the parent really is. + * + * @experimental + */ + protected getDepDeep(depId: number): Step; + /** + * Cache a generated step by a given identifier (cacheKey) such that we don't + * need to regenerate it on future calls, significantly reducing the load on + * deduplication later. + * + * @experimental + */ + protected cacheStep(actionKey: string, cacheKey: symbol | string | number, cb: () => T): T; + toString(): string; + /** + * This metadata will be merged into toString when referencing this plan. + */ + toStringMeta(): string | null; + planJSONExtra(): Record | undefined; + protected canAddDependency(step: Step): boolean; + protected addDependency(stepOrOptions: Step | AddDependencyOptions): number; + /** + * Adds "unary" dependencies; in `execute({count, values})` you'll receive a + * `values[index]` (where `index` is the return value of this function) with + * `isBatch = false` so you can use the `values[index].value` property + * directly. + */ + protected addUnaryDependency(stepOrOptions: Step | AddDependencyOptions): number; + /** + * Given a list of "peer" steps, return a list of these `peers` that are + * equivalent to this step. + * + * NOTE: equivalence goes both ways: `a.deduplicate([b]).includes(b)` if and + * only if `b.deduplicate([a]).includes(a)`. + * + * If you need to transform the peer to be equivalent you should do so via + * the `deduplicatedWith` callback later. + */ + deduplicate?(_peers: readonly Step[]): readonly Step[]; + /** + * If this plan is replaced via deduplication, this method gives it a chance + * to hand over its responsibilities to its replacement. + */ + deduplicatedWith?(replacement: Step): void; + /** + * Our chance to optimise the plan (which could go as far as to inline the + * plan into the parent plan). + */ + optimize?(_options: StepOptimizeOptions): Step; + finalize(): void; + /** + * This function will be called with 'execution details', an object containing: + * + * - `count`: the number of entries in the batch that's being executed + * - `values`: a tuple representing the runtime values of the steps + * dependencies; each value in the tuple is an object, either a batch object + * containing a list of size `count` containing the values, or a unary + * object containing the single value common to all entries. + * - `indexMap`: helper function to map over each index from `0` to `count-1`, + * returning the resulting array. + * - `indexForEach`: as `indexMap`, but without the array result. + * - `meta`: [experimental] + * + * `execute` must return a list with `count` entries, where each value in the + * list relates to the result of executing this plan for the corresponding + * entry in each of the entries in the `values` tuple. + * + * IMPORTANT: it is up to the execute function to cache/memoize results as + * appropriate for performance, this can be done via the `meta` object. + * + * The `meta` object is an empty object stored to `grafastContext.metaByPlan` + * that can be used to store anything this plan needs. We recommend that you + * add attributes to meta for each purpose (e.g. use `meta.cache` for + * memoizing results) so that you can expand your usage of meta in future. + */ + execute(details: ExecutionDetails): ExecutionResults; + destroy(): void; +} +export declare abstract class UnbatchedStep extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + finalize(): void; + execute({ indexMap, values, extra, }: ExecutionDetails): PromiseOrDirect>; + abstract unbatchedExecute(extra: UnbatchedExecutionExtra, ...tuple: any[]): PromiseOrDirect; +} +export declare function isStep(step: unknown): step is Step; +export declare function assertStep(step: unknown): asserts step is Step; +export declare function isUnbatchedStep(step: unknown): step is UnbatchedStep; +export type ObjectLikeStep = Step<{ + [key in keyof TData]: TData[key] extends Step ? U : never; +}> & { + get(key: TKey): Step; +}; +export declare function isObjectLikeStep(plan: Step): plan is ObjectLikeStep; +export type ListLikeStep = Step<{ + [key in keyof TData]: TData[key] extends Step ? U : never; +}> & { + at(key: TKey): Step; +}; +export declare function isListLikeStep(plan: Step): plan is ListLikeStep; +export type PolymorphicStep = Step & { + planForType(objectType: GraphQLObjectType): Step; +}; +export declare function isPolymorphicStep(s: Step): s is PolymorphicStep; +export interface ListCapableStep = Step> extends Step> { + listItem(itemPlan: __ItemStep): TItemStep; +} +export declare function isListCapableStep>(plan: Step>): plan is ListCapableStep; +export declare function assertListCapableStep>(plan: Step>, pathDescription: string): asserts plan is ListCapableStep; +export { +/** @deprecated Use ExecutableStep instead */ +Step as ExecutableStep, +/** @deprecated Use UnbatchedStep instead */ +UnbatchedStep as UnbatchedExecutableStep, }; +/** @deprecated Use isStep instead */ +export declare const isExecutableStep: typeof isStep; +/** @deprecated Use isStep instead */ +export declare function assertExecutableStep(step: unknown): asserts step is Step; +//# sourceMappingURL=step.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/step.d.ts.map b/grafast/grafast/dist/step.d.ts.map new file mode 100644 index 0000000000..b134f64598 --- /dev/null +++ b/grafast/grafast/dist/step.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../src/step.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAKjD,OAAO,KAAK,EACV,SAAS,EACT,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,mBAAmB,EAEnB,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,YAAY,EAGb,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA+B/D,iBAAS,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAM/C;AAGD,eAAO,MAAM,eAAe,8BAAwC,CAAC;AAErE;;;GAGG;AACH,qBAA4B,IAAI,CAAC,KAAK,GAAG,GAAG;IA0B1C,SAAgB,aAAa,EAAE,aAAa,CAAC;IACtC,CA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ast/dist/step.js new file mode 100644 index 0000000000..3f2f7b0dde --- /dev/null +++ b/grafast/grafast/dist/step.js @@ -0,0 +1,475 @@ +"use strict"; +var _a, _b; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isExecutableStep = exports.UnbatchedExecutableStep = exports.ExecutableStep = exports.UnbatchedStep = exports.Step = exports.assertFinalized = exports.$$noExec = void 0; +exports.isStep = isStep; +exports.assertStep = assertStep; +exports.isUnbatchedStep = isUnbatchedStep; +exports.isObjectLikeStep = isObjectLikeStep; +exports.isListLikeStep = isListLikeStep; +exports.isPolymorphicStep = isPolymorphicStep; +exports.isListCapableStep = isListCapableStep; +exports.assertListCapableStep = assertListCapableStep; +exports.assertExecutableStep = assertExecutableStep; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const tamedevil_1 = tslib_1.__importDefault(require("tamedevil")); +const dev_js_1 = require("./dev.js"); +const withGlobalLayerPlan_js_1 = require("./engine/lib/withGlobalLayerPlan.js"); +const lock_js_1 = require("./engine/lock.js"); +const error_js_1 = require("./error.js"); +const global_js_1 = require("./global.js"); +const inspect_js_1 = require("./inspect.js"); +const interfaces_js_1 = require("./interfaces.js"); +const utils_js_1 = require("./utils.js"); +/** + * This indicates that a step never executes (e.g. __ItemStep and __ValueStep) + * and thus when executed skips direct to reallyCompletedStep. + * + * @internal + */ +exports.$$noExec = Symbol("noExec"); +const ref_flagError = tamedevil_1.default.ref(error_js_1.flagError, "flagError"); +function throwDestroyed() { + let message; + try { + message = `${this} has been destroyed; calling methods on it is no longer possible`; + } + catch (e) { + message = `Step ${this?.id} has been destroyed; calling methods on it is no longer possible`; + } + throw new Error(message); +} +function isDeepDepSkippable($dep) { + return interfaces_js_1.$$deepDepSkip in $dep && typeof $dep[interfaces_js_1.$$deepDepSkip] === "function"; +} +function reallyAssertFinalized(plan) { + if (!plan.isFinalized) { + throw new Error(`Step ${plan} is not finalized; did you forget to call \`super.finalize()\` from its \`finalize()\` method?`); + } +} +// Optimise this away in production. +exports.assertFinalized = !dev_js_1.isDev ? dev_js_1.noop : reallyAssertFinalized; +/** + * Executable plans are the plans associated with leaves on the GraphQL tree, + * they must be able to execute to return values. + */ +class Step { + static { _a = interfaces_js_1.$$subroutine, _b = lock_js_1.$$unlock; } + constructor() { + this[_a] = null; + /** + * For input values, set `true` if it comes from variables/arguments since + * they cannot be modified (even by mutations), set `false` otherwise. + * + * @internal + */ + this._isImmutable = false; + /** @internal */ + this[_b] = undefined; + /** + * (default = ALL_FLAGS & ~FLAG_NULL) + */ + this.defaultForbiddenFlags = interfaces_js_1.DEFAULT_FORBIDDEN_FLAGS; + /** + * If the peerKey of two steps do not match, then they are definitely not + * peers. Use this to reduce the load on deduplicate by more quickly + * eradicating definitely-not-peers. + * + * Note: we may well change this to be a function in future, so it's advised + * that you don't use this unless you're working inside the graphile/crystal + * core codebase. + * + * @experimental + */ + this.peerKey = null; + this.isArgumentsFinalized = false; + this.isFinalized = false; + this.debug = (0, global_js_1.getDebug)(); + const layerPlan = (0, withGlobalLayerPlan_js_1.currentLayerPlan)(); + this.layerPlan = layerPlan; + this.operationPlan = layerPlan.operationPlan; + this._isUnary = true; + this._isUnaryLocked = false; + this.implicitSideEffectStep = null; + this.hasSideEffects ??= false; + let hasSideEffects = false; + const stepTracker = this.layerPlan.operationPlan.stepTracker; + Object.defineProperty(this, "hasSideEffects", { + get() { + return hasSideEffects; + }, + set(value) { + /** + * If steps were created after this step, an this step doesn't depend + * on them, then it's no longer safe to change hasSideEffects. + */ + let nonDependentSteps = null; + const maxStepId = stepTracker.stepCount - 1; + if (this.id === maxStepId) { + // All good - no more steps were created + } + else { + // If the step created them during initialization and is dependent on + // them, that's fine too. + for (let id = this.id + 1; id <= maxStepId; id++) { + const step = stepTracker.getStepById(id); + if ((0, utils_js_1.stepADependsOnStepB)(this, step)) + continue; + if (nonDependentSteps === null) { + nonDependentSteps = [step]; + } + else { + nonDependentSteps.push(step); + } + } + } + if (nonDependentSteps === null) { + hasSideEffects = value; + if (value === true) { + this.layerPlan.latestSideEffectStep = this; + this.operationPlan.resetCache(); + } + else if (value !== true && hasSideEffects === true) { + throw new Error(`Cannot mark ${this} as having no side effects after having set it to have side effects.`); + } + } + else { + throw new Error(`Attempted to mark ${this} as having side effects, but other non-dependent steps (${nonDependentSteps + .map(String) + .join(", ")}) have already been created.`); + } + }, + enumerable: true, + configurable: false, + }); + this.dependencies = []; + this.dependencyForbiddenFlags = []; + this.dependencyOnReject = []; + this.dependents = []; + this.isOptimized = false; + this.allowMultipleOptimizations = false; + this._stepOptions = { stream: null, walkIterable: false }; + this.store = true; + this.polymorphicPaths = (0, withGlobalLayerPlan_js_1.currentPolymorphicPaths)(); + // Important: MUST come after `this.layerPlan = ...` + this.id = this.layerPlan._addStep(this); + } + /** + * Generally you should only use this once the dependencies of a step are + * established, if you use it beforehand and it returns `true` then adding a + * non-unary dependency later will result in an error. + */ + getAndFreezeIsUnary() { + this._isUnaryLocked = true; + return this._isUnary; + } + withMyLayerPlan(callback) { + return (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.layerPlan, this.polymorphicPaths, callback); + } + /** @experimental */ + withLayerPlan(callback) { + return (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.layerPlan, this.polymorphicPaths, callback); + } + getStep(id) { + return this.layerPlan.getStep(id, this); + } + getDepOptions(depId) { + const step = this.dependencies[depId]; + const forbiddenFlags = this.dependencyForbiddenFlags[depId]; + const onReject = this.dependencyOnReject[depId]; + const acceptFlags = interfaces_js_1.ALL_FLAGS & ~forbiddenFlags; + return { step, acceptFlags, onReject }; + } + getDep(_depId, _throwOnFlagged = false) { + // This gets replaced when `__FlagStep` is loaded. Were we on ESM we could + // just put the code here, but since we're not we have to avoid the + // circular dependency. + throw new Error(`Grafast failed to load correctly`); + } + maybeGetDep(depId, throwOnFlagged = false) { + return depId == null + ? null + : throwOnFlagged + ? this.getDep(depId, true) + : this.getDep(depId); + } + getDepOrConstant(_depId, _fallback) { + // This gets replaced when `constant` is loaded. Were we on ESM we could + // just put the code here, but since we're not we have to avoid the + // circular dependency. + throw new Error(`Grafast failed to load correctly`); + } + /** + * Like getDep, except it skips over __ItemStep and similar steps to get to + * where the parent really is. + * + * @experimental + */ + getDepDeep(depId) { + let $dep = this.getDep(depId); + // Walk up the tree, looking for the source of this record. We know that + // __ItemStep and __ListTransformStep are safe to walk through, but other + // classes may not be. + while (isDeepDepSkippable($dep)) { + $dep = $dep[interfaces_js_1.$$deepDepSkip](); + } + return $dep; + } + /** + * Cache a generated step by a given identifier (cacheKey) such that we don't + * need to regenerate it on future calls, significantly reducing the load on + * deduplication later. + * + * @experimental + */ + cacheStep(actionKey, cacheKey, cb) { + return this.operationPlan.cacheStep(this, actionKey, cacheKey, cb); + } + toString() { + let meta; + try { + // If we log out too early, the meta function might fail. + meta = this.toStringMeta(); + } + catch (e) { + // Ignore + } + return chalk_1.default.bold.blue(`${this.constructor.name.replace(/Step$/, "")}${this.layerPlan.id === 0 ? "" : chalk_1.default.grey(`{${this.layerPlan.id}}`)}${this._isUnary ? "➊" : ""}${this._stepOptions.stream != null ? "@s" : ""}${meta != null && meta.length ? chalk_1.default.grey(`<${meta}>`) : ""}[${(0, inspect_js_1.inspect)(this.id, { colors: true })}]`); + } + /** + * This metadata will be merged into toString when referencing this plan. + */ + toStringMeta() { + return null; + } + planJSONExtra() { + return undefined; + } + canAddDependency(step) { + return (0, utils_js_1.stepAMayDependOnStepB)(this, step); + } + addDependency(stepOrOptions) { + const options = stepOrOptions instanceof Step + ? { step: stepOrOptions, skipDeduplication: false } + : stepOrOptions; + if (options.step.layerPlan.id > this.layerPlan.id) { + throw new Error(`Cannot add dependency ${options.step} to ${this} since the former is in a deeper layerPlan (creates a catch-22)`); + } + return this.operationPlan.stepTracker.addStepDependency(this, options); + } + /** + * Adds "unary" dependencies; in `execute({count, values})` you'll receive a + * `values[index]` (where `index` is the return value of this function) with + * `isBatch = false` so you can use the `values[index].value` property + * directly. + */ + addUnaryDependency(stepOrOptions) { + const options = stepOrOptions instanceof Step ? { step: stepOrOptions } : stepOrOptions; + if (options.step.layerPlan.id > this.layerPlan.id) { + throw new Error(`Cannot add dependency ${options.step} to ${this} since the former is in a deeper layerPlan (creates a catch-22)`); + } + return this.operationPlan.stepTracker.addStepUnaryDependency(this, options); + } + finalize() { + if (typeof this.isSyncAndSafe !== "boolean") { + // Take a guess + if (!dev_js_1.isDev) { + this.isSyncAndSafe = false; + } + else if (this.execute.constructor.name === "AsyncFunction") { + this.isSyncAndSafe = false; + } + else { + console.warn(`${this} uses a regular (non-async) function for 'execute'; if it never returns a promise and the list it returns never includes a promise then setting \`${this}.isSyncAndSafe = true\` will improve performance. If this is not true, set \`${this}.isSyncAndSafe = false\` to dismiss this message.`); + this.isSyncAndSafe = false; + } + } + if (this.isSyncAndSafe === true && + this.execute.constructor.name === "AsyncFunction") { + throw new Error(`${this} claims to be synchronous, however the execute method is asynchronous`); + } + if (!this.isFinalized) { + this.isFinalized = true; + } + else { + throw new Error(`Step ${this} has already been finalized - do not call \`finalize()\` from user code!`); + } + } + /** + * This function will be called with 'execution details', an object containing: + * + * - `count`: the number of entries in the batch that's being executed + * - `values`: a tuple representing the runtime values of the steps + * dependencies; each value in the tuple is an object, either a batch object + * containing a list of size `count` containing the values, or a unary + * object containing the single value common to all entries. + * - `indexMap`: helper function to map over each index from `0` to `count-1`, + * returning the resulting array. + * - `indexForEach`: as `indexMap`, but without the array result. + * - `meta`: [experimental] + * + * `execute` must return a list with `count` entries, where each value in the + * list relates to the result of executing this plan for the corresponding + * entry in each of the entries in the `values` tuple. + * + * IMPORTANT: it is up to the execute function to cache/memoize results as + * appropriate for performance, this can be done via the `meta` object. + * + * The `meta` object is an empty object stored to `grafastContext.metaByPlan` + * that can be used to store anything this plan needs. We recommend that you + * add attributes to meta for each purpose (e.g. use `meta.cache` for + * memoizing results) so that you can expand your usage of meta in future. + */ + /* abstract */ + execute(details) { + // ESLint/TS: ignore not used. + details; + throw new Error(`${this} has not implemented an 'execute' method`); + } + destroy() { + // Break ourself enough that if lifecycle methods are attempted an error + // will be thrown. This should help weed out bugs where steps are processed + // even after they have been removed/deduped. + this.addDependency = throwDestroyed; + this.deduplicate = throwDestroyed; + this.deduplicatedWith = throwDestroyed; + this.optimize = throwDestroyed; + this.finalize = throwDestroyed; + this.execute = throwDestroyed; + } +} +exports.Step = Step; +exports.ExecutableStep = Step; +function _buildOptimizedExecuteV2Expression(depCount, isSyncAndSafe) { + const identifiers = []; + for (let i = 0; i < depCount; i++) { + identifiers.push(tamedevil_1.default.identifier(`value${i}`)); + } + const tryOrNot = (inFrag) => { + if (isSyncAndSafe) { + return inFrag; + } + else { + return (0, tamedevil_1.default) `\ + try { + ${tamedevil_1.default.indent(inFrag)} + } catch (e) { + results[i] = ${ref_flagError}(e); + }\ +`; + } + }; + return (0, tamedevil_1.default) `\ +(function execute({ + count, + values: [${tamedevil_1.default.join(identifiers, ", ")}], + extra, +}) { + const results = []; + for (let i = 0; i < count; i++) { +${tryOrNot((0, tamedevil_1.default) `\ + results[i] = this.unbatchedExecute(extra, ${tamedevil_1.default.join(identifiers.map((identifier) => (0, tamedevil_1.default) `${identifier}.at(i)`), ", ")});\ +`)} + } + return results; +})`; +} +const MAX_DEPENDENCIES_TO_CACHE = 10; +const unsafeCache = []; +const safeCache = []; +tamedevil_1.default.batch(() => { + for (let i = 0; i <= MAX_DEPENDENCIES_TO_CACHE; i++) { + const depCount = i; + const unsafeExpression = _buildOptimizedExecuteV2Expression(depCount, false); + tamedevil_1.default.runInBatch(unsafeExpression, (fn) => { + unsafeCache[depCount] = fn; + }); + const safeExpression = _buildOptimizedExecuteV2Expression(depCount, true); + tamedevil_1.default.runInBatch(safeExpression, (fn) => { + safeCache[depCount] = fn; + }); + } +}); +function buildOptimizedExecute(depCount, isSyncAndSafe, callback) { + // Try and satisfy from cache + const cache = isSyncAndSafe ? safeCache : unsafeCache; + if (depCount <= MAX_DEPENDENCIES_TO_CACHE) { + callback(cache[depCount]); + return; + } + // Build it + const expression = _buildOptimizedExecuteV2Expression(depCount, isSyncAndSafe); + tamedevil_1.default.runInBatch(expression, (fn) => { + callback(fn); + }); +} +class UnbatchedStep extends Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "UnbatchedStep", + }; } + finalize() { + if (this.execute === UnbatchedStep.prototype.execute) { + // If they've not replaced 'execute', use our optimized form + buildOptimizedExecute(this.dependencies.length, this.isSyncAndSafe, (fn) => { + this.execute = fn; + }); + } + super.finalize(); + } + execute({ indexMap, values, extra, }) { + console.warn(`${this} didn't call 'super.finalize()' in the finalize method.`); + const depCount = this.dependencies.length; + return indexMap((i) => { + try { + const tuple = []; + for (let j = 0; j < depCount; j++) { + tuple[j] = values[j].at(i); + } + return this.unbatchedExecute(extra, ...tuple); + } + catch (e) { + return (0, error_js_1.flagError)(e); + } + }); + } +} +exports.UnbatchedStep = UnbatchedStep; +exports.UnbatchedExecutableStep = UnbatchedStep; +function isStep(step) { + return step instanceof Step; +} +function assertStep(step) { + if (!isStep(step)) { + throw new Error(`Expected a step, but received something else: ${(0, inspect_js_1.inspect)(step)}`); + } +} +function isUnbatchedStep(step) { + return isStep(step) && typeof step.unbatchedExecute === "function"; +} +function isObjectLikeStep(plan) { + return "get" in plan && typeof plan.get === "function"; +} +function isListLikeStep(plan) { + return "at" in plan && typeof plan.at === "function"; +} +function isPolymorphicStep(s) { + return ("planForType" in s && + typeof s.planForType === "function"); +} +function isListCapableStep(plan) { + return "listItem" in plan && typeof plan.listItem === "function"; +} +function assertListCapableStep(plan, pathDescription) { + if (!isListCapableStep(plan)) { + throw new Error(`The plan returned from '${pathDescription}' should be a list capable plan, but ${plan} does not implement the 'listItem' method.`); + } +} +/** @deprecated Use isStep instead */ +exports.isExecutableStep = isStep; +/** @deprecated Use isStep instead */ +function assertExecutableStep(step) { + return assertStep(step); +} +//# sourceMappingURL=step.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/step.js.map b/grafast/grafast/dist/step.js.map new file mode 100644 index 0000000000..f18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ACvC,OAAO,CACL,aAAa,IAAI,CAAC;QAClB,OAAQ,CAAqB,CAAC,WAAW,KAAK,UAAU,CACzD,CAAC;AACJ,CAAC;AASD,SAAgB,iBAAiB,CAC/B,IAAgC;IAEhC,OAAO,UAAU,IAAI,IAAI,IAAI,OAAQ,IAAY,CAAC,QAAQ,KAAK,UAAU,CAAC;AAC5E,CAAC;AAED,SAAgB,qBAAqB,CACnC,IAAgC,EAChC,eAAuB;IAEvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,2BAA2B,eAAe,wCAAwC,IAAI,4CAA4C,CACnI,CAAC;IACJ,CAAC;AACH,CAAC;AASD,qCAAqC;AACxB,QAAA,gBAAgB,GAAG,MAAM,CAAC;AACvC,qCAAqC;AACrC,SAAgB,oBAAoB,CAClC,IAAa;IAEb,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__flag.d.ts b/grafast/grafast/dist/steps/__flag.d.ts new file mode 100644 index 0000000000..016cf69ef5 --- /dev/null +++ b/grafast/grafast/dist/steps/__flag.d.ts @@ -0,0 +1,65 @@ +import type { DataFromStep, ExecutionDetails, ExecutionEntryFlags, GrafastResultsList } from "../interfaces.js"; +import { $$deepDepSkip } from "../interfaces.js"; +import type { ListCapableStep } from "../step.js"; +import { Step } from "../step.js"; +import type { __ItemStep } from "./__item.js"; +export declare const TRAP_ERROR: ExecutionEntryFlags; +export declare const TRAP_INHIBITED: ExecutionEntryFlags; +export declare const TRAP_ERROR_OR_INHIBITED: ExecutionEntryFlags; +declare const TRAP_VALUES: readonly ["NULL", "EMPTY_LIST", "PASS_THROUGH"]; +/** @defaultValue `'PASS_THROUGH'` */ +export type TrapValue = (typeof TRAP_VALUES)[number]; +/** `false` means pass-through; all others are literal */ +export type ResolvedTrapValue = false | null | undefined | readonly never[]; +export interface FlagStepOptions { + acceptFlags?: ExecutionEntryFlags; + onReject?: Error | null; + if?: Step; + valueForInhibited?: TrapValue; + valueForError?: TrapValue; +} +export declare class __FlagStep extends Step> { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private ifDep; + private forbiddenFlags; + private onRejectReturnValue; + private valueForInhibited; + private valueForError; + private canBeInlined; + constructor(step: TStep, options: FlagStepOptions); + toStringMeta(): string | null; + [$$deepDepSkip](): Step; + listItem?: ($item: __ItemStep>>) => Step; + _listItem($item: __ItemStep>>): Step; + deduplicate(_peers: readonly Step[]): readonly Step[]; + execute(_details: ExecutionDetails<[data: DataFromStep, cond?: boolean]>): GrafastResultsList>; + finalize(): void; + private fancyExecute; + private passThroughExecute; +} +/** + * Example use case: get user by id, but id is null: no need to fetch the user + * since we know they won't exist. + */ +export declare function inhibitOnNull($step: TStep, options?: { + if?: FlagStepOptions["if"]; +}): __FlagStep; +/** + * Example use case: expecting a node ID that represents a User, but get one + * that represents a Post instead: throw error to tell user they've sent invalid + * data. + */ +export declare function assertNotNull($step: TStep, message: string, options?: { + if?: FlagStepOptions["if"]; +}): __FlagStep; +export declare function trap($step: TStep, acceptFlags: ExecutionEntryFlags, options?: { + valueForInhibited?: FlagStepOptions["valueForInhibited"]; + valueForError?: FlagStepOptions["valueForError"]; + if?: FlagStepOptions["if"]; +}): __FlagStep; +export {}; +//# sourceMappingURL=__flag.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__flag.d.ts.map b/grafast/grafast/dist/steps/__flag.d.ts.map new file mode 100644 index 0000000000..4d1e795080 --- /dev/null +++ b/grafast/grafast/dist/steps/__flag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__flag.d.ts","sourceRoot":"","sources":["../../src/steps/__flag.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EAQd,MAAM,kB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CAAC,CAAC;IACjD,EAAE,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;CAC5B,qBAMF"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__flag.js b/grafast/grafast/dist/steps/__flag.js new file mode 100644 index 0000000000..c82d9533db --- /dev/null +++ b/grafast/grafast/dist/steps/__flag.js @@ -0,0 +1,261 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__FlagStep = exports.TRAP_ERROR_OR_INHIBITED = exports.TRAP_INHIBITED = exports.TRAP_ERROR = void 0; +exports.inhibitOnNull = inhibitOnNull; +exports.assertNotNull = assertNotNull; +exports.trap = trap; +const error_js_1 = require("../error.js"); +const inspect_js_1 = require("../inspect.js"); +const interfaces_js_1 = require("../interfaces.js"); +const step_js_1 = require("../step.js"); +// PUBLIC FLAGS +exports.TRAP_ERROR = interfaces_js_1.FLAG_ERROR; +exports.TRAP_INHIBITED = interfaces_js_1.FLAG_INHIBITED; +exports.TRAP_ERROR_OR_INHIBITED = (interfaces_js_1.FLAG_ERROR | + interfaces_js_1.FLAG_INHIBITED); +function digestAcceptFlags(acceptFlags) { + const parts = []; + if ((acceptFlags & interfaces_js_1.FLAG_NULL) === 0) { + parts.push("rejectNull"); + } + if ((acceptFlags & interfaces_js_1.FLAG_ERROR) !== 0) { + parts.push("trapError"); + } + if ((acceptFlags & interfaces_js_1.FLAG_INHIBITED) !== 0) { + parts.push("trapInhibited"); + } + return parts.join("&"); +} +const TRAP_VALUES = [ + "NULL", + "EMPTY_LIST", + "PASS_THROUGH", + // "UNDEFINED", // waiting for a need +]; +const EMPTY_LIST = Object.freeze([]); +function trim(string, length = 15) { + if (string.length > length) { + return string.substring(0, length - 2) + "…"; + } + else { + return string; + } +} +function resolveTrapValue(tv) { + switch (tv) { + case "NULL": + return null; + case "EMPTY_LIST": + return EMPTY_LIST; + case "PASS_THROUGH": + return false; + default: { + const never = tv; + throw new Error(`TrapValue '${never}' not understood; please use one of: ${TRAP_VALUES.join(", ")}`); + } + } +} +class __FlagStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "__FlagStep", + }; } + constructor(step, options) { + super(); + this.isSyncAndSafe = false; + this.ifDep = null; + const { acceptFlags = interfaces_js_1.DEFAULT_ACCEPT_FLAGS, onReject, if: $cond, valueForInhibited = "PASS_THROUGH", valueForError = "PASS_THROUGH", } = options; + this.forbiddenFlags = interfaces_js_1.ALL_FLAGS & ~acceptFlags; + this.onRejectReturnValue = + onReject == null ? error_js_1.$$inhibit : (0, error_js_1.flagError)(onReject, step.id); + this.valueForInhibited = resolveTrapValue(valueForInhibited); + this.valueForError = resolveTrapValue(valueForError); + this.canBeInlined = + !$cond && + valueForInhibited === "PASS_THROUGH" && + valueForError === "PASS_THROUGH" && + // Can't PASS_THROUGH errors since they need to be converted into TRAPPED + // error. + // TODO: should we be handling this in Grafast core? + (acceptFlags & interfaces_js_1.FLAG_ERROR) === 0; + if (!this.canBeInlined) { + this.addDependency({ step, acceptFlags: interfaces_js_1.TRAPPABLE_FLAGS }); + if ($cond) { + this.ifDep = this.addDependency($cond); + } + } + else { + this.addDependency({ step, acceptFlags, onReject }); + } + if ((0, step_js_1.isListCapableStep)(step)) { + this.listItem = this._listItem; + } + } + toStringMeta() { + const acceptFlags = interfaces_js_1.ALL_FLAGS & ~this.forbiddenFlags; + const rej = this.onRejectReturnValue + ? trim(String(this.onRejectReturnValue)) + : (0, inspect_js_1.inspect)(this.onRejectReturnValue); + const $if = this.ifDep !== null ? this.getDepOptions(this.ifDep).step : null; + return `${this.dependencies[0].id}, ${$if ? `if(${$if.id}), ` : ``}${digestAcceptFlags(acceptFlags)}, onReject: ${rej}`; + } + [interfaces_js_1.$$deepDepSkip]() { + return this.getDepOptions(0).step; + } + // Copied over listItem if the dependent step is a list capable step + _listItem($item) { + const $dep = this.dependencies[0]; + return (0, step_js_1.isListCapableStep)($dep) ? $dep.listItem($item) : $item; + } + /** Return inlining instructions if we can be inlined. @internal */ + inline(options) { + if (!this.canBeInlined) { + return null; + } + const step = this.dependencies[0]; + const forbiddenFlags = this.dependencyForbiddenFlags[0]; + const onReject = this.dependencyOnReject[0]; + const acceptFlags = interfaces_js_1.ALL_FLAGS & ~forbiddenFlags; + if ( + // TODO: this logic could be improved so that more flag checks were + // inlined, e.g. `trap(inhibitOnNull($foo), TRAP_INHIBIT)` should just + // become `$foo`. + // + // However, we must be careful that we don't optimize away flags, e.g. + // `trap(inhibitOnNull($foo), TRAP_INHIBIT, { if: $cond })` needs to see + // the inhibit flag to know what to do, so in this case we shouldn't be + // inlined. This may only apply to __FlagStep and might be something we + // want to optimize later. + options.onReject === undefined || + options.onReject === onReject) { + if (options.acceptFlags === undefined || + options.acceptFlags === interfaces_js_1.DEFAULT_ACCEPT_FLAGS || + options.acceptFlags === acceptFlags || + false) { + return { step, acceptFlags, onReject }; + } + } + return null; + } + deduplicate(_peers) { + return _peers.filter((p) => { + // ifDep has already been tested by Grafast (it's a dependency) + if (p.forbiddenFlags !== this.forbiddenFlags) + return false; + if (p.onRejectReturnValue !== this.onRejectReturnValue) + return false; + if (p.valueForInhibited !== this.valueForInhibited) + return false; + if (p.valueForError !== this.valueForError) + return false; + if (p.canBeInlined !== this.canBeInlined) + return false; + return true; + }); + } + execute(_details) { + throw new Error(`${this} not finalized?`); + } + finalize() { + if (this.canBeInlined) { + this.execute = this.passThroughExecute; + } + else { + this.execute = this.fancyExecute; + } + super.finalize(); + } + fancyExecute(details) { + const dataEv = details.values[0]; + const condEv = this.ifDep === null ? null : details.values[this.ifDep]; + const { forbiddenFlags: thisForbiddenFlags, onRejectReturnValue, valueForError, valueForInhibited, } = this; + return details.indexMap((i) => { + const cond = condEv ? condEv.at(i) : true; + const forbiddenFlags = cond + ? thisForbiddenFlags + : interfaces_js_1.DEFAULT_FORBIDDEN_FLAGS; + // Search for "f2b3b1b3" for similar block + const flags = dataEv._flagsAt(i); + const disallowedFlags = flags & forbiddenFlags; + if (disallowedFlags) { + if (disallowedFlags & interfaces_js_1.FLAG_INHIBITED) { + // We were already rejected, maintain this + return error_js_1.$$inhibit; + } + else if (disallowedFlags & interfaces_js_1.FLAG_ERROR) { + // We were already rejected, maintain this + return (0, error_js_1.flagError)(dataEv.at(i)); + } + else { + // We weren't already inhibited + return onRejectReturnValue; + } + } + else { + if (flags & interfaces_js_1.FLAG_ERROR && this.valueForError !== false) { + return valueForError; + } + if (flags & interfaces_js_1.FLAG_INHIBITED && this.valueForInhibited !== false) { + return valueForInhibited; + } + // Assume pass-through + return dataEv.at(i); + } + }); + } + // Checks already performed via addDependency, just pass everything through. Should have been inlined! + passThroughExecute(details) { + const ev = details.values[0]; + if (ev.isBatch) { + return ev.entries; + } + else { + const val = ev.value; + return details.indexMap(() => val); + } + } +} +exports.__FlagStep = __FlagStep; +/** + * Example use case: get user by id, but id is null: no need to fetch the user + * since we know they won't exist. + */ +function inhibitOnNull($step, options) { + return new __FlagStep($step, { + ...options, + acceptFlags: interfaces_js_1.DEFAULT_ACCEPT_FLAGS & ~interfaces_js_1.FLAG_NULL, + }); +} +/** + * Example use case: expecting a node ID that represents a User, but get one + * that represents a Post instead: throw error to tell user they've sent invalid + * data. + */ +function assertNotNull($step, message, options) { + return new __FlagStep($step, { + ...options, + acceptFlags: interfaces_js_1.DEFAULT_ACCEPT_FLAGS & ~interfaces_js_1.FLAG_NULL, + onReject: new error_js_1.SafeError(message), + }); +} +function trap($step, acceptFlags, options) { + return new __FlagStep($step, { + ...options, + acceptFlags: (acceptFlags & interfaces_js_1.TRAPPABLE_FLAGS) | interfaces_js_1.FLAG_NULL, + }); +} +// Have to overwrite the getDep method due to circular dependency +step_js_1.Step.prototype.getDep = function (depId, throwOnFlagged = false) { + const { step, acceptFlags, onReject } = this.getDepOptions(depId); + if (acceptFlags === interfaces_js_1.DEFAULT_ACCEPT_FLAGS && onReject == null) { + return step; + } + else { + if (throwOnFlagged) { + throw new Error(`When retrieving dependency ${step} of ${this}, the dependency is flagged as ${digestAcceptFlags(acceptFlags)}/onReject=${String(onReject)}. Please use \`this.getDepOptions(depId)\` instead, and handle the flags`); + } + // Return a __FlagStep around options.step so that all the options are preserved. + return new __FlagStep(step, { acceptFlags, onReject }); + } +}; +//# sourceMappingURL=__flag.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__flag.js.map b/grafast/grafast/dist/steps/__flag.js.map new file mode 100644 index 0000000000..a80470a305 --- /dev/null +++ b/grafast/grafast/dist/steps/__flag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__flag.js","sourceRoot":"","sources":["../../src/steps/__flag.ts"],"names":[],"mappings":";;;AA+RA,sCAQC;AAOD,sCAUC;AAED,oBAaC;AAtUD,0CAA8D;AAC9D,8CAAwC;AAQxC,oDAS0B;AAE1B,wCAAqD;AAGrD,eAAe;AACF,QAAA,UAAU,GAAG,0BAAiC,CAAC;AAC/C,QAAA,cAAc,GAAG,8BAAqC,CAAC;AACvD,QAAA,uBAAuB,GAAG,CAAC,0BAAU;IAChD,8BAAc,CAAwB,CAAC;AAEzC,SAAS,iBAAiB,CAAC,WAAgC;IACzD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,WAAW,GAAG,yBAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;IACD,IAAI,CAAC,WAAW,GAAG,0BAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,WAAW,GAAG,8BAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,WAAW,GAAG;IAClB,MAAM;IACN,YAAY;IACZ,cAAc;IACd,qCAAqC;CAC7B,CAAC;AAcX,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Ae,CAAC,GAAG,yBAAS;KACzD,CAAC,CAAC;AACL,CAAC;AAED,iEAAiE;AAChE,cAAI,CAAC,SAAiB,CAAC,MAAM,GAAG,UAE/B,KAAa,EACb,cAAc,GAAG,KAAK;IAEtB,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClE,IAAI,WAAW,KAAK,oCAAoB,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,IAAI,cAAc,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,8BAA8B,IAAI,OAAO,IAAI,kCAAkC,iBAAiB,CAC9F,WAAW,CACZ,aAAa,MAAM,CAClB,QAAQ,CACT,0EAA0E,CAC5E,CAAC;QACJ,CAAC;QACD,iFAAiF;QACjF,OAAO,IAAI,UAAU,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;IACzD,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDefault.d.ts b/grafast/grafast/dist/steps/__inputDefault.d.ts new file mode 100644 index 0000000000..bb07ace0db --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDefault.d.ts @@ -0,0 +1,14 @@ +import type { UnbatchedExecutionExtra } from "../interfaces.js"; +import { UnbatchedStep } from "../step.js"; +import type { __TrackedValueStep } from "./__trackedValue.js"; +export declare class __InputDefaultStep extends UnbatchedStep { + private defaultValue; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + constructor($variableValue: __TrackedValueStep, defaultValue: unknown); + unbatchedExecute(_extra: UnbatchedExecutionExtra, variableValue: unknown): unknown; +} +//# sourceMappingURL=__inputDefault.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDefault.d.ts.map b/grafast/grafast/dist/steps/__inputDefault.d.ts.map new file mode 100644 index 0000000000..f639ad750e --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDefault.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputDefault.d.ts","sourceRoot":"","sources":["../../src/steps/__inputDefault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,qBAAa,kBAAmB,SAAQ,aAAa;IASjD,OAAO,CAAC,YAAY;IARtB,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;gBAGnB,cAAc,EAAE,kBAAkB,EAC1B,YAAY,EAAE,OAAO;IAM/B,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,aAAa,EAAE,OAAO;CAgCzE"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDefault.js b/grafast/grafast/dist/steps/__inputDefault.js new file mode 100644 index 0000000000..2f0445509f --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDefault.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__InputDefaultStep = void 0; +const step_js_1 = require("../step.js"); +class __InputDefaultStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "__InputDefaultStep", + }; } + constructor($variableValue, defaultValue) { + super(); + this.defaultValue = defaultValue; + this.isSyncAndSafe = true; + this.addUnaryDependency($variableValue); + } + unbatchedExecute(_extra, variableValue) { + return variableValue === undefined ? this.defaultValue : variableValue; + } + /** @internal */ + eval() { + const $variable = this.getDep(0); + const variableValue = $variable.eval(); + return variableValue === undefined ? this.defaultValue : variableValue; + } + /** @internal */ + evalIs(value) { + if (value === undefined) { + return false; + } + else { + const $variable = this.getDep(0); + return $variable.evalIs(undefined) + ? this.defaultValue === value + : $variable.evalIs(value); + } + } + /** @internal */ + evalLength() { + const $variable = this.getDep(0); + return $variable.evalIs(undefined) + ? Array.isArray(this.defaultValue) + ? this.defaultValue.length + : null + : $variable.evalLength(); + } +} +exports.__InputDefaultStep = __InputDefaultStep; +//# sourceMappingURL=__inputDefault.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDefault.js.map b/grafast/grafast/dist/steps/__inputDefault.js.map new file mode 100644 index 0000000000..a8cc732132 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDefault.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputDefault.js","sourceRoot":"","sources":["../../src/steps/__inputDefault.ts"],"names":[],"mappings":";;;AACA,wCAA2C;AAG3C,MAAa,kBAAmB,SAAQ,uBAAa;aAC5C,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,oBAAoB;KACjC,AAHc,CAGb;IAGF,YACE,cAAkC,EAC1B,YAAqB;QAE7B,KAAK,EAAE,CAAC;QAFA,iBAAY,GAAZ,YAAY,CAAS;QAJ/B,kBAAa,GAAG,IAAI,CAAC;QAOnB,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;IAED,gBAAgB,CAAC,MAA+B,EAAE,aAAsB;QACtE,OAAO,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IACzE,CAAC;IAED,gBAAgB;IAChB,IAAI;QACF,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAuB,CAAC;QACvD,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;QACvC,OAAO,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;IACzE,CAAC;IAED,gBAAgB;IAChB,MAAM,CAAC,KAA2B;QAChC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAuB,CAAC;YACvD,OAAO,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;gBAChC,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,KAAK;gBAC7B,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,gBAAgB;IAChB,UAAU;QACR,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAuB,CAAC;QACvD,OAAO,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;YAChC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;gBAChC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;gBAC1B,CAAC,CAAC,IAAI;YACR,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;;AA9CH,gDA+CC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDynamicScalar.d.ts b/grafast/grafast/dist/steps/__inputDynamicScalar.d.ts new file mode 100644 index 0000000000..083a73a848 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDynamicScalar.d.ts @@ -0,0 +1,19 @@ +import type { GraphQLScalarType, ListValueNode, ObjectValueNode } from "graphql"; +import type { UnbatchedExecutionExtra } from "../interfaces.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Handles "leaves" (scalars) + */ +export declare class __InputDynamicScalarStep extends UnbatchedStep { + private value; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private variableNames; + constructor(inputType: GraphQLScalarType, value: ListValueNode | ObjectValueNode); + valueFromValues(variableValues: any[]): any; + unbatchedExecute: (_extra: UnbatchedExecutionExtra, ...variableValues: any[]) => TLeaf; +} +//# sourceMappingURL=__inputDynamicScalar.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDynamicScalar.d.ts.map b/grafast/grafast/dist/steps/__inputDynamicScalar.d.ts.map new file mode 100644 index 0000000000..49af1e8b9e --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDynamicScalar.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputDynamicScalar.d.ts","sourceRoot":"","sources":["../../src/steps/__inputDynamicScalar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,eAAe,EAEhB,MAAM,SAAS,CAAC;AAIjB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C;;GAEG;AACH,qBAAa,wBAAwB,CACnC,KAAK,GAAG,GAAG,CACX,SAAQ,aAAa,CAAC,KAAK,CAAC;IAU1B,OAAO,CAAC,KAAK;IATf,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,OAAO,CAAC,aAAa,CAAgB;gBAGnC,SAAS,EAAE,iBAAiB,EACpB,KAAK,EAAE,aAAa,GAAG,eAAe;IA8ChD,eAAe,CAAC,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG;IA+C3C,gBAAgB,GACd,QAAQ,uBAAuB,EAC/B,GAAG,gBAAgB,GAAG,EAAE,KACvB,KAAK,CAGN;CAwBH"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDynamicScalar.js b/grafast/grafast/dist/steps/__inputDynamicScalar.js new file mode 100644 index 0000000000..354db3a11c --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDynamicScalar.js @@ -0,0 +1,127 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__InputDynamicScalarStep = void 0; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const error_js_1 = require("../error.js"); +const step_js_1 = require("../step.js"); +const { Kind } = graphql; +/** + * Handles "leaves" (scalars) + */ +class __InputDynamicScalarStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "__InputDynamicScalarStep", + }; } + constructor(inputType, value) { + super(); + this.value = value; + this.isSyncAndSafe = true; + this.variableNames = []; + this.unbatchedExecute = (_extra, ...variableValues) => { + const converted = this.valueFromValues(variableValues); + return converted; + }; + // Walk value and add any variable references as dependencies + const walk = (inputValue) => { + switch (inputValue.kind) { + case Kind.VARIABLE: { + const variableName = inputValue.name.value; + this.variableNames.push(variableName); + const variableValuePlan = this.operationPlan.trackedVariableValuesStep.get(variableName); + this.addDependency(variableValuePlan); + return; + } + case Kind.INT: + case Kind.FLOAT: + case Kind.STRING: + case Kind.BOOLEAN: + case Kind.NULL: { + // No need to take action + return; + } + case Kind.LIST: { + inputValue.values.map(walk); + return; + } + case Kind.OBJECT: { + for (const field of inputValue.fields) { + walk(field.value); + } + return; + } + case Kind.ENUM: { + throw new error_js_1.SafeError("Enum values cannot be included within scalars"); + } + default: { + const never = inputValue; + throw new error_js_1.SafeError(`Unsupported kind '${never.kind}'`); + } + } + }; + walk(value); + } + valueFromValues(variableValues) { + const convert = (inputValue) => { + switch (inputValue.kind) { + case Kind.VARIABLE: { + const variableName = inputValue.name.value; + const variableIndex = this.variableNames.indexOf(variableName); + return variableValues[variableIndex]; + } + case Kind.INT: { + return parseInt(inputValue.value, 10); + } + case Kind.FLOAT: { + return parseFloat(inputValue.value); + } + case Kind.STRING: { + return inputValue.value; + } + case Kind.BOOLEAN: { + return inputValue.value; + } + case Kind.NULL: { + return null; + } + case Kind.LIST: { + return inputValue.values.map(convert); + } + case Kind.OBJECT: { + const obj = Object.create(null); + for (const field of inputValue.fields) { + obj[field.name.value] = convert(field.value); + } + return obj; + } + case Kind.ENUM: { + throw new error_js_1.SafeError("Enum values cannot be included within scalars"); + } + default: { + const never = inputValue; + throw new error_js_1.SafeError(`Unsupported kind '${never.kind}'`); + } + } + }; + return convert(this.value); + } + /** @internal */ + eval() { + const variableValues = this.variableNames.map((variableName, i) => this.getDep(i, true).eval()); + return this.valueFromValues(variableValues); + } + /** @internal */ + evalIs(expectedValue) { + if (expectedValue === undefined || + expectedValue === null || + expectedValue === 0) { + return false; + } + else { + throw new Error("__InputDynamicScalarStep doesn't support evalIs on non-null, non-undefined, non-0 values"); + } + } +} +exports.__InputDynamicScalarStep = __InputDynamicScalarStep; +//# sourceMappingURL=__inputDynamicScalar.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputDynamicScalar.js.map b/grafast/grafast/dist/steps/__inputDynamicScalar.js.map new file mode 100644 index 0000000000..2fd39cf702 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputDynamicScalar.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputDynamicScalar.js","sourceRoot":"","sources":["../../src/steps/__inputDynamicScalar.ts"],"names":[],"mappings":";;;;AAMA,yDAAmC;AAEnC,0CAAwC;AAExC,wCAA2C;AAG3C,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AAEzB;;GAEG;AACH,MAAa,wBAEX,SAAQ,uBAAoB;aACrB,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,0BAA0B;KACvC,AAHc,CAGb;IAIF,YACE,SAA4B,EACpB,KAAsC;QAE9C,KAAK,EAAE,CAAC;QAFA,UAAK,GAAL,KAAK,CAAiC;QALhD,kBAAa,GAAG,IAAI,CAAC;QACb,kBAAa,GAAa,EAAE,CAAC;QAiGrC,qBAAgB,GAAG,CACjB,MAA+B,EAC/B,GAAG,cAAqB,EACjB,EAAE;YACT,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YACvD,OAAO,SAAS,CAAC;QACnB,CAAC,CAAC;QAhGA,6DAA6D;QAC7D,MAAM,IAAI,GAAG,CAAC,UAAqB,EAAQ,EAAE;YAC3C,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;gBACxB,KAAK,IAAI,CAAC,QAAQ,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,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBAC/C,CAAC;oBACD,OAAO,GAAG,CAAC;gBACb,CAAC;gBACD,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;oBACf,MAAM,IAAI,oBAAS,CAAC,+CAA+C,CAAC,CAAC;gBACvE,CAAC;gBACD,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,KAAK,GAAU,UAAU,CAAC;oBAChC,MAAM,IAAI,oBAAS,CACjB,qBAAsB,KAAmB,CAAC,IAAI,GAAG,CAClD,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC,CAAC;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAUD,gBAAgB;IAChB,IAAI;QACF,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAChE,IAAI,CAAC,MAAM,CAAqB,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAChD,CAAC;QACF,OAAO,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC;IAED,gBAAgB;IAChB,MAAM,CAAC,aAAmC;QACxC,IACE,aAAa,KAAK,SAAS;YAC3B,aAAa,KAAK,IAAI;YACtB,aAAa,KAAK,CAAC,EACnB,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;QACJ,CAAC;IACH,CAAC;;AAtIH,4DAuIC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputList.d.ts b/grafast/grafast/dist/steps/__inputList.d.ts new file mode 100644 index 0000000000..4fccaa2d73 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputList.d.ts @@ -0,0 +1,22 @@ +import type { GraphQLInputType } from "graphql"; +import * as graphql from "graphql"; +import type { AnyInputStep, NotVariableValueNode } from "../interfaces.js"; +import { Step } from "../step.js"; +/** + * Implements `__InputListStep`. + */ +export declare class __InputListStep = graphql.GraphQLList> extends Step { + private readonly inputValues; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private itemCount; + constructor(inputType: TInputType, inputValues: NotVariableValueNode | undefined); + optimize(): Step; + execute(): any[]; + unbatchedExecute: () => any; + at(index: number): AnyInputStep; +} +//# sourceMappingURL=__inputList.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputList.d.ts.map b/grafast/grafast/dist/steps/__inputList.d.ts.map new file mode 100644 index 0000000000..5116c6ad85 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputList.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputList.d.ts","sourceRoot":"","sources":["../../src/steps/__inputList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMlC;;GAEG;AACH,qBAAa,eAAe,CAC1B,UAAU,SACR,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAC/E,SAAQ,IAAI;IAWV,OAAO,CAAC,QAAQ,CAAC,WAAW;IAV9B,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IAErB,OAAO,CAAC,SAAS,CAAK;gBAGpB,SAAS,EAAE,UAAU,EACJ,WAAW,EAAE,oBAAoB,GAAG,SAAS;IAoChE,QAAQ,IAAI,IAAI;IAchB,OAAO,IAAI,GAAG,EAAE;IAKhB,gBAAgB,QAAO,GAAG,CAIxB;IAEF,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;CAoDhC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputList.js b/grafast/grafast/dist/steps/__inputList.js new file mode 100644 index 0000000000..d53665aa65 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputList.js @@ -0,0 +1,113 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__InputListStep = void 0; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const assert = tslib_1.__importStar(require("../assert.js")); +const input_js_1 = require("../input.js"); +const step_js_1 = require("../step.js"); +const constant_js_1 = require("./constant.js"); +const list_js_1 = require("./list.js"); +const { GraphQLList, Kind } = graphql; +/** + * Implements `__InputListStep`. + */ +class __InputListStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "__InputListStep", + }; } + constructor(inputType, inputValues) { + super(); + this.inputValues = inputValues; + this.isSyncAndSafe = true; + this.itemCount = 0; + this.unbatchedExecute = () => { + throw new Error("__InputListStep should never execute; it should have been optimized away."); + }; + assert.ok(inputType instanceof GraphQLList, "Expected inputType to be a List"); + const innerType = inputType.ofType; + const values = inputValues === undefined + ? undefined + : inputValues.kind === Kind.LIST + ? inputValues.values + : inputValues.kind === Kind.NULL + ? undefined // Really it's `null` but we don't care here + : // Coerce to list + [inputValues]; + if (values !== undefined) { + for (let inputValueIndex = 0, inputValuesLength = values.length; inputValueIndex < inputValuesLength; inputValueIndex++) { + const inputValue = values[inputValueIndex]; + const innerPlan = (0, input_js_1.inputStep)(this.operationPlan, innerType, inputValue, undefined); + this.addDependency(innerPlan); + this.itemCount++; + } + } + } + optimize() { + const { inputValues } = this; + if (inputValues?.kind === "NullValue") { + return (0, constant_js_1.constant)(null); + } + else { + const arr = []; + for (let idx = 0; idx < this.itemCount; idx++) { + const itemPlan = this.getDep(idx); + arr[idx] = itemPlan; + } + return (0, list_js_1.list)(arr); + } + } + execute() { + throw new Error("__InputListStep should never execute; it should have been optimized away."); + } + at(index) { + const itemPlan = index < this.itemCount ? this.getDep(index) : (0, constant_js_1.constant)(undefined); + (0, input_js_1.assertInputStep)(itemPlan); + return itemPlan; + } + /** @internal */ + eval() { + if (this.inputValues?.kind === "NullValue") { + return null; + } + const list = []; + for (let itemPlanIndex = 0; itemPlanIndex < this.itemCount; itemPlanIndex++) { + const itemPlan = this.getDep(itemPlanIndex); + (0, input_js_1.assertInputStep)(itemPlan); + const value = itemPlan.eval(); + list[itemPlanIndex] = value; + } + return list; + } + /** @internal */ + evalIs(value) { + if (value === undefined) { + return this.inputValues === value; + } + else if (value === null) { + return this.inputValues?.kind === "NullValue"; + } + else { + throw new Error("__InputListStep cannot evalIs values other than null and undefined currently"); + } + } + /** @internal */ + evalLength() { + if (this.inputValues === undefined) { + return null; + } + else if (this.inputValues.kind === Kind.NULL) { + return null; + } + else if (this.inputValues.kind === Kind.LIST) { + return this.inputValues.values.length; + } + else { + // Coercion to list + return 1; + } + } +} +exports.__InputListStep = __InputListStep; +//# sourceMappingURL=__inputList.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputList.js.map b/grafast/grafast/dist/steps/__inputList.js.map new file mode 100644 index 0000000000..e1280cc72b --- /dev/null +++ b/grafast/grafast/dist/steps/__inputList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputList.js","sourceRoot":"","sources":["../../src/steps/__inputList.ts"],"names":[],"mappings":";;;;AACA,yDAAmC;AAEnC,6DAAuC;AACvC,0CAAyD;AAEzD,wCAAkC;AAClC,+CAAyC;AACzC,uCAAiC;AAEjC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AAEtC;;GAEG;AACH,MAAa,eAGX,SAAQ,cAAI;aACL,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,iBAAiB;KAC9B,AAHc,CAGb;IAKF,YACE,SAAqB,EACJ,WAA6C;QAE9D,KAAK,EAAE,CAAC;QAFS,gBAAW,GAAX,WAAW,CAAkC;QANhE,kBA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BAAgB;IAChB,MAAM,CAAC,KAA2B;QAChC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC;QACpC,CAAC;aAAM,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,WAAW,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;QACJ,CAAC;IACH,CAAC;IAED,gBAAgB;IAChB,UAAU;QACR,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,mBAAmB;YACnB,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;;AA9HH,0CA+HC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputObject.d.ts b/grafast/grafast/dist/steps/__inputObject.d.ts new file mode 100644 index 0000000000..301cd19e5d --- /dev/null +++ b/grafast/grafast/dist/steps/__inputObject.d.ts @@ -0,0 +1,25 @@ +import type { GraphQLInputObjectType } from "graphql"; +import type { AnyInputStep, NotVariableValueNode, UnbatchedExecutionExtra } from "../interfaces.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Implements `InputObjectStep` + */ +export declare class __InputObjectStep extends UnbatchedStep { + private inputObjectType; + private inputValues; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private inputFields; + constructor(inputObjectType: TInputType, inputValues: NotVariableValueNode | undefined); + optimize(): import("./constant.js").ConstantStep | this; + finalize(): void; + unbatchedExecute(_extra: UnbatchedExecutionExtra, ...values: any[]): any; + get(attrName: string): AnyInputStep; +} +export type __InputObjectStepWithDollars = __InputObjectStep & { + [key in keyof ReturnType & string as `$${key}`]: AnyInputStep; +}; +//# sourceMappingURL=__inputObject.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputObject.d.ts.map b/grafast/grafast/dist/steps/__inputObject.d.ts.map new file mode 100644 index 0000000000..35ddffcd5d --- /dev/null +++ b/grafast/grafast/dist/steps/__inputObject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputObject.d.ts","sourceRoot":"","sources":["../../src/steps/__inputObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAKtD,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C;;GAEG;AACH,qBAAa,iBAAiB,CAC5B,UAAU,SAAS,sBAAsB,GAAG,sBAAsB,CAClE,SAAQ,aAAa;IAWnB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,WAAW;IAXrB,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IAErB,OAAO,CAAC,WAAW,CAEK;gBAEd,eAAe,EAAE,UAAU,EAC3B,WAAW,EAAE,oBAAoB,GAAG,SAAS;IAmCvD,QAAQ;IAOR,QAAQ;IAiCR,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;IAelE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY;CAmGpC;AAED,MAAM,MAAM,4BAA4B,CACtC,UAAU,SAAS,sBAAsB,GAAG,sBAAsB,IAChE,iBAAiB,CAAC,UAAU,CAAC,GAAG;KACjC,GAAG,IAAI,MAAM,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAC/C,MAAM,IAAI,IAAI,GAAG,EAAE,GAAG,YAAY;CACrC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputObject.js b/grafast/grafast/dist/steps/__inputObject.js new file mode 100644 index 0000000000..3873dd799e --- /dev/null +++ b/grafast/grafast/dist/steps/__inputObject.js @@ -0,0 +1,174 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__InputObjectStep = void 0; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const tamedevil_1 = tslib_1.__importDefault(require("tamedevil")); +const input_js_1 = require("../input.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const constant_js_1 = require("./constant.js"); +const { Kind } = graphql; +/** + * Implements `InputObjectStep` + */ +class __InputObjectStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "__InputObjectStep", + }; } + constructor(inputObjectType, inputValues) { + super(); + this.inputObjectType = inputObjectType; + this.inputValues = inputValues; + this.isSyncAndSafe = true; + this.inputFields = Object.create(null); + const inputFieldDefinitions = inputObjectType.getFields(); + const inputFields = inputValues?.kind === "ObjectValue" ? inputValues.fields : undefined; + for (const inputFieldName in inputFieldDefinitions) { + const inputFieldDefinition = inputFieldDefinitions[inputFieldName]; + const inputFieldType = inputFieldDefinition.type; + const defaultValue = inputFieldDefinition.defaultValue !== undefined + ? (0, utils_js_1.defaultValueToValueNode)(inputFieldType, inputFieldDefinition.defaultValue) + : undefined; + const inputFieldValue = inputFields?.find((val) => val.name.value === inputFieldName); + const step = (0, input_js_1.inputStep)(this.operationPlan, inputFieldType, inputFieldValue?.value, defaultValue); + this.inputFields[inputFieldName] = { + step, + dependencyIndex: this.addDependency(step), + }; + Object.defineProperty(this, `$${inputFieldName}`, { + value: step, + }); + } + } + optimize() { + if (this.inputValues?.kind === "NullValue") { + return (0, constant_js_1.constant)(null); + } + return this; + } + finalize() { + tamedevil_1.default.runInBatch((0, tamedevil_1.default) `(function (extra, ${tamedevil_1.default.join(this.dependencies.map((_, dependencyIndex) => tamedevil_1.default.identifier(`val${dependencyIndex}`)), ", ")}) { + const resultValues = Object.create(null); + ${tamedevil_1.default.join(Object.entries(this.inputFields).map(([inputFieldName, { dependencyIndex }]) => { + if (dependencyIndex == null) { + throw new Error("inputFieldPlan has gone missing."); + } + const teVal = tamedevil_1.default.identifier(`val${dependencyIndex}`); + return (0, tamedevil_1.default) `\ + if (${teVal} !== undefined) { + resultValues${tamedevil_1.default.set(inputFieldName, true)} = ${teVal}; + }`; + }), "\n")} + return resultValues; +})`, (fn) => { + this.unbatchedExecute = fn; + }); + super.finalize(); + } + unbatchedExecute(_extra, ...values) { + const resultValues = Object.create(null); + for (const inputFieldName in this.inputFields) { + const dependencyIndex = this.inputFields[inputFieldName].dependencyIndex; + if (dependencyIndex == null) { + throw new Error("inputFieldPlan has gone missing."); + } + const value = values[dependencyIndex]; + if (value !== undefined) { + resultValues[inputFieldName] = value; + } + } + return resultValues; + } + get(attrName) { + const step = this.inputFields[attrName]?.step; + if (step === undefined) { + throw new Error(`Tried to '.get("${attrName}")', but no such attribute exists on ${this.inputObjectType.name}`); + } + return step; + } + /** @internal */ + eval() { + if (this.inputValues?.kind === "NullValue") { + return null; + } + const resultValues = Object.create(null); + for (const inputFieldName in this.inputFields) { + const inputFieldPlan = this.inputFields[inputFieldName].step; + resultValues[inputFieldName] = inputFieldPlan.eval(); + } + return resultValues; + } + /** @internal */ + evalIs(value) { + if (value === undefined) { + return this.inputValues === value; + } + else if (value === null) { + return this.inputValues?.kind === "NullValue"; + } + else if (value === 0) { + return (this.inputValues?.kind === "IntValue" && this.inputValues.value === "0"); + } + else { + throw new Error("__InputObjectStep cannot evalIs values other than null and undefined currently"); + } + } + /** @internal */ + evalIsEmpty() { + return (this.inputValues?.kind === "ObjectValue" && + this.inputValues.fields.length === 0); + } + // Written without consulting spec. + /** @internal */ + evalHas(attrName) { + if (!this.inputValues) { + return false; + } + if (this.inputValues.kind === "NullValue") { + return false; + } + if (!(attrName in this.inputFields)) { + return false; + } + return !this.inputFields[attrName].step.evalIs(undefined); + } + /** @internal */ + evalKeys() { + if (this.inputValues === undefined) { + return null; + } + else if (this.inputValues.kind === Kind.NULL) { + return null; + } + else if (this.inputValues.kind !== Kind.OBJECT) { + throw new Error("evalKeys must only be called for object types"); + } + const keys = []; + const inputFieldKeys = Object.keys(this.inputFields); + for (let i = 0; i < inputFieldKeys.length; i++) { + const key = inputFieldKeys[i]; + const inputFieldPlan = this.inputFields[key].step; + // This evalIs() is required. With __inputObject we know that it's an + // explicit input object (not variable) in the GraphQL document, but the + // values of each key may still be undefined if they're a variable that + // isn't supplied and has no default. In these cases we do not wish to + // return these keys (since the input object is not seen as having those + // keys set), but that will differ on an operation-to-operation basis, + // and thus we must evaluate whether or not they are undefined. Note that + // this implicitly adds constraints for these values; we do not need to + // explicitly add any constraint for the object itself because the + // document itself guarantees it will always be present. + // + // PERF: We should not need to .evalIs(undefined) for any input field + // that is declared as non-nullable, I think? + if (!inputFieldPlan.evalIs(undefined)) { + keys.push(key); + } + } + return keys; + } +} +exports.__InputObjectStep = __InputObjectStep; +//# sourceMappingURL=__inputObject.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputObject.js.map b/grafast/grafast/dist/steps/__inputObject.js.map new file mode 100644 index 0000000000..677e61fcaf --- /dev/null +++ b/grafast/grafast/dist/steps/__inputObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputObject.js","sourceRoot":"","sources":["../../src/steps/__inputObject.ts"],"names":[],"mappings":";;;;AACA,yDAAmC;AACnC,kEAA2B;AAE3B,0CAAwC;AAMxC,wCAA2C;AAC3C,0CAAsD;AACtD,+CAAyC;AAEzC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;AAEzB;;GAEG;AACH,MAAa,iBAEX,SAAQ,uBAAa;aACd,aA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aAAM,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YACjD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACrD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YAElD,qEAAqE;YACrE,wEAAwE;YACxE,uEAAuE;YACvE,sEAAsE;YACtE,wEAAwE;YACxE,sEAAsE;YACtE,yEAAyE;YACzE,uEAAuE;YACvE,kEAAkE;YAClE,wDAAwD;YACxD,EAAE;YACF,qEAAqE;YACrE,6CAA6C;YAC7C,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;gBACtC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;QAED,OAAO,IAAgD,CAAC;IAC1D,CAAC;;AA1MH,8CA2MC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputStaticLeaf.d.ts b/grafast/grafast/dist/steps/__inputStaticLeaf.d.ts new file mode 100644 index 0000000000..5d63b5c757 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputStaticLeaf.d.ts @@ -0,0 +1,19 @@ +import type { BooleanValueNode, EnumValueNode, FloatValueNode, GraphQLLeafType, IntValueNode, NullValueNode, StringValueNode } from "graphql"; +import { UnbatchedStep } from "../step.js"; +/** + * Implements `InputStaticLeafStep` + * + * @see __InputDynamicScalarStep + */ +export declare class __InputStaticLeafStep extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private readonly coercedValue; + constructor(inputType: GraphQLLeafType, value: IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | undefined); + unbatchedExecute(): TLeaf; + optimize(): import("./constant.js").ConstantStep; +} +//# sourceMappingURL=__inputStaticLeaf.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputStaticLeaf.d.ts.map b/grafast/grafast/dist/steps/__inputStaticLeaf.d.ts.map new file mode 100644 index 0000000000..5d971abc86 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputStaticLeaf.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputStaticLeaf.d.ts","sourceRoot":"","sources":["../../src/steps/__inputStaticLeaf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C;;;;GAIG;AACH,qBAAa,qBAAqB,CAAC,KAAK,GAAG,GAAG,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;IAC1E,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IAErB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAM;gBAEjC,SAAS,EAAE,eAAe,EAC1B,KAAK,EACD,YAAY,GACZ,cAAc,GACd,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,SAAS;IAWf,gBAAgB,IAAI,KAAK;IAIzB,QAAQ;CAaT"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputStaticLeaf.js b/grafast/grafast/dist/steps/__inputStaticLeaf.js new file mode 100644 index 0000000000..8d80a022aa --- /dev/null +++ b/grafast/grafast/dist/steps/__inputStaticLeaf.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__InputStaticLeafStep = void 0; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const step_js_1 = require("../step.js"); +const constant_js_1 = require("./constant.js"); +const { valueFromAST } = graphql; +/** + * Implements `InputStaticLeafStep` + * + * @see __InputDynamicScalarStep + */ +class __InputStaticLeafStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "__InputStaticLeafStep", + }; } + constructor(inputType, value) { + super(); + this.isSyncAndSafe = true; + // `coerceInputValue` throws on coercion failure. NOTE: it's only safe for + // us to call coerceInputValue because we already know this is a scalar, + // *not* a variable, and not an object/list therefore cannot _contain_ a + // variable. Otherwise we'd need to process it via + // operationPlan.trackedVariableValuesStep. + this.coercedValue = value != null ? valueFromAST(value, inputType) : value; + } + unbatchedExecute() { + return this.coercedValue; + } + optimize() { + return (0, constant_js_1.constant)(this.coercedValue, false); + } + /** @internal */ + eval() { + return this.coercedValue; + } + /** @internal */ + evalIs(expectedValue) { + return this.coercedValue === expectedValue; + } +} +exports.__InputStaticLeafStep = __InputStaticLeafStep; +//# sourceMappingURL=__inputStaticLeaf.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__inputStaticLeaf.js.map b/grafast/grafast/dist/steps/__inputStaticLeaf.js.map new file mode 100644 index 0000000000..f10510e604 --- /dev/null +++ b/grafast/grafast/dist/steps/__inputStaticLeaf.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__inputStaticLeaf.js","sourceRoot":"","sources":["../../src/steps/__inputStaticLeaf.ts"],"names":[],"mappings":";;;;AASA,yDAAmC;AAEnC,wCAA2C;AAC3C,+CAAyC;AAEzC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;AAEjC;;;;GAIG;AACH,MAAa,qBAAmC,SAAQ,uBAAoB;aACnE,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,uBAAuB;KACpC,AAHc,CAGb;IAIF,YACE,SAA0B,EAC1B,KAOa;QAEb,KAAK,EAAE,CAAC;QAdV,kBAAa,GAAG,IAAI,CAAC;QAenB,0EAA0E;QAC1E,wEAAwE;QACxE,wEAAwE;QACxE,kDAAkD;QAClD,2CAA2C;QAC3C,IAAI,CAAC,YAAY,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,QAAQ;QACN,OAAO,IAAA,sBAAQ,EAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAI;QACF,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,gBAAgB;IAChB,MAAM,CAAC,aAAsB;QAC3B,OAAO,IAAI,CAAC,YAAY,KAAK,aAAa,CAAC;IAC7C,CAAC;;AA5CH,sDA6CC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__item.d.ts b/grafast/grafast/dist/steps/__item.d.ts new file mode 100644 index 0000000000..196e179c37 --- /dev/null +++ b/grafast/grafast/dist/steps/__item.d.ts @@ -0,0 +1,27 @@ +import type { GrafastResultsList, JSONValue } from "../index.js"; +import { $$deepDepSkip } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { $$noExec, UnbatchedStep } from "../step.js"; +/** + * An __ItemStep is an internal plan (users must never construct it + * themselves!) that Grafast uses to refer to an individual item within a list + * or stream. + */ +export declare class __ItemStep extends UnbatchedStep { + readonly depth: number; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + [$$noExec]: boolean; + constructor(parentPlan: Step | Step, depth?: number); + toStringMeta(): string; + planJSONExtra(): Record | undefined; + getParentStep(): Step; + [$$deepDepSkip](): Step; + execute(): GrafastResultsList; + unbatchedExecute(): TData; + finalize(): void; +} +//# sourceMappingURL=__item.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__item.d.ts.map b/grafast/grafast/dist/steps/__item.d.ts.map new file mode 100644 index 0000000000..240aa2227d --- /dev/null +++ b/grafast/grafast/dist/steps/__item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__item.d.ts","sourceRoot":"","sources":["../../src/steps/__item.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AACH,qBAAa,UAAU,CAAC,KAAK,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;aAevC,KAAK;IAdvB,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,CAAC,QAAQ,CAAC,UAAQ;gBAQhB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EACvB,KAAK,SAAI;IAQ3B,YAAY,IAAI,MAAM;IAIf,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG,SAAS;IAMzE,aAAa,IAAI,IAAI;IAGrB,CAAC,aAAa,CAAC,IAAI,IAAI;IAIvB,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC;IAGpC,gBAAgB,IAAI,KAAK;IAIlB,QAAQ,IAAI,IAAI;CAQxB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__item.js b/grafast/grafast/dist/steps/__item.js new file mode 100644 index 0000000000..5d903bd563 --- /dev/null +++ b/grafast/grafast/dist/steps/__item.js @@ -0,0 +1,56 @@ +"use strict"; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__ItemStep = void 0; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const interfaces_js_1 = require("../interfaces.js"); +const step_js_1 = require("../step.js"); +/** + * An __ItemStep is an internal plan (users must never construct it + * themselves!) that Grafast uses to refer to an individual item within a list + * or stream. + */ +class __ItemStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "__ItemStep", + }; } + constructor(parentPlan, depth = 0) { + super(); + this.depth = depth; + this.isSyncAndSafe = true; + this[_a] = true; + this.addDependency(parentPlan); + this._isUnary = false; + this._isUnaryLocked = true; + } + toStringMeta() { + return chalk_1.default.bold.yellow(String(this.dependencies[0].id)); + } + planJSONExtra() { + return { + transformStepId: this.transformStepId, + }; + } + getParentStep() { + return this.getDep(0); + } + [(_a = step_js_1.$$noExec, interfaces_js_1.$$deepDepSkip)]() { + return this.getDep(0); + } + execute() { + throw new Error("__ItemStep must never execute"); + } + unbatchedExecute() { + throw new Error("__ItemStep must never execute"); + } + finalize() { + super.finalize(); + if (this.transformStepId != null) { + this.transformStepId = this.operationPlan.dangerouslyGetStep(this.transformStepId).id; + } + } +} +exports.__ItemStep = __ItemStep; +//# sourceMappingURL=__item.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__item.js.map b/grafast/grafast/dist/steps/__item.js.map new file mode 100644 index 0000000000..b28dd1fa3a --- /dev/null +++ b/grafast/grafast/dist/steps/__item.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__item.js","sourceRoot":"","sources":["../../src/steps/__item.ts"],"names":[],"mappings":";;;;;AAAA,0DAA0B;AAG1B,oDAAiD;AAEjD,wCAAqD;AAErD;;;;GAIG;AACH,MAAa,UAAkB,SAAQ,uBAAoB;aAClD,aAAQ,GAAG;QAChB,UAAU,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ast/dist/steps/__trackedValue.d.ts new file mode 100644 index 0000000000..49e3b8e091 --- /dev/null +++ b/grafast/grafast/dist/steps/__trackedValue.d.ts @@ -0,0 +1,64 @@ +import type { GraphQLInputObjectType, GraphQLInputType, VariableDefinitionNode } from "graphql"; +import { GraphQLList, GraphQLNonNull } from "graphql"; +import type { Constraint } from "../constraints.js"; +import type { ExecutionDetails, GrafastResultsList, UnbatchedExecutionExtra } from "../interfaces.js"; +import { UnbatchedStep } from "../step.js"; +import type { __ValueStep } from "./__value.js"; +import type { AccessStep } from "./access.js"; +/** + * Implements the `__TrackedValueStep(operationPlan, object, constraints, path)` + * algorithm used to allow runtime AND plan-time access to the three special + * entities: `variableValues`, `rootValue` and `context`. + * + * ExecutableStep-time access can evaluate the `object` passed to the constructor, and + * will add constraints to the relevant operationPlan.variableValuesConstraints, + * operationPlan.rootValueConstraints or operationPlan.contextConstraints to + * ensure that all future variableValues, rootValues and context will match the + * assumptions made. + * + * Run-time access will see the runtime values of these properties, it will + * **NOT** reference the `object` passed to the constructor. + * + * In core this will be used for evaluating `@skip`, `@include`, `@defer` and + * `@stream` directives so that a different OpPlan will be used if these would + * change the query plan, but it can also be used within plan resolvers to + * branch the logic of a plan based on something in these entities. + */ +export declare class __TrackedValueStep | undefined = undefined> extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * Could be anything. In the case of context it could even have exotic + * entries such as `pgClient`. + */ + private readonly value; + /** + * The path that we are through the original value (the one that + * `constraints` relates to). + */ + private readonly path; + static withGraphQLType(value: TData | undefined, valuePlan: __ValueStep | AccessStep, constraints: Constraint[], path: Array | undefined, graphqlType: TInputType): __TrackedValueStepWithDollars; + private nullableGraphQLType; + private variableDefinitions; + execute({ count, values: [values0], }: ExecutionDetails<[TData]>): GrafastResultsList; + unbatchedExecute(_extra: UnbatchedExecutionExtra, v: TData): TData; + private getValuePlan; + /** + * Get the named property of an object. + */ + get(attrName: TAttribute): __TrackedValueStepWithDollars[TAttribute]["type"] : undefined>; + /** + * Get the entry at the given index in an array. + */ + at(index: TIndex): __TrackedValueStepWithDollars ? U & GraphQLInputType : TInputType extends GraphQLNonNull> ? U & GraphQLInputType : undefined>; + optimize(): import("../step.js").Step | import("./__flag.js").__FlagStep>; +} +export type __TrackedValueStepWithDollars = __TrackedValueStep & (TInputType extends GraphQLInputObjectType ? { + [key in keyof ReturnType & string as `$${key}`]: __TrackedValueStepWithDollars[key]["type"]>; +} : Record); +//# sourceMappingURL=__trackedValue.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__trackedValue.d.ts.map b/grafast/grafast/dist/steps/__trackedValue.d.ts.map new file mode 100644 index 0000000000..f83036bd96 --- /dev/null +++ b/grafast/grafast/dist/steps/__trackedValue.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__trackedValue.d.ts","sourceRoot":"","sources":["../../src/steps/__trackedValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAEhB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,WAAW,EACX,cAAc,EAIf,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,kBAAkB,CAC7B,KAAK,GAAG,GAAG,EACX,UAAU,SACN,gBAAgB,GAChB,aAAa,CAAC,sBAAsB,CAAC,GACrC,SAAS,GAAG,SAAS,CACzB,SAAQ,aAAa,CAAC,KAAK,CAAC;IA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AC,EACb,UAAU,SAAS,WAAW,CAAC,MAAM,CAAC,CAAC,GACnC,CAAC,GAAG,gBAAgB,GACpB,UAAU,SAAS,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,GACrD,CAAC,GAAG,gBAAgB,GACpB,SAAS,CAChB;IAsMD,QAAQ;CAGT;AAED,MAAM,MAAM,6BAA6B,CACvC,KAAK,GAAG,GAAG,EACX,UAAU,SAAS,gBAAgB,GAAG,SAAS,GAAG,SAAS,IACzD,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,GACvC,CAAC,UAAU,SAAS,sBAAsB,GACtC;KACG,GAAG,IAAI,MAAM,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAC/C,MAAM,IAAI,IAAI,GAAG,EAAE,GAAG,6BAA6B,CACnD,KAAK,SAAS;SAAG,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC;KAAE,GAAG,CAAC,GAAG,GAAG,EAC/C,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CACjD;CACF,GACD,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__trackedValue.js b/grafast/grafast/dist/steps/__trackedValue.js new file mode 100644 index 0000000000..6b8ba2331f --- /dev/null +++ b/grafast/grafast/dist/steps/__trackedValue.js @@ -0,0 +1,318 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__TrackedValueStep = void 0; +const graphql_1 = require("graphql"); +const index_js_1 = require("../index.js"); +const step_js_1 = require("../step.js"); +/** + * Implements the `__TrackedValueStep(operationPlan, object, constraints, path)` + * algorithm used to allow runtime AND plan-time access to the three special + * entities: `variableValues`, `rootValue` and `context`. + * + * ExecutableStep-time access can evaluate the `object` passed to the constructor, and + * will add constraints to the relevant operationPlan.variableValuesConstraints, + * operationPlan.rootValueConstraints or operationPlan.contextConstraints to + * ensure that all future variableValues, rootValues and context will match the + * assumptions made. + * + * Run-time access will see the runtime values of these properties, it will + * **NOT** reference the `object` passed to the constructor. + * + * In core this will be used for evaluating `@skip`, `@include`, `@defer` and + * `@stream` directives so that a different OpPlan will be used if these would + * change the query plan, but it can also be used within plan resolvers to + * branch the logic of a plan based on something in these entities. + */ +class __TrackedValueStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "__TrackedValueStep", + }; } + static withGraphQLType(value, valuePlan, constraints, path = [], graphqlType) { + return (0, index_js_1.operationPlan)().withRootLayerPlan(() => new __TrackedValueStep(value, valuePlan, constraints, path, true, graphqlType)); + } + /** + * @internal + */ + constructor(value, valuePlan, constraints, path = [], isImmutable, graphqlTypeOrVariableDefinitions) { + super(); + this.isSyncAndSafe = true; + this._isImmutable = isImmutable; + this.addDependency(valuePlan); + this.value = value; + this.constraints = constraints; + this.path = path; + this.nullableGraphQLType = + graphqlTypeOrVariableDefinitions && + !isArray(graphqlTypeOrVariableDefinitions) + ? (0, graphql_1.getNullableType)(graphqlTypeOrVariableDefinitions) + : undefined; + this.variableDefinitions = + graphqlTypeOrVariableDefinitions && + isArray(graphqlTypeOrVariableDefinitions) + ? graphqlTypeOrVariableDefinitions + : undefined; + if ((0, graphql_1.isInputObjectType)(this.nullableGraphQLType)) { + const fields = this.nullableGraphQLType.getFields(); + for (const fieldName of Object.keys(fields)) { + let step; + Object.defineProperty(this, `$${fieldName}`, { + get: () => { + if (!step) { + step = this.get(fieldName); + } + return step; + }, + }); + } + } + else if (this.variableDefinitions) { + for (const def of this.variableDefinitions) { + const varName = def.variable.name.value; + let step; + Object.defineProperty(this, `$${varName}`, { + get: () => { + if (!step) { + step = this.get(varName); + } + return step; + }, + }); + } + } + } + execute({ count, values: [values0], }) { + // We have only one dependency, return the value of that. + return values0.isBatch + ? values0.entries + : (0, index_js_1.arrayOfLength)(count, values0.value); + } + unbatchedExecute(_extra, v) { + return v; + } + getValuePlan() { + return this.getDep(0, true); + } + /** + * Get the named property of an object. + */ + get(attrName) { + const { value, path, constraints } = this; + const newValue = value?.[attrName]; + const newValuePlan = this.getValuePlan().get(attrName); + const newPath = [...path, attrName]; + if (this.nullableGraphQLType) { + if ((0, graphql_1.isInputObjectType)(this.nullableGraphQLType)) { + const fields = this.nullableGraphQLType.getFields(); + const field = fields[attrName]; + if (!field) { + throw new Error(`'${this.nullableGraphQLType}' has no attribute '${attrName}'`); + } + return __TrackedValueStep.withGraphQLType(newValue, newValuePlan, constraints, newPath, field.type); + } + else { + throw new Error(`Cannot get field '${attrName}' on non-input-object type '${this.nullableGraphQLType}'`); + } + } + else if (this.variableDefinitions) { + const def = this.variableDefinitions.find((d) => d.variable.name.value === attrName); + if (!def) { + throw new Error(`No variable named '$${attrName}' exists in this operation`); + } + const getType = (t) => { + if (t.kind === graphql_1.Kind.NON_NULL_TYPE) { + return new graphql_1.GraphQLNonNull(getType(t.type)); + } + else if (t.kind === graphql_1.Kind.LIST_TYPE) { + return new graphql_1.GraphQLList(getType(t.type)); + } + else { + const name = t.name.value; + return this.operationPlan.schema.getType(name); + } + }; + const type = getType(def.type); + return __TrackedValueStep.withGraphQLType(newValue, newValuePlan, constraints, newPath, type); + } + else if (this._isImmutable) { + return this.operationPlan.withRootLayerPlan(() => new __TrackedValueStep(newValue, newValuePlan, constraints, newPath, this._isImmutable)); + } + else { + return new __TrackedValueStep(newValue, newValuePlan, constraints, newPath, this._isImmutable); + } + } + /** + * Get the entry at the given index in an array. + */ + at(index) { + const { value, path, constraints } = this; + const newValue = value?.[index]; + const newValuePlan = this.getValuePlan().at(index); + const newPath = [...path, index]; + if (this.nullableGraphQLType) { + if ((0, graphql_1.isListType)(this.nullableGraphQLType)) { + return __TrackedValueStep.withGraphQLType(newValue, newValuePlan, constraints, newPath, this.nullableGraphQLType.ofType); + } + else { + throw new Error(`'${this.nullableGraphQLType}' is not a list type, cannot access array index '${index}' on it`); + } + } + else if (this._isImmutable) { + return this.operationPlan.withRootLayerPlan(() => new __TrackedValueStep(newValue, newValuePlan, constraints, newPath, this._isImmutable)); + } + else { + return new __TrackedValueStep(newValue, newValuePlan, constraints, newPath, this._isImmutable); + } + } + /** + * Evaluates the current value, and adds a constraint to the OpPlan to ensure + * that all future evaluations of this property will always return the same + * value. + * + * **WARNING**: avoid using this where possible, it causes OpPlans to split. + * + * **WARNING**: this is the most expensive eval, if you need to eval, prefer evalIs, evalHas, etc instead. + * + * @internal + */ + eval() { + const { path, value } = this; + this.constraints.push({ + type: "value", + path, + value, + }); + return value; + } + /** + * Evaluates if the current value is equal to this specific value, and adds a + * constraint to the OpPlan to ensure that all future evaluations of this + * check will always return the same (boolean) result. + * + * Should only be used on scalars. + * + * **WARNING**: avoid using this where possible, it causes OpPlans to split. + * + * @internal + */ + evalIs(expectedValue) { + const { value, path } = this; + const pass = value === expectedValue; + this.constraints.push({ + type: "equal", + path, + expectedValue, + pass, + }); + return pass; + } + /** @internal */ + evalIsEmpty() { + const { value, path } = this; + const isEmpty = typeof value === "object" && + value !== null && + Object.keys(value).length === 0; + this.constraints.push({ + type: "isEmpty", + path, + isEmpty, + }); + return isEmpty; + } + /** + * Evaluates if the current value is an object with the given key, and adds a + * constraint to the OpPlan to ensure that all future evaluations of this + * check will always return the same (boolean) result. + * + * **WARNING**: avoid using this where possible, it causes OpPlans to split. + * + * @internal + */ + evalHas(key) { + const { value, path } = this; + const newPath = [...path, key]; + // NOTE: `key in value` would be more performant here, but we cannot trust + // users not to pass `{foo: undefined}` so we must do the more expensive + // `value[key] !== undefined` check. + const exists = (typeof value === "object" && + value && + value[key] !== undefined) || + false; + this.constraints.push({ + type: "exists", + path: newPath, + exists, + }); + return exists; + } + /** + * Evaluates the keys of the current value, and adds a + * constraint to the OpPlan to ensure that all future evaluations of this + * check will always return the same result. + * + * **WARNING**: avoid using this where possible, it causes OpPlans to split. + * + * @internal + */ + evalKeys() { + const { value, path } = this; + if (!(0, graphql_1.isInputObjectType)(this.nullableGraphQLType)) { + throw new Error("evalKeys must only be called for object types"); + } + if (value == null) { + this.constraints.push({ + type: "keys", + path, + keys: null, + }); + return null; + } + const keys = []; + const keysOfType = Object.keys(this.nullableGraphQLType.getFields()); + // NOTE: it's important that we loop through the fields in their defined + // order, this ensures the `keys` array always has consistent ordering. + for (let i = 0; i < keysOfType.length; i++) { + const key = keysOfType[i]; + // NOTE: `key in value` would be more performant here, but we cannot trust + // users not to pass `{foo: undefined}` so we must do the more expensive + // `value[key] !== undefined` check. + if (value[key] !== undefined) { + keys.push(key); + } + } + this.constraints.push({ + type: "keys", + path, + keys, + }); + return keys; + } + /** + * Evaluates the length of the current value (assumed to be an array), and + * adds a constraint to the OpPlan to ensure that all future values will have + * the same length. + * + * **WARNING**: avoid using this where possible, it causes OpPlans to split. + * + * @internal + */ + evalLength() { + const { value, path } = this; + const length = Array.isArray(value) ? value.length : null; + this.constraints.push({ + type: "length", + path, + expectedLength: length, + }); + return length; + } + // At runtime, __TrackedValueStep doesn't need to exist + optimize() { + return this.getDep(0); + } +} +exports.__TrackedValueStep = __TrackedValueStep; +function isArray(t) { + return Array.isArray(t); +} +//# sourceMappingURL=__trackedValue.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__trackedValue.js.map b/grafast/grafast/dist/steps/__trackedValue.js.map new file mode 100644 index 0000000000..0e1697d16d --- /dev/null +++ b/grafast/grafast/dist/steps/__trackedValue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__trackedValue.js","sourceRoot":"","sources":["../../src/steps/__trackedValue.ts"],"names":[],"mappings":";;;AAMA,qCAOiB;AAGjB,0CAAgF;AAMhF,wCAA2C;AAI3C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,kBAMX,SAAQ,uBAAoB;aACrB,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,oBAAoB;KACjC,AAHc,CAGb;IAuBF,MAAM,CAAC,eAAe,CACpB,KAAwB,EACxB,SAAiD,EACjD,WAAyB,EACzB,OAA+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B,CAAC;IAED,uDAAuD;IACvD,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;;AA/aH,gDAgbC;AAkBD,SAAS,OAAO,CAAC,CAAM;IACrB,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__value.d.ts b/grafast/grafast/dist/steps/__value.d.ts new file mode 100644 index 0000000000..e09871e334 --- /dev/null +++ b/grafast/grafast/dist/steps/__value.d.ts @@ -0,0 +1,22 @@ +import type { GrafastResultsList } from "../index.js"; +import { $$noExec, Step } from "../step.js"; +import type { AccessStep } from "./access.js"; +/** + * Implements `__ValueStep(operationPlan)` which is never executed; it's purely + * internal - we populate the value as part of the algorithm - see + * `GetValueStepId` and `PopulateValueStep`. + */ +export declare class __ValueStep extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + [$$noExec]: boolean; + constructor(isImmutable: boolean); + toStringMeta(): string | null; + execute(): GrafastResultsList; + get(attrName: TAttr): AccessStep; + at(index: TIndex): AccessStep; +} +//# sourceMappingURL=__value.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__value.d.ts.map b/grafast/grafast/dist/steps/__value.d.ts.map new file mode 100644 index 0000000000..67686a29c1 --- /dev/null +++ b/grafast/grafast/dist/steps/__value.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"__value.d.ts","sourceRoot":"","sources":["../../src/steps/__value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;GAIG;AACH,qBAAa,WAAW,CAAC,KAAK,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC;IACjD,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,CAAC,QAAQ,CAAC,UAAQ;gBAEN,WAAW,EAAE,OAAO;IAKhC,YAAY,IAAI,MAAM,GAAG,IAAI;IAa7B,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC;IAOpC,GAAG,CAAC,KAAK,SAAS,MAAM,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAMzE,EAAE,CAAC,MAAM,SAAS,MAAM,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAGzE"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__value.js b/grafast/grafast/dist/steps/__value.js new file mode 100644 index 0000000000..38f3ebc081 --- /dev/null +++ b/grafast/grafast/dist/steps/__value.js @@ -0,0 +1,48 @@ +"use strict"; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__ValueStep = void 0; +const step_js_1 = require("../step.js"); +const access_js_1 = require("./access.js"); +/** + * Implements `__ValueStep(operationPlan)` which is never executed; it's purely + * internal - we populate the value as part of the algorithm - see + * `GetValueStepId` and `PopulateValueStep`. + */ +class __ValueStep extends step_js_1.Step { + static { _a = step_js_1.$$noExec; } + static { this.$$export = { + moduleName: "grafast", + exportName: "__ValueStep", + }; } + constructor(isImmutable) { + super(); + this.isSyncAndSafe = true; + this[_a] = true; + this._isImmutable = isImmutable; + } + toStringMeta() { + switch (this) { + case this.operationPlan.rootValueStep: + return "rootValue"; + case this.operationPlan.variableValuesStep: + return "variableValues"; + case this.operationPlan.contextStep: + return "context"; + default: + return null; + } + } + execute() { + // This is still an "executable plan"; we just side-step execution internally. + throw new Error(`GrafastInternalError<7696a514-f452-4d47-92d3-85aeb5b23f48>: ${this} is a __ValueStep and thus must never execute`); + } + get(attrName) { + return this.cacheStep("get", attrName, () => (0, access_js_1.access)(this, [attrName])); + } + at(index) { + return this.cacheStep("at", index, () => (0, access_js_1.access)(this, [index])); + } +} +exports.__ValueStep = __ValueStep; +//# sourceMappingURL=__value.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/__value.js.map b/grafast/grafast/dist/steps/__value.js.map new file mode 100644 index 0000000000..745e135153 --- /dev/null +++ b/grafast/grafast/dist/steps/__value.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__value.js","sourceRoot":"","sources":["../../src/steps/__value.ts"],"names":[],"mappings":";;;;AACA,wCAA4C;AAE5C,2CAAqC;AAErC;;;;GAIG;AACH,MAAa,WAAmB,SAAQ,cAAW;kBAMhD,kBAAQ;aALF,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,aAAa;KAC1B,AAHc,CAGb;IAIF,YAAY,WAAoB;QAC9B,KAAK,EAAE,CAAC;QAJV,kBAAa,GAAG,IAAI,CAAC;QACrB,QAAU,GAAG,IAAI,CAAC;QAIhB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED,YAAY;QACV,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,IAAI,CAAC,aAAa,CAAC,aAAa;gBACnC,OAAO,WAAW,CAAC;YACrB,KAAK,IAAI,CAAC,aAAa,CAAC,kBAA0C;gBAChE,OAAO,gBAAgB,CAAC;YAC1B,KAAK,IAAI,CAAC,aAAa,CAAC,WAAmC;gBACzD,OAAO,SAAS,CAAC;YACnB;gBACE,OAAO,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;IAED,OAAO;QACL,8EAA8E;QAC9E,MAAM,IAAI,KAAK,CACb,+DAA+D,IAAI,+CAA+C,CACnH,CAAC;IACJ,CAAC;IAED,GAAG,CAA4B,QAAe;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAC1C,IAAA,kBAAM,EAAC,IAAI,EAAE,CAAC,QAAkB,CAAC,CAAC,CACnC,CAAC;IACJ,CAAC;IAED,EAAE,CAA6B,KAAa;QAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,IAAA,kBAAM,EAAC,IAAI,EAAE,CAAC,KAAe,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;;AAzCH,kCA0CC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/access.d.ts b/grafast/grafast/dist/steps/access.d.ts new file mode 100644 index 0000000000..c1e5986042 --- /dev/null +++ b/grafast/grafast/dist/steps/access.d.ts @@ -0,0 +1,43 @@ +import type { UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Accesses a (potentially nested) property from the result of a plan. + * + * NOTE: this could lead to unexpected results (which could introduce security + * issues) if it is not used carefully; only use it on JSON-like data, + * preferably where the objects have null prototypes, and be sure to adhere to + * the naming conventions detailed in assertSafeToAccessViaBraces. + */ +export declare class AccessStep extends UnbatchedStep { + readonly fallback?: any | undefined; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + readonly path: (string | number | symbol)[]; + private readonly hasSymbols; + constructor(parentPlan: Step, path: (string | number | symbol)[], fallback?: any | undefined); + toStringMeta(): string; + getParentStep(): Step | import("./__flag.js").__FlagStep>; + /** + * Get the named property of an object. + */ + get(attrName: TAttr): AccessStep; + /** + * Get the entry at the given index in an array. + */ + at(index: TIndex): AccessStep; + optimize(): AccessStep; + finalize(): void; + unbatchedExecute(_extra: UnbatchedExecutionExtra, ..._values: any[]): any; + deduplicate(peers: AccessStep[]): AccessStep[]; +} +/** + * Access the property at path `path` in the value returned from `parentPlan`, + * falling back to `fallback` if it were null-ish. + */ +export declare function access(parentPlan: Step, rawPath?: (string | number | symbol)[] | string | number | symbol, fallback?: any): AccessStep; +//# sourceMappingURL=access.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/access.d.ts.map b/grafast/grafast/dist/steps/access.d.ts.map new file mode 100644 index 0000000000..b16816180d --- /dev/null +++ b/grafast/grafast/dist/steps/access.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/steps/access.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAkB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAwH3C;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;aAcvC,QAAQ,CAAC,EAAE,GAAG;IAbhC,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IAErB,0BAA0B,UAAQ;IAClC,SAAgB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACnD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;gBAGnC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,EACzB,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,EAClB,QAAQ,CAAC,EAAE,GAAG,YAAA;IAahC,YAAY,IAAI,MAAM;IAMtB,aAAa;IAIb;;OAEG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAOzE;;OAEG;IACH,EAAE,CAAC,MAAM,SAAS,MAAM,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAQxE,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC;IAY7B,QAAQ;IASR,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG;IAMzE,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;CAoB/D;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAC1B,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,EACzB,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EACjE,QAAQ,CAAC,EAAE,GAAG,GACb,UAAU,CAAC,KAAK,CAAC,CA8BnB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/access.js b/grafast/grafast/dist/steps/access.js new file mode 100644 index 0000000000..b73984d506 --- /dev/null +++ b/grafast/grafast/dist/steps/access.js @@ -0,0 +1,216 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccessStep = exports.expressionSymbol = void 0; +exports.access = access; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const tamedevil_1 = tslib_1.__importDefault(require("tamedevil")); +const inspect_js_1 = require("../inspect.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +/** @internal */ +exports.expressionSymbol = Symbol("expression"); +const makeDestructureCache = Object.create(null); +const makingDestructureCache = Object.create(null); +/** + * Returns a function that will extract the value at the given path from an + * incoming object. If possible it will return a dynamically constructed + * function which will enable V8 to optimise the function over time via the + * JIT. + */ +function constructDestructureFunction(path, fallback, callback) { + const n = path.length; + /** 0 - slow mode; 1 - middle mode; 2 - turbo mode */ + let mode = n > 50 || n < 1 ? 0 : n > 5 ? 1 : 2; + for (let i = 0; i < n; i++) { + const pathItem = path[i]; + const t = typeof pathItem; + if (t === "symbol") { + // Cannot use in superfast mode (because cannot create signature) + if (mode === 2) + mode = 1; + } + else if (t === "string") { + // Cannot use in superfast mode (because signature becomes ambiguous) + if (mode === 2 && pathItem.includes("|")) + mode = 1; + } + else if (t === "number") { + if (!Number.isFinite(pathItem)) { + mode = 0; + } + } + else if (pathItem == null) { + // Slow mode required + mode = 0; + } + else { + throw new Error(`Invalid path item: ${(0, inspect_js_1.inspect)(pathItem)} in path '${JSON.stringify(path)}'`); + } + } + if (mode === 0) { + // Slow mode + callback(function slowlyExtractValueAtPath(_meta, value) { + let current = value; + for (let i = 0, l = path.length; i < l && current != null; i++) { + const pathItem = path[i]; + current = current[pathItem]; + } + return current ?? fallback; + }); + } + else { + const signature = (fallback !== undefined ? "f" : "n") + n; + const done = mode === 2 + ? (factory) => { + const fn = factory(fallback, ...path); + // ?.blah?.bog?.["!!!"]?.[0] + const expressionDetail = [path, fallback]; + fn[exports.expressionSymbol] = expressionDetail; + callback(fn); + } + : (factory) => callback(factory(fallback, ...path)); + const fn = makeDestructureCache[signature]; + if (fn !== undefined) { + done(fn); + return; + } + const making = makingDestructureCache[signature]; + if (making !== undefined) { + making.push(done); + return; + } + const doneHandlers = [done]; + makingDestructureCache[signature] = doneHandlers; + // DO NOT REFERENCE 'path' BELOW HERE! + const names = []; + const access = []; + for (let i = 0; i < n; i++) { + const te_name = tamedevil_1.default.identifier(`p${i}`); + names.push(te_name); + access.push((0, tamedevil_1.default) `[${te_name}]`); + } + tamedevil_1.default.runInBatch((0, tamedevil_1.default) `function (fallback, ${tamedevil_1.default.join(names, ", ")}) { +return (_meta, value) => value?.${tamedevil_1.default.join(access, "?.")}${fallback === undefined ? tamedevil_1.default.blank : tamedevil_1.default.cache ` ?? fallback`}; +}`, (factory) => { + makeDestructureCache[signature] = factory; + delete makingDestructureCache[signature]; + for (const doneHandler of doneHandlers) { + doneHandler(factory); + } + }); + } +} +/** + * Accesses a (potentially nested) property from the result of a plan. + * + * NOTE: this could lead to unexpected results (which could introduce security + * issues) if it is not used carefully; only use it on JSON-like data, + * preferably where the objects have null prototypes, and be sure to adhere to + * the naming conventions detailed in assertSafeToAccessViaBraces. + */ +class AccessStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "AccessStep", + }; } + constructor(parentPlan, path, fallback) { + super(); + this.fallback = fallback; + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this._isImmutable = parentPlan._isImmutable; + this.path = path; + this.hasSymbols = this.path.some((k) => typeof k === "symbol"); + this.peerKey = + (this.fallback === "undefined" ? "U" : "D") + + (this.hasSymbols ? "§" : ".") + + (0, utils_js_1.digestKeys)(this.path); + this.addDependency(parentPlan); + } + toStringMeta() { + return `${chalk_1.default.bold.yellow(String(this.getDepOptions(0).step.id))}.${this.path.map((p) => String(p)).join(".")}`; + } + getParentStep() { + return this.getDep(0); + } + /** + * Get the named property of an object. + */ + get(attrName) { + if (typeof attrName !== "string") { + throw new Error(`AccessStep::get can only be called with string values`); + } + return access(this.getDep(0), [...this.path, attrName]); + } + /** + * Get the entry at the given index in an array. + */ + at(index) { + if (typeof index !== "number") { + throw new Error(`AccessStep::get can only be called with string values`); + } + return access(this.getDep(0), [...this.path, index]); + } + // An access of an access can become a single access + optimize() { + const $dep = this.getDep(0); + if ($dep instanceof AccessStep && $dep.fallback === undefined) { + return access($dep.getDep(0), [...$dep.path, ...this.path], this.fallback); + } + return this; + } + finalize() { + // Note that `OutputPlan.optimize` depends on this. + constructDestructureFunction(this.path, this.fallback, (fn) => { + this.unbatchedExecute = fn; + }); + super.finalize(); + } + unbatchedExecute(_extra, ..._values) { + throw new Error(`${this}: should have had unbatchedExecute method replaced`); + } + deduplicate(peers) { + if (peers.length === 0) { + return peers; + } + else if (!this.hasSymbols && this.fallback === undefined) { + // Rely entirely on peerKey + return peers; + } + else if (!this.hasSymbols) { + // Rely on peerKey for path, but check fallback + const { fallback } = this; + return peers.filter((p) => p.fallback === fallback); + } + else { + // Check both fallback and path + const { fallback, path } = this; + return peers.filter((p) => p.fallback === fallback && (0, utils_js_1.arraysMatch)(p.path, path)); + } + } +} +exports.AccessStep = AccessStep; +/** + * Access the property at path `path` in the value returned from `parentPlan`, + * falling back to `fallback` if it were null-ish. + */ +function access(parentPlan, rawPath, fallback) { + const path = Array.isArray(rawPath) + ? rawPath + : rawPath != null + ? [rawPath] + : []; + if (typeof fallback === "undefined" && + !path.some((k) => typeof k === "symbol")) { + const pathKey = (0, utils_js_1.digestKeys)(path); + if (parentPlan._isImmutable) { + return parentPlan.operationPlan.withRootLayerPlan(() => parentPlan.operationPlan.cacheStep(parentPlan, "GrafastInternal:access()", pathKey, () => new AccessStep(parentPlan, path))); + } + else { + return parentPlan.operationPlan.cacheStep(parentPlan, "GrafastInternal:access()", pathKey, () => new AccessStep(parentPlan, path)); + } + } + return new AccessStep(parentPlan, path, fallback); +} +//# sourceMappingURL=access.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/access.js.map b/grafast/grafast/dist/steps/access.js.map new file mode 100644 index 0000000000..8171b96223 --- /dev/null +++ b/grafast/grafast/dist/steps/access.js.map @@ -0,0 +1 @@ +{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/steps/access.ts"],"names":[],"mappings":";;;AAsPA,wBAkCC;;AAxRD,0DAA0B;AAE1B,kEAA2B;AAE3B,8CAAwC;AAGxC,wCAA2C;AAC3C,0CAAsD;AAEtD,gBAAgB;AACH,QAAA,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAOrD,MAAM,oBAAoB,GACxB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACtB,MAAM,sBAAsB,GAExB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAExB;;;;;GAKG;AACH,SAAS,4BAA4B,CACnC,IAAkC,EAClC,QAAa,EACb,QAAmE;IAEnE,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IACtB,qDAAqD;IACrD,IAAI,IAAI,GAAc,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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1B,OAAO,EACP,GAAG,EAAE,CAAC,IAAI,UAAU,CAAQ,UAAU,EAAE,IAAI,CAAC,CAC9C,CACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,UAAU,CAAC,aAAa,CAAC,SAAS,CACvC,UAAU,EACV,0BAA0B,EAC1B,OAAO,EACP,GAAG,EAAE,CAAC,IAAI,UAAU,CAAQ,UAAU,EAAE,IAAI,CAAC,CAC9C,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,UAAU,CAAQ,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3D,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyInput.d.ts b/grafast/grafast/dist/steps/applyInput.d.ts new file mode 100644 index 0000000000..e970e24990 --- /dev/null +++ b/grafast/grafast/dist/steps/applyInput.d.ts @@ -0,0 +1,44 @@ +import type { GraphQLInputType, GraphQLSchema } from "graphql"; +import type { AnyInputStep, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +import { ConstantStep } from "./index.js"; +export declare class ApplyInputStep extends UnbatchedStep<(arg: TParent) => void> { + private inputType; + private getTargetFromParent; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + valueDepId: 0; + constructor(inputType: GraphQLInputType, $value: AnyInputStep, getTargetFromParent: ((parent: TParent, inputValue: any) => TTarget | undefined | (() => TTarget)) | undefined); + deduplicate(peers: readonly ApplyInputStep[]): ApplyInputStep[]; + optimize(): this | ConstantStep<(parent: TParent) => void>; + unbatchedExecute(extra: UnbatchedExecutionExtra, value: any): (parentThing: TParent) => void; +} +export declare function inputArgsApply(schema: GraphQLSchema, inputType: GraphQLInputType, parent: TArg, inputValue: unknown, getTargetFromParent: ((parent: TArg, inputValue: any) => TTarget | undefined | (() => TTarget)) | undefined): void; +export declare function applyInput(inputType: GraphQLInputType, $value: AnyInputStep, getTargetFromParent?: (parent: TParent, inputValue: any) => TTarget | undefined): ConstantStep<(parent: TParent) => void> | ApplyInputStep; +/** + * Modifiers modify their parent (which may be another modifier or anything + * else). First they gather all the requirements from their children (if any) + * being applied to them, then they apply themselves to their parent. This + * application is done through the `apply()` method. + */ +export declare abstract class Modifier { + protected readonly parent: TParent; + static $$export: any; + constructor(parent: TParent); + /** + * In this method, you should apply the changes to your `this.parent` plan + */ + abstract apply(): void; +} +export declare function isModifier(plan: any): plan is Modifier; +export declare function assertModifier(plan: any, pathDescription: string): asserts plan is Modifier; +export type ApplyableExecutableStep = Step & { + apply($apply: Step<(arg: TArg) => void>): void; +}; +export declare function isApplyableStep(s: Step): s is ApplyableExecutableStep; +//# sourceMappingURL=applyInput.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyInput.d.ts.map b/grafast/grafast/dist/steps/applyInput.d.ts.map new file mode 100644 index 0000000000..c2fedceef7 --- /dev/null +++ b/grafast/grafast/dist/steps/applyInput.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"applyInput.d.ts","sourceRoot":"","sources":["../../src/steps/applyInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS/D,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAY,YAAY,EAAiB,MAAM,YAAY,CAAC;AAMnE,qBAAa,cAAc,CACzB,OAAO,SAAS,MAAM,GAAG,GAAG,EAC5B,OAAO,SAAS,MAAM,GAAG,OAAO,CAChC,SAAQ,aAAa,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAU3C,OAAO,CAAC,SAAS;IAEjB,OAAO,CAAC,mBAAmB;IAX7B,MAA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AAM,EAAE,OAAO;IAS9C;;OAEG;IACH,QAAQ,CAAC,KAAK,IAAI,IAAI;CACvB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,CAExE;AAED,wBAAgB,cAAc,CAAC,OAAO,EACpC,IAAI,EAAE,GAAG,EACT,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,CAMnC;AAED,MAAM,MAAM,uBAAuB,CACjC,IAAI,SAAS,MAAM,GAAG,GAAG,EACzB,KAAK,GAAG,GAAG,IACT,IAAI,CAAC,KAAK,CAAC,GAAG;IAChB,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;CAChD,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,SAAS,MAAM,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,EACpE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GACb,CAAC,IAAI,uBAAuB,CAAC,IAAI,EAAE,KAAK,CAAC,CAE3C"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyInput.js b/grafast/grafast/dist/steps/applyInput.js new file mode 100644 index 0000000000..7569ca625e --- /dev/null +++ b/grafast/grafast/dist/steps/applyInput.js @@ -0,0 +1,206 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Modifier = exports.ApplyInputStep = void 0; +exports.inputArgsApply = inputArgsApply; +exports.applyInput = applyInput; +exports.isModifier = isModifier; +exports.assertModifier = assertModifier; +exports.isApplyableStep = isApplyableStep; +const graphql_1 = require("graphql"); +const step_js_1 = require("../step.js"); +const index_js_1 = require("./index.js"); +let currentModifiers = []; +let applyingModifiers = false; +let inputArgsApplyDepth = 0; +class ApplyInputStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ApplyInputStep", + }; } + constructor(inputType, $value, getTargetFromParent) { + super(); + this.inputType = inputType; + this.getTargetFromParent = getTargetFromParent; + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.valueDepId = this.addUnaryDependency($value); + if (!this._isUnary) { + throw new Error(`applyInput() must be unary`); + } + this._isUnaryLocked = true; + } + deduplicate(peers) { + return peers.filter((p) => p.inputType === this.inputType && + p.getTargetFromParent === this.getTargetFromParent); + } + optimize() { + const $value = this.getDep(this.valueDepId); + if ($value instanceof index_js_1.ConstantStep) { + // Replace myself with a constant! + const { operationPlan: { schema }, inputType, getTargetFromParent, } = this; + const { data } = $value; + return (0, index_js_1.constant)(function applyInputConstant(parent) { + inputArgsApply(schema, inputType, parent, data, getTargetFromParent); + }, false); + } + return this; + } + unbatchedExecute(extra, value) { + const { getTargetFromParent } = this; + return (parentThing) => inputArgsApply(this.operationPlan.schema, this.inputType, parentThing, value, getTargetFromParent); + } +} +exports.ApplyInputStep = ApplyInputStep; +function inputArgsApply(schema, inputType, parent, inputValue, getTargetFromParent) { + try { + inputArgsApplyDepth++; + const target = getTargetFromParent + ? getTargetFromParent(parent, inputValue) + : parent; + if (target != null) { + _inputArgsApply(schema, inputType, target, inputValue); + } + } + finally { + inputArgsApplyDepth--; + } + let l; + if (inputArgsApplyDepth === 0 && (l = currentModifiers.length) > 0) { + applyingModifiers = true; + try { + for (let i = l - 1; i >= 0; i--) { + currentModifiers[i].apply(); + } + } + finally { + applyingModifiers = false; + currentModifiers = []; + } + } +} +function applyInput(inputType, $value, getTargetFromParent) { + const opPlan = (0, index_js_1.operationPlan)(); + const { schema } = opPlan; + return opPlan.withRootLayerPlan(() => { + if ($value instanceof index_js_1.ConstantStep) { + // Replace us with a constant + const { data } = $value; + return (0, index_js_1.constant)(function applyInputConstant(parent) { + inputArgsApply(schema, inputType, parent, data, getTargetFromParent); + }, false); + } + else { + return new ApplyInputStep(inputType, $value, getTargetFromParent); + } + }); +} +/* +const defaultInputObjectTypeInputPlanResolver: InputObjectTypeInputPlanResolver = + (input, info) => { + const fields = info.type.getFields(); + const obj: { [key: string]: ExecutableStep } = Object.create(null); + for (const fieldName in fields) { + obj[fieldName] = input.get(fieldName); + } + return object(obj); + }; +*/ +function _inputArgsApply(schema, inputType, target, inputValue) { + // PERF: we should have the plan generate a digest of `inputType` so that we + // can jump right to the relevant parts without too much traversal cost. + if (inputValue === undefined) { + return; + } + if ((0, graphql_1.isNonNullType)(inputType)) { + if (inputValue === null) { + throw new Error(`null value found in non-null position`); + } + _inputArgsApply(schema, inputType.ofType, target, inputValue); + } + else if ((0, graphql_1.isListType)(inputType)) { + if (inputValue == null) + return; + if (!Array.isArray(inputValue)) { + throw new Error(`Expected list in list position`); + } + for (const item of inputValue) { + const itemTarget = typeof target === "function" ? target() : target; + _inputArgsApply(schema, inputType.ofType, itemTarget, item); + } + } + else if (typeof target === "function") { + throw new Error("Functions may only be used as the target for list types (the function is called once per list item)"); + } + else if ((0, graphql_1.isInputObjectType)(inputType)) { + if (inputValue === null) { + return; + } + const fields = inputType.getFields(); + for (const [fieldName, field] of Object.entries(fields)) { + const val = inputValue[fieldName]; + if (val === undefined) + continue; + if (field.extensions.grafast?.apply) { + const newTarget = field.extensions.grafast.apply(target, val, { + schema, + field, + fieldName, + }); + if (newTarget != null) { + _inputArgsApply(schema, field.type, newTarget, val); + } + } + } + } + else if ((0, graphql_1.isScalarType)(inputType)) { + // if (inputType.extensions.grafast?.apply) { + // } + } + else if ((0, graphql_1.isEnumType)(inputType)) { + if (inputValue === null) { + return; + } + const values = inputType.getValues(); + const value = values.find((v) => v.value === inputValue); + if (value) { + if (value.extensions.grafast?.apply) { + value.extensions.grafast.apply(target); + } + } + else { + throw new Error(`Couldn't find value in ${inputType} for ${inputValue}`); + } + } + else { + const never = inputType; + throw new Error(`Input type expected, but found ${never}`); + } +} +/** + * Modifiers modify their parent (which may be another modifier or anything + * else). First they gather all the requirements from their children (if any) + * being applied to them, then they apply themselves to their parent. This + * application is done through the `apply()` method. + */ +class Modifier { + constructor(parent) { + this.parent = parent; + if (applyingModifiers) { + throw new Error(`Must not create new modifier whilst modifiers are being applied!`); + } + currentModifiers.push(this); + } +} +exports.Modifier = Modifier; +function isModifier(plan) { + return plan instanceof Modifier; +} +function assertModifier(plan, pathDescription) { + if (!isModifier(plan)) { + throw new Error(`The plan returned from '${pathDescription}' should be a modifier plan, but it does not implement the 'apply' method.`); + } +} +function isApplyableStep(s) { + return typeof s.apply === "function"; +} +//# sourceMappingURL=applyInput.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyInput.js.map b/grafast/grafast/dist/steps/applyInput.js.map new file mode 100644 index 0000000000..d953ff43e8 --- /dev/null +++ b/grafast/grafast/dist/steps/applyInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"applyInput.js","sourceRoot":"","sources":["../../src/steps/applyInput.ts"],"names":[],"mappings":";;;AAsFA,wCAmCC;AAED,gCA4BC;AA6GD,gCAEC;AAED,wCASC;AASD,0CAIC;AA7RD,qCAMiB;AAIjB,wCAA2C;AAC3C,yCAAmE;AAEnE,IAAI,gBAAgB,GAAoB,EAAE,CAAC;AAC3C,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAC9B,IAAI,mBAAmB,GAAG,CAAC,CAAC;AAE5B,MAAa,cAGX,SAAQ,uBAAqC;aACtC,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,gBAAgB;KAC7B,AAHc,CAGb;IAKF,YACU,SAA2B,EACnC,MAAoB,EACZ,mBAKK;QAEb,KAAK,EAAE,CAAC;QATA,cAAS,GAAT,SAAS,CAAkB;QAE3B,wBAAmB,GAAnB,mBAAmB,CAKd;QAZR,kBAAa,GAAG,IAAI,CAAC;QACrB,+BAA0B,GAAG,IAAI,CAAC;QAcvC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAM,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CA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I,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;gBACpC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,0BAA0B,SAAS,QAAQ,UAAU,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAU,SAAS,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,kCAAkC,KAAK,EAAE,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAsB,QAAQ;IAI5B,YAA+B,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;QAC5C,IAAI,iBAAiB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;QACJ,CAAC;QACD,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CAMF;AAjBD,4BAiBC;AAED,SAAgB,UAAU,CAAU,IAAS;IAC3C,OAAO,IAAI,YAAY,QAAQ,CAAC;AAClC,CAAC;AAED,SAAgB,cAAc,CAC5B,IAAS,EACT,eAAuB;IAEvB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,2BAA2B,eAAe,4EAA4E,CACvH,CAAC;IACJ,CAAC;AACH,CAAC;AASD,SAAgB,eAAe,CAC7B,CAAc;IAEd,OAAO,OAAQ,CAAS,CAAC,KAAK,KAAK,UAAU,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyTransforms.d.ts b/grafast/grafast/dist/steps/applyTransforms.d.ts new file mode 100644 index 0000000000..fb52cad440 --- /dev/null +++ b/grafast/grafast/dist/steps/applyTransforms.d.ts @@ -0,0 +1,9 @@ +import { Step } from "../step.js"; +/** + * If you want to use a step that might represent a list and you need all of + * the `listItem` transforms to have already taken place (e.g. you're going to + * send the result to an external service) rather than processing them through + * the GraphQL response, then you may need to call `applyTransforms` on it. + */ +export declare function applyTransforms($step: Step): Step; +//# sourceMappingURL=applyTransforms.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyTransforms.d.ts.map b/grafast/grafast/dist/steps/applyTransforms.d.ts.map new file mode 100644 index 0000000000..cd8f4b4aac --- /dev/null +++ b/grafast/grafast/dist/steps/applyTransforms.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"applyTransforms.d.ts","sourceRoot":"","sources":["../../src/steps/applyTransforms.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAqB,IAAI,EAAE,MAAM,YAAY,CAAC;AAuMrD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,aAY1C"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyTransforms.js b/grafast/grafast/dist/steps/applyTransforms.js new file mode 100644 index 0000000000..0aee75c57c --- /dev/null +++ b/grafast/grafast/dist/steps/applyTransforms.js @@ -0,0 +1,173 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ApplyTransformsStep = void 0; +exports.applyTransforms = applyTransforms; +const tslib_1 = require("tslib"); +const assert = tslib_1.__importStar(require("../assert.js")); +const dev_js_1 = require("../dev.js"); +const executeBucket_js_1 = require("../engine/executeBucket.js"); +const LayerPlan_js_1 = require("../engine/LayerPlan.js"); +const withGlobalLayerPlan_js_1 = require("../engine/lib/withGlobalLayerPlan.js"); +const error_js_1 = require("../error.js"); +const interfaces_js_1 = require("../interfaces.js"); +const step_js_1 = require("../step.js"); +const __item_js_1 = require("./__item.js"); +const connection_js_1 = require("./connection.js"); +/** + * @internal + */ +class ApplyTransformsStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "ApplyTransformsStep", + }; } + constructor($step) { + super(); + // OPTIMIZE: if all the steps in the inner bucket are synchronous then theoretically we can be synchronous too + this.isSyncAndSafe = false; + const listPlan = (0, connection_js_1.itemsOrStep)($step); + this.addDependency(listPlan); + // Plan this subroutine + this.subroutineLayer = new LayerPlan_js_1.LayerPlan(this.operationPlan, this.layerPlan, { + type: "subroutine", + parentStep: this, + }); + const itemPlan = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.subroutineLayer, listPlan.polymorphicPaths, () => { + // This does NOT use `itemPlanFor` because __ListTransformPlans are special. + const $__listItem = new __item_js_1.__ItemStep(listPlan); + $__listItem.transformStepId = this.id; + this.itemStepId = $__listItem.id; + const $listItem = (0, step_js_1.isListCapableStep)(listPlan) + ? listPlan.listItem($__listItem) + : $__listItem; + const $newListItem = applyTransforms($listItem); + if (this.isSyncAndSafe && + (!$__listItem.isSyncAndSafe || + !$listItem.isSyncAndSafe || + !$newListItem.isSyncAndSafe)) { + this.isSyncAndSafe = false; + } + return $newListItem; + }); + this.subroutineLayer.setRootStep(itemPlan); + this.operationPlan.finishSubroutine(this, this.subroutineLayer); + } + async execute({ indexMap, values: [values0], extra, }) { + const bucket = extra._bucket; + const childLayerPlan = this.subroutineLayer; + const { copyStepIds, rootStep } = childLayerPlan; + const store = new Map(); + const polymorphicPathList = []; + const iterators = []; + const map = new Map(); + let size = 0; + // ENHANCE: do this better! + const itemStep = this.operationPlan.dangerouslyGetStep(this.itemStepId); + const itemStepId = itemStep.id; + if (itemStepId == null) { + throw new Error("GrafastInternalError: listItem layer plan has no rootStepId"); + } + if (itemStep._isUnary) { + store.set(itemStepId, (0, executeBucket_js_1.unaryExecutionValue)(values0.unaryValue())); + } + else { + store.set(itemStepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + for (const stepId of copyStepIds) { + const ev = bucket.store.get(stepId); + if (!ev) { + throw new Error(`GrafastInternalError<68675bbd-bc15-4c4a-902a-61c0de616325>: unary step '${stepId}' (${this.operationPlan.dangerouslyGetStep(stepId)}) listed in copyStepIds but not available in parent bucket for ${this}`); + } + if (ev.isBatch) { + // Prepare store with an empty list for each copyBatchPlanId + store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + else { + store.set(stepId, ev); + } + } + // We'll typically be creating more listItem bucket entries than we + // have parent buckets, so we must "multiply up" the store entries. + indexMap((originalIndex) => { + const list = values0.at(originalIndex); + if (Array.isArray(list)) { + const newIndexes = []; + map.set(originalIndex, newIndexes); + for (let j = 0, l = list.length; j < l; j++) { + const newIndex = size++; + newIndexes.push(newIndex); + polymorphicPathList[newIndex] = + bucket.polymorphicPathList[originalIndex]; + // Copying across the iterators because we do NOT call outputBucket, + // so we need to ensure any streams are cleaned up. + iterators[newIndex] = bucket.iterators[originalIndex]; + const ev = store.get(itemStepId); + if (ev.isBatch) { + // TODO: check for error? + ev._setResult(newIndex, list[j], 0); + } + for (const copyStepId of copyStepIds) { + const ev = store.get(copyStepId); + if (ev.isBatch) { + const orig = bucket.store.get(copyStepId); + ev._setResult(newIndex, orig.at(originalIndex), orig._flagsAt(originalIndex)); + } + } + } + } + }); + if (size > 0) { + const childBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan: childLayerPlan, + size, + store, + flagUnion: bucket.flagUnion, + polymorphicPathList, + iterators, + }, bucket.metaByMetaKey); + await (0, executeBucket_js_1.executeBucket)(childBucket, extra._requestContext); + } + const depResults = store.get(rootStep.id); + return indexMap((originalIndex) => { + const list = values0.at(originalIndex); + if (list == null) { + return list; + } + const indexes = map.get(originalIndex); + if (!Array.isArray(list) || !Array.isArray(indexes)) { + // Not a list value; just pass it straight through + return list; + } + const values = indexes.map((idx) => { + const val = depResults.at(idx); + if (depResults._flagsAt(idx) & interfaces_js_1.FLAG_ERROR) { + return (0, error_js_1.flagError)(val); + } + return val; + }); + if (dev_js_1.isDev) { + assert.strictEqual(list.length, values.length, "GrafastInternalError<43cb302e-673b-4881-8c4c-f2d00fe5a3d7>: The list and values length must match for a ApplyTransformsStep"); + } + return values; + }); + } +} +exports.ApplyTransformsStep = ApplyTransformsStep; +// TODO: document this better. (Had to do it for `each($items, $item => +// object({...}))` JSON transform in pg-many-to-many +/** + * If you want to use a step that might represent a list and you need all of + * the `listItem` transforms to have already taken place (e.g. you're going to + * send the result to an external service) rather than processing them through + * the GraphQL response, then you may need to call `applyTransforms` on it. + */ +function applyTransforms($step) { + if ((0, step_js_1.isListCapableStep)($step)) { + return $step.operationPlan.cacheStep($step, "GrafastInternal:applyTransforms()", "", () => new ApplyTransformsStep($step)); + } + else { + // No eval necessary + return $step; + } +} +//# sourceMappingURL=applyTransforms.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/applyTransforms.js.map b/grafast/grafast/dist/steps/applyTransforms.js.map new file mode 100644 index 0000000000..430f774d86 --- /dev/null +++ b/grafast/grafast/dist/steps/applyTransforms.js.map @@ -0,0 +1 @@ +{"version":3,"file":"applyTransforms.js","sourceRoot":"","sources":["../../src/steps/applyTransforms.ts"],"names":[],"mappings":";;;AAgOA,0CAYC;;AA5OD,6DAAuC;AAEvC,sCAAkC;AAClC,iEAKoC;AAEpC,yDAAmD;AACnD,iFAA2E;AAC3E,0CAAwC;AACxC,oDAI0B;AAE1B,wCAAqD;AACrD,2CAAyC;AAEzC,mDAA8C;AAE9C;;GAEG;AACH,MAAa,mBAAoB,SAAQ,cAAI;aACpC,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,qBAAqB;KAClC,AAHc,CAGb;IAaF,YACE,KAAkE;QAElE,KAAK,EAAE,CAAC;QAdV,8GAA8G;QAC9G,kBAAa,GAAG,KAAK,CAAC;QAcpB,MAAM,QAAQ,GAAG,IAAA,2BAAW,EAAC,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAE7B,uBAAuB;QACvB,IAAI,CAAC,eAAe,GAAG,IAAI,wBAAS,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE;YACvE,IAAI,EAAE,YAAY;YAClB,UAAU,EAAE,IAAI;SACjB,CAAC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1C,OAAO,IAAA,oBAAS,EAAC,GAAG,CAAC,CAAC;gBACxB,CAAC;gBACD,OAAO,GAAG,CAAC;YACb,CAAC,CAAC,CAAC;YACH,IAAI,cAAK,EAAE,CAAC;gBACV,MAAM,CAAC,WAAW,CAChB,IAAI,CAAC,MAAM,EACX,MAAM,CAAC,MAAM,EACb,6HAA6H,CAC9H,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;;AAzLH,kDA0LC;AAED,uEAAuE;AACvE,oDAAoD;AAEpD;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,KAAW;IACzC,IAAI,IAAA,2BAAiB,EAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAClC,KAAK,EACL,mCAAmC,EACnC,EAAE,EACF,GAAG,EAAE,CAAC,IAAI,mBAAmB,CAAC,KAAK,CAAC,CACrC,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,oBAAoB;QACpB,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/bakedInput.d.ts b/grafast/grafast/dist/steps/bakedInput.d.ts new file mode 100644 index 0000000000..8bcbdfe2d2 --- /dev/null +++ b/grafast/grafast/dist/steps/bakedInput.d.ts @@ -0,0 +1,23 @@ +import type { GraphQLInputObjectType, GraphQLInputType, GraphQLList, GraphQLSchema } from "graphql"; +import type { UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +export declare class BakedInputStep extends UnbatchedStep { + private inputType; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + valueDepId: 0; + constructor(inputType: GraphQLInputObjectType | GraphQLList, $value: Step); + deduplicate(peers: readonly BakedInputStep[]): BakedInputStep[]; + unbatchedExecute(extra: UnbatchedExecutionExtra, value: unknown): TData; +} +/** + * Takes a input type and matching value and performs runtime conversion of + * that type to the internal representation (if any). + */ +export declare function bakedInput(inputType: GraphQLInputType, $value: Step): Step; +export declare function bakedInputRuntime(schema: GraphQLSchema, inputType: GraphQLInputType, value: unknown): unknown; +//# sourceMappingURL=bakedInput.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/bakedInput.d.ts.map b/grafast/grafast/dist/steps/bakedInput.d.ts.map new file mode 100644 index 0000000000..e8cf8adfce --- /dev/null +++ b/grafast/grafast/dist/steps/bakedInput.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bakedInput.d.ts","sourceRoot":"","sources":["../../src/steps/bakedInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACd,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,qBAAa,cAAc,CAAC,KAAK,GAAG,GAAG,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;IASjE,OAAO,CAAC,SAAS;IARnB,MAAM,CAAC,QAAQ;;;MAGb;IACK,aAAa,UAAQ;IAE5B,UAAU,EAAE,CAAC,CAAC;gBAEJ,SAAS,EAAE,sBAAsB,GAAG,WAAW,CAAC,GAAG,CAAC,EAC5D,MAAM,EAAE,IAAI;IAUP,WAAW,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE;IAInD,gBAAgB,CAAC,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,OAAO;CAQhE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,GAAG,GAAG,EACnC,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,IAAI,aAiBb;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,gBAAgB,EAC3B,KAAK,EAAE,OAAO,GACb,OAAO,CAqCT"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/bakedInput.js b/grafast/grafast/dist/steps/bakedInput.js new file mode 100644 index 0000000000..c06580164d --- /dev/null +++ b/grafast/grafast/dist/steps/bakedInput.js @@ -0,0 +1,90 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BakedInputStep = void 0; +exports.bakedInput = bakedInput; +exports.bakedInputRuntime = bakedInputRuntime; +const graphql_1 = require("graphql"); +const step_js_1 = require("../step.js"); +const applyInput_js_1 = require("./applyInput.js"); +const index_js_1 = require("./index.js"); +class BakedInputStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "BakedInputStep", + }; } + constructor(inputType, $value) { + super(); + this.inputType = inputType; + this.isSyncAndSafe = true; + this.valueDepId = this.addUnaryDependency($value); + if (!this._isUnary) { + throw new Error(`bakedInput() must be unary`); + } + this._isUnaryLocked = true; + } + deduplicate(peers) { + return peers.filter((p) => p.inputType === this.inputType); + } + unbatchedExecute(extra, value) { + if (value == null) + return value; + return bakedInputRuntime(this.operationPlan.schema, this.inputType, value); + } +} +exports.BakedInputStep = BakedInputStep; +/** + * Takes a input type and matching value and performs runtime conversion of + * that type to the internal representation (if any). + */ +function bakedInput(inputType, $value) { + const nullableInputType = (0, graphql_1.getNullableType)(inputType); + // Could have done this in `optimize()` but faster to do it here. + if ((0, graphql_1.isListType)(nullableInputType) || + ((0, graphql_1.isInputObjectType)(nullableInputType) && + typeof nullableInputType.extensions?.grafast?.baked === "function")) { + // Ooo, we're fancy! Do the thing! + return (0, index_js_1.operationPlan)().withRootLayerPlan(() => new BakedInputStep(nullableInputType, $value)); + } + else { + // Nothing special, we just return the input. + return $value; + } +} +function bakedInputRuntime(schema, inputType, value) { + if (value == null) + return value; + const nullableInputType = (0, graphql_1.getNullableType)(inputType); + if ((0, graphql_1.isListType)(nullableInputType)) { + if (Array.isArray(value)) { + return value.map((v) => bakedInputRuntime(schema, nullableInputType.ofType, v)); + } + else { + throw new Error(`Failed to process input for type ${inputType} - expected array`); + } + } + // Could have done this in `optimize()` but faster to do it here. + const baked = (0, graphql_1.isInputObjectType)(nullableInputType) + ? nullableInputType.extensions?.grafast?.baked + : null; + if (typeof baked !== "function") { + // Nothing special, we just return the input. + return value; + } + else { + // Ooo, we're fancy! Do the thing! + let applied = false; + const bakedObj = baked(value, { + type: nullableInputType, + schema, + applyChildren(parent) { + applied = true; + (0, applyInput_js_1.inputArgsApply)(schema, nullableInputType, parent, value, undefined); + }, + }); + if (!applied) { + (0, applyInput_js_1.inputArgsApply)(schema, nullableInputType, bakedObj, value, undefined); + } + return bakedObj; + } +} +//# sourceMappingURL=bakedInput.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/bakedInput.js.map b/grafast/grafast/dist/steps/bakedInput.js.map new file mode 100644 index 0000000000..9d84343d20 --- /dev/null +++ b/grafast/grafast/dist/steps/bakedInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bakedInput.js","sourceRoot":"","sources":["../../src/steps/bakedInput.ts"],"names":[],"mappings":";;;AAoDA,gCAmBC;AAED,8CAyCC;AA5GD,qCAAyE;AAIzE,wCAA2C;AAC3C,mDAAiD;AACjD,yCAA2C;AAE3C,MAAa,cAA4B,SAAQ,uBAAoB;aAC5D,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,gBAAgB;KAC7B,AAHc,CAGb;IAIF,YACU,SAAoD,EAC5D,MAAY;QAEZ,KAAK,EAAE,CAAC;QAHA,cAAS,GAAT,SAAS,CAA2C;QAJvD,kBAAa,GAAG,IAAI,CAAC;QAQ1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAM,CAAC;QACvD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CA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KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACrB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAAC,CAAC,CACvD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CACb,oCAAoC,SAAS,mBAAmB,CACjE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,iEAAiE;IACjE,MAAM,KAAK,GAAG,IAAA,2BAAiB,EAAC,iBAAiB,CAAC;QAChD,CAAC,CAAC,iBAAiB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK;QAC9C,CAAC,CAAC,IAAI,CAAC;IACT,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QAChC,6CAA6C;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;SAAM,CAAC;QACN,kCAAkC;QAClC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,QAAQ,GAAG,KAAM,CAAC,KAA4B,EAAE;YACpD,IAAI,EAAE,iBAA2C;YACjD,MAAM;YACN,aAAa,CAAC,MAAM;gBAClB,OAAO,GAAG,IAAI,CAAC;gBACf,IAAA,8BAAc,EAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YACtE,CAAC;SACF,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,IAAA,8BAAc,EAAC,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/condition.d.ts b/grafast/grafast/dist/steps/condition.d.ts new file mode 100644 index 0000000000..bb589a7046 --- /dev/null +++ b/grafast/grafast/dist/steps/condition.d.ts @@ -0,0 +1,31 @@ +import type { UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +declare const unaryOperators: readonly ["null", "not null", "exists", "not exists"]; +type UnaryOperator = (typeof unaryOperators)[number]; +declare const binaryOperators: readonly ["===", "!=="]; +type BinaryOperator = (typeof binaryOperators)[number]; +type Operator = UnaryOperator | BinaryOperator; +export declare class ConditionStep extends UnbatchedStep { + private op; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + constructor(op: Operator, step1: Step, step2?: Step); + toStringMeta(): string | null; + finalize(): void; + private makeUnbatchedExecute; + unbatchedExecute(_extra: UnbatchedExecutionExtra, _value1: any, _value2: any): boolean; +} +type $Boolean = Step; +declare function condition(op: "null", step: Step): $Boolean; +declare function condition(op: "not null", step: Step): $Boolean; +declare function condition(op: "exists", step: Step): $Boolean; +declare function condition(op: "not exists", step: Step): $Boolean; +declare function condition(op: "===", step1: Step, step2: Step): $Boolean; +declare function condition(op: "!==", step1: Step, step2: Step): $Boolean; +export { condition }; +//# sourceMappingURL=condition.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/condition.d.ts.map b/grafast/grafast/dist/steps/condition.d.ts.map new file mode 100644 index 0000000000..78101bc8d3 --- /dev/null +++ b/grafast/grafast/dist/steps/condition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../src/steps/condition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,QAAA,MAAM,cAAc,uDAAwD,CAAC;AAC7E,KAAK,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AACrD,QAAA,MAAM,eAAe,yBA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a/grafast/grafast/dist/steps/condition.js b/grafast/grafast/dist/steps/condition.js new file mode 100644 index 0000000000..b6ec3b7233 --- /dev/null +++ b/grafast/grafast/dist/steps/condition.js @@ -0,0 +1,94 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConditionStep = void 0; +exports.condition = condition; +const step_js_1 = require("../step.js"); +const unaryOperators = ["null", "not null", "exists", "not exists"]; +const binaryOperators = ["===", "!=="]; +class ConditionStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ConditionStep", + }; } + constructor(op, step1, step2) { + super(); + this.op = op; + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + if (!step2) { + // unary + if (!unaryOperators.includes(op)) { + throw new Error(`Unary operator '${op}' is not known; supported operators: ${unaryOperators.join(", ")}`); + } + this.addDependency(step1); + } + else { + // binary + if (!binaryOperators.includes(op)) { + throw new Error(`Unary operator '${op}' is not known; supported operators: ${binaryOperators.join(", ")}`); + } + this.addDependency(step1); + this.addDependency(step2); + } + } + toStringMeta() { + if (unaryOperators.includes(this.op)) { + return `${this.op}`; + } + else { + const $dep1 = this.getDepOptions(0).step; + const $dep2 = this.getDepOptions(1).step; + return `${$dep1.id} ${this.op} ${$dep2.id}`; + } + } + finalize() { + this.unbatchedExecute = this.makeUnbatchedExecute(); + super.finalize(); + } + makeUnbatchedExecute() { + switch (this.op) { + case "null": + return isNull; + case "not null": + return isNotNull; + case "exists": + return isNotNullish; + case "not exists": + return isNullish; + case "===": + return isEqual; + case "!==": + return isNotEqual; + default: { + const never = this.op; + throw new Error(`Operator ${never} is not supported`); + } + } + } + unbatchedExecute(_extra, _value1, _value2) { + throw new Error(`${this} was not finalized?`); + } +} +exports.ConditionStep = ConditionStep; +function isNull(_extra, value1) { + return value1 === null; +} +function isNotNull(_extra, value1) { + return value1 !== null; +} +function isNullish(_extra, value1) { + return value1 == null; +} +function isNotNullish(_extra, value1) { + return value1 != null; +} +function isEqual(_extra, value1, value2) { + return value1 === value2; +} +function isNotEqual(_extra, value1, value2) { + return value1 !== value2; +} +function condition(op, step1, step2) { + return new ConditionStep(op, step1, step2); +} +//# sourceMappingURL=condition.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/condition.js.map b/grafast/grafast/dist/steps/condition.js.map new file mode 100644 index 0000000000..28af03e497 --- /dev/null +++ b/grafast/grafast/dist/steps/condition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"condition.js","sourceRoot":"","sources":["../../src/steps/condition.ts"],"names":[],"mappings":";;;AA+HS,8BAAS;AA7HlB,wCAA2C;AAE3C,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAU,CAAC;AAE7E,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC;AAIhD,MAAa,aAAc,SAAQ,uBAAsB;aAChD,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,eAAe;KAC5B,AAHc,CAGb;IAGF,YACU,EAAY,EACpB,KAAW,EACX,KAAY;QAEZ,KAAK,EAAE,CAAC;QAJA,OAAE,GAAF,EAAE,CAAU;QAHtB,kBAAa,GAAG,IAAI,CAAC;QACrB,+BAA0B,GAAG,IAAI,CAAC;QAOhC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,QAAQ;YACR,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAmB,CAAC,EAAE,CAAC;gBAClD,MAAM,IAAI,KAAK,CACb,mBAAmB,EAAE,wCAAwC,cAAc,CAAC,IAAI,CAC9E,IAAI,CACL,EAAE,CACJ,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,SAAS;YACT,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAoB,CAAC,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CACb,mBAAmB,EAAE,wCAAwC,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;IAED,gBAAgB,CACd,MAA+B,EAC/B,OAAY,EACZ,OAAY;QAEZ,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,qBAAqB,CAAC,CAAC;IAChD,CAAC;;AA7EH,sCA8EC;AACD,SAAS,MAAM,CAAC,MAA+B,EAAE,MAAW;IAC1D,OAAO,MAAM,KAAK,IAAI,CAAC;AACzB,CAAC;AACD,SAAS,SAAS,CAAC,MAA+B,EAAE,MAAW;IAC7D,OAAO,MAAM,KAAK,IAAI,CAAC;AACzB,CAAC;AACD,SAAS,SAAS,CAAC,MAA+B,EAAE,MAAW;IAC7D,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC;AACD,SAAS,YAAY,CAAC,MAA+B,EAAE,MAAW;IAChE,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC;AACD,SAAS,OAAO,CACd,MAA+B,EAC/B,MAAW,EACX,MAAW;IAEX,OAAO,MAAM,KAAK,MAAM,CAAC;AAC3B,CAAC;AACD,SAAS,UAAU,CACjB,MAA+B,EAC/B,MAAW,EACX,MAAW;IAEX,OAAO,MAAM,KAAK,MAAM,CAAC;AAC3B,CAAC;AASD,SAAS,SAAS,CAAC,EAAY,EAAE,KAAW,EAAE,KAAY;IACxD,OAAO,IAAI,aAAa,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/connection.d.ts b/grafast/grafast/dist/steps/connection.d.ts new file mode 100644 index 0000000000..014cc9ce04 --- /dev/null +++ b/grafast/grafast/dist/steps/connection.d.ts @@ -0,0 +1,147 @@ +import type { ExecutionDetails, GrafastResultsList, Maybe, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +type ParametersExceptFirst = F extends (arg0: any, ...rest: infer R) => any ? R : never[]; +/** + * Describes what a plan needs to implement in order to be suitable for + * supplying what the `PageInfo` type requires. + */ +export interface PageInfoCapableStep extends Step { + hasNextPage(): Step; + hasPreviousPage(): Step; + startCursor(): Step; + endCursor(): Step; +} +export declare function assertPageInfoCapableStep($step: Step | PageInfoCapableStep): asserts $step is PageInfoCapableStep; +/** + * Describes what a plan needs to implement in order to be suitable for + * supplying what a ConnectionStep requires. + */ +export interface ConnectionCapableStep extends Step { + /** + * Clone the plan; it's recommended that you add `$connection` as a + * dependency so that you can abort execution early in the case of errors + * (e.g. if the cursors cannot be parsed). + */ + connectionClone($connection: ConnectionStep, ...args: any[]): ConnectionCapableStep; + pageInfo($connection: ConnectionStep, any>): PageInfoCapableStep; + setFirst($first: Step>): void; + setLast($last: Step>): void; + setOffset($offset: Step>): void; + parseCursor($cursor: Step>): TCursorStep; + setBefore($before: TCursorStep): void; + setAfter($after: TCursorStep): void; + items(): Step ? U : any>>; +} +/** + * Handles GraphQL cursor pagination in a standard and consistent way + * indepdenent of data source. + */ +export declare class ConnectionStep, TEdgeDataStep extends Step = TItemStep, TNodeStep extends Step = Step> extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private subplanId; + private _firstDepId; + private _lastDepId; + private _offsetDepId; + private _beforeDepId; + private _afterDepId; + /** Plan for data to associate with the edge */ + readonly edgeDataPlan?: ($item: TItemStep) => TEdgeDataStep; + /** The node plan */ + readonly itemPlan?: ($item: TItemStep) => TNodeStep; + readonly cursorPlan?: ($item: TItemStep) => Step | undefined; + constructor(subplan: TStep, config?: ConnectionConfig); + toStringMeta(): string; + getFirst(): Step | null; + setFirst(first: Step | number): void; + getLast(): Step | null; + setLast(last: Step | number): void; + getOffset(): Step | null; + setOffset(offset: Step | number): void; + getBefore(): TCursorStep | null; + setBefore($beforePlan: Step): void; + getAfter(): TCursorStep | null; + setAfter($afterPlan: Step): void; + /** + * This should not be called after the arguments have been finalized. + */ + getSubplan(): TStep; + /** + * This represents the entire collection with conditions and ordering + * applied, but without any pagination constraints (before, after, first, + * last, offset) applied. It's useful for the following: + * + * - performing aggregates e.g. totalCount across the entire collection + * - determining fields for pageInfo, e.g. is there a next/previous page + * + * This cannot be called before the arguments have been finalized. + */ + cloneSubplanWithoutPagination(...args: ParametersExceptFirst): TStep; + /** + * This represents a single page from the collection - not only have + * conditions and ordering been applied but we've also applied the pagination + * constraints (before, after, first, last, offset). It's useful for + * returning the actual edges and nodes of the connection. + * + * This cannot be called before the arguments have been finalized. + */ + cloneSubplanWithPagination(...args: ParametersExceptFirst | []): TStep; + /** + * Subplans may call this from their `setBefore`/`setAfter`/etc plans in order + * to add a dependency to us, which is typically useful for adding validation + * functions so that they are thrown "earlier", avoiding error bubbling. + */ + addValidation(callback: () => Step): void; + get(fieldName: string): Step | undefined; + edges(): Step; + nodes(): import("./listTransform.js").__ListTransformStep | TStep; + wrapEdge($edge: TItemStep): EdgeStep; + pageInfo(): PageInfoCapableStep; + execute({ count, }: ExecutionDetails): GrafastResultsList>; + unbatchedExecute(): any; +} +export interface EdgeCapableStep extends Step { + node(): TNodeStep; + cursor(): Step; +} +export declare function assertEdgeCapableStep($step: Step | EdgeCapableStep): asserts $step is EdgeCapableStep; +export declare class EdgeStep, TEdgeDataStep extends Step = TItemStep, TNodeStep extends Step = Step> extends UnbatchedStep implements EdgeCapableStep { + private skipCursor; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private connectionDepId; + private readonly cursorDepId; + private needCursor; + constructor($connection: ConnectionStep, $item: TItemStep, skipCursor?: boolean); + get(fieldName: string): Step | TNodeStep | undefined; + private getConnectionStep; + private getItemStep; + data(): TEdgeDataStep; + node(): TNodeStep; + cursor(): Step; + optimize(): EdgeStep>; + deduplicate(_peers: EdgeStep[]): EdgeStep[]; + deduplicatedWith(replacement: EdgeStep): void; + unbatchedExecute(_extra: UnbatchedExecutionExtra, record: any, cursor: any): any; +} +interface ConnectionConfig { + nodePlan?: ($item: TItemStep) => TNodeStep; + edgeDataPlan?: ($item: TItemStep) => TEdgeDataStep; + cursorPlan?: ($item: TItemStep) => Step; +} +/** + * Wraps a collection fetch to provide the utilities for working with GraphQL + * cursor connections. + */ +export declare function connection, TEdgeDataStep extends Step = TItemStep, TNodeStep extends Step = Step>(step: TStep, config?: ConnectionConfig): ConnectionStep; +export type ItemsStep | ConnectionCapableStep> = T extends ConnectionCapableStep ? ReturnType : T; +export declare function itemsOrStep | ConnectionCapableStep>($step: T): Step; +export {}; +//# sourceMappingURL=connection.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/connection.d.ts.map b/grafast/grafast/dist/steps/connection.d.ts.map new file mode 100644 index 0000000000..6e1ee69253 --- /dev/null +++ b/grafast/grafast/dist/steps/connection.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/steps/connection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,KAAK,qBAAqB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAC1E,CAAC,GACD,KAAK,EAAE,CAAC;AAEZ;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI;IAC/C,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,eAAe,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IACjC,WAAW,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnC,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAClC;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,IAAI,GAAG,mBAAmB,GAChC,OAAO,CAAC,KAAK,IAAI,mBAAmB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AAS,IAAI,GAAG,SAAS,EACtC,SAAS,SAAS,IAAI,GAAG,IAAI;IAE7B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC;IAC3C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,aAAa,CAAC;IACnD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACxD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,SAAS,SAAS,IAAI,EACtB,WAAW,SAAS,IAAI,EACxB,KAAK,SAAS,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,EAC3D,aAAa,SAAS,IAAI,GAAG,SAAS,EACtC,SAAS,SAAS,IAAI,GAAG,IAAI,EAE7B,IAAI,EAAE,KAAK,EACX,MAAM,CAAC,EAAE,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,CAAC,GAC7D,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,CAAC,CAgBzE;AAED,MAAM,MAAM,SAAS,CACnB,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,IAC9D,CAAC,SAAS,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;AAE3E,wBAAgB,WAAW,CACzB,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAChE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAIhC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/connection.js b/grafast/grafast/dist/steps/connection.js new file mode 100644 index 0000000000..31f7d4b058 --- /dev/null +++ b/grafast/grafast/dist/steps/connection.js @@ -0,0 +1,368 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EdgeStep = exports.ConnectionStep = void 0; +exports.assertPageInfoCapableStep = assertPageInfoCapableStep; +exports.assertEdgeCapableStep = assertEdgeCapableStep; +exports.connection = connection; +exports.itemsOrStep = itemsOrStep; +const tslib_1 = require("tslib"); +const assert = tslib_1.__importStar(require("../assert.js")); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const constant_js_1 = require("./constant.js"); +const each_js_1 = require("./each.js"); +function assertPageInfoCapableStep($step) { + const $typed = $step; + if (typeof $typed.hasNextPage !== "function" || + typeof $typed.hasPreviousPage !== "function" || + typeof $typed.startCursor !== "function" || + typeof $typed.endCursor !== "function") { + throw new Error(`Expected a PageInfoCapableStep, but found '${$step}'`); + } +} +const EMPTY_OBJECT = Object.freeze(Object.create(null)); +/** + * Handles GraphQL cursor pagination in a standard and consistent way + * indepdenent of data source. + */ +class ConnectionStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ConnectionStep", + }; } + // TYPES: if subplan is `ConnectionCapableStep>` then `nodePlan`/`cursorPlan` aren't needed; otherwise `cursorPlan` is required. + constructor(subplan, config = {}) { + super(); + this.isSyncAndSafe = true; + // Pagination stuff + this._firstDepId = null; + this._lastDepId = null; + this._offsetDepId = null; + this._beforeDepId = undefined; + this._afterDepId = undefined; + const { edgeDataPlan, nodePlan, cursorPlan } = config; + this.edgeDataPlan = edgeDataPlan; + this.itemPlan = nodePlan; + this.cursorPlan = cursorPlan; + if (!cursorPlan) { + // ENHANCE: Assert that the `nodePlan` has a `.cursor()` method. + } + // This is a _soft_ reference to the plan; we're not adding it as a + // dependency since we do not actually need it to execute; it's our + // children that need access to it. + this.subplanId = subplan.id; + } + toStringMeta() { + return String(this.subplanId); + } + getFirst() { + return this.maybeGetDep(this._firstDepId); + } + setFirst(first) { + if (this._firstDepId != null) { + throw new Error(`${this}->setFirst already called`); + } + const $first = typeof first === "number" ? (0, constant_js_1.constant)(first) : first; + this._firstDepId = this.addUnaryDependency({ + step: $first, + nonUnaryMessage: () => `${this}.setFirst(...) must be passed a _unary_ step, but ${$first} is not unary. See: https://err.red/gud#connection`, + }); + } + getLast() { + return this.maybeGetDep(this._lastDepId); + } + setLast(last) { + if (this._lastDepId != null) { + throw new Error(`${this}->setLast already called`); + } + const $last = typeof last === "number" ? (0, constant_js_1.constant)(last) : last; + this._lastDepId = this.addUnaryDependency({ + step: $last, + nonUnaryMessage: () => `${this}.setLast(...) must be passed a _unary_ step, but ${$last} is not unary. See: https://err.red/gud#connection`, + }); + } + getOffset() { + return this.maybeGetDep(this._offsetDepId); + } + setOffset(offset) { + if (this._offsetDepId != null) { + throw new Error(`${this}->setOffset already called`); + } + const $offset = typeof offset === "number" ? (0, constant_js_1.constant)(offset) : offset; + this._offsetDepId = this.addUnaryDependency({ + step: $offset, + nonUnaryMessage: () => `${this}.setOffset(...) must be passed a _unary_ step, but ${$offset} is not unary. See: https://err.red/gud#connection`, + }); + } + getBefore() { + return this.maybeGetDep(this._beforeDepId, true); + } + setBefore($beforePlan) { + if ($beforePlan instanceof constant_js_1.ConstantStep && $beforePlan.data == null) { + return; + } + if (this._beforeDepId !== undefined) { + throw new Error(`${this}->setBefore already called`); + } + const $parsedBeforePlan = this.getSubplan().parseCursor($beforePlan); + this._beforeDepId = this.addUnaryDependency({ + step: $parsedBeforePlan, + nonUnaryMessage: () => `${this}.setBefore(...) must be passed a _unary_ step, but ${$parsedBeforePlan} (and presumably ${$beforePlan}) is not unary. See: https://err.red/gud#connection`, + }); + } + getAfter() { + return this.maybeGetDep(this._afterDepId, true); + } + setAfter($afterPlan) { + if ($afterPlan instanceof constant_js_1.ConstantStep && $afterPlan.data == null) { + return; + } + if (this._afterDepId !== undefined) { + throw new Error(`${this}->setAfter already called`); + } + const $parsedAfterPlan = this.getSubplan().parseCursor($afterPlan); + this._afterDepId = this.addUnaryDependency({ + step: $parsedAfterPlan, + nonUnaryMessage: () => `${this}.setAfter(...) must be passed a _unary_ step, but ${$parsedAfterPlan} (and presumably ${$afterPlan}) is not unary. See: https://err.red/gud#connection`, + }); + } + /** + * This should not be called after the arguments have been finalized. + */ + getSubplan() { + if (this.isArgumentsFinalized) { + throw new Error("Forbidden to call ConnectionStep.getSubplan after arguments finalize"); + } + const plan = this.getStep(this.subplanId); + return plan; + } + /** + * This represents the entire collection with conditions and ordering + * applied, but without any pagination constraints (before, after, first, + * last, offset) applied. It's useful for the following: + * + * - performing aggregates e.g. totalCount across the entire collection + * - determining fields for pageInfo, e.g. is there a next/previous page + * + * This cannot be called before the arguments have been finalized. + */ + cloneSubplanWithoutPagination(...args) { + if (!this.isArgumentsFinalized) { + throw new Error("Forbidden to call ConnectionStep.nodes before arguments finalize"); + } + const plan = this.getStep(this.subplanId); + const clonedPlan = plan.connectionClone(this, ...args); + return clonedPlan; + } + /** + * This represents a single page from the collection - not only have + * conditions and ordering been applied but we've also applied the pagination + * constraints (before, after, first, last, offset). It's useful for + * returning the actual edges and nodes of the connection. + * + * This cannot be called before the arguments have been finalized. + */ + cloneSubplanWithPagination( + // TYPES: ugh. The `|[]` shouldn't be needed. + ...args) { + const clonedPlan = this.cloneSubplanWithoutPagination(...args); + { + const plan = this.getBefore(); + if (plan !== null) { + clonedPlan.setBefore(plan); + } + } + { + const plan = this.getAfter(); + if (plan !== null) { + clonedPlan.setAfter(plan); + } + } + { + const plan = this.getFirst(); + if (plan !== null) { + clonedPlan.setFirst(plan); + } + } + { + const plan = this.getLast(); + if (plan !== null) { + clonedPlan.setLast(plan); + } + } + { + const plan = this.getOffset(); + if (plan !== null) { + clonedPlan.setOffset(plan); + } + } + return clonedPlan; + } + /** + * Subplans may call this from their `setBefore`/`setAfter`/etc plans in order + * to add a dependency to us, which is typically useful for adding validation + * functions so that they are thrown "earlier", avoiding error bubbling. + */ + addValidation(callback) { + this.withMyLayerPlan(() => { + this.addDependency(callback()); + }); + } + get(fieldName) { + switch (fieldName) { + case "edges": + return this.edges(); + case "nodes": + return this.nodes(); + case "pageInfo": + return this.pageInfo(); + } + } + edges() { + if (this.cursorPlan || this.itemPlan || this.edgeDataPlan) { + return (0, each_js_1.each)(this.cloneSubplanWithPagination(), ($intermediate) => this.wrapEdge($intermediate)); + } + else { + // Assuming the subplan is an EdgeCapableStep + return this.cloneSubplanWithPagination(); + } + } + nodes() { + if (this.itemPlan !== undefined) { + return (0, each_js_1.each)(this.cloneSubplanWithPagination(), ($intermediate) => this.itemPlan($intermediate)); + } + else { + return this.cloneSubplanWithPagination(); + } + } + wrapEdge($edge) { + return new EdgeStep(this, $edge); + } + pageInfo() { + return this.cloneSubplanWithPagination().pageInfo(this); + } + /* + + **IMPORTANT**: we cannot optimize this by replacing ourself with a constant + because otherwise errors in cursors/etc will be pushed down a level. + + public optimize() { + return constant(EMPTY_OBJECT, false); + } + */ + execute({ count, }) { + // Fake execution; data actually comes from the child plans + return (0, utils_js_1.arrayOfLength)(count, EMPTY_OBJECT); + } + unbatchedExecute() { + return EMPTY_OBJECT; + } +} +exports.ConnectionStep = ConnectionStep; +function assertEdgeCapableStep($step) { + const $typed = $step; + if (typeof $typed.node !== "function" || + typeof $typed.cursor !== "function") { + throw new Error(`Expected a EdgeCapableStep, but found '${$step}'`); + } +} +class EdgeStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "EdgeStep", + }; } + constructor($connection, $item, skipCursor = false) { + super(); + this.skipCursor = skipCursor; + this.isSyncAndSafe = true; + this.needCursor = false; + const itemDepId = this.addDependency($item); + assert.strictEqual(itemDepId, 0, "GrafastInternalError<89cc75cd-ccaf-4b7e-873f-a629c36d55f7>: item must be first dependency"); + if (!skipCursor) { + const $cursor = $connection.cursorPlan?.($item) ?? + $item.cursor?.(); + if (!$cursor) { + throw new Error(`No cursor plan known for '${$item}'`); + } + this.cursorDepId = this.addDependency($cursor); + assert.strictEqual(this.cursorDepId, 1, "GrafastInternalError<46e4b5ca-0c11-4737-973d-0edd0be060c9>: cursor must be second dependency"); + } + else { + this.cursorDepId = null; + } + this.connectionDepId = this.addDependency($connection); + } + get(fieldName) { + switch (fieldName) { + case "node": + return this.node(); + case "cursor": + return this.cursor(); + } + } + getConnectionStep() { + return this.getDep(this.connectionDepId); + } + getItemStep() { + return this.getDep(0); + } + data() { + const $item = this.getItemStep(); + return this.getConnectionStep().edgeDataPlan?.($item) ?? $item; + } + node() { + const $item = this.getItemStep(); + return this.getConnectionStep().itemPlan?.($item) ?? $item; + } + cursor() { + this.needCursor = true; + return this.getDep(this.cursorDepId); + } + optimize() { + if (!this.needCursor && this.cursorDepId !== null) { + return new EdgeStep(this.getConnectionStep(), this.getItemStep(), true); + } + return this; + } + deduplicate(_peers) { + return _peers; + } + deduplicatedWith(replacement) { + if (this.needCursor) { + replacement.needCursor = true; + } + } + unbatchedExecute(_extra, record, cursor) { + // Handle nulls; everything else comes from the child plans + return record == null && (this.cursorDepId == null || cursor == null) + ? null + : EMPTY_OBJECT; + } +} +exports.EdgeStep = EdgeStep; +let warned = false; +/** + * Wraps a collection fetch to provide the utilities for working with GraphQL + * cursor connections. + */ +function connection(step, config) { + if (typeof config === "function") { + if (!warned) { + warned = true; + console.warn(`The call signature for connection() has changed, arguments after the first argument should be specified via a config object`); + } + return connection(step, { + // eslint-disable-next-line prefer-rest-params + nodePlan: arguments[1], + // eslint-disable-next-line prefer-rest-params + cursorPlan: arguments[2], + }); + } + return new ConnectionStep(step, config); +} +function itemsOrStep($step) { + return "items" in $step && typeof $step.items === "function" + ? $step.items() + : $step; +} +//# sourceMappingURL=connection.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/connection.js.map b/grafast/grafast/dist/steps/connection.js.map new file mode 100644 index 0000000000..6480eed3a5 --- /dev/null +++ b/grafast/grafast/dist/steps/connection.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../src/steps/connection.ts"],"names":[],"mappings":";;;AA4B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AAK,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/constant.d.ts b/grafast/grafast/dist/steps/constant.d.ts new file mode 100644 index 0000000000..b8e217e5ec --- /dev/null +++ b/grafast/grafast/dist/steps/constant.d.ts @@ -0,0 +1,31 @@ +import type { ExecutionDetails, GrafastResultsList, JSONValue } from "../interfaces.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Converts a constant value (e.g. a string/number/etc) into a plan + */ +export declare class ConstantStep extends UnbatchedStep { + readonly data: TData; + readonly isSensitive: boolean; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + constructor(data: TData, isSensitive?: boolean); + toStringMeta(): string; + planJSONExtra(): undefined | Record; + deduplicate(peers: readonly ConstantStep[]): ConstantStep[]; + execute({ count }: ExecutionDetails): GrafastResultsList; + unbatchedExecute(): TData; + isNull(): boolean; + isUndefined(): boolean; + get(key: string): ConstantStep; + at(index: number): ConstantStep; +} +/** + * Call this as a template string or as a function. Only intended for handling + * scalar values, not arrays/objects/etc. + */ +export declare function constant(strings: TemplateStringsArray & [TString]): ConstantStep; +export declare function constant(data: TData, isSecret?: boolean): ConstantStep; +//# sourceMappingURL=constant.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/constant.d.ts.map b/grafast/grafast/dist/steps/constant.d.ts.map new file mode 100644 index 0000000000..d260c86eb2 --- /dev/null +++ b/grafast/grafast/dist/steps/constant.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/steps/constant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAQ,aAAa,EAAE,MAAM,YAAY,CAAC;AAIjD;;GAEG;AACH,qBAAa,YAAY,CAAC,KAAK,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;aAQzC,IAAI,EAAE,KAAK;aACX,WAAW;IAR7B,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;gBAGH,IAAI,EAAE,KAAK,EACX,WAAW,UAA4C;IAazE,YAAY;IAaL,aAAa,IAAI,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;IAuB7D,WAAW,CAAC,KAAK,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE;IAI/C,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,GAAG,kBAAkB,CAAC,KAAK,CAAC;IAwC/D,gBAAgB;IAIhB,MAAM;IAGN,WAAW;IAIX,GAAG,CAAC,GAAG,EAAE,MAAM;IAUf,EAAE,CAAC,KAAK,EAAE,MAAM;CAIjB;AAUD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,OAAO,SAAS,MAAM,EACnD,OAAO,EAAE,oBAAoB,GAAG,CAAC,OAAO,CAAC,GACxC,YAAY,CAAC,OAAO,CAAC,CAAC;AACzB,wBAAgB,QAAQ,CAAC,KAAK,EAC5B,IAAI,EAAE,KAAK,EACX,QAAQ,CAAC,EAAE,OAAO,GACjB,YAAY,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/constant.js b/grafast/grafast/dist/steps/constant.js new file mode 100644 index 0000000000..42d8e7cd7b --- /dev/null +++ b/grafast/grafast/dist/steps/constant.js @@ -0,0 +1,151 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConstantStep = void 0; +exports.constant = constant; +const inspect_js_1 = require("../inspect.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const index_js_1 = require("./index.js"); +/** + * Converts a constant value (e.g. a string/number/etc) into a plan + */ +class ConstantStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ConstantStep", + }; } + constructor(data, isSensitive = typeof data !== "boolean" && data != null) { + super(); + this.data = data; + this.isSensitive = isSensitive; + this.isSyncAndSafe = true; + const t = typeof data; + if (data == null || + t === "boolean" || + t === "number" || + (t === "string" && t.length < 200)) { + this.peerKey = t + "|" + String(data); + } + } + toStringMeta() { + // ENHANCE: use nicer simplification + return this.isSensitive + ? `[HIDDEN]` + : (0, inspect_js_1.inspect)(this.data, { + compact: Infinity, + breakLength: Infinity, + }) + .replace(/[\r\n]/g, " ") + .replaceAll("[Object: null prototype] ", "§") + .slice(0, 60); + } + planJSONExtra() { + if (this.isSensitive) + return; + const data = this.data; + if (data === null) { + return { + constant: { + type: "null", + }, + }; + } + else if (data === undefined || + typeof data === "boolean" || + typeof data === "number" || + typeof data === "string") { + return { + constant: { + type: typeof data, + }, + }; + } + } + deduplicate(peers) { + return peers.filter((p) => p.data === this.data); + } + execute({ count }) { + return (0, utils_js_1.arrayOfLength)(count, this.data); + } + /** @internal */ + eval() { + return this.data; + } + /** @internal */ + evalIs(value) { + return this.data === value; + } + /** @internal */ + evalIsEmpty() { + return (typeof this.data === "object" && + this.data !== null && + Object.keys(this.data).length === 0); + } + /** @internal */ + evalLength() { + return Array.isArray(this.data) ? this.data.length : null; + } + /** @internal */ + evalKeys() { + if (this.data == null || typeof this.data !== "object") { + return null; + } + else { + const data = this.data; + return Object.keys(data).filter((k) => data[k] !== undefined); + } + } + unbatchedExecute() { + return this.data; + } + isNull() { + return this.data === null; + } + isUndefined() { + return this.data === undefined; + } + get(key) { + const value = typeof this.data === "object" && + this.data !== null && + Object.hasOwn(this.data, key) + ? this.data[key] + : undefined; + return constant(value); + } + at(index) { + const value = Array.isArray(this.data) ? this.data[index] : undefined; + return constant(value); + } +} +exports.ConstantStep = ConstantStep; +function isTemplateStringsArray(data) { + return (Array.isArray(data) && + "raw" in data && + Array.isArray(data.raw)); +} +function constant(data, isSecret) { + if (isTemplateStringsArray(data)) { + if (data.length !== 1) { + throw new Error("constant`...` doesn't currently support placeholders; please use 'constant(`...`)' instead"); + } + return constant(data[0], false); + } + const opPlan = (0, index_js_1.operationPlan)(); + const makeConst = () => (0, index_js_1.operationPlan)().withRootLayerPlan(() => new ConstantStep(data, isSecret)); + const t = typeof data; + if (data == null || + t === "boolean" || + t === "string" || + t === "number" || + t === "symbol") { + return opPlan.cacheStep(opPlan.contextStep, isSecret ? `constant-secret` : `constant`, data, makeConst); + } + else { + return makeConst(); + } +} +// Have to overwrite the getDepOrConstant method due to circular dependency +step_js_1.Step.prototype.getDepOrConstant = function (depId, fallback) { + return this.maybeGetDep(depId) ?? constant(fallback, false); +}; +//# sourceMappingURL=constant.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/constant.js.map b/grafast/grafast/dist/steps/constant.js.map new file mode 100644 index 0000000000..2985691da1 --- /dev/null +++ b/grafast/grafast/dist/steps/constant.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constant.js","sourceRoot":"","sources":["../../src/steps/constant.ts"],"names":[],"mappings":";;;AAiKA,4BAkCC;AAnMD,8CAAwC;AAMxC,wCAAiD;AACjD,0CAA4C;AAC5C,yCAA2C;AAE3C;;GAEG;AACH,MAAa,YAAoB,SAAQ,uBAAoB;aACpD,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,cAAc;KAC3B,AAHc,CAGb;IAGF,YACkB,IAAW,EACX,cAAc,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,IAAI,IAAI;QAEvE,KAAK,EAAE,CAAC;QAHQ,SAAI,GAAJ,IAAI,CAAO;QACX,gBAAW,GAAX,WAAW,CAA4C;QAJzE,kBAAa,GAAG,IAAI,CAAC;QAOnB,MAAM,CAAC,GAAG,OAAO,IAAI,CAAC;QACtB,IACE,IAAI,IAAI,IAAI;YACZ,CAAC,KAAK,SAAS;YACf,CAAC,KAAK,QAAQ;YACd,CAAC,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,EAClC,CAAC;YACD,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,C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d,CAAC,KAAK,QAAQ,EACd,CAAC;QACD,OAAO,MAAM,CAAC,SAAS,CACrB,MAAM,CAAC,WAAW,EAClB,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,UAAU,EACzC,IAA6D,EAC7D,SAAS,CACV,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,EAAE,CAAC;IACrB,CAAC;AACH,CAAC;AAED,2EAA2E;AAC1E,cAAI,CAAC,SAAiB,CAAC,gBAAgB,GAAG,UAEzC,KAAoB,EACpB,QAAe;IAEf,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9D,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/each.d.ts b/grafast/grafast/dist/steps/each.d.ts new file mode 100644 index 0000000000..ae4ae01f88 --- /dev/null +++ b/grafast/grafast/dist/steps/each.d.ts @@ -0,0 +1,9 @@ +import type { ListCapableStep, Step } from "../step.js"; +import { __ItemStep } from "./__item.js"; +import type { ConnectionCapableStep, ItemsStep } from "./connection.js"; +import type { __ListTransformStep } from "./listTransform.js"; +/** + * Transforms a list by wrapping each element in the list with the given mapper. + */ +export declare function each & Partial>) | ConnectionCapableStep, TResultItemStep extends Step>(listStep: TListStep, mapper: (itemPlan: ItemsStep extends ListCapableStep ? ReturnType["listItem"]> : __ItemStep) => TResultItemStep): __ListTransformStep; +//# sourceMappingURL=each.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/each.d.ts.map b/grafast/grafast/dist/steps/each.d.ts.map new file mode 100644 index 0000000000..01ae4046f8 --- /dev/null +++ b/grafast/grafast/dist/steps/each.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"each.d.ts","sourceRoot":"","sources":["../../src/steps/each.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EAErB,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AA6B9D;;GAEG;AACH,wBAAgB,IAAI,CAClB,SAAS,SACL,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GACjE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EACnC,eAAe,SAAS,IAAI,EAE5B,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAE,CACN,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,GAC5D,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,GAC5C,UAAU,CAAC,GAAG,CAAC,KAChB,eAAe,GACnB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CA2CzC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/each.js b/grafast/grafast/dist/steps/each.js new file mode 100644 index 0000000000..433a5a0afd --- /dev/null +++ b/grafast/grafast/dist/steps/each.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.each = each; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const step_js_1 = require("../step.js"); +const __item_js_1 = require("./__item.js"); +const listTransform_js_1 = require("./listTransform.js"); +const eachReduceCallback = (memo, item) => { + memo.push(item); + return memo; +}; +const eachItemPlanCallback = (itemPlan) => itemPlan; +const eachInitialState = () => []; +const outerCache = new WeakMap(); +const eachCallbackForListPlan = (listPlan, mapper) => { + let innerCache = outerCache.get(listPlan); + if (!innerCache) { + innerCache = new WeakMap(); + outerCache.set(listPlan, innerCache); + } + let result = innerCache.get(mapper); + if (!result) { + result = (itemPlan) => mapper(listPlan.listItem(itemPlan)); + innerCache.set(mapper, result); + } + return result; +}; +/** + * Transforms a list by wrapping each element in the list with the given mapper. + */ +function each(listStep, mapper) { + return (0, listTransform_js_1.listTransform)({ + listStep, + itemPlanCallback: eachItemPlanCallback, + initialState: eachInitialState, + reduceCallback: eachReduceCallback, + listItem: (0, step_js_1.isListCapableStep)(listStep) + ? eachCallbackForListPlan(listStep, mapper) + : mapper, + meta: `each:${chalk_1.default.yellow(listStep.id)}${mapper.name ? `/${mapper.name}` : ""}`, + optimize() { + const layerPlan = this.subroutineLayer; + const rootStep = layerPlan.rootStep; + if (rootStep instanceof __item_js_1.__ItemStep && + rootStep.getParentStep().layerPlan !== layerPlan) { + // We don't do anything; replace ourself with our parent + return this.getListStep(); + } + return this; + }, + ...(listStep.connectionClone != null + ? { + connectionClone($connection, ...args) { + const $list = this.getListStep(); + const $clonedList = $list.connectionClone($connection, ...args); + return each($clonedList, mapper); + }, + } + : null), + }); +} +//# sourceMappingURL=each.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/each.js.map b/grafast/grafast/dist/steps/each.js.map new file mode 100644 index 0000000000..2b88840e35 --- /dev/null +++ b/grafast/grafast/dist/steps/each.js.map @@ -0,0 +1 @@ +{"version":3,"file":"each.js","sourceRoot":"","sources":["../../src/steps/each.ts"],"names":[],"mappings":";;AA0CA,oBAuDC;;AAjGD,0DAA0B;AAG1B,wCAA+C;AAC/C,2CAAyC;AAOzC,yDAAmD;AAEnD,MAAM,kBAAkB,GAAG,CAAC,IAAW,EAAE,IAAS,EAAE,EAAE;IACpD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AACF,MAAM,oBAAoB,GAAG,CAAC,QAAc,EAAE,EAAE,CAAC,QAAQ,CAAC;AAC1D,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC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;YACvC,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YACpC,IACE,QAAQ,YAAY,sBAAU;gBAC9B,QAAQ,CAAC,aAAa,EAAE,CAAC,SAAS,KAAK,SAAS,EAChD,CAAC;gBACD,wDAAwD;gBACxD,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;YAC5B,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,GAAG,CAAC,QAAQ,CAAC,eAAe,IAAI,IAAI;YAClC,CAAC,CAAC;gBACE,eAAe,CAEb,WAA+C,EAC/C,GAAG,IAAW;oBAEd,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EACG,CAAC;oBAClC,MAAM,WAAW,GAAG,KAAK,CAAC,eAAe,CACvC,WAAW,EACX,GAAG,IAAI,CACuC,CAAC;oBACjD,OAAO,IAAI,CAAC,WAAW,EAAE,MAAM,CACE,CAAC;gBACpC,CAAC;aACF;YACH,CAAC,CAAC,IAAI,CAAC;KACV,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/error.d.ts b/grafast/grafast/dist/steps/error.d.ts new file mode 100644 index 0000000000..d1283b439f --- /dev/null +++ b/grafast/grafast/dist/steps/error.d.ts @@ -0,0 +1,15 @@ +import type { ExecutionDetails, GrafastResultsList } from "../interfaces.js"; +import { UnbatchedStep } from "../step.js"; +export declare class ErrorStep extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + error: TError; + constructor(error: TError); + execute({ count }: ExecutionDetails): GrafastResultsList; + unbatchedExecute(): any; +} +export declare function error(error: TError): ErrorStep; +//# sourceMappingURL=error.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/error.d.ts.map b/grafast/grafast/dist/steps/error.d.ts.map new file mode 100644 index 0000000000..bf1842f8bd --- /dev/null +++ b/grafast/grafast/dist/steps/error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/steps/error.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,qBAAa,SAAS,CAAC,MAAM,SAAS,KAAK,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;IACvE,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAS;IACtB,KAAK,EAAE,MAAM,CAAC;gBACF,KAAK,EAAE,MAAM;IAQzB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,CAAC;IAG7D,gBAAgB,IAAI,GAAG;CAGxB;AAED,wBAAgB,KAAK,CAAC,MAAM,SAAS,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAE5E"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/error.js b/grafast/grafast/dist/steps/error.js new file mode 100644 index 0000000000..e491420eed --- /dev/null +++ b/grafast/grafast/dist/steps/error.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorStep = void 0; +exports.error = error; +const error_js_1 = require("../error.js"); +const inspect_js_1 = require("../inspect.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +class ErrorStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ErrorStep", + }; } + constructor(error) { + super(); + this.isSyncAndSafe = false; + if (!(error instanceof Error)) { + throw new Error(`${this} called with non-Error ${(0, inspect_js_1.inspect)(error)}`); + } + this.error = error; + } + execute({ count }) { + return (0, utils_js_1.arrayOfLength)(count, (0, error_js_1.flagError)(this.error)); + } + unbatchedExecute() { + return (0, error_js_1.flagError)(this.error); + } +} +exports.ErrorStep = ErrorStep; +function error(error) { + return new ErrorStep(error); +} +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/error.js.map b/grafast/grafast/dist/steps/error.js.map new file mode 100644 index 0000000000..16e9e60619 --- /dev/null +++ b/grafast/grafast/dist/steps/error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/steps/error.ts"],"names":[],"mappings":";;;AA6BA,sBAEC;AA/BD,0CAAwC;AACxC,8CAAwC;AAExC,wCAA2C;AAC3C,0CAA4C;AAE5C,MAAa,SAAgC,SAAQ,uBAAoB;aAChE,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,WAAW;KACxB,AAHc,CAGb;IAGF,YAAY,KAAa;QACvB,KAAK,EAAE,CAAC;QAHV,kBAAa,GAAG,KAAK,CAAC;QAIpB,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,0BAA0B,IAAA,oBAAO,EAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,EAAE,KAAK,EAAoB;QACjC,OAAO,IAAA,wBAAa,EAAC,KAAK,EAAE,IAAA,oBAAS,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC;IACD,gBAAgB;QACd,OAAO,IAAA,oBAAS,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;;AApBH,8BAqBC;AAED,SAAgB,KAAK,CAAuB,KAAa;IACvD,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/filter.d.ts b/grafast/grafast/dist/steps/filter.d.ts new file mode 100644 index 0000000000..f4f378cdce --- /dev/null +++ b/grafast/grafast/dist/steps/filter.d.ts @@ -0,0 +1,11 @@ +import type { ListCapableStep, Step } from "../step.js"; +import type { __ItemStep } from "./__item.js"; +import type { ConnectionCapableStep, ItemsStep } from "./connection.js"; +import type { __ListTransformStep, ListTransformItemPlanCallback } from "./listTransform.js"; +export type FilterPlanMemo = unknown[]; +/** + * Filters a list plan to only include entries for which the `filterCallback` + * plan results in a truthy value. + */ +export declare function filter | ConnectionCapableStep, TItemStep extends Step>(listStep: TListStep, filterCallback: ListTransformItemPlanCallback, TItemStep>): __ListTransformStep ? ReturnType : __ItemStep>; +//# sourceMappingURL=filter.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/filter.d.ts.map b/grafast/grafast/dist/steps/filter.d.ts.map new file mode 100644 index 0000000000..8054139068 --- /dev/null +++ b/grafast/grafast/dist/steps/filter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/steps/filter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAE9B,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,cAAc,GAAG,OAAO,EAAE,CAAC;AAevC;;;GAGG;AACH,wBAAgB,MAAM,CACpB,SAAS,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EACxE,SAAS,SAAS,IAAI,CAAC,OAAO,CAAC,EAE/B,QAAQ,EAAE,SAAS,EACnB,cAAc,EAAE,6BAA6B,CAC3C,SAAS,CAAC,SAAS,CAAC,EACpB,SAAS,CACV,GACA,mBAAmB,CACpB,SAAS,EACT,SAAS,EACT,cAAc,EACd,SAAS,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,GACvC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,GACjC,UAAU,CAAC,GAAG,CAAC,CACpB,CAaA"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/filter.js b/grafast/grafast/dist/steps/filter.js new file mode 100644 index 0000000000..fc29c557eb --- /dev/null +++ b/grafast/grafast/dist/steps/filter.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.filter = filter; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const step_js_1 = require("../step.js"); +const listTransform_js_1 = require("./listTransform.js"); +const reduceCallback = (memo, entireItemValue, include) => { + if (include) { + memo.push(entireItemValue); + } + return memo; +}; +const initialState = () => []; +/** + * Filters a list plan to only include entries for which the `filterCallback` + * plan results in a truthy value. + */ +function filter(listStep, filterCallback) { + return (0, listTransform_js_1.listTransform)({ + listStep, + itemPlanCallback: filterCallback, + initialState, + reduceCallback: reduceCallback, + listItem: (0, step_js_1.isListCapableStep)(listStep) + ? (itemPlan) => listStep.listItem(itemPlan) + : undefined, + meta: `filter:${chalk_1.default.yellow(listStep.id)}${filterCallback.name ? `/${filterCallback.name}` : ""}`, + }); +} +//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/filter.js.map b/grafast/grafast/dist/steps/filter.js.map new file mode 100644 index 0000000000..5263c76b6f --- /dev/null +++ b/grafast/grafast/dist/steps/filter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/steps/filter.ts"],"names":[],"mappings":";;AAgCA,wBA6BC;;AA7DD,0DAA0B;AAG1B,wCAA+C;AAQ/C,yDAAmD;AAInD,MAAM,cAAc,GAAiD,CACnE,IAAI,EACJ,eAAe,EACf,OAAO,EACP,EAAE;IACF,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,GAAmB,EAAE,CAAC,EAAE,CAAC;AAE9C;;;GAGG;AACH,SAAgB,MAAM,CAIpB,QAAmB,EACnB,cAGC;IASD,OAAO,IAAA,gCAAa,EAA4C;QAC9D,QAAQ;QACR,gBAAgB,EAAE,cAAc;QAChC,YAAY;QACZ,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,IAAA,2BAAiB,EAAC,QAAQ,CAAC;YACnC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAe,CAAC;YAClD,CAAC,CAAC,SAAS;QACb,IAAI,EAAE,UAAU,eAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GACvC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EACpD,EAAE;KACH,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/first.d.ts b/grafast/grafast/dist/steps/first.d.ts new file mode 100644 index 0000000000..ff44eeb9ee --- /dev/null +++ b/grafast/grafast/dist/steps/first.d.ts @@ -0,0 +1,23 @@ +import type { ExecutionDetails, GrafastResultsList, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +import type { ConnectionCapableStep } from "./connection.js"; +export declare class FirstStep extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + constructor(parentPlan: Step> | ConnectionCapableStep, any>); + execute({ indexMap, values: [values0], }: ExecutionDetails<[ReadonlyArray]>): GrafastResultsList; + unbatchedExecute(_extra: UnbatchedExecutionExtra, list: any[]): any; + deduplicate(peers: FirstStep[]): FirstStep[]; + optimize(): any; +} +/** + * A plan that resolves to the first entry in the list returned by the given + * plan. + */ +export declare function first(plan: Step> | ConnectionCapableStep, any>): FirstStep; +//# sourceMappingURL=first.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/first.d.ts.map b/grafast/grafast/dist/steps/first.d.ts.map new file mode 100644 index 0000000000..9ad379c9b1 --- /dev/null +++ b/grafast/grafast/dist/steps/first.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../src/steps/first.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAI7D,qBAAa,SAAS,CAAC,KAAK,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;IACxD,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,0BAA0B,UAAQ;gBAGhC,UAAU,EACN,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAC1B,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAM7C,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,OAAO,CAAC,GAClB,EAAE,gBAAgB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC;IAIvE,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,IAAI,EAAE,GAAG,EAAE;IAI7D,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE;IAI1D,QAAQ;CAQT;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EACzB,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAAG,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,GACzE,SAAS,CAAC,KAAK,CAAC,CAOlB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/first.js b/grafast/grafast/dist/steps/first.js new file mode 100644 index 0000000000..c36d10f5e6 --- /dev/null +++ b/grafast/grafast/dist/steps/first.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FirstStep = void 0; +exports.first = first; +const step_js_1 = require("../step.js"); +const connection_js_1 = require("./connection.js"); +const list_js_1 = require("./list.js"); +class FirstStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "FirstStep", + }; } + constructor(parentPlan) { + super(); + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.addDependency((0, connection_js_1.itemsOrStep)(parentPlan)); + } + execute({ indexMap, values: [values0], }) { + return indexMap((i) => values0.at(i)?.[0]); + } + unbatchedExecute(_extra, list) { + return list?.[0]; + } + deduplicate(peers) { + return peers; + } + optimize() { + const parent = this.getDep(0); + // The first of a list plan is just the first dependency of the list plan. + if (parent instanceof list_js_1.ListStep) { + return parent.first(); + } + return this; + } +} +exports.FirstStep = FirstStep; +/** + * A plan that resolves to the first entry in the list returned by the given + * plan. + */ +function first(plan) { + return plan.operationPlan.cacheStep(plan, "GrafastInternal:first()", "", () => new FirstStep(plan)); +} +//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/first.js.map b/grafast/grafast/dist/steps/first.js.map new file mode 100644 index 0000000000..6f59cdc39f --- /dev/null +++ b/grafast/grafast/dist/steps/first.js.map @@ -0,0 +1 @@ +{"version":3,"file":"first.js","sourceRoot":"","sources":["../../src/steps/first.ts"],"names":[],"mappings":";;;AAyDA,sBASC;AA5DD,wCAA2C;AAE3C,mDAA8C;AAC9C,uCAAqC;AAErC,MAAa,SAAiB,SAAQ,uBAAoB;aACjD,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,WAAW;KACxB,AAHc,CAGb;IAIF,YACE,UAE2C;QAE3C,KAAK,EAAE,CAAC;QARV,kBAAa,GAAG,IAAI,CAAC;QACrB,+BAA0B,GAAG,IAAI,CAAC;QAQhC,IAAI,CAAC,aAAa,CAAC,IAAA,2BAAW,EAAC,UAAU,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,OAAO,CAAC,GACwB;QACzC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,gBAAgB,CAAC,MAA+B,EAAE,IAAW;QAC3D,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IAED,WAAW,CAAC,KAAyB;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ;QACN,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,0EAA0E;QAC1E,IAAI,MAAM,YAAY,kBAAQ,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAvCH,8BAwCC;AAED;;;GAGG;AACH,SAAgB,KAAK,CACnB,IAA0E;IAE1E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CACjC,IAAI,EACJ,yBAAyB,EACzB,EAAE,EACF,GAAG,EAAE,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAC1B,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/graphqlResolver.d.ts b/grafast/grafast/dist/steps/graphqlResolver.d.ts new file mode 100644 index 0000000000..6f81e5861a --- /dev/null +++ b/grafast/grafast/dist/steps/graphqlResolver.d.ts @@ -0,0 +1,4 @@ +import type { GraphQLNullableType, GraphQLOutputType } from "graphql"; +import { Step } from "../step.js"; +export declare function graphqlItemHandler($item: Step, nullableType: GraphQLNullableType & GraphQLOutputType): GraphQLItemHandler; +//# sourceMappingURL=graphqlResolver.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/graphqlResolver.d.ts.map b/grafast/grafast/dist/steps/graphqlResolver.d.ts.map new file mode 100644 index 0000000000..8d1bab6e25 --- /dev/null +++ b/grafast/grafast/dist/steps/graphqlResolver.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"graphqlResolver.d.ts","sourceRoot":"","sources":["../../src/steps/graphqlResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,mBAAmB,EACnB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAajB,OAAO,EAAE,IAAI,EAAiB,MAAM,YAAY,CAAC;AA8UjD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,EACX,YAAY,EAAE,mBAAmB,GAAG,iBAAiB,sBAGtD"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/graphqlResolver.js b/grafast/grafast/dist/steps/graphqlResolver.js new file mode 100644 index 0000000000..46f00c93e5 --- /dev/null +++ b/grafast/grafast/dist/steps/graphqlResolver.js @@ -0,0 +1,277 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GraphQLItemHandler = exports.GraphQLResolverStep = void 0; +exports.graphqlItemHandler = graphqlItemHandler; +exports.graphqlResolver = graphqlResolver; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const iterall_1 = require("iterall"); +const index_js_1 = require("../index.js"); +const polymorphic_js_1 = require("../polymorphic.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const { defaultTypeResolver, getNamedType, getNullableType, isAbstractType, isListType, isNonNullType, } = graphql; +function dcr(data, // but not a promise +context, resolveInfo) { + if (data == null) { + return data; + } + else if (data instanceof Error) { + return (0, index_js_1.flagError)(data); + } + else if ((0, utils_js_1.isPromiseLike)(data)) { + return data.then((data) => dcr(data, context, resolveInfo)); + } + if ((0, iterall_1.isIterable)(data)) { + const list = Array.isArray(data) ? data : [...data]; + if (list.some(utils_js_1.isPromiseLike)) { + const resolved = Promise.all(list.map((entry) => (0, utils_js_1.isPromiseLike)(entry) ? entry.then(null, index_js_1.flagError) : entry)); + // TODO: this does recursion which is inefficient and also incorrect. We + // should only traverse as deep as the GraphQL type has lists. + return dcr(resolved, context, resolveInfo); + } + } + // TODO: support async iterables + return { data, context, resolveInfo }; +} +/** + * Calls the given GraphQL resolver for each input - emulates GraphQL + * resolution. + * + * @internal + */ +class GraphQLResolverStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "GraphQLResolverStep", + }; } + constructor(resolver, subscriber, $plan, $args, resolveInfoBase, returnContextAndResolveInfo = false) { + super(); + this.resolver = resolver; + this.subscriber = subscriber; + this.resolveInfoBase = resolveInfoBase; + this.returnContextAndResolveInfo = returnContextAndResolveInfo; + this.isSyncAndSafe = false; + this.allowMultipleOptimizations = false; + this.planDep = this.addDependency($plan); + this.argsDep = this.addDependency($args); + this.contextDep = this.addDependency((0, index_js_1.context)()); + this.variableValuesDep = this.addDependency(this.operationPlan.variableValuesStep); + this.rootValueDep = this.addDependency(this.operationPlan.rootValueStep); + this.isNotRoot = ![ + this.operationPlan.queryType, + this.operationPlan.mutationType, + this.operationPlan.subscriptionType, + ].includes(resolveInfoBase.parentType); + } + toStringMeta() { + return (this.resolver?.displayName || + this.resolver?.name || + this.subscriber?.displayName || + this.subscriber?.name || + null); + } + unbatchedExecute(extra, source, args, context, variableValues, rootValue) { + if (!extra.stream) { + if (this.isNotRoot && source == null) { + return source; + } + const resolveInfo = Object.assign(Object.create(this.resolveInfoBase), { + variableValues, + rootValue, + path: { + typename: this.resolveInfoBase.parentType.name, + key: this.resolveInfoBase.fieldName, + // ENHANCE: add full support for path (requires runtime indexes) + prev: undefined, + }, + }); + const data = this.resolver?.(source, args, context, resolveInfo); + if (this.returnContextAndResolveInfo) { + return dcr(data, context, resolveInfo); + } + else { + return flagErrorIfErrorAsync(data); + } + } + else { + if (this.isNotRoot) { + return Promise.reject(new Error(`Invalid non-root subscribe`)); + } + if (this.subscriber == null) { + return Promise.reject(new Error(`Cannot subscribe to field`)); + } + if (this.returnContextAndResolveInfo) { + return Promise.reject(new Error(`Subscription with returnContextAndResolveInfo is not supported`)); + } + const resolveInfo = Object.assign(Object.create(this.resolveInfoBase), { + // ENHANCE: add support for path + variableValues, + rootValue, + }); + // TODO: we also need to call the resolver on each result? + const data = this.subscriber(source, args, context, resolveInfo); + // TODO: should apply flagErrorIfError to each value data yields + return flagErrorIfErrorAsync(data); + } + } +} +exports.GraphQLResolverStep = GraphQLResolverStep; +/** @internal */ +class GraphQLItemHandler extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "GraphQLItemHandler", + }; } + constructor($parent, nullableType) { + super(); + this.nullableInnerType = null; + this.isSyncAndSafe = false; + this.addDependency($parent); + if (isListType(nullableType)) { + const innerType = nullableType.ofType; + if (isNonNullType(innerType)) { + this.nullableInnerType = innerType.ofType; + } + else { + this.nullableInnerType = innerType; + } + } + else { + if (!isAbstractType(nullableType)) { + throw new Error(`GrafastInternalError<0a293e88-0f38-43f6-9179-f3ef9a720872>: Expected nullableType to be a list or abstract type, instead found ${nullableType}`); + } + this.abstractType = nullableType; + } + } + planForType() { + return this; + } + listItem($item) { + if (!this.nullableInnerType) { + throw new Error(`GrafastInternalError<83f3533a-db8e-4eb9-9251-2a165ae6147b>: did not expect ${this}.listItem() to be called since it wasn't handling a list type`); + } + return graphqlItemHandler($item, this.nullableInnerType); + } + /** + * Akin to graphql-js' completeAbstractValue... but just the typeName + * resolution part. + */ + figureOutTheTypeOf(data, context, resolveInfo) { + const abstractType = this.abstractType; + if (!abstractType) { + throw new Error("GrafastInternalError<5ea0892a-e9f6-479c-9b0b-2b09e46eecb6>: No abstract type? How can this be?"); + } + if (abstractType.resolveType != null) { + return abstractType.resolveType(data, context, resolveInfo, abstractType); + } + else { + return defaultTypeResolver(data, context, resolveInfo, abstractType); + } + } + actuallyWrapData(typeName, data) { + if (typeName !== undefined) { + return (0, polymorphic_js_1.polymorphicWrap)(typeName, data); + } + else { + return new Error("Could not determine type of data"); + } + } + polymorphicWrapData(data, // but not a promise + context, resolveInfo) { + if (data == null) { + return null; + } + const typeName = this.figureOutTheTypeOf(data, context, resolveInfo); + if ((0, utils_js_1.isPromiseLike)(typeName)) { + return typeName.then((name) => this.actuallyWrapData(name, data)); + } + else { + return this.actuallyWrapData(typeName, data); + } + } + wrapListData(data, context, resolveInfo) { + if (data == null) { + return null; + } + if (!Array.isArray(data)) { + console.warn(`${this}: data wasn't an array, so we're returning null`); + return null; + } + return data.map((data) => dcr(data, context, resolveInfo)); + } + execute({ indexMap, values: [values0], }) { + if (this.abstractType !== undefined) { + return indexMap((i) => { + const data = values0.at(i); + if (data == null) { + return data; + } + else if ((0, utils_js_1.isPromiseLike)(data.data)) { + return data.data.then((resolvedData) => this.polymorphicWrapData(resolvedData, data.context, data.resolveInfo)); + } + else { + return this.polymorphicWrapData(data.data, data.context, data.resolveInfo); + } + }); + } + else if (this.nullableInnerType != null) { + return indexMap((i) => { + const d = values0.at(i); + if (d == null) { + return null; + } + else { + const { data, context, resolveInfo } = d; + if ((0, utils_js_1.isPromiseLike)(data)) { + return data.then((data) => this.wrapListData(data, context, resolveInfo)); + } + else { + return this.wrapListData(data, context, resolveInfo); + } + } + }); + } + else { + throw new Error(`GrafastInternalError<6a3ed701-6b53-41e6-9a64-fbea57c76ae7>: has to be abstract or list`); + } + } +} +exports.GraphQLItemHandler = GraphQLItemHandler; +function graphqlItemHandler($item, nullableType) { + return new GraphQLItemHandler($item, nullableType); +} +/** + * Emulates what GraphQL does when calling a resolver, including handling of + * polymorphism. + * + * @internal + */ +function graphqlResolver(resolver, subscriber, $step, $args, resolveInfoBase) { + const { returnType } = resolveInfoBase; + const namedType = getNamedType(returnType); + const isAbstract = isAbstractType(namedType); + const $resolverResult = new GraphQLResolverStep(resolver, subscriber, $step, $args, resolveInfoBase, isAbstract); + if (isAbstract) { + if (subscriber != null) { + throw new index_js_1.SafeError(`GraphQL subscribe function emulation currently doesn't support polymorphism`); + } + const nullableType = getNullableType(returnType); + return graphqlItemHandler($resolverResult, nullableType); + } + else { + return $resolverResult; + } +} +function flagErrorIfError(data) { + return data instanceof Error ? (0, index_js_1.flagError)(data) : data; +} +function flagErrorIfErrorAsync(data) { + if ((0, utils_js_1.isPromiseLike)(data)) { + return data.then(flagErrorIfError); + } + else { + return flagErrorIfError(data); + } +} +//# sourceMappingURL=graphqlResolver.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/graphqlResolver.js.map b/grafast/grafast/dist/steps/graphqlResolver.js.map new file mode 100644 index 0000000000..a1f5cb96d4 --- /dev/null +++ b/grafast/grafast/dist/steps/graphqlResolver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"graphqlResolver.js","sourceRoot":"","sources":["../../src/steps/graphqlResolver.ts"],"names":[],"mappings":";;;AAiWA,gDAKC;AAQD,0CA6BC;;AApYD,yDAAmC;AACnC,qCAAqC;AAIrC,0CAA4D;AAK5D,sDAAoD;AAEpD,wCAAiD;AACjD,0CAA4C;AAE5C,MAAM,EACJ,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,UAAU,EACV,aAAa,GACd,GAAG,OAAO,CAAC;AAaZ,SAAS,GAAG,CACV,IAAa,EAAE,oBAAoB;AACnC,OAAgB,EAChB,WAA+B;IAO/B,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,IAAI,IAAI,YAAY,KAAK,EAAE,CAAC;QACjC,OAAO,IAAA,oBAAS,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;SAAM,IAAI,IAAA,wBAAa,EAAC,IAAI,C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AAK,EACL,eAAe,EACf,UAAU,CACX,CAAC;IACF,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,oBAAS,CACjB,6EAA6E,CAC9E,CAAC;QACJ,CAAC;QACD,MAAM,YAAY,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;QACjD,OAAO,kBAAkB,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAC3D,CAAC;SAAM,CAAC;QACN,OAAO,eAAe,CAAC;IACzB,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,IAAI,YAAY,KAAK,CAAC,CAAC,CAAC,IAAA,oBAAS,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAS;IACtC,IAAI,IAAA,wBAAa,EAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/groupBy.d.ts b/grafast/grafast/dist/steps/groupBy.d.ts new file mode 100644 index 0000000000..004aed5fc6 --- /dev/null +++ b/grafast/grafast/dist/steps/groupBy.d.ts @@ -0,0 +1,12 @@ +import type { Step } from "../step.js"; +import type { ConnectionCapableStep, ItemsStep } from "./connection.js"; +import type { __ListTransformStep, ListTransformItemPlanCallback } from "./listTransform.js"; +export type GroupByPlanMemo = Map; +/** + * Takes a single dimensional list plan and a mapper that returns a grouping + * key. Returns a plan that results in a Map where the keys are the grouping + * keys and the values are lists of the original entries that match these + * grouping keys. + */ +export declare function groupBy | ConnectionCapableStep, TItemStep extends Step>(listStep: TListStep, mapper: ListTransformItemPlanCallback, TItemStep>): __ListTransformStep; +//# sourceMappingURL=groupBy.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/groupBy.d.ts.map b/grafast/grafast/dist/steps/groupBy.d.ts.map new file mode 100644 index 0000000000..2bb129e4d6 --- /dev/null +++ b/grafast/grafast/dist/steps/groupBy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"groupBy.d.ts","sourceRoot":"","sources":["../../src/steps/groupBy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAE9B,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;AAkBtD;;;;;GAKG;AACH,wBAAgB,OAAO,CACrB,SAAS,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EACxE,SAAS,SAAS,IAAI,CAAC,MAAM,CAAC,EAE9B,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAE,6BAA6B,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,GACrE,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,CAAC,CAiBjE"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/groupBy.js b/grafast/grafast/dist/steps/groupBy.js new file mode 100644 index 0000000000..32a6f99cc3 --- /dev/null +++ b/grafast/grafast/dist/steps/groupBy.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.groupBy = groupBy; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const step_js_1 = require("../step.js"); +const each_js_1 = require("./each.js"); +const listTransform_js_1 = require("./listTransform.js"); +const reduceCallback = (memo, entireItemValue, idx) => { + let list = memo.get(idx); + if (!list) { + list = []; + memo.set(idx, list); + } + list.push(entireItemValue); + return memo; +}; +const initialState = () => new Map(); +/** + * Takes a single dimensional list plan and a mapper that returns a grouping + * key. Returns a plan that results in a Map where the keys are the grouping + * keys and the values are lists of the original entries that match these + * grouping keys. + */ +function groupBy(listStep, mapper) { + return (0, listTransform_js_1.listTransform)({ + listStep, + itemPlanCallback: mapper, + initialState, + reduceCallback: reduceCallback, + listItem: (0, step_js_1.isListCapableStep)(listStep) + ? (itemPlan) => { + return (0, each_js_1.each)(itemPlan, ($item) => listStep.listItem($item)); + } + : undefined, + meta: `groupBy:${chalk_1.default.yellow(listStep.id)}${mapper.name ? `/${mapper.name}` : ""}`, + }); +} +//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/groupBy.js.map b/grafast/grafast/dist/steps/groupBy.js.map new file mode 100644 index 0000000000..6d504e6707 --- /dev/null +++ b/grafast/grafast/dist/steps/groupBy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../src/steps/groupBy.ts"],"names":[],"mappings":";;AAsCA,0BAuBC;;AA7DD,0DAA0B;AAG1B,wCAA+C;AAG/C,uCAAiC;AAMjC,yDAAmD;AAInD,MAAM,cAAc,GAA8C,CAChE,IAAI,EACJ,eAAe,EACf,GAAG,EACH,EAAE;IACF,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,EAAE,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,GAAoB,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC;AAEtD;;;;;GAKG;AACH,SAAgB,OAAO,CAIrB,QAAmB,EACnB,MAAsE;IAEtE,OAAO,IAAA,gCAAa,EAA6C;QAC/D,QAAQ;QACR,gBAAgB,EAAE,MAAM;QACxB,YAAY;QACZ,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,IAAA,2BAAiB,EAAC,QAAQ,CAAC;YACnC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACX,OAAO,IAAA,cAAI,EAAC,QAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CACrC,QAAQ,CAAC,QAAQ,CAAC,KAAY,CAAC,CAChC,CAAC;YACJ,CAAC;YACH,CAAC,CAAC,SAAS;QACb,IAAI,EAAE,WAAW,eAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GACxC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EACpC,EAAE;KACH,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/index.d.ts b/grafast/grafast/dist/steps/index.d.ts new file mode 100644 index 0000000000..5a870a66f5 --- /dev/null +++ b/grafast/grafast/dist/steps/index.d.ts @@ -0,0 +1,48 @@ +import type { __TrackedValueStep, OperationPlan } from "../index.js"; +import type { __ValueStep } from "./__value.js"; +export declare function operationPlan(): OperationPlan; +export declare function context(): __ValueStep; +export declare function rootValue(): __ValueStep>; +export declare function trackedContext(): __TrackedValueStep; +export declare function trackedRootValue(): __TrackedValueStep>; +/** + * Turns on debug mode, calls the callback, and then turns debug mode back off + * again. + */ +export declare function debugPlans(callback: () => T): T; +export { __FlagStep, assertNotNull, inhibitOnNull, trap, TRAP_ERROR, TRAP_ERROR_OR_INHIBITED, TRAP_INHIBITED, } from "./__flag.js"; +export { access, AccessStep } from "./access.js"; +export { assertEdgeCapableStep, assertPageInfoCapableStep, connection, ConnectionCapableStep, ConnectionStep, EdgeCapableStep, EdgeStep, PageInfoCapableStep, } from "./connection.js"; +export { constant, ConstantStep } from "./constant.js"; +export { each } from "./each.js"; +export { error, ErrorStep } from "./error.js"; +export { filter, FilterPlanMemo } from "./filter.js"; +export { first, FirstStep } from "./first.js"; +export { groupBy, GroupByPlanMemo } from "./groupBy.js"; +export { lambda, LambdaStep } from "./lambda.js"; +export { last, LastStep } from "./last.js"; +export { list, ListStep } from "./list.js"; +export { listen, ListenStep } from "./listen.js"; +export { __ListTransformStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, } from "./listTransform.js"; +export { makeDecodeNodeId, makeDecodeNodeIdRuntime, node, nodeIdFromNode, NodeStep, specFromNodeId, } from "./node.js"; +export { object, ObjectPlanMeta, ObjectStep } from "./object.js"; +export { partitionByIndex } from "./partitionByIndex.js"; +export { ActualKeyByDesiredKey, remapKeys, RemapKeysStep, } from "./remapKeys.js"; +export { reverse, reverseArray, ReverseStep } from "./reverse.js"; +export { createObjectAndApplyChildren, Setter, setter, SetterCapable, } from "./setter.js"; +export { sideEffect, SideEffectStep } from "./sideEffect.js"; +export { __InputListStep } from "./__inputList.js"; +export { __InputObjectStep, __InputObjectStepWithDollars, } from "./__inputObject.js"; +export { __InputStaticLeafStep } from "./__inputStaticLeaf.js"; +export { __ItemStep } from "./__item.js"; +export { __TrackedValueStep, __TrackedValueStepWithDollars, } from "./__trackedValue.js"; +export { __ValueStep } from "./__value.js"; +export { applyInput, ApplyInputStep, assertModifier, isModifier, Modifier, } from "./applyInput.js"; +export { applyTransforms, ApplyTransformsStep } from "./applyTransforms.js"; +export { bakedInput, bakedInputRuntime, BakedInputStep } from "./bakedInput.js"; +export { condition, ConditionStep } from "./condition.js"; +export { GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, } from "./graphqlResolver.js"; +export { LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, } from "./load.js"; +export { polymorphicBranch, PolymorphicBranchMatcher, PolymorphicBranchMatchers, PolymorphicBranchStep, } from "./polymorphicBranch.js"; +export { proxy, ProxyStep } from "./proxy.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/index.d.ts.map b/grafast/grafast/dist/steps/index.d.ts.map new file mode 100644 index 0000000000..7f54bfc300 --- /dev/null +++ b/grafast/grafast/dist/steps/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,aAAa,IAAI,aAAa,CAE7C;AAED,wBAAgB,OAAO,CACrB,QAAQ,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,KAC/C,WAAW,CAAC,QAAQ,CAAC,CAEzB;AAED,wBAAgB,SAAS,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAE5D;AAED,wBAAgB,cAAc,CAC5B,QAAQ,SAAS,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,KAC/C,kBAAkB,CAAC,QAAQ,CAAC,CAEhC;AAED,wBAAgB,gBAAgB,IAAI,kBAAkB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAE1E;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAMlD;AAED,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,IAAI,EACJ,UAAU,EACV,uBAAuB,EACvB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,yBAA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,MAAM,EACN,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,eAAe,EACf,WAAW,EACX,QAAQ,GACT,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/index.js b/grafast/grafast/dist/steps/index.js new file mode 100644 index 0000000000..d36582673e --- /dev/null +++ b/grafast/grafast/dist/steps/index.js @@ -0,0 +1,159 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.setter = exports.Setter = exports.createObjectAndApplyChildren = exports.ReverseStep = exports.reverseArray = exports.reverse = exports.RemapKeysStep = exports.remapKeys = exports.partitionByIndex = exports.ObjectStep = exports.object = exports.specFromNodeId = exports.NodeStep = exports.nodeIdFromNode = exports.node = exports.makeDecodeNodeIdRuntime = exports.makeDecodeNodeId = exports.listTransform = exports.__ListTransformStep = exports.ListenStep = exports.listen = exports.ListStep = exports.list = exports.LastStep = exports.last = exports.LambdaStep = exports.lambda = exports.groupBy = exports.FirstStep = exports.first = exports.filter = exports.ErrorStep = exports.error = exports.each = exports.ConstantStep = exports.constant = exports.EdgeStep = exports.ConnectionStep = exports.connection = exports.assertPageInfoCapableStep = exports.assertEdgeCapableStep = exports.AccessStep = exports.access = exports.TRAP_INHIBITED = exports.TRAP_ERROR_OR_INHIBITED = exports.TRAP_ERROR = exports.trap = exports.inhibitOnNull = exports.assertNotNull = exports.__FlagStep = void 0; +exports.ProxyStep = exports.proxy = exports.PolymorphicBranchStep = exports.polymorphicBranch = exports.LoadStep = exports.loadOneCallback = exports.loadOne = exports.loadManyCallback = exports.loadMany = exports.LoadedRecordStep = exports.GraphQLResolverStep = exports.graphqlResolver = exports.graphqlItemHandler = exports.GraphQLItemHandler = exports.ConditionStep = exports.condition = exports.BakedInputStep = exports.bakedInputRuntime = exports.bakedInput = exports.ApplyTransformsStep = exports.applyTransforms = exports.Modifier = exports.isModifier = exports.assertModifier = exports.ApplyInputStep = exports.applyInput = exports.__ValueStep = exports.__TrackedValueStep = exports.__ItemStep = exports.__InputStaticLeafStep = exports.__InputObjectStep = exports.__InputListStep = exports.SideEffectStep = exports.sideEffect = void 0; +exports.operationPlan = operationPlan; +exports.context = context; +exports.rootValue = rootValue; +exports.trackedContext = trackedContext; +exports.trackedRootValue = trackedRootValue; +exports.debugPlans = debugPlans; +const withGlobalLayerPlan_js_1 = require("../engine/lib/withGlobalLayerPlan.js"); +const global_js_1 = require("../global.js"); +function operationPlan() { + return (0, withGlobalLayerPlan_js_1.currentLayerPlan)().operationPlan; +} +function context() { + return operationPlan().contextStep; +} +function rootValue() { + return operationPlan().rootValueStep; +} +function trackedContext() { + return operationPlan().trackedContextStep; +} +function trackedRootValue() { + return operationPlan().trackedRootValueStep; +} +/** + * Turns on debug mode, calls the callback, and then turns debug mode back off + * again. + */ +function debugPlans(callback) { + const oldDebug = (0, global_js_1.getDebug)(); + (0, global_js_1.setDebug)(true); + const result = callback(); + (0, global_js_1.setDebug)(oldDebug); + return result; +} +var __flag_js_1 = require("./__flag.js"); +Object.defineProperty(exports, "__FlagStep", { enumerable: true, get: function () { return __flag_js_1.__FlagStep; } }); +Object.defineProperty(exports, "assertNotNull", { enumerable: true, get: function () { return __flag_js_1.assertNotNull; } }); +Object.defineProperty(exports, "inhibitOnNull", { enumerable: true, get: function () { return __flag_js_1.inhibitOnNull; } }); +Object.defineProperty(exports, "trap", { enumerable: true, get: function () { return __flag_js_1.trap; } }); +Object.defineProperty(exports, "TRAP_ERROR", { enumerable: true, get: function () { return __flag_js_1.TRAP_ERROR; } }); +Object.defineProperty(exports, "TRAP_ERROR_OR_INHIBITED", { enumerable: true, get: function () { return __flag_js_1.TRAP_ERROR_OR_INHIBITED; } }); +Object.defineProperty(exports, "TRAP_INHIBITED", { enumerable: true, get: function () { return __flag_js_1.TRAP_INHIBITED; } }); +var access_js_1 = require("./access.js"); +Object.defineProperty(exports, "access", { enumerable: true, get: function () { return access_js_1.access; } }); +Object.defineProperty(exports, "AccessStep", { enumerable: true, get: function () { return access_js_1.AccessStep; } }); +var connection_js_1 = require("./connection.js"); +Object.defineProperty(exports, "assertEdgeCapableStep", { enumerable: true, get: function () { return connection_js_1.assertEdgeCapableStep; } }); +Object.defineProperty(exports, "assertPageInfoCapableStep", { enumerable: true, get: function () { return connection_js_1.assertPageInfoCapableStep; } }); +Object.defineProperty(exports, "connection", { enumerable: true, get: function () { return connection_js_1.connection; } }); +Object.defineProperty(exports, "ConnectionStep", { enumerable: true, get: function () { return connection_js_1.ConnectionStep; } }); +Object.defineProperty(exports, "EdgeStep", { enumerable: true, get: function () { return connection_js_1.EdgeStep; } }); +var constant_js_1 = require("./constant.js"); +Object.defineProperty(exports, "constant", { enumerable: true, get: function () { return constant_js_1.constant; } }); +Object.defineProperty(exports, "ConstantStep", { enumerable: true, get: function () { return constant_js_1.ConstantStep; } }); +var each_js_1 = require("./each.js"); +Object.defineProperty(exports, "each", { enumerable: true, get: function () { return each_js_1.each; } }); +var error_js_1 = require("./error.js"); +Object.defineProperty(exports, "error", { enumerable: true, get: function () { return error_js_1.error; } }); +Object.defineProperty(exports, "ErrorStep", { enumerable: true, get: function () { return error_js_1.ErrorStep; } }); +var filter_js_1 = require("./filter.js"); +Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return filter_js_1.filter; } }); +var first_js_1 = require("./first.js"); +Object.defineProperty(exports, "first", { enumerable: true, get: function () { return first_js_1.first; } }); +Object.defineProperty(exports, "FirstStep", { enumerable: true, get: function () { return first_js_1.FirstStep; } }); +var groupBy_js_1 = require("./groupBy.js"); +Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_js_1.groupBy; } }); +var lambda_js_1 = require("./lambda.js"); +Object.defineProperty(exports, "lambda", { enumerable: true, get: function () { return lambda_js_1.lambda; } }); +Object.defineProperty(exports, "LambdaStep", { enumerable: true, get: function () { return lambda_js_1.LambdaStep; } }); +var last_js_1 = require("./last.js"); +Object.defineProperty(exports, "last", { enumerable: true, get: function () { return last_js_1.last; } }); +Object.defineProperty(exports, "LastStep", { enumerable: true, get: function () { return last_js_1.LastStep; } }); +var list_js_1 = require("./list.js"); +Object.defineProperty(exports, "list", { enumerable: true, get: function () { return list_js_1.list; } }); +Object.defineProperty(exports, "ListStep", { enumerable: true, get: function () { return list_js_1.ListStep; } }); +var listen_js_1 = require("./listen.js"); +Object.defineProperty(exports, "listen", { enumerable: true, get: function () { return listen_js_1.listen; } }); +Object.defineProperty(exports, "ListenStep", { enumerable: true, get: function () { return listen_js_1.ListenStep; } }); +var listTransform_js_1 = require("./listTransform.js"); +Object.defineProperty(exports, "__ListTransformStep", { enumerable: true, get: function () { return listTransform_js_1.__ListTransformStep; } }); +Object.defineProperty(exports, "listTransform", { enumerable: true, get: function () { return listTransform_js_1.listTransform; } }); +var node_js_1 = require("./node.js"); +Object.defineProperty(exports, "makeDecodeNodeId", { enumerable: true, get: function () { return node_js_1.makeDecodeNodeId; } }); +Object.defineProperty(exports, "makeDecodeNodeIdRuntime", { enumerable: true, get: function () { return node_js_1.makeDecodeNodeIdRuntime; } }); +Object.defineProperty(exports, "node", { enumerable: true, get: function () { return node_js_1.node; } }); +Object.defineProperty(exports, "nodeIdFromNode", { enumerable: true, get: function () { return node_js_1.nodeIdFromNode; } }); +Object.defineProperty(exports, "NodeStep", { enumerable: true, get: function () { return node_js_1.NodeStep; } }); +Object.defineProperty(exports, "specFromNodeId", { enumerable: true, get: function () { return node_js_1.specFromNodeId; } }); +var object_js_1 = require("./object.js"); +Object.defineProperty(exports, "object", { enumerable: true, get: function () { return object_js_1.object; } }); +Object.defineProperty(exports, "ObjectStep", { enumerable: true, get: function () { return object_js_1.ObjectStep; } }); +var partitionByIndex_js_1 = require("./partitionByIndex.js"); +Object.defineProperty(exports, "partitionByIndex", { enumerable: true, get: function () { return partitionByIndex_js_1.partitionByIndex; } }); +var remapKeys_js_1 = require("./remapKeys.js"); +Object.defineProperty(exports, "remapKeys", { enumerable: true, get: function () { return remapKeys_js_1.remapKeys; } }); +Object.defineProperty(exports, "RemapKeysStep", { enumerable: true, get: function () { return remapKeys_js_1.RemapKeysStep; } }); +var reverse_js_1 = require("./reverse.js"); +Object.defineProperty(exports, "reverse", { enumerable: true, get: function () { return reverse_js_1.reverse; } }); +Object.defineProperty(exports, "reverseArray", { enumerable: true, get: function () { return reverse_js_1.reverseArray; } }); +Object.defineProperty(exports, "ReverseStep", { enumerable: true, get: function () { return reverse_js_1.ReverseStep; } }); +var setter_js_1 = require("./setter.js"); +Object.defineProperty(exports, "createObjectAndApplyChildren", { enumerable: true, get: function () { return setter_js_1.createObjectAndApplyChildren; } }); +Object.defineProperty(exports, "Setter", { enumerable: true, get: function () { return setter_js_1.Setter; } }); +Object.defineProperty(exports, "setter", { enumerable: true, get: function () { return setter_js_1.setter; } }); +var sideEffect_js_1 = require("./sideEffect.js"); +Object.defineProperty(exports, "sideEffect", { enumerable: true, get: function () { return sideEffect_js_1.sideEffect; } }); +Object.defineProperty(exports, "SideEffectStep", { enumerable: true, get: function () { return sideEffect_js_1.SideEffectStep; } }); +// Internal plans +var __inputList_js_1 = require("./__inputList.js"); +Object.defineProperty(exports, "__InputListStep", { enumerable: true, get: function () { return __inputList_js_1.__InputListStep; } }); +var __inputObject_js_1 = require("./__inputObject.js"); +Object.defineProperty(exports, "__InputObjectStep", { enumerable: true, get: function () { return __inputObject_js_1.__InputObjectStep; } }); +var __inputStaticLeaf_js_1 = require("./__inputStaticLeaf.js"); +Object.defineProperty(exports, "__InputStaticLeafStep", { enumerable: true, get: function () { return __inputStaticLeaf_js_1.__InputStaticLeafStep; } }); +var __item_js_1 = require("./__item.js"); +Object.defineProperty(exports, "__ItemStep", { enumerable: true, get: function () { return __item_js_1.__ItemStep; } }); +var __trackedValue_js_1 = require("./__trackedValue.js"); +Object.defineProperty(exports, "__TrackedValueStep", { enumerable: true, get: function () { return __trackedValue_js_1.__TrackedValueStep; } }); +var __value_js_1 = require("./__value.js"); +Object.defineProperty(exports, "__ValueStep", { enumerable: true, get: function () { return __value_js_1.__ValueStep; } }); +var applyInput_js_1 = require("./applyInput.js"); +Object.defineProperty(exports, "applyInput", { enumerable: true, get: function () { return applyInput_js_1.applyInput; } }); +Object.defineProperty(exports, "ApplyInputStep", { enumerable: true, get: function () { return applyInput_js_1.ApplyInputStep; } }); +Object.defineProperty(exports, "assertModifier", { enumerable: true, get: function () { return applyInput_js_1.assertModifier; } }); +Object.defineProperty(exports, "isModifier", { enumerable: true, get: function () { return applyInput_js_1.isModifier; } }); +Object.defineProperty(exports, "Modifier", { enumerable: true, get: function () { return applyInput_js_1.Modifier; } }); +var applyTransforms_js_1 = require("./applyTransforms.js"); +Object.defineProperty(exports, "applyTransforms", { enumerable: true, get: function () { return applyTransforms_js_1.applyTransforms; } }); +Object.defineProperty(exports, "ApplyTransformsStep", { enumerable: true, get: function () { return applyTransforms_js_1.ApplyTransformsStep; } }); +var bakedInput_js_1 = require("./bakedInput.js"); +Object.defineProperty(exports, "bakedInput", { enumerable: true, get: function () { return bakedInput_js_1.bakedInput; } }); +Object.defineProperty(exports, "bakedInputRuntime", { enumerable: true, get: function () { return bakedInput_js_1.bakedInputRuntime; } }); +Object.defineProperty(exports, "BakedInputStep", { enumerable: true, get: function () { return bakedInput_js_1.BakedInputStep; } }); +var condition_js_1 = require("./condition.js"); +Object.defineProperty(exports, "condition", { enumerable: true, get: function () { return condition_js_1.condition; } }); +Object.defineProperty(exports, "ConditionStep", { enumerable: true, get: function () { return condition_js_1.ConditionStep; } }); +var graphqlResolver_js_1 = require("./graphqlResolver.js"); +Object.defineProperty(exports, "GraphQLItemHandler", { enumerable: true, get: function () { return graphqlResolver_js_1.GraphQLItemHandler; } }); +Object.defineProperty(exports, "graphqlItemHandler", { enumerable: true, get: function () { return graphqlResolver_js_1.graphqlItemHandler; } }); +Object.defineProperty(exports, "graphqlResolver", { enumerable: true, get: function () { return graphqlResolver_js_1.graphqlResolver; } }); +Object.defineProperty(exports, "GraphQLResolverStep", { enumerable: true, get: function () { return graphqlResolver_js_1.GraphQLResolverStep; } }); +var load_js_1 = require("./load.js"); +Object.defineProperty(exports, "LoadedRecordStep", { enumerable: true, get: function () { return load_js_1.LoadedRecordStep; } }); +Object.defineProperty(exports, "loadMany", { enumerable: true, get: function () { return load_js_1.loadMany; } }); +Object.defineProperty(exports, "loadManyCallback", { enumerable: true, get: function () { return load_js_1.loadManyCallback; } }); +Object.defineProperty(exports, "loadOne", { enumerable: true, get: function () { return load_js_1.loadOne; } }); +Object.defineProperty(exports, "loadOneCallback", { enumerable: true, get: function () { return load_js_1.loadOneCallback; } }); +Object.defineProperty(exports, "LoadStep", { enumerable: true, get: function () { return load_js_1.LoadStep; } }); +var polymorphicBranch_js_1 = require("./polymorphicBranch.js"); +Object.defineProperty(exports, "polymorphicBranch", { enumerable: true, get: function () { return polymorphicBranch_js_1.polymorphicBranch; } }); +Object.defineProperty(exports, "PolymorphicBranchStep", { enumerable: true, get: function () { return polymorphicBranch_js_1.PolymorphicBranchStep; } }); +var proxy_js_1 = require("./proxy.js"); +Object.defineProperty(exports, "proxy", { enumerable: true, get: function () { return proxy_js_1.proxy; } }); +Object.defineProperty(exports, "ProxyStep", { enumerable: true, get: function () { return proxy_js_1.ProxyStep; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/index.js.map b/grafast/grafast/dist/steps/index.js.map new file mode 100644 index 0000000000..e9e5464711 --- /dev/null +++ b/grafast/grafast/dist/steps/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":";;;;AAKA,sCAEC;AAED,0BAIC;AAED,8BAEC;AAED,wCAIC;AAED,4CAEC;AAMD,gCAMC;AAvCD,iFAAwE;AACxE,4CAAkD;AAIlD,SAAgB,aAAa;IAC3B,OAAO,IAAA,yCAAgB,GAAE,CAAC,aAAa,CAAC;AAC1C,CAAC;AAED,SAAgB,OAAO;IAGrB,OAAO,aAAa,EAAE,CAAC,WAA+B,CAAC;AACzD,CAAC;AAED,SAAgB,SAAS;IACvB,OAAO,aAAa,EAAE,CAAC,aAAiC,CAAC;AAC3D,CAAC;AAED,SAAgB,cAAc;IAG5B,OAAO,aAAa,EAAE,CAAC,kBAA6C,CAAC;AACvE,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,aAAa,EAAE,CAAC,oBAA+C,CAAC;AACzE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AA,iBAAiB,OAAA;AAAE,+GAAA,cAAc,OAAA;AACtD,+CAA0D;AAAjD,yGAAA,SAAS,OAAA;AAAE,6GAAA,aAAa,OAAA;AACjC,2DAK8B;AAJ5B,wHAAA,kBAAkB,OAAA;AAClB,wHAAA,kBAAkB,OAAA;AAClB,qHAAA,eAAe,OAAA;AACf,yHAAA,mBAAmB,OAAA;AAErB,qCAUmB;AATjB,2GAAA,gBAAgB,OAAA;AAChB,mGAAA,QAAQ,OAAA;AAER,2GAAA,gBAAgB,OAAA;AAChB,kGAAA,OAAO,OAAA;AAEP,0GAAA,eAAe,OAAA;AAEf,mGAAA,QAAQ,OAAA;AAEV,+DAKgC;AAJ9B,yHAAA,iBAAiB,OAAA;AAGjB,6HAAA,qBAAqB,OAAA;AAEvB,uCAA8C;AAArC,iGAAA,KAAK,OAAA;AAAE,qGAAA,SAAS,OAAA"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/lambda.d.ts b/grafast/grafast/dist/steps/lambda.d.ts new file mode 100644 index 0000000000..8a24f0e1cf --- /dev/null +++ b/grafast/grafast/dist/steps/lambda.d.ts @@ -0,0 +1,29 @@ +import type { PromiseOrDirect, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Multistep, UnwrapMultistep } from "../multistep.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Calls the given lambda function for each tuple + */ +export declare class LambdaStep extends UnbatchedStep { + private fn; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + private depId; + constructor($plan: Step | null | undefined, fn: (value: TIn) => PromiseOrDirect); + toStringMeta(): any; + deduplicate(peers: LambdaStep[]): LambdaStep[]; + unbatchedExecute(_extra: UnbatchedExecutionExtra, value: TIn): PromiseOrDirect; +} +/** + * A plan that takes the input `$plan` and feeds each value through the `fn` + * callback. Note: if you need to pass more than one value, pass a `ListStep` + * as the `$plan` argument. + */ +declare function lambda(spec: TInMultistep, fn: (value: UnwrapMultistep) => PromiseOrDirect, isSyncAndSafe?: boolean): LambdaStep, TOut>; +export { lambda }; +//# sourceMappingURL=lambda.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/lambda.d.ts.map b/grafast/grafast/dist/steps/lambda.d.ts.map new file mode 100644 index 0000000000..a5191732d8 --- /dev/null +++ b/grafast/grafast/dist/steps/lambda.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../src/steps/lambda.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C;;GAEG;AACH,qBAAa,UAAU,CAAC,GAAG,EAAE,IAAI,CAAE,SAAQ,aAAa,CAAC,IAAI,CAAC;IAY1D,OAAO,CAAC,EAAE;IAXZ,MAAM,CAAC,QAAQ;;;MAGb;IAEF,aAAa,UAAS;IACtB,0BAA0B,UAAQ;IAElC,OAAO,CAAC,KAAK,CAAgB;gBAE3B,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EAC3B,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,eAAe,CAAC,IAAI,CAAC;IAgBnD,YAAY;IAIZ,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;IAInE,gBAAgB,CACd,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE,GAAG,GACT,eAAe,CAAC,IAAI,CAAC;CAGzB;AAED;;;;GAIG;AACH,iBAAS,MAAM,CAAC,KAAK,CAAC,YAAY,SAAS,SAAS,EAAE,IAAI,EACxD,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,YAAY,CAAC,KAAK,eAAe,CAAC,IAAI,CAAC,EACnE,aAAa,UAAQ,GACpB,UAAU,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,CAuBjD;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/lambda.js b/grafast/grafast/dist/steps/lambda.js new file mode 100644 index 0000000000..e810bf1b9d --- /dev/null +++ b/grafast/grafast/dist/steps/lambda.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LambdaStep = void 0; +exports.lambda = lambda; +const multistep_js_1 = require("../multistep.js"); +const step_js_1 = require("../step.js"); +const sideEffect_js_1 = require("./sideEffect.js"); +/** + * Calls the given lambda function for each tuple + */ +class LambdaStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "LambdaStep", + }; } + constructor($plan, fn) { + super(); + this.fn = fn; + // Lambda is only sync and safe if the callback is; so default to false + this.isSyncAndSafe = false; + this.allowMultipleOptimizations = true; + this.depId = $plan != null ? this.addDependency($plan) : null; + if (fn.hasSideEffects) { + this.hasSideEffects = true; + } + else if (fn.isSyncAndSafe) { + if (fn.constructor.name === "AsyncFunction") { + throw new Error(`${this}'s callback claims to be syncAndSafe, however it is asynchronous`); + } + this.isSyncAndSafe = true; + } + } + toStringMeta() { + return this.fn.displayName || this.fn.name; + } + deduplicate(peers) { + return peers.filter((peer) => peer.fn === this.fn); + } + unbatchedExecute(_extra, value) { + return this.fn(value); + } +} +exports.LambdaStep = LambdaStep; +/** + * A plan that takes the input `$plan` and feeds each value through the `fn` + * callback. Note: if you need to pass more than one value, pass a `ListStep` + * as the `$plan` argument. + */ +function lambda(spec, fn, isSyncAndSafe = false) { + if (fn.length > 1) { + throw new Error("lambda callback should accept one argument, perhaps you forgot to destructure the arguments?"); + } + const $in = (0, multistep_js_1.multistep)(spec); + const $lambda = new LambdaStep($in, fn); + if (fn.hasSideEffects) { + console.trace(`You passed a function with \`hasSideEffects = true\` to \`lambda()\`, you should use \`sideEffect()\` instead (it has the same signature). We've automatically corrected this, but you should fix it in your code so the types are correct.`); + return (0, sideEffect_js_1.sideEffect)(spec, fn); + } + if (isSyncAndSafe) { + if (fn.constructor.name === "AsyncFunction") { + throw new Error(`lambda call claims to be syncAndSafe, however the callback function is asynchronous`); + } + $lambda.isSyncAndSafe = true; + } + return $lambda; +} +//# sourceMappingURL=lambda.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/lambda.js.map b/grafast/grafast/dist/steps/lambda.js.map new file mode 100644 index 0000000000..1202037da8 --- /dev/null +++ b/grafast/grafast/dist/steps/lambda.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lambda.js","sourceRoot":"","sources":["../../src/steps/lambda.ts"],"names":[],"mappings":";;;AA2FS,wBAAM;AAtFf,kDAA4C;AAE5C,wCAA2C;AAC3C,mDAA6C;AAE7C;;GAEG;AACH,MAAa,UAAsB,SAAQ,uBAAmB;aACrD,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,YAAY;KACzB,AAHc,CAGb;IAMF,YACE,KAAmC,EAC3B,EAAyC;QAEjD,KAAK,EAAE,CAAC;QAFA,OAAE,GAAF,EAAE,CAAuC;QAPnD,uEAAuE;QACvE,kBAAa,GAAG,KAAK,CAAC;QACtB,+BAA0B,GAAG,IAAI,CAAC;QAQhC,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,IAAK,EAAU,CAAC,cAAc,EAAE,CAAC;YAC/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7B,CAAC;aAAM,IAAK,EAAU,CAAC,aAA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b,qFAAqF,CACtF,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAC/B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/last.d.ts b/grafast/grafast/dist/steps/last.d.ts new file mode 100644 index 0000000000..f638c13081 --- /dev/null +++ b/grafast/grafast/dist/steps/last.d.ts @@ -0,0 +1,22 @@ +import type { UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +import type { ConnectionCapableStep } from "./connection.js"; +export declare class LastStep extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + constructor(parentPlan: Step> | ConnectionCapableStep, any>); + unbatchedExecute: (_extra: UnbatchedExecutionExtra, list: ReadonlyArray) => TData; + deduplicate(peers: LastStep[]): LastStep[]; + optimize(): any; +} +/** + * A plan that resolves to the last entry in the list returned by the given + * plan. + */ +export declare function last(plan: Step> | ConnectionCapableStep, any>): LastStep; +//# sourceMappingURL=last.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/last.d.ts.map b/grafast/grafast/dist/steps/last.d.ts.map new file mode 100644 index 0000000000..0ad53ac376 --- /dev/null +++ b/grafast/grafast/dist/steps/last.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../src/steps/last.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAI7D,qBAAa,QAAQ,CAAC,KAAK,CAAE,SAAQ,aAAa,CAAC,KAAK,CAAC;IACvD,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,0BAA0B,UAAQ;gBAGhC,UAAU,EACN,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAC1B,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAM7C,gBAAgB,GACd,QAAQ,uBAAuB,EAC/B,MAAM,aAAa,CAAC,KAAK,CAAC,KACzB,KAAK,CAEN;IAEF,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE;IAIxD,QAAQ;CAQT;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,KAAK,EACxB,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GAAG,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,GACzE,QAAQ,CAAC,KAAK,CAAC,CAOjB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/last.js b/grafast/grafast/dist/steps/last.js new file mode 100644 index 0000000000..c5468e8537 --- /dev/null +++ b/grafast/grafast/dist/steps/last.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LastStep = void 0; +exports.last = last; +const step_js_1 = require("../step.js"); +const connection_js_1 = require("./connection.js"); +const list_js_1 = require("./list.js"); +class LastStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "LastStep", + }; } + constructor(parentPlan) { + super(); + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.unbatchedExecute = (_extra, list) => { + return list?.[list?.length - 1]; + }; + this.addDependency((0, connection_js_1.itemsOrStep)(parentPlan)); + } + deduplicate(peers) { + return peers; + } + optimize() { + const parent = this.getDep(0); + // The last of a list plan is just the last dependency of the list plan. + if (parent instanceof list_js_1.ListStep) { + return parent.last(); + } + return this; + } +} +exports.LastStep = LastStep; +/** + * A plan that resolves to the last entry in the list returned by the given + * plan. + */ +function last(plan) { + return plan.operationPlan.cacheStep(plan, "GrafastInternal:last()", "", () => new LastStep(plan)); +} +//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/last.js.map b/grafast/grafast/dist/steps/last.js.map new file mode 100644 index 0000000000..c50f83ca8e --- /dev/null +++ b/grafast/grafast/dist/steps/last.js.map @@ -0,0 +1 @@ +{"version":3,"file":"last.js","sourceRoot":"","sources":["../../src/steps/last.ts"],"names":[],"mappings":";;;AAiDA,oBASC;AAxDD,wCAA2C;AAE3C,mDAA8C;AAC9C,uCAAqC;AAErC,MAAa,QAAgB,SAAQ,uBAAoB;aAChD,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;KACvB,AAHc,CAGb;IAIF,YACE,UAE2C;QAE3C,KAAK,EAAE,CAAC;QARV,kBAAa,GAAG,IAAI,CAAC;QACrB,+BAA0B,GAAG,IAAI,CAAC;QAWlC,qBAAgB,GAAG,CACjB,MAA+B,EAC/B,IAA0B,EACnB,EAAE;YACT,OAAO,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC;QARA,IAAI,CAAC,aAAa,CAAC,IAAA,2BAAW,EAAC,UAAU,CAAC,CAAC,CAAC;IAC9C,CAAC;IASD,WAAW,CAAC,KAAwB;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ;QACN,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,wEAAwE;QACxE,IAAI,MAAM,YAAY,kBAAQ,EAAE,CAAC;YAC/B,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAnCH,4BAoCC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAClB,IAA0E;IAE1E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CACjC,IAAI,EACJ,wBAAwB,EACxB,EAAE,EACF,GAAG,EAAE,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CACzB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/list.d.ts b/grafast/grafast/dist/steps/list.d.ts new file mode 100644 index 0000000000..d5034a3a38 --- /dev/null +++ b/grafast/grafast/dist/steps/list.d.ts @@ -0,0 +1,40 @@ +import type { ExecutionDetails, StepOptimizeOptions, UnbatchedExecutionExtra, UnwrapPlanTuple } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +import { ConstantStep } from "./constant.js"; +interface ListStepCacheConfig { + identifier?: string; + cacheSize?: number; +} +export declare class ListStep extends UnbatchedStep> { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + optimizeMetaKey: string; + private cacheSize; + private valueCount; + constructor(list: TPlanTuple, cacheConfig?: ListStepCacheConfig); + toStringMeta(): string; + execute({ indexMap, values }: ExecutionDetails): readonly UnwrapPlanTuple[]; + unbatchedExecute(_extra: UnbatchedExecutionExtra, ...values: any[]): UnwrapPlanTuple; + deduplicatedUnbatchedExecute({ meta: inMeta }: UnbatchedExecutionExtra, ...values: any[]): UnwrapPlanTuple; + deduplicate(peers: ListStep[]): ListStep[]; + optimize(opts: StepOptimizeOptions): this | ConstantStep; + finalize(): void; + /** + * Get the original plan at the given index back again. + */ + at(index: TIndex): TPlanTuple[TIndex]; + first(): TPlanTuple[0] | import("./__flag.js").__FlagStep; + last(): TPlanTuple[number] | import("./__flag.js").__FlagStep; +} +/** + * Takes a list of plans and turns it into a single plan that represents the + * list of their values. + */ +export declare function list(list: TPlanTuple, cacheConfig?: ListStepCacheConfig): ListStep; +export {}; +//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/list.d.ts.map b/grafast/grafast/dist/steps/list.d.ts.map new file mode 100644 index 0000000000..fb5aab55ad --- /dev/null +++ b/grafast/grafast/dist/steps/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/steps/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAY,YAAY,EAAE,MAAM,eAAe,CAAC;AAIvD,UAAU,mBAAmB;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,QAAQ,CACnB,KAAK,CAAC,UAAU,SAAS,SAAS,IAAI,EAAE,CACxC,SAAQ,aAAa,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,0BAA0B,UAAQ;IAClC,eAAe,SAAc;IAC7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,UAAU,CAAS;gBAEf,IAAI,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,mBAAmB;IAiB/D,YAAY;IAIZ,OAAO,CACL,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,gBAAgB;IAOxC,gBAAgB,CACd,MAAM,EAAE,uBAAuB,EAC/B,GAAG,MAAM,EAAE,GAAG,EAAE,GACf,eAAe,CAAC,UAAU,CAAC;IAI9B,4BAA4B,CAC1B,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,uBAAuB,EACzC,GAAG,MAAM,EAAE,GAAG,EAAE,GACf,eAAe,CAAC,UAAU,CAAC;IA0B9B,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,EAAE;IAIlE,QAAQ,CAAC,IAAI,EAAE,mBAAmB;IA8BlC,QAAQ;IAOR;;OAEG;IACI,EAAE,CAAC,MAAM,SAAS,MAAM,UAAU,GAAG,MAAM,EAChD,KAAK,EAAE,MAAM,GACZ,UAAU,CAAC,MAAM,CAAC;IAId,KAAK;IAIL,IAAI;CAGZ;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,KAAK,CAAC,UAAU,SAAS,SAAS,IAAI,EAAE,EAC3D,IAAI,EAAE,UAAU,EAChB,WAAW,CAAC,EAAE,mBAAmB,GAChC,QAAQ,CAAC,UAAU,CAAC,CAEtB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/list.js b/grafast/grafast/dist/steps/list.js new file mode 100644 index 0000000000..cded26c47e --- /dev/null +++ b/grafast/grafast/dist/steps/list.js @@ -0,0 +1,118 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ListStep = void 0; +exports.list = list; +const step_js_1 = require("../step.js"); +const constant_js_1 = require("./constant.js"); +const DEFAULT_CACHE_SIZE = 100; +class ListStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ListStep", + }; } + constructor(list, cacheConfig) { + super(); + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.optimizeMetaKey = "ListStep"; + this.valueCount = list.length; + this.cacheSize = + cacheConfig?.cacheSize ?? + (cacheConfig?.identifier ? DEFAULT_CACHE_SIZE : 0); + this.metaKey = + this.cacheSize <= 0 + ? undefined + : cacheConfig?.identifier + ? `list|${list.length}|${cacheConfig.identifier}` + : this.id; + for (let i = 0, l = list.length; i < l; i++) { + this.addDependency({ step: list[i], skipDeduplication: true }); + } + } + toStringMeta() { + return this.dependencies.map(($dep) => $dep.id).join(","); + } + execute({ indexMap, values }) { + return indexMap((i) => values.map((value) => value.at(i))); + } + unbatchedExecute(_extra, ...values //UnwrapPlanTuple, + ) { + return values; + } + deduplicatedUnbatchedExecute({ meta: inMeta }, ...values //UnwrapPlanTuple, + ) { + const meta = inMeta; + if (meta.nextIndex !== undefined) { + outer: for (let i = 0, l = meta.results.length; i < l; i++) { + const cachedValues = meta.results[i]; + for (let j = 0, c = this.valueCount; j < c; j++) { + if (values[j] !== cachedValues[j]) { + continue outer; + } + } + return cachedValues; + } + } + else { + meta.nextIndex = 0; + meta.results = []; + } + meta.results[meta.nextIndex] = values; + // Only cache this.cacheSize results, use a round-robin + const maxIndex = this.cacheSize - 1; + meta.nextIndex = meta.nextIndex === maxIndex ? 0 : meta.nextIndex + 1; + return values; + } + deduplicate(peers) { + return peers; + } + optimize(opts) { + if (this.dependencies.every((dep) => dep instanceof constant_js_1.ConstantStep)) { + const meta = opts.meta; + // Used to validate the lists have the same length + const cardinality = this.dependencies.length; + if (!meta[cardinality]) { + meta[cardinality] = []; + } + const existing = meta[cardinality].find((l) => l.every((v, i) => v === this.dependencies[i].data)); + const isSensitive = this.dependencies.some((d) => d.isSensitive); + if (existing !== undefined) { + return (0, constant_js_1.constant)(existing, isSensitive); + } + else { + // Replace self with constant + const arr = this.dependencies.map((dep) => dep.data); + meta[cardinality].push(arr); + return (0, constant_js_1.constant)(arr, isSensitive); + } + } + return this; + } + finalize() { + if (this.cacheSize > 0) { + this.unbatchedExecute = this.deduplicatedUnbatchedExecute; + } + super.finalize(); + } + /** + * Get the original plan at the given index back again. + */ + at(index) { + return this.getDep(index); + } + first() { + return this.getDep(0); + } + last() { + return this.getDep(this.dependencies.length - 1); + } +} +exports.ListStep = ListStep; +/** + * Takes a list of plans and turns it into a single plan that represents the + * list of their values. + */ +function list(list, cacheConfig) { + return new ListStep(list, cacheConfig); +} +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/list.js.map b/grafast/grafast/dist/steps/list.js.map new file mode 100644 index 0000000000..1b0528ac7e --- /dev/null +++ b/grafast/grafast/dist/steps/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sourceRoot":"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AI,CAAC,YAAY,CAAC,GAAG,CAC/B,CAAC,GAAG,EAAE,EAAE,CAAE,GAAyB,CAAC,IAAI,CACzC,CAAC;gBACF,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC5B,OAAO,IAAA,sBAAQ,EAAC,GAAG,EAAE,WAAW,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,4BAA4B,CAAC;QAC5D,CAAC;QACD,KAAK,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,EAAE,CACP,KAAa;QAEb,OAAO,IAAI,CAAC,MAAM,CAAqB,KAAe,CAAC,CAAC;IAC1D,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,MAAM,CAAgB,CAAC,CAAC,CAAC;IACvC,CAAC;IAEM,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAqB,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvE,CAAC;;AAtIH,4BAuIC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAClB,IAAgB,EAChB,WAAiC;IAEjC,OAAO,IAAI,QAAQ,CAAa,IAAI,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listTransform.d.ts b/grafast/grafast/dist/steps/listTransform.d.ts new file mode 100644 index 0000000000..b013927586 --- /dev/null +++ b/grafast/grafast/dist/steps/listTransform.d.ts @@ -0,0 +1,65 @@ +import type { ConnectionCapableStep, ExecutionDetails } from "../index.js"; +import type { GrafastResultsList } from "../interfaces.js"; +import { $$deepDepSkip } from "../interfaces.js"; +import type { ListCapableStep } from "../step.js"; +import { Step } from "../step.js"; +import { __ItemStep } from "./__item.js"; +import type { ItemsStep } from "./connection.js"; +export type ListTransformReduce = (memo: TMemo, entireItemValue: unknown, itemPlanData: TItemPlanData) => TMemo; +export type ListTransformItemPlanCallback, TDepsStep extends Step> = (listItemPlan: ItemsStep extends ListCapableStep ? ReturnType["listItem"]> : __ItemStep) => TDepsStep; +export interface ListTransformOptions | ConnectionCapableStep, any>, TDepsStep extends Step, TMemo, TItemStep extends Step | undefined = undefined> { + listStep: TListStep; + itemPlanCallback: ListTransformItemPlanCallback, TDepsStep>; + initialState(): TMemo; + reduceCallback: ListTransformReduce ? U : never>; + listItem?(itemPlan: Step): TItemStep; + finalizeCallback?(data: TMemo): TMemo; + meta?: string; + optimize?: (this: __ListTransformStep) => Step; + connectionClone?: ConnectionCapableStep["connectionClone"]; +} +/** + * **Experimental.** + * + * A "special" plan that has custom handling in Grafast. Used for turning lists + * into other things (or maybe more lists!). + * + * It's recommended that you don't use this directly, please use one of the + * functions that uses this under the hood such as `filter()`. + */ +export declare class __ListTransformStep | ConnectionCapableStep = Step | ConnectionCapableStep, TDepsStep extends Step = Step, TMemo = any, TItemStep extends Step | undefined = Step | undefined> extends Step { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private listStepDepId; + private rawListStepDepId; + itemPlanCallback: ListTransformItemPlanCallback, TDepsStep>; + initialState: () => TMemo; + reduceCallback: ListTransformReduce ? U : never>; + finalizeCallback?: (data: TMemo) => TMemo; + listItem?: (itemPlan: __ItemStep) => TItemStep; + private meta; + connectionClone?: ConnectionCapableStep["connectionClone"]; + /** Set during query planning. */ + itemStepId: number; + constructor(options: ListTransformOptions); + toStringMeta(): string | null; + getListStep(): TListStep; + [$$deepDepSkip](): TListStep; + dangerouslyGetListPlan(): TListStep; + deduplicate(peers: __ListTransformStep[]): __ListTransformStep[]; + optimize(): Step; + execute({ indexForEach, indexMap, values, extra, }: ExecutionDetails<[any[] | null | undefined | Error]>): Promise>; +} +/** + * **Experimental.** + * + * A "special" plan that has custom handling in Grafast. Used for turning lists + * into other things (or maybe more lists!). + * + * {@page ~grafast/steps/listTransform.md} + */ +export declare function listTransform | ConnectionCapableStep, TDepsStep extends Step, TMemo, TItemStep extends Step | undefined = undefined>(options: ListTransformOptions): __ListTransformStep; +//# sourceMappingURL=listTransform.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listTransform.d.ts.map b/grafast/grafast/dist/steps/listTransform.d.ts.map new file mode 100644 index 0000000000..aa5db622db --- /dev/null +++ b/grafast/grafast/dist/steps/listTransform.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"listTransform.d.ts","sourceRoot":"","sources":["../../src/steps/listTransform.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAEV,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAqB,IAAI,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,MAAM,MAAM,mBAAmB,CAAC,KAAK,EAAE,aAAa,IAAI,CACtD,IAAI,EAAE,KAAK,EACX,eAAe,EAAE,OAAO,EACxB,YAAY,EAAE,aAAa,KACxB,KAAK,CAAC;AAEX,MAAM,MAAM,6BAA6B,CACvC,SAAS,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EACtC,SAAS,SAAS,IAAI,IACpB,CACF,YAAY,EAAE,SAAS,CAAC,SAAS,CAAC,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,GAChE,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,GAC5C,UAAU,CAA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G,SAAS,GAAG,KAAK,CAAC,CAAC,GAAG,OAAO,CAC/D,kBAAkB,CAAC,KAAK,CAAC,CAC1B;CAyIF;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,SAAS,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EACxE,SAAS,SAAS,IAAI,EACtB,KAAK,EACL,SAAS,SAAS,IAAI,GAAG,SAAS,GAAG,SAAS,EAE9C,OAAO,EAAE,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,GACpE,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CAE7D"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listTransform.js b/grafast/grafast/dist/steps/listTransform.js new file mode 100644 index 0000000000..02b803419f --- /dev/null +++ b/grafast/grafast/dist/steps/listTransform.js @@ -0,0 +1,216 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__ListTransformStep = void 0; +exports.listTransform = listTransform; +const tslib_1 = require("tslib"); +const assert = tslib_1.__importStar(require("../assert.js")); +const dev_js_1 = require("../dev.js"); +const executeBucket_js_1 = require("../engine/executeBucket.js"); +const LayerPlan_js_1 = require("../engine/LayerPlan.js"); +const withGlobalLayerPlan_js_1 = require("../engine/lib/withGlobalLayerPlan.js"); +const interfaces_js_1 = require("../interfaces.js"); +const step_js_1 = require("../step.js"); +const __item_js_1 = require("./__item.js"); +const connection_js_1 = require("./connection.js"); +/** + * **Experimental.** + * + * A "special" plan that has custom handling in Grafast. Used for turning lists + * into other things (or maybe more lists!). + * + * It's recommended that you don't use this directly, please use one of the + * functions that uses this under the hood such as `filter()`. + */ +class __ListTransformStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "__ListTransformStep", + }; } + constructor(options) { + super(); + // OPTIMIZE: if all the steps in the inner bucket are synchronous then theoretically we can be synchronous too + this.isSyncAndSafe = false; + const { listStep: rawListStep, itemPlanCallback, initialState, reduceCallback, finalizeCallback, listItem, meta, optimize, connectionClone, } = options; + const listStep = (0, connection_js_1.itemsOrStep)(rawListStep); + this.listStepDepId = this.addDependency(listStep); + // PERF: This is just so we can populate getListStep() correctly... Ideally we could mark this as a "plan-time-only" dependency. + this.rawListStepDepId = + rawListStep === listStep + ? this.listStepDepId + : this.addDependency(rawListStep); + this.itemPlanCallback = itemPlanCallback; + this.initialState = initialState; + this.reduceCallback = reduceCallback; + this.finalizeCallback = finalizeCallback; + this.listItem = listItem; + this.meta = meta ?? null; + if (optimize !== undefined) { + this.optimize = optimize; + } + this.connectionClone = connectionClone; + // Plan this subroutine + this.subroutineLayer = new LayerPlan_js_1.LayerPlan(this.operationPlan, this.layerPlan, { + type: "subroutine", + parentStep: this, + }); + const itemPlan = (0, withGlobalLayerPlan_js_1.withGlobalLayerPlan)(this.subroutineLayer, listStep.polymorphicPaths, () => { + // This does NOT use `itemPlanFor` because __ListTransformPlans are special. + const $__listItem = new __item_js_1.__ItemStep(listStep); + $__listItem.transformStepId = this.id; + this.itemStepId = $__listItem.id; + const $listItem = (0, step_js_1.isListCapableStep)(listStep) + ? listStep.listItem($__listItem) + : $__listItem; + const $newListItem = this.itemPlanCallback($listItem); + if (this.isSyncAndSafe && + (!$__listItem.isSyncAndSafe || + !$listItem.isSyncAndSafe || + !$newListItem.isSyncAndSafe)) { + this.isSyncAndSafe = false; + } + return $newListItem; + }); + this.subroutineLayer.setRootStep(itemPlan); + this.operationPlan.finishSubroutine(this, this.subroutineLayer); + } + toStringMeta() { + return this.meta; + } + getListStep() { + return this.getDepOptions(this.rawListStepDepId).step; + } + [interfaces_js_1.$$deepDepSkip]() { + return this.getListStep(); + } + dangerouslyGetListPlan() { + return this.dependencies[this.rawListStepDepId]; + } + deduplicate(peers) { + return peers.filter((peer) => peer.itemPlanCallback === this.itemPlanCallback && + peer.initialState === this.initialState && + peer.reduceCallback === this.reduceCallback && + peer.finalizeCallback === this.finalizeCallback && + peer.listItem === this.listItem); + } + // ListTransform plans must _NOT_ optimize away. They must persist (unless + // the options overrides this) + optimize() { + return this; + } + async execute({ indexForEach, indexMap, values, extra, }) { + const bucket = extra._bucket; + const childLayerPlan = this.subroutineLayer; + const { copyStepIds, rootStep } = childLayerPlan; + if (rootStep === null) { + throw new Error(`rootStep of ${childLayerPlan} must not be null.`); + } + const store = new Map(); + const polymorphicPathList = []; + const iterators = []; + const map = new Map(); + let size = 0; + // ENHANCE: do this better! + const itemStep = this.operationPlan.dangerouslyGetStep(this.itemStepId); + const itemStepId = itemStep.id; + if (itemStepId == null) { + throw new Error("GrafastInternalError: listItem layer plan has no rootStepId"); + } + const listStepValue = values[this.listStepDepId]; + if (itemStep._isUnary) { + const list = listStepValue.unaryValue(); + store.set(itemStepId, (0, executeBucket_js_1.unaryExecutionValue)(Array.isArray(list) ? list[0] : list)); + } + else { + store.set(itemStepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + for (const stepId of copyStepIds) { + const ev = bucket.store.get(stepId); + if (!ev) { + throw new Error(`GrafastInternalError<2be5c2c6-a7f8-4002-93a0-6ace5a89a962>: unary step '${stepId}' (${this.operationPlan.dangerouslyGetStep(stepId)}) listed in copyStepIds but not available in parent bucket for ${this}`); + } + if (ev.isBatch) { + // Prepare store with an empty list for each copyPlanId + store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([])); + } + else { + store.set(stepId, ev); + } + } + // We'll typically be creating more listItem bucket entries than we + // have parent buckets, so we must "multiply up" the store entries. + indexForEach((originalIndex) => { + const list = listStepValue.at(originalIndex); + if (Array.isArray(list)) { + const newIndexes = []; + map.set(originalIndex, newIndexes); + for (let j = 0, l = list.length; j < l; j++) { + const newIndex = size++; + newIndexes.push(newIndex); + polymorphicPathList[newIndex] = + bucket.polymorphicPathList[originalIndex]; + // Copying across the iterators because we do NOT call outputBucket, + // so we need to ensure any streams are cleaned up. + iterators[newIndex] = bucket.iterators[originalIndex]; + const ev = store.get(itemStepId); + if (ev.isBatch) { + ev._setResult(newIndex, list[j], 0); + } + for (const planId of copyStepIds) { + const ev = store.get(planId); + if (ev.isBatch) { + const orig = bucket.store.get(planId); + ev._setResult(newIndex, orig.at(originalIndex), orig._flagsAt(originalIndex)); + } + } + } + } + }); + if (size > 0) { + const childBucket = (0, executeBucket_js_1.newBucket)({ + layerPlan: childLayerPlan, + size, + store, + flagUnion: bucket.flagUnion, + polymorphicPathList, + iterators, + }, bucket.metaByMetaKey); + await (0, executeBucket_js_1.executeBucket)(childBucket, extra._requestContext); + } + const depResults = store.get(rootStep.id); + return indexMap((originalIndex) => { + const list = listStepValue.at(originalIndex); + if (list == null) { + return list; + } + const indexes = map.get(originalIndex); + if (!Array.isArray(list) || !Array.isArray(indexes)) { + // ERRORS: should this be an error? + console.warn(`Either list or values was not an array when processing ${this}`); + return null; + } + const values = indexes.map((idx) => depResults.at(idx)); + if (dev_js_1.isDev) { + assert.strictEqual(list.length, values.length, "GrafastInternalError: The list and values length must match for a __ListTransformStep"); + } + const initialState = this.initialState(); + const reduceResult = list.reduce((memo, entireItemValue, listEntryIndex) => this.reduceCallback(memo, entireItemValue, values[listEntryIndex]), initialState); + const finalResult = this.finalizeCallback + ? this.finalizeCallback(reduceResult) + : reduceResult; + return finalResult; + }); + } +} +exports.__ListTransformStep = __ListTransformStep; +/** + * **Experimental.** + * + * A "special" plan that has custom handling in Grafast. Used for turning lists + * into other things (or maybe more lists!). + * + * {@page ~grafast/steps/listTransform.md} + */ +function listTransform(options) { + return new __ListTransformStep(options); +} +//# sourceMappingURL=listTransform.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listTransform.js.map b/grafast/grafast/dist/steps/listTransform.js.map new file mode 100644 index 0000000000..e73cc89d2b --- /dev/null +++ b/grafast/grafast/dist/steps/listTransform.js.map @@ -0,0 +1 @@ +{"version":3,"file":"listTransform.js","sourceRoot":"","sources":["../../src/steps/listTransform.ts"],"names":[],"mappings":";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AAG,CAAC,CAAC,CAAC;YACxD,IAAI,cAAK,EAAE,CAAC;gBACV,MAAM,CAAC,WAAW,CAChB,IAAI,CAAC,MAAM,EACX,MAAM,CAAC,MAAM,EACb,6HAA6H,CAC9H,CAAC;YACJ,CAAC;YACD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YACzC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAC9B,CAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE,CACxC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,EACpE,YAAY,CACb,CAAC;YACF,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB;gBACvC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;gBACrC,CAAC,CAAC,YAAY,CAAC;YACjB,OAAO,WAAW,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;;AAjSH,kDAkSC;AAED;;;;;;;GAOG;AACH,SAAgB,aAAa,CAM3B,OAAqE;IAErE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listen.d.ts b/grafast/grafast/dist/steps/listen.d.ts new file mode 100644 index 0000000000..7166d64b76 --- /dev/null +++ b/grafast/grafast/dist/steps/listen.d.ts @@ -0,0 +1,37 @@ +import type { ExecutionDetails, GrafastResultStreamList, GrafastSubscriber } from "../interfaces.js"; +import { Step } from "../step.js"; +import type { __ItemStep } from "./__item.js"; +/** + * Subscribes to the given `pubsubOrPlan` to get realtime updates on a given + * topic (`topicOrPlan`), mapping the resulting event via the `itemPlan` + * callback. + */ +export declare class ListenStep extends Step { + itemPlan: (itemPlan: __ItemStep) => TPayloadStep; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + /** + * The id for the PostgreSQL context plan. + */ + private pubsubDep; + /** + * The plan that will tell us which topic we're subscribing to. + */ + private topicDep; + constructor(pubsubOrPlan: Step | null> | GrafastSubscriber | null, topicOrPlan: Step | string, itemPlan?: (itemPlan: __ItemStep) => TPayloadStep); + execute({ indexMap, values, stream, }: ExecutionDetails, TTopic]>): GrafastResultStreamList; +} +/** + * Subscribes to the given `pubsubOrPlan` to get realtime updates on a given + * topic (`topicOrPlan`), mapping the resulting event via the `itemPlan` + * callback. + */ +export declare function listen(pubsubOrPlan: Step | null> | GrafastSubscriber | null, topicOrPlan: Step | string, itemPlan?: (itemPlan: __ItemStep) => TPayloadStep): ListenStep; +//# sourceMappingURL=listen.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listen.d.ts.map b/grafast/grafast/dist/steps/listen.d.ts.map new file mode 100644 index 0000000000..d432e6de74 --- /dev/null +++ b/grafast/grafast/dist/steps/listen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"listen.d.ts","sourceRoot":"","sources":["../../src/steps/listen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,IAAI,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;GAIG;AACH,qBAAa,UAAU,CACrB,OAAO,SAAS;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EACxC,MAAM,SAAS,MAAM,OAAO,EAC5B,YAAY,SAAS,IAAI,CACzB,SAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;IAuBtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,YAAY;IAtB1E,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IAErB;;OAEG;IACH,OAAO,CAAC,SAAS,CAAS;IAE1B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAS;gBAGvB,YAAY,EACR,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,GACvC,iBAAiB,CAAC,OAAO,CAAC,GAC1B,IAAI,EACR,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,EAC3B,QAAQ,GAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,YAE3C;IAYnB,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EACN,MAAM,GACP,EAAE,gBAAgB,CACjB,SAAS,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAC9C,GAAG,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CAwB7C;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,OAAO,SAAS;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EACxC,MAAM,SAAS,MAAM,OAAO,EAC5B,YAAY,SAAS,IAAI,EAEzB,YAAY,EACR,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,GACvC,iBAAiB,CAAC,OAAO,CAAC,GAC1B,IAAI,EACR,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,EAClC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,YAAY,GACjE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAM3C"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listen.js b/grafast/grafast/dist/steps/listen.js new file mode 100644 index 0000000000..ff140620a0 --- /dev/null +++ b/grafast/grafast/dist/steps/listen.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ListenStep = void 0; +exports.listen = listen; +const dev_js_1 = require("../dev.js"); +const index_js_1 = require("../index.js"); +const step_js_1 = require("../step.js"); +const constant_js_1 = require("./constant.js"); +/** + * Subscribes to the given `pubsubOrPlan` to get realtime updates on a given + * topic (`topicOrPlan`), mapping the resulting event via the `itemPlan` + * callback. + */ +class ListenStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "ListenStep", + }; } + constructor(pubsubOrPlan, topicOrPlan, itemPlan = ($item) => $item) { + super(); + this.itemPlan = itemPlan; + this.isSyncAndSafe = true; + const $topic = typeof topicOrPlan === "string" ? (0, constant_js_1.constant)(topicOrPlan) : topicOrPlan; + const $pubsub = (0, step_js_1.isExecutableStep)(pubsubOrPlan) + ? pubsubOrPlan + : (0, constant_js_1.constant)(pubsubOrPlan, false); + this.pubsubDep = this.addDependency($pubsub); + this.topicDep = this.addDependency($topic); + } + execute({ indexMap, values, stream, }) { + if (!stream) { + throw new Error("ListenStep must be streamed, never merely executed"); + } + const pubsubValue = values[this.pubsubDep]; + const topicValue = values[this.topicDep]; + return indexMap((i) => { + const pubsub = pubsubValue.at(i); + if (!pubsub) { + throw new index_js_1.SafeError("Subscription not supported", dev_js_1.isDev + ? { + hint: `${this.dependencies[this.pubsubDep]} did not provide a GrafastSubscriber; perhaps you forgot to add the relevant property to context?`, + } + : {}); + } + const topic = topicValue.at(i); + return pubsub.subscribe(topic); + }); + } +} +exports.ListenStep = ListenStep; +/** + * Subscribes to the given `pubsubOrPlan` to get realtime updates on a given + * topic (`topicOrPlan`), mapping the resulting event via the `itemPlan` + * callback. + */ +function listen(pubsubOrPlan, topicOrPlan, itemPlan) { + return new ListenStep(pubsubOrPlan, topicOrPlan, itemPlan); +} +//# sourceMappingURL=listen.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/listen.js.map b/grafast/grafast/dist/steps/listen.js.map new file mode 100644 index 0000000000..f4ec567108 --- /dev/null +++ b/grafast/grafast/dist/steps/listen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"listen.js","sour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CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,oBAAS,CACjB,4BAA4B,EAC5B,cAAK;oBACH,CAAC,CAAC;wBACE,IAAI,EAAE,GACJ,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAClC,mGAAmG;qBACpG;oBACH,CAAC,CAAC,EAAE,CACP,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/B,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;;AAtEH,gCAuEC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAKpB,YAGQ,EACR,WAAkC,EAClC,QAAkE;IAElE,OAAO,IAAI,UAAU,CACnB,YAAY,EACZ,WAAW,EACX,QAAQ,CACT,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/load.d.ts b/grafast/grafast/dist/steps/load.d.ts new file mode 100644 index 0000000000..5f6f354732 --- /dev/null +++ b/grafast/grafast/dist/steps/load.d.ts @@ -0,0 +1,88 @@ +import type { __ItemStep, ExecutionDetails } from "../index.js"; +import type { GrafastResultsList, Maybe, PromiseOrDirect } from "../interfaces.js"; +import type { Multistep, UnwrapMultistep } from "../multistep.js"; +import { Step } from "../step.js"; +export interface LoadOptions, TUnarySpec = never> { + unary: TUnarySpec; + attributes: ReadonlyArray; + params: Partial; +} +type LoadCallback, TParams extends Record, TUnarySpec = never> = { + (specs: ReadonlyArray, options: LoadOptions): PromiseOrDirect>>; + displayName?: string; +}; +export type LoadOneCallback, TUnarySpec = never> = LoadCallback; +export type LoadManyCallback, TUnarySpec = never> = LoadCallback, TParams, TUnarySpec>; +/** + * A TypeScript Identity Function to help you strongly type your + * LoadOneCallback. + */ +export declare function loadOneCallback, TUnarySpec = never>(callback: LoadOneCallback): LoadOneCallback; +/** + * A TypeScript Identity Function to help you strongly type your + * LoadManyCallback. + */ +export declare function loadManyCallback, TUnarySpec = never>(callback: LoadManyCallback): LoadManyCallback; +/** + * You shouldn't create instances of this yourself - use `loadOne` or `loadMany` instead. + */ +export declare class LoadedRecordStep = Record> extends Step { + private isSingle; + private sourceDescription; + private ioEquivalence; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + attributes: Set; + params: Partial; + constructor($data: Step, isSingle: boolean, sourceDescription: string, ioEquivalence: Record); + toStringMeta(): string; + get(attr: keyof TItem & (string | number)): Step; + private _getInner; + setParam(paramKey: TParamKey, value: TParams[TParamKey]): void; + optimize(): Step | import("./__flag.js").__FlagStep>; + execute({ count, values: [values0], }: ExecutionDetails<[TItem]>): GrafastResultsList; +} +export declare class LoadStep, TParams extends Record, const TUnaryMultistep extends Multistep = never> extends Step { + private ioEquivalence; + private load; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + loadOptions: Omit>, "unary"> | null; + loadOptionsKey: string; + attributes: Set; + params: Partial; + unaryDepId: number | null; + constructor(spec: TMultistep, unarySpec: TUnaryMultistep | null, ioEquivalence: IOEquivalence, load: LoadCallback, TItem, TData, TParams, UnwrapMultistep>); + toStringMeta(): string; + private makeAccessMap; + listItem($item: __ItemStep): LoadedRecordStep; + single(): TData extends ReadonlyArray ? never : LoadedRecordStep; + setParam(paramKey: TParamKey, value: TParams[TParamKey]): void; + addAttributes(attributes: Set): void; + finalize(): void; + execute({ count, values: [values0, values1], extra, }: ExecutionDetails<[ + UnwrapMultistep, + UnwrapMultistep + ]>): PromiseOrDirect>>; +} +export declare function loadMany = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, loadCallback: LoadManyCallback, TItem, TParams, UnwrapMultistep>): LoadStep, TItem, ReadonlyArray, TParams, UnwrapMultistep>; +export declare function loadMany = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, ioEquivalence: IOEquivalence, loadCallback: LoadManyCallback, TItem, TParams, UnwrapMultistep>): LoadStep, TItem, ReadonlyArray, TParams, UnwrapMultistep>; +export declare function loadMany = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, unarySpec: TUnaryMultistep | null, loadCallback: LoadManyCallback, TItem, TParams, UnwrapMultistep>): LoadStep, TItem, ReadonlyArray, TParams, UnwrapMultistep>; +export declare function loadMany = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, unarySpec: TUnaryMultistep | null, ioEquivalence: IOEquivalence, loadCallback: LoadManyCallback, TItem, TParams, UnwrapMultistep>): LoadStep, TItem, ReadonlyArray, TParams, UnwrapMultistep>; +type IOEquivalence = null | string | (UnwrapMultistep extends readonly [...(readonly any[])] ? { + [key in Exclude, keyof any[]>]: string | null; +} : UnwrapMultistep extends Record ? { + [key in keyof UnwrapMultistep]?: string | null; +} : never); +export declare function loadOne = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, loadCallback: LoadOneCallback, TItem, TParams, UnwrapMultistep>): LoadedRecordStep; +export declare function loadOne = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, ioEquivalence: IOEquivalence, loadCallback: LoadOneCallback, TItem, TParams, UnwrapMultistep>): LoadedRecordStep; +export declare function loadOne = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, unarySpec: TUnaryMultistep | null, loadCallback: LoadOneCallback, TItem, TParams, UnwrapMultistep>): LoadedRecordStep; +export declare function loadOne = Record, const TUnaryMultistep extends Multistep = never>(spec: TMultistep, unarySpec: TUnaryMultistep | null, ioEquivalence: IOEquivalence, loadCallback: LoadOneCallback, TItem, TParams, UnwrapMultistep>): LoadedRecordStep; +export {}; +//# sourceMappingURL=load.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/load.d.ts.map b/grafast/grafast/dist/steps/load.d.ts.map new file mode 100644 index 0000000000..152aa128ac --- /dev/null +++ b/grafast/grafast/dist/steps/load.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load.d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IAAI,EACjC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,EACxC,YAAY,EAAE,eAAe,CAC3B,eAAe,CAAC,UAAU,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,eAAe,CAAC,eAAe,CAAC,CACjC,GACA,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/load.js b/grafast/grafast/dist/steps/load.js new file mode 100644 index 0000000000..f7fb3457ea --- /dev/null +++ b/grafast/grafast/dist/steps/load.js @@ -0,0 +1,343 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LoadStep = exports.LoadedRecordStep = void 0; +exports.loadOneCallback = loadOneCallback; +exports.loadManyCallback = loadManyCallback; +exports.loadMany = loadMany; +exports.loadOne = loadOne; +const index_js_1 = require("../index.js"); +const multistep_js_1 = require("../multistep.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const access_js_1 = require("./access.js"); +/** + * A TypeScript Identity Function to help you strongly type your + * LoadOneCallback. + */ +function loadOneCallback(callback) { + return callback; +} +/** + * A TypeScript Identity Function to help you strongly type your + * LoadManyCallback. + */ +function loadManyCallback(callback) { + return callback; +} +const idByLoad = new WeakMap(); +let loadCounter = 0; +/** + * You shouldn't create instances of this yourself - use `loadOne` or `loadMany` instead. + */ +class LoadedRecordStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "LoadedRecordStep", + }; } + constructor($data, isSingle, sourceDescription, + // Only safe to reference this during planning phase + ioEquivalence) { + super(); + this.isSingle = isSingle; + this.sourceDescription = sourceDescription; + this.ioEquivalence = ioEquivalence; + this.isSyncAndSafe = true; + this.attributes = new Set(); + this.params = Object.create(null); + this.addDependency($data); + } + toStringMeta() { + return this.sourceDescription ?? null; + } + get(attr) { + return this.cacheStep("get", attr, () => this._getInner(attr)); + } + _getInner(attr) { + // Allow auto-collapsing of the waterfall by knowing keys are equivalent + if (this.operationPlan.phase === "plan" && + this.ioEquivalence[attr]) { + return this.ioEquivalence[attr]; + } + this.attributes.add(attr); + return (0, access_js_1.access)(this, attr); + } + setParam(paramKey, value) { + if (!this.isSingle) { + throw new Error("setParam should not be called on list items - call it on the collection (`loadMany()` step)"); + } + this.params[paramKey] = value; + } + optimize() { + const $source = this.getDepDeep(0); + if ($source instanceof LoadStep) { + // Tell our parent we only need certain attributes + $source.addAttributes(this.attributes); + for (const [key, value] of Object.entries(this.params)) { + $source.setParam(key, value); + } + } + else { + // This should never happen + console.warn(`LoadedRecordStep could not find the parent LoadStep; instead found ${$source}`); + } + // Record has no run-time behaviour (it's just a plan-time helper), so we + // can replace ourself with our dependency: + return this.getDep(0); + } + // This'll never be called, due to `optimize` above. + execute({ count, values: [values0], }) { + return values0.isBatch + ? values0.entries + : (0, utils_js_1.arrayOfLength)(count, values0.value); + } +} +exports.LoadedRecordStep = LoadedRecordStep; +class LoadStep extends step_js_1.Step { + /* implements ListCapableStep> */ + static { this.$$export = { moduleName: "grafast", exportName: "LoadStep" }; } + constructor(spec, unarySpec, ioEquivalence, load) { + super(); + this.ioEquivalence = ioEquivalence; + this.load = load; + this.isSyncAndSafe = false; + this.loadOptions = null; + this.loadOptionsKey = ""; + this.attributes = new Set(); + this.params = Object.create(null); + this.unaryDepId = null; + const $spec = (0, multistep_js_1.multistep)(spec, "load"); + this.addDependency($spec); + const $unarySpec = unarySpec == null ? null : (0, multistep_js_1.multistep)(unarySpec, "loadUnary"); + if ($unarySpec) { + this.unaryDepId = this.addUnaryDependency($unarySpec); + } + } + toStringMeta() { + return this.load.displayName || this.load.name; + } + makeAccessMap() { + const map = Object.create(null); + const $spec = this.getDep(0); + if (this.ioEquivalence == null) { + return map; + } + else if (typeof this.ioEquivalence === "string") { + map[this.ioEquivalence] = $spec; + return map; + } + else if ((0, utils_js_1.isTuple)(this.ioEquivalence)) { + for (let i = 0, l = this.ioEquivalence.length; i < l; i++) { + const key = this.ioEquivalence[i]; + map[key] = (0, step_js_1.isListLikeStep)($spec) ? $spec.at(i) : (0, access_js_1.access)($spec, [i]); + } + return map; + } + else if (typeof this.ioEquivalence === "object") { + for (const key of Object.keys(this.ioEquivalence)) { + const attr = this.ioEquivalence[key]; + if (attr != null) { + map[attr] = (0, step_js_1.isObjectLikeStep)($spec) + ? $spec.get(key) + : (0, access_js_1.access)($spec, [key]); + } + } + return map; + } + else { + throw new Error(`ioEquivalence passed to loadOne() or loadMany() call not understood`); + } + } + listItem($item) { + return new LoadedRecordStep($item, false, this.toStringMeta(), this.makeAccessMap()); + } + single() { + return new LoadedRecordStep(this, true, this.toStringMeta(), this.makeAccessMap()); + } + setParam(paramKey, value) { + this.params[paramKey] = value; + } + addAttributes(attributes) { + for (const attribute of attributes) { + this.attributes.add(attribute); + } + } + finalize() { + // Find all steps of this type that use the same callback and have + // equivalent params and then match their list of attributes together. + const stringifiedParams = (0, utils_js_1.canonicalJSONStringify)(this.params); + const kin = this.operationPlan + .getStepsByStepClass(LoadStep) + .filter((step) => { + if (step.id === this.id) + return false; + if (step.load !== this.load) + return false; + if ((0, utils_js_1.canonicalJSONStringify)(step.params) !== stringifiedParams) + return false; + return true; + }); + for (const otherStep of kin) { + for (const attr of otherStep.attributes) { + this.attributes.add(attr); + } + } + // Build the loadOptions + this.loadOptions = { + attributes: [...this.attributes].sort(), + params: this.params, + }; + // If the canonicalJSONStringify is the same, then we deem that the options are the same + this.loadOptionsKey = (0, utils_js_1.canonicalJSONStringify)(this.loadOptions); + let loadId = idByLoad.get(this.load); + if (!loadId) { + loadId = String(++loadCounter); + idByLoad.set(this.load, loadId); + } + this.metaKey = `LoadStep|${loadId}|${this.loadOptionsKey}`; + super.finalize(); + } + execute({ count, values: [values0, values1], extra, }) { + const meta = extra.meta; + let cache = meta.cache; + if (!cache) { + cache = new Map(); + meta.cache = cache; + } + const batch = new Map(); + const unary = values1?.isBatch === false ? values1.value : undefined; + const results = []; + for (let i = 0; i < count; i++) { + const spec = values0.at(i); + if (cache.has(spec)) { + results.push(cache.get(spec)); + } + else { + // We'll fill this in in a minute + const index = results.push(null) - 1; + const existingIdx = batch.get(spec); + if (existingIdx !== undefined) { + existingIdx.push(index); + } + else { + batch.set(spec, [index]); + } + } + } + const pendingCount = batch.size; + if (pendingCount > 0) { + const deferred = (0, index_js_1.defer)(); + const batchSpecs = [...batch.keys()]; + const loadBatch = { deferred, batchSpecs }; + if (!meta.loadBatchesByLoad) { + meta.loadBatchesByLoad = new Map(); + } + let loadBatches = meta.loadBatchesByLoad.get(this.load); + if (loadBatches) { + // Add to existing batch load + loadBatches.push(loadBatch); + } + else { + // Create new batch load + loadBatches = [loadBatch]; + meta.loadBatchesByLoad.set(this.load, loadBatches); + // Guaranteed by the metaKey to be equivalent for all entries sharing the same `meta`. Note equivalent is not identical; key order may change. + const loadOptions = this.loadOptions; + process.nextTick(() => { + // Don't allow adding anything else to the batch + meta.loadBatchesByLoad.delete(this.load); + executeBatches(loadBatches, this.load, { + ...loadOptions, + unary: unary, + }); + }); + } + return (async () => { + const loadResults = await deferred; + for (let pendingIndex = 0; pendingIndex < pendingCount; pendingIndex++) { + const spec = batchSpecs[pendingIndex]; + const targetIndexes = batch.get(spec); + const loadResult = loadResults[pendingIndex]; + cache.set(spec, loadResult); + for (const targetIndex of targetIndexes) { + results[targetIndex] = loadResult; + } + } + return results; + })(); + } + return results; + } +} +exports.LoadStep = LoadStep; +async function executeBatches(loadBatches, load, loadOptions) { + try { + const numberOfBatches = loadBatches.length; + if (numberOfBatches === 1) { + const [loadBatch] = loadBatches; + loadBatch.deferred.resolve(load(loadBatch.batchSpecs, loadOptions)); + return; + } + else { + // Do some tick-batching! + const indexStarts = []; + const allBatchSpecs = []; + for (let i = 0; i < numberOfBatches; i++) { + const loadBatch = loadBatches[i]; + indexStarts[i] = allBatchSpecs.length; + for (const batchSpec of loadBatch.batchSpecs) { + allBatchSpecs.push(batchSpec); + } + } + const results = await load(allBatchSpecs, loadOptions); + for (let i = 0; i < numberOfBatches; i++) { + const loadBatch = loadBatches[i]; + const start = indexStarts[i]; + const stop = indexStarts[i + 1] ?? allBatchSpecs.length; + const entries = results.slice(start, stop); + loadBatch.deferred.resolve(entries); + } + } + } + catch (e) { + for (const loadBatch of loadBatches) { + loadBatch.deferred.reject(e); + } + } +} +function load(spec, unarySpec, ioEquivalence, loadCallback) { + return new LoadStep(spec, unarySpec, ioEquivalence, loadCallback); +} +function loadMany(spec, loadCallbackOrIoEquivalenceOrUnarySpec, loadCallbackOrIoEquivalence, loadCallbackOnly) { + if (loadCallbackOnly) { + return load(spec, loadCallbackOrIoEquivalenceOrUnarySpec, loadCallbackOrIoEquivalence, loadCallbackOnly); + } + // At most 3 arguments + else if ((0, multistep_js_1.isMultistep)(loadCallbackOrIoEquivalenceOrUnarySpec)) { + return load(spec, loadCallbackOrIoEquivalenceOrUnarySpec, null, loadCallbackOrIoEquivalence); + } + // Unary step is definitely null; 3 arguments + else if (loadCallbackOrIoEquivalence) { + return load(spec, null, loadCallbackOrIoEquivalenceOrUnarySpec, loadCallbackOrIoEquivalence); + } + // 2 arguments + else { + return load(spec, null, null, loadCallbackOrIoEquivalenceOrUnarySpec); + } +} +function loadOne(spec, loadCallbackOrIoEquivalenceOrUnarySpec, loadCallbackOrIoEquivalence, loadCallbackOnly) { + if (loadCallbackOnly) { + return load(spec, loadCallbackOrIoEquivalenceOrUnarySpec, loadCallbackOrIoEquivalence, loadCallbackOnly).single(); + } + // At most 3 arguments + else if ((0, multistep_js_1.isMultistep)(loadCallbackOrIoEquivalenceOrUnarySpec)) { + return load(spec, loadCallbackOrIoEquivalenceOrUnarySpec, null, loadCallbackOrIoEquivalence).single(); + } + // Unary step is definitely null; 3 arguments + else if (loadCallbackOrIoEquivalence) { + return load(spec, null, loadCallbackOrIoEquivalenceOrUnarySpec, loadCallbackOrIoEquivalence).single(); + } + else { + return load(spec, null, null, loadCallbackOrIoEquivalenceOrUnarySpec).single(); + } +} +//# sourceMappingURL=load.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/load.js.map b/grafast/grafast/dist/steps/load.js.map new file mode 100644 index 0000000000..a8d35bc740 --- /dev/null +++ b/grafast/grafast/dist/steps/load.js.map @@ -0,0 +1 @@ +{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/steps/load.ts"],"names":[],"mappings":";;;AAsDA,0CASC;AAKD,4CASC;AAidD,4BAiHC;AA2ED,0BAsFC;AA/yBD,0CAAoC;AAOpC,kDAAyD;AACzD,wCAAoE;AACpE,0CAA6E;AAC7E,2CAAqC;AAuCrC;;;GAGG;AACH,SAAgB,eAAe,CAM7B,QAA4D;IAE5D,OAAO,QAAQ,CAAC;AAClB,CAAC;AACD;;;GAGG;AACH,SAAgB,gBAAgB,CAM9B,QAA6D;IAE7D,OAAO,QAAQ,CAAC;AAClB,CAAC;AAcD,MAAM,QAAQ,GAAG,IAAI,OAAO,EAA4C,CAAC;AACzE,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB;;GAEG;AACH,MAAa,gBAGX,SAAQ,cAAW;aACZ,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,kBAAkB;KAC/B,AAHc,CAGb;IAMF,YACE,KAAkB,EACV,QAAiB,EACjB,iBAAyB;IACjC,oDAAoD;IAC5C,aAAmC;QAE3C,KAAK,EAAE,CAAC;QALA,aAAQ,GAAR,QAAQ,CAAS;QACjB,sBAAiB,GAAjB,iBAAiB,CAAQ;QAEzB,kBAAa,GAAb,aAAa,CAAsB;QAT7C,kBAAa,GAAG,IAAI,CAAC;QAErB,eAAU,GAAG,IAAI,GAAG,EAAe,CAAC;QACpC,WAAM,GAAqB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAS7C,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IACD,YAAY;QACV,OAAO,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC;IACxC,CAAC;IACD,GAAG,CAAC,IAAqC;QACvC,OAAO,IAAI,CAAC,SAA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ACrC,OAAO,IAAI,CACT,IAAI,EACJ,IAAI,EACJ,sCAAmE,EACnE,2BAKC,CAOF,CAAC;IACJ,CAAC;IACD,cAAc;SACT,CAAC;QACJ,OAAO,IAAI,CACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,sCAKC,CAOF,CAAC;IACJ,CAAC;AACH,CAAC;AA2ED,SAAgB,OAAO,CAMrB,IAAgB,EAChB,sCAQmB,EACnB,2BAO6B,EAC7B,gBAKC;IAED,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,IAAI,CACT,IAAI,EACJ,sCAAgE,EAChE,2BAAwD,EACxD,gBAKC,CACF,CAAC,MAAM,EAAE,CAAC;IACb,CAAC;IACD,sBAAsB;SACjB,IACH,IAAA,0BAAW,EAAkB,sCAAsC,CAAC,EACpE,CAAC;QACD,OAAO,IAAI,CACT,IAAI,EACJ,sCAAsC,EACtC,IAAI,EACJ,2BAKC,CACF,CAAC,MAAM,EAAE,CAAC;IACb,CAAC;IACD,6CAA6C;SACxC,IAAI,2BAA2B,EAAE,CAAC;QACrC,OAAO,IAAI,CACT,IAAI,EACJ,IAAI,EACJ,sCAAmE,EACnE,2BAKC,CACF,CAAC,MAAM,EAAE,CAAC;IACb,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,sCAKC,CACF,CAAC,MAAM,EAAE,CAAC;IACb,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/node.d.ts b/grafast/grafast/dist/steps/node.d.ts new file mode 100644 index 0000000000..866322f610 --- /dev/null +++ b/grafast/grafast/dist/steps/node.d.ts @@ -0,0 +1,47 @@ +import type { GraphQLObjectType } from "graphql"; +import type { Maybe, NodeIdHandler, PolymorphicData, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { PolymorphicStep, Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +/** + * A plan to get a Node by its global object identifier (string). Accepts an + * object specifying the supported codecs, an object map detailing the + * typeNames supported and their details (codec to use, how to find the record, + * etc), and finally the Node id string plan. + */ +export declare class NodeStep extends UnbatchedStep implements PolymorphicStep { + private possibleTypes; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + private specPlanDep; + constructor(possibleTypes: { + [typeName: string]: NodeIdHandler; + }, $id: Step); + planForType(type: GraphQLObjectType): Step; + private getTypeNameFromSpecifier; + unbatchedExecute: (_extra: UnbatchedExecutionExtra, specifier: any) => PolymorphicData> | null; +} +/** + * A plan to get a Node by its global object identifier (string). Accepts an + * object specifying the supported codecs, an object map detailing the + * typeNames supported and their details (codec to use, how to find the record, + * etc), and finally the Node id string plan. + */ +export declare function node(possibleTypes: { + [typeName: string]: NodeIdHandler; +}, $id: Step): NodeStep; +export declare function specFromNodeId(handler: NodeIdHandler, $id: Step>): any; +export declare function nodeIdFromNode(handler: NodeIdHandler, $node: Step): import("./lambda.js").LambdaStep; +export declare function makeDecodeNodeIdRuntime(handlers: readonly NodeIdHandler[]): { + (raw: string | null | undefined): { + [codecName: string]: any; + } | null; + isSyncAndSafe: boolean; +}; +export declare function makeDecodeNodeId(handlers: readonly NodeIdHandler[]): ($id: Step) => import("./lambda.js").LambdaStep; +//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/node.d.ts.map b/grafast/grafast/dist/steps/node.d.ts.map new file mode 100644 index 0000000000..a1197e115e --- /dev/null +++ b/grafast/grafast/dist/steps/node.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/steps/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,eAAe,EACf,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,Y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IAAI,GAAG,SAAS,CAAC;;UAE7C"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/node.js b/grafast/grafast/dist/steps/node.js new file mode 100644 index 0000000000..b5d465360b --- /dev/null +++ b/grafast/grafast/dist/steps/node.js @@ -0,0 +1,119 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NodeStep = void 0; +exports.node = node; +exports.specFromNodeId = specFromNodeId; +exports.nodeIdFromNode = nodeIdFromNode; +exports.makeDecodeNodeIdRuntime = makeDecodeNodeIdRuntime; +exports.makeDecodeNodeId = makeDecodeNodeId; +const dev_js_1 = require("../dev.js"); +const inspect_js_1 = require("../inspect.js"); +const polymorphic_js_1 = require("../polymorphic.js"); +const step_js_1 = require("../step.js"); +const access_js_1 = require("./access.js"); +const constant_js_1 = require("./constant.js"); +const lambda_js_1 = require("./lambda.js"); +/** + * A plan to get a Node by its global object identifier (string). Accepts an + * object specifying the supported codecs, an object map detailing the + * typeNames supported and their details (codec to use, how to find the record, + * etc), and finally the Node id string plan. + */ +class NodeStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "NodeStep", + }; } + constructor(possibleTypes, $id) { + super(); + this.possibleTypes = possibleTypes; + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.unbatchedExecute = (_extra, specifier) => { + const typeName = specifier + ? this.getTypeNameFromSpecifier(specifier) + : null; + return typeName ? (0, polymorphic_js_1.polymorphicWrap)(typeName) : null; + }; + const decodeNodeId = makeDecodeNodeId(Object.values(possibleTypes)); + this.specPlanDep = this.addDependency(decodeNodeId($id)); + } + planForType(type) { + const spec = this.possibleTypes[type.name]; + if (spec !== undefined) { + return spec.get(spec.getSpec((0, access_js_1.access)(this.getDep(this.specPlanDep), [spec.codec.name]))); + } + else { + return (0, constant_js_1.constant)(null); + } + } + getTypeNameFromSpecifier(specifier) { + for (const [typeName, typeSpec] of Object.entries(this.possibleTypes)) { + const value = specifier[typeSpec.codec.name]; + if (value != null && typeSpec.match(value)) { + return typeName; + } + } + if (dev_js_1.isDev) { + console.error(`Could not find a type that matched the specifier '${(0, inspect_js_1.inspect)(specifier)}'`); + } + return null; + } +} +exports.NodeStep = NodeStep; +/** + * A plan to get a Node by its global object identifier (string). Accepts an + * object specifying the supported codecs, an object map detailing the + * typeNames supported and their details (codec to use, how to find the record, + * etc), and finally the Node id string plan. + */ +function node(possibleTypes, $id) { + return new NodeStep(possibleTypes, $id); +} +function specFromNodeId(handler, $id) { + function decodeWithCodecAndHandler(raw) { + if (raw == null) + return raw; + try { + const decoded = handler.codec.decode(raw); + if (handler.match(decoded)) { + return decoded; + } + return null; + } + catch (e) { + return null; + } + } + decodeWithCodecAndHandler.displayName = `decode_${handler.typeName}_${handler.codec.name}`; + decodeWithCodecAndHandler.isSyncAndSafe = true; // Optimization + const $decoded = (0, lambda_js_1.lambda)($id, decodeWithCodecAndHandler); + return handler.getSpec($decoded); +} +function nodeIdFromNode(handler, $node) { + const specifier = handler.plan($node); + return (0, lambda_js_1.lambda)(specifier, handler.codec.encode); +} +function makeDecodeNodeIdRuntime(handlers) { + const codecs = [...new Set(handlers.map((h) => h.codec))]; + function decodeNodeIdWithCodecs(raw) { + if (raw == null) + return null; + return codecs.reduce((memo, codec) => { + try { + memo[codec.name] = codec.decode(raw); + } + catch (e) { + memo[codec.name] = null; + } + return memo; + }, { raw }); + } + decodeNodeIdWithCodecs.isSyncAndSafe = true; // Optimization + return decodeNodeIdWithCodecs; +} +function makeDecodeNodeId(handlers) { + const decodeNodeIdWithCodecs = makeDecodeNodeIdRuntime(handlers); + return ($id) => (0, lambda_js_1.lambda)($id, decodeNodeIdWithCodecs); +} +//# sourceMappingURL=node.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/node.js.map b/grafast/grafast/dist/steps/node.js.map new file mode 100644 index 0000000000..2bb1ac1789 --- /dev/null +++ b/grafast/grafast/dist/steps/node.js.map @@ -0,0 +1 @@ +{"version":3,"file":"node.js","sourceRoot":"","sources":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D,sBAAsB,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,eAAe;IAC5D,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAAkC;IACjE,MAAM,sBAAsB,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IACjE,OAAO,CAAC,GAAoC,EAAE,EAAE,CAC9C,IAAA,kBAAM,EAAC,GAAG,EAAE,sBAAsB,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/object.d.ts b/grafast/grafast/dist/steps/object.d.ts new file mode 100644 index 0000000000..fcd286128b --- /dev/null +++ b/grafast/grafast/dist/steps/object.d.ts @@ -0,0 +1,73 @@ +import type { DataFromStep, ExecutionDetails, ExecutionExtra, StepOptimizeOptions, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +import { ConstantStep } from "./constant.js"; +export type DataFromObjectSteps = { + [key in keyof TSteps]: DataFromStep; +}; +type Results = Array<[ + Array[keyof TSteps]>, + DataFromObjectSteps +]>; +export interface ObjectPlanMeta { + results: Results; +} +interface ObjectStepCacheConfig { + identifier?: string; + cacheSize?: number; +} +/** + * A plan that represents an object using the keys given and the values being + * the results of the associated plans. + */ +export declare class ObjectStep extends UnbatchedStep> { + private cacheConfig?; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + private readonly keys; + optimizeMetaKey: string; + private cacheSize; + constructor(obj: TPlans, cacheConfig?: ObjectStepCacheConfig | undefined); + private _setKeys; + /** + * This key doesn't get typed, but it can be added later which can be quite + * handy. + */ + set(key: TKey, plan: TPlans[TKey]): void; + getStepForKey(key: TKey): TPlans[TKey]; + getStepForKey(key: TKey, allowMissing: true): TPlans[TKey] | null; + toStringMeta(): string; + tupleToObjectJIT(callback: (fn: (extra: ExecutionExtra, ...tuple: Array[keyof TPlans]>) => DataFromObjectSteps) => void): void; + finalize(): void; + execute({ indexMap, values, extra, }: ExecutionDetails[keyof TPlans]>>): ReadonlyArray>; + unbatchedExecute(_extra: UnbatchedExecutionExtra, ..._values: any[]): any; + deduplicate(peers: ObjectStep[]): ObjectStep[]; + optimize(opts: StepOptimizeOptions): ConstantStep | this | ConstantStep>; + /** + * Get the original plan with the given key back again. + */ + get(key: TKey): TPlans[TKey]; +} +/** + * A plan that represents an object using the keys given and the values being + * the results of the associated plans. + */ +export declare function object(obj: TPlans, cacheConfig?: ObjectStepCacheConfig): ObjectStep; +export {}; +//# sourceMappingURL=object.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/object.d.ts.map b/grafast/grafast/dist/steps/object.d.ts.map new file mode 100644 index 0000000000..0036d9df52 --- /dev/null +++ b/grafast/grafast/dist/steps/object.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/steps/object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAY,YAAY,EAAE,MAAM,eAAe,CAAC;AASvD,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,IAAI;KACvE,GAAG,IAAI,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;CACjD,CAAC;AACF,KAAK,OAAO,CAAC,MAAM,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,IAAI,KAAK,CAC1D;IACE,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC;IAChD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CACR,EAAE,EAAE,CACF,KAAK,EAAE,cAAc,EACrB,GAAG,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,KACvD,mBAAmB,CAAC,MAAM,CAAC,KAC7B,IAAI,GACR,IAAI;IA4EP,QAAQ;IAOR,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EACN,KAAK,GACN,EAAE,gBAAgB,CACjB,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,CACjD,GAAG,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAM9C,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG;IAIzE,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE;IAK3D,QAAQ,CAAC,IAAI,EAAE,mBAAmB;IAoClC;;OAEG;IACH,GAAG,CAAC,IAAI,SAAS,MAAM,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;CAWxD;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,MAAM,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAC3D,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,qBAAqB,GAClC,UAAU,CAAC,MAAM,CAAC,CAEpB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/object.js b/grafast/grafast/dist/steps/object.js new file mode 100644 index 0000000000..0af2e02f77 --- /dev/null +++ b/grafast/grafast/dist/steps/object.js @@ -0,0 +1,216 @@ +"use strict"; +// import debugFactory from "debug"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ObjectStep = void 0; +exports.object = object; +const tslib_1 = require("tslib"); +const tamedevil_1 = tslib_1.__importStar(require("tamedevil")); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +const constant_js_1 = require("./constant.js"); +const DEFAULT_CACHE_SIZE = 100; +const EMPTY_OBJECT = Object.freeze(Object.create(null)); +/** + * A plan that represents an object using the keys given and the values being + * the results of the associated plans. + */ +class ObjectStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ObjectStep", + }; } + constructor(obj, cacheConfig) { + super(); + this.cacheConfig = cacheConfig; + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.keys = []; + // Optimize needs the same 'meta' for all ObjectSteps + this.optimizeMetaKey = "ObjectStep"; + this.cacheSize = + cacheConfig?.cacheSize ?? + (cacheConfig?.identifier ? DEFAULT_CACHE_SIZE : 0); + const keys = Object.keys(obj); + this._setKeys(keys); + for (let i = 0, l = this.keys.length; i < l; i++) { + this.addDependency({ step: obj[keys[i]], skipDeduplication: true }); + } + } + _setKeys(keys) { + this.keys = keys; + this.peerKey = (0, utils_js_1.digestKeys)(keys); + this.metaKey = + this.cacheSize <= 0 + ? undefined + : this.cacheConfig?.identifier + ? `object|${this.peerKey}|${this.cacheConfig.identifier}` + : this.id; + } + /** + * This key doesn't get typed, but it can be added later which can be quite + * handy. + */ + set(key, plan) { + this._setKeys([...this.keys, key]); + this.addDependency({ step: plan, skipDeduplication: true }); + } + getStepForKey(key, allowMissing = false) { + const idx = this.keys.indexOf(key); + if (idx < 0) { + if (!allowMissing) { + throw new Error(`${this}: failed to retrieve plan for key '${String(key)}' - we have no such key`); + } + return null; + } + return this.getDepOptions(idx).step; + } + toStringMeta() { + return "{" + this.keys.join(",") + "}"; + } + /* + tupleToObject( + meta: ObjectPlanMeta, + ...tuple: Array[keyof TPlans]> + ): DataFromObjectSteps { + // Note: `outerloop` is a JavaScript "label". They are not very common. + // First look for an existing match: + outerloop: for (let i = 0, l = meta.results.length; i < l; i++) { + const [values, obj] = meta.results[i]; + // Slow loop over each value in the tuples; this is not expected to be a + // particularly big loop, typically only 2-5 keys. + for (let j = 0, m = this.keys.length; j < m; j++) { + if (values[j] !== tuple[j]) { + // This isn't a match; try the next record in the outer loop + continue outerloop; + } + } + return obj; + } + + // That failed; create a new object. + debugObjectPlanVerbose( + "%s: Could not find cache for keys %c values %c, constructing new object", + this, + this.keys, + tuple, + ); + const newObj = this.keys.reduce((memo, key, i) => { + memo[key] = tuple[i]; + return memo; + }, {} as Partial>) as DataFromObjectSteps; + + // Cache newObj so the same tuple values result in the exact same object. + meta.results.push([tuple, newObj]); + return newObj; + } + */ + tupleToObjectJIT(callback) { + if (this.keys.length === 0) { + // Shortcut simple case + return callback(() => EMPTY_OBJECT); + } + const keysAreSafe = this.keys.every(tamedevil_1.isSafeObjectPropertyName); + const inner = keysAreSafe + ? (0, tamedevil_1.default) `\ + const newObj = { +${tamedevil_1.default.join(this.keys.map((key, i) => (0, tamedevil_1.default) ` ${tamedevil_1.default.safeKeyOrThrow(key)}: ${tamedevil_1.default.identifier(`val${i}`)}`), ",\n")} + }; +` + : (0, tamedevil_1.default) `\ + const newObj = Object.create(null); +${tamedevil_1.default.join(this.keys.map((key, i) => (0, tamedevil_1.default) ` newObj${tamedevil_1.default.set(key, true)} = ${tamedevil_1.default.identifier(`val${i}`)};\n`), "")}\ +`; + const vals = tamedevil_1.default.join(this.keys.map((_k, i) => tamedevil_1.default.identifier(`val${i}`)), ", "); + if (this.cacheSize > 0) { + return tamedevil_1.default.runInBatch((0, tamedevil_1.default) `\ +(function ({ meta }, ${vals}) { + if (meta.nextIndex != null) { + for (let i = 0, l = meta.results.length; i < l; i++) { + const [values, obj] = meta.results[i]; + if (${tamedevil_1.default.join(this.keys.map((_key, i) => (0, tamedevil_1.default) `values[${tamedevil_1.default.lit(i)}] === ${tamedevil_1.default.identifier(`val${i}`)}`), " && ")}) { + return obj; + } + } + } else { + meta.nextIndex = 0; + meta.results = []; + } +${inner} + meta.results[meta.nextIndex] = [[${tamedevil_1.default.join(this.keys.map((_key, i) => tamedevil_1.default.identifier(`val${i}`)), ",")}], newObj]; + // Only cache ${tamedevil_1.default.lit(this.cacheSize)} results, use a round-robin + meta.nextIndex = meta.nextIndex === ${tamedevil_1.default.lit(this.cacheSize - 1)} ? 0 : meta.nextIndex + 1; + return newObj; +})`, callback); + } + else { + return tamedevil_1.default.runInBatch((0, tamedevil_1.default) `\ +(function (_, ${vals}) { +${inner} + return newObj; +})`, callback); + } + } + finalize() { + this.tupleToObjectJIT((fn) => { + this.unbatchedExecute = fn; + }); + return super.finalize(); + } + execute({ indexMap, values, extra, }) { + return indexMap((i) => this.unbatchedExecute(extra, ...values.map((v) => v.at(i)))); + } + unbatchedExecute(_extra, ..._values) { + throw new Error(`${this} didn't finalize? No unbatchedExecute method.`); + } + deduplicate(peers) { + // Managed through peerKey + return peers; + } + optimize(opts) { + if (this.dependencies.every((dep) => dep instanceof constant_js_1.ConstantStep)) { + // Replace self with constant + // We'll cache so that the constants can be more easily deduplicated + const meta = opts.meta; + const keysJoined = this.keys.join(","); + if (!meta[keysJoined]) { + meta[keysJoined] = []; + } + const existing = meta[keysJoined].find((existingObj) => this.keys.every((key, i) => existingObj[key] === + this.dependencies[i].data)); + const isSensitive = this.dependencies.some((d) => d.isSensitive); + if (existing !== undefined) { + return (0, constant_js_1.constant)(existing, isSensitive); + } + else { + const obj = Object.create(null); + for (let i = 0, l = this.keys.length; i < l; i++) { + const key = this.keys[i]; + const value = this.dependencies[i].data; + obj[key] = value; + } + meta[keysJoined].push(obj); + return (0, constant_js_1.constant)(obj, isSensitive); + } + } + return this; + } + /** + * Get the original plan with the given key back again. + */ + get(key) { + const index = this.keys.indexOf(key); + if (index < 0) { + throw new Error(`This ObjectStep doesn't have key '${String(key)}'; supported keys: '${this.keys.join("', '")}'`); + } + return this.getDepOptions(index).step; + } +} +exports.ObjectStep = ObjectStep; +/** + * A plan that represents an object using the keys given and the values being + * the results of the associated plans. + */ +function object(obj, cacheConfig) { + return new ObjectStep(obj, cacheConfig); +} +//# sourceMappingURL=object.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/object.js.map b/grafast/grafast/dist/steps/object.js.map new file mode 100644 index 0000000000..0456154be6 --- /dev/null +++ b/grafast/grafast/dist/steps/object.js.map @@ -0,0 +1 @@ +{"version":3,"file":"object.js","sourceRoot":"","sources":["../../src/steps/object.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;AA2UpC,wBAKC;;AA9UD,+DAAyD;AAUzD,wCAA2C;AAC3C,0CAAyC;AACzC,+CAAuD;AAEvD,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAwBxD;;;GAGG;AACH,MAAa,UAIX,SAAQ,uBAA0C;aAC3C,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,YAAY;KACzB,AAHc,CAGb;IASF,YACE,GAAW,EACH,WAAmC;QAE3C,KAAK,EAAE,CAAC;QAFA,gBAAW,GAAX,WAAW,CAAwB;QAV7C,kBAAa,GAAG,IAAI,CAAC;QACrB,+BAA0B,GAAG,IAAI,CAAC;QACjB,SAAI,GAAyC,EAAE,CAAC;QAEjE,qDAAqD;QACrD,oBAAe,GAAG,YAAY,CAAC;QAQ7B,IAAI,CAAC,SAAS;YACZ,WAAW,EAAE,SAAS;gBACtB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAErD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACjD,IAAI,CAAC,aAAa,CAAC,EA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ionByIndex.d.ts b/grafast/grafast/dist/steps/partitionByIndex.d.ts new file mode 100644 index 0000000000..11b66aec46 --- /dev/null +++ b/grafast/grafast/dist/steps/partitionByIndex.d.ts @@ -0,0 +1,40 @@ +import type { Step } from "../step.js"; +import type { ConnectionCapableStep, ItemsStep } from "./connection.js"; +import type { __ListTransformStep, ListTransformItemPlanCallback } from "./listTransform.js"; +/** + * Takes a single dimensional list plan and a mapper that calculates a + * (potentially duplicate) target index for each entry in the list. Returns a + * plan that results in a two dimensional list of the items in the original + * list partitioned (grouped) by their target index. + * + * If your datasource returns indexes that are 1-indexed then you may pass `1` + * as the third argument and we'll account for this. + * + * @example For this data: + * + * ```jsonc + * [ + * {"array_idx": 1, "id": "b0b00000-0000-0000-0000-000000000b0b", "username": "Bob"}, + * {"array_idx": 2, "id": "a11ce000-0000-0000-0000-0000000a11ce", "username": "Alice"}], + * {"array_idx": 2, "id": "cec111a0-0000-0000-0000-00000cec111a", "username": "Cecilia"}], + * ] + * ``` + * + * partitioning by the array_idx (which is 1-indexed), would result in: + * + * ```jsonc + * [ + * [ + * {"array_idx": 1, "id": "b0b00000-0000-0000-0000-000000000b0b", "username": "Bob"}, + * ], + * [ + * {"array_idx": 2, "id": "a11ce000-0000-0000-0000-0000000a11ce", "username": "Alice"}], + * {"array_idx": 2, "id": "cec111a0-0000-0000-0000-00000cec111a", "username": "Cecilia"}], + * ], + * ] + * ``` + * + * Beware: the target indexes should not contain gaps. + */ +export declare function partitionByIndex | ConnectionCapableStep, TItemStep extends Step>(listStep: TListStep, mapper: ListTransformItemPlanCallback, TItemStep>, startIndex?: 0 | 1): __ListTransformStep; +//# sourceMappingURL=partitionByIndex.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/partitionByIndex.d.ts.map b/grafast/grafast/dist/steps/partitionByIndex.d.ts.map new file mode 100644 index 0000000000..cbca68d455 --- /dev/null +++ b/grafast/grafast/dist/steps/partitionByIndex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"partitionByIndex.d.ts","sourceRoot":"","sources":["../../src/steps/partitionByIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAE9B,MAAM,oBAAoB,CAAC;AA8B5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,SAAS,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EACxE,SAAS,SAAS,IAAI,CAAC,MAAM,CAAC,EAE9B,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAE,6BAA6B,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,EACtE,UAAU,GAAE,CAAC,GAAG,CAAK,GACpB,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,CAsB7D"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/partitionByIndex.js b/grafast/grafast/dist/steps/partitionByIndex.js new file mode 100644 index 0000000000..3faf8278f0 --- /dev/null +++ b/grafast/grafast/dist/steps/partitionByIndex.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.partitionByIndex = partitionByIndex; +const tslib_1 = require("tslib"); +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const step_js_1 = require("../step.js"); +const each_js_1 = require("./each.js"); +const listTransform_js_1 = require("./listTransform.js"); +/** + * For 0-based indexes + * + * @internal + */ +const reduceCallback0 = (memo, entireItemValue, idx) => { + if (!memo[idx]) + memo[idx] = []; + memo[idx].push(entireItemValue); + return memo; +}; +/** + * For 1-based indexes + * + * @internal + */ +const reduceCallback1 = (memo, entireItemValue, idx1) => { + const idx = idx1 - 1; + if (!memo[idx]) + memo[idx] = []; + memo[idx].push(entireItemValue); + return memo; +}; +const initialState = () => []; +/** + * Takes a single dimensional list plan and a mapper that calculates a + * (potentially duplicate) target index for each entry in the list. Returns a + * plan that results in a two dimensional list of the items in the original + * list partitioned (grouped) by their target index. + * + * If your datasource returns indexes that are 1-indexed then you may pass `1` + * as the third argument and we'll account for this. + * + * @example For this data: + * + * ```jsonc + * [ + * {"array_idx": 1, "id": "b0b00000-0000-0000-0000-000000000b0b", "username": "Bob"}, + * {"array_idx": 2, "id": "a11ce000-0000-0000-0000-0000000a11ce", "username": "Alice"}], + * {"array_idx": 2, "id": "cec111a0-0000-0000-0000-00000cec111a", "username": "Cecilia"}], + * ] + * ``` + * + * partitioning by the array_idx (which is 1-indexed), would result in: + * + * ```jsonc + * [ + * [ + * {"array_idx": 1, "id": "b0b00000-0000-0000-0000-000000000b0b", "username": "Bob"}, + * ], + * [ + * {"array_idx": 2, "id": "a11ce000-0000-0000-0000-0000000a11ce", "username": "Alice"}], + * {"array_idx": 2, "id": "cec111a0-0000-0000-0000-00000cec111a", "username": "Cecilia"}], + * ], + * ] + * ``` + * + * Beware: the target indexes should not contain gaps. + */ +function partitionByIndex(listStep, mapper, startIndex = 0) { + if (startIndex !== 0 && startIndex !== 1) { + throw new Error(`partitionByIndex only supports 0- and 1-indexed lists currently; please use 'lambda' to convert your index`); + } + return (0, listTransform_js_1.listTransform)({ + listStep, + itemPlanCallback: mapper, + initialState, + reduceCallback: startIndex === 1 ? reduceCallback1 : reduceCallback0, + listItem: (0, step_js_1.isListCapableStep)(listStep) + ? (itemPlan) => { + return (0, each_js_1.each)(itemPlan, ($item) => listStep.listItem($item)); + } + : undefined, + meta: `partitionByIndex${startIndex}:${chalk_1.default.yellow(listStep.id)}${mapper.name ? `/${mapper.name}` : ""}`, + }); +} +//# sourceMappingURL=partitionByIndex.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/partitionByIndex.js.map b/grafast/grafast/dist/steps/partitionByIndex.js.map new file mode 100644 index 0000000000..8f69d8d98d --- /dev/null +++ b/grafast/grafast/dist/steps/partitionByIndex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partitionByIndex.js","sourceRoot":"","sources":["../../src/steps/partitionByIndex.ts"],"names":[],"mappings":";;AA4EA,4CA6BC;;AAzGD,0DAA0B;AAG1B,wCAA+C;AAG/C,uCAAiC;AAMjC,yDAAmD;AAInD;;;;GAIG;AACH,MAAM,eAAe,GAAW,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,EAAE;IAC7D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,eAAe,GAAW,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE;IAC9D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC;IACrB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,gBAAgB,CAI9B,QAAmB,EACnB,MAAsE,EACtE,aAAoB,CAAC;IAErB,IAAI,UAAU,KAAK,CAAC,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,4GAA4G,CAC7G,CAAC;IACJ,CAAC;IACD,OAAO,IAAA,gCAAa,EAAyC;QAC3D,QAAQ;QACR,gBAAgB,EAAE,MAAM;QACxB,YAAY;QACZ,cAAc,EAAE,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe;QACpE,QAAQ,EAAE,IAAA,2BAAiB,EAAC,QAAQ,CAAC;YACnC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACX,OAAO,IAAA,cAAI,EAAC,QAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CACrC,QAAQ,CAAC,QAAQ,CAAC,KAAY,CAAC,CAChC,CAAC;YACJ,CAAC;YACH,CAAC,CAAC,SAAS;QACb,IAAI,EAAE,mBAAmB,UAAU,IAAI,eAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAC9D,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EACpC,EAAE;KACH,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/polymorphicBranch.d.ts b/grafast/grafast/dist/steps/polymorphicBranch.d.ts new file mode 100644 index 0000000000..d84c37d9c2 --- /dev/null +++ b/grafast/grafast/dist/steps/polymorphicBranch.d.ts @@ -0,0 +1,27 @@ +import type { GraphQLObjectType } from "graphql"; +import type { ExecutionDetails, GrafastResultsList, PromiseOrDirect } from "../index.js"; +import type { PolymorphicStep } from "../step.js"; +import { Step } from "../step.js"; +type StepData = TStep extends Step ? U : any; +export interface PolymorphicBranchMatchers { + [typeName: string]: PolymorphicBranchMatcher; +} +export interface PolymorphicBranchMatcher { + match?: (obj: StepData) => boolean; + plan?: ($obj: TStep) => Step; +} +export declare class PolymorphicBranchStep extends Step implements PolymorphicStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private typeNames; + private matchers; + constructor($step: TStep, matchers: PolymorphicBranchMatchers); + planForType(objectType: GraphQLObjectType): Step; + execute({ indexMap, values: [values0], }: ExecutionDetails): PromiseOrDirect>; +} +export declare function polymorphicBranch($step: TStep, matchers: PolymorphicBranchMatchers): PolymorphicBranchStep; +export {}; +//# sourceMappingURL=polymorphicBranch.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/polymorphicBranch.d.ts.map b/grafast/grafast/dist/steps/polymorphicBranch.d.ts.map new file mode 100644 index 0000000000..21661d2995 --- /dev/null +++ b/grafast/grafast/dist/steps/polymorphicBranch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"polymorphicBranch.d.ts","sourceRoot":"","sources":["../../src/steps/polymorphicBranch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC,KAAK,QAAQ,CAAC,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAM1E,MAAM,WAAW,yBAAyB,CAAC,KAAK,SAAS,IAAI;IAC3D,CAAC,QAAQ,EAAE,MAAM,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;CACrD;AACD,MAAM,WAAW,wBAAwB,CAAC,KAAK,SAAS,IAAI;IAC1D,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC;IAC1C,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;CAC9B;AAED,qBAAa,qBAAqB,CAAC,KAAK,SAAS,IAAI,CACnD,SAAQ,IACR,YAAW,eAAe;IAE1B,MAAM,CAAC,QAAQ;;;MAGb;IACK,aAAa,UAAQ;IAC5B,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,QAAQ,CAEd;gBACU,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,yBAAyB,CAAC,KAAK,CAAC;IAepE,WAAW,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAehD,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,OAAO,CAAC,GAClB,EAAE,gBAAgB,GAAG,eAAe,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAe/D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,IAAI,EAClD,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,yBAAyB,CAAC,KAAK,CAAC,gCAG3C"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/polymorphicBranch.js b/grafast/grafast/dist/steps/polymorphicBranch.js new file mode 100644 index 0000000000..e222ea5f1a --- /dev/null +++ b/grafast/grafast/dist/steps/polymorphicBranch.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PolymorphicBranchStep = void 0; +exports.polymorphicBranch = polymorphicBranch; +const index_js_1 = require("../index.js"); +const step_js_1 = require("../step.js"); +const constant_js_1 = require("./constant.js"); +class PolymorphicBranchStep extends step_js_1.Step { + static { this.$$export = { + moduleName: "grafast", + exportName: "PolymorphicBranchStep", + }; } + constructor($step, matchers) { + super(); + this.isSyncAndSafe = true; + this.addDependency($step); + this.typeNames = Object.keys(matchers); + this.matchers = Object.fromEntries(Object.entries(matchers).map(([typeName, matcher]) => { + const fixedMatcher = { + match: matcher.match ?? ((obj) => obj.__typename === typeName), + plan: matcher.plan ?? (($obj) => $obj), + }; + return [typeName, fixedMatcher]; + })); + } + planForType(objectType) { + const matcher = this.matchers[objectType.name]; + const $step = this.getDep(0, true); + if (matcher) { + if (typeof matcher.plan === "function") { + return matcher.plan($step); + } + else { + return $step; + } + } + else { + // TODO: should this be an error? + return (0, constant_js_1.constant)(null); + } + } + execute({ indexMap, values: [values0], }) { + return indexMap((i) => { + const obj = values0.at(i); + let match = null; + if (obj != null) { + for (const typeName of this.typeNames) { + if (this.matchers[typeName].match(obj)) { + match = typeName; + break; + } + } + } + return match !== null ? (0, index_js_1.polymorphicWrap)(match, obj) : null; + }); + } +} +exports.PolymorphicBranchStep = PolymorphicBranchStep; +function polymorphicBranch($step, matchers) { + return new PolymorphicBranchStep($step, matchers); +} +//# sourceMappingURL=polymorphicBranch.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/polymorphicBranch.js.map b/grafast/grafast/dist/steps/polymorphicBranch.js.map new file mode 100644 index 0000000000..f6bb4a39b9 --- /dev/null +++ b/grafast/grafast/dist/steps/polymorphicBranch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polymorphicBranch.js","sourceRoot":"","sources":["../../src/steps/polymorphicBranch.ts"],"names":[],"mappings":";;;AAyFA,8CAKC;AAvFD,0CAA8C;AAE9C,wCAAkC;AAClC,+CAAyC;AAgBzC,MAAa,qBACX,SAAQ,cAAI;aAGL,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,uBAAuB;KACpC,AAHc,CAGb;IAMF,YAAY,KAAY,EAAE,QAA0C;QAClE,KAAK,EAAE,CAAC;QANH,kBAAa,GAAG,IAAI,CAAC;QAO1B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,WAAW,CAChC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE;YACnD,MAAM,YAAY,GAAG;gBACnB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC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,CAAC,CAAC,IAAA,0BAAe,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC;;AA5DH,sDA6DC;AAED,SAAgB,iBAAiB,CAC/B,KAAY,EACZ,QAA0C;IAE1C,OAAO,IAAI,qBAAqB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/proxy.d.ts b/grafast/grafast/dist/steps/proxy.d.ts new file mode 100644 index 0000000000..428f82d689 --- /dev/null +++ b/grafast/grafast/dist/steps/proxy.d.ts @@ -0,0 +1,38 @@ +import type { ExecutionDetails, GrafastResultsList, UnbatchedExecutionExtra } from "../interfaces.js"; +import { $$proxy } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +/** + * @experimental + * + * Never build this class directly. + */ +export declare class ProxyStep extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + private $depId; + constructor($dep: Step, $actualDep: Step); + toStringMeta(): string | null; + addDependency(step: Step): number; + execute({ count, values: [values0], }: ExecutionDetails<[T]>): GrafastResultsList; + unbatchedExecute(_extra: UnbatchedExecutionExtra, value: T): T; + stream: undefined; +} +declare module "../step.js" { + interface Step { + [$$proxy]?: any; + } +} +/** + * @experimental + * + * This could change at any time, may impact performance, and just, generally, + * needs more work. You shouldn't need this in the vast majority of cases. + */ +export declare function proxy>($step: TStep, $actualDep?: Step): TStep & { + addDependency(step: Step): number; +}; +//# sourceMappingURL=proxy.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/proxy.d.ts.map b/grafast/grafast/dist/steps/proxy.d.ts.map new file mode 100644 index 0000000000..97c286e73a --- /dev/null +++ b/grafast/grafast/dist/steps/proxy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/steps/proxy.ts"],"names":[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0000000000..af62bddf56 --- /dev/null +++ b/grafast/grafast/dist/steps/proxy.js @@ -0,0 +1,117 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProxyStep = void 0; +exports.proxy = proxy; +const interfaces_js_1 = require("../interfaces.js"); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +/** + * @experimental + * + * Never build this class directly. + */ +class ProxyStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ProxyStep", + }; } + constructor($dep, $actualDep) { + super(); + this.isSyncAndSafe = true; + // Do not proxy stream requests + this.stream = undefined; + this.$depId = $dep.id; + this.addDependency($actualDep); + } + toStringMeta() { + const $dep = this.operationPlan.dangerouslyGetStep(this.$depId); + return $dep.toString(); + } + // Publicly expose this + addDependency(step) { + return super.addDependency(step); + } + execute({ count, values: [values0], }) { + return values0.isBatch + ? values0.entries + : (0, utils_js_1.arrayOfLength)(count, values0.value); + } + unbatchedExecute(_extra, value) { + return value; + } +} +exports.ProxyStep = ProxyStep; +function makeProxyHandler($toStep) { + return { + // $proxy - the ProxyStep instance + // p - the property being accessed + // proxy - the `new Proxy($proxy, ...)` + get($proxy, p, proxy) { + // Do not deduplicate the proxy-ness away! + if (p === "deduplicate") { + return () => [proxy]; + } + // DO optimize the proxy-ness away, so execution doesn't need to be proxied + if (p === "optimize") { + delete $proxy[interfaces_js_1.$$proxy]; + return () => [$proxy]; + } + if (p in $proxy) { + // $proxy has this property ('id', 'layerPlan', etc) - use it + const val = $proxy[p]; + if (typeof val === "function") { + return function (...args) { + return val.apply($proxy, args); + }; + } + else { + return val; + } + } + else { + // $proxy doesn't understand this - delegate to $toStep + const val = $toStep[p]; + if (typeof val === "function") { + return function (...args) { + return val.apply($toStep, args); + }; + } + else { + return val; + } + } + }, + has($proxy, p) { + if (p in $proxy) { + return true; + } + else { + return p in $toStep; + } + }, + set($proxy, p, newValue, receiver) { + if (p in $proxy) { + return Reflect.set($proxy, p, newValue, receiver); + } + else { + throw new Error(`Setting through a ProxyStep is currently forbidden (attempted to set '${String(p)}' on '${$proxy}'`); + } + }, + getPrototypeOf(_$proxy) { + return Object.getPrototypeOf($toStep); + }, + }; +} +/** + * @experimental + * + * This could change at any time, may impact performance, and just, generally, + * needs more work. You shouldn't need this in the vast majority of cases. + */ +function proxy($step, $actualDep = $step) { + const $proxy = new ProxyStep($step, $actualDep); + const proxy = new Proxy($proxy, makeProxyHandler($step)); // Lie. + $proxy[interfaces_js_1.$$proxy] = proxy; + return proxy; +} +//# sourceMappingURL=proxy.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/proxy.js.map b/grafast/grafast/dist/steps/proxy.js.map new file mode 100644 index 0000000000..06b3beee2e --- /dev/null +++ b/grafast/grafast/dist/steps/proxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/steps/proxy.ts"],"names":[],"mappings":";;;AA4HA,sBAQC;AA/HD,oDAA2C;AAE3C,wCAA2C;AAC3C,0CAA4C;AAE5C;;;;GAIG;AACH,MAAa,SAAa,SAAQ,uBAAgB;aACzC,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,WAAW;KACxB,AAHc,CAGb;IAGF,YAAY,IAAa,EAAE,UAAgB;QACzC,KAAK,EAAE,CAAC;QAHV,kBAAa,GAAG,IAAI,CAAC;QA0BrB,+BAA+B;QAC/B,WAAM,GAAG,SAAS,CAAC;QAvBjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACjC,CAAC;IACM,YAAY;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IACD,uBAAuB;IAChB,aAAa,CAAC,IAAU;QAC7B,OAAO,KA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newline at end of file diff --git a/grafast/grafast/dist/steps/remapKeys.d.ts b/grafast/grafast/dist/steps/remapKeys.d.ts new file mode 100644 index 0000000000..ae5cfc8d66 --- /dev/null +++ b/grafast/grafast/dist/steps/remapKeys.d.ts @@ -0,0 +1,35 @@ +import type { ExecutionDetails, GrafastResultsList, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +export type ActualKeyByDesiredKey = { + [desiredKey: string]: string; +}; +/** + * A plan that returns an object resulting from extracting the given + * `actualKey` from the input and storing it as the `desiredKey` in the output. + */ +export declare class RemapKeysStep extends UnbatchedStep { + private readonly actualKeyByDesiredKey; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + private mapper; + constructor($plan: Step, actualKeyByDesiredKey: ActualKeyByDesiredKey); + toStringMeta(): string; + optimize(): Step | this; + finalize(): void; + execute({ count, values: [values0], }: ExecutionDetails): GrafastResultsList; + unbatchedExecute(_extra: UnbatchedExecutionExtra, value: any): any; + deduplicate(peers: RemapKeysStep[]): RemapKeysStep[]; +} +/** + * A plan that returns an object resulting from extracting the given + * `actualKey` from the input and storing it as the `desiredKey` in the output. + */ +export declare function remapKeys($step: Step, actualKeyByDesiredKey: { + [desiredKey: string]: string; +}): RemapKeysStep; +//# sourceMappingURL=remapKeys.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/remapKeys.d.ts.map b/grafast/grafast/dist/steps/remapKeys.d.ts.map new file mode 100644 index 0000000000..61a80b6e5c --- /dev/null +++ b/grafast/grafast/dist/steps/remapKeys.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"remapKeys.d.ts","sourceRoot":"","sources":["../../src/steps/remapKeys.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,MAAM,qBAAqB,GAAG;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AA2CrE;;;GAGG;AACH,qBAAa,aAAc,SAAQ,aAAa;IAW5C,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAVxC,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,0BAA0B,UAAQ;IAElC,OAAO,CAAC,MAAM,CAAyC;gBAErD,KAAK,EAAE,IAAI,EACM,qBAAqB,EAAE,qBAAqB;IAU/D,YAAY,IAAI,MAAM;IAQtB,QAAQ;IAUR,QAAQ,IAAI,IAAI;IAOhB,OAAO,CAAC,EACN,KAAK,EACL,MAAM,EAAE,CAAC,OAAO,CAAC,GAClB,EAAE,gBAAgB,GAAG,kBAAkB,CAAC,GAAG,CAAC;IAM7C,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;IAIlE,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE;CAIrD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,IAAI,EACX,qBAAqB,EAAE;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GACtD,aAAa,CAEf"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/remapKeys.js b/grafast/grafast/dist/steps/remapKeys.js new file mode 100644 index 0000000000..d1e3e3e5e8 --- /dev/null +++ b/grafast/grafast/dist/steps/remapKeys.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RemapKeysStep = void 0; +exports.remapKeys = remapKeys; +const tslib_1 = require("tslib"); +/* eslint-disable @typescript-eslint/ban-types */ +const chalk_1 = tslib_1.__importDefault(require("chalk")); +const tamedevil_1 = tslib_1.__importStar(require("tamedevil")); +const step_js_1 = require("../step.js"); +const utils_js_1 = require("../utils.js"); +function makeMapper(actualKeyByDesiredKey, callback) { + const entries = Object.entries(actualKeyByDesiredKey); + if (entries.every(([key, val]) => (0, tamedevil_1.isSafeObjectPropertyName)(key) && (0, tamedevil_1.isSafeObjectPropertyName)(val))) { + // We can do a fast custom conversion + return tamedevil_1.default.runInBatch((0, tamedevil_1.default) `(function(obj) { + return (obj == null ? obj : { ${tamedevil_1.default.join(entries.map(([key, val]) => (0, tamedevil_1.default) `${tamedevil_1.default.safeKeyOrThrow(key)}: obj${tamedevil_1.default.get(val)}`), ", ")} }); +})`, callback); + } + // Fallback to slow conversion + return callback((obj) => { + if (obj == null) { + return obj; + } + return Object.keys(actualKeyByDesiredKey).reduce((memo, desiredKey) => { + memo[desiredKey] = obj[actualKeyByDesiredKey[desiredKey]]; + return memo; + }, Object.create(null)); + }); +} +/** + * A plan that returns an object resulting from extracting the given + * `actualKey` from the input and storing it as the `desiredKey` in the output. + */ +class RemapKeysStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "RemapKeysStep", + }; } + constructor($plan, actualKeyByDesiredKey) { + super(); + this.actualKeyByDesiredKey = actualKeyByDesiredKey; + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.addDependency($plan); + this.peerKey = (0, utils_js_1.digestKeys)([ + ...Object.keys(this.actualKeyByDesiredKey), + ...Object.values(this.actualKeyByDesiredKey), + ]); + } + toStringMeta() { + return (chalk_1.default.bold.yellow(String(this.dependencies[0].id)) + + ":" + + JSON.stringify(this.actualKeyByDesiredKey)); + } + optimize() { + for (const [key, val] of Object.entries(this.actualKeyByDesiredKey)) { + if (String(key) !== String(val)) { + return this; + } + } + // If we're not actually remapping, just return the parent + return this.getDep(0); + } + finalize() { + makeMapper(this.actualKeyByDesiredKey, (fn) => { + this.mapper = fn; + }); + super.finalize(); + } + execute({ count, values: [values0], }) { + return values0.isBatch + ? values0.entries.map(this.mapper) + : new Array(count).fill(this.mapper(values0.value)); + } + unbatchedExecute(_extra, value) { + return this.mapper(value); + } + deduplicate(peers) { + // Handled by peerKey + return peers; + } +} +exports.RemapKeysStep = RemapKeysStep; +/** + * A plan that returns an object resulting from extracting the given + * `actualKey` from the input and storing it as the `desiredKey` in the output. + */ +function remapKeys($step, actualKeyByDesiredKey) { + return new RemapKeysStep($step, actualKeyByDesiredKey); +} +//# sourceMappingURL=remapKeys.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/remapKeys.js.map b/grafast/grafast/dist/steps/remapKeys.js.map new file mode 100644 index 0000000000..450dcb6801 --- /dev/null +++ b/grafast/grafast/dist/steps/remapKeys.js.map @@ -0,0 +1 @@ +{"version":3,"file":"remapKeys.js","sourceRoot":"","sources":["../../src/steps/remapKeys.ts"],"names":[],"mappings":";;;AAiIA,8BAKC;;AAtID,iDAAiD;AACjD,0DAA0B;AAC1B,+DAAyD;AAQzD,wCAA2C;AAC3C,0CAAyC;AAIzC,SAAS,UAAU,CACjB,qBAA4C,EAC5C,QAA6D;IAE7D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACtD,IACE,OAAO,CAAC,KAAK,CACX,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CACb,IAAA,oCAAwB,EAAC,GAAG,CAAC,IAAI,IAAA,oCAAwB,EAAC,GAAG,CAAC,CACjE,EACD,CAAC;QACD,qCAAqC;QACrC,OAAO,mBAAE,CAAC,UAAU,CAClB,IAAA,mBAAE,EAAA;kCAC0B,mBAAE,CAAC,IAAI,CACrC,OAAO,CAAC,GAAG,CACT,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,IAAA,mBAAE,EAAA,GAAG,mBAAE,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,mBAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CACjE,EACD,IAAI,CACL;GACA,EACG,QAAQ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reverse.d.ts b/grafast/grafast/dist/steps/reverse.d.ts new file mode 100644 index 0000000000..37b9f9be5a --- /dev/null +++ b/grafast/grafast/dist/steps/reverse.d.ts @@ -0,0 +1,27 @@ +import type { ExecutionDetails, GrafastResultsList, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Returns a reversed copy of the list. + */ +export declare function reverseArray(list: readonly TData[]): TData[]; +/** + * Reverses a list. + */ +export declare class ReverseStep extends UnbatchedStep { + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + constructor(plan: Step); + execute({ indexMap, values: [values0], }: ExecutionDetails<[TData[]]>): GrafastResultsList; + unbatchedExecute(_extra: UnbatchedExecutionExtra, arr: TData[]): TData[]; + deduplicate(peers: ReverseStep[]): ReverseStep[]; +} +/** + * Reverses a list. + */ +export declare function reverse(plan: Step): ReverseStep; +//# sourceMappingURL=reverse.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/reverse.d.ts.map b/grafast/grafast/dist/steps/reverse.d.ts.map new file mode 100644 index 0000000000..750fdf00d6 --- /dev/null +++ b/grafast/grafast/dist/steps/reverse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../../src/steps/reverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,GAAG,GAAG,EAAE,IAAI,EAAE,SAAS,KAAK,EAAE,GAAG,KAAK,EAAE,CAYzE;AAED;;GAEG;AACH,qBAAa,WAAW,CAAC,KAAK,CAAE,SAAQ,aAAa,CAAC,SAAS,KAAK,EAAE,CAAC;IACrE,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAQ;IACrB,0BAA0B,UAAQ;gBAEtB,IAAI,EAAE,IAAI,CAAC,SAAS,KAAK,EAAE,CAAC;IAKxC,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,OAAO,CAAC,GAClB,EAAE,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,EAAE,CAAC;IAO5D,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE;IAIxE,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE;CAG/D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAC3B,IAAI,EAAE,IAAI,CAAC,SAAS,KAAK,EAAE,CAAC,GAC3B,WAAW,CAAC,KAAK,CAAC,CAOpB"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/reverse.js b/grafast/grafast/dist/steps/reverse.js new file mode 100644 index 0000000000..1ef74cc7c6 --- /dev/null +++ b/grafast/grafast/dist/steps/reverse.js @@ -0,0 +1,55 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReverseStep = void 0; +exports.reverseArray = reverseArray; +exports.reverse = reverse; +const step_js_1 = require("../step.js"); +/** + * Returns a reversed copy of the list. + */ +function reverseArray(list) { + if (!Array.isArray(list)) { + throw new Error(`Attempted to reverse an array, but what was passed wasn't an array`); + } + const l = list.length; + const newList = []; + for (let i = 0; i < l; i++) { + newList[i] = list[l - i - 1]; + } + return newList; +} +/** + * Reverses a list. + */ +class ReverseStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "ReverseStep", + }; } + constructor(plan) { + super(); + this.isSyncAndSafe = true; + this.allowMultipleOptimizations = true; + this.addDependency(plan); + } + execute({ indexMap, values: [values0], }) { + return indexMap((i) => { + const arr = values0.at(i); + return arr == null ? arr : reverseArray(arr); + }); + } + unbatchedExecute(_extra, arr) { + return arr == null ? arr : reverseArray(arr); + } + deduplicate(peers) { + return peers; + } +} +exports.ReverseStep = ReverseStep; +/** + * Reverses a list. + */ +function reverse(plan) { + return plan.operationPlan.cacheStep(plan, "GrafastInternal:reverse()", "", () => new ReverseStep(plan)); +} +//# sourceMappingURL=reverse.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/reverse.js.map b/grafast/grafast/dist/steps/reverse.js.map new file mode 100644 index 0000000000..0ebdfef8b1 --- /dev/null +++ b/grafast/grafast/dist/steps/reverse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reverse.js","sourceRoot":"","sources":["../../src/steps/reverse.ts"],"names":[],"mappings":";;;AAWA,oCAYC;AAwCD,0BASC;AAlED,wCAA2C;AAE3C;;GAEG;AACH,SAAgB,YAAY,CAAc,IAAsB;IAC9D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IACtB,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAa,WAAmB,SAAQ,uBAA+B;aAC9D,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,aAAa;KAC1B,AAHc,CAGb;IAIF,YAAY,IAA4B;QACtC,KAAK,EAAE,CAAC;QAJV,kBAAa,GAAG,IAAI,CAAC;QACrB,+BAA0B,GAAG,IAAI,CAAC;QAIhC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,CAAC,EACN,QAAQ,EACR,MAAM,EAAE,CAAC,OAAO,CAAC,GACW;QAC5B,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,MAAM,GAAG,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1B,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB,CAAC,MAA+B,EAAE,GAAY;QAC5D,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CAAC,KAA2B;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;;AA7BH,kCA8BC;AAED;;GAEG;AACH,SAAgB,OAAO,CACrB,IAA4B;IAE5B,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CACjC,IAAI,EACJ,2BAA2B,EAC3B,EAAE,EACF,GAAG,EAAE,CAAC,IAAI,WAAW,CAAQ,IAAI,CAAC,CACnC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/setter.d.ts b/grafast/grafast/dist/steps/setter.d.ts new file mode 100644 index 0000000000..a7b3123d22 --- /dev/null +++ b/grafast/grafast/dist/steps/setter.d.ts @@ -0,0 +1,18 @@ +import type { InputObjectTypeBakedInfo } from "../index.js"; +import { Modifier } from "./applyInput.js"; +export interface SetterCapable> { + set(key: TKey, value: TObj[TKey]): void; +} +export declare class Setter = Record, TParent extends SetterCapable = SetterCapable> extends Modifier { + static $$export: { + moduleName: string; + exportName: string; + }; + private setters; + constructor(parent: TParent); + set(key: TKey, value: TObj[TKey]): void; + apply(): void; +} +export declare function setter = Record, TParent extends SetterCapable = SetterCapable>(parent: TParent): Setter; +export declare function createObjectAndApplyChildren>(_input: Record, info: InputObjectTypeBakedInfo): TObj; +//# sourceMappingURL=setter.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/setter.d.ts.map b/grafast/grafast/dist/steps/setter.d.ts.map new file mode 100644 index 0000000000..4c11fe684d --- /dev/null +++ b/grafast/grafast/dist/steps/setter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"setter.d.ts","sourceRoot":"","sources":["../../src/steps/setter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,WAAW,aAAa,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC7D,GAAG,CAAC,IAAI,SAAS,MAAM,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAClE;AAED,qBAAa,MAAM,CACjB,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtD,OAAO,SAAS,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,CACzD,SAAQ,QAAQ,CAAC,OAAO,CAAC;IACzB,MAAM,CAAC,QAAQ;;;MAGb;IAEF,OAAO,CAAC,OAAO,CAA2C;gBAE9C,MAAM,EAAE,OAAO;IAI3B,GAAG,CAAC,IAAI,SAAS,MAAM,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI;IAIhE,KAAK,IAAI,IAAI;CAKd;AAED,wBAAgB,MAAM,CACpB,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtD,OAAO,SAAS,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,EACzD,MAAM,EAAE,OAAO,yBAEhB;AAED,wBAAgB,4BAA4B,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3E,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,IAAI,EAAE,wBAAwB,GAC7B,IAAI,CAUN"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/setter.js b/grafast/grafast/dist/steps/setter.js new file mode 100644 index 0000000000..0a2562df41 --- /dev/null +++ b/grafast/grafast/dist/steps/setter.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Setter = void 0; +exports.setter = setter; +exports.createObjectAndApplyChildren = createObjectAndApplyChildren; +const applyInput_js_1 = require("./applyInput.js"); +class Setter extends applyInput_js_1.Modifier { + static { this.$$export = { + moduleName: "grafast", + exportName: "Setter", + }; } + constructor(parent) { + super(parent); + this.setters = new Map(); + } + set(key, value) { + this.setters.set(key, value); + } + apply() { + for (const [key, value] of this.setters.entries()) { + this.parent.set(key, value); + } + } +} +exports.Setter = Setter; +function setter(parent) { + return new Setter(parent); +} +function createObjectAndApplyChildren(_input, info) { + const obj = Object.create(null); + info.applyChildren(setter({ + set(key, value) { + obj[key] = value; + }, + })); + return obj; +} +//# sourceMappingURL=setter.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/setter.js.map b/grafast/grafast/dist/steps/setter.js.map new file mode 100644 index 0000000000..1613a2a986 --- /dev/null +++ b/grafast/grafast/dist/steps/setter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"setter.js","sourceRoot":"","sources":["../../src/steps/setter.ts"],"names":[],"mappings":";;;AAiCA,wBAKC;AAED,oEAaC;AApDD,mDAA2C;AAM3C,MAAa,MAGX,SAAQ,wBAAiB;aAClB,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,QAAQ;KACrB,AAHc,CAGb;IAIF,YAAY,MAAe;QACzB,KAAK,CAAC,MAAM,CAAC,CAAC;QAHR,YAAO,GAAG,IAAI,GAAG,EAAgC,CAAC;IAI1D,CAAC;IAED,GAAG,CAA0B,GAAS,EAAE,KAAiB;QACvD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK;QACH,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;;AAvBH,wBAwBC;AAED,SAAgB,MAAM,CAGpB,MAAe;IACf,OAAO,IAAI,MAAM,CAAgB,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,4BAA4B,CAC1C,MAA2B,EAC3B,IAA8B;IAE9B,MAAM,GAAG,GAAkB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,CAAC,aAAa,CAChB,MAAM,CAAC;QACL,GAAG,CAAC,GAAG,EAAE,KAAK;YACZ,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACnB,CAAC;KACF,CAAC,CACH,CAAC;IACF,OAAO,GAAW,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/sideEffect.d.ts b/grafast/grafast/dist/steps/sideEffect.d.ts new file mode 100644 index 0000000000..ee8c759d88 --- /dev/null +++ b/grafast/grafast/dist/steps/sideEffect.d.ts @@ -0,0 +1,28 @@ +import type { PromiseOrDirect, UnbatchedExecutionExtra } from "../interfaces.js"; +import type { Multistep, UnwrapMultistep } from "../multistep.js"; +import type { Step } from "../step.js"; +import { UnbatchedStep } from "../step.js"; +/** + * Calls the given callback function for each tuple + */ +export declare class SideEffectStep extends UnbatchedStep { + private fn; + static $$export: { + moduleName: string; + exportName: string; + }; + isSyncAndSafe: boolean; + allowMultipleOptimizations: boolean; + private planDep; + constructor($plan: Step | null | undefined, fn: (value: TIn) => PromiseOrDirect); + toStringMeta(): any; + unbatchedExecute(_extra: UnbatchedExecutionExtra, value: TIn): PromiseOrDirect; +} +/** + * A plan that takes the input `$plan` and feeds each value through the `fn` + * callback. Note: if you need to pass more than one value, pass a `ListStep` + * as the `$plan` argument. + */ +declare function sideEffect(spec: TInMultistep, fn: (value: UnwrapMultistep) => PromiseOrDirect): SideEffectStep, TOut>; +export { sideEffect }; +//# sourceMappingURL=sideEffect.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/sideEffect.d.ts.map b/grafast/grafast/dist/steps/sideEffect.d.ts.map new file mode 100644 index 0000000000..778db9993e --- /dev/null +++ b/grafast/grafast/dist/steps/sideEffect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sideEffect.d.ts","sourceRoot":"","sources":["../../src/steps/sideEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,qBAAa,cAAc,CAAC,GAAG,EAAE,IAAI,CAAE,SAAQ,aAAa,CAAC,IAAI,CAAC;IAW9D,OAAO,CAAC,EAAE;IAVZ,MAAM,CAAC,QAAQ;;;MAGb;IACF,aAAa,UAAS;IACtB,0BAA0B,UAAS;IAEnC,OAAO,CAAC,OAAO,CAAgB;gBAE7B,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EAC3B,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,eAAe,CAAC,IAAI,CAAC;IAOnD,YAAY;IAIZ,gBAAgB,CACd,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE,GAAG,GACT,eAAe,CAAC,IAAI,CAAC;CAGzB;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,KAAK,CAAC,YAAY,SAAS,SAAS,EAAE,IAAI,EAC5D,IAAI,EAAE,YAAY,EAClB,EAAE,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,YAAY,CAAC,KAAK,eAAe,CAAC,IAAI,CAAC,GAClE,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,CAYrD;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/steps/sideEffect.js b/grafast/grafast/dist/steps/sideEffect.js new file mode 100644 index 0000000000..301c89fa42 --- /dev/null +++ b/grafast/grafast/dist/steps/sideEffect.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SideEffectStep = void 0; +exports.sideEffect = sideEffect; +const multistep_js_1 = require("../multistep.js"); +const step_js_1 = require("../step.js"); +/** + * Calls the given callback function for each tuple + */ +class SideEffectStep extends step_js_1.UnbatchedStep { + static { this.$$export = { + moduleName: "grafast", + exportName: "SideEffectStep", + }; } + constructor($plan, fn) { + super(); + this.fn = fn; + this.isSyncAndSafe = false; + this.allowMultipleOptimizations = false; + this.hasSideEffects = true; + this.planDep = $plan != null ? this.addDependency($plan) : null; + } + toStringMeta() { + return this.fn.displayName || this.fn.name; + } + unbatchedExecute(_extra, value) { + return this.fn(value); + } +} +exports.SideEffectStep = SideEffectStep; +/** + * A plan that takes the input `$plan` and feeds each value through the `fn` + * callback. Note: if you need to pass more than one value, pass a `ListStep` + * as the `$plan` argument. + */ +function sideEffect(spec, fn) { + if (fn.length > 1) { + throw new Error("sideEffect callback should accept one argument, perhaps you forgot to destructure the arguments?"); + } + const $in = (0, multistep_js_1.multistep)(spec); + const $result = new SideEffectStep($in, fn); + return $result; +} +//# sourceMappingURL=sideEffect.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/steps/sideEffect.js.map b/grafast/grafast/dist/steps/sideEffect.js.map new file mode 100644 index 0000000000..146fe5248e --- /dev/null +++ b/grafast/grafast/dist/steps/sideEffect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sideEffect.js","sourceRoot":"","sources":["../../src/steps/sideEffect.ts"],"names":[],"mappings":";;;AAgES,gCAAU;AA3DnB,kDAA4C;AAE5C,wCAA2C;AAE3C;;GAEG;AACH,MAAa,cAA0B,SAAQ,uBAAmB;aACzD,aAAQ,GAAG;QAChB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,gBAAgB;KAC7B,AAHc,CAGb;IAKF,YACE,KAAmC,EAC3B,EAAyC;QAEjD,KAAK,EAAE,CAAC;QAFA,OAAE,GAAF,EAAE,CAAuC;QANnD,kBAAa,GAAG,KAAK,CAAC;QACtB,+BAA0B,GAAG,KAAK,CAAC;QAQjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAClE,CAAC;IAED,YAAY;QACV,OAAQ,IAAI,CAAC,EAAU,CAAC,WAAW,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;IACtD,CAAC;IAED,gBAAgB,CACd,MAA+B,EAC/B,KAAU;QAEV,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;;AA3BH,wCA4BC;AAED;;;;GAIG;AACH,SAAS,UAAU,CACjB,IAAkB,EAClB,EAAmE;IAEnE,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,IAAA,wBAAS,EAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,OAAO,GAAG,IAAI,cAAc,CAChC,GAAG,EACH,EAAE,CACH,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/stringifyPayload.d.ts b/grafast/grafast/dist/stringifyPayload.d.ts new file mode 100644 index 0000000000..e8b9394693 --- /dev/null +++ b/grafast/grafast/dist/stringifyPayload.d.ts @@ -0,0 +1,3 @@ +import type { JSONObject } from "./interfaces.js"; +export declare function stringifyPayload(payload: JSONObject, outputDataAsString: boolean | undefined): string; +//# sourceMappingURL=stringifyPayload.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/stringifyPayload.d.ts.map b/grafast/grafast/dist/stringifyPayload.d.ts.map new file mode 100644 index 0000000000..9bfe3b2533 --- /dev/null +++ b/grafast/grafast/dist/stringifyPayload.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stringifyPayload.d.ts","sourceRoot":"","sources":["../src/stringifyPayload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,UAAU,EACnB,kBAAkB,EAAE,OAAO,GAAG,SAAS,GACtC,MAAM,CA4CR"} \ No newline at end of file diff --git a/grafast/grafast/dist/stringifyPayload.js b/grafast/grafast/dist/stringifyPayload.js new file mode 100644 index 0000000000..75630c4ed8 --- /dev/null +++ b/grafast/grafast/dist/stringifyPayload.js @@ -0,0 +1,58 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringifyPayload = stringifyPayload; +function stringifyPayload(payload, outputDataAsString) { + if (!outputDataAsString || typeof payload.data !== "string") { + return JSON.stringify(payload); + } + let str = "{"; + let first = true; + if (payload.incremental) { + throw new Error("Haven't implemented incremental yet"); + } + if (payload.errors !== undefined) { + if (!first) + str += ","; + first = false; + str += `"errors":${JSON.stringify(payload.errors)}`; + } + if (payload.data === undefined) { + // noop + } + else if (payload.data === null) { + if (!first) + str += ","; + first = false; + str += `"data":null`; + } + else if (typeof payload.data === "string") { + if (!first) + str += ","; + first = false; + str += `"data":${payload.data}`; + } + else { + throw new Error(`Expected data to be null, undefined, or a JSON string`); + } + if (payload.extensions !== undefined) { + if (!first) + str += ","; + first = false; + str += `"extensions":${JSON.stringify(payload.extensions)}`; + } + if (payload.label !== undefined) { + if (!first) + str += ","; + first = false; + str += `"label":${JSON.stringify(payload.label)}`; + } + if (payload.hasNext !== undefined) { + if (!first) + str += ","; + first = false; + str += `"hasNext":${JSON.stringify(payload.hasNext)}`; + } + str += "}"; + return str; +} +//# sourceMappingURL=stringifyPayload.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/stringifyPayload.js.map b/grafast/grafast/dist/stringifyPayload.js.map new file mode 100644 index 0000000000..01e97b4802 --- /dev/null +++ b/grafast/grafast/dist/stringifyPayload.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stringifyPayload.js","sourceRoot":"","sources":["../src/stringifyPayload.ts"],"names":[],"mappings":";;AAEA,4CA+CC;AA/CD,SAAgB,gBAAgB,CAC9B,OAAmB,EACnB,kBAAuC;IAEvC,IAAI,CAAC,kBAAkB,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC5D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,IAAI,GAAG,GAAG,GAAG,CAAC;IACd,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;Q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AE,CAAC;QAClC,IAAI,CAAC,KAAK;YAAE,GAAG,IAAI,GAAG,CAAC;QACvB,KAAK,GAAG,KAAK,CAAC;QACd,GAAG,IAAI,aAAa,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IACxD,CAAC;IACD,GAAG,IAAI,GAAG,CAAC;IACX,OAAO,GAAG,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/stripAnsi.d.ts b/grafast/grafast/dist/stripAnsi.d.ts new file mode 100644 index 0000000000..2b15bc3939 --- /dev/null +++ b/grafast/grafast/dist/stripAnsi.d.ts @@ -0,0 +1,3 @@ +export declare const ANSI_REGEXP: RegExp; +export declare function stripAnsi(str: string): string; +//# sourceMappingURL=stripAnsi.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/stripAnsi.d.ts.map b/grafast/grafast/dist/stripAnsi.d.ts.map new file mode 100644 index 0000000000..32037c9dbd --- /dev/null +++ b/grafast/grafast/dist/stripAnsi.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"stripAnsi.d.ts","sourceRoot":"","sources":["../src/stripAnsi.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAEsJ,CAAC;AAC/K,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/grafast/grafast/dist/stripAnsi.js b/grafast/grafast/dist/stripAnsi.js new file mode 100644 index 0000000000..404dd4e397 --- /dev/null +++ b/grafast/grafast/dist/stripAnsi.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ANSI_REGEXP = void 0; +exports.stripAnsi = stripAnsi; +// Extracted from https://github.com/chalk/ansi-regex MIT license +// Copyright (c) Sindre Sorhus (https://sindresorhus.com) +// Copyright (c) Benjie (https://twitter.com/benjie) +exports.ANSI_REGEXP = +// eslint-disable-next-line no-control-regex, no-useless-escape +/[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g; +function stripAnsi(str) { + return str.replace(exports.ANSI_REGEXP, ""); +} +//# sourceMappingURL=stripAnsi.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/stripAnsi.js.map b/grafast/grafast/dist/stripAnsi.js.map new file mode 100644 index 0000000000..616510799f --- /dev/null +++ b/grafast/grafast/dist/stripAnsi.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stripAnsi.js","sourceRoot":"","sources":["../src/stripAnsi.ts"],"names":[],"mappings":";;;AAMA,8BAEC;AARD,iEAAiE;AACjE,kFAAkF;AAClF,oDAAoD;AACvC,QAAA,WAAW;AACtB,+DAA+D;AAC/D,4KAA4K,CAAC;AAC/K,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,OAAO,CAAC,mBAAW,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/subscribe.d.ts b/grafast/grafast/dist/subscribe.d.ts new file mode 100644 index 0000000000..2b52ae081a --- /dev/null +++ b/grafast/grafast/dist/subscribe.d.ts @@ -0,0 +1,14 @@ +import type { AsyncExecutionResult, ExecutionArgs, ExecutionResult } from "graphql"; +import type { PromiseOrValue } from "graphql/jsutils/PromiseOrValue"; +import type { GrafastExecutionArgs } from "./index.js"; +/** + * @deprecated Second and third parameters should be passed as part of args, + * specifically `resolvedPreset` and `outputDataAsString`. + */ +export declare function subscribe(args: ExecutionArgs, resolvedPreset: GraphileConfig.ResolvedPreset | undefined, outputDataAsString?: boolean): PromiseOrValue | ExecutionResult>; +/** + * Use this instead of GraphQL.js' subscribe method and we'll automatically + * run grafastPrepare for you and handle the result. + */ +export declare function subscribe(args: GrafastExecutionArgs): PromiseOrValue | ExecutionResult>; +//# sourceMappingURL=subscribe.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/subscribe.d.ts.map b/grafast/grafast/dist/subscribe.d.ts.map new file mode 100644 index 0000000000..92bd242f42 --- /dev/null +++ b/grafast/grafast/dist/subscribe.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribe.d.ts","sourceRoot":"","sources":["../src/subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIvD;;;GAGG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,aAAa,EACnB,cAAc,EAAE,cAAc,CAAC,cAAc,GAAG,SAAS,EACzD,kBAAkB,CAAC,EAAE,OAAO,GAC3B,cAAc,CACb,cAAc,CAAC,eAAe,GAAG,oBAAoB,EAAE,IAAI,EAAE,IAAI,CAAC,GAClE,eAAe,CAClB,CAAC;AACF;;;GAGG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,oBAAoB,GACzB,cAAc,CACb,cAAc,CAAC,eAAe,GAAG,oBAAoB,EAAE,IAAI,EAAE,IAAI,CAAC,GAClE,eAAe,CAClB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/subscribe.js b/grafast/grafast/dist/subscribe.js new file mode 100644 index 0000000000..ea90f264d3 --- /dev/null +++ b/grafast/grafast/dist/subscribe.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.subscribe = subscribe; +const execute_js_1 = require("./execute.js"); +const middleware_js_1 = require("./middleware.js"); +function subscribe(args, legacyResolvedPreset, legacyOutputDataAsString) { + // TODO: remove legacy compatibility + if (legacyResolvedPreset !== undefined) { + args.resolvedPreset = legacyResolvedPreset; + } + if (legacyOutputDataAsString !== undefined) { + args.outputDataAsString = legacyOutputDataAsString; + } + const { resolvedPreset } = args; + const middleware = args.middleware === undefined && resolvedPreset != null + ? (0, middleware_js_1.getGrafastMiddleware)(resolvedPreset) + : (args.middleware ?? null); + if (args.middleware === undefined) { + args.middleware = middleware; + } + if (middleware !== null) { + return middleware.run("subscribe", { args }, subscribeMiddlewareCallback); + } + else { + return (0, execute_js_1.withGrafastArgs)(args); + } +} +const subscribeMiddlewareCallback = (event) => (0, execute_js_1.withGrafastArgs)(event.args); +//# sourceMappingURL=subscribe.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/subscribe.js.map b/grafast/grafast/dist/subscribe.js.map new file mode 100644 index 0000000000..0385b6ace1 --- /dev/null +++ b/grafast/grafast/dist/subscribe.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribe.js","sourceRoot":"","sources":["../src/subscribe.ts"],"names":[],"mappings":";;AAkCA,8BA6BC;AAxDD,6CAA+C;AAG/C,mDAAuD;AAwBvD,SAAgB,SAAS,CACvB,IAA0B,EAC1B,oBAAoD,EACpD,wBAAkC;IAKlC,oCAAoC;IACpC,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,oBAAoB,CAAC;IAC7C,CAAC;IACD,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;QAC3C,IAAI,CAAC,kBAAkB,GAAG,wBAAwB,CAAC;IACrD,CAAC;IAED,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,UAAU,GACd,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,cAAc,IAAI,IAAI;QACrD,CAAC,CAAC,IAAA,oCAAoB,EAAC,cAAc,CAAC;QACtC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC;IAChC,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IACD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,EAAE,2BAA2B,CAAC,CAAC;IAC5E,CAAC;SAAM,CAAC;QACN,OAAO,IAAA,4BAAe,EAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,MAAM,2BAA2B,GAAG,CAAC,KAAqB,EAAE,EAAE,CAC5D,IAAA,4BAAe,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/thereCanBeOnlyOne.d.ts b/grafast/grafast/dist/thereCanBeOnlyOne.d.ts new file mode 100644 index 0000000000..c916a00509 --- /dev/null +++ b/grafast/grafast/dist/thereCanBeOnlyOne.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=thereCanBeOnlyOne.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/thereCanBeOnlyOne.d.ts.map b/grafast/grafast/dist/thereCanBeOnlyOne.d.ts.map new file mode 100644 index 0000000000..b847398d59 --- /dev/null +++ b/grafast/grafast/dist/thereCanBeOnlyOne.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"thereCanBeOnlyOne.d.ts","sourceRoot":"","sources":["../src/thereCanBeOnlyOne.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/grafast/dist/thereCanBeOnlyOne.js b/grafast/grafast/dist/thereCanBeOnlyOne.js new file mode 100644 index 0000000000..a47f6afda2 --- /dev/null +++ b/grafast/grafast/dist/thereCanBeOnlyOne.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const $$grafast = Symbol.for("grafast"); +const globalAny = globalThis; +if (globalAny[$$grafast] === true) { + // Already warned +} +else if (globalAny[$$grafast]) { + console.trace(`WARNING: more than one version of the 'grafast' module has been instantiated - you must ensure there is exactly one grafast (e.g. using yarn "resolutions" or similar techniques). Try clearing your package lockfile and reinstalling.\n ${String(globalAny[$$grafast].stack).replace(/\n/g, "\n ")}`); + globalAny[$$grafast] = true; +} +else { + try { + // Capture the stack trace + throw new Error(`The first 'grafast' was installed here`); + } + catch (e) { + globalAny[$$grafast] = e; + } +} +//# sourceMappingURL=thereCanBeOnlyOne.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/thereCanBeOnlyOne.js.map b/grafast/grafast/dist/thereCanBeOnlyOne.js.map new file mode 100644 index 0000000000..f98b7c2a97 --- /dev/null +++ b/grafast/grafast/dist/thereCanBeOnlyOne.js.map @@ -0,0 +1 @@ +{"version":3,"file":"thereCanBeOnlyOne.js","sourceRoot":"","sources":["../src/thereCanBeOnlyOne.ts"],"names":[],"mappings":";;AAAA,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAExC,MAAM,SAAS,GAAG,UAEjB,CAAC;AACF,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC;IAClC,iBAAiB;AACnB,CAAC;KAAM,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;IAChC,OAAO,CAAC,KAAK,CACX,gPAAgP,MAAM,CACpP,SAAS,CAAC,SAAS,CAAC,CAAC,KAAK,CAC3B,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAC7B,CAAC;IACF,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;AAC9B,CAAC;KAAM,CAAC;IACN,IAAI,CAAC;QACH,0BAA0B;QAC1B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/timeSource.d.ts b/grafast/grafast/dist/timeSource.d.ts new file mode 100644 index 0000000000..1944fdc4e1 --- /dev/null +++ b/grafast/grafast/dist/timeSource.d.ts @@ -0,0 +1,2 @@ +export declare const timeSource: import("perf_hooks").Performance | DateConstructor; +//# sourceMappingURL=timeSource.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/timeSource.d.ts.map b/grafast/grafast/dist/timeSource.d.ts.map new file mode 100644 index 0000000000..c0fa38abc9 --- /dev/null +++ b/grafast/grafast/dist/timeSource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timeSource.d.ts","sourceRoot":"","sources":["../src/timeSource.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,oDAGb,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/timeSource.js b/grafast/grafast/dist/timeSource.js new file mode 100644 index 0000000000..206d5e9f6a --- /dev/null +++ b/grafast/grafast/dist/timeSource.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timeSource = void 0; +// performance.now() is supported in most modern browsers, plus node. +exports.timeSource = typeof performance !== "undefined" && typeof performance.now === "function" + ? performance + : Date; +//# sourceMappingURL=timeSource.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/timeSource.js.map b/grafast/grafast/dist/timeSource.js.map new file mode 100644 index 0000000000..8e6a147f1e --- /dev/null +++ b/grafast/grafast/dist/timeSource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeSource.js","sourceRoot":"","sources":["../src/timeSource.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACxD,QAAA,UAAU,GACrB,OAAO,WAAW,KAAK,WAAW,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACzE,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/utils.d.ts b/grafast/grafast/dist/utils.d.ts new file mode 100644 index 0000000000..99c0445187 --- /dev/null +++ b/grafast/grafast/dist/utils.d.ts @@ -0,0 +1,173 @@ +import type { ConstValueNode, DirectiveNode, FieldNode, GraphQLEnumValueConfig, GraphQLFieldConfig, GraphQLInputFieldConfig, GraphQLInputObjectTypeConfig, GraphQLInputType, GraphQLNamedType, GraphQLObjectTypeConfig, GraphQLOutputType, GraphQLSchema, ValueNode } from "graphql"; +import * as graphql from "graphql"; +import type { Deferred } from "./deferred.js"; +import type { OperationPlan } from "./engine/OperationPlan.js"; +import type { BaseGraphQLArguments, GrafastFieldConfig, GrafastInputFieldConfig, OutputPlanForType } from "./interfaces.js"; +import type { Step } from "./step.js"; +/** + * The parent object is used as the key in `GetValueStepId()`; for root level + * fields it's possible that the parent will be null/undefined (in all other + * cases it will be an object), so we need a value that can be the key in a + * WeakMap to represent the root. + */ +export declare const ROOT_VALUE_OBJECT: any; +export declare function assertNullPrototype(object: Record, description: string): void; +/** + * Specifically allows for the `defaultValue` to be undefined, but otherwise + * defers to {@link rawValueToValueNode} + */ +export declare function defaultValueToValueNode(type: GraphQLInputType, defaultValue: unknown): ConstValueNode | undefined; +export declare function isPromise(t: T | Promise): t is Promise; +/** + * Is "thenable". + */ +export declare function isPromiseLike(t: T | PromiseLike): t is PromiseLike; +/** + * Is a promise that can be externally resolved. + */ +export declare function isDeferred(t: T | Promise | Deferred): t is Deferred; +/** + * Returns true if array1 and array2 have the same length, and every pair of + * values within them pass the `comparator` check (which defaults to `===`). + */ +export declare function arraysMatch(array1: ReadonlyArray, array2: ReadonlyArray, comparator?: (val1: T, val2: T) => boolean): boolean; +export type ObjectTypeFields = { + [key: string]: GrafastFieldConfig; +}; +export type ObjectTypeSpec> = Omit, "fields"> & { + fields: TFields | (() => TFields); + assertStep?: TParentStep extends Step ? ((step: Step) => asserts step is TParentStep) | { + new (...args: any[]): TParentStep; + } : null; +}; +/** + * Saves us having to write `extensions: {grafast: {...}}` everywhere. + */ +export declare function objectSpec>(spec: ObjectTypeSpec): GraphQLObjectTypeConfig; +export type GrafastObjectType> = graphql.GraphQLObjectType ? U : never> & { + TParentStep: TParentStep; + TFields: TFields; +}; +/** + * @remarks This is a mess because the first two generics need to be specified manually, but the latter one we want inferred. + */ +export declare function newObjectTypeBuilder(assertStep: TParentStep extends Step ? ((step: Step) => asserts step is TParentStep) | { + new (...args: any[]): TParentStep; +} : never): >(spec: ObjectTypeSpec) => GrafastObjectType; +/** + * Saves us having to write `extensions: {grafast: {...}}` everywhere. + */ +export declare function objectFieldSpec(grafastSpec: GrafastFieldConfig, path: string): GraphQLFieldConfig; +/** + * "Constrainted identity function" for field configs. + * + * @see {@link https://kentcdodds.com/blog/how-to-write-a-constrained-identity-function-in-typescript} + */ +export declare function newGrafastFieldConfigBuilder(): , TArgs extends BaseGraphQLArguments>(config: GrafastFieldConfig) => typeof config; +export type GrafastInputFieldConfigMap = { + [key: string]: GrafastInputFieldConfig; +}; +export type InputObjectTypeSpec = Omit & { + fields: GrafastInputFieldConfigMap | (() => GrafastInputFieldConfigMap); +}; +export type GrafastInputObjectType = graphql.GraphQLInputObjectType & { + TParent: TParent; +}; +export declare function newInputObjectTypeBuilder(): (spec: InputObjectTypeSpec) => GrafastInputObjectType; +/** + * Saves us having to write `extensions: {grafast: {...}}` everywhere. + */ +export declare function inputObjectFieldSpec(grafastSpec: GrafastInputFieldConfig, path: string): GraphQLInputFieldConfig; +declare module "graphql" { + interface GraphQLEnumType { + [$$valueConfigByValue]?: Record; + } +} +declare const $$valueConfigByValue: unique symbol; +export declare function getEnumValueConfigs(enumType: graphql.GraphQLEnumType): { + [outputValue: string]: GraphQLEnumValueConfig | undefined; +}; +/** + * This would be equivalent to `enumType._valueLookup.get(outputValue)` except + * that's not a public API so we have to do a bit of heavy lifting here. Since + * it is heavy lifting, we cache the result, but we don't know when enumType + * will go away so we use a weakmap. + */ +export declare function getEnumValueConfig(enumType: graphql.GraphQLEnumType, outputValue: string): GraphQLEnumValueConfig | undefined; +/** + * Ridiculously, this is faster than `new Array(length).fill(fill)` + */ +export declare function arrayOfLength(length: number, fill?: any): any[]; +export declare const valueNodeToStaticValue: typeof graphql.valueFromAST; +export declare function findVariableNamesUsedInValueNode(valueNode: ValueNode, variableNames: Set): void; +/** + * Given a FieldNode, recursively walks and finds all the variable references, + * returning a list of the (unique) variable names used. + */ +export declare function findVariableNamesUsed(operationPlan: OperationPlan, field: FieldNode): string[]; +export declare function isTypePlanned(schema: GraphQLSchema, namedType: GraphQLNamedType): boolean; +/** + * Returns `true` if the first argument depends on the second argument either + * directly or indirectly (via a chain of dependencies). + */ +export declare function stepADependsOnStepB(stepA: Step, stepB: Step): boolean; +/** + * Returns true if stepA is allowed to depend on stepB, false otherwise. (This + * mostly relates to heirarchy.) + */ +export declare function stepAMayDependOnStepB($a: Step, $b: Step): boolean; +/** + * For a regular GraphQL query with no `@stream`/`@defer`, the entire result is + * calculated and then the output is generated and sent to the client at once. + * Thus you can think of this as every plan is in the same "phase". + * + * However, if you introduce a `@stream`/`@defer` selection, then the steps + * inside that selection should run _later_ than the steps in the parent + * selection - they should run in two different phases. Similar is true for + * subscriptions. + * + * When optimizing your plans, if you are not careful you may end up pushing + * what should be later work into the earlier phase, resulting in the initial + * payload being delayed whilst things that should have been deferred are being + * calculated. Thus, you should generally check that two plans are in the same phase + * before you try and merge them. + * + * This is not a strict rule, though, because sometimes it makes more sense to + * push work into the parent phase because it would be faster overall to do + * that work there, and would not significantly delay the initial payload's + * execution time - for example it's unlikely that it would make sense to defer + * selecting an additional boolean column from a database table even if the + * operation indicates that's what you should do. + * + * As a step class author, it's your responsiblity to figure out the right + * approach. Once you have, you can use this function to help you, should you + * need it. + */ +export declare function stepsAreInSamePhase(ancestor: Step, descendent: Step): boolean; +export declare const canonicalJSONStringify: (o: object) => string; +export declare function assertNotAsync(fn: any, name: string): void; +export declare function assertNotPromise(value: TVal, fn: any, name: string): TVal; +export declare function hasItemPlan(step: Step & { + itemPlan?: ($item: Step) => Step; +}): step is Step & { + itemPlan: ($item: Step) => Step; +}; +export declare function exportNameHint(obj: any, nameHint: string): void; +export declare function isTuple(t: any | T): t is T; +/** + * Turns an array of keys into a digest, avoiding conflicts. + * Symbols are treated as equivalent. (Theoretically faster + * than JSON.stringify().) + */ +export declare function digestKeys(keys: ReadonlyArray): string; +/** + * If the directive has the argument `argName`, return a step representing that + * arguments value, whether that be a step representing the relevant variable + * or a constant step representing the hardcoded value in the document. + * + * @remarks NOT SUITABLE FOR USAGE WITH LISTS OR OBJECTS! Does not evaluate + * internal variable usages e.g. `[1, $b, 3]` + */ +export declare function directiveArgument(operationPlan: OperationPlan, directive: DirectiveNode, argName: string, expectedKind: graphql.Kind.INT | graphql.Kind.FLOAT | graphql.Kind.BOOLEAN | graphql.Kind.STRING): Step | undefined; +export {}; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/utils.d.ts.map b/grafast/grafast/dist/utils.d.ts.map new file mode 100644 index 0000000000..33b6b07d1e --- /dev/null +++ b/grafast/grafast/dist/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EACd,aAAa,EACb,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EAElB,uBAAuB,EAEvB,4BAA4B,EAC5B,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EAEb,SAAS,EACV,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAoBtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,KAAqC,CAAC;AAEpE,wBAAgB,mBAAmB,CACjC,MAA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C,CAAC,CAAC,GAAG,SAAS,CAgBrB"} \ No newline at end of file diff --git a/grafast/grafast/dist/utils.js b/grafast/grafast/dist/utils.js new file mode 100644 index 0000000000..8cfffb7337 --- /dev/null +++ b/grafast/grafast/dist/utils.js @@ -0,0 +1,818 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.canonicalJSONStringify = exports.valueNodeToStaticValue = exports.sharedNull = exports.ROOT_VALUE_OBJECT = void 0; +exports.assertNullPrototype = assertNullPrototype; +exports.defaultValueToValueNode = defaultValueToValueNode; +exports.isPromise = isPromise; +exports.isPromiseLike = isPromiseLike; +exports.isDeferred = isDeferred; +exports.arraysMatch = arraysMatch; +exports.objectSpec = objectSpec; +exports.newObjectTypeBuilder = newObjectTypeBuilder; +exports.objectFieldSpec = objectFieldSpec; +exports.newGrafastFieldConfigBuilder = newGrafastFieldConfigBuilder; +exports.newInputObjectTypeBuilder = newInputObjectTypeBuilder; +exports.inputObjectFieldSpec = inputObjectFieldSpec; +exports.getEnumValueConfigs = getEnumValueConfigs; +exports.getEnumValueConfig = getEnumValueConfig; +exports.stack = stack; +exports.arrayOfLength = arrayOfLength; +exports.arrayOfLengthCb = arrayOfLengthCb; +exports.findVariableNamesUsedInValueNode = findVariableNamesUsedInValueNode; +exports.findVariableNamesUsed = findVariableNamesUsed; +exports.isTypePlanned = isTypePlanned; +exports.sudo = sudo; +exports.writeableArray = writeableArray; +exports.stepADependsOnStepB = stepADependsOnStepB; +exports.stepAMayDependOnStepB = stepAMayDependOnStepB; +exports.stepsAreInSamePhase = stepsAreInSamePhase; +exports.assertNotAsync = assertNotAsync; +exports.assertNotPromise = assertNotPromise; +exports.hasItemPlan = hasItemPlan; +exports.exportNameHint = exportNameHint; +exports.isTuple = isTuple; +exports.digestKeys = digestKeys; +exports.directiveArgument = directiveArgument; +const tslib_1 = require("tslib"); +const graphql = tslib_1.__importStar(require("graphql")); +const assert = tslib_1.__importStar(require("./assert.js")); +const dev_js_1 = require("./dev.js"); +const error_js_1 = require("./error.js"); +const inspect_js_1 = require("./inspect.js"); +const constant_js_1 = require("./steps/constant.js"); +const { GraphQLBoolean, GraphQLEnumType, GraphQLFloat, GraphQLID, GraphQLInputObjectType, GraphQLInt, GraphQLInterfaceType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLScalarType, GraphQLString, GraphQLUnionType, Kind, } = graphql; +/** + * The parent object is used as the key in `GetValueStepId()`; for root level + * fields it's possible that the parent will be null/undefined (in all other + * cases it will be an object), so we need a value that can be the key in a + * WeakMap to represent the root. + */ +exports.ROOT_VALUE_OBJECT = Object.freeze(Object.create(null)); +function assertNullPrototype(object, description) { + if (dev_js_1.isDev) { + assert.strictEqual(Object.getPrototypeOf(object), null, `Expected ${description} to have a null prototype`); + } +} +/** + * Converts a JSON value into the equivalent ValueNode _without_ checking that + * it's compatible with the expected type. Typically only used with scalars + * (since they can use any ValueNode) - other parts of the GraphQL schema + * should use explicitly compatible ValueNodes. + * + * WARNING: It's possible for this to generate `LIST(INT, FLOAT, STRING)` which + * is not possible in GraphQL since lists have a single defined type. This should + * only be used with custom scalars. + */ +function dangerousRawValueToValueNode(value) { + if (value == null) { + return { kind: Kind.NULL }; + } + if (typeof value === "boolean") { + return { kind: Kind.BOOLEAN, value }; + } + if (typeof value === "number") { + if (value === Math.round(value)) { + return { kind: Kind.INT, value: String(value) }; + } + else { + return { kind: Kind.FLOAT, value: String(value) }; + } + } + if (typeof value === "string") { + return { kind: Kind.STRING, value }; + } + if (Array.isArray(value)) { + return { + kind: Kind.LIST, + values: value.map(dangerousRawValueToValueNode), + }; + } + if (typeof value === "object" && value !== null) { + return { + kind: Kind.OBJECT, + fields: Object.keys(value).map((key) => ({ + kind: Kind.OBJECT_FIELD, + name: { kind: Kind.NAME, value: key }, + value: dangerousRawValueToValueNode(value[key]), + })), + }; + } + const never = value; + console.error(`Unhandled type when converting custom scalar to ValueNode: ${(0, inspect_js_1.inspect)(never)}`); + throw new Error(`Unhandled type when converting custom scalar to ValueNode`); +} +/** + * Takes a value (typically a JSON-compatible value) and converts it into a + * ValueNode that's compatible with the given GraphQL type. + */ +function rawValueToValueNode(type, value) { + if (type instanceof GraphQLNonNull) { + if (value == null) { + throw new Error("defaultValue contained null/undefined at a position that is marked as non-null"); + } + return rawValueToValueNode(type.ofType, value); + } + // Below here null/undefined are allowed. + if (value === undefined) { + return undefined; + } + if (value === null) { + return { kind: Kind.NULL }; + } + if (type === GraphQLBoolean) { + if (typeof value !== "boolean") { + throw new Error("defaultValue contained invalid value at a position expecting boolean"); + } + return { kind: Kind.BOOLEAN, value }; + } + if (type === GraphQLInt) { + if (typeof value !== "number") { + throw new Error("defaultValue contained invalid value at a position expecting int"); + } + return { kind: Kind.INT, value: String(parseInt(String(value), 10)) }; + } + if (type === GraphQLFloat) { + if (typeof value !== "number") { + throw new Error("defaultValue contained invalid value at a position expecting int"); + } + return { kind: Kind.FLOAT, value: String(value) }; + } + if (type === GraphQLString || type === GraphQLID) { + if (typeof value !== "string") { + throw new Error("defaultValue contained invalid value at a position expecting string"); + } + return { kind: Kind.STRING, value }; + } + if (type instanceof GraphQLEnumType) { + const enumValues = type.getValues(); + const enumValue = enumValues.find((v) => v.value === value); + if (!enumValue) { + console.error(`Default contained invalid value for enum ${type.name}: ${(0, inspect_js_1.inspect)(value)}`); + throw new Error(`Default contained invalid value for enum ${type.name}`); + } + return { kind: Kind.ENUM, value: enumValue.name }; + } + if (type instanceof GraphQLScalarType) { + return dangerousRawValueToValueNode(value); + } + if (type instanceof GraphQLList) { + if (!Array.isArray(value)) { + throw new Error("defaultValue contained invalid value at location expecting a list"); + } + return { + kind: Kind.LIST, + values: value.map((entry) => { + const entryValueNode = rawValueToValueNode(type.ofType, entry); + if (entryValueNode === undefined) { + throw new Error("defaultValue contained invalid list (contained `undefined`)"); + } + return entryValueNode; + }), + }; + } + if (type instanceof GraphQLInputObjectType) { + if (typeof value !== "object" || value === null) { + throw new Error("defaultValue contained invalid value at location expecting an object"); + } + const fieldDefs = type.getFields(); + const fields = []; + for (const fieldName in fieldDefs) { + const fieldDef = fieldDefs[fieldName]; + const fieldType = fieldDef.type; + const rawValue = value[fieldName] !== undefined + ? value[fieldName] + : fieldDef.defaultValue; + const fieldValueNode = rawValueToValueNode(fieldType, rawValue); + if (fieldValueNode !== undefined) { + fields.push({ + kind: Kind.OBJECT_FIELD, + name: { kind: Kind.NAME, value: fieldName }, + value: fieldValueNode, + }); + } + } + return { + kind: Kind.OBJECT, + fields, + }; + } + const never = type; + console.error(`Encountered unexpected type when processing defaultValue ${(0, inspect_js_1.inspect)(never)}`); + throw new Error(`Encountered unexpected type when processing defaultValue`); +} +/** + * Specifically allows for the `defaultValue` to be undefined, but otherwise + * defers to {@link rawValueToValueNode} + */ +function defaultValueToValueNode(type, defaultValue) { + // NOTE: even if `type` is non-null it's okay for `defaultValue` to be + // undefined. However it is not okay for defaultValue to be null if type is + // non-null. + if (defaultValue === undefined) { + return undefined; + } + return rawValueToValueNode(type, defaultValue); +} +function isPromise(t) { + return (typeof t === "object" && + t !== null && + typeof t.then === "function" && + typeof t.catch === "function"); +} +/** + * Is "thenable". + */ +function isPromiseLike(t) { + return t != null && typeof t.then === "function"; +} +/** + * Is a promise that can be externally resolved. + */ +function isDeferred(t) { + return (isPromise(t) && + typeof t.resolve === "function" && + typeof t.reject === "function"); +} +/** + * Returns true if array1 and array2 have the same length, and every pair of + * values within them pass the `comparator` check (which defaults to `===`). + */ +function arraysMatch(array1, array2, comparator) { + if (array1 === array2) + return true; + const l = array1.length; + if (l !== array2.length) { + return false; + } + if (comparator !== undefined) { + for (let i = 0; i < l; i++) { + if (!comparator(array1[i], array2[i])) { + return false; + } + } + } + else { + for (let i = 0; i < l; i++) { + if (array1[i] !== array2[i]) { + return false; + } + } + } + return true; +} +/** + * Saves us having to write `extensions: {grafast: {...}}` everywhere. + */ +function objectSpec(spec) { + const { assertStep, ...rest } = spec; + const modifiedSpec = { + ...rest, + ...(assertStep + ? { + extensions: { + ...spec.extensions, + grafast: { + assertStep, + ...spec.extensions?.grafast, + }, + }, + } + : null), + fields: () => { + const fields = typeof spec.fields === "function" ? spec.fields() : spec.fields; + const modifiedFields = Object.keys(fields).reduce((o, key) => { + o[key] = objectFieldSpec(fields[key], `${spec.name}.${key}`); + return o; + }, {}); + return modifiedFields; + }, + }; + return modifiedSpec; +} +/** + * @remarks This is a mess because the first two generics need to be specified manually, but the latter one we want inferred. + */ +function newObjectTypeBuilder(assertStep) { + return (spec) => new GraphQLObjectType(objectSpec({ assertStep, ...spec })); +} +/** + * Saves us having to write `extensions: {grafast: {...}}` everywhere. + */ +function objectFieldSpec(grafastSpec, path) { + const { plan, subscribePlan, args, ...spec } = grafastSpec; + assertNotAsync(plan, `${path ?? "?"}.plan`); + assertNotAsync(subscribePlan, `${path ?? "?"}.subscribePlan`); + const argsWithExtensions = args + ? Object.keys(args).reduce((memo, argName) => { + const grafastArgSpec = args[argName]; + // TODO: remove this code + if (grafastArgSpec.inputPlan || + grafastArgSpec.autoApplyAfterParentPlan || + grafastArgSpec.autoApplyAfterParentSubscribePlan) { + throw new Error(`Argument at ${path} has inputPlan or autoApplyAfterParentPlan or autoApplyAfterParentSubscribePlan set; these properties no longer do anything and should be removed.`); + } + const { applyPlan, applySubscribePlan, ...argSpec } = grafastArgSpec; + assertNotAsync(applyPlan, `${path ?? "?"}(${argName}:).applyPlan`); + assertNotAsync(applySubscribePlan, `${path ?? "?"}(${argName}:).applySubscribePlan`); + memo[argName] = { + ...argSpec, + ...(applyPlan || applySubscribePlan + ? { + extensions: { + ...argSpec.extensions, + grafast: { + ...argSpec.extensions?.grafast, + ...(applyPlan ? { applyPlan } : null), + ...(applySubscribePlan ? { applySubscribePlan } : null), + }, + }, + } + : null), + }; + return memo; + }, Object.create(null)) + : {}; + return { + ...spec, + args: argsWithExtensions, + ...(plan || subscribePlan + ? { + extensions: { + ...spec.extensions, + grafast: { + ...spec.extensions?.grafast, + ...(plan ? { plan } : null), + ...(subscribePlan ? { subscribePlan } : null), + }, + }, + } + : null), + }; +} +/** + * "Constrainted identity function" for field configs. + * + * @see {@link https://kentcdodds.com/blog/how-to-write-a-constrained-identity-function-in-typescript} + */ +function newGrafastFieldConfigBuilder() { + return (config) => config; +} +function inputObjectSpec(spec) { + const modifiedSpec = { + ...spec, + fields: () => { + const fields = typeof spec.fields === "function" ? spec.fields() : spec.fields; + const modifiedFields = Object.keys(fields).reduce((o, key) => { + o[key] = inputObjectFieldSpec(fields[key], `${spec.name}.${key}`); + return o; + }, {}); + return modifiedFields; + }, + }; + return modifiedSpec; +} +function newInputObjectTypeBuilder() { + return (spec) => new GraphQLInputObjectType(inputObjectSpec(spec)); +} +/** + * Saves us having to write `extensions: {grafast: {...}}` everywhere. + */ +function inputObjectFieldSpec(grafastSpec, path) { + // TODO: remove this code + if (grafastSpec.applyPlan || + grafastSpec.inputPlan || + grafastSpec.autoApplyAfterParentApplyPlan || + grafastSpec.autoApplyAfterParentInputPlan) { + throw new Error(`Input field at ${path} has applyPlan or inputPlan or autoApplyAfterParentApplyPlan or autoApplyAfterParentInputPlan set; these properties no longer do anything and should be removed.`); + } + const { apply, ...spec } = grafastSpec; + assertNotAsync(apply, `${path ?? "?"}.apply`); + return apply + ? { + ...spec, + extensions: { + ...spec.extensions, + grafast: { + ...spec.extensions?.grafast, + apply, + }, + }, + } + : spec; +} +const $$valueConfigByValue = Symbol("valueConfigByValue"); +function getEnumValueConfigs(enumType) { + // We cache onto the enumType directly so that garbage collection can clear up after us easily. + if (enumType[$$valueConfigByValue] === undefined) { + const config = enumType.toConfig(); + enumType[$$valueConfigByValue] = Object.values(config.values).reduce((memo, value) => { + memo[value.value] = value; + return memo; + }, Object.create(null)); + } + return enumType[$$valueConfigByValue]; +} +/** + * This would be equivalent to `enumType._valueLookup.get(outputValue)` except + * that's not a public API so we have to do a bit of heavy lifting here. Since + * it is heavy lifting, we cache the result, but we don't know when enumType + * will go away so we use a weakmap. + */ +function getEnumValueConfig(enumType, outputValue) { + return getEnumValueConfigs(enumType)[outputValue]; +} +/** + * It's a peculiarity of V8 that `{}` is twice as fast as + * `Object.create(null)`, but `Object.create(sharedNull)` is the same speed as + * `{}`. Hat tip to `@purge` for bringing this to my attention. + * + * @internal + */ +exports.sharedNull = Object.freeze(Object.create(null)); +/** + * Prints out the stack trace to the current position with a message; useful + * for debugging which code path has hit this line. + * + * @internal + */ +function stack(message, length = 4) { + try { + throw new Error(message); + } + catch (e) { + const lines = e.stack.split("\n"); + const start = lines.findIndex((line) => line.startsWith("Error:")); + if (start < 0) { + console.dir(e.stack); + return; + } + const filtered = [ + lines[start], + ...lines.slice(start + 2, start + 2 + length), + ]; + const mapped = filtered.map((line) => line.replace(/^(.*?)\(\/home[^)]*\/packages\/([^)]*)\)/, (_, start, rest) => `${start}${" ".repeat(Math.max(0, 45 - start.length))}(${rest})`)); + console.log(mapped.join("\n")); + } +} +/** + * Ridiculously, this is faster than `new Array(length).fill(fill)` + */ +function arrayOfLength(length, fill) { + const arr = []; + for (let i = 0; i < length; i++) { + arr[i] = fill; + } + return arr; +} +/** + * Builds an array of length `length` calling `fill` for each entry in the + * list and storing the result. + * + * @internal + */ +function arrayOfLengthCb(length, fill) { + const arr = []; + for (let i = 0; i < length; i++) { + arr[i] = fill(); + } + return arr; +} +exports.valueNodeToStaticValue = graphql.valueFromAST; +function findVariableNamesUsedInValueNode(valueNode, variableNames) { + switch (valueNode.kind) { + case Kind.INT: + case Kind.FLOAT: + case Kind.STRING: + case Kind.BOOLEAN: + case Kind.NULL: + case Kind.ENUM: { + // Static -> no variables + return; + } + case Kind.LIST: { + for (const value of valueNode.values) { + findVariableNamesUsedInValueNode(value, variableNames); + } + return; + } + case Kind.OBJECT: { + for (const field of valueNode.fields) { + findVariableNamesUsedInValueNode(field.value, variableNames); + } + return; + } + case Kind.VARIABLE: { + variableNames.add(valueNode.name.value); + return; + } + default: { + const never = valueNode; + throw new Error(`Unsupported valueNode: ${JSON.stringify(never)}`); + } + } +} +function findVariableNamesUsedInDirectives(directives, variableNames) { + if (directives !== undefined) { + for (const dir of directives) { + if (dir.arguments !== undefined) { + for (const arg of dir.arguments) { + findVariableNamesUsedInValueNode(arg.value, variableNames); + } + } + } + } +} +function findVariableNamesUsedInArguments(args, variableNames) { + if (args !== undefined) { + for (const arg of args) { + findVariableNamesUsedInValueNode(arg.value, variableNames); + } + } +} +function findVariableNamesUsedInSelectionNode(operationPlan, selection, variableNames) { + findVariableNamesUsedInDirectives(selection.directives, variableNames); + switch (selection.kind) { + case Kind.FIELD: { + findVariableNamesUsedInFieldNode(operationPlan, selection, variableNames); + return; + } + case Kind.INLINE_FRAGMENT: { + findVariableNamesUsedInDirectives(selection.directives, variableNames); + for (const innerSelection of selection.selectionSet.selections) { + findVariableNamesUsedInSelectionNode(operationPlan, innerSelection, variableNames); + } + return; + } + case Kind.FRAGMENT_SPREAD: { + findVariableNamesUsedInDirectives(selection.directives, variableNames); + const fragmentName = selection.name.value; + const fragment = operationPlan.fragments[fragmentName]; + findVariableNamesUsedInDirectives(fragment.directives, variableNames); + if (fragment.variableDefinitions?.length) { + throw new error_js_1.SafeError("Grafast doesn't support variable definitions on fragments yet."); + } + for (const innerSelection of fragment.selectionSet.selections) { + findVariableNamesUsedInSelectionNode(operationPlan, innerSelection, variableNames); + } + return; + } + default: { + const never = selection; + throw new Error(`Unsupported selection ${never.kind}`); + } + } +} +function findVariableNamesUsedInFieldNode(operationPlan, field, variableNames) { + findVariableNamesUsedInArguments(field.arguments, variableNames); + findVariableNamesUsedInDirectives(field.directives, variableNames); + if (field.selectionSet !== undefined) { + for (const selection of field.selectionSet.selections) { + findVariableNamesUsedInSelectionNode(operationPlan, selection, variableNames); + } + } +} +/** + * Given a FieldNode, recursively walks and finds all the variable references, + * returning a list of the (unique) variable names used. + */ +function findVariableNamesUsed(operationPlan, field) { + const variableNames = new Set(); + findVariableNamesUsedInFieldNode(operationPlan, field, variableNames); + return [...variableNames].sort(); +} +function isTypePlanned(schema, namedType) { + if (namedType instanceof GraphQLObjectType) { + return !!namedType.extensions?.grafast?.assertStep; + } + else if (namedType instanceof GraphQLUnionType || + namedType instanceof GraphQLInterfaceType) { + const types = namedType instanceof GraphQLUnionType + ? namedType.getTypes() + : schema.getImplementations(namedType).objects; + let firstHadPlan = null; + let i = 0; + for (const type of types) { + const hasPlan = !!type.extensions?.grafast?.assertStep; + if (firstHadPlan === null) { + firstHadPlan = hasPlan; + } + else if (hasPlan !== firstHadPlan) { + // ENHANCE: validate this at schema build time + throw new Error(`The '${namedType.name}' interface or union type's first type '${types[0]}' ${firstHadPlan ? "expected a plan" : "did not expect a plan"}, however the type '${type}' (index = ${i}) ${hasPlan ? "expected a plan" : "did not expect a plan"}. All types in an interface or union must be in agreement about whether a plan is expected or not.`); + } + i++; + } + return !!firstHadPlan; + } + else { + return false; + } +} +/** + * Make protected/private methods accessible. + * + * @internal + */ +function sudo(obj) { + return obj; +} +/** + * We want everything else to treat things like `dependencies` as read only, + * however we ourselves want to be able to write to them, so we can use + * writeable for this. + * + * @internal + */ +function writeableArray(a) { + return a; +} +/** + * Returns `true` if the first argument depends on the second argument either + * directly or indirectly (via a chain of dependencies). + */ +function stepADependsOnStepB(stepA, stepB) { + if (stepA === stepB) { + throw new Error("Invalid call to stepADependsOnStepB"); + } + // PERF: bredth-first might be better. + // PERF: we can stop looking once we pass a certain layerPlan boundary. + // PERF: maybe some form of caching here would be sensible? + // Depth-first search for match + for (const dep of sudo(stepA).dependencies) { + if (dep === stepB) { + return true; + } + if (stepADependsOnStepB(dep, stepB)) { + return true; + } + } + return false; +} +/** + * Returns true if stepA is allowed to depend on stepB, false otherwise. (This + * mostly relates to heirarchy.) + */ +function stepAMayDependOnStepB($a, $b) { + if ($a.isFinalized) { + return false; + } + if ($a._isUnaryLocked && $a._isUnary && !$b._isUnary) { + return false; + } + if (!$a.layerPlan.ancestry.includes($b.layerPlan)) { + return false; + } + return !stepADependsOnStepB($b, $a); +} +/** + * For a regular GraphQL query with no `@stream`/`@defer`, the entire result is + * calculated and then the output is generated and sent to the client at once. + * Thus you can think of this as every plan is in the same "phase". + * + * However, if you introduce a `@stream`/`@defer` selection, then the steps + * inside that selection should run _later_ than the steps in the parent + * selection - they should run in two different phases. Similar is true for + * subscriptions. + * + * When optimizing your plans, if you are not careful you may end up pushing + * what should be later work into the earlier phase, resulting in the initial + * payload being delayed whilst things that should have been deferred are being + * calculated. Thus, you should generally check that two plans are in the same phase + * before you try and merge them. + * + * This is not a strict rule, though, because sometimes it makes more sense to + * push work into the parent phase because it would be faster overall to do + * that work there, and would not significantly delay the initial payload's + * execution time - for example it's unlikely that it would make sense to defer + * selecting an additional boolean column from a database table even if the + * operation indicates that's what you should do. + * + * As a step class author, it's your responsiblity to figure out the right + * approach. Once you have, you can use this function to help you, should you + * need it. + */ +function stepsAreInSamePhase(ancestor, descendent) { + let currentLayerPlan = descendent.layerPlan; + do { + if (currentLayerPlan === ancestor.layerPlan) { + return true; + } + const t = currentLayerPlan.reason.type; + switch (t) { + case "subscription": + case "defer": { + // These indicate boundaries over which plans shouldn't be optimized + // together (generally). + return false; + } + case "polymorphic": { + // OPTIMIZE: can optimize this so that if all polymorphicPaths match then it + // passes + return false; + } + case "listItem": { + if (currentLayerPlan.reason.stream) { + // It's streamed, but we can still inline the step into its parent since its the parent that is being streamed (so it should not add to the initial execution overhead). + // OPTIMIZE: maybe we should only allow this if the parent actually has `stream` support, and disable it otherwise? + continue; + } + else { + continue; + } + } + case "root": + case "nullableBoundary": + case "subroutine": + case "mutationField": { + continue; + } + default: { + const never = t; + throw new Error(`Unhandled layer plan type '${never}'`); + } + } + } while ((currentLayerPlan = currentLayerPlan.parentLayerPlan)); + throw new Error(`${descendent} is not dependent on ${ancestor}, perhaps you passed the arguments in the wrong order?`); +} +// ENHANCE: implement this! +const canonicalJSONStringify = (o) => JSON.stringify(o); +exports.canonicalJSONStringify = canonicalJSONStringify; +// PERF: only do this if isDev; otherwise replace with NOOP? +function assertNotAsync(fn, name) { + if (fn?.constructor?.name === "AsyncFunction") { + throw new Error(`Plans must be synchronous, but this schema has an async function at '${name}': ${fn.toString()}`); + } +} +// PERF: only do this if isDev; otherwise replace with NOOP? +function assertNotPromise(value, fn, name) { + if (isPromiseLike(value)) { + throw new Error(`Plans must be synchronous, but this schema has an function at '${name}' that returned a promise-like object: ${fn.toString()}`); + } + return value; +} +function hasItemPlan(step) { + return "itemPlan" in step && typeof step.itemPlan === "function"; +} +function exportNameHint(obj, nameHint) { + if ((typeof obj === "object" && obj != null) || typeof obj === "function") { + if (!("$exporter$name" in obj)) { + Object.defineProperty(obj, "$exporter$name", { + writable: true, + value: nameHint, + }); + } + else if (!obj.$exporter$name) { + obj.$exporter$name = nameHint; + } + } +} +function isTuple(t) { + return Array.isArray(t); +} +/** + * Turns an array of keys into a digest, avoiding conflicts. + * Symbols are treated as equivalent. (Theoretically faster + * than JSON.stringify().) + */ +function digestKeys(keys) { + let str = ""; + for (let i = 0, l = keys.length; i < l; i++) { + const item = keys[i]; + if (typeof item === "string") { + // str += `|§${item.replace(/§/g, "§§")}§`; + str += `§${item.length}:${item}`; + } + else if (typeof item === "number") { + str += `N${item}`; + } + else { + str += "!"; + } + } + return str; +} +/** + * If the directive has the argument `argName`, return a step representing that + * arguments value, whether that be a step representing the relevant variable + * or a constant step representing the hardcoded value in the document. + * + * @remarks NOT SUITABLE FOR USAGE WITH LISTS OR OBJECTS! Does not evaluate + * internal variable usages e.g. `[1, $b, 3]` + */ +function directiveArgument(operationPlan, directive, argName, expectedKind) { + const arg = directive.arguments?.find((n) => n.name.value === argName); + if (!arg) + return undefined; + const val = arg.value; + return val.kind === graphql.Kind.VARIABLE + ? operationPlan.variableValuesStep.get(val.name.value) + : val.kind === expectedKind + ? (0, constant_js_1.constant)(val.kind === Kind.INT + ? parseInt(val.value, 10) + : val.kind === Kind.FLOAT + ? parseFloat(val.value) + : // boolean, string + val.value) + : undefined; +} +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/utils.js.map b/grafast/grafast/dist/utils.js.map new file mode 100644 index 0000000000..e42f35a218 --- /dev/null +++ b/grafast/grafast/dist/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAgEA,kDAWC;AA4LD,0DAWC;AAED,8BAOC;AAKD,sCAEC;AAKD,gCAQC;AAMD,kCAwBC;AAqBD,gCAqCC;AAaD,oDAaC;AAKD,0CAoEC;AAOD,oEAQC;AAqCD,8DAOC;AAKD,oDA8BC;AASD,kDAeC;AAOD,gDAKC;AAiBD,sBAuBC;AAKD,sCAMC;AAQD,0CAMC;AAID,4EAmCC;AAiGD,sDAOC;AAED,sCAsCC;AAwBD,oBAEC;AASD,wCAEC;AAMD,kDAqBC;AAMD,sDAWC;AA6BD,kDA2CC;AAMD,wCAMC;AAGD,4CAWC;AAED,kCAQC;AAED,wCAWC;AAED,0BAIC;AAOD,gCAcC;AAUD,8CAyBC;;AAxlCD,yDAAmC;AAEnC,4DAAsC;AAEtC,qCAAiC;AAGjC,yCAAuC;AACvC,6CAAuC;AASvC,qDAA+C;AAE/C,MAAM,EACJ,cAAc,EACd,eAAe,EACf,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,IAAI,GACL,GAAG,OAAO,CAAC;AAEZ;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAEpE,SAAgB,mBAAmB,CACjC,MAA+B,EAC/B,WAAmB;IAEnB,IAAI,cAAK,EAAE,CAAC;QACV,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAC7B,IAAI,EACJ,YAAY,WAAW,2BAA2B,CACnD,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;GAS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IAAI,IAAI,EAAE,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,GAAG,IAAI,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,aAA4B,EAC5B,SAAwB,EACxB,OAAe,EACf,YAIuB;IAEvB,MAAM,GAAG,GAAG,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC;IACvE,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC;IACtB,OAAO,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,QAAQ;QACvC,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QACtD,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY;YACzB,CAAC,CAAC,IAAA,sBAAQ,EACN,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG;gBACnB,CAAC,CAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAO;gBAChC,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK;oBACvB,CAAC,CAAE,UAAU,CAAC,GAAG,CAAC,KAAK,CAAO;oBAC9B,CAAC,CAAC,kBAAkB;wBACjB,GAAG,CAAC,KAAW,CACvB;YACH,CAAC,CAAC,SAAS,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/version.d.ts b/grafast/grafast/dist/version.d.ts new file mode 100644 index 0000000000..4859e2c9f3 --- /dev/null +++ b/grafast/grafast/dist/version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "0.1.1-beta.21"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/grafast/grafast/dist/version.d.ts.map b/grafast/grafast/dist/version.d.ts.map new file mode 100644 index 0000000000..1f99446fca --- /dev/null +++ b/grafast/grafast/dist/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/dist/version.js b/grafast/grafast/dist/version.js new file mode 100644 index 0000000000..14889a21af --- /dev/null +++ b/grafast/grafast/dist/version.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +// This file is autogenerated by /scripts/postversion.mjs +exports.version = "0.1.1-beta.21"; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/grafast/grafast/dist/version.js.map b/grafast/grafast/dist/version.js.map new file mode 100644 index 0000000000..5170c4e6f8 --- /dev/null +++ b/grafast/grafast/dist/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAC5C,QAAA,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/grafast/grafast/tsconfig.tsbuildinfo b/grafast/grafast/tsconfig.tsbuildinfo new file mode 100644 index 0000000000..e80f83624c --- /dev/null +++ b/grafast/grafast/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","./src/therecanbeonlyone.ts","../../utils/lru/dist/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","./src/dev.ts","./src/inspect.ts","./src/error.ts","../../node_modules/chalk/index.d.ts","../../utils/tamedevil/dist/reservedwords.d.ts","../../utils/tamedevil/dist/therecanbeonlyone.d.ts","../../utils/tamedevil/dist/index.d.ts","./src/assert.ts","./src/polymorphic.ts","../../node_modules/iterall/index.d.ts","./src/steps/__item.ts","./src/deferred.ts","./src/constraints.ts","./src/engine/lib/withgloballayerplan.ts","./src/global.ts","./src/steps/__flag.ts","./src/steps/constant.ts","./src/steps/listtransform.ts","./src/steps/each.ts","./src/steps/connection.ts","./src/steps/error.ts","./src/steps/filter.ts","./src/steps/list.ts","./src/steps/first.ts","./src/steps/groupby.ts","./src/steps/object.ts","./src/multistep.ts","./src/steps/sideeffect.ts","./src/steps/lambda.ts","./src/steps/last.ts","./src/steps/listen.ts","./src/steps/node.ts","./src/steps/partitionbyindex.ts","./src/steps/remapkeys.ts","./src/steps/reverse.ts","./src/steps/applyinput.ts","./src/steps/setter.ts","./src/steps/__trackedvalue.ts","./src/steps/__inputdefault.ts","./src/steps/__inputobject.ts","./src/input.ts","./src/steps/__inputlist.ts","./src/steps/__inputstaticleaf.ts","./src/steps/applytransforms.ts","./src/steps/bakedinput.ts","./src/steps/condition.ts","./src/steps/graphqlresolver.ts","./src/steps/load.ts","./src/steps/polymorphicbranch.ts","./src/steps/proxy.ts","./src/steps/index.ts","./src/graphqlcollectfields.ts","./src/graphqlmergeselectionsets.ts","./src/operationplan-input.ts","./src/timesource.ts","./src/engine/lib/defaultplanresolver.ts","./src/engine/lock.ts","./src/engine/executeoutputplan.ts","./src/engine/outputplan.ts","./src/engine/steptracker.ts","./src/engine/operationplan.ts","./src/utils.ts","./src/steps/access.ts","./src/steps/__value.ts","./src/engine/executebucket.ts","./src/engine/layerplan.ts","./src/step.ts","./src/steps/__inputdynamicscalar.ts","./src/exportas.ts","./src/stripansi.ts","./src/grafastprint.ts","./src/makegrafastschema.ts","./src/middleware.ts","./src/establishoperationplan.ts","./src/prepare.ts","./src/execute.ts","./src/grafastgraphql.ts","./src/stringifypayload.ts","./src/subscribe.ts","./src/version.ts","./src/index.ts","./src/bucket.ts","./src/planjsoninterfaces.ts","./src/interfaces.ts","./src/args.ts","./src/config.ts","../../node_modules/@whatwg-node/promise-helpers/typings/index.d.cts","../../node_modules/@envelop/types/typings/utils.d.cts","../../node_modules/@envelop/types/typings/graphql.d.cts","../../node_modules/@envelop/types/typings/hooks.d.cts","../../node_modules/@envelop/types/typings/plugin.d.cts","../../node_modules/@envelop/types/typings/get-enveloped.d.cts","../../node_modules/@envelop/types/typings/context-types.d.cts","../../node_modules/@envelop/types/typings/index.d.cts","../../node_modules/@envelop/instrumentation/typings/instrumentation.d.cts","../../node_modules/@envelop/instrumentation/typings/index.d.cts","../../node_modules/@envelop/core/typings/create.d.cts","../../node_modules/@envelop/core/typings/utils.d.cts","../../node_modules/@envelop/core/typings/plugins/use-envelop.d.cts","../../node_modules/@envelop/core/typings/plugins/use-logger.d.cts","../../node_modules/@envelop/core/typings/plugins/use-schema.d.cts","../../node_modules/@envelop/core/typings/plugins/use-masked-errors.d.cts","../../node_modules/@envelop/core/typings/plugins/use-error-handler.d.cts","../../node_modules/@envelop/core/typings/plugins/use-extend-context.d.cts","../../node_modules/@envelop/core/typings/plugins/use-payload-formatter.d.cts","../../node_modules/@envelop/core/typings/plugins/use-engine.d.cts","../../node_modules/@envelop/core/typings/plugins/use-validation-rule.d.cts","../../node_modules/@envelop/core/typings/document-string-map.d.cts","../../node_modules/@envelop/core/typings/index.d.cts","./src/envelop.ts","./src/mermaid.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[309,353],[79,181,254,265,273,276,309,353],[79,309,353],[79,253,258,267,273,276,309,353],[79,193,194,195,200,202,203,242,247,253,254,256,259,267,274,276,309,353],[79,181,192,193,200,251,254,273,274,276,309,353],[79,190,194,199,200,201,242,253,257,259,267,274,276,309,353],[79,242,255,259,276,309,353],[79,258,273,309,353],[79,273,309,353],[79,181,190,194,199,200,205,206,209,212,230,233,239,242,244,245,246,247,248,249,251,252,254,258,259,273,276,309,353],[79,181,190,193,194,199,200,201,242,250,254,255,258,259,273,274,276,309,353],[79,193,194,208,242,249,251,254,258,259,273,276,309,353],[79,188,262,268,271,301,309,353,368],[79,193,194,276,309,353],[79,181,190,192,193,205,247,254,273,276,309,353],[79,84,181,182,193,194,254,265,267,273,276,309,353],[79,254,309,353],[79,84,181,190,195,254,265,268,273,276,309,353],[79,194,196,242,251,254,257,259,262,274,309,353],[79,181,195,243,253,254,267,273,309,353],[79,181,194,254,273,309,353],[79,181,188,189,190,192,193,195,201,202,204,206,218,219,242,243,246,248,253,254,259,260,261,262,263,264,265,267,268,269,270,271,272,273,276,277,309,353],[79,181,194,230,231,232,243,253,254,260,267,273,276,309,353],[79,85,181,182,188,195,205,228,231,242,243,253,254,258,259,260,267,273,274,275,309,353],[79,181,242,254,259,273,276,309,353],[79,262,275,276,309,353],[79,188,309,353],[79,209,215,218,242,254,259,309,353],[79,181,194,203,242,253,254,259,267,273,276,309,353],[79,276,309,353],[79,194,276,309,353],[79,95,181,193,200,202,204,247,250,251,253,254,257,266,267,273,274,276,309,353],[79,181,193,194,195,196,199,206,207,243,249,253,254,258,267,273,276,309,353],[79,194,195,203,242,259,276,309,353],[79,230,242,259,276,309,353],[79,181,195,230,242,254,259,273,276,309,353],[79,181,200,209,215,233,242,254,259,273,276,309,353],[79,181,199,209,233,242,254,259,273,276,309,353],[79,181,209,242,254,259,273,309,353],[79,196,242,259,273,276,309,353],[79,181,205,242,254,255,256,259,273,276,309,353],[79,242,255,259,273,309,353],[79,194,196,199,242,254,259,276,309,353],[79,181,242,243,254,259,273,276,309,353],[79,193,195,200,203,206,212,242,257,258,259,274,276,309,353],[79,181,228,242,243,254,259,273,276,309,353],[79,242,259,276,309,353],[79,200,209,211,242,254,259,276,309,353],[79,194,242,243,254,259,276,309,353],[79,196,203,210,212,242,259,309,353],[79,194,195,242,254,259,276,309,353],[79,212,215,242,259,276,309,353],[79,181,195,201,202,242,254,259,273,276,309,353],[79,196,203,210,211,212,242,259,309,353],[79,203,206,207,208,209,210,211,212,213,214,215,216,217,218,220,221,222,223,224,225,226,227,228,229,230,232,234,235,236,237,238,239,240,241,242,255,256,273,309,353],[79,219,220,242,259,276,309,353],[79,209,242,259,276,309,353],[79,193,203,209,242,259,273,276,309,353],[79,193,200,203,206,212,242,257,258,259,273,274,276,309,353],[79,219,242,254,255,259,273,276,309,353],[79,181,193,194,201,209,221,242,254,255,259,273,276,309,353],[79,199,209,242,254,259,276,309,353],[79,242,254,259,276,309,353],[79,196,199,242,254,259,276,309,353],[79,228,273,309,353],[79,219,242,259,276,309,353],[79,84,181,254,265,268,273,276,309,353],[79,181,193,194,195,200,204,209,242,253,254,258,259,267,273,276,309,353],[309,353,465],[286,309,353],[286,288,289,290,291,292,293,294,295,296,297,298,299,300,309,353],[286,294,309,353],[286,290,309,353],[279,286,309,353],[287,309,353],[279,309,353],[280,283,284,309,353],[280,281,283,309,353],[280,309,353],[280,281,282,283,284,285,309,353],[280,282,309,353],[309,353,661],[309,353,629,664],[309,353,629],[309,353,629,630],[309,353,686],[309,353,676,678],[309,353,676,678,679,680,681,682],[309,353,676,678,679],[309,353,676,678,679,680],[309,353,676,678,679,680,681],[309,353,629,636],[309,353,629,639],[309,353,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690],[309,353,629,630,667,668],[309,353,629,630,667],[309,353,629,630,639],[309,353,629,630,639,650],[309,353,552],[309,353,368,403],[309,353,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463],[309,353,407],[309,353,407,411],[309,353,405,407,409],[309,353,405,407],[309,353,407,413],[309,353,406,407],[309,353,418],[309,353,407,424,425,426],[309,353,407,428],[309,353,407,429,430,431,432,433,434,435,436,437,438,439,440,441],[309,353,407,410],[309,353,407,409],[309,353,407,418],[309,353,465,466,467,468,469],[309,353,465,467],[309,353,368,403,471],[309,353,359,403],[309,353,396,403,480],[309,353,368,403,471,485,486],[309,353,472,480,484],[309,353,489,517],[309,353,488,494],[309,353,499],[309,353,494],[309,353,493],[309,353,511],[309,353,507],[309,353,489,506,517],[309,353,488,489,490,491,492,493,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518],[191,309,353],[309,353,521,525],[309,353,521,522,524],[309,353,525],[309,353,520,521,522],[309,353,365,368,403,477,478,479],[309,353,472,478,480,484,527],[309,353,366,403,529,530],[309,353,365,366,403,532],[309,353,366,403],[309,353,535],[309,353,537,543],[309,353,538,539,540,541,542],[309,353,543],[309,353,365,368,370,373,385,396,403],[309,353,403],[309,353,548],[309,353,549],[309,353,554,557],[309,353,366,396,403],[191,309,353,358,403],[309,353,365,403],[309,353,562],[309,352,353,365,368,369,373,380,396,403,404,482,483,486,487,545,561],[309,353,613],[309,353,615,617,618,619,620,621,622,623,624,625,626,627],[309,353,615,616,618,619,620,621,622,623,624,625,626,627],[309,353,616,617,618,619,620,621,622,623,624,625,626,627],[309,353,615,616,617,619,620,621,622,623,624,625,626,627],[309,353,615,616,617,618,620,621,622,623,624,625,626,627],[309,353,615,616,617,618,619,621,622,623,624,625,626,627],[309,353,615,616,617,618,619,620,622,623,624,625,626,627],[309,353,615,616,617,618,619,620,621,623,624,625,626,627],[309,353,615,616,617,618,619,620,621,622,624,625,626,627],[309,353,615,616,617,618,619,620,621,622,623,625,626,627],[309,353,615,616,617,618,619,620,621,622,623,624,626,627],[309,353,615,616,617,618,619,620,621,622,623,624,625,627],[309,353,615,616,617,618,619,620,621,622,623,624,625,626],[309,353,823,824,825,826],[309,353,822],[309,353,403,822],[309,353,822,823,824,825],[309,350,353],[309,352,353],[353],[309,353,358,388],[309,353,354,359,365,366,373,385,396],[309,353,354,355,365,373],[304,305,306,309,353],[309,353,356,397],[309,353,357,358,366,374],[309,353,358,385,393],[309,353,359,361,365,373],[309,352,353,360],[309,353,361,362],[309,353,365],[309,353,363,365],[309,352,353,365],[309,353,365,366,367,385,396],[309,353,365,366,367,381,385,388],[309,348,353,401],[309,353,361,365,368,373,385,396],[309,353,365,366,368,369,373,385,393,396],[309,353,368,370,385,393,396],[307,308,309,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402],[309,353,365,371],[309,353,372,396,401],[309,353,361,365,373,385],[309,320,324,353,396],[309,320,353,385,396],[309,315,353],[309,317,320,353,393,396],[309,353,373,393],[309,315,353,403],[309,317,320,353,373,396],[309,312,313,316,319,353,365,385,396],[309,320,327,353],[309,312,318,353],[309,320,341,342,353],[309,316,320,353,388,396,403],[309,341,353,403],[309,314,315,353,403],[309,320,353],[309,314,315,316,317,318,319,320,321,322,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,342,343,344,345,346,347,353],[309,320,335,353],[309,320,327,328,353],[309,318,320,328,329,353],[309,319,353],[309,312,315,320,353],[309,320,324,328,329,353],[309,324,353],[309,318,320,323,353,396],[309,312,317,320,327,353],[309,353,385],[309,315,320,341,353,401,403],[309,353,374],[309,353,375],[309,352,353,376],[309,350,351,352,353,354,355,356,357,358,359,360,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402],[309,353,379],[309,353,380],[309,353,365,381,382],[309,353,381,383,397,399],[309,353,365,385,386,388],[309,353,387,388],[309,353,385,386],[309,353,388],[309,353,389],[309,350,353,385],[309,353,365,391,392],[309,353,391,392],[309,353,358,373,385,393],[309,353,394],[309,353,373,395],[309,353,368,380,396],[309,353,358,397],[309,353,385,398],[309,353,372,399],[309,353,400],[309,353,358,365,367,376,385,396,399,401],[309,353,385,402],[309,353,365,385,393,403,832,833,836,837],[309,353,844,845],[309,353,844],[309,353,849],[309,353,543,852,853],[309,353,848,950],[309,353,848,951],[309,353,543,852],[309,353,848,851],[309,353,842,847,848],[309,353,368,385,403],[309,353,385,403],[309,353,877,916],[309,353,877,901,916],[309,353,916],[309,353,877],[309,353,877,902,916],[309,353,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915],[309,353,902,916],[309,353,366,385,403,476],[309,353,366,485],[309,353,368,403,477,483],[309,353,923,924],[309,353,521,923],[309,353,521,924],[309,353,693],[309,353,926],[309,353,368,373,403,613],[309,353,403,930,931,932,933,934,935,936,937,938,939,940],[309,353,929,930,939],[309,353,930,939],[309,353,920,929,930,939],[309,353,929,930,931,932,933,934,935,936,937,938,940],[309,353,930],[309,353,358,929,939],[309,353,358,403,612,926,927,928,941],[309,353,365,368,370,373,396,403],[309,353,365,368,370,373,385,393,396,402,403],[309,353,947],[309,353,568,569,573,600,601,603,604,605,607,608],[309,353,566,567],[309,353,566],[309,353,568,608],[309,353,568,569,605,606,608],[309,353,608],[309,353,565,608,609],[309,353,568,569,607,608],[309,353,568,569,571,572,607,608],[309,353,568,569,570,607,608],[309,353,568,569,573,600,601,602,603,604,607,608],[309,353,565,568,569,573,605,607],[309,353,573,608],[309,353,575,576,577,578,579,580,581,582,583,584,608],[309,353,598,608],[309,353,574,585,593,594,595,596,597,599],[309,353,578,608],[309,353,586,587,588,589,590,591,592,608],[309,353,806,807,808,809,810],[309,353,804],[309,353,805,811,812],[309,353,694],[309,353,551,556],[309,353,860,862,866,867,870],[309,353,871],[309,353,862,866,869],[309,353,860,862,866,869,870,871,872],[309,353,866],[309,353,862,866,867,869],[309,353,860,862,867,868,870],[309,353,863,864,865],[309,353,366,375,403,860,861],[81,82,88,89,309,353],[90,156,157,309,353],[81,88,90,309,353],[82,90,309,353],[81,83,84,85,88,90,93,94,309,353],[83,95,109,110,309,353],[81,88,93,94,95,309,353],[81,85,88,90,92,93,94,309,353],[81,82,93,94,95,309,353],[80,96,101,108,111,112,155,158,180,309,353],[81,309,353],[82,86,87,309,353],[82,86,87,88,89,91,102,103,104,105,106,107,309,353],[82,87,88,309,353],[82,309,353],[81,82,87,88,90,103,309,353],[88,309,353],[82,88,89,309,353],[86,88,309,353],[95,109,309,353],[81,83,84,85,88,93,309,353],[81,88,91,94,309,353],[83,92,93,94,97,98,99,100,309,353],[94,309,353],[81,85,88,90,92,94,309,353],[90,93,309,353],[90,309,353],[81,88,94,309,353],[82,88,93,104,309,353],[93,159,309,353],[90,94,309,353],[88,93,309,353],[93,309,353],[81,91,309,353],[81,88,309,353],[88,93,94,309,353],[113,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,309,353],[93,94,309,353],[85,88,309,353],[81,88,92,93,94,106,309,353],[81,85,88,94,309,353],[81,85,88,309,353],[114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,309,353],[106,114,309,353],[114,309,353],[81,88,90,93,113,114,309,353],[81,88,90,92,93,94,106,113,309,353],[309,353,554],[196,309,353,555],[309,353,695],[309,353,696,738],[309,353,519,696,734,737],[309,353,736,738],[309,353,489,517,696,735,736,742,814,815],[309,353,692,696,735,736,737,738,739,740,742,816,817,818],[309,353,696,735,737,738],[309,353,629,691],[309,353,738,742,816],[309,353,742],[309,353,489,517,735,742,803,813,819],[309,353,735,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802],[309,353,489,517,735,742],[309,353,696,741,803],[309,353,696],[309,353,489,517,519,696,735],[309,353,365,389,403],[309,353,403,833,834,835],[309,353,385,403,833],[309,353,839],[309,353,553],[309,353,874],[309,353,366,873],[309,353,610],[309,353,522,564,609],[309,353,522,610],[309,353,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726],[309,353,712],[309,353,712,723],[309,353,698,714],[309,353,714],[309,353,721],[309,353,697],[309,353,698],[309,353,706],[309,353,728],[309,353,727,729,730,731,732,733],[309,353,730],[309,353,729],[309,353,368,373,393,396,399,521,526,564,610,611,612],[183,309,353],[183,184,309,353],[183,184,185,186,187,309,353],[197,198,309,353]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"243cde3e94962d3a3683967fd060231cfa852b82ed1dd37830ec9e01af159c55","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"acb2779a490d980d82d87b3bab178955975784e7331111ca61400decff66a114","signature":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"595ec9cfd45edf272e35bb1a723a2bc0161aa699f2d2fa08bc3bb62a7107c7b6","signature":"d751081230981b36b832737b9a64081b67b29a778905a388d2aa9091e6fc3629","impliedFormat":1},{"version":"4c29a1bb397a8cdcfc26f261727f5361843c0bf64f9c2f3068ac6cec4c15f365","signature":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"53e75027dd1b06ae5d4a3da1cff89d04303b9ef30c5d47b2f8ead4b8616e4549","impliedFormat":1},{"version":"516f341210dea50c84646ee54f7d0cfee42efc76756b45dd46b09c34758e786b","impliedFormat":1},{"version":"812210fbee321e58333269b3e2bce9423c09177dfebba5896ab7eafc7aa7db08","impliedFormat":1},{"version":"468cf4f93fde977fa171a9e65d9eb891ab595197f6cbc4db16f7f4e33027ffe1","signature":"15a5bc7ecfc0cc5662751cda78cd4abc1dfe205021b5f578f47748e74976f755","impliedFormat":1},{"version":"81ac75a0808611b4f51275c79dd0fc65ce4e7ac5f2aacf9a606ce7155d586f0e","signature":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"9bb0d39d8ebf3d1cb039ea6353a4ff47598516c913bc07395cae41fbf7783266","signature":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"9f3b9b476a673852c5ac4cb51bc1234592680f6bcdede8ee33aae94948b61cbc","signature":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"ce4a638567b7f584309ae629a74b1bbd4bd923721e39c4a0f566f7abd307f3fa","signature":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"77e53c3f89278737e1113bcd2b1cbfc77ad50876a4088db4e35e85276458eab2","signature":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2f9c8935b798063a85edaf5799fb363fba0d01164219c863ccd470a15638043a","signature":"efa370b650d0c7ec471345f9ecba0738be9b51191db2ec130a9a88b0c50fc212","impliedFormat":1},{"version":"aecfd3a450fc0917c355852e2c1950b6ac8913c006e60834e1e665280ebad33c","signature":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"f8212c76a1c437613e4532efd3294808d7f93b695b250c253adf382b483b6757","signature":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"58c690aed139c8a3d43593f8798f5d52177c1c9ed83b4acd102438773bfbe200","signature":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"52dabe16a4b4a2bba7485415a92e8d0da1eab8d100d8d3ccf843da98feea73f5","signature":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"032d93ee8c94b47db8e193f3da22618f6f097c40cdb0e9332c1b8f5c5fdea264","signature":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"4ecfe003c7d534cf560b8172a23bfa4bfe661202b8ba94d2720d82a29b7ba161","signature":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"c467cb2ea435aa8fcfc25e7eb29387b5275e277452d28fa735ccb77fe4a77259","signature":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"4492cc459a524404d8d86286afb6c60e9f28e96ec57f912060c1f111979cfa41","signature":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"935cfab261ca70b6f3a257a26b9826456e58e4eacd1d22aabda19f05cfddcdff","signature":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"5373dc4b862633664102b2cbc439664ce5c9e760e64c9707434445771f6fcd47","signature":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"3de417f555cd280cbfdf189eb43ce1fc29158b41726d5c59340b43111e71ef93","signature":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"85c4dc842c9da313c8428b470f70ac3b365d7c7cb204d565b976b84655a56bc1","signature":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"5ffbbb1ddd2ddc4de43f5db7f87bc6654a321b6974fcc557c9b9fd358ae3d499","signature":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"f545a1e001dd10e47b718437a2dbad22abd087256380f07ac56eb27a5002ff70","signature":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"dd2a3a01816f024c2a083bd0d1b56c208b1c28fa64e4960a76a4b179686c04e3","signature":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"938efed2ef842a4701b3709b7f79ac9a568cc807d936f9a73e941ab5c6a1f03d","signature":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"8d3582e8d3e817cd3ab6594e44fcd28159b9b7a6f4a78e485d2f70958d0391a5","signature":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"8b6fb756f8ce467ec38abb739ddd95ddd6581c6f0f4f85bc21d8ec0654725cec","signature":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"561895242300100aae9b8e1040775390a939e088419a435345558213eb77dabf","signature":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"90b6c12cc8806dd2f06d32dc7c98fafc40d2bd7b48dd12d2cf5c369478513b64","signature":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"fbda0c4c956d5b9775834c8ef96552fc493c03849481eab02567de0268297368","signature":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"6e2799243f10591e733d8298991b5bbe05c2843bde33dd58a0dc8df5b1a00a15","signature":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"d25be2f8647e335f1af74d4f81c5a63c834906968282b2a6708c68e6235cbba2","signature":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"27a6d80946feb7b9a900add8072f38be6dc4695765db88d9788117df568e473f","signature":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"77171027fbc01c7f2cf000fe6770def94d1f4d031a7b1dd1219819007854f6be","signature":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"4393b282f6785ac4e47dc167282bc48095a5d1b509d58aaa952e25b7b122c6f5","signature":"74554e93cc78df58bc49058d883b5f2d9789a344e003c49ff826832d7578f9ef","impliedFormat":1},{"version":"bedaef6b08b1d5d93be669a20e6d31ac66130fa50a4abab6884cef5af1e71e7d","signature":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"395fc93c764302a143e0196bae758081fe6f798cddf5877529ce4f22d1b0b641","signature":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"4c7d0fcf1226d998329ce1a7f6433997803ae88db4c22c15bf57783786fa1322","signature":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"6dcba7dfcb58f06e2e73e0a637863b13ffef33ff1a0a153f1eea0f221d10a2d7","signature":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"018ae8f639ff95a849a6e7be2688580bd64ab24aecc136ead3d70401ba3b4528","signature":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"8e9acbd818ffe73593cac7781cb693bf9f75fa39d962841c936f9d711c7d0c05","signature":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"0c9a4b53127cadb73923325b4c1c7e4d884cc03692c54d3a432fc29b6b51e003","signature":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"7490bf7ee959315b65c74f235b8c5000caa8ef1f4f9a232d066be991105d0736","signature":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"d26805067fbec1e3951dba1545d1e7bc021790eddd5da556dba021d54aff8eb1","signature":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"a69e264258f4244b58d063d46a5359fd6e5f73c4fbb1968a0168202739c6394c","signature":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"1c7ae9cf219147615a2957d6e17f75140cddbb7a07b35d6626ad98a9eaa588c7","signature":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"c3b70fbc58ba416db174c58cf11bd8a8247fa3f24b1550a16597ad3ca971813c","signature":"a8e160bd386542c9bb11ac35a7a2525e8c4168db26c58fa6dcdeb0d517d5b692","impliedFormat":1},{"version":"ea867c9fe2c8b06c2e3ebb57cd01055dcd773e3eeec1d2ce5bd3a78930112cab","signature":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"a2f1623e9417bd41fd639b1c94796731e6b1473995e6ab3f6bb2aa246d532e8a","signature":"e73aeb1d7d4224e86cfa83db2cf53f0acbb5b32a12ecd9e72da80dfd3f9bbe7a","impliedFormat":1},{"version":"0a917647382844d5e1cdc0b116fb4c7f77aa727b1c6821555687ad10c6cfa266","signature":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"5fbd37f56f44d968e6fe18f3f192d564f5534747f21a70095bb6a50b16fb4305","signature":"2a0e3120d243cf93b4e50322bcc886fb04dc2df6f77ca6ca7b48dff45e8034d0","impliedFormat":1},{"version":"d4bd318874b01ed5a0e5bcff6c382fba0543f7aaa909a38f16d39bad06bd4481","signature":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"7e2cbf142789600ac5b76bdebdc54c87c11116cc686e149ebc9df72daeb1d9f9","signature":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"c8d7921f804fb45fe247e9f802fce808dee83d6de45f54259d39ec0e20310ae9","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"ec059fbf16f3533522243066aa181f650738cc625884caaa4a351293131f1743","signature":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"fbf36d423b5e6226763f54d4a1b75abb4e7b275c9b19461b91066f1de5918318","signature":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"61838a7f75d37b446c5208851537c58cb543b00df15d76533621cc6cb883cb72","signature":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"692bf5f858791336c877aafa792acb71fde35cc192c35338858d3042680c2edb","signature":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"db253eafa5d8e7ffa72c70977f500babdf6998884a0026e629955a009cc8db2d","signature":"4d23c9ce1fa0528517d08b9a1d8eedad75323da6551ce886e88c7fa980fe7bb6","impliedFormat":1},{"version":"855022a8e1c01c62acdfa74e785d05ec7163cdc1e93b84a6375cf63c54bb32ab","signature":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"58e5c166fe45d6165f880aa71a9c2c27d7ce6c31edbbd2dacb270550dbf60217","signature":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"853bda62240280291f1f59d953650b866a3e9e9a1c5af8f4e0825e5808547f86","signature":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"a70ddbc1ba610cab23eb6e700db98b4cecc1a51af14d373fe3303148c5373d4f","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"54840a23b71134ac887f3ca3488a4951fd1828977e926bd54ee5851311674adb","signature":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"ed64ec5838eeb43b490902520d41e1cd08fb68493d7b2f0b86ea4cb881e009b5","signature":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7828b13c2c5f8db99eba5055d150f758d05d8dbf4ed71db84bd3db4ed81d75e8","signature":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"f9a408e2d585b143e9637518ccb6fdad347baf63c5bea09ca0a411741ed86060","signature":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"36b15957f3412254d6909d7ef628bc4949071c8ff06961ed68d9f13a1a653ad7","signature":"c2d95b6ca7230891fcf73723108b22380b1acb96d6243a2c3b6a7f05bc7902a0","impliedFormat":1},{"version":"b4c8c466f4210fd2906c99025c612001a7f67f483751d44611c668c8051ed555","signature":"b072aa8c420599d4a0c9182084510f8f9b914a0b049910e0f752b19a4df939b2","impliedFormat":1},{"version":"a781670becbf5cd69a01c39bbbc1585b4667f2045df4139d30760f89acae0383","signature":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"c505d5f3a72f75a694091b24bbaeff6d8451537ca931dc8e95c9809311c0169b","signature":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"6bcbca70b20d58c36dce2c2575e2deaf3f0c5ec02d97010d01301481c7535065","signature":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"c11f1c7c927aeea2bcfb6cd97762cc3447ebd2b1ed46d02da7a7bf67e740ec71","signature":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"ae02b8906b7572795aa79612928773d957fe14296c48050de1faebbd9c6640d0","signature":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"c5ec2ede198300f8ad6350c5c8fe29ca388669df3e670e630dd3bedcf51b02f6","signature":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"be50ede8a4860be68ec43eca0411be0b58cf1601a7bad6d9aa4e01b4e6b4c418","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"5c6f43ff66c30a37ef306c5bba964726c541afe0a7d96de6bcb90caf74bcbdf9","signature":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"b1bce7f8cf4b2a5f25f33de5e615d4033532a98ea2b19bbaca198e1ed0f6c67a","signature":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"b9784c7ae759fa5d157665df8f9154ea08db85967eb52ae55baadc8c6169d73d","signature":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"b9ac5494a7b36f5aef129d817236c088885296569e48e8b4ee428a1a2b0740be","signature":"ac7fec4c5a19d9b2e0ba77a6045478cd8c6f9767a8a7000ebfa4612bac2ed00c","impliedFormat":1},{"version":"0f6eaa7bc8029e73058f9994d2b5083e0dcdab0a207397dc3446d82df6fc9a51","impliedFormat":1},{"version":"0ba4ae0808c4f9aff6bc8ad71680861aa124b2fb7579e648eed262a5bc6bfd4f","impliedFormat":1},{"version":"ef28deabba43cca7acfaf6f5d75a7ef65342c95c42e13abe0d60d70f2ada113d","impliedFormat":1},{"version":"22dac6bb7d3681dfc86509727deab4d3593ed81fdd1156ffe0f3196414372624","impliedFormat":1},{"version":"716388fac8967b1479097de38a9ecafbb06f65d479d80221c3cdf80c6b03bf8b","impliedFormat":1},{"version":"485ce84a2e2c29a7f50819be204670d079d4cf87fad634d025181872b66c10c4","impliedFormat":1},{"version":"8571d0d500038b851e99ea611fd51c41259550685a7afca8a921732ff758b01e","impliedFormat":1},{"version":"23028135160c7b164e6f09317ff80168b688ae150bd9a99954b3f8840a8046fd","impliedFormat":1},{"version":"f1faa3bad5cd9e57221700c0a25a306bc411971a00cfee559ad93e23f7ee663d","impliedFormat":1},{"version":"a11f87984c9661ea33da75c9582545900f2c900c6663b766518f8700a2e443ef","impliedFormat":1},{"version":"f91a7d05afb252a08ff7c867cbdf3d2a45758e28e3fd272a4c77ba2c940251a1","impliedFormat":1},{"version":"82b59f6e26149c9daee7d25458a8e92d9a6e831ff30c345c01ed7438c4b73fbb","impliedFormat":1},{"version":"daa771190928d0a5fb9d18135397087d63d13f23ebe899a9f2b72416492e1e75","impliedFormat":1},{"version":"7f9835185d1d2404c9a83bf516340f3ac0cd79f9363d4e48195ac6f70b8da62f","impliedFormat":1},{"version":"85d4be2bac99c440d93113d1613163bf3c8f11b5bd9112d3a26d9e16376cdc76","impliedFormat":1},{"version":"73e0fc700725b01d37fd169d71a6bcecc6a46c2ff81d5cc9f6b25eaf809c9889","impliedFormat":1},{"version":"00b5d0e3c24ce1d3f9feaef698b746fec7ed3594a69620e19b2f2dbe37c334be","impliedFormat":1},{"version":"3d52b11e160b46cc21959f96603225f203c05be09937bd158015ba3842659f9f","impliedFormat":1},{"version":"0a077f4a3167699a2641066e601f72de9473f36a7c8b82837388864e7eb607aa","impliedFormat":1},{"version":"8a15aa7c47b0bd7de370741ad2e918fd05a246166f2dd407673dac7ca2d3d36b","impliedFormat":1},{"version":"fffa755863c80aa266c9723381923cac427e737fd265e3a179c61ce0dd5ed3d2","impliedFormat":1},{"version":"b9a34c74d148a26614c30051c17bd98437c84b7202da3693bbb4138af453591f","impliedFormat":1},{"version":"0fed0e7547e58a507103a3798a3dbd704635abe6c5f1e12fd0be31ab8751c5f7","impliedFormat":1},{"version":"c266dcec43aa6882b5f12eb0b8618d93ce0875b753dcc3cdd697b76064cbb709","signature":"1ac597e0fe1325883bd8fdc9a914f788e9a37f02808bba38da05f39ad468c121","impliedFormat":1},{"version":"6aeaff9d5d9e2e1f39cb70787764887ab9cb91a4968a422e409e1e5110a578ce","signature":"0fd310a550f41282f2331513b61cc3add05d3126c9fa4440d7501c42deeb6af2","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[189,[193,195],200,201,[203,278],302,303],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":9,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[949,1],[310,1],[277,2],[200,3],[274,4],[278,3],[205,3],[204,3],[193,3],[257,5],[250,6],[258,7],[248,8],[206,9],[249,10],[253,11],[251,12],[252,13],[302,14],[195,15],[266,16],[268,17],[261,18],[207,3],[269,19],[263,20],[244,21],[245,22],[273,23],[233,24],[194,3],[276,25],[264,26],[303,27],[265,28],[219,29],[246,30],[275,31],[201,32],[267,33],[259,34],[208,35],[231,36],[260,37],[234,38],[232,39],[235,40],[203,41],[230,42],[256,43],[255,44],[228,45],[236,46],[237,47],[238,48],[212,49],[209,50],[211,51],[213,52],[214,51],[216,53],[239,54],[217,55],[243,56],[221,57],[222,53],[215,58],[223,59],[210,60],[240,61],[224,62],[218,63],[225,55],[241,40],[242,64],[226,65],[227,48],[229,66],[220,67],[270,31],[262,3],[271,68],[189,3],[247,3],[254,69],[272,3],[667,1],[467,70],[465,1],[289,71],[300,1],[301,72],[298,71],[291,71],[295,73],[296,71],[292,74],[294,71],[297,71],[293,71],[299,71],[290,75],[288,76],[287,77],[285,78],[284,79],[281,80],[282,79],[286,81],[283,82],[280,77],[629,1],[663,83],[662,83],[661,1],[665,84],[666,84],[664,1],[632,1],[630,85],[633,86],[631,86],[634,1],[673,1],[674,1],[678,1],[675,1],[685,85],[684,1],[686,1],[687,87],[679,88],[683,89],[680,90],[676,1],[681,91],[682,92],[677,1],[649,85],[645,85],[648,85],[647,85],[646,85],[642,85],[641,85],[644,85],[643,85],[636,85],[637,93],[635,1],[640,94],[638,85],[691,95],[670,96],[672,96],[671,96],[668,97],[669,96],[689,1],[688,1],[690,1],[650,98],[651,1],[654,1],[657,1],[652,1],[659,1],[660,99],[656,1],[653,1],[655,1],[658,1],[639,1],[551,1],[553,100],[552,1],[404,101],[377,1],[405,1],[406,1],[407,1],[464,102],[408,103],[453,104],[410,105],[409,106],[411,103],[412,103],[414,107],[413,103],[415,108],[416,108],[417,103],[419,109],[420,103],[421,109],[422,103],[424,103],[425,103],[426,103],[427,110],[423,103],[428,1],[429,111],[430,111],[431,111],[432,111],[433,111],[442,112],[434,111],[435,111],[436,111],[437,111],[439,111],[438,111],[440,111],[441,111],[443,103],[444,103],[418,103],[445,109],[447,113],[446,103],[448,103],[449,103],[450,114],[452,103],[451,103],[454,103],[456,103],[457,115],[455,103],[458,103],[459,103],[460,103],[461,103],[462,103],[463,103],[470,116],[466,70],[468,117],[469,70],[472,118],[473,119],[474,1],[475,1],[481,120],[471,101],[482,1],[487,121],[485,122],[488,1],[490,123],[491,123],[492,1],[493,1],[495,124],[496,1],[497,1],[498,123],[499,1],[500,1],[501,125],[502,1],[503,1],[504,126],[505,1],[506,127],[507,1],[508,1],[509,1],[510,1],[513,1],[512,128],[489,1],[514,129],[515,1],[511,1],[516,1],[517,123],[518,130],[519,131],[192,132],[526,133],[525,134],[524,135],[520,1],[523,136],[521,1],[480,137],[528,138],[527,137],[531,139],[494,1],[533,140],[534,141],[536,142],[538,143],[539,143],[540,143],[537,1],[543,144],[541,145],[542,145],[544,1],[545,1],[483,1],[546,146],[547,147],[548,1],[549,148],[550,149],[558,150],[522,1],[529,151],[530,1],[559,152],[486,1],[560,153],[563,154],[561,154],[562,155],[614,156],[616,157],[617,158],[615,159],[618,160],[619,161],[620,162],[621,163],[622,164],[623,165],[624,166],[625,167],[626,168],[627,169],[628,142],[476,1],[532,1],[820,1],[821,1],[827,170],[824,171],[823,172],[826,173],[822,1],[825,171],[191,1],[828,147],[350,174],[351,174],[352,175],[309,176],[353,177],[354,178],[355,179],[304,1],[307,180],[305,1],[306,1],[356,181],[357,182],[358,183],[359,184],[360,185],[361,186],[362,186],[364,187],[363,188],[365,189],[366,190],[367,191],[349,192],[308,1],[368,193],[369,194],[370,195],[403,196],[371,197],[372,198],[373,199],[327,200],[337,201],[326,200],[347,202],[318,203],[317,204],[346,147],[340,205],[345,206],[320,207],[334,208],[319,209],[343,210],[315,211],[314,147],[344,212],[316,213],[321,214],[322,1],[325,214],[312,1],[348,215],[338,216],[329,217],[330,218],[332,219],[328,220],[331,221],[341,147],[323,222],[324,223],[333,224],[313,225],[336,216],[335,214],[339,1],[342,226],[374,227],[375,228],[376,229],[378,230],[379,231],[380,232],[381,233],[382,233],[383,234],[384,1],[385,235],[387,236],[386,237],[388,238],[389,239],[390,240],[391,241],[392,242],[393,243],[394,244],[395,245],[396,246],[397,247],[398,248],[399,249],[400,250],[401,251],[402,252],[829,147],[830,1],[831,1],[837,253],[832,1],[838,1],[841,1],[842,1],[843,1],[478,1],[846,254],[845,255],[479,1],[850,256],[855,257],[854,258],[857,257],[856,259],[853,260],[851,1],[852,261],[847,1],[849,262],[858,263],[859,1],[876,264],[901,265],[902,266],[877,267],[880,267],[899,265],[900,265],[890,265],[889,268],[887,265],[882,265],[895,265],[893,265],[897,265],[881,265],[894,265],[898,265],[883,265],[884,265],[896,265],[878,265],[885,265],[886,265],[888,265],[892,265],[903,269],[891,265],[879,265],[916,270],[915,1],[910,269],[912,271],[911,269],[904,269],[905,269],[907,269],[909,269],[913,271],[914,271],[906,271],[908,271],[477,272],[918,273],[917,122],[484,274],[919,101],[920,1],[921,1],[922,1],[925,275],[924,276],[923,277],[694,278],[693,1],[927,279],[535,1],[943,280],[941,281],[940,282],[931,283],[932,284],[939,285],[933,284],[934,283],[935,283],[936,283],[937,286],[930,287],[938,282],[929,1],[942,288],[944,289],[945,1],[946,290],[947,1],[948,291],[279,1],[609,292],[566,1],[568,293],[567,294],[572,295],[607,296],[604,297],[606,298],[569,297],[570,299],[574,299],[573,300],[571,301],[605,302],[603,297],[608,303],[601,1],[602,1],[575,304],[580,297],[582,297],[577,297],[578,304],[584,297],[585,305],[576,297],[581,297],[583,297],[579,297],[599,306],[598,297],[600,307],[594,297],[596,297],[595,297],[591,297],[597,308],[592,297],[593,309],[586,297],[587,297],[588,297],[589,297],[590,297],[565,1],[928,1],[311,1],[196,1],[848,1],[811,310],[807,1],[808,1],[806,1],[809,1],[810,1],[812,1],[804,1],[805,311],[813,312],[695,313],[182,1],[557,314],[871,315],[872,316],[870,317],[873,318],[867,319],[868,320],[869,321],[863,319],[864,319],[866,322],[865,319],[862,323],[90,324],[158,325],[157,326],[156,327],[95,328],[111,329],[109,330],[110,331],[96,332],[181,333],[81,1],[85,1],[83,334],[84,1],[88,335],[91,1],[108,336],[86,1],[103,337],[89,338],[104,339],[107,340],[105,340],[102,341],[82,1],[87,1],[106,342],[112,343],[100,1],[94,344],[92,345],[101,346],[98,347],[97,347],[93,348],[99,349],[177,350],[171,351],[164,352],[163,353],[172,354],[173,340],[165,355],[178,356],[159,357],[160,358],[161,359],[180,360],[162,353],[166,356],[167,361],[174,362],[175,338],[176,361],[179,340],[168,359],[113,363],[169,364],[170,365],[155,366],[153,367],[154,367],[117,367],[118,367],[119,367],[120,367],[121,367],[122,367],[123,367],[124,367],[125,367],[145,367],[126,367],[127,367],[128,367],[129,367],[130,367],[131,367],[152,367],[132,367],[133,367],[134,367],[135,367],[150,367],[136,367],[151,367],[137,367],[148,367],[149,367],[138,367],[139,367],[140,367],[146,367],[147,367],[141,367],[142,367],[143,367],[144,367],[116,368],[115,369],[114,370],[80,1],[202,1],[555,371],[556,372],[861,1],[696,373],[739,374],[738,375],[737,376],[740,1],[816,377],[815,1],[819,378],[817,379],[692,380],[818,381],[741,382],[814,383],[803,384],[743,385],[744,385],[745,385],[746,385],[747,385],[800,385],[748,385],[749,385],[750,385],[751,385],[752,385],[753,385],[754,385],[755,385],[799,385],[756,385],[757,385],[758,385],[759,385],[760,385],[761,385],[762,385],[763,385],[764,385],[765,385],[766,385],[767,385],[802,385],[768,385],[769,385],[770,385],[771,385],[772,385],[773,385],[774,385],[775,385],[776,385],[777,385],[778,385],[779,385],[801,385],[780,385],[781,385],[782,385],[783,385],[784,385],[785,385],[786,385],[787,385],[788,385],[789,385],[790,385],[791,385],[792,385],[793,385],[794,385],[795,385],[796,385],[797,385],[798,385],[742,386],[735,387],[736,388],[860,389],[836,390],[833,147],[835,391],[834,1],[839,1],[840,392],[554,393],[875,394],[874,395],[611,396],[610,397],[564,398],[926,1],[612,1],[844,255],[79,1],[727,399],[713,400],[724,401],[697,1],[715,402],[714,1],[716,403],[722,404],[721,1],[698,1],[719,1],[720,1],[706,405],[701,1],[700,406],[699,1],[708,1],[725,407],[704,405],[707,1],[712,1],[705,405],[702,406],[703,1],[709,406],[710,406],[723,1],[718,1],[726,1],[717,1],[728,1],[711,1],[729,408],[730,408],[734,409],[731,410],[732,411],[733,410],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[613,412],[184,413],[185,414],[188,415],[183,1],[186,413],[187,413],[190,1],[199,416],[197,1],[198,1]],"latestChangedDtsFile":"./dist/mermaid.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/index.d.ts b/grafast/grafserv-persisted/dist/index.d.ts new file mode 100644 index 0000000000..ac4a2d3031 --- /dev/null +++ b/grafast/grafserv-persisted/dist/index.d.ts @@ -0,0 +1,86 @@ +import type { ParsedGraphQLBody, ProcessGraphQLRequestBodyEvent } from "grafserv"; +export type { PersistedOperationGetter } from "./interfaces.js"; +import type { PersistedOperationGetter } from "./interfaces.js"; +declare global { + namespace GraphileConfig { + interface Plugins { + PersistedPlugin: true; + } + } +} +declare const PersistedPlugin: GraphileConfig.Plugin; +export default PersistedPlugin; +declare global { + namespace GraphileConfig { + interface GrafservOptions { + /** + * This function will be passed a GraphQL request object (normally + * `{query: string, variables?: any, operationName?: string, extensions?: any}`, + * but in the case of persisted operations it likely won't have a `query` + * property), and must extract the hash to use to identify the persisted + * operation. For Apollo Client, this might be something like: + * `request?.extensions?.persistedQuery?.sha256Hash`; for Relay something + * like: `request?.documentId`. + */ + hashFromPayload?(request: ParsedGraphQLBody): string | undefined; + /** + * We can read persisted operations from a folder (they must be named + * `.graphql`). When used in this way, the first request for a hash + * will read the file, and then the result will be cached such that the + * **filesystem read** will only impact the first use of that hash. We + * periodically scan the folder for new files, requests for hashes that + * were not present in our last scan of the folder will be rejected to + * mitigate denial of service attacks asking for non-existent hashes. + */ + persistedOperationsDirectory?: string; + /** + * How many milliseconds should we leave it between scans of the persisted + * operations folder, checking for new files? + * + * Set this to the string "watch" to use `fs.watch` to monitor for changes. [EXPERIMENTAL]. + * + * Set to `-1` to disable. + * + * Default: -1 + */ + persistedOperationsDirectoryScanInterval?: number | "watch"; + /** + * An optional string-string key-value object defining the persisted + * operations, where the keys are the hashes, and the values are the + * operation document strings to use. + */ + persistedOperations?: { + [hash: string]: string; + }; + /** + * If your known persisted operations may change over time, or you'd rather + * load them on demand, you may supply this function. Note this function is + * **performance critical** so you should use caching to improve + * performance of any follow-up requests for the same hash. + */ + persistedOperationsGetter?: PersistedOperationGetter; + /** + * There are situations where you may want to allow arbitrary operations + * (for example using GraphiQL in development, or allowing an admin to + * make arbitrary requests in production) whilst enforcing Persisted + * Operations for the application and non-admin users. This function + * allows you to determine under which circumstances persisted operations + * may be bypassed. + * + * IMPORTANT: this function must not throw! + * + * @example + * + * ``` + * app.use(postgraphile(DATABASE_URL, SCHEMAS, { + * allowUnpersistedOperation(event) { + * return process.env.NODE_ENV === "development" && event.request?.getHeader('referer')?.endsWith("/graphiql"); + * } + * }); + * ``` + */ + allowUnpersistedOperation?: boolean | ((event: ProcessGraphQLRequestBodyEvent) => boolean); + } + } +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/index.d.ts.map b/grafast/grafserv-persisted/dist/index.d.ts.map new file mode 100644 index 0000000000..04111f558b --- /dev/null +++ b/grafast/grafserv-persisted/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,UAAU,CAAC;AAGlB,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAGhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAGhE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,OAAO;YACf,eAAe,EAAE,IAAI,CAAC;SACvB;KACF;CACF;AAED,QAAA,MAAM,eAAe,EAAE,cAAc,CAAC,MA+CrC,CAAC;AAEF,eAAe,eAAe,CAAC;AAoR/B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,eAAe;YACvB;;;;;;;;eAQG;YACH,eAAe,CAAC,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;YAEjE;;;;;;;;eAQG;YACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;YAEtC;;;;;;;;;eASG;YACH,wCAAwC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;YAE5D;;;;eAIG;YACH,mBAAmB,CAAC,EAAE;gBAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;aAAE,CAAC;YAEjD;;;;;eAKG;YACH,yBAAyB,CAAC,EAAE,wBAAwB,CAAC;YAErD;;;;;;;;;;;;;;;;;;;eAmBG;YACH,yBAAyB,CAAC,EACtB,OAAO,GACP,CAAC,CAAC,KAAK,EAAE,8BAA8B,KAAK,OAAO,CAAC,CAAC;SAC1D;KACF;CACF"} \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/index.js b/grafast/grafserv-persisted/dist/index.js new file mode 100644 index 0000000000..1887495e6a --- /dev/null +++ b/grafast/grafserv-persisted/dist/index.js @@ -0,0 +1,239 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const tslib_1 = require("tslib"); +const promises_1 = tslib_1.__importDefault(require("node:fs/promises")); +const grafast_1 = require("grafast"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +const version_js_1 = require("./version.js"); +const PersistedPlugin = { + name: "PersistedPlugin", + description: "Enables persisted operations in Grafserv", + version: version_js_1.version, + grafserv: { + middleware: { + processGraphQLRequestBody(next, event) { + const { body, resolvedPreset } = event; + const options = resolvedPreset.grafserv; + if (!options) { + throw new grafast_1.SafeError("Persisted operations misconfigured; rejecting requests.", { statusCode: 500 }); + } + const realQuery = persistedOperationFromPayload(body, options, shouldAllowUnpersistedOperation(options, event)); + // Always overwrite + if (realQuery != null && typeof realQuery !== "string") { + return realQuery.then((q) => { + if (typeof q === "string") { + body.query = q; + } + else { + throw new grafast_1.SafeError("Persisted operations are enabled on this server, please provide an approved document id.", { statusCode: 400 }); + } + }); + } + else { + if (typeof realQuery === "string") { + body.query = realQuery; + } + else { + throw new grafast_1.SafeError("Persisted operations are enabled on this server, please provide an approved document id.", { statusCode: 400 }); + } + } + return next(); + }, + }, + }, +}; +exports.default = PersistedPlugin; +/** + * This fallback hashFromPayload method is compatible with Apollo Client and + * Relay. + */ +function defaultHashFromPayload(payload) { + return ( + // https://github.com/apollographql/apollo-link-persisted-queries#protocol + payload?.extensions?.persistedQuery?.sha256Hash || + // https://relay.dev/docs/en/persisted-queries#network-layer-changes + payload?.documentId || + // Benjie's memory + payload?.id); +} +/** + * Given a cache object, returns a persisted operation getter that looks up the + * given hash in said cache object. + */ +function persistedOperationGetterForCache(cache) { + return (key) => cache[key]; +} +function makeGetterForDirectory(directory, scanInterval = -1) { + // TODO: implement AbortController integration for timer, etc. + const abortController = new AbortController(); + const { signal } = abortController; + // NOTE: We periodically scan the folder to see what files it contains so + // that we can reject requests to non-existent files to avoid DOS attacks + // having us make lots of requests to the filesystem. + let files = null; + /** is scanDirectory active? */ + let scanning = false; + /** Should we scan the directory again once the current scanDirectory is complete? */ + let scanAgain = false; + /** + * This function must never reject. + */ + async function scanDirectory() { + if (scanning) { + scanAgain = true; + return; + } + scanning = true; + scanAgain = false; + try { + const allFiles = await promises_1.default.readdir(directory); + files = allFiles.filter((name) => name.endsWith(".graphql")); + } + catch (e) { + console.error(`Error occurred whilst scanning '${directory}'`); + console.error(e); + } + finally { + scanning = false; + if (scanInterval === "watch") { + if (scanAgain) { + scanDirectory(); + } + } + else if (typeof scanInterval === "number" && scanInterval >= 0) { + // We don't know how long the scanning takes, so rather than setting an + // interval, we wait for a scan to complete before kicking off the next + // one. + setTimeout(scanDirectory, scanInterval); + } + } + } + scanDirectory(); + if (scanInterval === "watch") { + (async () => { + try { + const watcher = promises_1.default.watch(directory, { signal, recursive: false }); + for await (const _event of watcher) { + scanDirectory(); + } + } + catch (err) { + if (err.name === "AbortError") + return; + console.error(`Error occurred whilst watching the persisted operations directory. Folder is no longer being watched. Recommend you restart your server (and file an issue explaining what happened).`); + console.error(err); + } + })(); + } + const operationFromHash = new Map(); + function getOperationFromHash(hash) { + if (!/^[a-zA-Z0-9_-]+$/.test(hash)) { + throw new Error("Invalid hash"); + } + let operation = operationFromHash.get(hash); + if (!operation) { + const filename = `${hash}.graphql`; + if (files && !files.includes(filename)) { + throw new Error(`Could not find file for hash '${hash}'`); + } + operation = promises_1.default + .readFile(`${directory}/${filename}`, "utf8") + .catch(() => null); + operationFromHash.set(hash, operation); + // Once resolved, replace reference to string to avoid unnecessary ticks + operation.then((operationText) => { + operationFromHash.set(hash, operationText); + }); + } + return operation; + } + return { getter: getOperationFromHash, abortController }; +} +const directoryGetterByDirectory = new Map(); +/** + * Given a directory, get or make the persisted operations getter. + */ +function getterForDirectory(directory, scanInterval) { + const key = `${scanInterval}|${directory}`; + let getter = directoryGetterByDirectory.get(key); + if (!getter) { + getter = makeGetterForDirectory(directory, scanInterval); + directoryGetterByDirectory.set(key, getter); + } + return getter; +} +/** + * Extracts or creates a persisted operation getter function from the + * PostGraphile options. + */ +function getterFromOptionsCore(options) { + const optionsSpecified = Object.keys(options).filter((key) => [ + "persistedOperationsGetter", + "persistedOperationsDirectory", + "persistedOperations", + ].includes(key)); + if (optionsSpecified.length > 1) { + // If you'd like support for more than one of these options; send a PR! + throw new Error(`'${optionsSpecified.join("' and '")}' were specified, at most one of these operations can be specified.`); + } + if (options.persistedOperationsGetter) { + return options.persistedOperationsGetter; + } + else if (options.persistedOperations) { + return persistedOperationGetterForCache(options.persistedOperations); + } + else if (options.persistedOperationsDirectory) { + // TODO: do something with abortController? abortController.abort() + const { getter, abortController: _abortController } = getterForDirectory(options.persistedOperationsDirectory, options.persistedOperationsDirectoryScanInterval); + return getter; + } + else { + throw new Error("Server misconfiguration issue: persisted operations (operation allowlist) is in place, but the server has not been told how to fetch the allowed operations. Please provide one of the persisted operations configuration options."); + } +} +const getterFromOptionsCache = new lru_1.default({ + maxLength: 100, +}); +/** + * Returns a cached getter for performance reasons. + */ +function getterFromOptions(options) { + let getter = getterFromOptionsCache.get(options); + if (!getter) { + getter = getterFromOptionsCore(options); + getterFromOptionsCache.set(options, getter); + } + return getter; +} +function shouldAllowUnpersistedOperation(options, event) { + const { allowUnpersistedOperation } = options; + if (typeof allowUnpersistedOperation === "function") { + return allowUnpersistedOperation(event); + } + return !!allowUnpersistedOperation; +} +/** + * Given a payload, this method returns the GraphQL operation document + * (string), or null on failure. It **never throws**. + */ +function persistedOperationFromPayload(payload, options, allowUnpersistedOperation) { + try { + const hashFromPayload = options.hashFromPayload || defaultHashFromPayload; + const hash = hashFromPayload(payload); + if (typeof hash !== "string") { + if (allowUnpersistedOperation && typeof payload?.query === "string") { + return payload.query; + } + throw new Error("We could not find a persisted operation hash string in the request."); + } + const getter = getterFromOptions(options); + return getter(hash); + } + catch (e) { + console.error("Failed to get persisted operation from payload", payload, e); + // We must not throw, instead just overwrite the query with null (the error + // will be thrown elsewhere). + return null; + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/index.js.map b/grafast/grafserv-persisted/dist/index.js.map new file mode 100644 index 0000000000..13bd3508ab --- /dev/null +++ b/grafast/grafserv-persisted/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wEAAmC;AAGnC,qCAAoC;AAQpC,gEAAgC;AAGhC,6CAAuC;AAUvC,MAAM,eAAe,GAA0B;IAC7C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,0CAA0C;IACvD,OAAO,EAAP,oBAAO;IAEP,QAAQ,EAAE;QACR,UAAU,EAAE;YACV,yBAAyB,CAAC,IAAI,EAAE,KA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A+B,CACtC,OAAuC,EACvC,KAAqC;IAErC,MAAM,EAAE,yBAAyB,EAAE,GAAG,OAAO,CAAC;IAC9C,IAAI,OAAO,yBAAyB,KAAK,UAAU,EAAE,CAAC;QACpD,OAAO,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,CAAC,CAAC,yBAAyB,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,SAAS,6BAA6B,CACpC,OAA0B,EAC1B,OAAuC,EACvC,yBAAkC;IAElC,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,sBAAsB,CAAC;QAC1E,MAAM,IAAI,GAAG,eAAe,CAAC,OAAyB,CAAC,CAAC;QACxD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,yBAAyB,IAAI,OAAO,OAAO,EAAE,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACpE,OAAO,OAAO,CAAC,KAAK,CAAC;YACvB,CAAC;YAED,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,gDAAgD,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QAE5E,2EAA2E;QAC3E,6BAA6B;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/interfaces.d.ts b/grafast/grafserv-persisted/dist/interfaces.d.ts new file mode 100644 index 0000000000..79112a6c0c --- /dev/null +++ b/grafast/grafserv-persisted/dist/interfaces.d.ts @@ -0,0 +1,7 @@ +import type { PromiseOrDirect } from "grafast"; +/** + * Given a persisted operation hash, return the associated GraphQL operation + * document. + */ +export type PersistedOperationGetter = (hash: string) => PromiseOrDirect; +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/interfaces.d.ts.map b/grafast/grafserv-persisted/dist/interfaces.d.ts.map new file mode 100644 index 0000000000..07d2843b0b --- /dev/null +++ b/grafast/grafserv-persisted/dist/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,IAAI,EAAE,MAAM,KACT,eAAe,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/interfaces.js b/grafast/grafserv-persisted/dist/interfaces.js new file mode 100644 index 0000000000..db9191150b --- /dev/null +++ b/grafast/grafserv-persisted/dist/interfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/interfaces.js.map b/grafast/grafserv-persisted/dist/interfaces.js.map new file mode 100644 index 0000000000..8fb5f7d179 --- /dev/null +++ b/grafast/grafserv-persisted/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/version.d.ts b/grafast/grafserv-persisted/dist/version.d.ts new file mode 100644 index 0000000000..e6f10f564a --- /dev/null +++ b/grafast/grafserv-persisted/dist/version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "0.0.0-beta.34"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/version.d.ts.map b/grafast/grafserv-persisted/dist/version.d.ts.map new file mode 100644 index 0000000000..1f99446fca --- /dev/null +++ b/grafast/grafserv-persisted/dist/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/version.js b/grafast/grafserv-persisted/dist/version.js new file mode 100644 index 0000000000..bb93024cd7 --- /dev/null +++ b/grafast/grafserv-persisted/dist/version.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +// This file is autogenerated by /scripts/postversion.mjs +exports.version = "0.0.0-beta.34"; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/grafast/grafserv-persisted/dist/version.js.map b/grafast/grafserv-persisted/dist/version.js.map new file mode 100644 index 0000000000..5170c4e6f8 --- /dev/null +++ b/grafast/grafserv-persisted/dist/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAC5C,QAAA,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv-persisted/tsconfig.tsbuildinfo b/grafast/grafserv-persisted/tsconfig.tsbuildinfo new file mode 100644 index 0000000000..216bffeb6e --- /dev/null +++ b/grafast/grafserv-persisted/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../grafast/dist/therecanbeonlyone.d.ts","../../utils/lru/dist/index.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../grafast/dist/constraints.d.ts","../grafast/dist/bucket.d.ts","../grafast/dist/steps/__item.d.ts","../grafast/dist/steps/__flag.d.ts","../grafast/dist/steps/access.d.ts","../grafast/dist/steps/__value.d.ts","../grafast/dist/steps/listtransform.d.ts","../grafast/dist/steps/connection.d.ts","../grafast/dist/steps/constant.d.ts","../grafast/dist/steps/each.d.ts","../grafast/dist/steps/error.d.ts","../grafast/dist/steps/filter.d.ts","../grafast/dist/steps/first.d.ts","../grafast/dist/steps/groupby.d.ts","../grafast/dist/multistep.d.ts","../grafast/dist/steps/lambda.d.ts","../grafast/dist/steps/last.d.ts","../grafast/dist/steps/list.d.ts","../grafast/dist/steps/listen.d.ts","../grafast/dist/steps/node.d.ts","../grafast/dist/steps/partitionbyindex.d.ts","../grafast/dist/steps/remapkeys.d.ts","../grafast/dist/steps/reverse.d.ts","../grafast/dist/steps/applyinput.d.ts","../grafast/dist/steps/setter.d.ts","../grafast/dist/steps/sideeffect.d.ts","../grafast/dist/steps/__inputlist.d.ts","../grafast/dist/steps/__inputobject.d.ts","../grafast/dist/steps/__inputstaticleaf.d.ts","../grafast/dist/steps/__trackedvalue.d.ts","../grafast/dist/steps/applytransforms.d.ts","../grafast/dist/steps/bakedinput.d.ts","../grafast/dist/steps/condition.d.ts","../grafast/dist/steps/graphqlresolver.d.ts","../grafast/dist/steps/load.d.ts","../grafast/dist/steps/polymorphicbranch.d.ts","../grafast/dist/steps/proxy.d.ts","../grafast/dist/steps/index.d.ts","../grafast/dist/graphqlcollectfields.d.ts","../grafast/dist/engine/executeoutputplan.d.ts","../grafast/dist/engine/outputplan.d.ts","../grafast/dist/engine/operationplan.d.ts","../grafast/dist/step.d.ts","../grafast/dist/engine/layerplan.d.ts","../grafast/dist/error.d.ts","../grafast/dist/steps/__inputdefault.d.ts","../grafast/dist/steps/__inputdynamicscalar.d.ts","../grafast/dist/deferred.d.ts","../grafast/dist/utils.d.ts","../grafast/dist/planjsoninterfaces.d.ts","../grafast/dist/interfaces.d.ts","../grafast/dist/steps/object.d.ts","../grafast/dist/exportas.d.ts","../grafast/dist/grafastprint.d.ts","../grafast/dist/makegrafastschema.d.ts","../grafast/dist/dev.d.ts","../grafast/dist/engine/lib/defaultplanresolver.d.ts","../grafast/dist/engine/lib/withgloballayerplan.d.ts","../grafast/dist/execute.d.ts","../grafast/dist/grafastgraphql.d.ts","../grafast/dist/middleware.d.ts","../grafast/dist/operationplan-input.d.ts","../grafast/dist/polymorphic.d.ts","../grafast/dist/stringifypayload.d.ts","../grafast/dist/stripansi.d.ts","../grafast/dist/subscribe.d.ts","../../node_modules/iterall/index.d.ts","../grafast/dist/args.d.ts","../grafast/dist/version.d.ts","../grafast/dist/index.d.ts","../grafast/fwd/graphql/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@graphiql/react/types/editor/types.d.ts","../../node_modules/@graphiql/react/types/editor/header-editor.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/@graphiql/react/types/editor/components/header-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/image-preview.d.ts","../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../node_modules/graphql-config/types.d.ts","../../node_modules/@graphql-tools/utils/schemavisitor.d.ts","../../node_modules/@graphql-tools/utils/interfaces.d.ts","../../node_modules/@graphql-tools/utils/loaders.d.ts","../../node_modules/@graphql-tools/utils/helpers.d.ts","../../node_modules/@graphql-tools/utils/debug-log.d.ts","../../node_modules/@graphql-tools/utils/fix-windows-path.d.ts","../../node_modules/@graphql-tools/utils/flatten-array.d.ts","../../node_modules/@graphql-tools/utils/get-directives.d.ts","../../node_modules/@graphql-tools/utils/get-fields-with-directives.d.ts","../../node_modules/@graphql-tools/utils/get-implementing-types.d.ts","../../node_modules/@graphql-tools/utils/types.d.ts","../../node_modules/@graphql-tools/utils/print-schema-with-directives.d.ts","../../node_modules/@graphql-tools/utils/validate-documents.d.ts","../../node_modules/@graphql-tools/utils/fix-schema-ast.d.ts","../../node_modules/@graphql-tools/utils/parse-graphql-json.d.ts","../../node_modules/@graphql-tools/utils/parse-graphql-sdl.d.ts","../../node_modules/@graphql-tools/utils/get-user-types-from-schema.d.ts","../../node_modules/@graphql-tools/utils/create-schema-definition.d.ts","../../node_modules/@graphql-tools/utils/build-operation-for-field.d.ts","../../node_modules/@graphql-tools/utils/filterschema.d.ts","../../node_modules/@graphql-tools/utils/clone.d.ts","../../node_modules/@graphql-tools/utils/heal.d.ts","../../node_modules/@graphql-tools/utils/schemadirectivevisitor.d.ts","../../node_modules/@graphql-tools/utils/visitschema.d.ts","../../node_modules/@graphql-tools/utils/getresolversfromschema.d.ts","../../node_modules/@graphql-tools/utils/foreachfield.d.ts","../../node_modules/@graphql-tools/utils/foreachdefaultvalue.d.ts","../../node_modules/@graphql-tools/utils/mapschema.d.ts","../../node_modules/@graphql-tools/utils/addtypes.d.ts","../../node_modules/@graphql-tools/utils/rewire.d.ts","../../node_modules/@graphql-tools/utils/prune.d.ts","../../node_modules/@graphql-tools/utils/mergedeep.d.ts","../../node_modules/@graphql-tools/utils/stub.d.ts","../../node_modules/@graphql-tools/utils/selectionsets.d.ts","../../node_modules/@graphql-tools/utils/getresponsekeyfrominfo.d.ts","../../node_modules/@graphql-tools/utils/fields.d.ts","../../node_modules/@graphql-tools/utils/renametype.d.ts","../../node_modules/@graphql-tools/utils/collectfields.d.ts","../../node_modules/@graphql-tools/utils/transforminputvalue.d.ts","../../node_modules/@graphql-tools/utils/mapasynciterator.d.ts","../../node_modules/@graphql-tools/utils/updateargument.d.ts","../../node_modules/@graphql-tools/utils/implementsabstracttype.d.ts","../../node_modules/@graphql-tools/utils/errors.d.ts","../../node_modules/@graphql-tools/utils/toconfig.d.ts","../../node_modules/@graphql-tools/utils/observabletoasynciterable.d.ts","../../node_modules/@graphql-tools/utils/visitresult.d.ts","../../node_modules/@graphql-tools/utils/getargumentvalues.d.ts","../../node_modules/@graphql-tools/utils/valuematchescriteria.d.ts","../../node_modules/@graphql-tools/utils/isasynciterable.d.ts","../../node_modules/@graphql-tools/utils/isdocumentnode.d.ts","../../node_modules/@graphql-tools/utils/astfromvalueuntyped.d.ts","../../node_modules/@graphql-tools/utils/executor.d.ts","../../node_modules/@graphql-tools/utils/withcancel.d.ts","../../node_modules/@graphql-tools/utils/index.d.ts","../../node_modules/@graphql-tools/load/load-typedefs.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/interfaces.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/loaders.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/helpers.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-fields-with-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-implementing-types.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/types.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/print-schema-with-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/validate-documents.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/fix-schema-ast.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/parse-graphql-json.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/parse-graphql-sdl.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-user-types-from-schema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/create-schema-definition.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/build-operation-for-field.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/filterschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/heal.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getresolversfromschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/foreachfield.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/foreachdefaultvalue.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mapschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/addtypes.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/rewire.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/prune.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mergedeep.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/stub.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/selectionsets.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getresponsekeyfrominfo.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/fields.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/renametype.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/transforminputvalue.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mapasynciterator.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/updateargument.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/implementsabstracttype.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/errors.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/observabletoasynciterable.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/visitresult.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getargumentvalues.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/valuematchescriteria.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/isasynciterable.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/isdocumentnode.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/astfromvalueuntyped.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/executor.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/withcancel.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/aggregateerror.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/roottypes.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/index.d.ts","../../node_modules/@graphql-tools/merge/merge-resolvers.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/arguments.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/utils.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-typedefs.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-nodes.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/comments.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/directives.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/enum-values.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/enum.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/fields.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/input-type.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/interface.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-named-type-array.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/scalar.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/type.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/union.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/index.d.ts","../../node_modules/@graphql-tools/merge/merge-schemas.d.ts","../../node_modules/@graphql-tools/merge/extensions.d.ts","../../node_modules/@graphql-tools/merge/index.d.ts","../../node_modules/@graphql-tools/load/schema.d.ts","../../node_modules/@graphql-tools/load/documents.d.ts","../../node_modules/@graphql-tools/load/filter-document-kind.d.ts","../../node_modules/@graphql-tools/load/index.d.ts","../../node_modules/graphql-config/helpers/utils.d.ts","../../node_modules/graphql-config/loaders.d.ts","../../node_modules/graphql-config/extension.d.ts","../../node_modules/graphql-config/project-config.d.ts","../../node_modules/graphql-config/config.d.ts","../../node_modules/graphql-config/errors.d.ts","../../node_modules/graphql-config/index.d.ts","../../node_modules/graphql-language-service/dist/parser/types.d.ts","../../node_modules/graphql-language-service/dist/parser/characterstream.d.ts","../../node_modules/graphql-language-service/dist/parser/rules.d.ts","../../node_modules/graphql-language-service/dist/parser/rulehelpers.d.ts","../../node_modules/graphql-language-service/dist/parser/onlineparser.d.ts","../../node_modules/graphql-language-service/dist/parser/api.d.ts","../../node_modules/graphql-language-service/dist/parser/gettypeinfo.d.ts","../../node_modules/graphql-language-service/dist/parser/index.d.ts","../../node_modules/graphql-language-service/dist/types.d.ts","../../node_modules/graphql-language-service/dist/interface/autocompleteutils.d.ts","../../node_modules/graphql-language-service/dist/interface/getautocompletesuggestions.d.ts","../../node_modules/graphql-language-service/dist/utils/fragmentdependencies.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/graphql-language-service/dist/utils/collectvariables.d.ts","../../node_modules/graphql-language-service/dist/utils/getvariablesjsonschema.d.ts","../../node_modules/graphql-language-service/dist/utils/getastnodeatposition.d.ts","../../node_modules/graphql-language-service/dist/utils/range.d.ts","../../node_modules/graphql-language-service/dist/utils/validatewithcustomrules.d.ts","../../node_modules/graphql-language-service/dist/utils/getoperationfacts.d.ts","../../node_modules/graphql-language-service/dist/utils/index.d.ts","../../node_modules/graphql-language-service/dist/interface/getdefinition.d.ts","../../node_modules/graphql-language-service/dist/interface/getdiagnostics.d.ts","../../node_modules/graphql-language-service/dist/interface/getoutline.d.ts","../../node_modules/graphql-language-service/dist/interface/gethoverinformation.d.ts","../../node_modules/graphql-language-service/dist/interface/index.d.ts","../../node_modules/graphql-language-service/dist/index.d.ts","../../node_modules/codemirror-graphql/utils/gettypeinfo.d.ts","../../node_modules/codemirror-graphql/utils/schemareference.d.ts","../../node_modules/graphql-ws/lib/common.d.ts","../../node_modules/graphql-ws/lib/client.d.ts","../../node_modules/graphql-ws/lib/server.d.ts","../../node_modules/graphql-ws/lib/index.d.ts","../../node_modules/@graphiql/toolkit/dist/esm/create-fetcher/types.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/async-helpers/index.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/create-fetcher/createfetcher.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/format/index.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/auto-complete.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/merge-ast.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/operation-name.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/base.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/query.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/history.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/custom.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/index.d.mts","../../node_modules/@graphiql/react/types/editor/hooks.d.ts","../../node_modules/@graphiql/react/types/editor/query-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/query-editor.d.ts","../../node_modules/@graphiql/react/types/editor/response-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/response-editor.d.ts","../../node_modules/@graphiql/react/types/editor/variable-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/variable-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/index.d.ts","../../node_modules/@graphiql/react/types/editor/tabs.d.ts","../../node_modules/@graphiql/react/types/editor/context.d.ts","../../node_modules/@graphiql/react/types/editor/index.d.ts","../../node_modules/@graphiql/react/types/execution.d.ts","../../node_modules/@graphiql/react/types/explorer/components/argument.d.ts","../../node_modules/@graphiql/react/types/explorer/context.d.ts","../../node_modules/@graphiql/react/types/explorer/components/default-value.d.ts","../../node_modules/@graphiql/react/types/explorer/components/deprecation-reason.d.ts","../../node_modules/@graphiql/react/types/explorer/components/directive.d.ts","../../node_modules/@graphiql/react/types/explorer/components/doc-explorer.d.ts","../../node_modules/@graphiql/react/types/explorer/components/field-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/field-link.d.ts","../../node_modules/@graphiql/react/types/explorer/components/schema-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/search.d.ts","../../node_modules/@graphiql/react/types/explorer/components/section.d.ts","../../node_modules/@graphiql/react/types/explorer/components/type-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/type-link.d.ts","../../node_modules/@graphiql/react/types/explorer/index.d.ts","../../node_modules/@graphiql/react/types/history/components.d.ts","../../node_modules/@graphiql/react/types/history/context.d.ts","../../node_modules/@graphiql/react/types/history/index.d.ts","../../node_modules/@graphiql/react/types/plugin.d.ts","../../node_modules/@graphiql/react/types/schema.d.ts","../../node_modules/@graphiql/react/types/storage.d.ts","../../node_modules/@graphiql/react/types/provider.d.ts","../../node_modules/@graphiql/react/types/theme.d.ts","../../node_modules/@graphiql/react/types/utility/resize.d.ts","../../node_modules/@graphiql/react/types/utility/is-macos.d.ts","../../node_modules/@graphiql/react/types/icons/index.d.ts","../../node_modules/@graphiql/react/types/ui/button.d.ts","../../node_modules/@graphiql/react/types/ui/button-group.d.ts","../../node_modules/@radix-ui/react-context/dist/index.d.ts","../../node_modules/@radix-ui/react-primitive/dist/index.d.ts","../../node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts","../../node_modules/@radix-ui/react-focus-scope/dist/index.d.ts","../../node_modules/@radix-ui/react-portal/dist/index.d.ts","../../node_modules/@radix-ui/react-dialog/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/dialog.d.ts","../../node_modules/@radix-ui/react-arrow/dist/index.d.ts","../../node_modules/@radix-ui/rect/dist/index.d.ts","../../node_modules/@radix-ui/react-popper/dist/index.d.ts","../../node_modules/@radix-ui/react-roving-focus/dist/index.d.ts","../../node_modules/@radix-ui/react-menu/dist/index.d.ts","../../node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/dropdown.d.ts","../../node_modules/@graphiql/react/types/ui/markdown.d.ts","../../node_modules/@graphiql/react/types/ui/spinner.d.ts","../../node_modules/@graphiql/react/types/ui/tabs.d.ts","../../node_modules/@radix-ui/react-tooltip/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/tooltip.d.ts","../../node_modules/@graphiql/react/types/ui/index.d.ts","../../node_modules/@graphiql/react/types/toolbar/button.d.ts","../../node_modules/@graphiql/react/types/toolbar/execute.d.ts","../../node_modules/@graphiql/react/types/toolbar/menu.d.ts","../../node_modules/@graphiql/react/types/toolbar/index.d.ts","../../node_modules/@graphiql/react/types/index.d.ts","../../node_modules/graphiql/dist/graphiql.d.ts","../../node_modules/graphiql/dist/index.d.ts","../ruru/dist/interfaces.d.ts","../ruru/dist/server.d.ts","../grafserv/dist/middleware/graphql.d.ts","../grafserv/dist/options.d.ts","../grafserv/dist/interfaces.d.ts","../grafserv/dist/middleware/graphiql.d.ts","../grafserv/dist/core/base.d.ts","../grafserv/dist/utils.d.ts","../grafserv/dist/index.d.ts","./src/interfaces.ts","./src/version.ts","./src/index.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[534,578],[189,239,241,260,534,578],[192,231,534,578],[192,227,232,233,534,578],[227,233,241,534,578],[234,260,534,578],[189,191,229,231,234,239,241,260,534,578],[81,189,192,227,230,233,234,239,241,260,534,578],[241,534,578],[92,189,239,241,260,534,578],[192,534,578],[189,228,239,260,534,578],[80,81,87,189,205,227,228,232,233,235,238,239,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,534,578],[87,93,189,190,191,214,227,228,232,233,234,235,236,237,239,240,260,534,578],[189,227,233,239,241,260,534,578],[87,534,578],[227,233,534,578],[189,227,232,233,239,241,260,534,578],[189,228,232,234,239,241,260,534,578],[193,227,233,241,534,578],[220,227,233,241,534,578],[189,199,227,233,239,241,260,534,578],[189,199,227,233,239,260,534,578],[227,233,241,260,534,578],[189,191,194,195,196,227,233,239,241,260,534,578],[195,227,233,260,534,578],[194,227,233,241,534,578],[189,227,228,233,239,241,260,534,578],[197,227,233,241,534,578],[193,197,198,227,233,534,578],[198,227,233,241,534,578],[189,227,233,239,260,534,578],[197,198,227,233,534,578],[193,194,195,196,197,198,199,200,201,202,203,204,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,242,260,534,578],[205,227,233,241,534,578],[194,199,227,233,241,534,578],[193,198,227,233,241,260,534,578],[194,205,227,233,241,260,534,578],[189,206,227,233,239,241,260,534,578],[199,227,233,241,534,578],[214,260,534,578],[92,189,239,260,534,578],[189,227,232,233,238,239,241,260,534,578],[189,239,260,534,578],[79,81,87,260,525,526,527,534,578,592],[79,87,260,534,578],[79,534,578],[87,260,261,519,521,522,534,578],[87,260,261,518,519,520,521,523,524,534,578],[87,260,261,438,518,519,520,525,534,578],[87,260,520,521,534,578],[260,261,521,525,534,578],[261,521,534,578],[260,261,438,521,525,534,578,610],[518,534,578],[516,517,534,578],[534,578,690],[268,269,534,578],[266,269,534,578],[270,271,453,455,457,534,578],[269,452,534,578],[269,454,534,578],[269,456,534,578],[189,239,260,265,267,269,432,459,534,578],[265,267,534,578],[266,267,434,450,534,578],[267,268,451,452,454,456,458,459,460,534,578],[189,239,260,265,267,434,451,534,578],[265,266,267,534,578],[267,450,460,534,578],[266,534,578],[265,267,434,534,578],[265,269,450,451,534,578],[189,239,260,269,534,578],[269,464,534,578],[269,534,578],[265,269,534,578],[189,239,260,265,534,578],[189,239,260,265,269,534,578],[463,464,465,466,467,468,469,470,471,472,473,474,475,534,578],[269,450,534,578],[265,269,450,534,578],[477,478,534,578],[265,534,578],[461,462,476,479,480,481,482,483,484,485,486,487,509,513,534,578],[269,461,462,464,479,480,481,482,534,578],[189,239,260,265,269,450,534,578],[510,511,512,534,578],[265,269,502,534,578],[265,495,534,578],[488,489,496,503,504,505,506,508,534,578],[265,507,534,578],[189,239,260,438,439,534,578],[189,239,260,438,534,578],[189,239,260,438,439,440,441,442,443,444,445,446,447,448,449,534,578],[446,534,578],[446,447,534,578],[327,328,534,578],[328,396,397,398,534,578],[327,534,578],[189,239,260,328,395,534,578],[376,392,393,394,534,578],[375,534,578],[189,239,260,375,379,534,578],[329,534,578],[189,239,260,329,534,578],[189,239,260,335,534,578],[189,239,260,375,534,578],[329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,534,578],[189,239,260,330,335,534,578],[101,189,239,260,534,578],[189,239,260,330,534,578],[189,239,260,392,534,578],[189,239,260,380,534,578],[189,239,260,379,534,578],[377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,534,578],[189,239,260,375,378,534,578],[189,239,260,275,534,578],[189,239,260,284,534,578],[274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,534,578],[189,239,260,274,534,578],[101,189,239,260,275,534,578],[101,189,239,260,276,284,534,578],[189,239,260,274,275,534,578],[189,239,260,276,534,578],[534,578,887],[534,578,855,890],[534,578,855],[534,578,855,856],[534,578,912],[534,578,902,904],[534,578,902,904,905,906,907,908],[534,578,902,904,905],[534,578,902,904,905,906],[534,578,902,904,905,906,907],[534,578,855,862],[534,578,855,865],[534,578,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916],[534,578,855,856,893,894],[534,578,855,856,893],[534,578,855,856,865],[534,578,855,856,865,876],[534,578,778],[265,491,534,578],[265,490,491,492,493,494,534,578],[265,490,491,501,534,578],[265,490,491,492,493,494,499,500,534,578],[265,490,491,497,498,534,578],[265,490,491,534,578],[265,490,491,492,494,499,534,578],[534,578,593,628],[534,578,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688],[534,578,632],[534,578,632,636],[534,578,630,632,634],[534,578,630,632],[534,578,632,638],[534,578,631,632],[534,578,643],[534,578,632,649,650,651],[534,578,632,653],[534,578,632,654,655,656,657,658,659,660,661,662,663,664,665,666],[534,578,632,635],[534,578,632,634],[534,578,632,643],[534,578,690,691,692,693,694],[534,578,690,692],[534,578,593,628,696],[534,578,584,628],[534,578,621,628,704],[534,578,593,628,696,709,710],[534,578,697,704,708],[534,578,713,741],[534,578,712,718],[534,578,723],[534,578,718],[534,578,717],[534,578,735],[534,578,731],[534,578,713,730,741],[534,578,712,713,714,715,716,717,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742],[534,578,744],[534,578,747,750],[419,534,578,747,749],[534,578,750],[419,534,578,746,747],[534,578,590,593,628,701,702,703],[534,578,697,702,704,708,752],[534,578,591,628,754,755],[534,578,590,591,628,757],[534,578,591,628],[534,578,760],[534,578,762,768],[534,578,763,764,765,766,767],[534,578,768],[534,578,590,593,595,598,610,621,628],[534,578,628],[534,578,773],[534,578,774],[534,578,780,783],[534,578,591,621,628],[534,578,583,628,744],[534,578,590,628],[534,578,788],[534,577,578,590,593,594,598,605,621,628,629,706,707,710,711,770,787],[534,578,839],[534,578,841,843,844,845,846,847,848,849,850,851,852,853],[534,578,841,842,844,845,846,847,848,849,850,851,852,853],[534,578,842,843,844,845,846,847,848,849,850,851,852,853],[534,578,841,842,843,845,846,847,848,849,850,851,852,853],[534,578,841,842,843,844,846,847,848,849,850,851,852,853],[534,578,841,842,843,844,845,847,848,849,850,851,852,853],[534,578,841,842,843,844,845,846,848,849,850,851,852,853],[534,578,841,842,843,844,845,846,847,849,850,851,852,853],[534,578,841,842,843,844,845,846,847,848,850,851,852,853],[534,578,841,842,843,844,845,846,847,848,849,851,852,853],[534,578,841,842,843,844,845,846,847,848,849,850,852,853],[534,578,841,842,843,844,845,846,847,848,849,850,851,853],[534,578,841,842,843,844,845,846,847,848,849,850,851,852],[534,578,1049,1050,1051,1052],[534,578,1048],[534,578,628,1048],[534,578,1048,1049,1050,1051],[534,575,578],[534,577,578],[578],[534,578,583,613],[534,578,579,584,590,591,598,610,621],[534,578,579,580,590,598],[529,530,531,534,578],[534,578,581,622],[534,578,582,583,591,599],[534,578,583,610,618],[534,578,584,586,590,598],[534,577,578,585],[534,578,586,587],[534,578,590],[534,578,588,590],[534,577,578,590],[534,578,590,591,592,610,621],[534,578,590,591,592,606,610,613],[534,573,578,626],[534,578,586,590,593,598,610,621],[534,578,590,591,593,594,598,610,618,621],[534,578,593,595,610,618,621],[532,533,534,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627],[534,578,590,596],[534,578,597,621,626],[534,578,586,590,598,610],[534,545,549,578,621],[534,545,578,610,621],[534,540,578],[534,542,545,578,618,621],[534,578,598,618],[534,540,578,628],[534,542,545,578,598,621],[534,537,538,541,544,578,590,610,621],[534,545,552,578],[534,537,543,578],[534,545,566,567,578],[534,541,545,578,613,621,628],[534,566,578,628],[534,539,540,578,628],[534,545,578],[534,539,540,541,542,543,544,545,546,547,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,567,568,569,570,571,572,578],[534,545,560,578],[534,545,552,553,578],[534,543,545,553,554,578],[534,544,578],[534,537,540,545,578],[534,545,549,553,554,578],[534,549,578],[534,543,545,548,578,621],[534,537,542,545,552,578],[534,578,610],[534,540,545,566,578,626,628],[534,578,599],[534,578,600],[534,577,578,601],[534,575,576,577,578,579,580,581,582,583,584,585,586,587,588,590,591,592,593,594,595,596,597,598,599,600,601,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627],[534,578,604],[534,578,605],[534,578,590,606,607],[534,578,606,608,622,624],[534,578,590,610,611,613],[534,578,612,613],[534,578,610,611],[534,578,613],[534,578,614],[534,575,578,610],[534,578,590,616,617],[534,578,616,617],[534,578,583,598,610,618],[534,578,619],[534,578,598,620],[534,578,593,605,621],[534,578,583,622],[534,578,610,623],[534,578,597,624],[534,578,625],[534,578,583,590,592,601,610,621,624,626],[534,578,610,627],[534,578,590,610,618,628,1058,1059,1062,1063],[534,578,1069,1070],[534,578,1069],[534,578,768,1074,1075],[263,534,578,1172],[263,534,578,1173],[534,578,768,1074],[263,534,578,1073],[262,263,264,534,578],[534,578,593,610,628],[534,578,610,628],[534,578,1099,1138],[534,578,1099,1123,1138],[534,578,1138],[534,578,1099],[534,578,1099,1124,1138],[534,578,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137],[534,578,1124,1138],[534,578,591,610,628,700],[534,578,591,709],[534,578,593,628,701,707],[534,578,1145,1146],[534,578,747,1145],[534,578,747,1146],[534,578,919],[534,578,1148],[534,578,593,598,628,839],[534,578,628,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162],[534,578,1151,1152,1161],[534,578,1152,1161],[534,578,1142,1151,1152,1161],[534,578,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1162],[534,578,1152],[534,578,583,1151,1161],[534,578,583,628,838,1148,1149,1150,1163],[534,578,590,593,595,598,621,628],[534,578,590,593,595,598,610,618,621,627,628],[534,578,1169],[534,578,794,795,799,826,827,829,830,831,833,834],[534,578,792,793],[534,578,792],[534,578,794,834],[534,578,794,795,831,832,834],[534,578,834],[534,578,791,834,835],[534,578,794,795,833,834],[534,578,794,795,797,798,833,834],[534,578,794,795,796,833,834],[534,578,794,795,799,826,827,828,829,830,833,834],[534,578,791,794,795,799,831,833],[534,578,799,834],[534,578,801,802,803,804,805,806,807,808,809,810,834],[534,578,824,834],[534,578,800,811,819,820,821,822,823,825],[534,578,804,834],[534,578,812,813,814,815,816,817,818,834],[189,239,260,432,534,578],[89,189,239,260,433,534,578],[534,578,1032,1033,1034,1035,1036],[534,578,1030],[534,578,1031,1037,1038],[534,578,920],[534,578,776,782],[534,578,1082,1084,1088,1089,1092],[534,578,1093],[534,578,1084,1088,1091],[534,578,1082,1084,1088,1091,1092,1093,1094],[534,578,1088],[534,578,1084,1088,1089,1091],[534,578,1082,1084,1089,1090,1092],[534,578,1085,1086,1087],[534,578,591,600,628,1082,1083],[265,514,534,578],[514,515,534,578],[273,402,403,534,578],[401,534,578],[273,534,578],[273,327,402,403,404,405,534,578],[189,239,260,327,399,400,534,578],[189,239,260,273,327,399,402,534,578],[414,415,426,431,534,578],[189,239,260,414,415,534,578],[189,239,260,415,426,534,578],[189,239,260,272,415,534,578],[189,239,260,272,414,415,534,578],[415,534,578],[416,417,427,428,429,430,534,578],[189,239,260,414,432,534,578],[407,534,578],[407,408,409,410,411,412,413,534,578],[407,408,409,534,578],[189,239,260,408,415,534,578],[189,239,260,272,406,414,534,578],[189,239,260,415,534,578],[189,239,260,420,534,578],[419,420,534,578],[418,420,421,422,423,424,425,534,578],[189,239,260,435,534,578],[435,436,437,534,578],[89,90,96,97,534,578],[98,164,165,534,578],[89,96,98,534,578],[90,98,534,578],[89,91,92,93,96,98,101,102,534,578],[91,103,117,118,534,578],[89,96,101,102,103,534,578],[89,93,96,98,100,101,102,534,578],[89,90,101,102,103,534,578],[88,104,109,116,119,120,163,166,188,534,578],[89,534,578],[90,94,95,534,578],[90,94,95,96,97,99,110,111,112,113,114,115,534,578],[90,95,96,534,578],[90,534,578],[89,90,95,96,98,111,534,578],[96,534,578],[90,96,97,534,578],[94,96,534,578],[103,117,534,578],[89,91,92,93,96,101,534,578],[89,96,99,102,534,578],[91,100,101,102,105,106,107,108,534,578],[102,534,578],[89,93,96,98,100,102,534,578],[98,101,534,578],[98,534,578],[89,96,102,534,578],[90,96,101,112,534,578],[101,167,534,578],[98,102,534,578],[96,101,534,578],[101,534,578],[89,99,534,578],[89,96,534,578],[96,101,102,534,578],[121,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,534,578],[101,102,534,578],[93,96,534,578],[89,96,100,101,102,114,534,578],[89,93,96,102,534,578],[89,93,96,534,578],[122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,534,578],[114,122,534,578],[122,534,578],[89,96,98,101,121,122,534,578],[89,96,98,100,101,102,114,121,534,578],[534,578,780],[534,578,777,781],[534,578,921],[534,578,922,964],[534,578,743,922,960,963],[534,578,962,964],[534,578,713,741,922,961,962,968,1040,1041],[534,578,918,922,961,962,963,964,965,966,968,1042,1043,1044],[534,578,922,961,963,964],[534,578,855,917],[534,578,964,968,1042],[534,578,968],[534,578,713,741,961,968,1029,1039,1045],[534,578,961,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028],[534,578,713,741,961,968],[534,578,922,967,1029],[534,578,922],[534,578,713,741,743,922,961],[534,578,590,614,628],[534,578,628,1059,1060,1061],[534,578,610,628,1059],[534,578,1065],[534,578,779],[534,578,1096],[534,578,591,1095],[534,578,836],[419,534,578,790,835],[419,534,578,836],[534,578,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952],[534,578,938],[534,578,938,949],[534,578,924,940],[534,578,940],[534,578,947],[534,578,923],[534,578,924],[534,578,932],[534,578,954],[534,578,953,955,956,957,958,959],[534,578,956],[534,578,955],[534,578,593,598,618,621,624,747,751,790,836,837,838],[82,534,578],[82,83,534,578],[82,83,84,85,86,534,578]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"00c167f32444b220a604a8308f4466cb83b1e3de66ccffdcdefb65a49c26f161","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"294985ec97b28343d1d6e2730a13a839c375a2ffb5f6b37acbf5dacf35613785","impliedFormat":1},{"version":"3896fddb08ec18856f5e88f9f7776c1c58c41d6129f8ee5158513a5de3febd01","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"4e2af0853ef2aa0bd0c97121d37255db91d57a5a5d67cc937f2367a949373f3f","impliedFormat":1},{"version":"d53ba569f15be8659ba0f726dddb7a24bb875b63b8614c6b007d38cabfa3217b","impliedFormat":1},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"9c479340e2f7537bbd31dd0a08aeeec28db302d9bef096eef3cc09f20eb56097","impliedFormat":1},{"version":"952d81d65c1cb9a3bb736f233db638e50fdd4e7ae75a5624e7b8be24dad92851","impliedFormat":1},{"version":"2767eb79f4b9e754efff56d654aa71715baac18a6157170f423cbd460f2445ab","impliedFormat":1},{"version":"3d6f89fb6ab035027268da5a90e31369876b5f2c37339b1212590c8727bc920a","impliedFormat":1},{"version":"6b05adc37cce53629f7740a2ce72a17d231cb1332dd20d725f49918db5f90ec4","impliedFormat":1},{"version":"cb364f282ace685f66e8fa777804a36e96892e4c92cf4e8816ae9156c3551453","impliedFormat":1},{"version":"afe1be833b5a9e15f35b72d4aedaac24c0fd903e374c4eb4be90334a0e5ad9ae","impliedFormat":1},{"version":"42b59521c78a8daeaf087752adb5de9753e7c4b701fc7c3e435ef1d737140091","impliedFormat":1},{"version":"eedad1c380f5737f1220feb0ee83212f602acae8f0553837c098878e5c73c198","impliedFormat":1},{"version":"e0fdb256e83c39f7794908de553930ce2581ba109b8de90937bf972fa75485d5","impliedFormat":1},{"version":"dafdf0b0ccb55128f83fe0acaddadfb5d223887a7e8d59a0623860a68b1f59a7","impliedFormat":1},{"version":"6f3ef4208d2d6933180ac1bc813efbfb319b05e49ef0cdbeea15126b982578c4","impliedFormat":1},{"version":"02e7a692feb22c829d837e40e82070d47b696a0c64ea192ba2c438f6a55902a4","impliedFormat":1},{"version":"685b232bf1f8763afa58c62d964f677478fac68ccd9e761e4d9a0cf6b5f9a378","impliedFormat":1},{"version":"2d205c767099a9c1719b2884eeb878470d81e3418ffe9ae8db8139e597f3e34d","impliedFormat":1},{"version":"0c0ccc47a6e4cdaf336181d46a262c591dad7098f431a4234364fccf7ced258f","impliedFormat":1},{"version":"cf68f71517959967c83d4585d1cd37376fbbe8174ddd0140274c228488149190","impliedFormat":1},{"version":"d6cadb48c29a13aeb7be79d14980f2aa4ebfe9c6118726a906cc429fba582079","impliedFormat":1},{"version":"56e6a902d2aa94175f75bdc0ad822bf787b67bb6dbf52018c389d3643d203539","impliedFormat":1},{"version":"650b748b635b9299a8d2ba23ff02f403aac044a946b7e10bfb95942367bc1489","impliedFormat":1},{"version":"c4e474945611676435f1807a5ab049becffc54a32a1a4cfc96731cdb34fdc8c1","impliedFormat":1},{"version":"a23c0e88e5d4204898c2087a5950b974c594343f78aa8e3e758bb85c3d30dfde","impliedFormat":1},{"version":"8d071caad80707dc1853c718e6372349df8fdd4790ac57550cb243545ac91806","impliedFormat":1},{"version":"6138f6a183b6ab187becc7f4f37ea7b9b072874c75699d2bd10950fe07726aec","impliedFormat":1},{"version":"ddbafa89c2b1b11251b96deef3869fa0b567766c43bd31224838ecb024297b8b","impliedFormat":1},{"version":"3cc6ec5641587a673473f9613880b63f531446bc631a6f96adbb033672cf6d2d","impliedFormat":1},{"version":"3901548cb8b4d914800927f9def278f34dfa106e65be38ee47d59c4efdd45ef9","impliedFormat":1},{"version":"21856903077f053172be7ab1027ccfb94fecbb0d22dbc34e7208c4553575ccbc","impliedFormat":1},{"version":"6cf6409ce9b90a14cd1e146d00fd21973d5d6b2da875283f3da0f27e0b786eaa","impliedFormat":1},{"version":"2a527df5c4828328fa6b35cf8b8f5bf0640933a4602c517faace7a1c3af0d446","impliedFormat":1},{"version":"2a46d72fe8eac64f8337c839bba3e558a07cdf6f2574d88dd5852d6ee8bf7d9c","impliedFormat":1},{"version":"0787ec67c199917f7c0f2a127432dc65f5d422e15992b8a7c3d7765f94075390","impliedFormat":1},{"version":"8494cb4b789a1f5e0710a4db2e111b4e20ee373251cb958b79f2d19d8adb3743","impliedFormat":1},{"version":"b8a25d32e4a2a187e2169f0936416cfcac8926f56166f3895fb5f82942f3150e","impliedFormat":1},{"version":"7552cf0a2915702d6cf9a8c6a2a242b713214728dbb81353132d2d986e74e521","impliedFormat":1},{"version":"c3789c53874f2aba5a7c21e1ac1e467f95522ba5a0c8f9c8b8c519efa7aec51b","impliedFormat":1},{"version":"dec52a42c912503c35463f974fb86cb1a772cab001c2c9ed413093845be2f677","impliedFormat":1},{"version":"d2a2a7be324ab271073676edb22f5de259d4baf5bad32bd2e5545f957f503ac4","impliedFormat":1},{"version":"63fd6e8e4f5403337124c82bf46fb17ce24923d8a9223b387ad312a4b075e7c9","impliedFormat":1},{"version":"bce453d2e25d1104b3b84c97aee92111e194691e5b254af318499745c8e041c6","impliedFormat":1},{"version":"22f897e17f18b702f8aa1c6e6412fcd33d180f8ef61297fec6c395a2b18d9908","impliedFormat":1},{"version":"0afe2ed080fb1ca424bbcecca1874d7fa24aaba54535722b00607d38dd150f8a","impliedFormat":1},{"version":"04260ae2a15ef601034f94c4b4c91b76a4c4197d48137d04859d9aa9c83f2f16","impliedFormat":1},{"version":"507fe2b965da84e42b4d17d35264be1e70694a8692c75fc07207d38deda42ad7","impliedFormat":1},{"version":"4a9bdce843a6bc8bdc71287de2808e7438fd718e17c55d175f0f2d0a8883947e","impliedFormat":1},{"version":"8a0a5c90711b4d4d55b0edf7d097faf872f65d6f7be1a5a42fdcfb62c751a135","impliedFormat":1},{"version":"756c0a51db689803dcbcb94cec65edd6f0212fcda9abf264001ae975a5c6a18b","impliedFormat":1},{"version":"2873b8fe4083b54fb60dd1d03ee8b22496e41f96a4e536e06cd59a481aba01de","impliedFormat":1},{"version":"5fc9e50135f4163989ce74b83b68a5ee44d151f04ec44078adbe913c8dad694e","impliedFormat":1},{"version":"e2949c84dcb7b6a3fb40fc8bfcd9fa6b74d1e2c830de0d5ace7159cc4fb4b5a5","impliedFormat":1},{"version":"34a80ad568a06a539e43bde102bed1fcb8bec196811caa9abc3a0cf44a95fdde","impliedFormat":1},{"version":"e634a64172adde8d23f6df23f252d35e16eaa4bc33e881700967498a955e0b25","impliedFormat":1},{"version":"b1432d91fcf4cf709d71adc1a00e04ac1948380b8552310d0509dbdc3b2cf97a","impliedFormat":1},{"version":"e3d05607f9e532c806395e8765913736c42900c5c3ab5ab52d910da6fd57121c","impliedFormat":1},{"version":"eca0a0e9725ccbf8b13ee72cdab75b489992f2ce7f4dd198767831982463c294","impliedFormat":1},{"version":"26d1f4beb9d50d83557de587f5168dacb4dc81935f4880afa7d48dd7b13d5d10","impliedFormat":1},{"version":"67d2cca28154842dd7b1d5cde8c94b9fc24afad1089eab0f1de7294d143605d5","impliedFormat":1},{"version":"28c9bcc4c2323e859523b1edd20a69b66784bb3ca58568ac1c2448d90c1e1fce","impliedFormat":1},{"version":"b2434d709c9dcf1bee9223a19b449cf9d8a0b411fa5bb2ecc8ce25fa92889c77","impliedFormat":1},{"version":"6cbfcc72a73f25c47951ebb87118ecc43d04781e02b51236d4fab69dbc63926e","impliedFormat":1},{"version":"e0fdb256e83c39f7794908de553930ce2581ba109b8de90937bf972fa75485d5","impliedFormat":1},{"version":"dafdf0b0ccb55128f83fe0acaddadfb5d223887a7e8d59a0623860a68b1f59a7","impliedFormat":1},{"version":"ec314adb4116647307480f138c5c23f98bb5ad4efba51aeb1957fc4519429d8b","impliedFormat":1},{"version":"5297455afc3c8eff9ae459f28eeb846fd86a51678afbceb7c27696eefdcf1e5b","impliedFormat":1},{"version":"532aeb172f2a735739956f48d7862681212baeca1bbde9185eae73f6dcb95faa","impliedFormat":1},{"version":"2d205c767099a9c1719b2884eeb878470d81e3418ffe9ae8db8139e597f3e34d","impliedFormat":1},{"version":"cb33e3ca7c3b2cda0d04b6aafe6f9ddad719ef615bdeae9cb88384ad798807ec","impliedFormat":1},{"version":"2c9b150c52c2c876fd5e91e1c63be66a6e2d052a1f381d362ad649c6ffd8fba5","impliedFormat":1},{"version":"d6cadb48c29a13aeb7be79d14980f2aa4ebfe9c6118726a906cc429fba582079","impliedFormat":1},{"version":"1fecc438d1dbb692dcc38564aa5ea06a108cb37661327d8c0e0c065e07efb3aa","impliedFormat":1},{"version":"650b748b635b9299a8d2ba23ff02f403aac044a946b7e10bfb95942367bc1489","impliedFormat":1},{"version":"c4e474945611676435f1807a5ab049becffc54a32a1a4cfc96731cdb34fdc8c1","impliedFormat":1},{"version":"8d071caad80707dc1853c718e6372349df8fdd4790ac57550cb243545ac91806","impliedFormat":1},{"version":"3cc6ec5641587a673473f9613880b63f531446bc631a6f96adbb033672cf6d2d","impliedFormat":1},{"version":"3901548cb8b4d914800927f9def278f34dfa106e65be38ee47d59c4efdd45ef9","impliedFormat":1},{"version":"21856903077f053172be7ab1027ccfb94fecbb0d22dbc34e7208c4553575ccbc","impliedFormat":1},{"version":"6cf6409ce9b90a14cd1e146d00fd21973d5d6b2da875283f3da0f27e0b786eaa","impliedFormat":1},{"version":"2a527df5c4828328fa6b35cf8b8f5bf0640933a4602c517faace7a1c3af0d446","impliedFormat":1},{"version":"7f2eab4f5f276996d3e13aa12f589048fe198eea8dbd78ddcee60c38a8ff5606","impliedFormat":1},{"version":"0787ec67c199917f7c0f2a127432dc65f5d422e15992b8a7c3d7765f94075390","impliedFormat":1},{"version":"095b26151a4ce7b9da003174d4a22db9f867928d3bc7718966d0e95f0c9d160f","impliedFormat":1},{"version":"b8a25d32e4a2a187e2169f0936416cfcac8926f56166f3895fb5f82942f3150e","impliedFormat":1},{"version":"7552cf0a2915702d6cf9a8c6a2a242b713214728dbb81353132d2d986e74e521","impliedFormat":1},{"version":"c3789c53874f2aba5a7c21e1ac1e467f95522ba5a0c8f9c8b8c519efa7aec51b","impliedFormat":1},{"version":"dec52a42c912503c35463f974fb86cb1a772cab001c2c9ed413093845be2f677","impliedFormat":1},{"version":"d2a2a7be324ab271073676edb22f5de259d4baf5bad32bd2e5545f957f503ac4","impliedFormat":1},{"version":"e8125d329bd068dfa97035914b87f0d561f8bbc5a5883ad883c5484dd8315eee","impliedFormat":1},{"version":"22f897e17f18b702f8aa1c6e6412fcd33d180f8ef61297fec6c395a2b18d9908","impliedFormat":1},{"version":"9b48fb7d6521c10569a09921fea776719fab153e4b24d6bf4290fe6fab9be6d3","impliedFormat":1},{"version":"9c2c8c2162f810ac21c9a9df55ef59085b82790d9b17a916c6d025ba3e3b8edf","impliedFormat":1},{"version":"507fe2b965da84e42b4d17d35264be1e70694a8692c75fc07207d38deda42ad7","impliedFormat":1},{"version":"8a0a5c90711b4d4d55b0edf7d097faf872f65d6f7be1a5a42fdcfb62c751a135","impliedFormat":1},{"version":"3ae18d6fa578fc0025f43e6b2f26bc3d1ba110e9149273bd213a5cb7fb878848","impliedFormat":1},{"version":"2873b8fe4083b54fb60dd1d03ee8b22496e41f96a4e536e06cd59a481aba01de","impliedFormat":1},{"version":"5fc9e50135f4163989ce74b83b68a5ee44d151f04ec44078adbe913c8dad694e","impliedFormat":1},{"version":"e2949c84dcb7b6a3fb40fc8bfcd9fa6b74d1e2c830de0d5ace7159cc4fb4b5a5","impliedFormat":1},{"version":"34a80ad568a06a539e43bde102bed1fcb8bec196811caa9abc3a0cf44a95fdde","impliedFormat":1},{"version":"e0f1bf295d165e3e7fdb6bbd9910888e9c5645e19cb4ae4b86303ee5ba2c951d","impliedFormat":1},{"version":"7c6d7a526120d34a336b995d5a5b2f52d934b89d364b333b850c15ef3b5bffce","impliedFormat":1},{"version":"e3d05607f9e532c806395e8765913736c42900c5c3ab5ab52d910da6fd57121c","impliedFormat":1},{"version":"0a019658c43651da76cdbc673aab961f4c6e9fab4006e3aaedb5b13e5dbab37d","impliedFormat":1},{"version":"956b961306d285dc2c1d3b5020baf1e2c57f564876f50dd42e0976bc75a020d3","impliedFormat":1},{"version":"dcb2d6a6e0b8900a46f9cc664fc1c6e3cc9a4d99249bad1605749d651e8cdd2e","impliedFormat":1},{"version":"9b33ad40fa8b00650b695638c8e08df88bbbfed00283ff5eabbf11b8813e03f8","impliedFormat":1},{"version":"fa90ab24a39247e1e9874784e7b56a93ab9f1a04daadff9d9cb99d7223d91486","impliedFormat":1},{"version":"4b91eb2d2841e34c371710ec924e8ac947911d9941bdfb6a11730e741f287005","impliedFormat":1},{"version":"ce980562ed0d193d700d6d55ff717131e4bb58b88b5448e7e05dfceae719f47c","impliedFormat":1},{"version":"4d66be39bdb7a62696866426ec835920b2cdce7124b54aa14b1f9fef4d41cd93","impliedFormat":1},{"version":"dd679f95f944384711ac7c9ed85d6b46b15f82c023c4919ba3232fd753532c90","impliedFormat":1},{"version":"8b4a688f685193540c8164ebe48624c4e82b8769d74dfb3557c4dbb9fa567898","impliedFormat":1},{"version":"b5f9c5b2f54ce4c0baf948d885a7a21aeba477dc9356beefd63c4bddac366d6c","impliedFormat":1},{"version":"48079abf5a74f7028473652a9cf64e3d260c44bf4060b05485a6e3d7f0370dc2","impliedFormat":1},{"version":"ea22fbc1dbd8fac6df7dbd5870183a9d14ccb8358c253bf844ced890a7f38dd6","impliedFormat":1},{"version":"773078223907d9936c05dddfed60cafeebd4249acbcc189001370261718f0258","impliedFormat":1},{"version":"17e344c68488e5787eebf3ec125565d51a468af5701e214367a42ce8e5eef059","impliedFormat":1},{"version":"aadf00554ac0118fcf308d7ae1cafd86a7931b41e038022dd891af248d72ef35","impliedFormat":1},{"version":"733ec8bd6c210af3ea70cfd0ae7924949de5ecb384d9d1db3744b3af2f9d0f00","impliedFormat":1},{"version":"d95f40246c4a53a739dec1818a4f3cb39aac4965ae1a4faf614f78bf3b85c347","impliedFormat":1},{"version":"3a844741079e4c4e38e5dfa7b182ef7030a8c787bc08efacebe0d7b3bb685f37","impliedFormat":1},{"version":"5f5ff006e411f34b3ecf4fe66bbf7c9978bab7fb7f09646c91b8549acc8d487f","impliedFormat":1},{"version":"70e812cb0393e7100087a2203ee9349dab49974032429d29c84222be1356e6f8","impliedFormat":1},{"version":"856aae51a27c4c285b39701ee870dae66bd5b8e007c8dc153bd66fd56fa901ea","impliedFormat":1},{"version":"739130f4f55f33efe791911603f2276169bc0554dbb789bd907870774bbf30d0","impliedFormat":1},{"version":"9ee7eea77d7631e7d95b4f5efc9972fea3a82a3947bac97e0c5c3a9ad2f8d509","impliedFormat":1},{"version":"748b8a93f92a5e3c6c45e9252efe5f70312dbaabf23c32882b0901d530698b40","impliedFormat":1},{"version":"59a6a3f236c937dcc8a6d99557b4317712c0b82f53e73f7a0070c82fc795ed6e","impliedFormat":1},{"version":"dfd624f05e679a330f8b0b8c27b97cc6d09cb8c5547c229eedcf71ee60716f50","impliedFormat":1},{"version":"33bcff4a7c9c06dd05a7635f1a7ba8ccd1a26250caf6fef41fe4bf3677437356","impliedFormat":1},{"version":"001bb2fff6cc7d1cfb99e5eb13b745764230c0a48c9832cd4b8196acbb63a402","impliedFormat":1},{"version":"7f843004c1f9cc2d32f9778227813cfeb8f47733f4485130d999f51eb97a45df","impliedFormat":1},{"version":"1489c494f095baea8f9e67d37a9fdd4025c172c1e74ee783093ee2756a665a1d","impliedFormat":1},{"version":"d4946c3a7c18a8ba1e60a1578c676f51a81d1767fcbbf60b072803ed3fa7f9f9","impliedFormat":1},{"version":"a56648d6831b9b5552b56f0eae7536666d181c86fdcc422f9143e4a5cece6a39","impliedFormat":1},{"version":"f15ff88fe1895cda331b45ceaf23dca027937395a64daa6867cbde52dea7b8c2","impliedFormat":1},{"version":"37046d990462ee09b87b6045d32d62f04d2285351a0977aec83050d994cd6992","impliedFormat":1},{"version":"67294340fe22775adae3b562bdd25adbb1b0d9926b54dfca251418e0e9df8730","impliedFormat":1},{"version":"38b2ce306ab9f13712896b0a4aa876c3e0af5b4466266938e7c5988d822a3f76","impliedFormat":1},{"version":"40e954fecc5f79d6d0890a64713d5e2f8083ae960b6b4e541d44efb9b1c4a899","impliedFormat":1},{"version":"0203a29de8ad74bc916100aad38ccaef5efd37435c8e2f6f6fbfaf2449cf9c03","impliedFormat":1},{"version":"c7aedf7a48b01d06a7a163a63bf1d544fc0bd00417885bae592319cd3f8a97e9","impliedFormat":1},{"version":"e5873895fef4cf12c0bed5b157849e6784d24280bd41ed90854180eebdaa5026","impliedFormat":1},{"version":"65cfc8c1b0ef79383524acaf8151508cb09d163850c4a50dc53574583afd4761","impliedFormat":1},{"version":"c38a0a8b43a6403d1381c32af260513432885aa4c0ae03addad9bad07fd2a2d7","impliedFormat":1},{"version":"d34cbb43422395aa227955f37c7d2b5fcaa2e6675e2a7f7e4e25ee704ab912be","impliedFormat":1},{"version":"af560f62851c384acb21284b9127d53411951056010ff0971f0e66d88e66a7b5","impliedFormat":1},{"version":"b34a0615615cbc69750d9fffe16f31563d917330413219225915cbf4fd473fb7","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"82d7a9061cc31434ca602b01abf3bd3aa3d93eeba3d92ca4d7ec5ff0e401bcc1","impliedFormat":1},{"version":"4ca12ab9d4783b7180b61b96b798b62f6da47e3ee15ff54a5a41607349e15ffe","impliedFormat":1},{"version":"143c3bff41eab3e0d761a3cab2bd580a642beb7509d21fdae5ad6ef04eaec846","impliedFormat":1},{"version":"92538fb1b4ade68cef4fc7b35b8b919e1f2d0c95a080865f991bb10254bb198e","impliedFormat":1},{"version":"963a1f038a096850feadc16b1f4877bae9b98f70fb5471e8af07813fc440d9c8","impliedFormat":1},{"version":"636458e860b725e326083020eac20d68df8c765c22870550ad78727f08d354ab","impliedFormat":1},{"version":"b2597f8e5cc644c743602ec4a9196f1a4f981383bc666806c673061d5a974d7f","impliedFormat":1},{"version":"9ea5135bc86b361d9f7d7559979d3749945a5976bf85e7f5c63b5439f122e5fa","impliedFormat":1},{"version":"11606f2a7b32a47aa2fede3d93f3a4505cf57bb4fbae758b0cbebebed1dae817","impliedFormat":1},{"version":"ec5ef2d24ec079093f3e8aeafc36110e32d586c3f2c3af395823aae744e7b69f","impliedFormat":1},{"version":"181baa25db7c55954e1d4114485cd3ed96df14a6e26fb8c9ba702a8a118d9254","impliedFormat":1},{"version":"fb553e78cd953e6b36a394021bd392446638033c9e3388a9f1babb613617a20a","impliedFormat":1},{"version":"6139c7fcac07fead5b35781d146198019e176f8d32c9b6ae89acfa22b16a9fbc","impliedFormat":1},{"version":"86b2abd6ddc37ca8fbed9606367ce4b8fa1d6b2fa3c30cd8f5fcb6d3ae996268","impliedFormat":1},{"version":"5a699f07f692f146028a8d2a24dea3df3bebec19a2f6dc7e1624274b8a0765b8","impliedFormat":1},{"version":"e891cc403ec4588c43e67f20d4f44c2de1995e1a778e7a255e0a1f8c7d263005","impliedFormat":1},{"version":"7a07b0e6d8f5356cb3473723d1853c9505301e05329df8a72ba6c42a2657ca66","impliedFormat":1},{"version":"e54bfc9e643070779ab10e9d572a776562725c6533f9b8eefe30d5ee2e87b22e","impliedFormat":1},{"version":"b60efbac98231283107121b5b3327f56a6632c2d14d7616920bc309a4f6d4bc3","impliedFormat":1},{"version":"46036e7d150725b12b0ef99ca77cfd4ee662c6a0e011f85a679827dd65d1f42c","impliedFormat":99},{"version":"33235f0c8a3cdf9917c3a2b8eca15fba28d554a48d8eeca24c417a16e317d0ac","impliedFormat":99},{"version":"783a9a7d35f9b922e0d72452e85245829e5618776b3243c4adb9bcd554443ca5","impliedFormat":99},{"version":"dd9d62565b1d4e0885e9b1f1fb55c7a304e5710303d31821a7daeeada9662aa0","impliedFormat":99},{"version":"ef14aa59689ac1bd4b725220fafe753eff9acd8cdc445c04e5b98ac3fe28bff2","impliedFormat":99},{"version":"8c184a7193d318242db5e31ef4bbd73e88c3a0e333c0f4c8523ee2d9ad76cf84","impliedFormat":99},{"version":"dc7600229385bd96566e63a48e336a38a71f223de213b9a5c04f84a9c59d1342","impliedFormat":99},{"version":"907df4219dc9e9e4310be2f3e9e118aa092d073612b9ab1247e447c6ce902260","impliedFormat":99},{"version":"4f4f2beae13a724e7f1b45b5af86a94500d799c7a59181eae1098f549698b09a","impliedFormat":99},{"version":"62478b6c261fee944784c9039e465e03600d68b60d312aba7040143dc1189d91","impliedFormat":99},{"version":"72a845236a24235f598a7da1dc89c0e38a74e1c8cdf4db833c5618e12adc4a50","impliedFormat":99},{"version":"0d2a83bc35ebb75a347d16b72836cf7d407563a7827a585590fae7e2873fcdab","impliedFormat":99},{"version":"aa95d55cbdb02fd4cfcc5b52f04453dbaa86a1fcf31e051bcfb3716f398ccefa","impliedFormat":1},{"version":"55cc31850bb3aec591a02f4e2d2999f1484a52f0afa8ed6934dbb0cfa0635128","impliedFormat":1},{"version":"ae5648da65ae89098d2238037b8b739303ff1f1ed7f711f5e1dab85c0cde73dc","impliedFormat":1},{"version":"21cc4c106db99d082b2b726f4feea224fa40b10a6cc7de03c2ac8ecaded86faf","impliedFormat":1},{"version":"51b46e83520f9dc3e1380657071ab165ada01fee49e7b41b186da91bd287503d","impliedFormat":1},{"version":"f577f333d0679c82bbf346c3983de5f6e5730e264937021a506b13ab1cee5e52","impliedFormat":1},{"version":"47ec9752d4882a64ef06ce90067439f39e1f64831efb82d6b61a27e46c27665e","impliedFormat":1},{"version":"4550d4a71bfe8407890afd7c7953e4ff732e848e6569cd94fbf33b45c4339a94","impliedFormat":1},{"version":"79954720b311aed13a8b28effcf9f043816ff2a8f1887ffbc4f5ea604c3ab0ae","impliedFormat":1},{"version":"0c0f1398bc2cb82a901d38593309ab3e9a025718c31d2d41096373661fa943e8","impliedFormat":1},{"version":"ac994da1b115d9aed1ca0100a607032122ec0b1cac07436a3215e6c7f8c2ef2f","impliedFormat":1},{"version":"85a143aa41b4a16f8836a9c1059b84fcaf9380b37fb28624cc35b49bb2c834fc","impliedFormat":1},{"version":"b759e7b85c5337b457a1d61df4b47fb2e97665b05e666e75289d808f3aa4f1bf","impliedFormat":1},{"version":"fa36037b4be0f7c122eb03efb72e79c1799981028f6bfc6b8dea307c97f3529c","impliedFormat":1},{"version":"820fc91384a1b27caba7f2411a1535e9313bf46411e290b3480b030837c6f985","impliedFormat":1},{"version":"da7e68de00deb6259533046617b8a3cd35e61a1be103d0e0487584cef7f1da2c","impliedFormat":1},{"version":"ad4172e0e6d5be3841679dec15e80a2dd09d768a6936ae0df2c05c2c8d45523b","impliedFormat":1},{"version":"706230799de1bc03f4d1e927b0f535f4c9f74061b40138f5ade2e3a470b7f3ea","impliedFormat":1},{"version":"a09dc5f7d149bcbdbc83db02b54ba7cc83bda0148454782c41521e1e9a42233e","impliedFormat":1},{"version":"6fd319d50603e1200a24078e3e92dd1b17ff058681ef451dffa890ba8e84514b","impliedFormat":1},{"version":"2ad76a8f378c771219e4a1c9fc1fc6a66a4ad7192edc3e84a5e0cd79a806dbd5","impliedFormat":1},{"version":"bb40c13d89e52602b3af4cce60ccc46644e30cc2fa5f47d5c8d0fa645c85532a","impliedFormat":1},{"version":"8c2cb956a171e41734bf8ebf4308eac8e21025a4501d3729d0d378f6d259cd02","impliedFormat":1},{"version":"a6dbb9a79212baa8a46fdf91ab2b8210665d55cd739ed1668f109d1976f213f1","impliedFormat":1},{"version":"84dc7636681d2cd0ccc6a365e9123da5a0908b280b1cc485dc5d354a2ca79746","impliedFormat":1},{"version":"eb4f2a4043e45b0452ed473b674229d4a7fda48a8092b7e34d88188df0c8af47","impliedFormat":1},{"version":"95ebe1415645192fdf015b46b4c542bb60e736624bfee59559af8a7671016202","impliedFormat":1},{"version":"d19c66a5a7376840dc3811fa0465038e3e270fe2e9d0d17d1f0c1b2c27481b92","impliedFormat":1},{"version":"0e396f97cc7eae97b942cccbe7c17f60f8af207d8c4aa6c154267eaca86ab11c","impliedFormat":1},{"version":"f4c5d65fe7e93cecddd537d46af01820cdb9f72bb94b09c6309debbb50ad5ada","impliedFormat":1},{"version":"ff526238d3fbb56031ca203f8014f5e75077f04d842f441d2c050df01e849f7a","impliedFormat":1},{"version":"dad84d1b803af8326557fd1c7710ce845a6d590e462c802d380e9d947ec14c6e","impliedFormat":1},{"version":"5806973501dd13a50b30b3f23751f28d9eb8ee103228af39d07491e1de7484fc","impliedFormat":1},{"version":"a3caaf2245d2567ffdda491cbc817df385ef549dc186a39c2a3452daa07dc034","impliedFormat":1},{"version":"a8ff496bbaa5cf7145cc4ca8df03e2dc480bbe24dcbd1f9734200eb12d5aaad7","impliedFormat":1},{"version":"e236821607e4c3dc1adbdaca5cd7fe55ff8d19051672532639e76f045889e9ee","impliedFormat":1},{"version":"f9e2c40b4a0686af8576ad4aad9dfb9e62f5daf309101bc9956a497f38f92b39","impliedFormat":1},{"version":"fff48e97d33173e8b75b9a2b74ed71e6d0d3b7e4aa81b821a90c09a95e0423e0","impliedFormat":1},{"version":"928b23be870338067bbc9381ffb3de5cc3b088abe73c8e4995444fbabd7edaf1","impliedFormat":1},{"version":"a26d74bc8768e134734fa049d5a89fb674a560292f4bf1b39392416dc04cf49e","impliedFormat":1},{"version":"ea7f3d87bb25b8cf26c1b440de31b628c53b5e72e8f1ab1726356bf58acf5946","impliedFormat":1},{"version":"7ec047b73f621c526468517fea779fec2007dd05baa880989def59126c98ef79","impliedFormat":1},{"version":"8dd450de6d756cee0761f277c6dc58b0b5a66b8c274b980949318b8cad26d712","impliedFormat":1},{"version":"904d6ad970b6bd825449480488a73d9b98432357ab38cf8d31ffd651ae376ff5","impliedFormat":1},{"version":"dfcf16e716338e9fe8cf790ac7756f61c85b83b699861df970661e97bf482692","impliedFormat":1},{"version":"3b3fe018cdd6ab5fc1c1b9de009f365e0d6653add071f5fcd383bc9a298cdcee","impliedFormat":1},{"version":"6b5f886fe41e2e767168e491fe6048398ed6439d44e006d9f51cc31265f08978","impliedFormat":1},{"version":"f4a1eba860f7493d19df42373ddde4f3c6f31aa574b608e55e5b2bd459bba587","impliedFormat":1},{"version":"6b863463764ae572b9ada405bf77aac37b5e5089a3ab420d0862e4471051393b","impliedFormat":1},{"version":"ec69ebd1c4850514ebb6724911ad56e71caa0d076891ed6b67cb10d3ebbf2586","impliedFormat":1},{"version":"89783bd45ab35df55203b522f8271500189c3526976af533a599a86caaf31362","impliedFormat":1},{"version":"26e6c521a290630ea31f0205a46a87cab35faac96e2b30606f37bae7bcda4f9d","impliedFormat":1},{"version":"a51e18dc7e00eb6961c55b2a4ba4b70ab8c5cd601dc73337a0f5fd8292a5e944","impliedFormat":1},{"version":"3ff6e9ce7c3ad38dfe5165e90c826a27b289c9d0e7d9e934f654566867700fb7","impliedFormat":1},{"version":"f976134f9fc2369f6d4694eea7db6c2fb3c757ae5dbb047aeb06f02a21886443","impliedFormat":1},{"version":"d7e7199291e479bebe7f2bcefeba3498c80ce70c3b3440174fa211cfdab7bedb","impliedFormat":1},{"version":"233267a4a036c64aee95f66a0d31e3e0ef048cccc57dd66f9cf87582b38691e4","impliedFormat":1},{"version":"739fc10cb1f1c08f7578684ad660334e9617a81690d41d3dad234b3e4d5835b1","impliedFormat":1},{"version":"1af96cab9fbac290cbcaa07154ced5fb7a2b8bec02bcc6a34e77456d40fffc71","impliedFormat":1},{"version":"bed80e26fefb16b3eb7062e7878f38e1f0c0280fb61a6a608bdfb6dd64dbfc9b","impliedFormat":1},{"version":"39937ecb2516623611c287309f2b0e123fe5cb06d97487bb6fb6ec911e3ac652","impliedFormat":1},{"version":"9c171e2b0fa97a74c2437e746ea0127b49e6908e89ae6dc06ff238c3bc5c00fe","impliedFormat":1},{"version":"717cf65141e976becda69384a57148f4f6339ec04ff431ebb2ad19c558be4346","impliedFormat":1},{"version":"7f24ea5b058a109f8c9cf8f7711fb20cd2ead9817fa88415f94e47a108d9b149","impliedFormat":1},{"version":"3473f825e4648c65d597a0277245c250531c8fb946bdda179411e61a9eda50de","impliedFormat":1},{"version":"245125adc48737019481042b0e3dab6122528c1acc8933c5afd59e57dd2265cb","impliedFormat":1},{"version":"33f78f7ea02b6489407623b23b616dc8557fa8774c2e2528b33352c812fa1e68","impliedFormat":1},{"version":"e974b3d1188d8ecc1f08d82e9f03710005377d3a13d1af34bad5102aeb99a918","affectsGlobalScope":true,"impliedFormat":1},{"version":"1afb7e5024f4c7ced94c9b7efbd06967da114542851dc57085b2bcda83d1406e","impliedFormat":1},{"version":"b37cc76c2787c14293866b0a7a616c67e7ec8ac740a3d96c906259e83deaa145","impliedFormat":1},{"version":"9398147c02a5a6e1cfa1056ee3ee617c15db397244e372907542229e222fe92f","impliedFormat":1},{"version":"71b2d126e939c1ce534264d8bdaccc9f4444eca1afa3649732c383c69386e522","impliedFormat":1},{"version":"4fccae5d922d4186b7a8c9dbd236f57593b600a056327d79b000d6acc592f4cf","impliedFormat":1},{"version":"081df8dd1109d4b1be003fc3e35beae79880eb7012992f432beb41ac97341ec2","impliedFormat":1},{"version":"051ace40248ab48179838b720dc626daa82a0e03d8fd3076afffc537d7c43ad4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dacceada4f4fcb16e871353e6fb9b9f7bc2f17aaad5d0a4ea46bfc32ebfe355a","signature":"b46e2955978a9d06affdf10311b70d406c2965777328c2bbce307efac70075d9","impliedFormat":1},{"version":"3baf101b409b4f14db477326793c8894f959b7f7c488f8ac85f0138601e1e539","signature":"c51c4d98c4b9a70a602a41382d317d2600d88c0b1d3d2dc17f87402e69029cc5","impliedFormat":1},{"version":"eecd3f81f06cdc3a01b8b1a23adacf50d0f895709d4805c981503844d9c9e011","signature":"c85e9d6e982938e77e3e6b5cfe4969c295b638ffb5a0b9a6a88a82bd8cfaaf6c","affectsGlobalScope":true,"impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[[526,528]],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":9,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[1171,1],[535,1],[258,2],[192,1],[191,1],[238,1],[246,1],[230,3],[234,4],[247,5],[248,6],[232,7],[231,8],[235,9],[249,10],[243,1],[250,10],[244,11],[229,12],[260,13],[241,14],[245,15],[251,16],[205,17],[252,18],[240,9],[253,9],[233,19],[194,20],[236,21],[237,15],[217,15],[218,22],[219,23],[193,24],[220,25],[196,26],[195,27],[214,28],[221,17],[222,15],[223,5],[198,29],[199,5],[200,30],[201,5],[202,30],[203,31],[224,32],[204,33],[228,34],[206,35],[207,31],[208,36],[209,20],[197,37],[225,38],[210,39],[242,40],[211,33],[226,32],[227,5],[212,5],[213,5],[215,41],[216,35],[254,9],[255,1],[256,42],[80,1],[239,43],[259,1],[261,44],[528,45],[526,46],[527,47],[523,48],[525,49],[521,50],[522,51],[519,52],[520,53],[524,54],[517,55],[518,56],[893,1],[692,57],[690,1],[270,58],[271,59],[458,60],[453,61],[455,62],[457,63],[460,64],[268,65],[451,66],[461,67],[452,68],[454,69],[459,70],[267,71],[456,72],[462,73],[463,74],[465,75],[466,76],[467,74],[468,76],[469,75],[470,75],[471,74],[472,74],[473,77],[474,74],[475,78],[464,79],[476,80],[477,81],[478,82],[479,83],[487,84],[514,85],[480,77],[483,86],[481,87],[482,82],[484,1],[510,84],[511,76],[513,88],[512,89],[489,84],[488,84],[496,90],[503,89],[509,91],[504,84],[505,84],[506,84],[508,92],[486,1],[485,84],[440,93],[441,93],[439,94],[442,1],[443,44],[444,44],[445,44],[450,95],[446,1],[449,96],[448,97],[447,96],[397,98],[398,44],[399,99],[328,100],[396,101],[394,44],[395,102],[376,103],[393,104],[350,44],[373,1],[370,44],[343,44],[342,44],[363,44],[371,105],[357,44],[344,106],[338,107],[348,106],[347,106],[332,44],[333,44],[334,44],[341,44],[366,44],[346,106],[356,44],[345,44],[331,44],[362,108],[375,109],[329,44],[368,1],[369,44],[330,106],[360,1],[349,106],[353,1],[364,1],[339,110],[340,106],[336,107],[352,107],[358,44],[351,111],[374,44],[355,106],[354,44],[359,107],[335,44],[361,44],[337,112],[367,1],[365,106],[372,1],[377,113],[381,114],[382,115],[383,115],[384,115],[385,115],[392,116],[386,115],[387,115],[388,113],[380,115],[379,117],[389,115],[390,115],[391,115],[378,44],[302,44],[324,44],[292,44],[294,44],[311,118],[291,44],[278,1],[316,44],[325,118],[309,44],[293,118],[287,119],[279,1],[280,1],[300,118],[299,118],[281,44],[282,44],[283,44],[290,44],[320,44],[298,118],[308,44],[295,44],[277,44],[315,44],[327,120],[275,121],[322,1],[323,44],[276,122],[313,1],[301,118],[305,1],[318,1],[288,123],[289,118],[285,119],[304,119],[310,44],[303,118],[296,124],[274,44],[307,118],[306,44],[317,44],[312,119],[284,44],[314,44],[286,125],[321,1],[319,118],[297,124],[326,1],[855,1],[889,126],[888,126],[887,1],[891,127],[892,127],[890,1],[858,1],[856,128],[859,129],[857,129],[860,1],[899,1],[900,1],[904,1],[901,1],[911,128],[910,1],[912,1],[913,130],[905,131],[909,132],[906,133],[902,1],[907,134],[908,135],[903,1],[875,128],[871,128],[874,128],[873,128],[872,128],[868,128],[867,128],[870,128],[869,128],[862,128],[863,136],[861,1],[866,137],[864,128],[917,138],[896,139],[898,139],[897,139],[894,140],[895,139],[915,1],[914,1],[916,1],[876,141],[877,1],[880,1],[883,1],[878,1],[885,1],[886,142],[882,1],[879,1],[881,1],[884,1],[865,1],[776,1],[779,143],[497,144],[490,84],[495,145],[492,144],[502,146],[493,144],[501,147],[499,148],[494,144],[491,84],[500,149],[507,150],[498,1],[778,1],[629,151],[602,1],[630,1],[631,1],[632,1],[689,152],[633,153],[678,154],[635,155],[634,156],[636,153],[637,153],[639,157],[638,153],[640,158],[641,158],[642,153],[644,159],[645,153],[646,159],[647,153],[649,153],[650,153],[651,153],[652,160],[648,153],[653,1],[654,161],[655,161],[656,161],[657,161],[658,161],[667,162],[659,161],[660,161],[661,161],[662,161],[664,161],[663,161],[665,161],[666,161],[668,153],[669,153],[643,153],[670,159],[672,163],[671,153],[673,153],[674,153],[675,164],[677,153],[676,153],[679,153],[681,153],[682,165],[680,153],[683,153],[684,153],[685,153],[686,153],[687,153],[688,153],[695,166],[691,57],[693,167],[694,57],[697,168],[698,169],[699,1],[266,1],[705,170],[696,151],[706,1],[711,171],[709,172],[712,1],[714,173],[715,173],[716,1],[717,1],[719,174],[720,1],[721,1],[722,173],[723,1],[724,1],[725,175],[726,1],[727,1],[728,176],[729,1],[730,177],[731,1],[732,1],[733,1],[734,1],[737,1],[736,178],[713,1],[738,179],[739,1],[735,1],[740,1],[741,173],[742,180],[743,181],[745,182],[751,183],[750,184],[749,185],[746,1],[748,186],[747,1],[704,187],[753,188],[752,187],[756,189],[718,1],[758,190],[759,191],[761,192],[763,193],[764,193],[765,193],[762,1],[768,194],[766,195],[767,195],[769,1],[770,1],[707,1],[771,196],[772,197],[773,1],[774,198],[775,199],[784,200],[419,1],[754,201],[755,1],[785,202],[710,1],[786,203],[789,204],[787,204],[788,205],[840,206],[842,207],[843,208],[841,209],[844,210],[845,211],[846,212],[847,213],[848,214],[849,215],[850,216],[851,217],[852,218],[853,219],[854,192],[700,1],[757,1],[1046,1],[1047,1],[1053,220],[1050,221],[1049,222],[1052,223],[1048,1],[1051,221],[744,1],[1054,197],[575,224],[576,224],[577,225],[534,226],[578,227],[579,228],[580,229],[529,1],[532,230],[530,1],[531,1],[581,231],[582,232],[583,233],[584,234],[585,235],[586,236],[587,236],[589,237],[588,238],[590,239],[591,240],[592,241],[574,242],[533,1],[593,243],[594,244],[595,245],[628,246],[596,247],[597,248],[598,249],[552,250],[562,251],[551,250],[572,252],[543,253],[542,254],[571,197],[565,255],[570,256],[545,257],[559,258],[544,259],[568,260],[540,261],[539,197],[569,262],[541,263],[546,264],[547,1],[550,264],[537,1],[573,265],[563,266],[554,267],[555,268],[557,269],[553,270],[556,271],[566,197],[548,272],[549,273],[558,274],[538,275],[561,266],[560,264],[564,1],[567,276],[599,277],[600,278],[601,279],[603,280],[604,281],[605,282],[606,283],[607,283],[608,284],[609,1],[610,285],[612,286],[611,287],[613,288],[614,289],[615,290],[616,291],[617,292],[618,293],[619,294],[620,295],[621,296],[622,297],[623,298],[624,299],[625,300],[626,301],[627,302],[1055,197],[1056,1],[1057,1],[1063,303],[1058,1],[1064,1],[1067,1],[264,1],[1068,1],[702,1],[1071,304],[1070,305],[703,1],[1072,84],[1077,306],[1076,307],[1079,306],[1078,308],[1075,309],[1073,1],[1074,310],[262,1],[265,311],[269,84],[1080,312],[1081,1],[1098,313],[1123,314],[1124,315],[1099,316],[1102,316],[1121,314],[1122,314],[1112,314],[1111,317],[1109,314],[1104,314],[1117,314],[1115,314],[1119,314],[1103,314],[1116,314],[1120,314],[1105,314],[1106,314],[1118,314],[1100,314],[1107,314],[1108,314],[1110,314],[1114,314],[1125,318],[1113,314],[1101,314],[1138,319],[1137,1],[1132,318],[1134,320],[1133,318],[1126,318],[1127,318],[1129,318],[1131,318],[1135,320],[1136,320],[1128,320],[1130,320],[701,321],[1140,322],[1139,172],[708,323],[1141,151],[1142,1],[1143,1],[1144,1],[1147,324],[1146,325],[1145,326],[920,327],[919,1],[1149,328],[760,1],[1165,329],[1163,330],[1162,331],[1153,332],[1154,333],[1161,334],[1155,333],[1156,332],[1157,332],[1158,332],[1159,335],[1152,336],[1160,331],[1151,1],[1164,337],[1166,338],[1167,1],[1168,339],[1169,1],[1170,340],[835,341],[792,1],[794,342],[793,343],[798,344],[833,345],[830,346],[832,347],[795,346],[796,348],[800,348],[799,349],[797,350],[831,351],[829,346],[834,352],[827,1],[828,1],[801,353],[806,346],[808,346],[803,346],[804,353],[810,346],[811,354],[802,346],[807,346],[809,346],[805,346],[825,355],[824,346],[826,356],[820,346],[822,346],[821,346],[817,346],[823,357],[818,346],[819,358],[812,346],[813,346],[814,346],[815,346],[816,346],[791,1],[1150,1],[536,1],[777,1],[433,359],[434,360],[263,1],[1037,361],[1033,1],[1034,1],[1032,1],[1035,1],[1036,1],[1038,1],[1030,1],[1031,362],[1039,363],[921,364],[190,1],[783,365],[1093,366],[1094,367],[1092,368],[1095,369],[1089,370],[1090,371],[1091,372],[1085,370],[1086,370],[1088,373],[1087,370],[1084,374],[515,375],[516,376],[404,377],[405,1],[402,378],[400,379],[406,380],[401,381],[403,382],[273,1],[432,383],[416,384],[417,384],[427,385],[428,386],[430,387],[429,388],[431,389],[412,390],[408,391],[413,384],[414,392],[411,393],[410,391],[409,391],[407,394],[415,395],[420,44],[418,44],[422,396],[425,397],[421,398],[426,399],[423,396],[424,44],[436,400],[435,44],[438,401],[437,400],[98,402],[166,403],[165,404],[164,405],[103,406],[119,407],[117,408],[118,409],[104,410],[189,411],[89,1],[93,1],[91,412],[92,1],[96,413],[99,1],[116,414],[94,1],[111,415],[97,416],[112,417],[115,418],[113,418],[110,419],[90,1],[95,1],[114,420],[120,421],[108,1],[102,422],[100,423],[109,424],[106,425],[105,425],[101,426],[107,427],[185,428],[179,429],[172,430],[171,431],[180,432],[181,418],[173,433],[186,434],[167,435],[168,436],[169,437],[188,438],[170,431],[174,434],[175,439],[182,440],[183,416],[184,439],[187,418],[176,437],[121,441],[177,442],[178,443],[163,444],[161,445],[162,445],[125,445],[126,445],[127,445],[128,445],[129,445],[130,445],[131,445],[132,445],[133,445],[153,445],[134,445],[135,445],[136,445],[137,445],[138,445],[139,445],[160,445],[140,445],[141,445],[142,445],[143,445],[158,445],[144,445],[159,445],[145,445],[156,445],[157,445],[146,445],[147,445],[148,445],[154,445],[155,445],[149,445],[150,445],[151,445],[152,445],[124,446],[123,447],[122,448],[88,1],[257,1],[781,449],[782,450],[1083,1],[922,451],[965,452],[964,453],[963,454],[966,1],[1042,455],[1041,1],[1045,456],[1043,457],[918,458],[1044,459],[967,460],[1040,461],[1029,462],[969,463],[970,463],[971,463],[972,463],[973,463],[1026,463],[974,463],[975,463],[976,463],[977,463],[978,463],[979,463],[980,463],[981,463],[1025,463],[982,463],[983,463],[984,463],[985,463],[986,463],[987,463],[988,463],[989,463],[990,463],[991,463],[992,463],[993,463],[1028,463],[994,463],[995,463],[996,463],[997,463],[998,463],[999,463],[1000,463],[1001,463],[1002,463],[1003,463],[1004,463],[1005,463],[1027,463],[1006,463],[1007,463],[1008,463],[1009,463],[1010,463],[1011,463],[1012,463],[1013,463],[1014,463],[1015,463],[1016,463],[1017,463],[1018,463],[1019,463],[1020,463],[1021,463],[1022,463],[1023,463],[1024,463],[968,464],[961,465],[962,466],[1082,467],[1062,468],[1059,197],[1061,469],[1060,1],[1065,1],[1066,470],[780,471],[1097,472],[1096,473],[837,474],[836,475],[790,476],[1148,1],[838,1],[1069,305],[79,1],[953,477],[939,478],[950,479],[923,1],[941,480],[940,1],[942,481],[948,482],[947,1],[924,1],[945,1],[946,1],[932,483],[927,1],[926,484],[925,1],[934,1],[951,485],[930,483],[933,1],[938,1],[931,483],[928,484],[929,1],[935,484],[936,484],[949,1],[944,1],[952,1],[943,1],[954,1],[937,1],[955,486],[956,486],[960,487],[957,488],[958,489],[959,488],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[272,1],[839,490],[83,491],[84,492],[87,493],[82,1],[85,491],[86,491],[81,1]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/grafserv/dist/accept.d.ts b/grafast/grafserv/dist/accept.d.ts new file mode 100644 index 0000000000..292ad9f67d --- /dev/null +++ b/grafast/grafserv/dist/accept.d.ts @@ -0,0 +1,8 @@ +/** + * Returns a function that returns the (first, if multiple equal matches) type + * from mediaTypes that best matches the accept query specified by the given + * `acceptHeader`. If no Accept header is present then the first mediaType will + * be returned. If no match is possible, `null` will be returned. + */ +export declare function makeAcceptMatcher(mediaTypes: string[]): (acceptHeader: string | undefined) => string | null; +//# sourceMappingURL=accept.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/accept.d.ts.map b/grafast/grafserv/dist/accept.d.ts.map new file mode 100644 index 0000000000..c0f577cda1 --- /dev/null +++ b/grafast/grafserv/dist/accept.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"accept.d.ts","sourceRoot":"","sources":["../src/accept.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAwBlD,cAAc,MAAM,GAAG,SAAS,KAC/B,MAAM,GAAG,IAAI,CAmCjB"} \ No newline at end of file diff --git a/grafast/grafserv/dist/accept.js b/grafast/grafserv/dist/accept.js new file mode 100644 index 0000000000..aae656595d --- /dev/null +++ b/grafast/grafserv/dist/accept.js @@ -0,0 +1,468 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeAcceptMatcher = makeAcceptMatcher; +const tslib_1 = require("tslib"); +const lru_1 = tslib_1.__importDefault(require("@graphile/lru")); +/** + * Returns a function that returns the (first, if multiple equal matches) type + * from mediaTypes that best matches the accept query specified by the given + * `acceptHeader`. If no Accept header is present then the first mediaType will + * be returned. If no match is possible, `null` will be returned. + */ +function makeAcceptMatcher(mediaTypes) { + const typeDigests = mediaTypes.map((t) => { + // NOTE: this parsing is super lazy and isn't 100% reliable; e.g. it could + // be broken by `foo/bar;baz="\\";frog"`. We're only handling values passed + // by our own code though, and we ain't passing this kind of nonsense. + const [spec, ...params] = t.split(";"); + const parameters = Object.create(null); + for (const param of params) { + const [key, val] = param.split("="); + parameters[key] = val; + } + const [type, subtype] = spec.split("/"); + return { + type, + subtype, + parameters, + q: 1, + originalType: t, + noParams: Object.keys(parameters).length === 0, + }; + }); + const lru = new lru_1.default({ maxLength: 50 }); + return function preferredAccept(acceptHeader) { + if (acceptHeader === undefined) { + return mediaTypes[0]; + } + const existing = lru.get(acceptHeader); + if (existing !== undefined) { + return existing; + } + else { + const specs = parseAccepts(acceptHeader); + // Find the first spec that matches each, then pick the one with the + // highest q. + let bestQ = 0; + let bestMediaType = null; + for (const digest of typeDigests) { + const highestPrecedenceSpecMatch = specs.find((spec) => { + return ((spec.type === "*" || + (spec.type === digest.type && + (spec.subtype === "*" || spec.subtype === digest.subtype))) && + (spec.noParams || + (!digest.noParams && + matchesParameters(spec.parameters, digest.parameters)))); + }); + if (highestPrecedenceSpecMatch) { + if (bestMediaType === null || highestPrecedenceSpecMatch.q > bestQ) { + bestQ = highestPrecedenceSpecMatch.q; + bestMediaType = digest.originalType; + } + } + } + lru.set(acceptHeader, bestMediaType); + return bestMediaType; + } + }; +} +function matchesParameters(required, given) { + for (const key in required) { + if (given[key] !== required[key]) { + return false; + } + } + return true; +} +const SPACE = " ".charCodeAt(0); +const HORIZONTAL_TAB = "\t".charCodeAt(0); +const ASTERISK = "*".charCodeAt(0); +const SLASH = "/".charCodeAt(0); +const COMMA = ",".charCodeAt(0); +const SEMICOLON = ";".charCodeAt(0); +const EQUALS = "=".charCodeAt(0); +const DOUBLE_QUOTE = '"'.charCodeAt(0); +const BACKSLASH = "\\".charCodeAt(0); +const DEL = 0x7f; +/* + * Whitespace: + * 9 (tab) + * 10 (line feed) + * 11 (vertical tab) + * 12 (form feed) + * 13 (carriage return) + * 32 (space) + */ +const WHITESPACE_START = 9; +const WHITESPACE_END = 13; +/** We're more forgiving in whitespace in most cases */ +function isWhitespace(charCode) { + return (charCode === SPACE || + (charCode >= WHITESPACE_START && charCode <= WHITESPACE_END)); +} +/** is Optional White Space */ +function isOWS(charCode) { + return charCode === SPACE || charCode === HORIZONTAL_TAB; +} +/* + "!" / "#" / "$" / "%" / "&" / "'" / "*" + / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + / DIGIT / ALPHA + +33|35-39|42|43|45-57|65-90|94-122|124|126 + +>=33 && <= 126 && !34|40|41|44|58-64|91-93|123|125 + */ +// Matches ordered from most likely to least likely for content types. +function isToken(charCode) { + return ( + // ^_`a-z + (charCode >= 94 && charCode <= 122) || + // symbols and numbers + (charCode >= 35 && + charCode <= 57 && + charCode !== 40 && + charCode !== 41 && + charCode !== 44) || + // A-Z + (charCode >= 65 && charCode <= 90) || + // ! + charCode === 33 || + // | + charCode === 124 || + // ~ + charCode === 126); +} +var State; +(function (State) { + State[State["EXPECT_TYPE"] = 0] = "EXPECT_TYPE"; + State[State["CONTINUE_TYPE"] = 1] = "CONTINUE_TYPE"; + State[State["EXPECT_SUBTYPE"] = 2] = "EXPECT_SUBTYPE"; + State[State["CONTINUE_SUBTYPE"] = 3] = "CONTINUE_SUBTYPE"; + State[State["EXPECT_COMMA_OR_SEMICOLON"] = 4] = "EXPECT_COMMA_OR_SEMICOLON"; + State[State["EXPECT_PARAMETER_NAME"] = 5] = "EXPECT_PARAMETER_NAME"; + State[State["CONTINUE_PARAMETER_NAME"] = 6] = "CONTINUE_PARAMETER_NAME"; + State[State["EXPECT_PARAMETER_VALUE"] = 7] = "EXPECT_PARAMETER_VALUE"; + State[State["CONTINUE_PARAMETER_VALUE"] = 8] = "CONTINUE_PARAMETER_VALUE"; + State[State["CONTINUE_QUOTED_PARAMETER_VALUE"] = 9] = "CONTINUE_QUOTED_PARAMETER_VALUE"; +})(State || (State = {})); +// PERF: we could increase the speed of this significantly by checking the +// type/subtype against the supported types/subtypes, and if a match is not +// found then skip `i` right up to the next `,` without adding the entry to +// `accepts` +/** + * Parser based on https://httpwg.org/specs/rfc9110.html#rfc.section.12.5.1 + * + * @remarks + * + * Why must you always write your own parsers, Benjie? + */ +function parseAccepts(acceptHeader) { + const accepts = []; + let state = State.EXPECT_TYPE; + let currentAccept = null; + let currentParameterName = ""; + let currentParameterValue = ""; + function next() { + if (currentAccept.parameters.q) { + const q = parseFloat(currentAccept.parameters.q); + if (Number.isNaN(q) || q < 0 || q > 1) { + throw new Error("q out of range"); + } + delete currentAccept.parameters.q; + currentAccept.q = q; + } + accepts.push(currentAccept); + currentAccept = null; + state = State.EXPECT_TYPE; + } + for (let i = 0, l = acceptHeader.length; i < l; i++) { + const charCode = acceptHeader.charCodeAt(i); + switch (state) { + case State.EXPECT_TYPE: { + if ( /*@__INLINE__*/isWhitespace(charCode)) { + continue; + } + else if (charCode === ASTERISK) { + // `*/*` + currentAccept = { + type: "*", + subtype: "*", + q: 1, + parameters: Object.create(null), + noParams: true, + }; + const nextCharCode = acceptHeader.charCodeAt(++i); + if (nextCharCode !== SLASH) { + throw new Error("Expected '/' after '*'"); + } + const nextNextCharCode = acceptHeader.charCodeAt(++i); + if (nextNextCharCode !== ASTERISK) { + throw new Error("Expected '*' after '*/'"); + } + state = State.EXPECT_COMMA_OR_SEMICOLON; + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentAccept = { + type: acceptHeader[i], + subtype: "", + q: 1, + parameters: Object.create(null), + noParams: true, + }; + state = State.CONTINUE_TYPE; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.CONTINUE_TYPE: { + if (charCode === SLASH) { + state = State.EXPECT_SUBTYPE; + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentAccept.type += acceptHeader[i]; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.EXPECT_SUBTYPE: { + if (charCode === ASTERISK) { + currentAccept.subtype = "*"; + state = State.EXPECT_COMMA_OR_SEMICOLON; + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentAccept.subtype = acceptHeader[i]; + state = State.CONTINUE_SUBTYPE; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.CONTINUE_SUBTYPE: { + if (charCode === SEMICOLON) { + // Parameters + state = State.EXPECT_PARAMETER_NAME; + } + else if (charCode === COMMA) { + /*@__INLINE__*/ next(); + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentAccept.subtype += acceptHeader[i]; + } + else if ( /*@__INLINE__*/isWhitespace(charCode)) { + state = State.EXPECT_COMMA_OR_SEMICOLON; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.EXPECT_COMMA_OR_SEMICOLON: { + if ( /*@__INLINE__*/isWhitespace(charCode)) { + continue; + } + else if (charCode === SEMICOLON) { + state = State.EXPECT_PARAMETER_NAME; + } + else if (charCode === COMMA) { + /*@__INLINE__*/ next(); + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.EXPECT_PARAMETER_NAME: { + if (charCode === SEMICOLON) { + continue; + } + else if (charCode === COMMA) { + /*@__INLINE__*/ next(); + continue; + } + else if ( /*@__INLINE__*/isOWS(charCode)) { + continue; + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentParameterName = acceptHeader[i]; + currentParameterValue = ""; + state = State.CONTINUE_PARAMETER_NAME; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.CONTINUE_PARAMETER_NAME: { + if (charCode === EQUALS) { + state = State.EXPECT_PARAMETER_VALUE; + /* + if (currentAccept?.parameters[currentParameterName]) { + throw new Error("Overriding parameter!"); + } + */ + // "q" is not a valid parameter name; it's just used for weighting. + if (currentParameterName !== "q") { + currentAccept.noParams = false; + } + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentParameterName += acceptHeader[i]; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.EXPECT_PARAMETER_VALUE: { + if (charCode === DOUBLE_QUOTE) { + state = State.CONTINUE_QUOTED_PARAMETER_VALUE; + } + else if ( /*@__INLINE__*/isToken(charCode)) { + state = State.CONTINUE_PARAMETER_VALUE; + currentParameterValue += acceptHeader[i]; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + case State.CONTINUE_QUOTED_PARAMETER_VALUE: { + if (charCode === DOUBLE_QUOTE) { + currentAccept.parameters[currentParameterName] = + currentParameterValue; + state = State.EXPECT_COMMA_OR_SEMICOLON; + } + else if (charCode === BACKSLASH) { + if (++i === l) { + throw new Error(`Unexpected terminating backslash`); + } + // From the spec: + // + // > A sender SHOULD NOT generate a quoted-pair in a quoted-string + // > except where necessary to quote DQUOTE and backslash octets + // > occurring within that string. A sender SHOULD NOT generate a + // > quoted-pair in a comment except where necessary to quote + // > parentheses ["(" and ")"] and backslash octets occurring within + // > that comment. + // + // i.e. this isn't for `\n` and `\t` and similar, those would just + // come out as "n" and "t" in the output. This is specifically for + // escaping quote marks, parenthesis, backslashes. + // Respect `quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )` + if (charCode === HORIZONTAL_TAB || + (charCode >= 0x20 && charCode <= 0xff && charCode !== DEL)) { + currentParameterValue += acceptHeader[i]; + } + else { + throw new Error(`Unexpected escaped character with code '${charCode}' at position ${i}`); + } + } + else { + // Respect `qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text` + // 0x09 0x20-0xff !0x22=`"` !0x5c=`\` !0x7f=DEL + if (charCode === HORIZONTAL_TAB || + (charCode >= 0x20 && + charCode <= 0xff && + /* charCode !== DOUBLE_QUOTE && */ + /* charCode !== BACKSLASH && */ + charCode !== DEL)) { + currentParameterValue += acceptHeader[i]; + } + else { + throw new Error(`Unexpected character with code '${charCode}' at position ${i}.`); + } + } + break; + } + case State.CONTINUE_PARAMETER_VALUE: { + if (charCode === SEMICOLON) { + currentAccept.parameters[currentParameterName] = + currentParameterValue; + // Parameters + state = State.EXPECT_PARAMETER_NAME; + } + else if (charCode === COMMA) { + currentAccept.parameters[currentParameterName] = + currentParameterValue; + /*@__INLINE__*/ next(); + } + else if ( /*@__INLINE__*/isToken(charCode)) { + currentParameterValue += acceptHeader[i]; + } + else { + throw new Error(`Unexpected character '${acceptHeader[i]}'`); + } + break; + } + default: { + const never = state; + throw new Error(`Unhandled state '${never}'`); + } + } + } + // Now finish parsing + switch (state) { + case State.EXPECT_TYPE: + case State.CONTINUE_SUBTYPE: + case State.EXPECT_COMMA_OR_SEMICOLON: { + /*@__INLINE__*/ next(); + break; + } + case State.CONTINUE_PARAMETER_VALUE: { + currentAccept.parameters[currentParameterName] = currentParameterValue; + /*@__INLINE__*/ next(); + break; + } + case State.CONTINUE_TYPE: { + throw new Error("Invalid 'accept' header, expected slash"); + } + case State.EXPECT_SUBTYPE: { + throw new Error("Invalid 'accept' header, expected subtype"); + } + case State.EXPECT_PARAMETER_NAME: { + throw new Error("Invalid 'accept' header, expected parameter name"); + } + case State.CONTINUE_PARAMETER_NAME: { + throw new Error("Invalid 'accept' header, expected parameter value"); + } + case State.EXPECT_PARAMETER_VALUE: { + throw new Error("Invalid 'accept' header, expected parameter value"); + } + case State.CONTINUE_QUOTED_PARAMETER_VALUE: { + throw new Error("Invalid 'accept' header, expected closing quote"); + } + default: { + const never = state; + throw new Error(`Unhandled terminal state '${never}'`); + } + } + // Sort `accepts` by precedence. Precedence is how accurate the match is: + // a/b;c=d + // a/b + // a/* + // */* + const score = (accept) => { + let val = 0; + if (accept.type !== "*") { + val += 1_000; + } + if (accept.subtype !== "*") { + val += 1_000_000; + } + val += Object.keys(accept.parameters).length; + return val; + }; + accepts.sort((a, z) => { + const scoreA = score(a); + const scoreZ = score(z); + return scoreZ - scoreA; + }); + return accepts; +} +//# sourceMappingURL=accept.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/accept.js.map b/grafast/grafserv/dist/accept.js.map new file mode 100644 index 0000000000..102400571b --- /dev/null +++ b/grafast/grafserv/dist/accept.js.map @@ -0,0 +1 @@ +{"version":3,"file":"accept.js","sourceRoot":"","sources":["../src/accept.ts"],"names":[],"mappings":";;AAQA,8CA4DC;;AApED,gEAAgC;AAEhC;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,UAAoB;IACpD,MAAM,WAAW,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,KAAK,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,GAAG,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAED,yEAAyE;IACzE,UAAU;IACV,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,EAAE;QAC/B,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,IAAI,MAAM,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;YACxB,GAAG,IAAI,KAAK,CAAC;QACf,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,KAAK,GAAG,EAAE,CAAC;YAC3B,GAAG,IAAI,SAAS,CAAC;QACnB,CAAC;QACD,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;QAC7C,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/core/base.d.ts b/grafast/grafserv/dist/core/base.d.ts new file mode 100644 index 0000000000..1d693831f3 --- /dev/null +++ b/grafast/grafserv/dist/core/base.d.ts @@ -0,0 +1,45 @@ +import type { PromiseOrDirect, TypedEventEmitter } from "grafast"; +import type { GraphQLSchema } from "grafast/graphql"; +import type { Middleware } from "graphile-config"; +import type { DynamicOptions, ErrorResult, ExecutionConfig, GrafservConfig, HandlerResult, RequestDigest, Result, SchemaChangeEvent } from "../interfaces.js"; +import { makeGraphiQLHandler } from "../middleware/graphiql.js"; +import { makeGraphQLHandler } from "../middleware/graphql.js"; +export declare class GrafservBase { + private releaseHandlers; + private releasing; + dynamicOptions: DynamicOptions; + getExecutionConfig(_ctx: Partial): PromiseOrDirect; + resolvedPreset: GraphileConfig.ResolvedPreset; + grafastMiddleware: Middleware | null; + protected schema: GraphQLSchema | PromiseLike | null; + protected schemaError: PromiseLike | null; + protected eventEmitter: TypedEventEmitter<{ + "schema:ready": GraphQLSchema; + "schema:error": any; + "dynamicOptions:ready": Record; + "dynamicOptions:error": any; + }>; + private initialized; + graphqlHandler: ReturnType; + graphiqlHandler: ReturnType; + constructor(config: GrafservConfig); + protected processRequest(requestDigest: RequestDigest): PromiseOrDirect; + getPreset(): GraphileConfig.ResolvedPreset; + getSchema(): PromiseOrDirect; + release(): Promise; + onRelease(cb: () => PromiseOrDirect): void; + private _settingPreset; + setPreset(newPreset: GraphileConfig.Preset): PromiseOrDirect; + setSchema(newSchema: GraphQLSchema): void; + private refreshHandlers; + private waitForGraphqlHandler; + private waitForGraphiqlHandler; + private failedGraphqlHandler; + private failedGraphiqlHandler; + makeStream(): AsyncIterableIterator; +} +export declare function convertHandlerResultToResult(handlerResult: HandlerResult | null): PromiseOrDirect; +export declare const convertErrorToErrorResult: (error: Error & { + statusCode?: number; +}) => ErrorResult; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/core/base.d.ts.map b/grafast/grafserv/dist/core/base.d.ts.map new file mode 100644 index 0000000000..f8345f7656 --- /dev/null +++ b/grafast/grafserv/dist/core/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/core/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AASlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,EAEX,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Ae,CAAC,aAAa,CAAC;IAIrC,OAAO;IAeb,SAAS,CAAC,EAAE,EAAE,MAAM,eAAe,CAAC,IAAI,CAAC;IAShD,OAAO,CAAC,cAAc,CAAS;IACxB,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;IAmDlE,SAAS,CAAC,SAAS,EAAE,aAAa;IAuBzC,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,qBAAqB,CAuCzB;IAEJ,OAAO,CAAC,sBAAsB,CAwC1B;IAEJ,OAAO,CAAC,oBAAoB,CAcxB;IAEJ,OAAO,CAAC,qBAAqB,CAczB;IAGG,UAAU,IAAI,qBAAqB,CAAC,iBAAiB,CAAC;CAyD9D;AA+FD,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,aAAa,GAAG,IAAI,GAClC,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,CAoLhC;AAED,eAAO,MAAM,yBAAyB,GACpC,OAAO,KAAK,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,KACrC,WASF,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/core/base.js b/grafast/grafserv/dist/core/base.js new file mode 100644 index 0000000000..664145c820 --- /dev/null +++ b/grafast/grafserv/dist/core/base.js @@ -0,0 +1,634 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertErrorToErrorResult = exports.GrafservBase = void 0; +exports.convertHandlerResultToResult = convertHandlerResultToResult; +const tslib_1 = require("tslib"); +const eventemitter3_1 = tslib_1.__importDefault(require("eventemitter3")); +const grafast_1 = require("grafast"); +const graphql = tslib_1.__importStar(require("grafast/graphql")); +const graphile_config_1 = require("graphile-config"); +const hooks_js_1 = require("../hooks.js"); +const mapIterator_js_1 = require("../mapIterator.js"); +const graphiql_js_1 = require("../middleware/graphiql.js"); +const graphql_js_1 = require("../middleware/graphql.js"); +const options_js_1 = require("../options.js"); +const utils_js_1 = require("../utils.js"); +const failedToBuildHandlersError = new graphql.GraphQLError("Unknown error occurred."); +const { isSchema, validateSchema } = graphql; +class GrafservBase { + getExecutionConfig(_ctx) { + throw new Error("Overwritten in constructor"); + } + constructor(config) { + this.releaseHandlers = []; + this.releasing = false; + this.initialized = false; + this._settingPreset = false; + this.waitForGraphqlHandler = function (...args) { + const [request] = args; + const deferred = (0, grafast_1.defer)(); + const { dynamicOptions } = this; + const onReady = () => { + this.eventEmitter.off("dynamicOptions:ready", onReady); + this.eventEmitter.off("dynamicOptions:error", onError); + Promise.resolve() + .then(() => this.graphqlHandler(...args)) + .then(deferred.resolve, deferred.reject); + }; + const onError = (e) => { + this.eventEmitter.off("dynamicOptions:ready", onReady); + this.eventEmitter.off("dynamicOptions:error", onError); + const graphqlError = new graphql.GraphQLError("Unknown error occurred", null, null, null, null, e); + deferred.resolve({ + type: "graphql", + request, + dynamicOptions, + payload: { errors: [graphqlError] }, + statusCode: graphqlError.extensions?.statusCode ?? 503, + // Fall back to application/json; this is when an unexpected error happens + // so it shouldn't be hit. + contentType: graphql_js_1.APPLICATION_JSON, + }); + }; + this.eventEmitter.on("dynamicOptions:ready", onReady); + this.eventEmitter.on("dynamicOptions:error", onError); + setTimeout(onError, 5000, new Error("Server initialization timed out")); + return Promise.resolve(deferred); + }; + this.waitForGraphiqlHandler = function (...args) { + const [request] = args; + const { dynamicOptions } = this; + const deferred = (0, grafast_1.defer)(); + const onReady = () => { + this.eventEmitter.off("dynamicOptions:ready", onReady); + this.eventEmitter.off("dynamicOptions:error", onError); + Promise.resolve() + .then(() => this.graphiqlHandler(...args)) + .then(deferred.resolve, deferred.reject); + }; + const onError = (e) => { + this.eventEmitter.off("dynamicOptions:ready", onReady); + this.eventEmitter.off("dynamicOptions:error", onError); + const graphqlError = new graphql.GraphQLError("Unknown error occurred", null, null, null, null, e); + // TODO: this should be an HTML response + deferred.resolve({ + type: "graphql", + request, + dynamicOptions, + payload: { errors: [graphqlError] }, + statusCode: graphqlError.extensions?.statusCode ?? 503, + // Fall back to application/json; this is when an unexpected error happens + // so it shouldn't be hit. + contentType: graphql_js_1.APPLICATION_JSON, + }); + }; + this.eventEmitter.on("dynamicOptions:ready", onReady); + this.eventEmitter.on("dynamicOptions:error", onError); + setTimeout(onError, 5000, new Error("Server initialization timed out")); + return Promise.resolve(deferred); + }; + this.failedGraphqlHandler = function (...args) { + const [request] = args; + const { dynamicOptions } = this; + return { + type: "graphql", + request, + dynamicOptions, + payload: { errors: [failedToBuildHandlersError] }, + statusCode: 503, + // Fall back to application/json; this is when an unexpected error happens + // so it shouldn't be hit. + contentType: graphql_js_1.APPLICATION_JSON, + }; + }; + this.failedGraphiqlHandler = function (...args) { + const [request] = args; + const { dynamicOptions } = this; + return { + type: "graphql", + request, + dynamicOptions, + payload: { errors: [failedToBuildHandlersError] }, + statusCode: 503, + // Fall back to application/json; this is when an unexpected error happens + // so it shouldn't be hit. + contentType: graphql_js_1.APPLICATION_JSON, + }; + }; + this.eventEmitter = new eventemitter3_1.default(); + this.resolvedPreset = (0, graphile_config_1.resolvePreset)(config.preset ? config.preset : {}); + this.dynamicOptions = { + validationRules: [...graphql.specifiedRules], + getExecutionConfig: defaultMakeGetExecutionConfig(), + ...(0, options_js_1.optionsFromConfig)(this.resolvedPreset), + }; + this.getExecutionConfig = this.dynamicOptions.getExecutionConfig; + this.middleware = (0, hooks_js_1.getGrafservMiddleware)(this.resolvedPreset); + this.grafastMiddleware = (0, grafast_1.getGrafastMiddleware)(this.resolvedPreset); + this.schemaError = null; + this.schema = config.schema; + if ((0, grafast_1.isPromiseLike)(config.schema)) { + const promise = config.schema; + promise.then((schema) => { + this.setSchema(schema); + }, (error) => { + this.schemaError = promise; + this.schema = null; + this.eventEmitter.emit("schema:error", error); + }); + } + else { + this.eventEmitter.emit("schema:ready", config.schema); + } + this.graphqlHandler = this.waitForGraphqlHandler; + this.graphiqlHandler = this.waitForGraphiqlHandler; + this.setPreset(this.resolvedPreset); + } + /** @internal */ + _processRequest(inRequest) { + const request = (0, utils_js_1.normalizeRequest)(inRequest); + if (!this.dynamicOptions) { + throw new Error(`GrafservInternalError<1377f225-31b7-4a81-a56e-a28e18a19899>: Attempted to process request prematurely`); + } + const dynamicOptions = this.dynamicOptions; + const forceCORS = !!this.resolvedPreset.grafserv?.dangerouslyAllowAllCORSRequests && + request.method === "OPTIONS"; + try { + if (request.path === dynamicOptions.graphqlPath) { + if (forceCORS) + return optionsResponse(request, this.dynamicOptions); + return this.graphqlHandler(request, this.graphiqlHandler); + } + if (dynamicOptions.graphiql && + request.method === "GET" && + request.path === dynamicOptions.graphiqlPath) { + if (forceCORS) + return optionsResponse(request, dynamicOptions); + return this.graphiqlHandler(request); + } + if (dynamicOptions.watch && + request.method === "GET" && + request.path === dynamicOptions.eventStreamPath) { + if (forceCORS) + return optionsResponse(request, dynamicOptions); + const stream = this.makeStream(); + return { + type: "event-stream", + request, + dynamicOptions, + payload: stream, + statusCode: 200, + }; + } + // Unhandled + return null; + } + catch (e) { + console.error("Unexpected error occurred in _processRequest", e); + return { + type: "html", + request, + dynamicOptions, + status: 500, + payload: Buffer.from("ERROR", "utf8"), + }; + } + } + processRequest(requestDigest) { + const { resolvedPreset } = this; + const event = { + resolvedPreset, + requestDigest, + instance: this, + }; + return this.middleware != null + ? this.middleware.run("processRequest", event, processRequestWithEvent) + : processRequestWithEvent(event); + } + getPreset() { + return this.resolvedPreset; + } + getSchema() { + return this.schema ?? this.schemaError; + } + async release() { + if (this.releasing) { + throw new Error("Release has already been called"); + } + this.releasing = true; + for (let i = this.releaseHandlers.length - 1; i >= 0; i--) { + const handler = this.releaseHandlers[i]; + try { + await handler(); + } + catch (e) { + /* nom nom nom */ + } + } + } + onRelease(cb) { + if (this.releasing) { + throw new Error("Release has already been called; cannot add more onRelease callbacks"); + } + this.releaseHandlers.push(cb); + } + setPreset(newPreset) { + if (this._settingPreset) { + throw new Error(`Setting a preset is currently in progress; please wait for it to complete.`); + } + this._settingPreset = true; + const resolvedPreset = (0, graphile_config_1.resolvePreset)(newPreset); + const middleware = (0, hooks_js_1.getGrafservMiddleware)(this.resolvedPreset); + const grafastMiddleware = (0, grafast_1.getGrafastMiddleware)(this.resolvedPreset); + // Note: this gets directly mutated + const dynamicOptions = { + validationRules: [...graphql.specifiedRules], + getExecutionConfig: defaultMakeGetExecutionConfig(), + ...(0, options_js_1.optionsFromConfig)(resolvedPreset), + }; + const storeDynamicOptions = (dynamicOptions) => { + const { resolvedPreset } = dynamicOptions; + // Overwrite all the `this.*` properties at once + this.resolvedPreset = resolvedPreset; + this.middleware = middleware; + this.grafastMiddleware = grafastMiddleware; + this.dynamicOptions = dynamicOptions; + this.initialized = true; + // ENHANCE: this.graphqlHandler?.release()? + this.refreshHandlers(); + this.getExecutionConfig = dynamicOptions.getExecutionConfig; + // MUST come after the handlers have been refreshed, otherwise we'll + // get infinite loops + this.eventEmitter.emit("dynamicOptions:ready", {}); + }; + return (new Promise((resolve) => resolve(middleware != null + ? middleware.run("setPreset", dynamicOptions, storeDynamicOptions) + : storeDynamicOptions(dynamicOptions))) + .then(null, (e) => { + this.graphqlHandler = this.failedGraphqlHandler; + this.graphiqlHandler = this.failedGraphiqlHandler; + this.eventEmitter.emit("dynamicOptions:error", e); + }) + // Finally: + .then(() => { + this._settingPreset = false; + })); + } + setSchema(newSchema) { + if (!newSchema) { + throw new Error(`setSchema must be called with a GraphQL schema`); + } + if (!isSchema(newSchema)) { + throw new Error(`setParams called with invalid schema (is there more than one 'graphql' module loaded?)`); + } + const errors = validateSchema(newSchema); + if (errors.length > 0) { + throw new Error(`setParams called with invalid schema; first error: ${errors[0]}`); + } + if (this.schema !== newSchema) { + this.schemaError = null; + this.schema = newSchema; + this.eventEmitter.emit("schema:ready", newSchema); + this.refreshHandlers(); + } + } + refreshHandlers() { + if (!this.initialized) { + // This will be handled once `setPreset` completes + return; + } + this.graphqlHandler = (0, graphql_js_1.makeGraphQLHandler)(this); + this.graphiqlHandler = (0, graphiql_js_1.makeGraphiQLHandler)(this.resolvedPreset, this.middleware, this.dynamicOptions); + } + // TODO: Rename this, or make it a middleware, or something + makeStream() { + const queue = []; + let finished = false; + const bump = () => { + const next = queue.shift(); + if (next !== undefined) { + next.resolve({ + done: false, + value: { event: "change", data: "schema" }, + }); + } + }; + const flushQueue = (e) => { + const entries = queue.splice(0, queue.length); + for (const entry of entries) { + if (e != null) { + entry.reject(e); + } + else { + entry.resolve({ done: true }); + } + } + }; + this.eventEmitter.on("schema:ready", bump); + return { + [Symbol.asyncIterator]() { + return this; + }, + next() { + if (finished) { + return Promise.resolve({ + done: true, + }); + } + return new Promise((resolve, reject) => { + queue.push({ resolve, reject }); + }); + }, + return() { + finished = true; + if (queue.length !== 0) { + flushQueue(); + } + return Promise.resolve({ + done: true, + }); + }, + throw(e) { + if (queue.length !== 0) { + flushQueue(e); + } + return Promise.reject(e); + }, + }; + } +} +exports.GrafservBase = GrafservBase; +function defaultMakeGetExecutionConfig() { + let latestSchema; + let latestSchemaOrPromise; + let latestParseAndValidate; + let schemaPrepare = null; + return function getExecutionConfig() { + // Get up to date schema, in case we're in watch mode + const schemaOrPromise = this.getSchema(); + const { resolvedPreset, dynamicOptions } = this; + if (schemaOrPromise !== latestSchemaOrPromise) { + latestSchemaOrPromise = schemaOrPromise; + if ("then" in schemaOrPromise) { + schemaPrepare = (async () => { + latestSchema = await schemaOrPromise; + latestSchemaOrPromise = schemaOrPromise; + latestParseAndValidate = (0, graphql_js_1.makeParseAndValidateFunction)(latestSchema, resolvedPreset, dynamicOptions); + schemaPrepare = null; + return true; + })(); + } + else { + if (latestSchema === schemaOrPromise) { + // No action necessary + } + else { + latestSchema = schemaOrPromise; + latestParseAndValidate = (0, graphql_js_1.makeParseAndValidateFunction)(latestSchema, resolvedPreset, dynamicOptions); + } + } + } + if (schemaPrepare !== null) { + const sleeper = (0, utils_js_1.sleep)(dynamicOptions.schemaWaitTime); + const schemaReadyPromise = Promise.race([schemaPrepare, sleeper.promise]); + return schemaReadyPromise.then((schemaReady) => { + sleeper.release(); + if (schemaReady !== true) { + // Handle missing schema + throw new Error(`Schema isn't ready`); + } + return { + schema: latestSchema, + parseAndValidate: latestParseAndValidate, + resolvedPreset, + execute: grafast_1.execute, + subscribe: grafast_1.subscribe, + contextValue: Object.create(null), + }; + }); + } + /* + if (schemaOrPromise == null) { + const err = Promise.reject( + new GraphQLError( + "The schema is currently unavailable", + null, + null, + null, + null, + null, + { + statusCode: 503, + }, + ), + ); + return () => err; + } + */ + return { + schema: latestSchema, + parseAndValidate: latestParseAndValidate, + resolvedPreset, + execute: grafast_1.execute, + subscribe: grafast_1.subscribe, + contextValue: Object.create(null), + }; + }; +} +const END = Buffer.from("\r\n-----\r\n", "utf8"); +const DIVIDE = Buffer.from(`\r\n---\r\nContent-Type: application/json\r\n\r\n`, "utf8"); +function convertHandlerResultToResult(handlerResult) { + if (handlerResult === null) { + return null; + } + switch (handlerResult.type) { + case "graphql": { + const { payload, statusCode = 200, contentType, outputDataAsString, dynamicOptions, request: { preferJSON }, } = handlerResult; + (0, utils_js_1.handleErrors)(payload); + const headers = Object.create(null); + headers["Content-Type"] = contentType; + if (dynamicOptions.watch) { + headers["X-GraphQL-Event-Stream"] = dynamicOptions.eventStreamPath; + } + if (preferJSON && !outputDataAsString) { + return { + type: "json", + statusCode, + headers, + json: payload, + }; + } + else { + const buffer = Buffer.from((0, grafast_1.stringifyPayload)(payload, outputDataAsString), "utf8"); + headers["Content-Length"] = buffer.length; + return { + type: "buffer", + statusCode, + headers, + buffer, + }; + } + } + case "graphqlIncremental": { + const { iterator, statusCode = 200, outputDataAsString, dynamicOptions, } = handlerResult; + const headers = Object.create(null); + (headers["Content-Type"] = 'multipart/mixed; boundary="-"'), + (headers["Transfer-Encoding"] = "chunked"); + if (dynamicOptions.watch) { + headers["X-GraphQL-Event-Stream"] = dynamicOptions.eventStreamPath; + } + const bufferIterator = (0, mapIterator_js_1.mapIterator)(iterator, (payload) => { + (0, utils_js_1.handleErrors)(payload); + const payloadBuffer = Buffer.from((0, grafast_1.stringifyPayload)(payload, outputDataAsString), "utf8"); + return Buffer.concat([DIVIDE, payloadBuffer]); + }, () => { + return END; + }); + return { + type: "bufferStream", + headers, + statusCode, + lowLatency: true, + bufferIterator, + }; + } + case "text": + case "html": { + const { payload, statusCode = 200 } = handlerResult; + const headers = Object.create(null); + if (handlerResult.type === "html") { + headers["Content-Type"] = "text/html; charset=utf-8"; + } + else { + headers["Content-Type"] = "text/plain; charset=utf-8"; + } + headers["Content-Length"] = payload.length; + return { + type: "buffer", + statusCode, + headers, + buffer: payload, + }; + } + case "noContent": { + const { statusCode = 204 } = handlerResult; + const headers = Object.create(null); + return { + type: "noContent", + statusCode, + headers, + }; + } + case "event-stream": { + const { payload: stream, statusCode = 200, request: { httpVersionMajor }, } = handlerResult; + // Making sure these options are set. + // Set headers for Server-Sent Events. + const headers = Object.create(null); + // Don't buffer EventStream in nginx + headers["X-Accel-Buffering"] = "no"; + headers["Content-Type"] = "text/event-stream"; + headers["Cache-Control"] = "no-cache, no-transform"; + if (httpVersionMajor >= 2) { + // NOOP + } + else { + headers["Connection"] = "keep-alive"; + } + // Creates a stream for the response + const event2buffer = (event) => { + let payload = ""; + if (event.event !== undefined) { + payload += `event: ${event.event}\n`; + } + if (event.id !== undefined) { + payload += `id: ${event.id}\n`; + } + if (event.retry !== undefined) { + payload += `retry: ${event.retry}\n`; + } + if (event.data != null) { + payload += `data: ${event.data.replace(/\n/g, "\ndata: ")}\n`; + } + payload += "\n"; + return Buffer.from(payload, "utf8"); + }; + const bufferIterator = (0, mapIterator_js_1.mapIterator)(stream, event2buffer, undefined, () => event2buffer({ event: "open" })); + return { + type: "bufferStream", + statusCode, + headers, + lowLatency: true, + bufferIterator, + }; + } + default: { + const never = handlerResult; + console.error(`Did not understand '${never}' passed to convertHandlerResultToResult`); + const payload = Buffer.from("Unexpected input to convertHandlerResultToResult", "utf8"); + const headers = Object.create(null); + headers["Content-Type"] = "text/plain; charset=utf-8"; + headers["Content-Length"] = payload.length; + return { + type: "buffer", + statusCode: 500, + headers, + buffer: payload, + }; + } + } +} +const convertErrorToErrorResult = (error) => { + // TODO: need to assert `error` is not a GraphQLError, that should be handled elsewhere. + const statusCode = error.statusCode ?? 500; + return { + type: "error", + statusCode, + headers: Object.create(null), + error, + }; +}; +exports.convertErrorToErrorResult = convertErrorToErrorResult; +function dangerousCorsWrap(result) { + if (result === null) { + return result; + } + result.headers["Access-Control-Allow-Origin"] = "*"; + result.headers["Access-Control-Allow-Headers"] = "*"; + return result; +} +function optionsResponse(request, dynamicOptions) { + return { + type: "noContent", + request, + dynamicOptions: dynamicOptions, + statusCode: 204, + }; +} +function processRequestWithEvent(event) { + const { requestDigest: request, instance } = event; + let returnValue; + try { + const result = instance._processRequest(request); + if ((0, grafast_1.isPromiseLike)(result)) { + returnValue = result.then(convertHandlerResultToResult, exports.convertErrorToErrorResult); + } + else { + returnValue = convertHandlerResultToResult(result); + } + } + catch (e) { + returnValue = (0, exports.convertErrorToErrorResult)(e); + } + if (instance.resolvedPreset.grafserv?.dangerouslyAllowAllCORSRequests) { + if ((0, grafast_1.isPromiseLike)(returnValue)) { + return returnValue.then(dangerousCorsWrap); + } + else { + return dangerousCorsWrap(returnValue); + } + } + else { + return returnValue; + } +} +//# sourceMappingURL=base.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/core/base.js.map b/grafast/grafserv/dist/core/base.js.map new file mode 100644 index 0000000000..8811d8af2f --- /dev/null +++ b/grafast/grafserv/dist/core/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/core/base.ts"],"names":[],"mappings":";;;AAwjBA,oEAsLC;;AA9uBD,0EAAyC;AAEzC,qCAOiB;AAEjB,iEAA2C;AAE3C,qDAAgD;AAEhD,0CAAoD;AAkBpD,sDAAgD;AAChD,2DAAgE;AAChE,yDAIkC;AAClC,8CAAkD;AAClD,0CAAoE;AAEpE,MAAM,0BAA0B,GAAG,IAAI,OAAO,CAAC,YAAY,CACzD,yBAAyB,CAC1B,C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EjD,IAAI,IAAA,uBAAa,EAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,WAAW,GAAG,MAAM,CAAC,IAAI,CACvB,4BAA4B,EAC5B,iCAAyB,CAC1B,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,WAAW,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,WAAW,GAAG,IAAA,iCAAyB,EAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,+BAA+B,EAAE,CAAC;QACtE,IAAI,IAAA,uBAAa,EAAC,WAAW,CAAC,EAAE,CAAC;YAC/B,OAAO,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,WAAW,CAAC;IACrB,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/envelop/index.d.ts b/grafast/grafserv/dist/envelop/index.d.ts new file mode 100644 index 0000000000..7959260b94 --- /dev/null +++ b/grafast/grafserv/dist/envelop/index.d.ts @@ -0,0 +1,19 @@ +import { type GetEnvelopedFn } from "@envelop/core"; +import type { GraphileConfig } from "graphile-config"; +declare global { + namespace GraphileConfig { + interface GrafservOptions { + getEnveloped?: GetEnvelopedFn; + } + } +} +declare global { + namespace GraphileConfig { + interface Plugins { + GrafservEnvelopPlugin: true; + } + } +} +export declare const GrafservEnvelopPlugin: GraphileConfig.Plugin; +export declare const GrafservEnvelopPreset: GraphileConfig.Preset; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/envelop/index.d.ts.map b/grafast/grafserv/dist/envelop/index.d.ts.map new file mode 100644 index 0000000000..c1aef1b852 --- /dev/null +++ b/grafast/grafserv/dist/envelop/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/envelop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKtD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,eAAe;YACvB,YAAY,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;SACpC;KACF;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,OAAO;YACf,qBAAqB,EAAE,IAAI,CAAC;SAC7B;KACF;CACF;AAED,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MA+DlD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAQlD,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/envelop/index.js b/grafast/grafserv/dist/envelop/index.js new file mode 100644 index 0000000000..e873763213 --- /dev/null +++ b/grafast/grafserv/dist/envelop/index.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GrafservEnvelopPreset = exports.GrafservEnvelopPlugin = void 0; +const tslib_1 = require("tslib"); +const core_1 = require("@envelop/core"); +const graphql = tslib_1.__importStar(require("graphql")); +const version_js_1 = require("../version.js"); +exports.GrafservEnvelopPlugin = { + name: "GrafservEnvelopPlugin", + version: version_js_1.version, + grafserv: { + middleware: { + setPreset(next, event) { + const { resolvedPreset } = event; + const userGetEnveloped = resolvedPreset.grafserv?.getEnveloped; + if (!userGetEnveloped) { + throw new Error(`GrafservEnvelopPlugin is enabled, but there is no 'preset.grafserv.getEnveloped' method to call`); + } + const originalGetExecutionConfig = event.getExecutionConfig; + event.getExecutionConfig = async function getExecutionConfig(ctx) { + const config = await originalGetExecutionConfig.call(this, ctx); + const getEnveloped = (0, core_1.envelop)({ + plugins: [ + // PERF: memoize argument if it makes any difference + (0, core_1.useEngine)({ + ...graphql, + execute: config.execute, + subscribe: config.subscribe, + specifiedRules: event.validationRules, + }), + (0, core_1.useSchema)(config.schema), + (0, core_1.useEnvelop)(userGetEnveloped), + ], + }); + const { schema, execute, subscribe, contextFactory, parse: envelopedParse, validate: envelopedValidate, } = getEnveloped(ctx); + const parseAndValidate = (query) => { + const source = new graphql.Source(query, "GraphQL HTTP Request"); + let document; + try { + document = envelopedParse(source); + } + catch (e) { + return { errors: [e] }; + } + const errors = envelopedValidate(schema, document); + return errors.length ? { errors } : { document }; + }; + return { + ...config, + contextValue: contextFactory(ctx), + schema, + execute, + subscribe, + parseAndValidate, + }; + }; + return next(); + }, + }, + }, +}; +exports.GrafservEnvelopPreset = { + plugins: [exports.GrafservEnvelopPlugin], + grafserv: { + // Let Envelop handle error masking + maskError(e) { + return e; + }, + }, +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/envelop/index.js.map b/grafast/grafserv/dist/envelop/index.js.map new file mode 100644 index 0000000000..0194f3ec08 --- /dev/null +++ b/grafast/grafserv/dist/envelop/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/envelop/index.ts"],"names":[],"mappings":";;;;AAAA,wCAMuB;AAEvB,yDAAmC;AAEnC,8CAAwC;AAkB3B,QAAA,qBAAqB,GAA0B;IAC1D,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAP,oBAAO;IAEP,QAAQ,EAAE;QACR,UAAU,EAAE;YACV,SAAS,CAAC,IAAI,EAAE,KAAK;gBACnB,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;gBACjC,MAAM,gBAAgB,GAAG,cAAc,CAAC,QAAQ,EAAE,YAAY,CAAC;gBAC/D,IAAI,CAAC,gBAAgB,EAAE,CAAC;oBACtB,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;gB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AC,CAAC,EAAE,QAAQ,EAAE,CAAC;oBACnD,CAAC,CAAC;oBAEF,OAAO;wBACL,GAAG,MAAM;wBACT,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC;wBACjC,MAAM;wBACN,OAAO;wBACP,SAAS;wBACT,gBAAgB;qBACjB,CAAC;gBACJ,CAAC,CAAC;gBACF,OAAO,IAAI,EAAE,CAAC;YAChB,CAAC;SACF;KACF;CACF,CAAC;AAEW,QAAA,qBAAqB,GAA0B;IAC1D,OAAO,EAAE,CAAC,6BAAqB,CAAC;IAChC,QAAQ,EAAE;QACR,mCAAmC;QACnC,SAAS,CAAC,CAAC;YACT,OAAO,CAAC,CAAC;QACX,CAAC;KACF;CACF,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/hooks.d.ts b/grafast/grafserv/dist/hooks.d.ts new file mode 100644 index 0000000000..985941fd54 --- /dev/null +++ b/grafast/grafserv/dist/hooks.d.ts @@ -0,0 +1,7 @@ +import { Middleware } from "graphile-config"; +declare const $$middleware: unique symbol; +export declare function getGrafservMiddleware(resolvedPreset: GraphileConfig.ResolvedPreset & { + [$$middleware]?: Middleware | null; +}): Middleware | null; +export {}; +//# sourceMappingURL=hooks.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/hooks.d.ts.map b/grafast/grafserv/dist/hooks.d.ts.map new file mode 100644 index 0000000000..d4422ad1b5 --- /dev/null +++ b/grafast/grafserv/dist/hooks.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAgB,MAAM,iBAAiB,CAAC;AAI3D,QAAA,MAAM,YAAY,eAAuB,CAAC;AAE1C,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,cAAc,CAAC,cAAc,GAAG;IAC9C,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CACvE,wDAkEF"} \ No newline at end of file diff --git a/grafast/grafserv/dist/hooks.js b/grafast/grafserv/dist/hooks.js new file mode 100644 index 0000000000..55a6e9fac5 --- /dev/null +++ b/grafast/grafserv/dist/hooks.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getGrafservMiddleware = getGrafservMiddleware; +const grafast_1 = require("grafast"); +const graphile_config_1 = require("graphile-config"); +// We could use a global WeakMap, but storing directly onto the resolvedPreset +// should use more traditional garbage collection. +const $$middleware = Symbol("middleware"); +function getGrafservMiddleware(resolvedPreset) { + if (resolvedPreset[$$middleware]) { + return resolvedPreset[$$middleware]; + } + let middleware = null; + (0, graphile_config_1.orderedApply)(resolvedPreset.plugins, (p) => p.grafserv?.middleware, (name, fn, _plugin) => { + if (!middleware) + middleware = new graphile_config_1.Middleware(); + middleware.register(name, fn); + }); + // TODO: Delete this backwards compatibility + (0, graphile_config_1.orderedApply)(resolvedPreset.plugins, (p) => p.grafserv?.hooks, (name, fn, _plugin) => { + function resultThenNext(result, next) { + if ((0, grafast_1.isPromiseLike)(result)) { + return result.then(next); + } + else { + return next(); + } + } + if (!middleware) + middleware = new graphile_config_1.Middleware(); + // Backwards compatibility with the old hooks + switch (name) { + case "init": { + middleware.register("setPreset", (next, event) => { + const { resolvedPreset } = event; + const result = fn({ resolvedPreset }, event); + return resultThenNext(result, next); + }); + break; + } + case "ruruHTMLParts": { + middleware.register("ruruHTMLParts", (next, event) => { + const { resolvedPreset, request, htmlParts } = event; + const result = fn({ resolvedPreset }, htmlParts, { + request, + }); + return resultThenNext(result, next); + }); + break; + } + case "processGraphQLRequestBody": { + middleware.register("processGraphQLRequestBody", (next, event) => { + const { resolvedPreset } = event; + const result = fn({ resolvedPreset }, event); + return resultThenNext(result, next); + }); + break; + } + } + }); + try { + resolvedPreset[$$middleware] = middleware; + } + catch { + // Ignore - preset must be readonly + } + return middleware; +} +//# sourceMappingURL=hooks.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/hooks.js.map b/grafast/grafserv/dist/hooks.js.map new file mode 100644 index 0000000000..157826fc69 --- /dev/null +++ b/grafast/grafserv/dist/hooks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":";;AAQA,sDAqEC;AA7ED,qCAAwC;AAExC,qDAA2D;AAE3D,8EAA8E;AAC9E,kDAAkD;AAClD,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAE1C,SAAgB,qBAAqB,CACnC,cAEC;IAED,IAAI,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,UAAU,GAAyD,IAAI,CAAC;IAC5E,IAAA,8BAAY,EACV,cAAc,CAAC,OAAO,EACtB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,EAC7B,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;QACpB,IAAI,CAAC,UAAU;YAAE,UAAU,GAAG,IAAI,4BAAU,EAAE,CAAC;QAC/C,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAS,CAAC,CAAC;IACvC,CAAC,CACF,CAAC;IAEF,4CAA4C;IAC5C,IAAA,8BAAY,EACV,cAAc,CAAC,OAAO,EACtB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,EACxB,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;QACpB,SAAS,cAAc,CAAC,MAAW,EAAE,IAAyB;YAC5D,IAAI,IAAA,uBAAa,EAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,EAAE,CAAC;YAChB,CAAC;QACH,CAAC;QACD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C,CACF,CAAC;IAEF,IAAI,CAAC;QACH,cAAc,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,mCAAmC;IACrC,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/index.d.ts b/grafast/grafserv/dist/index.d.ts new file mode 100644 index 0000000000..f2c7496c24 --- /dev/null +++ b/grafast/grafserv/dist/index.d.ts @@ -0,0 +1,122 @@ +import type { PromiseOrDirect } from "grafast"; +import type { ExecutionArgs, GraphQLError } from "grafast/graphql"; +import type { CallbackOrDescriptor, MiddlewareHandlers } from "graphile-config"; +import type { RuruHTMLParts } from "ruru/server"; +import type { GrafservPluginContext, InitEvent, MaskErrorFn, NormalizedRequestDigest, OnSubscribeEvent, ProcessGraphQLRequestBodyEvent, ProcessRequestEvent, RequestContentType, Result, RuruHTMLPartsEvent } from "./interfaces.js"; +export { convertErrorToErrorResult, convertHandlerResultToResult, GrafservBase, } from "./core/base.js"; +export type { BufferResult, BufferStreamResult, ErrorResult, EventStreamHeandlerResult, ExecutionConfig, GrafservBody, GrafservBodyBuffer, GrafservBodyJSON, GrafservBodyText, GrafservConfig, GraphQLHandlerResult, GraphQLIncrementalHandlerResult, HandlerResult, HTMLHandlerResult, JSONObject, JSONResult, JSONValue, NoContentHandlerResult, NoContentResult, NormalizedRequestDigest, ParsedGraphQLBody, ProcessGraphQLRequestBodyEvent, RequestDigest, Result, TextHandlerResult, ValidatedGraphQLBody, } from "./interfaces.js"; +export { DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES } from "./middleware/graphql.js"; +export { defaultMaskError } from "./options.js"; +export { getBodyFromFrameworkBody, getBodyFromRequest, handleErrors, httpError, makeGraphQLWSConfig, memo, normalizeConnectionParams, normalizeRequest, parseGraphQLJSONBody, processHeaders, } from "./utils.js"; +declare global { + namespace Grafast { + interface RequestContext { + http?: NormalizedRequestDigest; + } + } + namespace GraphileConfig { + interface Preset { + /** + * Configuration options for Grafserv + */ + grafserv?: GrafservOptions; + } + interface Plugin { + grafserv?: { + /** @deprecated Please use middleware instead */ + hooks?: { + [key in keyof GrafservHooks]?: CallbackOrDescriptor infer UResult ? (info: GrafservPluginContext, ...args: UArgs) => UResult : never>; + }; + middleware?: MiddlewareHandlers; + }; + } + interface GrafservOptions { + /** Port number to listen on */ + port?: number; + /** Host to listen on */ + host?: string; + /** The path at which GraphQL will be available; usually /graphql */ + graphqlPath?: string; + /** The path at which the GraphQL event stream would be made available; usually /graphql/stream */ + eventStreamPath?: string; + /** If true, allow GraphQL over GET requests. This has security ramifications, exercise caution. */ + graphqlOverGET?: boolean; + graphiql?: boolean; + /** If true, then we will render GraphiQL on GET requests to the /graphql endpoint */ + graphiqlOnGraphQLGET?: boolean; + /** The path at which GraphiQL will be available; usually / */ + graphiqlPath?: string; + /** Set true to enable watch mode */ + watch?: boolean; + /** The length, in bytes, for the largest request body that grafserv will accept */ + maxRequestLength?: number; + /** How long (in milliseconds) should we wait for a schema promise to resolve before sending a failure to the client? */ + schemaWaitTime?: number; + /** + * Use grafast 'string' optimization - response will be partially stringified + * already, use `stringifyPayload` before sending to the user + * + * @remarks + * + * This is a `grafserv` option rather than a `grafast` option because the + * server is responsible for stringifying the body before sending it to the + * user, via `stringifyPayload`. If we were to make this a `grafast` option + * then everything using grafast would be affected by it, and code expecting + * objects would break. + */ + outputDataAsString?: boolean; + /** + * Temporary hack to allow easy testing with graphql-http.com + */ + dangerouslyAllowAllCORSRequests?: boolean; + /** + * Should we enable a websockets transport if available? + */ + websockets?: boolean; + /** + * If you would like to customize the way in which errors are masked, you may + * pass your own error masking function here. You can also import + * `defaultMaskError` from `grafserv`. + */ + maskError?: MaskErrorFn; + /** + * By default `application/json` and `application/graphql` are supported + * (`DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES`). You may add + * `application/x-www-form-urlencoded` to the list, but be aware that + * doing so potentially opens you to CSRF issues even if you're not using + * CORS since this media type is handled specially by browsers - ensure + * that you have CSRF protections in place. + * + * Note further that if you're using CORS the other media types are not + * safe, and you should still use CSRF protection. + */ + allowedRequestContentTypes?: readonly RequestContentType[]; + /** + * How many documents should we cache the parse and validate result for? + * + * @defaultValue `500` + */ + parseAndValidateCacheSize?: number; + } + /** @deprecated Please use middleware instead */ + interface GrafservHooks { + /** @deprecated Please use middleware instead */ + init(event: InitEvent): PromiseOrDirect; + /** @deprecated Please use middleware instead */ + processGraphQLRequestBody(event: ProcessGraphQLRequestBodyEvent): PromiseOrDirect; + /** @deprecated Please use middleware instead */ + ruruHTMLParts(parts: RuruHTMLParts, extra: { + request: NormalizedRequestDigest; + }): PromiseOrDirect; + } + interface GrafservMiddleware { + setPreset(event: InitEvent): PromiseOrDirect; + processRequest(event: ProcessRequestEvent): PromiseOrDirect; + processGraphQLRequestBody(event: ProcessGraphQLRequestBodyEvent): PromiseOrDirect; + ruruHTMLParts(event: RuruHTMLPartsEvent): PromiseOrDirect; + onSubscribe(event: OnSubscribeEvent): TruePromiseOrDirect; + } + } +} +export type TruePromiseOrDirect = Promise | T; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/index.d.ts.map b/grafast/grafserv/dist/index.d.ts.map new file mode 100644 index 0000000000..f60a12cb13 --- /dev/null +++ b/grafast/grafserv/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,uBAAuB,E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AG,eAAe,CAAC,IAAI,CAAC,CAAC;YAC9C,gDAAgD;YAChD,yBAAyB,CACvB,KAAK,EAAE,8BAA8B,GACpC,eAAe,CAAC,IAAI,CAAC,CAAC;YACzB,gDAAgD;YAChD,aAAa,CACX,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE;gBACL,OAAO,EAAE,uBAAuB,CAAC;aAClC,GACA,eAAe,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,UAAU,kBAAkB;YAC1B,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YACnD,cAAc,CACZ,KAAK,EAAE,mBAAmB,GACzB,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;YAClC,yBAAyB,CACvB,KAAK,EAAE,8BAA8B,GACpC,eAAe,CAAC,IAAI,CAAC,CAAC;YACzB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAChE,WAAW,CACT,KAAK,EAAE,gBAAgB,GACtB,mBAAmB,CAAC,IAAI,GAAG,SAAS,YAAY,EAAE,GAAG,aAAa,CAAC,CAAC;SACxE;KACF;CACF;AACD,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/index.js b/grafast/grafserv/dist/index.js new file mode 100644 index 0000000000..fcd3a0ca85 --- /dev/null +++ b/grafast/grafserv/dist/index.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.processHeaders = exports.parseGraphQLJSONBody = exports.normalizeRequest = exports.normalizeConnectionParams = exports.memo = exports.makeGraphQLWSConfig = exports.httpError = exports.handleErrors = exports.getBodyFromRequest = exports.getBodyFromFrameworkBody = exports.defaultMaskError = exports.DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES = exports.GrafservBase = exports.convertHandlerResultToResult = exports.convertErrorToErrorResult = void 0; +var base_js_1 = require("./core/base.js"); +Object.defineProperty(exports, "convertErrorToErrorResult", { enumerable: true, get: function () { return base_js_1.convertErrorToErrorResult; } }); +Object.defineProperty(exports, "convertHandlerResultToResult", { enumerable: true, get: function () { return base_js_1.convertHandlerResultToResult; } }); +Object.defineProperty(exports, "GrafservBase", { enumerable: true, get: function () { return base_js_1.GrafservBase; } }); +var graphql_js_1 = require("./middleware/graphql.js"); +Object.defineProperty(exports, "DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES", { enumerable: true, get: function () { return graphql_js_1.DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES; } }); +var options_js_1 = require("./options.js"); +Object.defineProperty(exports, "defaultMaskError", { enumerable: true, get: function () { return options_js_1.defaultMaskError; } }); +var utils_js_1 = require("./utils.js"); +Object.defineProperty(exports, "getBodyFromFrameworkBody", { enumerable: true, get: function () { return utils_js_1.getBodyFromFrameworkBody; } }); +Object.defineProperty(exports, "getBodyFromRequest", { enumerable: true, get: function () { return utils_js_1.getBodyFromRequest; } }); +Object.defineProperty(exports, "handleErrors", { enumerable: true, get: function () { return utils_js_1.handleErrors; } }); +Object.defineProperty(exports, "httpError", { enumerable: true, get: function () { return utils_js_1.httpError; } }); +Object.defineProperty(exports, "makeGraphQLWSConfig", { enumerable: true, get: function () { return utils_js_1.makeGraphQLWSConfig; } }); +Object.defineProperty(exports, "memo", { enumerable: true, get: function () { return utils_js_1.memo; } }); +Object.defineProperty(exports, "normalizeConnectionParams", { enumerable: true, get: function () { return utils_js_1.normalizeConnectionParams; } }); +Object.defineProperty(exports, "normalizeRequest", { enumerable: true, get: function () { return utils_js_1.normalizeRequest; } }); +Object.defineProperty(exports, "parseGraphQLJSONBody", { enumerable: true, get: function () { return utils_js_1.parseGraphQLJSONBody; } }); +Object.defineProperty(exports, "processHeaders", { enumerable: true, get: function () { return utils_js_1.processHeaders; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/index.js.map b/grafast/grafserv/dist/index.js.map new file mode 100644 index 0000000000..43e45e2ea0 --- /dev/null +++ b/grafast/grafserv/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAkBA,0CAIwB;AAHtB,oHAAA,yBAAyB,OAAA;AACzB,uHAAA,4BAA4B,OAAA;AAC5B,uGAAA,YAAY,OAAA;AA8Bd,sDAAgF;AAAvE,mIAAA,qCAAqC,OAAA;AAC9C,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AACzB,uCAWoB;AAVlB,oHAAA,wBAAwB,OAAA;AACxB,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AACT,+GAAA,mBAAmB,OAAA;AACnB,gGAAA,IAAI,OAAA;AACJ,qHAAA,yBAAyB,OAAA;AACzB,4GAAA,gBAAgB,OAAA;AAChB,gHAAA,oBAAoB,OAAA;AACpB,0GAAA,cAAc,OAAA"} \ No newline at end of file diff --git a/grafast/grafserv/dist/interfaces.d.ts b/grafast/grafserv/dist/interfaces.d.ts new file mode 100644 index 0000000000..c57f38485c --- /dev/null +++ b/grafast/grafserv/dist/interfaces.d.ts @@ -0,0 +1,205 @@ +import "graphile-config"; +import type { execute, PromiseOrDirect, SafeError, subscribe } from "grafast"; +import type { AsyncExecutionResult, FormattedExecutionResult, GraphQLError, GraphQLFormattedError, GraphQLSchema, ValidationRule } from "grafast/graphql"; +import type { Context, SubscribeMessage } from "graphql-ws"; +import type { RuruHTMLParts } from "ruru/server"; +import type { GrafservBase } from "."; +import type { makeParseAndValidateFunction } from "./middleware/graphql"; +import type { OptionsFromConfig } from "./options"; +export type ContextCallback = (requestContext: Grafast.RequestContext) => Grafast.Context; +export interface GrafservConfig { + schema: GraphQLSchema | PromiseLike; + preset?: GraphileConfig.Preset; +} +export type RequestContentType = "application/json" | "application/graphql" | "application/x-www-form-urlencoded"; +/** + * Represents the core parameters from the GraphQL request, these may not yet + * be fully validated to allow for things such as persisted operations to kick + * in later. + */ +export interface ParsedGraphQLBody { + id: unknown; + documentId: unknown; + query: unknown; + operationName: unknown; + variableValues: unknown; + extensions: unknown; +} +/** + * The validated GraphQL request parameters, after any transforms (such as + * persisted operations) are applied; ready to be fed to Grafast. + */ +export interface ValidatedGraphQLBody { + query: string; + operationName: string | undefined; + variableValues: Record | undefined; + extensions: Record | undefined; +} +export interface GrafservPluginContext { + resolvedPreset: GraphileConfig.ResolvedPreset; +} +export interface SetPresetEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + getExecutionConfig: (this: GrafservBase, ctx: Partial) => PromiseOrDirect; + validationRules: ValidationRule[]; +} +/** @deprecated Use SetPresetEvent instead */ +export type InitEvent = SetPresetEvent; +export interface ProcessGraphQLRequestBodyEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + body: ParsedGraphQLBody; + request?: NormalizedRequestDigest; + graphqlWsContext?: Context; +} +export interface ProcessRequestEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + requestDigest: RequestDigest; + instance: GrafservBase; +} +export interface RuruHTMLPartsEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + htmlParts: RuruHTMLParts; + request: NormalizedRequestDigest; +} +export interface OnSubscribeEvent { + resolvedPreset: GraphileConfig.ResolvedPreset; + ctx: Context | undefined, unknown>; + message: SubscribeMessage; +} +export interface GrafservBodyBuffer { + type: "buffer"; + buffer: Buffer; +} +export interface GrafservBodyText { + type: "text"; + text: string; +} +export interface GrafservBodyJSON { + type: "json"; + json: JSONValue; +} +export type GrafservBody = GrafservBodyBuffer | GrafservBodyText | GrafservBodyJSON; +export declare const $$normalizedHeaders: unique symbol; +export interface RequestDigest { + method: "HEAD" | "GET" | "POST" | string; + httpVersionMajor: number; + httpVersionMinor: number; + /** True if HTTPS was used, false otherwise */ + isSecure: boolean; + /** The path segment of the URL, not including the query parameters */ + path: string; + headers: Record; + getQueryParams: () => PromiseOrDirect>; + getBody(): PromiseOrDirect; + requestContext: Partial; + /** + * If your server would prefer to receive the JSON objects in memory rather + * than having the response written directly out as a string/buffer, set this + * true. It does not guarantee that you'll receive JSON, but it does state + * your preference. + */ + preferJSON?: boolean; + [$$normalizedHeaders]?: any; +} +export interface NormalizedRequestDigest extends RequestDigest { + method: "GET" | "POST" | string; + preferJSON: boolean; + getHeader(name: string): string | undefined; + /** @deprecated use getHeader unless the original case is essential. */ + headers: Record; +} +interface IHandlerResult { + type: string; + request: NormalizedRequestDigest; + dynamicOptions: OptionsFromConfig; + statusCode?: number; +} +export interface HTMLHandlerResult extends IHandlerResult { + type: "html"; + payload: Buffer; +} +export interface TextHandlerResult extends IHandlerResult { + type: "text"; + payload: Buffer; +} +export interface GraphQLHandlerResult extends IHandlerResult { + type: "graphql"; + contentType: string; + payload: FormattedExecutionResult; + outputDataAsString?: boolean; +} +/** @see {@link https://github.com/glasser/graphql-over-http/blob/dac9638459bb17dd3ade889334fc2fadee9d11e5/rfcs/IncrementalDelivery.md} */ +export interface GraphQLIncrementalHandlerResult extends IHandlerResult { + type: "graphqlIncremental"; + iterator: AsyncGenerator; + outputDataAsString?: boolean; +} +export interface NoContentHandlerResult extends IHandlerResult { + type: "noContent"; +} +export interface EventStreamEvent { + /** The name of the event. Use simple names. Don't put newlines in it! */ + event: string; + /** The data for this event. We'll automatically split this on newlines for you */ + data?: string; + id?: string; + /** integer number of milliseconds indicating how long to wait before reconnecting if connection is lost */ + retry?: number; +} +export interface EventStreamHeandlerResult extends IHandlerResult { + type: "event-stream"; + payload: AsyncIterable; +} +export type HandlerResult = HTMLHandlerResult | GraphQLHandlerResult | GraphQLIncrementalHandlerResult | TextHandlerResult | EventStreamHeandlerResult | NoContentHandlerResult; +export type SchemaChangeEvent = { + event: "change"; + data: "schema"; +}; +export type JSONValue = null | boolean | number | string | JSONValue[] | JSONObject; +export interface JSONObject { + [key: string]: JSONValue; +} +export interface ErrorResult { + type: "error"; + statusCode: number; + headers: Record; + error: Error | SafeError; +} +export interface BufferResult { + type: "buffer"; + statusCode: number; + headers: Record; + buffer: Buffer; +} +export interface JSONResult { + type: "json"; + statusCode: number; + headers: Record; + json: JSONValue; +} +export interface BufferStreamResult { + type: "bufferStream"; + statusCode: number; + headers: Record; + /** If true, setNoDelay, etc */ + lowLatency: boolean; + bufferIterator: AsyncGenerator; +} +export interface NoContentResult { + type: "noContent"; + statusCode: 204; + headers: Record; +} +export type Result = ErrorResult | BufferResult | JSONResult | BufferStreamResult | NoContentResult; +export type DynamicOptions = OptionsFromConfig & InitEvent; +export interface ExecutionConfig { + schema: GraphQLSchema; + parseAndValidate: ReturnType; + resolvedPreset: GraphileConfig.ResolvedPreset; + execute: typeof execute; + subscribe: typeof subscribe; + contextValue: Record; +} +export type MaskErrorFn = (error: GraphQLError) => GraphQLError | GraphQLFormattedError; +export {}; +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/interfaces.d.ts.map b/grafast/grafserv/dist/interfaces.d.ts.map new file mode 100644 index 0000000000..4dfd7007da --- /dev/null +++ b/grafast/grafserv/dist/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AACtC,OAAO,KAAK,EAAE,4BAA4B,EAAE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M,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,YAAY,KAChB,YAAY,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/interfaces.js b/grafast/grafserv/dist/interfaces.js new file mode 100644 index 0000000000..69d8ce9100 --- /dev/null +++ b/grafast/grafserv/dist/interfaces.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.$$normalizedHeaders = void 0; +require("graphile-config"); +exports.$$normalizedHeaders = Symbol("normalizedHeaders"); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/interfaces.js.map b/grafast/grafserv/dist/interfaces.js.map new file mode 100644 index 0000000000..24370c319f --- /dev/null +++ b/grafast/grafserv/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;;AAAA,2BAAyB;AAkHZ,QAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/mapIterator.d.ts b/grafast/grafserv/dist/mapIterator.d.ts new file mode 100644 index 0000000000..7d3763f059 --- /dev/null +++ b/grafast/grafserv/dist/mapIterator.d.ts @@ -0,0 +1,2 @@ +export declare function mapIterator(iterable: AsyncIterable, cb: (payload: T) => U, end?: () => U, initial?: () => U): AsyncGenerator; +//# sourceMappingURL=mapIterator.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/mapIterator.d.ts.map b/grafast/grafserv/dist/mapIterator.d.ts.map new file mode 100644 index 0000000000..b3b467510a --- /dev/null +++ b/grafast/grafserv/dist/mapIterator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mapIterator.d.ts","sourceRoot":"","sources":["../src/mapIterator.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAC9B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EACrB,GAAG,CAAC,EAAE,MAAM,CAAC,EACb,OAAO,CAAC,EAAE,MAAM,CAAC,GAChB,cAAc,CAAC,CAAC,CAAC,CA6DnB"} \ No newline at end of file diff --git a/grafast/grafserv/dist/mapIterator.js b/grafast/grafserv/dist/mapIterator.js new file mode 100644 index 0000000000..636ef16480 --- /dev/null +++ b/grafast/grafserv/dist/mapIterator.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mapIterator = mapIterator; +function mapIterator(iterable, cb, end, initial) { + const iterator = iterable[Symbol.asyncIterator](); + /** + * -1 - starting + * 0 - normal + * 1 - ending + * 2 - ended + */ + let status = -1; + const mappedIterator = { + async [Symbol.asyncDispose]() { + await this.return(undefined); + }, + next() { + if (status === -1) { + status = 0; + if (typeof initial === "function") { + return Promise.resolve({ value: initial(), done: false }); + } + } + if (status === 1) { + status = 2; + } + // NO 'else' here! + if (status === 2) { + return Promise.resolve({ value: undefined, done: true }); + } + const next = iterator.next(); + return next.then((v) => { + if (v.done) { + if (v.value !== undefined) { + throw new Error("Invalid assumption; tell Benjie he did bad."); + } + if (end) { + status = 1; + return { value: end(), done: false }; + } + else { + status = 2; + return { value: undefined, done: true }; + } + } + else { + return { value: cb(v.value), done: false }; + } + }); + }, + return(value) { + status = 2; + iterator.return?.(value); + return Promise.resolve({ value: undefined, done: true }); + }, + throw(error) { + status = 2; + iterator.throw?.(error); + return Promise.reject(error); + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + return mappedIterator; +} +//# sourceMappingURL=mapIterator.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/mapIterator.js.map b/grafast/grafserv/dist/mapIterator.js.map new file mode 100644 index 0000000000..df60feaa87 --- /dev/null +++ b/grafast/grafserv/dist/mapIterator.js.map @@ -0,0 +1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,CAAC;oBACD,IAAI,GAAG,EAAE,CAAC;wBACR,MAAM,GAAG,CAAC,CAAC;wBACX,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;oBACvC,CAAC;yBAAM,CAAC;wBACN,MAAM,GAAG,CAAC,CAAC;wBACX,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;oBAC1C,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gBAC7C,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,CAAC,KAAK;YACV,MAAM,GAAG,CAAC,CAAC;YACX,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;YACzB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;QACD,KAAK,CAAC,KAAK;YACT,MAAM,GAAG,CAAC,CAAC;YACX,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;YACxB,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphiql.d.ts b/grafast/grafserv/dist/middleware/graphiql.d.ts new file mode 100644 index 0000000000..d6bfafe496 --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphiql.d.ts @@ -0,0 +1,6 @@ +import type { PromiseOrDirect } from "grafast"; +import type { Middleware } from "graphile-config"; +import type { HandlerResult, NormalizedRequestDigest } from "../interfaces.js"; +import type { OptionsFromConfig } from "../options.js"; +export declare function makeGraphiQLHandler(resolvedPreset: GraphileConfig.ResolvedPreset, middleware: Middleware | null, dynamicOptions: OptionsFromConfig): (request: NormalizedRequestDigest) => PromiseOrDirect; +//# sourceMappingURL=graphiql.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphiql.d.ts.map b/grafast/grafserv/dist/middleware/graphiql.d.ts.map new file mode 100644 index 0000000000..a255e646a7 --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphiql.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"graphiql.d.ts","sourceRoot":"","sources":["../../src/middleware/graphiql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,CAAC,cAAc,EAC7C,UAAU,EAAE,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,EAChE,cAAc,EAAE,iBAAiB,GAChC,CAAC,OAAO,EAAE,uBAAuB,KAAK,eAAe,CAAC,aAAa,CAAC,CAyCtE"} \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphiql.js b/grafast/grafserv/dist/middleware/graphiql.js new file mode 100644 index 0000000000..e56190b217 --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphiql.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeGraphiQLHandler = makeGraphiQLHandler; +const server_1 = require("ruru/server"); +const utils_js_1 = require("../utils.js"); +function makeGraphiQLHandler(resolvedPreset, middleware, dynamicOptions) { + const { htmlParts: htmlPartsFromConfig } = resolvedPreset?.ruru ?? {}; + const unhookedHTMLParts = { + ...server_1.defaultHTMLParts, + ...htmlPartsFromConfig, + }; + return async (request) => { + let htmlParts = unhookedHTMLParts; + if (middleware != null && middleware.middleware.ruruHTMLParts != null) { + htmlParts = { + ...(0, server_1.makeHTMLParts)(), + ...htmlPartsFromConfig, + }; + await middleware.run("ruruHTMLParts", { + resolvedPreset, + htmlParts, + request, + }, utils_js_1.noop); + } + const config = { + endpoint: dynamicOptions.graphqlPath, + // TODO: websocket endpoint + debugTools: dynamicOptions.explain === true + ? ["explain", "plan"] + : dynamicOptions.explain === false + ? [] + : dynamicOptions.explain, + }; + return { + statusCode: 200, + request, + dynamicOptions, + type: "html", + payload: Buffer.from((0, server_1.ruruHTML)(config, htmlParts), "utf8"), + }; + }; +} +//# sourceMappingURL=graphiql.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphiql.js.map b/grafast/grafserv/dist/middleware/graphiql.js.map new file mode 100644 index 0000000000..f1303e75b4 --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphiql.js.map @@ -0,0 +1 @@ +{"version":3,"file":"graphiql.js","sourceRoot":"","sources":["../../src/middleware/graphiql.ts"],"names":[],"mappings":";;AASA,kDA6CC;AAnDD,wCAAwE;AAIxE,0CAAmC;AAEnC,SAAgB,mBAAmB,CACjC,cAA6C,EAC7C,UAAgE,EAChE,cAAiC;IAEjC,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,GAAG,cAAc,EAAE,IAAI,IAAI,EAAE,CAAC;IACtE,MAAM,iBAAiB,GAAkB;QACvC,GAAG,yBAAgB;QACnB,GAAG,mBAAmB;KACvB,CAAC;IACF,OAAO,KAAK,EAAE,OAAO,EAAE,EAAE;QACvB,IAAI,SAAS,GAAG,iBAAkB,CAAC;QACnC,IAAI,UAAU,IAAI,IAAI,IAAI,UAAU,CAAC,UAAU,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;YACtE,SAAS,GAAG;gBACV,GAAG,IAAA,sBAAa,GAAE;gBAClB,GAAG,mBAAmB;aACvB,CAAC;YACF,MAAM,UAAU,CAAC,GAAG,CAClB,eAAe,EACf;gBACE,cAAc;gBACd,SAAS;gBACT,OAAO;aACR,EACD,eAAI,CACL,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAqB;YAC/B,QAAQ,EAAE,cAAc,CAAC,WAAW;YACpC,2BAA2B;YAC3B,UAAU,EACR,cAAc,CAAC,OAAO,KAAK,IAAI;gBAC7B,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC;gBACrB,CAAC,CAAC,cAAc,CAAC,OAAO,KAAK,KAAK;oBAChC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAE,cAAc,CAAC,OAAiB;SAC1C,CAAC;QACF,OAAO;YACL,UAAU,EAAE,GAAG;YACf,OAAO;YACP,cAAc;YACd,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAA,iBAAQ,EAAC,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC;SAC1D,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphql.d.ts b/grafast/grafserv/dist/middleware/graphql.d.ts new file mode 100644 index 0000000000..daffccddcd --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphql.d.ts @@ -0,0 +1,27 @@ +import type { PromiseOrDirect } from "grafast"; +import type { DocumentNode, GraphQLSchema } from "grafast/graphql"; +import * as graphql from "grafast/graphql"; +import type { GrafservBase } from "../index.js"; +import type { DynamicOptions, HandlerResult, NormalizedRequestDigest, ParsedGraphQLBody, ValidatedGraphQLBody } from "../interfaces.js"; +export declare function makeParseAndValidateFunction(schema: GraphQLSchema, resolvedPreset: GraphileConfig.ResolvedPreset, dynamicOptions: DynamicOptions): (query: string) => { + document: DocumentNode; + errors?: undefined; +} | { + document?: undefined; + errors: readonly graphql.GraphQLError[]; +}; +/** + * The default allowed request content types do not include + * `application/x-www-form-urlencoded` because that is treated specially by + * browsers (e.g. it can be submitted cross origins without CORS). + * + * If you're using CORS then no media type is CSRF safe - it's up to you to + * manage your CSRF protection. + */ +export declare const DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES: readonly ("application/json" | "application/graphql")[]; +export declare const APPLICATION_JSON = "application/json;charset=utf-8"; +export declare const APPLICATION_GRAPHQL_RESPONSE_JSON = "application/graphql-response+json;charset=utf-8"; +export declare const TEXT_HTML = "text/html;charset=utf-8"; +export declare function validateGraphQLBody(parsed: ParsedGraphQLBody): ValidatedGraphQLBody; +export declare const makeGraphQLHandler: (instance: GrafservBase) => (request: NormalizedRequestDigest, graphiqlHandler?: (request: NormalizedRequestDigest) => PromiseOrDirect) => PromiseOrDirect; +//# sourceMappingURL=graphql.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphql.d.ts.map b/grafast/grafserv/dist/middleware/graphql.d.ts.map new file mode 100644 index 0000000000..70a523fc30 --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphql.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/middleware/graphql.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAwB,eAAe,EAAE,MAAM,SAAS,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,cAAc,EAEd,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EAEjB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAgB1B,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,aAAa,EACrB,cAAc,EAAE,cAAc,CAAC,cAAc,EAC7C,cAAc,EAAE,cAAc,WAcG,MAAM;cAXvB,YAAY;aAAW,SAAS;;eAC/B,SAAS;YAAU,SAAS,OAAO,CAAC,YAAY,EAAE;EA4CpE;AA6BD;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,yDAOR,CAAC;AA6G3C,eAAO,MAAM,gBAAgB,mCAAmC,CAAC;AACjE,eAAO,MAAM,iCAAiC,oDACK,CAAC;AACpD,eAAO,MAAM,SAAS,4BAA4B,CAAC;AAiBnD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,iBAAiB,GACxB,oBAAoB,CAsBtB;AAoOD,eAAO,MAAM,kBAAkB,GAAI,UAAU,YAAY,MAIrD,SAAS,uBAAuB,EAChC,kBAAkB,CAChB,OAAO,EAAE,uBAAuB,KAC7B,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC,KACzC,eAAe,CAAC,aAAa,GAAG,IAAI,CAIxC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphql.js b/grafast/grafserv/dist/middleware/graphql.js new file mode 100644 index 0000000000..8b493226ff --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphql.js @@ -0,0 +1,458 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeGraphQLHandler = exports.TEXT_HTML = exports.APPLICATION_GRAPHQL_RESPONSE_JSON = exports.APPLICATION_JSON = exports.DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES = void 0; +exports.makeParseAndValidateFunction = makeParseAndValidateFunction; +exports.validateGraphQLBody = validateGraphQLBody; +const tslib_1 = require("tslib"); +const node_querystring_1 = require("node:querystring"); +const lru_1 = require("@graphile/lru"); +const crypto_1 = require("crypto"); +const grafast_1 = require("grafast"); +const graphql = tslib_1.__importStar(require("grafast/graphql")); +const accept_js_1 = require("../accept.js"); +const interfaces_js_1 = require("../interfaces.js"); +const utils_js_1 = require("../utils.js"); +const { getOperationAST, GraphQLError, parse, Source, validate } = graphql; +let lastString; +let lastHash; +const calculateQueryHash = (queryString) => { + if (queryString !== lastString) { + lastString = queryString; + lastHash = (0, crypto_1.createHash)("sha1").update(queryString).digest("base64"); + } + return lastHash; +}; +function makeParseAndValidateFunction(schema, resolvedPreset, dynamicOptions) { + const maxLength = resolvedPreset.grafserv?.parseAndValidateCacheSize ?? 500; + const parseAndValidationCache = maxLength >= 1 + ? new lru_1.LRU({ + maxLength, + }) + : null; + let lastParseAndValidateQuery; + let lastParseAndValidateResult; + function parseAndValidate(query) { + if (lastParseAndValidateQuery === query) { + return lastParseAndValidateResult; + } + const hash = query.length > 500 ? calculateQueryHash(query) : query; + const cached = parseAndValidationCache?.get(hash); + if (cached !== undefined) { + lastParseAndValidateQuery = query; + lastParseAndValidateResult = cached; + return cached; + } + const source = new Source(query, "GraphQL HTTP Request"); + let document; + try { + document = parse(source); + } + catch (e) { + const result = { errors: [e] }; + parseAndValidationCache?.set(hash, result); + lastParseAndValidateQuery = query; + lastParseAndValidateResult = result; + return result; + } + const errors = validate(schema, document, dynamicOptions.validationRules); + const result = errors.length + ? { errors } + : { document }; + parseAndValidationCache?.set(hash, result); + lastParseAndValidateQuery = query; + lastParseAndValidateResult = result; + return result; + } + return parseAndValidate; +} +function parseGraphQLQueryParams(params) { + const id = params.id; + const documentId = params.documentId; + const query = params.query; + const operationName = params.operationName ?? undefined; + const variablesString = params.variables ?? undefined; + const variableValues = typeof variablesString === "string" + ? JSON.parse(variablesString) + : undefined; + const extensionsString = params.extensions ?? undefined; + const extensions = typeof extensionsString === "string" + ? JSON.parse(extensionsString) + : undefined; + return { + id, + documentId, + query, + operationName, + variableValues, + extensions, + }; +} +/** + * The default allowed request content types do not include + * `application/x-www-form-urlencoded` because that is treated specially by + * browsers (e.g. it can be submitted cross origins without CORS). + * + * If you're using CORS then no media type is CSRF safe - it's up to you to + * manage your CSRF protection. + */ +exports.DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES = Object.freeze([ + "application/json", + "application/graphql", + // CSRF risk: + // "application/x-www-form-urlencoded", + // Not supported, AND CSRF risk: + // 'multipart/form-data' +]); +function parseGraphQLBody(resolvedPreset, request, body) { + const supportedContentTypes = resolvedPreset.grafserv?.allowedRequestContentTypes ?? + exports.DEFAULT_ALLOWED_REQUEST_CONTENT_TYPES; + const contentType = request[interfaces_js_1.$$normalizedHeaders]["content-type"]; + if (!contentType) { + throw (0, utils_js_1.httpError)(400, "Could not determine the Content-Type of the request"); + } + const semi = contentType.indexOf(";"); + const rawContentType = semi >= 0 ? contentType.slice(0, semi).trim() : contentType.trim(); + if (!supportedContentTypes.includes(rawContentType)) { + throw (0, utils_js_1.httpError)(415, `Media type '${rawContentType}' is not allowed`); + } + const ct = rawContentType; + // FIXME: we should probably at least look at the parameters... e.g. throw if encoding !== utf-8 + switch (ct) { + case "application/json": { + switch (body.type) { + case "buffer": { + return (0, utils_js_1.parseGraphQLJSONBody)(JSON.parse(body.buffer.toString("utf8"))); + } + case "text": { + return (0, utils_js_1.parseGraphQLJSONBody)(JSON.parse(body.text)); + } + case "json": { + return (0, utils_js_1.parseGraphQLJSONBody)(body.json); + } + default: { + const never = body; + throw (0, utils_js_1.httpError)(400, `Do not understand type ${never.type}`); + } + } + } + case "application/x-www-form-urlencoded": { + switch (body.type) { + case "buffer": { + return parseGraphQLQueryParams((0, node_querystring_1.parse)(body.buffer.toString("utf8"))); + } + case "text": { + return parseGraphQLQueryParams((0, node_querystring_1.parse)(body.text)); + } + case "json": { + if (body.json == null || + typeof body.json !== "object" || + Array.isArray(body.json)) { + throw (0, utils_js_1.httpError)(400, `Invalid body`); + } + return parseGraphQLQueryParams(body.json); + } + default: { + const never = body; + throw (0, utils_js_1.httpError)(400, `Do not understand type ${never.type}`); + } + } + } + case "application/graphql": { + // ENHANCE: I have a vague feeling that people that do this pass variables via the query string? + switch (body.type) { + case "text": { + return { + id: undefined, + documentId: undefined, + query: body.text, + operationName: undefined, + variableValues: undefined, + extensions: undefined, + }; + } + case "buffer": { + return { + id: undefined, + documentId: undefined, + query: body.buffer.toString("utf8"), + operationName: undefined, + variableValues: undefined, + extensions: undefined, + }; + } + case "json": { + // ERRORS: non-standard; perhaps raise a warning? + return (0, utils_js_1.parseGraphQLJSONBody)(body.json); + } + default: { + const never = body; + throw (0, utils_js_1.httpError)(400, `Do not understand type ${never.type}`); + } + } + } + default: { + const never = ct; + throw (0, utils_js_1.httpError)(415, `Media type '${never}' is not understood`); + } + } +} +exports.APPLICATION_JSON = "application/json;charset=utf-8"; +exports.APPLICATION_GRAPHQL_RESPONSE_JSON = "application/graphql-response+json;charset=utf-8"; +exports.TEXT_HTML = "text/html;charset=utf-8"; +/** https://graphql.github.io/graphql-over-http/draft/#sec-Legacy-Watershed */ +const isAfterWatershed = Date.now() >= +new Date(2025, 0, 1); +const GRAPHQL_TYPES = isAfterWatershed + ? [exports.APPLICATION_GRAPHQL_RESPONSE_JSON, exports.APPLICATION_JSON] + : [exports.APPLICATION_JSON, exports.APPLICATION_GRAPHQL_RESPONSE_JSON]; +const graphqlAcceptMatcher = (0, accept_js_1.makeAcceptMatcher)([...GRAPHQL_TYPES]); +const graphqlOrHTMLAcceptMatcher = (0, accept_js_1.makeAcceptMatcher)([ + ...GRAPHQL_TYPES, + // Must be lowest priority, otherwise GraphiQL may override GraphQL in some + // situations + exports.TEXT_HTML, +]); +function validateGraphQLBody(parsed) { + const { query, operationName, variableValues, extensions } = parsed; + if (typeof query !== "string") { + throw (0, utils_js_1.httpError)(400, "query must be a string"); + } + if (operationName != null && typeof operationName !== "string") { + throw (0, utils_js_1.httpError)(400, "operationName, if given, must be a string"); + } + if (variableValues != null && + (typeof variableValues !== "object" || Array.isArray(variableValues))) { + throw (0, utils_js_1.httpError)(400, "Invalid variables; expected JSON-encoded object"); + } + if (extensions != null && + (typeof extensions !== "object" || Array.isArray(extensions))) { + throw (0, utils_js_1.httpError)(400, "Invalid extensions; expected JSON-encoded object"); + } + return parsed; +} +const _makeGraphQLHandlerInternal = (instance) => { + const { dynamicOptions, resolvedPreset, middleware, grafastMiddleware } = instance; + return async (request, graphiqlHandler) => { + const accept = request[interfaces_js_1.$$normalizedHeaders].accept; + // Do they want HTML, or do they want GraphQL? + const chosenContentType = request.method === "GET" && + dynamicOptions.graphiqlOnGraphQLGET && + graphiqlHandler + ? graphqlOrHTMLAcceptMatcher(accept) + : graphqlAcceptMatcher(accept); + if (chosenContentType === exports.TEXT_HTML) { + // They want HTML -> Ruru + return graphiqlHandler(request); + } + else if (chosenContentType === exports.APPLICATION_JSON || + chosenContentType === exports.APPLICATION_GRAPHQL_RESPONSE_JSON) { + // They want GraphQL + if (request.method === "POST" || + (dynamicOptions.graphqlOverGET && request.method === "GET")) { + /* continue */ + } + else { + return { + type: "graphql", + request, + dynamicOptions, + statusCode: 405, + contentType: "application/json", + payload: { + errors: [new GraphQLError("Method not supported, please use POST")], + }, + }; + } + } + else { + // > Respond with a 406 Not Acceptable status code and stop processing the request. + // https://graphql.github.io/graphql-over-http/draft/#sel-DANHELDAACNA4rR + return { + type: "graphql", + request, + dynamicOptions, + statusCode: 406, + contentType: "application/json", + payload: { + errors: [ + new GraphQLError("Could not find a supported media type; consider adding 'application/json' or 'application/graphql-response+json' to your Accept header."), + ], + }, + }; + } + // If we get here, we're handling a GraphQL request + const isLegacy = chosenContentType === exports.APPLICATION_JSON; + let body; + try { + // Read the body + const parsedBody = request.method === "POST" + ? parseGraphQLBody(resolvedPreset, request, await request.getBody()) + : parseGraphQLQueryParams(await request.getQueryParams()); + // Apply our middleware (if any) to the body (they will mutate the body in place) + if (middleware != null && + middleware.middleware.processGraphQLRequestBody != null) { + const hookResult = middleware.run("processGraphQLRequestBody", { + resolvedPreset, + body: parsedBody, + request, + }, utils_js_1.noop); + if (hookResult != null) { + await hookResult; + } + } + // Validate that the body is of the right shape + body = validateGraphQLBody(parsedBody); + } + catch (e) { + if (e instanceof grafast_1.SafeError) { + throw e; + } + else if (typeof e.statusCode === "number" && + e.statusCode >= 400 && + e.statusCode < 600) { + throw e; + } + else { + // ENHANCE: should maybe handle more specific issues here. See examples: + // https://graphql.github.io/graphql-over-http/draft/#sec-application-json.Examples + throw (0, utils_js_1.httpError)(400, `Parsing failed, please check that the data you're sending to the server is correct`); + } + } + const grafastCtx = { + ...request.requestContext, + http: request, + }; + const { schema, parseAndValidate, execute, + // subscribe, + contextValue, + // dynamicOptions? + } = await instance.getExecutionConfig(grafastCtx); + const outputDataAsString = dynamicOptions.outputDataAsString; + const { maskIterator, maskPayload, maskError } = dynamicOptions; + const { query, operationName, variableValues } = body; + const { errors, document } = parseAndValidate(query); + if (errors !== undefined) { + return { + type: "graphql", + request, + dynamicOptions, + statusCode: isLegacy ? 200 : 400, + contentType: chosenContentType, + payload: { errors }, + }; + } + if (request.method !== "POST") { + // Forbid mutation + const operation = getOperationAST(document, operationName); + if (!operation || operation.operation !== "query") { + const error = new GraphQLError("Only queries may take place over non-POST requests.", operation); + return { + type: "graphql", + request, + dynamicOptions, + // Note: the GraphQL-over-HTTP spec currently mandates 405, even for legacy clients: + // https://graphql.github.io/graphql-over-http/draft/#sel-FALJRPCE2BCGoBitR + statusCode: 405, + contentType: chosenContentType, + payload: { + errors: [error], + }, + }; + } + } + const args = { + schema, + document, + rootValue: null, + contextValue, + variableValues, + operationName, + resolvedPreset, + requestContext: grafastCtx, + middleware: grafastMiddleware, + }; + try { + await (0, grafast_1.hookArgs)(args); + const result = await execute(args); + if ((0, grafast_1.isAsyncIterable)(result)) { + return { + type: "graphqlIncremental", + request, + dynamicOptions, + statusCode: 200, + iterator: maskIterator(result), + outputDataAsString, + }; + } + return { + type: "graphql", + request, + dynamicOptions, + statusCode: isLegacy || !result.errors + ? 200 + : result.data === undefined + ? 400 + : 200, + contentType: chosenContentType, + payload: maskPayload(result), + outputDataAsString, + }; + } + catch (e) { + console.error(e); + return { + type: "graphql", + request, + dynamicOptions, + // e.g. We should always return 400 on no Content-Type header: + // https://graphql.github.io/graphql-over-http/draft/#sel-DALLDJAADLCA8tb + statusCode: e.statusCode ?? (isLegacy ? 200 : 500), + contentType: chosenContentType, + payload: { + errors: [maskError(new GraphQLError(e.message))], + extensions: args.rootValue?.[grafast_1.$$extensions], + }, + }; + } + }; +}; +const makeGraphQLHandler = (instance) => { + const handler = _makeGraphQLHandlerInternal(instance); + const { dynamicOptions } = instance; + return (request, graphiqlHandler) => handler(request, graphiqlHandler).catch((e) => handleGraphQLHandlerError(request, dynamicOptions, e)); +}; +exports.makeGraphQLHandler = makeGraphQLHandler; +function handleGraphQLHandlerError(request, dynamicOptions, e) { + if (e instanceof grafast_1.SafeError) { + return { + type: "graphql", + request, + dynamicOptions, + payload: { + errors: [ + new GraphQLError(e.message, null, null, null, null, e, e.extensions), + ], + }, + statusCode: e.extensions?.statusCode ?? 500, + // FIXME: we should respect the `accept` header here if we can. + contentType: exports.APPLICATION_JSON, + }; + } + // TODO: if a GraphQLError is thrown... WTF? + const graphqlError = e instanceof GraphQLError + ? e + : new GraphQLError("Unknown error occurred", null, null, null, null, e); + // Special error handling for GraphQL route + console.error("An error occurred whilst attempting to handle the GraphQL request:"); + console.dir(e); + return { + type: "graphql", + request, + dynamicOptions, + payload: { errors: [graphqlError] }, + statusCode: graphqlError.extensions?.statusCode ?? 500, + // Fall back to application/json; this is when an unexpected error happens + // so it shouldn't be hit. + contentType: exports.APPLICATION_JSON, + }; +} +//# sourceMappingURL=graphql.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/middleware/graphql.js.map b/grafast/grafserv/dist/middleware/graphql.js.map new file mode 100644 index 0000000000..baf65909af --- /dev/null +++ b/grafast/grafserv/dist/middleware/graphql.js.map @@ -0,0 +1 @@ +{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/middleware/graphql.ts"],"names":[],"mappings":";;;AAmCA,oEAmDC;AA6KD,kDAwBC;;AA3RD,uDAAoE;AAEpE,uCAAoC;AACpC,mCAAoC;AAEpC,qCAA6E;AAE7E,iEAA2C;AAE3C,4CAAiD;AAWjD,oDAAuD;AACvD,0CAAoE;AAEpE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CA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,yBAAyB,CAChC,OAAgC,EAChC,cAA8B,EAC9B,CAAoB;IAEpB,IAAI,CAAC,YAAY,mBAAS,EAAE,CAAC;QAC3B,OAAO;YACL,IAAI,EAAE,SAAS;YACf,OAAO;YACP,cAAc;YACd,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,IAAI,YAAY,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC;iBACrE;aACF;YACD,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,UAAU,IAAI,GAAG;YAC3C,+DAA+D;YAC/D,WAAW,EAAE,wBAAgB;SACb,CAAC;IACrB,CAAC;IACD,4CAA4C;IAC5C,MAAM,YAAY,GAChB,CAAC,YAAY,YAAY;QACvB,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,IAAI,YAAY,CAAC,wBAAwB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5E,2CAA2C;IAC3C,OAAO,CAAC,KAAK,CACX,oEAAoE,CACrE,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACf,OAAO;QACL,IAAI,EAAE,SAAS;QACf,OAAO;QACP,cAAc;QACd,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE;QACnC,UAAU,EACP,YAAY,CAAC,UAAU,EAAE,UAAiC,IAAI,GAAG;QACpE,0EAA0E;QAC1E,0BAA0B;QAC1B,WAAW,EAAE,wBAAgB;KACb,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/options.d.ts b/grafast/grafserv/dist/options.d.ts new file mode 100644 index 0000000000..aa3f87b49b --- /dev/null +++ b/grafast/grafserv/dist/options.d.ts @@ -0,0 +1,25 @@ +import type { AsyncExecutionResult, ExecutionResult } from "grafast/graphql"; +import * as graphql from "grafast/graphql"; +import type { MaskErrorFn } from "./interfaces"; +export declare function defaultMaskError(error: graphql.GraphQLError): graphql.GraphQLError; +export declare const makeMaskError: (callback: MaskErrorFn) => MaskErrorFn; +export declare function optionsFromConfig(config: GraphileConfig.ResolvedPreset): { + resolvedPreset: GraphileConfig.ResolvedPreset; + outputDataAsString: boolean; + graphqlPath: string; + graphqlOverGET: boolean; + graphiql: boolean; + graphiqlOnGraphQLGET: boolean; + graphiqlPath: string; + watch: boolean; + eventStreamPath: string; + maxRequestLength: number; + explain: boolean | string[] | undefined; + schemaWaitTime: number; + maskError: MaskErrorFn; + maskPayload: (payload: any) => any; + maskIterator: (result: AsyncGenerator) => AsyncGenerator; + maskExecutionResult: (result: ExecutionResult | AsyncGenerator) => any; +}; +export type OptionsFromConfig = ReturnType; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/options.d.ts.map b/grafast/grafserv/dist/options.d.ts.map new file mode 100644 index 0000000000..17ac933b82 --- /dev/null +++ b/grafast/grafserv/dist/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAqBhD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,CAAC,YAAY,GAC1B,OAAO,CAAC,YAAY,CAwCtB;AAiBD,eAAO,MAAM,aAAa,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,WAEhB,CAAC;AAExC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,CAAC,cAAc;;;;;;;;;;;;;;2BAkBvC,GAAG;2BAOvB,cAAc,CAAC,oBAAoB,CAAC,KAC3C,cAAc,CAAC,oBAAoB,CAAC;kCA4B7B,eAAe,GAAG,cAAc,CAAC,oBAAoB,CAAC;EA0BjE;AACD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/options.js b/grafast/grafserv/dist/options.js new file mode 100644 index 0000000000..a646025bad --- /dev/null +++ b/grafast/grafserv/dist/options.js @@ -0,0 +1,128 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeMaskError = void 0; +exports.defaultMaskError = defaultMaskError; +exports.optionsFromConfig = optionsFromConfig; +const tslib_1 = require("tslib"); +const node_crypto_1 = require("node:crypto"); +const grafast_1 = require("grafast"); +const graphql = tslib_1.__importStar(require("grafast/graphql")); +const { GraphQLError } = graphql; +// Only the non-ambiguous characters +const RANDOM_STRING_LETTERS = "ABCDEFGHJKLMNPQRTUVWXYZ2346789"; +const RANDOM_STRING_LETTERS_LENGTH = RANDOM_STRING_LETTERS.length; +const sha1 = (text) => (0, node_crypto_1.createHash)("sha1").update(text).digest("base64url"); +const randomString = (length = 10) => { + let str = ""; + for (let i = 0; i < length; i++) { + str += + RANDOM_STRING_LETTERS[Math.floor(Math.random() * RANDOM_STRING_LETTERS_LENGTH)]; + } + return str; +}; +function defaultMaskError(error) { + if (!error.originalError && error instanceof GraphQLError) { + // Things like 'Cannot return null for non-nullable field' + return error; + } + else if (error.originalError instanceof GraphQLError) { + return error; + } + else if (error.originalError != null && (0, grafast_1.isSafeError)(error.originalError)) { + return new GraphQLError(error.originalError.message, error.nodes, error.source, error.positions, error.path, error.originalError, error.originalError.extensions ?? null); + } + else { + // Hash so similar errors can easily be grouped + const hash = sha1(String(error)); + const errorId = randomString(); + console.error("Masked GraphQL error (hash: '%s', id: '%s')\n%s\n%O", hash, errorId, error, error.originalError ?? error); + return new GraphQLError(`An error occurred (logged with hash: '${hash}', id: '${errorId}')`, error.nodes, error.source, error.positions, error.path, error.originalError, + // Deliberately wipe the extensions + { + errorId, + }); + } +} +function devMakeMaskError(callback) { + let warnedAboutMaskErrorCallback = false; + return (error) => { + const path = error.path; + const replacement = callback(error); + if (!warnedAboutMaskErrorCallback && replacement.path !== path) { + warnedAboutMaskErrorCallback = true; + console.warn(`[WARNING] Your maskError callback is changing the error path; please reuse the path of the original error to ensure compliance with the GraphQL specification. We will not issue this warning again until the server is restarted or another maskError function is provided.`); + } + return replacement; + }; +} +exports.makeMaskError = grafast_1.isDev + ? devMakeMaskError + : (callback) => callback; +function optionsFromConfig(config) { + const { graphqlPath = "/graphql", graphqlOverGET = false, graphiql = true, graphiqlOnGraphQLGET = true, graphiqlPath = "/", watch = false, eventStreamPath = "/graphql/stream", maxRequestLength = 100_000, outputDataAsString = false, schemaWaitTime = 15000, maskError: rawMaskError, } = config.grafserv ?? {}; + const { explain } = config.grafast ?? {}; + const maskError = rawMaskError + ? (0, exports.makeMaskError)(rawMaskError) + : defaultMaskError; + const maskPayload = (payload) => { + if (payload.errors !== undefined) { + payload.errors = payload.errors.map(maskError); + } + return payload; + }; + const maskIterator = (result) => { + return { + [Symbol.asyncIterator]() { + return this; + }, + async [Symbol.asyncDispose]() { + await this.return(undefined); + }, + return(value) { + return result.return(value); + }, + throw(e) { + return result.throw(e); + }, + async next(...args) { + const ir = await result.next(...args); + if (ir.value != null) { + return { + done: ir.done, + value: maskPayload(ir.value), + }; + } + else { + return ir; + } + }, + }; + }; + const maskExecutionResult = (result) => { + if ((0, grafast_1.isAsyncIterable)(result)) { + return maskIterator(result); + } + else { + return maskPayload(result); + } + }; + return { + resolvedPreset: config, + outputDataAsString, + graphqlPath, + graphqlOverGET, + graphiql, + graphiqlOnGraphQLGET, + graphiqlPath, + watch, + eventStreamPath, + maxRequestLength, + explain, + schemaWaitTime, + maskError, + maskPayload, + maskIterator, + maskExecutionResult, + }; +} +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/options.js.map b/grafast/grafserv/dist/options.js.map new file mode 100644 index 0000000000..e62f131b0d --- /dev/null +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,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,GAAG,IAAS;gBACrB,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;gBACtC,IAAI,EAAE,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;oBACrB,OAAO;wBACL,IAAI,EAAE,EAAE,CAAC,IAAI;wBACb,KAAK,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC;qBAC7B,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACN,OAAO,EAAE,CAAC;gBACZ,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;IACF,MAAM,mBAAmB,GAAG,CAC1B,MAA8D,EAC9D,EAAE;QACF,IAAI,IAAA,yBAAe,EAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC;IACF,OAAO;QACL,cAAc,EAAE,MAAM;QACtB,kBAAkB;QAClB,WAAW;QACX,cAAc;QACd,QAAQ;QACR,oBAAoB;QACpB,YAAY;QACZ,KAAK;QACL,eAAe;QACf,gBAAgB;QAChB,OAAO;QACP,cAAc;QACd,SAAS;QACT,WAAW;QACX,YAAY;QACZ,mBAAmB;KACpB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/express/v4/index.d.ts b/grafast/grafserv/dist/servers/express/v4/index.d.ts new file mode 100644 index 0000000000..fc698a854a --- /dev/null +++ b/grafast/grafserv/dist/servers/express/v4/index.d.ts @@ -0,0 +1,22 @@ +import type { Server as HTTPServer } from "node:http"; +import type { Server as HTTPSServer } from "node:https"; +import type { Express, Request, Response } from "express"; +import type { GrafservConfig, RequestDigest } from "../../../interfaces.js"; +import type { OptionsFromConfig } from "../../../options.js"; +import { NodeGrafservBase } from "../../node/index.js"; +declare global { + namespace Grafast { + interface RequestContext { + expressv4: { + req: Request; + res: Response; + }; + } + } +} +export declare class ExpressGrafserv extends NodeGrafservBase { + protected getDigest(dynamicOptions: OptionsFromConfig, req: Request, res: Response): RequestDigest; + addTo(app: Express, server: HTTPServer | HTTPSServer | null, addExclusiveWebsocketHandler?: boolean): Promise; +} +export declare function grafserv(config: GrafservConfig): ExpressGrafserv; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/express/v4/index.d.ts.map b/grafast/grafserv/dist/servers/express/v4/index.d.ts.map new file mode 100644 index 0000000000..5d544f09ab --- /dev/null +++ b/grafast/grafserv/dist/servers/express/v4/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/express/v4/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,SAAS,EAAE;gBACT,GAAG,EAAE,OAAO,CAAC;gBACb,GAAG,EAAE,QAAQ,CAAC;aACf,CAAC;SACH;KACF;CACF;AAED,qBAAa,eAAgB,SAAQ,gBAAgB;IACnD,SAAS,CAAC,SAAS,CACjB,cAAc,EAAE,iBAAiB,EACjC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,GACZ,aAAa;IA+BV,KAAK,CACT,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,EACvC,4BAA4B,UAAO;CA2CtC;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,mBAE9C"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/express/v4/index.js b/grafast/grafserv/dist/servers/express/v4/index.js new file mode 100644 index 0000000000..f7f15b60fc --- /dev/null +++ b/grafast/grafserv/dist/servers/express/v4/index.js @@ -0,0 +1,82 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExpressGrafserv = void 0; +exports.grafserv = grafserv; +const utils_js_1 = require("../../../utils.js"); +const index_js_1 = require("../../node/index.js"); +class ExpressGrafserv extends index_js_1.NodeGrafservBase { + getDigest(dynamicOptions, req, res) { + return { + httpVersionMajor: req.httpVersionMajor, + httpVersionMinor: req.httpVersionMinor, + isSecure: req.secure, + method: req.method, + path: req.path, + headers: (0, utils_js_1.processHeaders)(req.headers), + getQueryParams() { + return req.query; + }, + getBody() { + if (req.body != null) { + return (0, utils_js_1.getBodyFromFrameworkBody)(req.body); + } + else { + return (0, utils_js_1.getBodyFromRequest)(req, dynamicOptions.maxRequestLength); + } + }, + requestContext: { + node: { + req, + res, + }, + expressv4: { + req, + res, + }, + }, + }; + } + async addTo(app, server, addExclusiveWebsocketHandler = true) { + app.use(this._createHandler()); + // Alias this just to make it easier for users to copy/paste the code below + // eslint-disable-next-line @typescript-eslint/no-this-alias + const serv = this; + if (addExclusiveWebsocketHandler) { + const grafservUpgradeHandler = await serv.getUpgradeHandler(); + if (grafservUpgradeHandler) { + const upgrade = (req, socket, head) => { + if (serv.shouldHandleUpgrade(req, socket, head)) { + grafservUpgradeHandler(req, socket, head); + } + else { + socket.destroy(); + } + }; + const attachWebsocketsToServer = (server) => { + server.on("upgrade", upgrade); + serv.onRelease(() => { + server.off("upgrade", upgrade); + }); + }; + if (server) { + // If user explicitly passes server, bind to it: + attachWebsocketsToServer(server); + } + else { + // If not, hope they're calling `app.listen()` and intercept that call. + const oldListen = app.listen; + app.listen = function (...args) { + const server = oldListen.apply(this, args); + attachWebsocketsToServer(server); + return server; + }; + } + } + } + } +} +exports.ExpressGrafserv = ExpressGrafserv; +function grafserv(config) { + return new ExpressGrafserv(config); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/express/v4/index.js.map b/grafast/grafserv/dist/servers/express/v4/index.js.map new file mode 100644 index 0000000000..7ca29a4f6d --- /dev/null +++ b/grafast/grafserv/dist/servers/express/v4/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/express/v4/index.ts"],"names":[],"mappings":";;;AA8GA,4BAEC;AAxGD,gDAI2B;AAC3B,kDAAuD;AAavD,MAAa,eAAgB,SAAQ,2BAAgB;IACzC,SAAS,CACjB,cAAiC,EACjC,GAAY,EACZ,GAAa;QAEb,OAAO;YACL,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YACtC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YACtC,QAAQ,EAAE,GAAG,CAAC,MAAM;YACpB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,OAAO,EAAE,IAAA,yBAAc,EAAC,GAAG,CAAC,OAAO,CAAC;YACpC,cAAc;gBACZ,OAAO,GAAG,CAAC,KAA0C,CAAC;YACxD,CAAC;YACD,OAAO;gBACL,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;oBACrB,OAAO,IAAA,mCAAwB,EAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC5C,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAA,6BAAkB,EAAC,GAAG,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;gBAClE,CAAC;YACH,CAAC;YACD,c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AAC;oBAC7B,GAAG,CAAC,MAAM,GAAG,UAAU,GAAG,IAAS;wBACjC,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;wBAC3C,wBAAwB,CAAC,MAAM,CAAC,CAAC;wBACjC,OAAO,MAAM,CAAC;oBAChB,CAAC,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAlFD,0CAkFC;AAED,SAAgB,QAAQ,CAAC,MAAsB;IAC7C,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/fastify/v4/index.d.ts b/grafast/grafserv/dist/servers/fastify/v4/index.d.ts new file mode 100644 index 0000000000..b94cd5c6cb --- /dev/null +++ b/grafast/grafserv/dist/servers/fastify/v4/index.d.ts @@ -0,0 +1,20 @@ +import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; +import { GrafservBase } from "../../../core/base.js"; +import type { GrafservConfig, Result } from "../../../interfaces.js"; +declare global { + namespace Grafast { + interface RequestContext { + fastifyv4: { + request: FastifyRequest; + reply: FastifyReply; + }; + } + } +} +export declare class FastifyGrafserv extends GrafservBase { + constructor(config: GrafservConfig); + send(request: FastifyRequest, reply: FastifyReply, result: Result | null): Promise | import("../../../interfaces.js").JSONValue>; + addTo(app: FastifyInstance): Promise; +} +export declare function grafserv(config: GrafservConfig): FastifyGrafserv; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/fastify/v4/index.d.ts.map b/grafast/grafserv/dist/servers/fastify/v4/index.d.ts.map new file mode 100644 index 0000000000..1f1663b219 --- /dev/null +++ b/grafast/grafserv/dist/servers/fastify/v4/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/fastify/v4/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EAEf,MAAM,SAAS,CAAC;AAGjB,OAAO,EAEL,YAAY,EACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAEV,cAAc,EAEd,MAAM,EACP,MAAM,wBAAwB,CAAC;AAQhC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,SAAS,EAAE;gBACT,OAAO,EAAE,cAAc,CAAC;gBACxB,KAAK,EAAE,YAAY,CAAC;aACrB,CAAC;SACH;KACF;CACF;AAmCD,qBAAa,eAAgB,SAAQ,YAAY;gBACnC,MAAM,EAAE,cAAc;IAIrB,IAAI,CACf,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,GAAG,IAAI;IAwFjB,KAAK,CAAC,GAAG,EAAE,eAAe;CA6FjC;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,mBAE9C"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/fastify/v4/index.js b/grafast/grafserv/dist/servers/fastify/v4/index.js new file mode 100644 index 0000000000..ef9315f375 --- /dev/null +++ b/grafast/grafserv/dist/servers/fastify/v4/index.js @@ -0,0 +1,207 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FastifyGrafserv = void 0; +exports.grafserv = grafserv; +const node_stream_1 = require("node:stream"); +const websocket_1 = require("graphql-ws/lib/use/@fastify/websocket"); +const base_js_1 = require("../../../core/base.js"); +const utils_js_1 = require("../../../utils.js"); +function getDigest(request, reply) { + return { + httpVersionMajor: request.raw.httpVersionMajor, + httpVersionMinor: request.raw.httpVersionMinor, + // Fastify respects X-Forwarded-Proto when configured to trust the proxy, see: + // https://github.com/fastify/fastify/blob/59c5b273dad30821d03c952bbe073a976f92a325/docs/Reference/Server.md#trustproxy + isSecure: request.protocol === "https", + method: request.method, + path: request.url, + headers: (0, utils_js_1.processHeaders)(request.headers), + getQueryParams() { + return request.query; + }, + getBody() { + return (0, utils_js_1.getBodyFromFrameworkBody)(request.body); + }, + requestContext: { + node: { + req: request.raw, + res: reply.raw, + }, + fastifyv4: { + request, + reply, + }, + }, + preferJSON: true, + }; +} +class FastifyGrafserv extends base_js_1.GrafservBase { + constructor(config) { + super(config); + } + async send(request, reply, result) { + if (result === null) { + // 404 + reply.statusCode = 404; + return "¯\\_(ツ)_/¯"; + } + switch (result.type) { + case "error": { + const { statusCode, headers } = result; + reply.headers(headers); + reply.statusCode = statusCode; + // DEBT: mutating the error is probably bad form... + const errorWithStatus = Object.assign(result.error, { + status: statusCode, + }); + throw errorWithStatus; + } + case "buffer": { + const { statusCode, headers, buffer } = result; + reply.headers(headers); + reply.statusCode = statusCode; + return buffer; + } + case "json": { + const { statusCode, headers, json } = result; + reply.headers(headers); + reply.statusCode = statusCode; + return json; + } + case "noContent": { + const { statusCode, headers } = result; + reply.headers(headers); + reply.statusCode = statusCode; + return null; + } + case "bufferStream": { + const { statusCode, headers, lowLatency, bufferIterator } = result; + let bufferIteratorHandled = false; + try { + if (lowLatency) { + request.raw.socket.setTimeout(0); + request.raw.socket.setNoDelay(true); + request.raw.socket.setKeepAlive(true); + } + reply.headers(headers); + reply.statusCode = statusCode; + const stream = new node_stream_1.PassThrough(); + reply.send(stream); + // Fork off and convert bufferIterator to + try { + bufferIteratorHandled = true; + for await (const buffer of bufferIterator) { + stream.write(buffer); + } + } + finally { + stream.end(); + } + } + catch (e) { + if (!bufferIteratorHandled) { + try { + if (bufferIterator.return) { + bufferIterator.return(); + } + else if (bufferIterator.throw) { + bufferIterator.throw(e); + } + } + catch (e2) { + /* nom nom nom */ + } + } + throw e; + } + return reply; + } + default: { + const never = result; + console.log("Unhandled:"); + console.dir(never); + reply.type("text/plain"); + reply.statusCode = 501; + return "Server hasn't implemented this yet"; + } + } + } + async addTo(app) { + // application/graphql-request+json isn't currently an official serialization format: + // https://graphql.github.io/graphql-over-http/draft/#sec-Media-Types + /* + app.addContentTypeParser( + "application/graphql-request+json", + { parseAs: "string" }, + app.getDefaultJsonParser("ignore", "ignore"), + ); + */ + const { graphiql, graphiqlOnGraphQLGET, graphqlPath, graphiqlPath, graphqlOverGET, maxRequestLength: bodyLimit, watch, } = this.dynamicOptions; + const websockets = this.resolvedPreset.grafserv?.websockets ?? false; + const exposeGetRoute = graphqlOverGET || graphiqlOnGraphQLGET || websockets; + const exposeHeadRoute = true; + // Build HTTP handler. + const handler = async (request, reply) => { + const digest = getDigest(request, reply); + const handlerResult = await this.graphqlHandler((0, utils_js_1.normalizeRequest)(digest), this.graphiqlHandler); + const result = await (0, base_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(request, reply, result); + }; + // Build websocket handler. + const wsHandler = websockets + ? (0, websocket_1.makeHandler)((0, utils_js_1.makeGraphQLWSConfig)(this)) + : undefined; + // Attach HTTP handler for POST requests. + app.route({ method: "POST", url: graphqlPath, handler, bodyLimit }); + // Attach websocket and HTTP handler for GET requests, if desired. + if (exposeGetRoute) { + app.route({ + method: "GET", + url: graphqlPath, + exposeHeadRoute, + handler, + wsHandler, + }); + } + if (graphiql) { + app.route({ + method: "GET", + url: graphiqlPath, + exposeHeadRoute, + bodyLimit, + handler: async (request, reply) => { + const digest = getDigest(request, reply); + const handlerResult = await this.graphiqlHandler((0, utils_js_1.normalizeRequest)(digest)); + const result = await (0, base_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(request, reply, result); + }, + }); + } + if (watch) { + app.route({ + method: "GET", + url: this.dynamicOptions.eventStreamPath, + exposeHeadRoute: true, + bodyLimit: this.dynamicOptions.maxRequestLength, + handler: async (request, reply) => { + const digest = getDigest(request, reply); + // TODO: refactor this to use the eventStreamHandler once we write that... + const handlerResult = { + type: "event-stream", + request: (0, utils_js_1.normalizeRequest)(digest), + dynamicOptions: this.dynamicOptions, + payload: this.makeStream(), + statusCode: 200, + }; + const result = await (0, base_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(request, reply, result); + }, + }); + } + } +} +exports.FastifyGrafserv = FastifyGrafserv; +function grafserv(config) { + return new FastifyGrafserv(config); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/fastify/v4/index.js.map b/grafast/grafserv/dist/servers/fastify/v4/index.js.map new file mode 100644 index 0000000000..2efef30249 --- /dev/null +++ b/grafast/grafserv/dist/servers/fastify/v4/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/fastify/v4/index.ts"],"names":[],"mappings":";;;AAsQA,4BAEC;AAxQD,6CAA0C;AAQ1C,qEAAoE;AAEpE,mDAG+B;AAO/B,gDAK2B;AAa3B,SAAS,SAAS,CAChB,OAAuB,EACvB,KAAmB;IAEnB,OAAO;QACL,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;QAC9C,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;QAC9C,8EAA8E;QAC9E,uHAAuH;QACvH,QAAQ,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;QACtC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,GAAG;QACjB,OAAO,EAAE,IAAA,yBAAc,EAAC,OAAO,CAAC,OAAO,CAAC;QACxC,cAAc;YACZ,OAAO,OAAO,CAAC,KAA+B,CAAC;QACjD,CAAC;QACD,OAAO;YACL,OAAO,IAAA,mCAAwB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;QACD,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,GAAG,EAAE,KAAK,CAAC,GAAG;aACf;YACD,SAAS,EAAE;gBACT,OAAO;gBACP,KAAK;aACN;SACF;QACD,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC;AAED,MAAa,eAAgB,SAAQ,sBAAY;IAC/C,YAAY,MAAsB;QAChC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;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R,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,eAAe;gBACxC,eAAe,EAAE,IAAI;gBACrB,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,gBAAgB;gBAC/C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;oBAChC,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;oBACzC,0EAA0E;oBAC1E,MAAM,aAAa,GAA8B;wBAC/C,IAAI,EAAE,cAAc;wBACpB,OAAO,EAAE,IAAA,2BAAgB,EAAC,MAAM,CAAC;wBACjC,cAAc,EAAE,IAAI,CAAC,cAAc;wBACnC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;wBAC1B,UAAU,EAAE,GAAG;qBAChB,CAAC;oBACF,MAAM,MAAM,GAAG,MAAM,IAAA,sCAA4B,EAAC,aAAa,CAAC,CAAC;oBACjE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC3C,CAAC;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AA7LD,0CA6LC;AAED,SAAgB,QAAQ,CAAC,MAAsB;IAC7C,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/h3/v1/index.d.ts b/grafast/grafserv/dist/servers/h3/v1/index.d.ts new file mode 100644 index 0000000000..2557b50cf3 --- /dev/null +++ b/grafast/grafserv/dist/servers/h3/v1/index.d.ts @@ -0,0 +1,28 @@ +import type { Hooks } from "crossws"; +import type { App, H3Event } from "h3"; +import { GrafservBase } from "../../../index.js"; +import type { GrafservConfig, Result } from "../../../interfaces.js"; +declare global { + namespace Grafast { + interface RequestContext { + h3v1: { + event: H3Event; + }; + } + } +} +export declare class H3Grafserv extends GrafservBase { + constructor(config: GrafservConfig); + /** + * @deprecated use handleGraphQLEvent instead + */ + handleEvent(event: H3Event): Promise | import("../../../interfaces.js").JSONValue | undefined>; + handleGraphQLEvent(event: H3Event): Promise | import("../../../interfaces.js").JSONValue | undefined>; + handleGraphiqlEvent(event: H3Event): Promise | import("../../../interfaces.js").JSONValue | undefined>; + handleEventStreamEvent(event: H3Event): Promise | import("../../../interfaces.js").JSONValue | undefined>; + send(event: H3Event, result: Result | null): Promise | import("../../../interfaces.js").JSONValue | undefined>; + addTo(app: App): Promise; + makeWsHandler(): Partial; +} +export declare function grafserv(config: GrafservConfig): H3Grafserv; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/h3/v1/index.d.ts.map b/grafast/grafserv/dist/servers/h3/v1/index.d.ts.map new file mode 100644 index 0000000000..cfdc21cc8e --- /dev/null +++ b/grafast/grafserv/dist/servers/h3/v1/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/h3/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAQ,MAAM,SAAS,CAAC;AAE3C,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAevC,OAAO,EAEL,YAAY,EAIb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAGV,cAAc,EAEd,MAAM,EACP,MAAM,wBAAwB,CAAC;AAEhC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO,CAAC;aAChB,CAAC;SACH;KACF;CACF;AAqCD,qBAAa,UAAW,SAAQ,YAAY;gBAC9B,MAAM,EAAE,cAAc;IAIlC;;OAEG;IACU,WAAW,CAAC,KAAK,EAAE,OAAO;IAI1B,kBAAkB,CAAC,KAAK,EAAE,OAAO;IAWjC,mBAAmB,CAAC,KAAK,EAAE,OAAO;IAQlC,sBAAsB,CAAC,KAAK,EAAE,OAAO;IAcrC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IA0F1C,KAAK,CAAC,GAAG,EAAE,GAAG;IAqCpB,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC;CA2CvC;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,cAE9C"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/h3/v1/index.js b/grafast/grafserv/dist/servers/h3/v1/index.js new file mode 100644 index 0000000000..e5dae30a17 --- /dev/null +++ b/grafast/grafserv/dist/servers/h3/v1/index.js @@ -0,0 +1,225 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.H3Grafserv = void 0; +exports.grafserv = grafserv; +const node_stream_1 = require("node:stream"); +const graphql_ws_1 = require("graphql-ws"); +const h3_1 = require("h3"); +const index_js_1 = require("../../../index.js"); +function getDigest(event) { + const req = event.node.req; + const res = event.node.res; + return { + httpVersionMajor: req.httpVersionMajor, + httpVersionMinor: req.httpVersionMinor, + isSecure: (0, h3_1.getRequestProtocol)(event) === "https", + method: event.method, + path: event.path, + headers: (0, index_js_1.processHeaders)((0, h3_1.getRequestHeaders)(event)), + getQueryParams() { + return (0, h3_1.getQuery)(event); + }, + async getBody() { + const buffer = await (0, h3_1.readRawBody)(event, false); + if (!buffer) { + throw new Error("Failed to retrieve body from h3"); + } + return { + type: "buffer", + buffer, + }; + }, + requestContext: { + h3v1: { + event, + }, + node: { + req, + res, + }, + }, + }; +} +class H3Grafserv extends index_js_1.GrafservBase { + constructor(config) { + super(config); + } + /** + * @deprecated use handleGraphQLEvent instead + */ + async handleEvent(event) { + return this.handleGraphQLEvent(event); + } + async handleGraphQLEvent(event) { + const digest = getDigest(event); + const handlerResult = await this.graphqlHandler((0, index_js_1.normalizeRequest)(digest), this.graphiqlHandler); + const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(event, result); + } + async handleGraphiqlEvent(event) { + const digest = getDigest(event); + const handlerResult = await this.graphiqlHandler((0, index_js_1.normalizeRequest)(digest)); + const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(event, result); + } + async handleEventStreamEvent(event) { + const digest = getDigest(event); + const handlerResult = { + type: "event-stream", + request: (0, index_js_1.normalizeRequest)(digest), + dynamicOptions: this.dynamicOptions, + payload: this.makeStream(), + statusCode: 200, + }; + const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(event, result); + } + async send(event, result) { + if (result === null) { + // 404 + (0, h3_1.setResponseStatus)(event, 404); + return "¯\\_(ツ)_/¯"; + } + switch (result.type) { + case "error": { + const { statusCode, headers } = result; + (0, h3_1.setResponseHeaders)(event, headers); + (0, h3_1.setResponseStatus)(event, statusCode); + // DEBT: mutating the error is probably bad form... + const errorWithStatus = Object.assign(result.error, { + status: statusCode, + }); + throw errorWithStatus; + } + case "buffer": { + const { statusCode, headers, buffer } = result; + (0, h3_1.setResponseHeaders)(event, headers); + (0, h3_1.setResponseStatus)(event, statusCode); + return buffer; + } + case "json": { + const { statusCode, headers, json } = result; + (0, h3_1.setResponseHeaders)(event, headers); + (0, h3_1.setResponseStatus)(event, statusCode); + return json; + } + case "noContent": { + const { statusCode, headers } = result; + (0, h3_1.setResponseHeaders)(event, headers); + (0, h3_1.setResponseStatus)(event, statusCode); + return null; + } + case "bufferStream": { + const { statusCode, headers, lowLatency, bufferIterator } = result; + let bufferIteratorHandled = false; + try { + if (lowLatency) { + event.node.req.socket.setTimeout(0); + event.node.req.socket.setNoDelay(true); + event.node.req.socket.setKeepAlive(true); + } + (0, h3_1.setResponseHeaders)(event, headers); + (0, h3_1.setResponseStatus)(event, statusCode); + const stream = new node_stream_1.PassThrough(); + (0, h3_1.sendStream)(event, stream).catch((e) => { + console.error("An error occured when streaming to h3:"); + console.error(e); + }); + // Fork off and convert bufferIterator to + try { + bufferIteratorHandled = true; + for await (const buffer of bufferIterator) { + stream.write(buffer); + } + } + finally { + stream.end(); + } + } + catch (e) { + if (!bufferIteratorHandled) { + try { + if (bufferIterator.return) { + bufferIterator.return(); + } + else if (bufferIterator.throw) { + bufferIterator.throw(e); + } + } + catch (e2) { + /* nom nom nom */ + } + } + throw e; + } + return; + } + default: { + const never = result; + console.log("Unhandled:"); + console.dir(never); + (0, h3_1.setResponseHeader)(event, "Content-Type", "text/plain"); + (0, h3_1.setResponseStatus)(event, 501); + return "Server hasn't implemented this yet"; + } + } + } + async addTo(app) { + const dynamicOptions = this.dynamicOptions; + const router = (0, h3_1.createRouter)(); + app.use(router); + router.use(this.dynamicOptions.graphqlPath, (0, h3_1.eventHandler)((event) => this.handleGraphQLEvent(event)), this.dynamicOptions.graphqlOverGET || + this.dynamicOptions.graphiqlOnGraphQLGET + ? ["get", "post"] + : ["post"]); + if (this.resolvedPreset.grafserv?.websockets) { + app.use(this.dynamicOptions.graphqlPath, (0, h3_1.defineWebSocketHandler)(this.makeWsHandler())); + } + if (dynamicOptions.graphiql) { + router.get(this.dynamicOptions.graphiqlPath, (0, h3_1.eventHandler)((event) => this.handleGraphiqlEvent(event))); + } + if (dynamicOptions.watch) { + router.get(this.dynamicOptions.eventStreamPath, (0, h3_1.eventHandler)((event) => this.handleEventStreamEvent(event))); + } + } + makeWsHandler() { + const graphqlWsServer = (0, graphql_ws_1.makeServer)((0, index_js_1.makeGraphQLWSConfig)(this)); + const clients = new Map(); + return { + open(peer) { + const client = {}; + clients.set(peer, client); + const onClose = graphqlWsServer.opened({ + protocol: peer.websocket.protocol ?? graphql_ws_1.GRAPHQL_TRANSPORT_WS_PROTOCOL, // will be validated + send(data) { + peer.send(data); + }, + close(code, reason) { + peer.close(code, reason); // there are protocol standard closures + }, + onMessage(cb) { + client.handleMessage = cb; + }, + }, { socket: peer.websocket, request: peer.request }); + client.closed = async (code, reason) => { + onClose(code, reason); + }; + }, + message(peer, message) { + clients.get(peer)?.handleMessage?.(message.text()); + }, + close(peer, details) { + clients.get(peer)?.closed?.(details.code, details.reason); + clients.delete(peer); + }, + error(peer, _error) { + clients.delete(peer); + }, + }; + } +} +exports.H3Grafserv = H3Grafserv; +function grafserv(config) { + return new H3Grafserv(config); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/h3/v1/index.js.map b/grafast/grafserv/dist/servers/h3/v1/index.js.map new file mode 100644 index 0000000000..7e0e0d53a5 --- /dev/null +++ b/grafast/grafserv/dist/servers/h3/v1/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/h3/v1/index.ts"],"names":[],"mappings":";;;AAwSA,4BAEC;AA1SD,6CAA0C;AAG1C,2CAAuE;AAEvE,2BAYY;AAEZ,gDAM2B;AAmB3B,SAAS,SAAS,CAAC,KAAc;IAC/B,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3B,OAAO;QACL,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;QACtC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;QACtC,QAAQ,EAAE,IAAA,uBAAkB,EAAC,KAAK,CAAC,KAAK,OAAO;QAC/C,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,IAAA,yBAAc,EAAC,IAAA,sBAAiB,EAAC,KAAK,CAAC,CAAC;QACjD,cAAc;YACZ,OAAO,IAAA,aAAQ,EAAC,KAAK,CAAsC,CAAC;QAC9D,CAAC;QACD,KAAK,CAAC,OAAO;YACX,MAAM,MAAM,GAAG,MAAM,IAAA,gBAAW,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;YACrD,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,MAA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AAI,EAAE,MAAM;gBAChB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;IACJ,CAAC;CACF;AAvND,gCAuNC;AAED,SAAgB,QAAQ,CAAC,MAAsB;IAC7C,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/hono/v4/index.d.ts b/grafast/grafserv/dist/servers/hono/v4/index.d.ts new file mode 100644 index 0000000000..711354172e --- /dev/null +++ b/grafast/grafserv/dist/servers/hono/v4/index.d.ts @@ -0,0 +1,36 @@ +import type { Context as Ctx, Hono, MiddlewareHandler } from "hono"; +import type { StatusCode } from "hono/utils/http-status"; +import type { UpgradeWebSocket } from "hono/ws"; +import { GrafservBase } from "../../../index.js"; +import type { GrafservConfig, Result } from "../../../interfaces.js"; +declare global { + namespace Grafast { + interface RequestContext { + honov4: { + ctx: Ctx; + }; + } + } +} +export declare class HonoGrafserv extends GrafservBase { + private upgradeWebSocket?; + constructor(config: GrafservConfig, upgradeWebSocket?: UpgradeWebSocket | undefined); + makeWsHandler(upgradeWebSocket: UpgradeWebSocket): MiddlewareHandler; + handleGraphQLEvent(ctx: Ctx): Promise<(Response & import("hono").TypedResponse<"¯\\_(ツ)_/¯", import("hono/utils/http-status").ContentfulStatusCode, "text">) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse<"Server hasn't implemented this yet", import("hono/utils/http-status").ContentfulStatusCode, "text">)>; + handleGraphiqlEvent(ctx: Ctx): Promise<(Response & import("hono").TypedResponse<"¯\\_(ツ)_/¯", import("hono/utils/http-status").ContentfulStatusCode, "text">) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse<"Server hasn't implemented this yet", import("hono/utils/http-status").ContentfulStatusCode, "text">)>; + handleEventStreamEvent(ctx: Ctx): Promise<(Response & import("hono").TypedResponse<"¯\\_(ツ)_/¯", import("hono/utils/http-status").ContentfulStatusCode, "text">) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse<"Server hasn't implemented this yet", import("hono/utils/http-status").ContentfulStatusCode, "text">)>; + send(ctx: Ctx, result: Result | null): Promise<(Response & import("hono").TypedResponse<"¯\\_(ツ)_/¯", import("hono/utils/http-status").ContentfulStatusCode, "text">) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse) | (Response & import("hono").TypedResponse<"Server hasn't implemented this yet", import("hono/utils/http-status").ContentfulStatusCode, "text">)>; + addTo(app: Hono): Promise; + private setResponseHeaders; +} +/** + * Creates a new instance of HonoGrafserv. + * + * @param config - The configuration object for Grafserv. + * @param upgradeWebSocket - Optional parameter required when using websockets. + * Hono uses the upgradeWebsocket helper depending on the environment. + * Refer to https://hono.dev/docs/helpers/websocket for more details. + * @returns An instance of HonoGrafserv. + */ +export declare const grafserv: (config: GrafservConfig, upgradeWebSocket?: UpgradeWebSocket) => HonoGrafserv; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/hono/v4/index.d.ts.map b/grafast/grafserv/dist/servers/hono/v4/index.d.ts.map new file mode 100644 index 0000000000..0cb6c827d6 --- /dev/null +++ b/grafast/grafserv/dist/servers/hono/v4/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/hono/v4/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,IAAI,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,SAAS,CAAC;AAE3D,OAAO,EAEL,YAAY,EAIb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAGV,cAAc,EAEd,MAAM,EACP,MAAM,wBAAwB,CAAC;AAEhC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,MAAM,EAAE;gBACN,GAAG,EAAE,GAAG,CAAC;aACV,CAAC;SACH;KACF;CACF;AAgCD,qBAAa,YAAa,SAAQ,YAAY;IAG1C,OAAO,CAAC,gBAAgB,CAAC;gBADzB,MAAM,EAAE,cAAc,EACd,gBAAgB,CAAC,EAAE,gBAAgB,YAAA;IAKtC,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,iBAAiB;IAkD9D,kBAAkB,CAAC,GAAG,EAAE,GAAG;IAW3B,mBAAmB,CAAC,GAAG,EAAE,GAAG;IAQ5B,sBAAsB,CAAC,GAAG,EAAE,GAAG;IAc/B,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IA+DpC,KAAK,CAAC,GAAG,EAAE,IAAI;IAkD5B,OAAO,CAAC,kBAAkB;CAK3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,GACnB,QAAQ,cAAc,EACtB,mBAAmB,gBAAgB,iBAGpC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/hono/v4/index.js b/grafast/grafserv/dist/servers/hono/v4/index.js new file mode 100644 index 0000000000..0e49a5d46d --- /dev/null +++ b/grafast/grafserv/dist/servers/hono/v4/index.js @@ -0,0 +1,218 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.grafserv = exports.HonoGrafserv = void 0; +const graphql_ws_1 = require("graphql-ws"); +const index_js_1 = require("../../../index.js"); +function getDigest(ctx) { + const req = ctx.req; + return { + httpVersionMajor: 1, // Hono uses Fetch API, which doesn't expose HTTP version + httpVersionMinor: 1, + isSecure: req.url.startsWith("https:"), + method: req.method, + path: req.path, + headers: (0, index_js_1.processHeaders)(req.header()), + getQueryParams() { + return req.query(); + }, + async getBody() { + const json = await req.json(); + if (!json) { + throw new Error("Failed to retrieve body from hono"); + } + return { + type: "json", + json, + }; + }, + requestContext: { + honov4: { + ctx: ctx, + }, + }, + }; +} +class HonoGrafserv extends index_js_1.GrafservBase { + constructor(config, upgradeWebSocket) { + super(config); + this.upgradeWebSocket = upgradeWebSocket; + } + makeWsHandler(upgradeWebSocket) { + const graphqlWsServer = (0, graphql_ws_1.makeServer)((0, index_js_1.makeGraphQLWSConfig)(this)); + return upgradeWebSocket((c) => { + let onMessage; + let onClose; + let isOpened = false; + const initGraphqlServer = (ws) => { + onClose = graphqlWsServer.opened({ + protocol: ws.protocol ?? graphql_ws_1.GRAPHQL_TRANSPORT_WS_PROTOCOL, + send(data) { + ws.send(data); + }, + close(code, reason) { + console.log("close", code, reason); + ws.close(code, reason); + isOpened = false; + }, + onMessage(cb) { + onMessage = cb; + }, + }, { socket: ws, request: c.req }); + isOpened = true; + }; + return { + onOpen(evt, ws) { + initGraphqlServer(ws); + }, + onMessage(evt, ws) { + // cloudflare workers don't support the open event + // so we initialize the server on the first message + if (!isOpened) { + initGraphqlServer(ws); + } + onMessage?.(evt.data); + }, + onClose(evt) { + onClose?.(evt.code, evt.reason); + }, + onError(evt) { + console.error("An error occured in the websocket:", evt); + }, + }; + }); + } + async handleGraphQLEvent(ctx) { + const digest = getDigest(ctx); + const handlerResult = await this.graphqlHandler((0, index_js_1.normalizeRequest)(digest), this.graphiqlHandler); + const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(ctx, result); + } + async handleGraphiqlEvent(ctx) { + const digest = getDigest(ctx); + const handlerResult = await this.graphiqlHandler((0, index_js_1.normalizeRequest)(digest)); + const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(ctx, result); + } + async handleEventStreamEvent(ctx) { + const digest = getDigest(ctx); + const handlerResult = { + type: "event-stream", + request: (0, index_js_1.normalizeRequest)(digest), + dynamicOptions: this.dynamicOptions, + payload: this.makeStream(), + statusCode: 200, + }; + const result = await (0, index_js_1.convertHandlerResultToResult)(handlerResult); + return this.send(ctx, result); + } + async send(ctx, result) { + if (result === null) { + // 404 + ctx.status(404); + return ctx.text("¯\\_(ツ)_/¯"); + } + switch (result.type) { + case "error": { + const { statusCode, headers } = result; + this.setResponseHeaders(ctx, headers); + ctx.status(statusCode); + const errorWithStatus = Object.assign(result.error, { + status: statusCode, + }); + throw errorWithStatus; + } + case "buffer": { + const { statusCode, headers, buffer } = result; + this.setResponseHeaders(ctx, headers); + ctx.status(statusCode); + return ctx.body(buffer); + } + case "json": { + const { statusCode, headers, json } = result; + this.setResponseHeaders(ctx, headers); + ctx.status(statusCode); + // @ts-expect-error Some issue with types causing "excessively deep and possibly infinite" + return ctx.json(json); + } + case "noContent": { + const { statusCode, headers } = result; + this.setResponseHeaders(ctx, headers); + ctx.status(statusCode); + return ctx.body(null); + } + case "bufferStream": { + // TODO : handle bufferStream? + console.log("bufferStream is not handled yet"); + // Force the iterator to close + const { bufferIterator } = result; + if (bufferIterator.return) { + bufferIterator.return(); + } + else if (bufferIterator.throw) { + bufferIterator.throw(new Error("Unimplemented")); + } + this.setResponseHeaders(ctx, { "Content-Type": "text/plain" }); + ctx.status(501); + return ctx.text("Server hasn't implemented this yet"); + } + default: { + const never = result; + console.log("Unhandled:"); + console.dir(never); + this.setResponseHeaders(ctx, { "Content-Type": "text/plain" }); + ctx.status(501); + return ctx.text("Server hasn't implemented this yet"); + } + } + } + async addTo(app) { + const dynamicOptions = this.dynamicOptions; + if (this.resolvedPreset.grafserv?.websockets && !this.upgradeWebSocket) { + throw new Error("grafserv.websockets is enabled but no upgradeWebSocket was provided"); + } + if (!this.resolvedPreset.grafserv?.websockets && this.upgradeWebSocket) { + console.warn("UpgradeWebSocket was provided but grafserv.websockets is disabled - websockets will not be activated"); + } + app.post(this.dynamicOptions.graphqlPath, (c) => this.handleGraphQLEvent(c)); + const websocketHandler = this.resolvedPreset.grafserv?.websockets && this.upgradeWebSocket + ? this.makeWsHandler(this.upgradeWebSocket) + : undefined; + const shouldServeGetHandler = this.dynamicOptions.graphqlOverGET || + this.dynamicOptions.graphiqlOnGraphQLGET || + websocketHandler; + if (shouldServeGetHandler) { + app.get(this.dynamicOptions.graphqlPath, (c, next) => { + if (c.req.header("Upgrade") === "websocket" && websocketHandler) { + return websocketHandler(c, next); + } + return this.handleGraphQLEvent(c); + }); + } + if (dynamicOptions.graphiql) { + app.get(this.dynamicOptions.graphiqlPath, (c) => this.handleGraphiqlEvent(c)); + } + if (dynamicOptions.watch) { + app.get(this.dynamicOptions.eventStreamPath, (c) => this.handleEventStreamEvent(c)); + } + } + setResponseHeaders(ctx, headers) { + for (const key in headers) { + ctx.header(key, headers[key]); + } + } +} +exports.HonoGrafserv = HonoGrafserv; +/** + * Creates a new instance of HonoGrafserv. + * + * @param config - The configuration object for Grafserv. + * @param upgradeWebSocket - Optional parameter required when using websockets. + * Hono uses the upgradeWebsocket helper depending on the environment. + * Refer to https://hono.dev/docs/helpers/websocket for more details. + * @returns An instance of HonoGrafserv. + */ +const grafserv = (config, upgradeWebSocket) => { + return new HonoGrafserv(config, upgradeWebSocket); +}; +exports.grafserv = grafserv; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/hono/v4/index.js.map b/grafast/grafserv/dist/servers/hono/v4/index.js.map new file mode 100644 index 0000000000..ed4286074b --- /dev/null +++ b/grafast/grafserv/dist/servers/hono/v4/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/hono/v4/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuE;AAKvE,gDAM2B;AAmB3B,SAAS,SAAS,CAAC,GAAQ;IACzB,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;IACpB,OAAO;QACL,gBAAgB,EAAE,CAAC,EAAE,yDAAyD;QAC9E,gBAAgB,EAAE,CAAC;QACnB,QAAQ,EAAE,G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AED,IAAI,cAAc,CAAC,KAAK,EAAE,CAAC;YACzB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CACjD,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAC/B,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,kBAAkB,CAAC,GAAQ,EAAE,OAA+B;QAClE,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YAC1B,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;CACF;AAjND,oCAiNC;AAED;;;;;;;;GAQG;AACI,MAAM,QAAQ,GAAG,CACtB,MAAsB,EACtB,gBAAmC,EACnC,EAAE;IACF,OAAO,IAAI,YAAY,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AACpD,CAAC,CAAC;AALW,QAAA,QAAQ,YAKnB"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/koa/v2/index.d.ts b/grafast/grafserv/dist/servers/koa/v2/index.d.ts new file mode 100644 index 0000000000..bff19e497f --- /dev/null +++ b/grafast/grafserv/dist/servers/koa/v2/index.d.ts @@ -0,0 +1,25 @@ +import type { IncomingMessage, Server as HTTPServer } from "node:http"; +import type { Server as HTTPSServer } from "node:https"; +import type { Duplex } from "node:stream"; +import type { Context } from "koa"; +import type Koa from "koa"; +import { GrafservBase } from "../../../core/base.js"; +import type { GrafservConfig } from "../../../interfaces.js"; +declare global { + namespace Grafast { + interface RequestContext { + koav2: { + ctx: Context; + }; + } + } +} +export declare class KoaGrafserv extends GrafservBase { + constructor(config: GrafservConfig); + protected _createHandler(): (ctx: Context, next: (err?: Error) => void) => void; + getUpgradeHandler(): Promise<((req: IncomingMessage, socket: Duplex, head: Buffer) => void) | null>; + shouldHandleUpgrade(req: IncomingMessage, _socket: Duplex, _head: Buffer): boolean; + addTo(app: Koa, server: HTTPServer | HTTPSServer | null, addExclusiveWebsocketHandler?: boolean): Promise; +} +export declare function grafserv(config: GrafservConfig): KoaGrafserv; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/koa/v2/index.d.ts.map b/grafast/grafserv/dist/servers/koa/v2/index.d.ts.map new file mode 100644 index 0000000000..54e08150d3 --- /dev/null +++ b/grafast/grafserv/dist/servers/koa/v2/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/koa/v2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,wBAAwB,CAAC;AAS5E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,KAAK,EAAE;gBACL,GAAG,EAAE,OAAO,CAAC;aACd,CAAC;SACH;KACF;CACF;AAsCD,qBAAa,WAAY,SAAQ,YAAY;gBAC/B,MAAM,EAAE,cAAc;IAIlC,SAAS,CAAC,cAAc,IAAI,CAC1B,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,KACxB,IAAI;IAwEH,iBAAiB;IAOvB,mBAAmB,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAWlE,KAAK,CACT,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,EACvC,4BAA4B,UAAO;CA2CtC;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,eAE9C"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/koa/v2/index.js b/grafast/grafserv/dist/servers/koa/v2/index.js new file mode 100644 index 0000000000..7fda80ac42 --- /dev/null +++ b/grafast/grafserv/dist/servers/koa/v2/index.js @@ -0,0 +1,175 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.KoaGrafserv = void 0; +exports.grafserv = grafserv; +const node_stream_1 = require("node:stream"); +const base_js_1 = require("../../../core/base.js"); +const utils_js_1 = require("../../../utils.js"); +const index_js_1 = require("../../node/index.js"); +function getDigest(dynamicOptions, ctx) { + return { + httpVersionMajor: ctx.req.httpVersionMajor, + httpVersionMinor: ctx.req.httpVersionMinor, + // Koa respects X-Forwarded-Proto when configured to trust the proxy + isSecure: ctx.secure, + method: ctx.request.method, + path: ctx.request.url, + headers: (0, utils_js_1.processHeaders)(ctx.request.headers), + getQueryParams() { + return ctx.request.query; + }, + getBody() { + if ("body" in ctx.request) { + return (0, utils_js_1.getBodyFromFrameworkBody)(ctx.request.body); + } + else { + // No koa-bodyparser, let's just read the body ourself + return (0, utils_js_1.getBodyFromRequest)(ctx.req, dynamicOptions.maxRequestLength); + } + }, + requestContext: { + node: { + req: ctx.req, + res: ctx.res, + }, + koav2: { + ctx, + }, + }, + preferJSON: true, + }; +} +class KoaGrafserv extends base_js_1.GrafservBase { + constructor(config) { + super(config); + } + _createHandler() { + const dynamicOptions = this.dynamicOptions; + return async (ctx, next) => { + const request = getDigest(dynamicOptions, ctx); + const result = await this.processRequest(request); + if (result === null) { + return next(); + } + switch (result.type) { + case "error": { + const { statusCode, headers } = result; + ctx.response.set(headers); + ctx.response.status = statusCode; + // DEBT: mutating the error is probably bad form... + const errorWithStatus = Object.assign(result.error, { + status: statusCode, + }); + throw errorWithStatus; + } + case "buffer": { + const { statusCode, headers, buffer } = result; + ctx.response.set(headers); + ctx.response.status = statusCode; + ctx.response.body = buffer; + return; + } + case "json": { + const { statusCode, headers, json } = result; + ctx.response.set(headers); + ctx.response.status = statusCode; + ctx.response.body = json; + return; + } + case "noContent": { + const { statusCode, headers } = result; + ctx.response.set(headers); + ctx.response.status = statusCode; + ctx.response.body = null; + return; + } + case "bufferStream": { + const { statusCode, headers, lowLatency, bufferIterator } = result; + if (lowLatency) { + ctx.req.socket.setTimeout(0); + ctx.req.socket.setNoDelay(true); + ctx.req.socket.setKeepAlive(true); + } + ctx.response.set(headers); + ctx.response.status = statusCode; + const stream = new node_stream_1.PassThrough(); + ctx.response.body = stream; + for await (const buffer of bufferIterator) { + stream.write(buffer); + } + return; + } + default: { + const never = result; + console.log("Unhandled:"); + console.dir(never); + ctx.response.type = "text/plain"; + ctx.response.status = 501; + ctx.response.body = "Server hasn't implemented this yet"; + return; + } + } + }; + } + async getUpgradeHandler() { + if (this.resolvedPreset.grafserv?.websockets) { + return (0, index_js_1.makeNodeUpgradeHandler)(this); + } + else { + return null; + } + } + shouldHandleUpgrade(req, _socket, _head) { + const fullUrl = req.url; + if (!fullUrl) { + return false; + } + const q = fullUrl.indexOf("?"); + const url = q >= 0 ? fullUrl.substring(0, q) : fullUrl; + const graphqlPath = this.dynamicOptions.graphqlPath; + return url === graphqlPath; + } + async addTo(app, server, addExclusiveWebsocketHandler = true) { + app.use(this._createHandler()); + // Alias this just to make it easier for users to copy/paste the code below + // eslint-disable-next-line @typescript-eslint/no-this-alias + const serv = this; + if (addExclusiveWebsocketHandler) { + const grafservUpgradeHandler = await serv.getUpgradeHandler(); + if (grafservUpgradeHandler) { + const upgrade = (req, socket, head) => { + if (serv.shouldHandleUpgrade(req, socket, head)) { + grafservUpgradeHandler(req, socket, head); + } + else { + socket.destroy(); + } + }; + const attachWebsocketsToServer = (server) => { + server.on("upgrade", upgrade); + serv.onRelease(() => { + server.off("upgrade", upgrade); + }); + }; + if (server) { + // If user explicitly passes server, bind to it: + attachWebsocketsToServer(server); + } + else { + // If not, hope they're calling `app.listen()` and intercept that call. + const oldListen = app.listen; + app.listen = function (...args) { + const server = oldListen.apply(this, args); + attachWebsocketsToServer(server); + return server; + }; + } + } + } + } +} +exports.KoaGrafserv = KoaGrafserv; +function grafserv(config) { + return new KoaGrafserv(config); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/koa/v2/index.js.map b/grafast/grafserv/dist/servers/koa/v2/index.js.map new file mode 100644 index 0000000000..e937589ae4 --- /dev/null +++ b/grafast/grafserv/dist/servers/koa/v2/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/koa/v2/index.ts"],"names":[],"mappings":";;;AAkNA,4BAEC;AAjND,6CAA0C;AAK1C,mDAAqD;AAGrD,gDAI2B;AAC3B,kDAA6D;AAY7D,SAAS,SAAS,CAChB,cAAiC,EACjC,GAAY;IAEZ,OAAO;QACL,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,gBAAgB;QAC1C,gBAAgB,EAAE,GAAG,CAAC,GAAG,CAAC,gBAAgB;QAC1C,oEAAoE;QACpE,QAAQ,EAAE,GAAG,CAAC,MAAM;QACpB,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;QAC1B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG;QACrB,OAAO,EAAE,IAAA,yBAAc,EAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;QAC5C,cAAc;YACZ,OAAO,GAAG,CAAC,OAAO,CAAC,KAA0C,CAAC;QAChE,CAAC;QACD,OAAO;YACL,IAAI,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBAC1B,OAAO,IAAA,mCAAwB,EAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;iBAAM,CAAC;gBACN,sDAAsD;gBACtD,OAAO,IAAA,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,wBAAwB,CAAC,MAAM,CAAC,CAAC;gBACnC,CAAC;qBAAM,CAAC;oBACN,uEAAuE;oBACvE,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC;oBAC7B,GAAG,CAAC,MAAM,GAAG,UAAU,GAAG,IAAS;wBACjC,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;wBAC3C,wBAAwB,CAAC,MAAM,CAAC,CAAC;wBACjC,OAAO,MAAM,CAAC;oBAChB,CAAC,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAhJD,kCAgJC;AAED,SAAgB,QAAQ,CAAC,MAAsB;IAC7C,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/lambda/v1/index.d.ts b/grafast/grafserv/dist/servers/lambda/v1/index.d.ts new file mode 100644 index 0000000000..497872b48c --- /dev/null +++ b/grafast/grafserv/dist/servers/lambda/v1/index.d.ts @@ -0,0 +1,31 @@ +import type { APIGatewayEvent, APIGatewayProxyEvent, APIGatewayProxyResult, Context as LambdaContext } from "aws-lambda"; +import { GrafservBase } from "../../../core/base.js"; +import type { GrafservConfig, RequestDigest, Result } from "../../../interfaces.js"; +declare global { + namespace Grafast { + interface RequestContext { + lambdav1: { + event: APIGatewayProxyEvent; + context: LambdaContext; + }; + } + } +} +/** @experimental */ +export declare class LambdaGrafserv extends GrafservBase { + protected lambdaRequestToGrafserv(event: APIGatewayEvent, context: LambdaContext): RequestDigest; + protected grafservResponseToLambda(response: Result | null): { + statusCode: number; + body: string; + headers?: undefined; + } | { + statusCode: number; + headers: Record; + body: string; + }; + createHandler(): (event: APIGatewayEvent, context: LambdaContext) => Promise; + protected processLambdaRequest(_event: APIGatewayEvent, _context: LambdaContext, request: RequestDigest): import("grafast").PromiseOrDirect; +} +/** @experimental */ +export declare function grafserv(config: GrafservConfig): LambdaGrafserv; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/lambda/v1/index.d.ts.map b/grafast/grafserv/dist/servers/lambda/v1/index.d.ts.map new file mode 100644 index 0000000000..fcb63ef512 --- /dev/null +++ b/grafast/grafserv/dist/servers/lambda/v1/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/servers/lambda/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,OAAO,IAAI,aAAa,EACzB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,MAAM,EACP,MAAM,wBAAwB,CAAC;AAGhC,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,OAAO,CAAC;QAChB,UAAU,cAAc;YACtB,QAAQ,EAAE;gBAAE,KAAK,EAAE,oBAAoB,CAAC;gBAAC,OAAO,EAAE,aAAa,CAAA;aAAE,CAAC;SACnE;KACF;CACF;AAED,oBAAoB;AACpB,qBAAa,cAAe,SAAQ,YAAY;IAC9C,SAAS,CAAC,uBAAuB,CAC/B,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,aAAa,GACrB,aAAa;IAgChB,SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;;;;;;;;;IAwC1D,aAAa,KAGT,OAAO,eAAe,EACtB,SAAS,aAAa,KACrB,OAAO,CAAC,qBAAqB,CAAC;IAWnC,SAAS,CAAC,oBAAoB,CAC5B,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,aAAa;CAIzB;AAED,oBAAoB;AACpB,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,kBAE9C"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/lambda/v1/index.js b/grafast/grafserv/dist/servers/lambda/v1/index.js new file mode 100644 index 0000000000..003f08bb09 --- /dev/null +++ b/grafast/grafserv/dist/servers/lambda/v1/index.js @@ -0,0 +1,83 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LambdaGrafserv = void 0; +exports.grafserv = grafserv; +const base_js_1 = require("../../../core/base.js"); +const utils_js_1 = require("../../../utils.js"); +/** @experimental */ +class LambdaGrafserv extends base_js_1.GrafservBase { + lambdaRequestToGrafserv(event, context) { + const version = event.requestContext.protocol.match(/^HTTP\/(?[0-9]+)\.(?[0-9]+)$/); + return { + httpVersionMajor: parseInt(version?.groups?.major ?? "1"), + httpVersionMinor: parseInt(version?.groups?.minor ?? "0"), + isSecure: false, // Because we don't trust X-Forwarded-Proto + method: event.httpMethod, + path: event.requestContext.path, + headers: (0, utils_js_1.processHeaders)(event.multiValueHeaders), + getQueryParams() { + return Object.fromEntries(Object.entries(event.queryStringParameters ?? {}).filter(([_k, v]) => v !== undefined)); + }, + getBody() { + return { + type: "text", + text: event.body ?? "", + }; + }, + requestContext: { + lambdav1: { event, context }, + }, + preferJSON: true, + }; + } + grafservResponseToLambda(response) { + if (response === null) { + return { + statusCode: 404, + body: "¯\\_(ツ)_/¯", + }; + } + switch (response.type) { + case "error": { + const { statusCode, headers, error } = response; + return { + statusCode, + headers: { ...headers, "Content-Type": "text/plain" }, + body: error.message, + }; + } + case "buffer": { + const { statusCode, headers, buffer } = response; + return { statusCode, headers, body: buffer.toString("utf8") }; + } + case "json": { + const { statusCode, headers, json } = response; + return { statusCode, headers, body: JSON.stringify(json) }; + } + default: { + console.log("Unhandled:"); + console.dir(response); + return { + statusCode: 501, + headers: { "Content-Type": "text/plain" }, + body: "Server hasn't implemented this yet", + }; + } + } + } + createHandler() { + // eslint-disable-next-line @typescript-eslint/no-this-alias + return async (event, context) => { + return this.grafservResponseToLambda(await this.processLambdaRequest(event, context, this.lambdaRequestToGrafserv(event, context))); + }; + } + processLambdaRequest(_event, _context, request) { + return this.processRequest(request); + } +} +exports.LambdaGrafserv = LambdaGrafserv; +/** @experimental */ +function grafserv(config) { + return new LambdaGrafserv(config); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/lambda/v1/index.js.map b/grafast/grafserv/dist/servers/lambda/v1/index.js.map new file mode 100644 index 0000000000..75d64f0edc --- /dev/null +++ b/grafast/grafserv/dist/servers/lambda/v1/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/servers/lambda/v1/index.ts"],"names":[],"mappings":";;;AA+HA,4BAEC;AA1HD,mDAAqD;AAMrD,gDAAmD;AAWnD,oBAAoB;AACpB,MAAa,cAAe,SAAQ,sBAAY;IACpC,uBAAuB,CAC/B,KAAsB,EACtB,OAAsB;QAEtB,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CACjD,4CAA4C,CAC7C,CAAC;QAEF,OAAO;YACL,gBAAgB,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,CAAC;YACzD,gBAAgB,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,CAAC;YACzD,QAAQ,EAAE,KAAK,EAAE,2CAA2C;YAC5D,MAAM,EAAE,KAAK,CAAC,UAAU;YACxB,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAA,yBAAc,EAAC,KAAK,CAAC,iBAAiB,CAAC;YAChD,cAAc;gBACZ,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC,MAAM,CACtD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAC7B,CACwB,CAAC;YAC9B,CAAC;YACD,OAAO;gBACL,OAAO;oBACL,I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AC,QAAQ,CAAC,CAAC;gBACtB,OAAO;oBACL,UAAU,EAAE,GAAG;oBACf,OAAO,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE;oBACzC,IAAI,EAAE,oCAAoC;iBAC3C,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,aAAa;QACX,4DAA4D;QAC5D,OAAO,KAAK,EACV,KAAsB,EACtB,OAAsB,EACU,EAAE;YAClC,OAAO,IAAI,CAAC,wBAAwB,CAClC,MAAM,IAAI,CAAC,oBAAoB,CAC7B,KAAK,EACL,OAAO,EACP,IAAI,CAAC,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,CAC7C,CACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;IAES,oBAAoB,CAC5B,MAAuB,EACvB,QAAuB,EACvB,OAAsB;QAEtB,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;CACF;AAnGD,wCAmGC;AAED,oBAAoB;AACpB,SAAgB,QAAQ,CAAC,MAAsB;IAC7C,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/node/index.d.ts b/grafast/grafserv/dist/servers/node/index.d.ts new file mode 100644 index 0000000000..8237476b24 --- /dev/null +++ b/grafast/grafserv/dist/servers/node/index.d.ts @@ -0,0 +1,59 @@ +import type { IncomingHttpHeaders, IncomingMessage, Server as HTTPServer, ServerResponse } from "node:http"; +import type { Server as HTTPSServer } from "node:https"; +import type { Duplex } from "node:stream"; +import type WebSocket from "ws"; +import { GrafservBase } from "../../core/base.js"; +import type { GrafservConfig, RequestDigest } from "../../interfaces.js"; +import type { OptionsFromConfig } from "../../options.js"; +declare global { + namespace Grafast { + interface RequestContext { + node: { + readonly req: IncomingMessage; + readonly res: ServerResponse; + }; + ws: { + /** + * The actual socket connection between the server and the client. + */ + readonly socket: WebSocket | undefined; + /** + * The initial HTTP upgrade request before the actual + * socket and connection is established. + */ + readonly request: IncomingMessage | undefined; + /** The parameters passed during the connection initialisation. */ + readonly connectionParams: Record | undefined; + /** + * As `connectionParams`, but with lower case keys to avoid case sensitivity issues. The actual transforms are: + * + * - Non-string keys are ignored + * - Keys are lowercased + * - Array values are confirmed to be string[], otherwise they're ignored + * - Other values are coerced to string if appropriate, otherwise ignored + * - Ignored values are not added to headers + * - If duplicate keys are found, the resulting value will be string[] + * by concatenating existing and new values + */ + readonly normalizedConnectionParams: IncomingHttpHeaders | undefined; + }; + } + } +} +export declare class NodeGrafservBase extends GrafservBase { + constructor(config: GrafservConfig); + protected getDigest(dynamicOptions: OptionsFromConfig, req: IncomingMessage, res: ServerResponse, isHTTPS: boolean): RequestDigest; + /** + * @deprecated Please user serv.addTo instead, so that websockets can be automatically supported + */ + createHandler(isHTTPS?: boolean): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void; + protected _createHandler(isHTTPS?: boolean): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void; + getUpgradeHandler(): Promise<((req: IncomingMessage, socket: Duplex, head: Buffer) => void) | null>; + shouldHandleUpgrade(req: IncomingMessage, _socket: Duplex, _head: Buffer): boolean; +} +export declare class NodeGrafserv extends NodeGrafservBase { + addTo(server: HTTPServer | HTTPSServer, addExclusiveWebsocketHandler?: boolean): Promise; +} +export declare function grafserv(config: GrafservConfig): NodeGrafserv; +export declare function makeNodeUpgradeHandler(instance: GrafservBase): Promise<(req: IncomingMessage, socket: Duplex, head: Buffer) => void>; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/node/index.d.ts.map b/grafast/grafserv/dist/servers/node/index.d.ts.map new file mode 100644 index 0000000000..9bc3c5745f --- /dev/null +++ b/grafast/grafserv/dist/servers/node/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/servers/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mB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ACd,CACD,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,KACzB,IAAI;IAIT,SAAS,CAAC,cAAc,CACtB,OAAO,UAAQ,GACd,CACD,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,KACzB,IAAI;IA2JH,iBAAiB,mBAwEC,eAAe,UAAU,MAAM,QAAQ,MAAM;IAjErE,mBAAmB,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAiBzE;AAED,qBAAa,YAAa,SAAQ,gBAAgB;IAC1C,KAAK,CACT,MAAM,EAAE,UAAU,GAAG,WAAW,EAChC,4BAA4B,UAAO;CA+BtC;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,gBAE9C;AAED,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,iBAMzC,eAAe,UAAU,MAAM,QAAQ,MAAM,WAgDtE"} \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/node/index.js b/grafast/grafserv/dist/servers/node/index.js new file mode 100644 index 0000000000..33413b734b --- /dev/null +++ b/grafast/grafserv/dist/servers/node/index.js @@ -0,0 +1,307 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NodeGrafserv = exports.NodeGrafservBase = void 0; +exports.grafserv = grafserv; +exports.makeNodeUpgradeHandler = makeNodeUpgradeHandler; +const node_querystring_1 = require("node:querystring"); +const grafast_1 = require("grafast"); +const graphql_ws_1 = require("graphql-ws"); +const base_js_1 = require("../../core/base.js"); +const utils_js_1 = require("../../utils.js"); +class NodeGrafservBase extends base_js_1.GrafservBase { + constructor(config) { + super(config); + } + getDigest(dynamicOptions, req, res, isHTTPS) { + const reqUrl = req.url; + const qi = reqUrl.indexOf("?"); + const path = qi >= 0 ? reqUrl.substring(0, qi) : reqUrl; + const search = qi >= 0 ? reqUrl.substring(qi + 1) : null; + return { + httpVersionMajor: req.httpVersionMajor, + httpVersionMinor: req.httpVersionMinor, + isSecure: isHTTPS, + method: req.method, + path, + headers: (0, utils_js_1.processHeaders)(req.headers), + getQueryParams() { + const queryParams = search + ? (0, node_querystring_1.parse)(search) + : Object.create(null); + return queryParams; + }, + getBody() { + return (0, utils_js_1.getBodyFromRequest)(req, dynamicOptions.maxRequestLength); + }, + requestContext: { + node: { + req, + res, + }, + }, + }; + } + /** + * @deprecated Please user serv.addTo instead, so that websockets can be automatically supported + */ + createHandler(isHTTPS = false) { + return this._createHandler(isHTTPS); + } + _createHandler(isHTTPS = false) { + const dynamicOptions = this.dynamicOptions; + return async (req, res, next) => { + try { + const request = this.getDigest(dynamicOptions, req, res, isHTTPS); + const result = await this.processRequest(request); + if (result === null) { + if (typeof next === "function") { + return next(); + } + else { + const payload = Buffer.from(`Could not process ${req.method} request to ${req.url} ─ please POST requests to ${dynamicOptions.graphqlPath}`, "utf8"); + res.writeHead(404, { + "Content-Type": "text/plain; charset=utf-8", + "Content-Length": payload.length, + }); + res.end(payload); + return; + } + } + switch (result.type) { + case "error": { + // TODO: return error in the format the browser would prefer (JSON, HTML, text) + // TODO: respect result.headers + if (result.error instanceof grafast_1.SafeError) { + const payload = Buffer.from(result.error.message, "utf8"); + res.writeHead(result.statusCode, { + "Content-Type": "text/plain; charset=utf-8", + "Content-Length": payload.length, + }); + res.end(payload); + return; + } + else if (typeof next === "function") { + return next(result.error); + } + else { + // TODO: catch all the code paths that lead here! + console.error(result.error); + const payload = Buffer.from("An error occurred", "utf8"); + res.writeHead(result.statusCode, { + "Content-Type": "text/plain; charset=utf-8", + "Content-Length": payload.length, + }); + res.end(payload); + return; + } + } + case "buffer": { + const { statusCode, headers, buffer } = result; + res.writeHead(statusCode, headers); + res.end(buffer); + return; + } + case "json": { + const { statusCode, headers, json } = result; + const buffer = Buffer.from(JSON.stringify(json), "utf8"); + headers["Content-Length"] = String(buffer.length); + res.writeHead(statusCode, headers); + res.end(buffer); + return; + } + case "noContent": { + const { statusCode, headers } = result; + res.writeHead(statusCode, headers); + res.end(); + return; + } + case "bufferStream": { + const { statusCode, headers, lowLatency, bufferIterator } = result; + if (lowLatency) { + req.socket.setTimeout(0); + req.socket.setNoDelay(true); + req.socket.setKeepAlive(true); + } + res.writeHead(statusCode, headers); + // Clean up when connection closes. + const cleanup = () => { + try { + bufferIterator.return?.(); + } + catch { + /* nom nom nom */ + } + req.removeListener("close", cleanup); + req.removeListener("finish", cleanup); + req.removeListener("error", cleanup); + }; + req.on("close", cleanup); + req.on("finish", cleanup); + req.on("error", cleanup); + // https://github.com/expressjs/compression#server-sent-events + const flush = lowLatency + ? typeof res.flush === "function" + ? res.flush.bind(res) + : typeof res.flushHeaders === "function" + ? res.flushHeaders.bind(res) + : null + : null; + try { + for await (const buffer of bufferIterator) { + const bufferIsBelowWatermark = res.write(buffer); + if (flush) { + flush(); + } + if (!bufferIsBelowWatermark) { + // Wait for drain before pumping more data through + await new Promise((resolve) => res.once("drain", resolve)); + } + } + } + catch (e) { + console.error(`Error occurred during stream; swallowing error.`, e); + } + finally { + res.end(); + } + return; + } + default: { + const never = result; + console.log("Unhandled:"); + console.dir(never); + const payload = Buffer.from("Server hasn't implemented this yet", "utf8"); + res.writeHead(501, { "Content-Length": payload.length }); + res.end(payload); + return; + } + } + } + catch (e) { + console.error("Unexpected error occurred:"); + console.error(e); + if (typeof next === "function") { + next(e); + } + else { + const text = "Unknown error occurred"; + res.writeHead(500, { + "Content-Type": "text/plain", + "Content-Length": text.length, + }); + res.end(text); + } + } + }; + } + async getUpgradeHandler() { + if (this.resolvedPreset.grafserv?.websockets) { + return makeNodeUpgradeHandler(this); + } + else { + return null; + } + } + shouldHandleUpgrade(req, _socket, _head) { + const fullUrl = req.url; + if (!fullUrl) { + return false; + } + const q = fullUrl.indexOf("?"); + const url = q >= 0 ? fullUrl.substring(0, q) : fullUrl; + const graphqlPath = this.dynamicOptions.graphqlPath; + return url === graphqlPath; + /* + const protocol = req.headers["sec-websocket-protocol"]; + const protocols = Array.isArray(protocol) + ? protocol + : protocol?.split(",").map((p) => p.trim()) ?? []; + if (protocols.includes(GRAPHQL_TRANSPORT_WS_PROTOCOL)) ... + */ + } +} +exports.NodeGrafservBase = NodeGrafservBase; +class NodeGrafserv extends NodeGrafservBase { + async addTo(server, addExclusiveWebsocketHandler = true) { + const handler = this._createHandler(); + server.on("request", handler); + this.onRelease(() => { + server.off("request", handler); + }); + // Alias this just to make it easier for users to copy/paste the code below + // eslint-disable-next-line @typescript-eslint/no-this-alias + const serv = this; + if (addExclusiveWebsocketHandler) { + const grafservUpgradeHandler = await serv.getUpgradeHandler(); + if (grafservUpgradeHandler) { + const upgrade = (req, socket, head) => { + if (serv.shouldHandleUpgrade(req, socket, head)) { + grafservUpgradeHandler(req, socket, head); + } + else { + socket.destroy(); + } + }; + server.on("upgrade", upgrade); + serv.onRelease(() => { + server.off("upgrade", upgrade); + }); + } + } + } +} +exports.NodeGrafserv = NodeGrafserv; +function grafserv(config) { + return new NodeGrafserv(config); +} +async function makeNodeUpgradeHandler(instance) { + const ws = await import("ws"); + const { WebSocketServer } = ws; + const graphqlWsServer = (0, graphql_ws_1.makeServer)((0, utils_js_1.makeGraphQLWSConfig)(instance)); + const wsServer = new WebSocketServer({ noServer: true }); + const onUpgrade = (req, socket, head) => { + wsServer.handleUpgrade(req, socket, head, function done(ws) { + wsServer.emit("connection", ws, req); + }); + }; + const onConnection = (socket, request) => { + // a new socket opened, let graphql-ws take over + const closed = graphqlWsServer.opened({ + protocol: socket.protocol, // will be validated + send: (data) => new Promise((resolve, reject) => { + socket.send(data, (err) => (err ? reject(err) : resolve())); + }), // control your data flow by timing the promise resolve + close: (code, reason) => socket.close(code, reason), // there are protocol standard closures + onMessage: (cb) => socket.on("message", async (event) => { + try { + // wait for the the operation to complete + // - if init message, waits for connect + // - if query/mutation, waits for result + // - if subscription, waits for complete + await cb(event.toString()); + } + catch (err) { + try { + // all errors that could be thrown during the + // execution of operations will be caught here + socket.close(graphql_ws_1.CloseCode.InternalServerError, err.message); + } + catch { + /*noop*/ + } + } + }), + }, + // pass values to the `extra` field in the context + { socket, request }); + // notify server that the socket closed + socket.once("close", closed); + }; + wsServer.on("connection", onConnection); + instance.onRelease(() => { + wsServer.off("connection", onConnection); + wsServer.close(); + }); + return onUpgrade; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/servers/node/index.js.map b/grafast/grafserv/dist/servers/node/index.js.map new file mode 100644 index 0000000000..f2b183f88a --- /dev/null +++ b/grafast/grafserv/dist/servers/node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/servers/node/index.ts"],"names":[],"mappings":";;;AAkVA,4BAEC;AAED,wDAsDC;AArYD,uDAA6D;AAG7D,qCAAoC;AACpC,2CAAmD;AAGnD,gDAAkD;AAGlD,6CAIwB;AAyCxB,MAAa,gBAAiB,SAAQ,sBAAY;IAChD,YAAY,MAAsB;QAChC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAES,SAAS,CACjB,cAAiC,EACjC,GAAoB,EACpB,GAAmB,EACnB,OAAgB;QAEhB,MAAM,MAAM,GAAG,GAAG,CAAC,GAAI,CAAC;QACxB,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACxD,MAAM,MAAM,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACzD,OAAO;YACL,gBAAgB,EAAE,GAAG,CAAC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6C;wBAC7C,8CAA8C;wBAC9C,MAAM,CAAC,KAAK,CAAC,sBAAS,CAAC,mBAAmB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;oBAC3D,CAAC;oBAAC,MAAM,CAAC;wBACP,QAAQ;oBACV,CAAC;gBACH,CAAC;YACH,CAAC,CAAC;SACL;QACD,kDAAkD;QAClD,EAAE,MAAM,EAAE,OAAO,EAAE,CACpB,CAAC;QAEF,uCAAuC;QACvC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;IACF,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAExC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE;QACtB,QAAQ,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QACzC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/utils.d.ts b/grafast/grafserv/dist/utils.d.ts new file mode 100644 index 0000000000..1a48f1b443 --- /dev/null +++ b/grafast/grafserv/dist/utils.d.ts @@ -0,0 +1,33 @@ +import type { Readable } from "node:stream"; +import { SafeError } from "grafast"; +import type { FormattedExecutionPatchResult, FormattedExecutionResult } from "grafast/graphql"; +import type { ServerOptions, SubscribePayload } from "graphql-ws"; +import type { GrafservBase } from "./index.js"; +import type { GrafservBody, JSONValue, NormalizedRequestDigest, ParsedGraphQLBody, RequestDigest } from "./interfaces.js"; +export declare const sleep: (ms: number) => { + promise: Promise; + release(): void; +}; +export declare function handleErrors(payload: FormattedExecutionResult | FormattedExecutionPatchResult): void; +type IncomingHttpHeaders = Record; +export declare function processHeaders(headers: IncomingHttpHeaders): Record; +export declare function getBodyFromRequest(req: Readable, maxLength: number): Promise; +/** + * Using this is a hack, it sniffs the data and tries to determine the type. + * Really you should ask your framework of choice what type of data it has given + * you. + */ +export declare function getBodyFromFrameworkBody(body: unknown): GrafservBody; +export declare function memo(fn: () => T): () => T; +export declare function normalizeRequest(request: RequestDigest | NormalizedRequestDigest): NormalizedRequestDigest; +export declare function httpError(statusCode: number, message: string): SafeError; +export declare function normalizeConnectionParams(connectionParams: Record | undefined): IncomingHttpHeaders | undefined; +export declare function makeGraphQLWSConfig(instance: GrafservBase): ServerOptions; +export declare function parseGraphQLJSONBody(params: JSONValue | (SubscribePayload & { + id?: string; + documentId?: string; +})): ParsedGraphQLBody; +export declare function concatBufferIterator(bufferIterator: AsyncGenerator): Promise>; +export declare function noop(): void; +export {}; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/utils.d.ts.map b/grafast/grafserv/dist/utils.d.ts.map new file mode 100644 index 0000000000..4844a2b38d --- /dev/null +++ b/grafast/grafserv/dist/utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAY,SAAS,EAAa,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAEV,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,uBAAuB,EAEvB,iBAAiB,EACjB,aAAa,EACd,MAAM,iBAAiB,CAAC;AAMzB,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM;;;CAU/B,CAAC;AAGF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,wBAAwB,GAAG,6BAA6B,GAChE,IAAI,CA0BN;AAGD,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAEzE,wBAAgB,cAAc,CAC5B,OAAO,EAAE,mBAAmB,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcxB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,CAAC,CAqBvB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAqBpE;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAY5C;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,GAAG,uBAAuB,GAC/C,uBAAuB,CAoBzB;AAED,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAExE;AAmBD,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACpD,mBAAmB,GAAG,SAAS,CAkCjC;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,aAAa,CAmGzE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,GAAG,CAAC,gBAAgB,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC5E,iBAAiB,CAqBnB;AAED,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,cAAc,CAAC,MAAM,CAAC,gCAOvC;AAED,wBAAgB,IAAI,IAAI,IAAI,CAAG"} \ No newline at end of file diff --git a/grafast/grafserv/dist/utils.js b/grafast/grafserv/dist/utils.js new file mode 100644 index 0000000000..a080303550 --- /dev/null +++ b/grafast/grafserv/dist/utils.js @@ -0,0 +1,320 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sleep = void 0; +exports.handleErrors = handleErrors; +exports.processHeaders = processHeaders; +exports.getBodyFromRequest = getBodyFromRequest; +exports.getBodyFromFrameworkBody = getBodyFromFrameworkBody; +exports.memo = memo; +exports.normalizeRequest = normalizeRequest; +exports.httpError = httpError; +exports.normalizeConnectionParams = normalizeConnectionParams; +exports.makeGraphQLWSConfig = makeGraphQLWSConfig; +exports.parseGraphQLJSONBody = parseGraphQLJSONBody; +exports.concatBufferIterator = concatBufferIterator; +exports.noop = noop; +const tslib_1 = require("tslib"); +const grafast_1 = require("grafast"); +const graphql = tslib_1.__importStar(require("grafast/graphql")); +const interfaces_js_1 = require("./interfaces.js"); +const graphql_js_1 = require("./middleware/graphql.js"); +const { GraphQLError } = graphql; +const sleep = (ms) => { + let _timeout; + return { + promise: new Promise((resolve) => void (_timeout = setTimeout(resolve, ms))), + release() { + clearTimeout(_timeout); + }, + }; +}; +exports.sleep = sleep; +// TODO: remove this ANSI-removal hack! +function handleErrors(payload) { + if (payload.errors !== undefined) { + payload.errors = payload.errors.map((e) => { + const obj = e instanceof GraphQLError + ? e.toJSON() + : { message: e.message, ...e }; + return { + ...obj, + message: (0, grafast_1.stripAnsi)(obj.message), + ...(e instanceof GraphQLError + ? { + extensions: { + ...e.extensions, + ...(typeof e.extensions.stack === "string" + ? { stack: (0, grafast_1.stripAnsi)(e.extensions.stack) } + : null), + ...(typeof e.extensions.cause === "string" + ? { cause: (0, grafast_1.stripAnsi)(e.extensions.cause) } + : null), + }, + } + : null), + }; + }); + } +} +function processHeaders(headers) { + const headerDigest = Object.create(null); + for (const key in headers) { + const val = headers[key]; + if (val == null) { + continue; + } + if (typeof val === "string") { + headerDigest[key] = val; + } + else { + headerDigest[key] = val.join("\n"); + } + } + return headerDigest; +} +function getBodyFromRequest(req /* IncomingMessage */, maxLength) { + return new Promise((resolve, reject) => { + const chunks = []; + let len = 0; + const handleData = (chunk) => { + chunks.push(chunk); + len += chunk.length; + if (len > maxLength) { + req.off("end", done); + req.off("error", reject); + req.off("data", handleData); + reject(httpError(413, "Too much data")); + } + }; + const done = () => { + resolve({ type: "buffer", buffer: Buffer.concat(chunks) }); + }; + req.on("end", done); + req.on("error", reject); + req.on("data", handleData); + }); +} +/** + * Using this is a hack, it sniffs the data and tries to determine the type. + * Really you should ask your framework of choice what type of data it has given + * you. + */ +function getBodyFromFrameworkBody(body) { + if (typeof body === "string") { + return { + type: "text", + text: body, + }; + } + else if (Buffer.isBuffer(body)) { + return { + type: "buffer", + buffer: body, + }; + } + else if (typeof body === "object" && body != null) { + return { + type: "json", + json: body, + }; + } + else { + throw new Error(`Grafserv adaptor doesn't know how to interpret this request body`); + } +} +function memo(fn) { + let cache; + let called = false; + return function memoized() { + if (called) { + return cache; + } + else { + called = true; + cache = fn.call(this); + return cache; + } + }; +} +function normalizeRequest(request) { + if (!request[interfaces_js_1.$$normalizedHeaders]) { + const r = request; + const normalized = Object.create(null); + for (const key in r.headers) { + normalized[key.toLowerCase()] = r.headers[key]; + } + r[interfaces_js_1.$$normalizedHeaders] = normalized; + r.preferJSON = Boolean(r.preferJSON); + r.getHeader = (key) => normalized[key.toLowerCase()]; + r.getBody = memo(r.getBody); + r.getQueryParams = memo(r.getQueryParams); + if (r.method === "HEAD") { + // Pretend that 'HEAD' requests are actually 'GET' requests; Node will + // take care of stripping the response body for us. + r.method = "GET"; + } + } + return request; +} +function httpError(statusCode, message) { + return new grafast_1.SafeError(message, { statusCode }); +} +function coerceHeaderValue(rawValue) { + if (rawValue == null) + return undefined; + if (typeof rawValue === "string") + return rawValue; + if (typeof rawValue === "number") + return String(rawValue); + if (typeof rawValue === "boolean") + return String(rawValue); + if (Array.isArray(rawValue) && rawValue.every((v) => typeof v === "string")) { + return rawValue; + } + // Strip unsupported values + return undefined; +} +function normalizeConnectionParams(connectionParams) { + if (typeof connectionParams !== "object" || + connectionParams === null || + Array.isArray(connectionParams)) { + return undefined; + } + const headers = Object.create(null); + for (const [rawKey, rawValue] of Object.entries(connectionParams)) { + if (typeof rawKey !== "string") + continue; + const key = rawKey.toLowerCase(); + const value = coerceHeaderValue(rawValue); + if (value == null) + continue; + if (headers[key] != null) { + const prev = headers[key]; + if (Array.isArray(prev)) { + if (Array.isArray(value)) { + headers[key] = [...prev, ...value]; + } + else { + headers[key] = [...prev, value]; + } + } + else { + if (Array.isArray(value)) { + headers[key] = [prev, ...value]; + } + else { + headers[key] = [prev, value]; + } + } + } + else { + headers[key] = value; + } + } + return headers; +} +function makeGraphQLWSConfig(instance) { + async function onSubscribeWithEvent({ ctx, message }) { + try { + const grafastCtx = { + ws: { + request: ctx.extra.request, + socket: ctx.extra.socket, + connectionParams: ctx.connectionParams, + normalizedConnectionParams: normalizeConnectionParams(ctx.connectionParams), + }, + }; + const { grafastMiddleware } = instance; + const { schema, parseAndValidate, resolvedPreset, execute, subscribe, contextValue, } = await instance.getExecutionConfig(grafastCtx); + const parsedBody = parseGraphQLJSONBody(message.payload); + if (instance.middleware) { + await instance.middleware.run("processGraphQLRequestBody", { + resolvedPreset, + body: parsedBody, + graphqlWsContext: ctx, + }, noop); + } + const { query, operationName, variableValues } = (0, graphql_js_1.validateGraphQLBody)(parsedBody); + const { errors, document } = parseAndValidate(query); + if (errors !== undefined) { + return errors; + } + const args = { + execute, + subscribe, + schema, + document, + rootValue: null, + contextValue, + variableValues, + operationName, + resolvedPreset, + requestContext: grafastCtx, + middleware: grafastMiddleware, + }; + await (0, grafast_1.hookArgs)(args); + return args; + } + catch (e) { + return [ + new GraphQLError(e.message, null, undefined, undefined, undefined, e, undefined), + ]; + } + } + return { + onSubscribe(ctx, message) { + const event = { + resolvedPreset: instance.resolvedPreset, + ctx, + message, + }; + return instance.middleware != null + ? instance.middleware.run("onSubscribe", event, onSubscribeWithEvent) + : onSubscribeWithEvent(event); + }, + // TODO: validate that this actually does mask every error + // @ts-expect-error See: https://github.com/enisdenjo/graphql-ws/pull/599 + onError(_ctx, _message, errors) { + return errors.map(instance.dynamicOptions.maskError); + }, + async execute(args) { + const eargs = args; + return eargs.execute(eargs); + }, + async subscribe(args) { + const eargs = args; + return eargs.subscribe(eargs); + }, + }; +} +function parseGraphQLJSONBody(params) { + if (!params) { + throw httpError(400, "No body"); + } + if (typeof params !== "object" || Array.isArray(params)) { + throw httpError(400, "Invalid body; expected object"); + } + const id = params.id; + const documentId = params.documentId; + const query = params.query; + const operationName = params.operationName ?? undefined; + const variableValues = params.variables ?? undefined; + const extensions = params.extensions ?? undefined; + return { + id, + documentId, + query, + operationName, + variableValues, + extensions, + }; +} +async function concatBufferIterator(bufferIterator) { + const buffers = []; + for await (const buffer of bufferIterator) { + buffers.push(buffer); + } + return Buffer.concat(buffers); +} +function noop() { } +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/utils.js.map b/grafast/grafserv/dist/utils.js.map new file mode 100644 index 0000000000..5f01f3c598 --- /dev/null +++ b/grafast/grafserv/dist/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAwCA,oCA4BC;AAKD,wCAgBC;AAED,gDAwBC;AAOD,4DAqBC;AAED,oBAYC;AAED,4CAsBC;AAED,8BAEC;AAmBD,8DAoCC;AAED,kDAmGC;AAED,oDAuBC;AAED,oDAQC;AAED,oBAA+B;;AAvX/B,qCAAyD;AAMzD,iEAA2C;AAa3C,mDAAsD;AACtD,wDAA8D;AAE9D,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;AAE1B,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE;IAClC,IAAI,QAAwB,CAAC;IAC7B,OAAO;QACL,OAAO,EAAE,IAAI,OAAO,CAClB,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CACvD;QACD,OAAO;YACL,YAAY,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;KAC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AE,CAAC;IACnB,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED,SAAgB,IAAI,KAAU,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/version.d.ts b/grafast/grafserv/dist/version.d.ts new file mode 100644 index 0000000000..3dd433f8ce --- /dev/null +++ b/grafast/grafserv/dist/version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "0.1.1-beta.24"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/grafast/grafserv/dist/version.d.ts.map b/grafast/grafserv/dist/version.d.ts.map new file mode 100644 index 0000000000..1f99446fca --- /dev/null +++ b/grafast/grafserv/dist/version.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,kBAAkB,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/dist/version.js b/grafast/grafserv/dist/version.js new file mode 100644 index 0000000000..c2064a8fb2 --- /dev/null +++ b/grafast/grafserv/dist/version.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.version = void 0; +// This file is autogenerated by /scripts/postversion.mjs +exports.version = "0.1.1-beta.24"; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/grafast/grafserv/dist/version.js.map b/grafast/grafserv/dist/version.js.map new file mode 100644 index 0000000000..5170c4e6f8 --- /dev/null +++ b/grafast/grafserv/dist/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAC5C,QAAA,OAAO,GAAG,eAAe,CAAC"} \ No newline at end of file diff --git a/grafast/grafserv/tsconfig.tsbuildinfo b/grafast/grafserv/tsconfig.tsbuildinfo new file mode 100644 index 0000000000..d6e974e5dd --- /dev/null +++ b/grafast/grafserv/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../utils/lru/dist/index.d.ts","./src/accept.ts","../grafast/dist/therecanbeonlyone.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../grafast/dist/constraints.d.ts","../grafast/dist/bucket.d.ts","../grafast/dist/steps/__item.d.ts","../grafast/dist/steps/__flag.d.ts","../grafast/dist/steps/access.d.ts","../grafast/dist/steps/__value.d.ts","../grafast/dist/steps/listtransform.d.ts","../grafast/dist/steps/connection.d.ts","../grafast/dist/steps/constant.d.ts","../grafast/dist/steps/each.d.ts","../grafast/dist/steps/error.d.ts","../grafast/dist/steps/filter.d.ts","../grafast/dist/steps/first.d.ts","../grafast/dist/steps/groupby.d.ts","../grafast/dist/multistep.d.ts","../grafast/dist/steps/lambda.d.ts","../grafast/dist/steps/last.d.ts","../grafast/dist/steps/list.d.ts","../grafast/dist/steps/listen.d.ts","../grafast/dist/steps/node.d.ts","../grafast/dist/steps/partitionbyindex.d.ts","../grafast/dist/steps/remapkeys.d.ts","../grafast/dist/steps/reverse.d.ts","../grafast/dist/steps/applyinput.d.ts","../grafast/dist/steps/setter.d.ts","../grafast/dist/steps/sideeffect.d.ts","../grafast/dist/steps/__inputlist.d.ts","../grafast/dist/steps/__inputobject.d.ts","../grafast/dist/steps/__inputstaticleaf.d.ts","../grafast/dist/steps/__trackedvalue.d.ts","../grafast/dist/steps/applytransforms.d.ts","../grafast/dist/steps/bakedinput.d.ts","../grafast/dist/steps/condition.d.ts","../grafast/dist/steps/graphqlresolver.d.ts","../grafast/dist/steps/load.d.ts","../grafast/dist/steps/polymorphicbranch.d.ts","../grafast/dist/steps/proxy.d.ts","../grafast/dist/steps/index.d.ts","../grafast/dist/graphqlcollectfields.d.ts","../grafast/dist/engine/executeoutputplan.d.ts","../grafast/dist/engine/outputplan.d.ts","../grafast/dist/engine/operationplan.d.ts","../grafast/dist/step.d.ts","../grafast/dist/engine/layerplan.d.ts","../grafast/dist/error.d.ts","../grafast/dist/steps/__inputdefault.d.ts","../grafast/dist/steps/__inputdynamicscalar.d.ts","../grafast/dist/deferred.d.ts","../grafast/dist/utils.d.ts","../grafast/dist/planjsoninterfaces.d.ts","../grafast/dist/interfaces.d.ts","../grafast/dist/steps/object.d.ts","../grafast/dist/exportas.d.ts","../grafast/dist/grafastprint.d.ts","../grafast/dist/makegrafastschema.d.ts","../grafast/dist/dev.d.ts","../grafast/dist/engine/lib/defaultplanresolver.d.ts","../grafast/dist/engine/lib/withgloballayerplan.d.ts","../grafast/dist/execute.d.ts","../grafast/dist/grafastgraphql.d.ts","../grafast/dist/middleware.d.ts","../grafast/dist/operationplan-input.d.ts","../grafast/dist/polymorphic.d.ts","../grafast/dist/stringifypayload.d.ts","../grafast/dist/stripansi.d.ts","../grafast/dist/subscribe.d.ts","../../node_modules/iterall/index.d.ts","../grafast/dist/args.d.ts","../grafast/dist/version.d.ts","../grafast/dist/index.d.ts","./src/hooks.ts","../grafast/fwd/graphql/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@graphiql/react/types/editor/types.d.ts","../../node_modules/@graphiql/react/types/editor/header-editor.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","../../node_modules/@graphiql/react/types/editor/components/header-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/image-preview.d.ts","../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../node_modules/graphql-config/types.d.ts","../../node_modules/@graphql-tools/utils/schemavisitor.d.ts","../../node_modules/@graphql-tools/utils/interfaces.d.ts","../../node_modules/@graphql-tools/utils/loaders.d.ts","../../node_modules/@graphql-tools/utils/helpers.d.ts","../../node_modules/@graphql-tools/utils/debug-log.d.ts","../../node_modules/@graphql-tools/utils/fix-windows-path.d.ts","../../node_modules/@graphql-tools/utils/flatten-array.d.ts","../../node_modules/@graphql-tools/utils/get-directives.d.ts","../../node_modules/@graphql-tools/utils/get-fields-with-directives.d.ts","../../node_modules/@graphql-tools/utils/get-implementing-types.d.ts","../../node_modules/@graphql-tools/utils/types.d.ts","../../node_modules/@graphql-tools/utils/print-schema-with-directives.d.ts","../../node_modules/@graphql-tools/utils/validate-documents.d.ts","../../node_modules/@graphql-tools/utils/fix-schema-ast.d.ts","../../node_modules/@graphql-tools/utils/parse-graphql-json.d.ts","../../node_modules/@graphql-tools/utils/parse-graphql-sdl.d.ts","../../node_modules/@graphql-tools/utils/get-user-types-from-schema.d.ts","../../node_modules/@graphql-tools/utils/create-schema-definition.d.ts","../../node_modules/@graphql-tools/utils/build-operation-for-field.d.ts","../../node_modules/@graphql-tools/utils/filterschema.d.ts","../../node_modules/@graphql-tools/utils/clone.d.ts","../../node_modules/@graphql-tools/utils/heal.d.ts","../../node_modules/@graphql-tools/utils/schemadirectivevisitor.d.ts","../../node_modules/@graphql-tools/utils/visitschema.d.ts","../../node_modules/@graphql-tools/utils/getresolversfromschema.d.ts","../../node_modules/@graphql-tools/utils/foreachfield.d.ts","../../node_modules/@graphql-tools/utils/foreachdefaultvalue.d.ts","../../node_modules/@graphql-tools/utils/mapschema.d.ts","../../node_modules/@graphql-tools/utils/addtypes.d.ts","../../node_modules/@graphql-tools/utils/rewire.d.ts","../../node_modules/@graphql-tools/utils/prune.d.ts","../../node_modules/@graphql-tools/utils/mergedeep.d.ts","../../node_modules/@graphql-tools/utils/stub.d.ts","../../node_modules/@graphql-tools/utils/selectionsets.d.ts","../../node_modules/@graphql-tools/utils/getresponsekeyfrominfo.d.ts","../../node_modules/@graphql-tools/utils/fields.d.ts","../../node_modules/@graphql-tools/utils/renametype.d.ts","../../node_modules/@graphql-tools/utils/collectfields.d.ts","../../node_modules/@graphql-tools/utils/transforminputvalue.d.ts","../../node_modules/@graphql-tools/utils/mapasynciterator.d.ts","../../node_modules/@graphql-tools/utils/updateargument.d.ts","../../node_modules/@graphql-tools/utils/implementsabstracttype.d.ts","../../node_modules/@graphql-tools/utils/errors.d.ts","../../node_modules/@graphql-tools/utils/toconfig.d.ts","../../node_modules/@graphql-tools/utils/observabletoasynciterable.d.ts","../../node_modules/@graphql-tools/utils/visitresult.d.ts","../../node_modules/@graphql-tools/utils/getargumentvalues.d.ts","../../node_modules/@graphql-tools/utils/valuematchescriteria.d.ts","../../node_modules/@graphql-tools/utils/isasynciterable.d.ts","../../node_modules/@graphql-tools/utils/isdocumentnode.d.ts","../../node_modules/@graphql-tools/utils/astfromvalueuntyped.d.ts","../../node_modules/@graphql-tools/utils/executor.d.ts","../../node_modules/@graphql-tools/utils/withcancel.d.ts","../../node_modules/@graphql-tools/utils/index.d.ts","../../node_modules/@graphql-tools/load/load-typedefs.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/interfaces.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/loaders.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/helpers.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-fields-with-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-implementing-types.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/types.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/print-schema-with-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/validate-documents.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/fix-schema-ast.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/parse-graphql-json.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/parse-graphql-sdl.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-user-types-from-schema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/create-schema-definition.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/build-operation-for-field.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/filterschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/heal.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getresolversfromschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/foreachfield.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/foreachdefaultvalue.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mapschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/addtypes.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/rewire.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/prune.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mergedeep.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/stub.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/selectionsets.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getresponsekeyfrominfo.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/fields.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/renametype.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/transforminputvalue.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mapasynciterator.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/updateargument.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/implementsabstracttype.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/errors.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/observabletoasynciterable.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/visitresult.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getargumentvalues.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/valuematchescriteria.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/isasynciterable.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/isdocumentnode.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/astfromvalueuntyped.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/executor.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/withcancel.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/aggregateerror.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/roottypes.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/index.d.ts","../../node_modules/@graphql-tools/merge/merge-resolvers.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/arguments.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/utils.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-typedefs.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-nodes.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/comments.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/directives.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/enum-values.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/enum.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/fields.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/input-type.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/interface.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-named-type-array.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/scalar.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/type.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/union.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/index.d.ts","../../node_modules/@graphql-tools/merge/merge-schemas.d.ts","../../node_modules/@graphql-tools/merge/extensions.d.ts","../../node_modules/@graphql-tools/merge/index.d.ts","../../node_modules/@graphql-tools/load/schema.d.ts","../../node_modules/@graphql-tools/load/documents.d.ts","../../node_modules/@graphql-tools/load/filter-document-kind.d.ts","../../node_modules/@graphql-tools/load/index.d.ts","../../node_modules/graphql-config/helpers/utils.d.ts","../../node_modules/graphql-config/loaders.d.ts","../../node_modules/graphql-config/extension.d.ts","../../node_modules/graphql-config/project-config.d.ts","../../node_modules/graphql-config/config.d.ts","../../node_modules/graphql-config/errors.d.ts","../../node_modules/graphql-config/index.d.ts","../../node_modules/graphql-language-service/dist/parser/types.d.ts","../../node_modules/graphql-language-service/dist/parser/characterstream.d.ts","../../node_modules/graphql-language-service/dist/parser/rules.d.ts","../../node_modules/graphql-language-service/dist/parser/rulehelpers.d.ts","../../node_modules/graphql-language-service/dist/parser/onlineparser.d.ts","../../node_modules/graphql-language-service/dist/parser/api.d.ts","../../node_modules/graphql-language-service/dist/parser/gettypeinfo.d.ts","../../node_modules/graphql-language-service/dist/parser/index.d.ts","../../node_modules/graphql-language-service/dist/types.d.ts","../../node_modules/graphql-language-service/dist/interface/autocompleteutils.d.ts","../../node_modules/graphql-language-service/dist/interface/getautocompletesuggestions.d.ts","../../node_modules/graphql-language-service/dist/utils/fragmentdependencies.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/graphql-language-service/dist/utils/collectvariables.d.ts","../../node_modules/graphql-language-service/dist/utils/getvariablesjsonschema.d.ts","../../node_modules/graphql-language-service/dist/utils/getastnodeatposition.d.ts","../../node_modules/graphql-language-service/dist/utils/range.d.ts","../../node_modules/graphql-language-service/dist/utils/validatewithcustomrules.d.ts","../../node_modules/graphql-language-service/dist/utils/getoperationfacts.d.ts","../../node_modules/graphql-language-service/dist/utils/index.d.ts","../../node_modules/graphql-language-service/dist/interface/getdefinition.d.ts","../../node_modules/graphql-language-service/dist/interface/getdiagnostics.d.ts","../../node_modules/graphql-language-service/dist/interface/getoutline.d.ts","../../node_modules/graphql-language-service/dist/interface/gethoverinformation.d.ts","../../node_modules/graphql-language-service/dist/interface/index.d.ts","../../node_modules/graphql-language-service/dist/index.d.ts","../../node_modules/codemirror-graphql/utils/gettypeinfo.d.ts","../../node_modules/codemirror-graphql/utils/schemareference.d.ts","../../node_modules/graphql-ws/lib/common.d.ts","../../node_modules/graphql-ws/lib/client.d.ts","../../node_modules/graphql-ws/lib/server.d.ts","../../node_modules/graphql-ws/lib/index.d.ts","../../node_modules/@graphiql/toolkit/dist/esm/create-fetcher/types.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/async-helpers/index.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/create-fetcher/createfetcher.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/format/index.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/auto-complete.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/merge-ast.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/operation-name.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/base.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/query.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/history.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/custom.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/index.d.mts","../../node_modules/@graphiql/react/types/editor/hooks.d.ts","../../node_modules/@graphiql/react/types/editor/query-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/query-editor.d.ts","../../node_modules/@graphiql/react/types/editor/response-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/response-editor.d.ts","../../node_modules/@graphiql/react/types/editor/variable-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/variable-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/index.d.ts","../../node_modules/@graphiql/react/types/editor/tabs.d.ts","../../node_modules/@graphiql/react/types/editor/context.d.ts","../../node_modules/@graphiql/react/types/editor/index.d.ts","../../node_modules/@graphiql/react/types/execution.d.ts","../../node_modules/@graphiql/react/types/explorer/components/argument.d.ts","../../node_modules/@graphiql/react/types/explorer/context.d.ts","../../node_modules/@graphiql/react/types/explorer/components/default-value.d.ts","../../node_modules/@graphiql/react/types/explorer/components/deprecation-reason.d.ts","../../node_modules/@graphiql/react/types/explorer/components/directive.d.ts","../../node_modules/@graphiql/react/types/explorer/components/doc-explorer.d.ts","../../node_modules/@graphiql/react/types/explorer/components/field-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/field-link.d.ts","../../node_modules/@graphiql/react/types/explorer/components/schema-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/search.d.ts","../../node_modules/@graphiql/react/types/explorer/components/section.d.ts","../../node_modules/@graphiql/react/types/explorer/components/type-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/type-link.d.ts","../../node_modules/@graphiql/react/types/explorer/index.d.ts","../../node_modules/@graphiql/react/types/history/components.d.ts","../../node_modules/@graphiql/react/types/history/context.d.ts","../../node_modules/@graphiql/react/types/history/index.d.ts","../../node_modules/@graphiql/react/types/plugin.d.ts","../../node_modules/@graphiql/react/types/schema.d.ts","../../node_modules/@graphiql/react/types/storage.d.ts","../../node_modules/@graphiql/react/types/provider.d.ts","../../node_modules/@graphiql/react/types/theme.d.ts","../../node_modules/@graphiql/react/types/utility/resize.d.ts","../../node_modules/@graphiql/react/types/utility/is-macos.d.ts","../../node_modules/@graphiql/react/types/icons/index.d.ts","../../node_modules/@graphiql/react/types/ui/button.d.ts","../../node_modules/@graphiql/react/types/ui/button-group.d.ts","../../node_modules/@radix-ui/react-context/dist/index.d.ts","../../node_modules/@radix-ui/react-primitive/dist/index.d.ts","../../node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts","../../node_modules/@radix-ui/react-focus-scope/dist/index.d.ts","../../node_modules/@radix-ui/react-portal/dist/index.d.ts","../../node_modules/@radix-ui/react-dialog/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/dialog.d.ts","../../node_modules/@radix-ui/react-arrow/dist/index.d.ts","../../node_modules/@radix-ui/rect/dist/index.d.ts","../../node_modules/@radix-ui/react-popper/dist/index.d.ts","../../node_modules/@radix-ui/react-roving-focus/dist/index.d.ts","../../node_modules/@radix-ui/react-menu/dist/index.d.ts","../../node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/dropdown.d.ts","../../node_modules/@graphiql/react/types/ui/markdown.d.ts","../../node_modules/@graphiql/react/types/ui/spinner.d.ts","../../node_modules/@graphiql/react/types/ui/tabs.d.ts","../../node_modules/@radix-ui/react-tooltip/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/tooltip.d.ts","../../node_modules/@graphiql/react/types/ui/index.d.ts","../../node_modules/@graphiql/react/types/toolbar/button.d.ts","../../node_modules/@graphiql/react/types/toolbar/execute.d.ts","../../node_modules/@graphiql/react/types/toolbar/menu.d.ts","../../node_modules/@graphiql/react/types/toolbar/index.d.ts","../../node_modules/@graphiql/react/types/index.d.ts","../../node_modules/graphiql/dist/graphiql.d.ts","../../node_modules/graphiql/dist/index.d.ts","../ruru/dist/interfaces.d.ts","../ruru/dist/server.d.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/graphql-ws/lib/use/ws.d.ts","./src/utils.ts","./src/middleware/graphql.ts","./src/options.ts","./src/interfaces.ts","./src/mapiterator.ts","./src/middleware/graphiql.ts","./src/core/base.ts","./src/index.ts","./src/version.ts","../../node_modules/@whatwg-node/promise-helpers/typings/index.d.cts","../../node_modules/@envelop/types/typings/utils.d.cts","../../node_modules/@envelop/types/typings/graphql.d.cts","../../node_modules/@envelop/types/typings/hooks.d.cts","../../node_modules/@envelop/types/typings/plugin.d.cts","../../node_modules/@envelop/types/typings/get-enveloped.d.cts","../../node_modules/@envelop/types/typings/context-types.d.cts","../../node_modules/@envelop/types/typings/index.d.cts","../../node_modules/@envelop/instrumentation/typings/instrumentation.d.cts","../../node_modules/@envelop/instrumentation/typings/index.d.cts","../../node_modules/@envelop/core/typings/create.d.cts","../../node_modules/@envelop/core/typings/utils.d.cts","../../node_modules/@envelop/core/typings/plugins/use-envelop.d.cts","../../node_modules/@envelop/core/typings/plugins/use-logger.d.cts","../../node_modules/@envelop/core/typings/plugins/use-schema.d.cts","../../node_modules/@envelop/core/typings/plugins/use-masked-errors.d.cts","../../node_modules/@envelop/core/typings/plugins/use-error-handler.d.cts","../../node_modules/@envelop/core/typings/plugins/use-extend-context.d.cts","../../node_modules/@envelop/core/typings/plugins/use-payload-formatter.d.cts","../../node_modules/@envelop/core/typings/plugins/use-engine.d.cts","../../node_modules/@envelop/core/typings/plugins/use-validation-rule.d.cts","../../node_modules/@envelop/core/typings/document-string-map.d.cts","../../node_modules/@envelop/core/typings/index.d.cts","./src/envelop/index.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/ws/index.d.mts","./src/servers/node/index.ts","./src/servers/express/v4/index.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/error.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/type.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/enum.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/elements.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/properties.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/values.d.ts","../../node_modules/ajv/dist/vocabularies/jtd/index.d.ts","../../node_modules/ajv/dist/jtd.d.ts","../../node_modules/@fastify/ajv-compiler/types/index.d.ts","../../node_modules/@fastify/error/types/index.d.ts","../../node_modules/fast-json-stringify/types/index.d.ts","../../node_modules/@fastify/fast-json-stringify-compiler/types/index.d.ts","../../node_modules/find-my-way/index.d.ts","../../node_modules/light-my-request/types/index.d.ts","../../node_modules/fastify/types/utils.d.ts","../../node_modules/fastify/types/schema.d.ts","../../node_modules/fastify/types/type-provider.d.ts","../../node_modules/fastify/types/reply.d.ts","../../node_modules/fastify/node_modules/pino-std-serializers/index.d.ts","../../node_modules/fastify/node_modules/sonic-boom/types/index.d.ts","../../node_modules/fastify/node_modules/pino/pino.d.ts","../../node_modules/fastify/types/logger.d.ts","../../node_modules/fastify/types/plugin.d.ts","../../node_modules/fastify/types/register.d.ts","../../node_modules/fastify/types/instance.d.ts","../../node_modules/fastify/types/hooks.d.ts","../../node_modules/fastify/types/route.d.ts","../../node_modules/fastify/types/context.d.ts","../../node_modules/fastify/types/request.d.ts","../../node_modules/fastify/types/content-type-parser.d.ts","../../node_modules/fastify/types/errors.d.ts","../../node_modules/fastify/types/serverfactory.d.ts","../../node_modules/fastify/fastify.d.ts","../../node_modules/@fastify/websocket/types/index.d.ts","../../node_modules/graphql-ws/lib/use/@fastify/websocket.d.ts","./src/servers/fastify/v4/index.ts","../../node_modules/crossws/dist/shared/crossws.chijsjvk.d.mts","../../node_modules/crossws/dist/index.d.mts","../../node_modules/ufo/dist/index.d.ts","../../node_modules/cookie-es/dist/index.d.cts","../../node_modules/iron-webcrypto/dist/index.d.cts","../../node_modules/h3/dist/index.d.ts","./src/servers/h3/v1/index.ts","../../node_modules/hono/dist/types/router.d.ts","../../node_modules/hono/dist/types/utils/headers.d.ts","../../node_modules/hono/dist/types/utils/http-status.d.ts","../../node_modules/hono/dist/types/utils/types.d.ts","../../node_modules/hono/dist/types/types.d.ts","../../node_modules/hono/dist/types/utils/body.d.ts","../../node_modules/hono/dist/types/request.d.ts","../../node_modules/hono/dist/types/utils/mime.d.ts","../../node_modules/hono/dist/types/context.d.ts","../../node_modules/hono/dist/types/hono-base.d.ts","../../node_modules/hono/dist/types/hono.d.ts","../../node_modules/hono/dist/types/client/types.d.ts","../../node_modules/hono/dist/types/client/client.d.ts","../../node_modules/hono/dist/types/client/index.d.ts","../../node_modules/hono/dist/types/index.d.ts","../../node_modules/hono/dist/types/helper/websocket/index.d.ts","./src/servers/hono/v4/index.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","./src/servers/koa/v2/index.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","./src/servers/lambda/v1/index.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[526,570],[190,240,242,261,526,570],[193,232,526,570],[193,228,233,234,526,570],[228,234,242,526,570],[235,261,526,570],[190,192,230,232,235,240,242,261,526,570],[80,190,193,228,231,234,235,240,242,261,526,570],[242,526,570],[93,190,240,242,261,526,570],[193,526,570],[190,229,240,261,526,570],[80,82,88,190,206,228,229,233,234,236,239,240,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,526,570],[88,94,190,191,192,215,228,229,233,234,235,236,237,238,240,241,261,526,570],[190,228,234,240,242,261,526,570],[88,526,570],[228,234,526,570],[190,228,233,234,240,242,261,526,570],[190,229,233,235,240,242,261,526,570],[194,228,234,242,526,570],[221,228,234,242,526,570],[190,200,228,234,240,242,261,526,570],[190,200,228,234,240,261,526,570],[228,234,242,261,526,570],[190,192,195,196,197,228,234,240,242,261,526,570],[196,228,234,261,526,570],[195,228,234,242,526,570],[190,228,229,234,240,242,261,526,570],[198,228,234,242,526,570],[194,198,199,228,234,526,570],[199,228,234,242,526,570],[190,228,234,240,261,526,570],[198,199,228,234,526,570],[194,195,196,197,198,199,200,201,202,203,204,205,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,243,261,526,570],[206,228,234,242,526,570],[195,200,228,234,242,526,570],[194,199,228,234,242,261,526,570],[195,206,228,234,242,261,526,570],[190,207,228,234,240,242,261,526,570],[200,228,234,242,526,570],[215,261,526,570],[93,190,240,261,526,570],[190,228,233,234,239,240,242,261,526,570],[190,240,261,526,570],[79,80,526,570],[79,88,191,261,262,263,526,570,623,624,625,626,627,628],[79,88,190,240,261,526,570,631,654],[79,88,261,526,570],[79,88,261,263,520,526,570,623,624,625,626,629],[79,88,261,263,440,520,526,570,624,625,630],[79,526,570],[79,88,261,520,526,570,623,625,626],[79,80,81,261,263,526,570,575,597,623,626,630],[79,261,263,526,570,575,626],[79,526,570,585,587,602,623,625,626,666,668],[79,526,570,602,623,626,629,748,750],[79,440,526,570,602,626,630,753,757],[79,440,526,570,626,630,761,773,774],[79,526,570,585,587,602,623,625,626,629,668,783],[79,526,570,623,626,629,844],[79,261,440,526,570,585,587,597,602,621,623,625,626,629,667],[79,261,263,440,526,570,602,622,624,626,630],[520,526,570],[518,519,526,570],[526,570,846],[526,570,639],[526,570,639,641,642,643,644,645,646,647,648,649,650,651,652,653],[526,570,639,647],[526,570,639,643],[526,570,632,639],[526,570,640],[526,570,632],[526,570,633,636,637],[526,570,633,634,636],[526,570,633],[526,570,633,634,635,636,637,638],[526,570,633,635],[526,570,710,714,723],[526,570,726],[526,570,585,602,620,621,733,741,742,748],[270,271,526,570],[268,271,526,570],[272,273,455,457,459,526,570],[271,454,526,570],[271,456,526,570],[271,458,526,570],[190,240,261,267,269,271,434,461,526,570],[267,269,526,570],[268,269,436,452,526,570],[269,270,453,454,456,458,460,461,462,526,570],[190,240,261,267,269,436,453,526,570],[267,268,269,526,570],[269,452,462,526,570],[268,526,570],[267,269,436,526,570],[267,271,452,453,526,570],[190,240,261,271,526,570],[271,466,526,570],[271,526,570],[267,271,526,570],[190,240,261,267,526,570],[190,240,261,267,271,526,570],[465,466,467,468,469,470,471,472,473,474,475,476,477,526,570],[271,452,526,570],[267,271,452,526,570],[479,480,526,570],[267,526,570],[463,464,478,481,482,483,484,485,486,487,488,489,511,515,526,570],[271,463,464,466,481,482,483,484,526,570],[190,240,261,267,271,452,526,570],[512,513,514,526,570],[267,271,504,526,570],[267,497,526,570],[490,491,498,505,506,507,508,510,526,570],[267,509,526,570],[190,240,261,440,441,526,570],[190,240,261,440,526,570],[190,240,261,440,441,442,443,444,445,446,447,448,449,450,451,526,570],[448,526,570],[448,449,526,570],[329,330,526,570],[330,398,399,400,526,570],[329,526,570],[190,240,261,330,397,526,570],[378,394,395,396,526,570],[377,526,570],[190,240,261,377,381,526,570],[331,526,570],[190,240,261,331,526,570],[190,240,261,337,526,570],[190,240,261,377,526,570],[331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,526,570],[190,240,261,332,337,526,570],[102,190,240,261,526,570],[190,240,261,332,526,570],[190,240,261,394,526,570],[190,240,261,382,526,570],[190,240,261,381,526,570],[379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,526,570],[190,240,261,377,380,526,570],[190,240,261,277,526,570],[190,240,261,286,526,570],[276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,526,570],[190,240,261,276,526,570],[102,190,240,261,277,526,570],[102,190,240,261,278,286,526,570],[190,240,261,276,277,526,570],[190,240,261,278,526,570],[526,570,980],[526,570,948,983],[526,570,948],[526,570,948,949],[526,570,1005],[526,570,995,997],[526,570,995,997,998,999,1000,1001],[526,570,995,997,998],[526,570,995,997,998,999],[526,570,995,997,998,999,1000],[526,570,948,955],[526,570,948,958],[526,570,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009],[526,570,948,949,986,987],[526,570,948,949,986],[526,570,948,949,958],[526,570,948,949,958,969],[526,570,918],[267,493,526,570],[267,492,493,494,495,496,526,570],[267,492,493,503,526,570],[267,492,493,494,495,496,501,502,526,570],[267,492,493,499,500,526,570],[267,492,493,526,570],[267,492,493,494,496,501,526,570],[526,570,585,620],[526,570,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843],[526,570,787],[526,570,787,791],[526,570,785,787,789],[526,570,785,787],[526,570,787,793],[526,570,786,787],[526,570,798],[526,570,787,804,805,806],[526,570,787,808],[526,570,787,809,810,811,812,813,814,815,816,817,818,819,820,821],[526,570,787,790],[526,570,787,789],[526,570,787,798],[526,570,846,847,848,849,850],[526,570,846,848],[526,570,585,620,663],[526,570,576,620],[526,570,613,620,660],[526,570,585,620,663,777,778],[526,570,660,662,664],[526,570,856,884],[526,570,855,861],[526,570,866],[526,570,861],[526,570,860],[526,570,878],[526,570,874],[526,570,856,873,884],[526,570,855,856,857,858,859,860,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885],[526,570,887],[526,570,890,893],[421,526,570,890,892],[526,570,893],[421,526,570,889,890],[526,570,582,585,620,657,658,659],[526,570,658,660,662,664,665],[526,570,583,620,895,896],[526,570,582,583,620,898],[526,570,583,620],[526,570,901],[526,570,903,909],[526,570,904,905,906,907,908],[526,570,909],[526,570,582,585,587,590,602,613,620],[526,570,620],[526,570,913],[526,570,914],[526,570,920,923],[526,570,583,613,620],[526,570,575,620,887],[526,570,582,620],[526,570,783],[526,569,570,582,585,586,590,597,613,620,661,776,778,779,780,781,782],[526,570,932],[526,570,934,936,937,938,939,940,941,942,943,944,945,946],[526,570,934,935,937,938,939,940,941,942,943,944,945,946],[526,570,935,936,937,938,939,940,941,942,943,944,945,946],[526,570,934,935,936,938,939,940,941,942,943,944,945,946],[526,570,934,935,936,937,939,940,941,942,943,944,945,946],[526,570,934,935,936,937,938,940,941,942,943,944,945,946],[526,570,934,935,936,937,938,939,941,942,943,944,945,946],[526,570,934,935,936,937,938,939,940,942,943,944,945,946],[526,570,934,935,936,937,938,939,940,941,943,944,945,946],[526,570,934,935,936,937,938,939,940,941,942,944,945,946],[526,570,934,935,936,937,938,939,940,941,942,943,945,946],[526,570,934,935,936,937,938,939,940,941,942,943,944,946],[526,570,934,935,936,937,938,939,940,941,942,943,944,945],[526,570,1142,1143,1144,1145],[526,570,1141],[526,570,620,1141],[526,570,1141,1142,1143,1144],[526,567,570],[526,569,570],[570],[526,570,575,605],[526,570,571,576,582,583,590,602,613],[526,570,571,572,582,590],[521,522,523,526,570],[526,570,573,614],[526,570,574,575,583,591],[526,570,575,602,610],[526,570,576,578,582,590],[526,569,570,577],[526,570,578,579],[526,570,582],[526,570,580,582],[526,569,570,582],[526,570,582,583,584,602,613],[526,570,582,583,584,598,602,605],[526,565,570,618],[526,570,578,582,585,590,602,613],[526,570,582,583,585,586,590,602,610,613],[526,570,585,587,602,610,613],[524,525,526,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619],[526,570,582,588],[526,570,589,613,618],[526,570,578,582,590,602],[526,537,541,570,613],[526,537,570,602,613],[526,532,570],[526,534,537,570,610,613],[526,570,590,610],[526,532,570,620],[526,534,537,570,590,613],[526,529,530,533,536,570,582,602,613],[526,537,544,570],[526,529,535,570],[526,537,558,559,570],[526,533,537,570,605,613,620],[526,558,570,620],[526,531,532,570,620],[526,537,570],[526,531,532,533,534,535,536,537,538,539,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,559,560,561,562,563,564,570],[526,537,552,570],[526,537,544,545,570],[526,535,537,545,546,570],[526,536,570],[526,529,532,537,570],[526,537,541,545,546,570],[526,541,570],[526,535,537,540,570,613],[526,529,534,537,544,570],[526,570,602],[526,532,537,558,570,618,620],[526,570,591],[526,570,592],[526,569,570,593],[526,567,568,569,570,571,572,573,574,575,576,577,578,579,580,582,583,584,585,586,587,588,589,590,591,592,593,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619],[526,570,596],[526,570,597],[526,570,582,598,599],[526,570,598,600,614,616],[526,570,582,602,603,605],[526,570,604,605],[526,570,602,603],[526,570,605],[526,570,606],[526,567,570,602],[526,570,582,608,609],[526,570,608,609],[526,570,575,590,602,610],[526,570,611],[526,570,590,612],[526,570,585,597,613],[526,570,575,614],[526,570,602,615],[526,570,589,616],[526,570,617],[526,570,575,582,584,593,602,613,616,618],[526,570,602,619],[526,570,582,602,610,620,1151,1152,1155,1156],[526,570,1162,1163],[526,570,1162],[526,570,909,1167,1168],[265,526,570,1264],[265,526,570,1265],[526,570,909,1167],[265,526,570,1166],[264,265,266,526,570],[526,570,585,602,620],[526,570,602,620],[526,570,1192,1231],[526,570,1192,1216,1231],[526,570,1231],[526,570,1192],[526,570,1192,1217,1231],[526,570,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230],[526,570,1217,1231],[526,570,583,602,620,656],[526,570,583,777],[526,570,585,620,657,661],[526,570,1238,1239],[526,570,890,1238],[526,570,890,1239],[526,570,1012],[526,570,1241],[526,570,585,590,620,932],[526,570,620,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255],[526,570,1244,1245,1254],[526,570,1245,1254],[526,570,1235,1244,1245,1254],[526,570,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1255],[526,570,1245],[526,570,575,1244,1254],[526,570,575,620,931,1241,1242,1243,1256],[526,570,582,585,587,590,613,620],[526,570,582,585,587,590,602,610,613,619,620],[526,570,1261],[526,570,673,674,678,705,706,708,709,710,712,713],[526,570,671,672],[526,570,671],[526,570,673,713],[526,570,673,674,710,711,713],[526,570,713],[526,570,670,713,714],[526,570,673,674,712,713],[526,570,673,674,676,677,712,713],[526,570,673,674,675,712,713],[526,570,673,674,678,705,706,707,708,709,712,713],[526,570,673,678,707,708,709,710,712,713,722],[526,570,670,673,674,678,710,712],[526,570,678,713],[526,570,680,681,682,683,684,685,686,687,688,689,713],[526,570,703,713],[526,570,679,690,698,699,700,701,702,704],[526,570,703,713,715],[526,570,713,715],[526,570,713,716,717,718,719,720,721],[526,570,678,713,715],[526,570,683,713],[526,570,691,692,693,694,695,696,697,713],[190,240,261,434,526,570],[90,190,240,261,435,526,570],[526,570,752],[526,570,1125,1126,1127,1128,1129],[526,570,1123],[526,570,1124,1130,1131],[526,570,1013],[526,570,916,922],[526,570,714],[526,570,585,586,587,590,724,725,727,728,729,730,731,732,733,737,738,739,740,741,742,743,744,745,746,747],[526,570,582,618,734,735],[526,570,730,731,732,742,744],[526,570,730,742],[526,570,725],[526,570,602,725,730,731,732,733,737,738,739,740,742,744],[526,570,585,590,725,728,729,730,731,732,733,737,739,741,742,744,745],[526,570,725,730,731,732,733,736,740,742,744],[526,570,730,732,737,740],[526,570,730,737,738,740,748],[526,570,730,731,732,737,740,742,743,744],[526,570,724,730,731,732,737,740,742,743],[526,570,725,728,730,731,732,733,737,740,741,743,744],[526,570,724,727,748],[526,570,585,586,587,730],[526,570,730,731,742],[526,570,585,586,587],[526,570,585,586],[526,570,1175,1177,1181,1182,1185],[526,570,1186],[526,570,1177,1181,1184],[526,570,1175,1177,1181,1184,1185,1186,1187],[526,570,1181],[526,570,1177,1181,1182,1184],[526,570,1175,1177,1182,1183,1185],[526,570,1178,1179,1180],[526,570,583,592,620,1175,1176],[267,516,526,570],[516,517,526,570],[275,404,405,526,570],[403,526,570],[275,526,570],[275,329,404,405,406,407,526,570],[190,240,261,329,401,402,526,570],[190,240,261,275,329,401,404,526,570],[416,417,428,433,526,570],[190,240,261,416,417,526,570],[190,240,261,417,428,526,570],[190,240,261,274,417,526,570],[190,240,261,274,416,417,526,570],[417,526,570],[418,419,429,430,431,432,526,570],[190,240,261,416,434,526,570],[409,526,570],[409,410,411,412,413,414,415,526,570],[409,410,411,526,570],[190,240,261,410,417,526,570],[190,240,261,274,408,416,526,570],[190,240,261,417,526,570],[190,240,261,422,526,570],[421,422,526,570],[420,422,423,424,425,426,427,526,570],[190,240,261,437,526,570],[437,438,439,526,570],[437,439,526,570,748,749],[437,439,526,570,585,621],[90,91,97,98,526,570],[99,165,166,526,570],[90,97,99,526,570],[91,99,526,570],[90,92,93,94,97,99,102,103,526,570],[92,104,118,119,526,570],[90,97,102,103,104,526,570],[90,94,97,99,101,102,103,526,570],[90,91,102,103,104,526,570],[89,105,110,117,120,121,164,167,189,526,570],[90,526,570],[91,95,96,526,570],[91,95,96,97,98,100,111,112,113,114,115,116,526,570],[91,96,97,526,570],[91,526,570],[90,91,96,97,99,112,526,570],[97,526,570],[91,97,98,526,570],[95,97,526,570],[104,118,526,570],[90,92,93,94,97,102,526,570],[90,97,100,103,526,570],[92,101,102,103,106,107,108,109,526,570],[103,526,570],[90,94,97,99,101,103,526,570],[99,102,526,570],[99,526,570],[90,97,103,526,570],[91,97,102,113,526,570],[102,168,526,570],[99,103,526,570],[97,102,526,570],[102,526,570],[90,100,526,570],[90,97,526,570],[97,102,103,526,570],[122,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,526,570],[102,103,526,570],[94,97,526,570],[90,97,101,102,103,115,526,570],[90,94,97,103,526,570],[90,94,97,526,570],[123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,526,570],[115,123,526,570],[123,526,570],[90,97,99,102,122,123,526,570],[90,97,99,101,102,103,115,122,526,570],[526,570,585,602,753,754,755,756],[526,570,762,769,770],[526,570,770,771],[526,570,761,762,763,768,769],[526,570,759,760,761,762,763,765,766],[526,570,763,767],[526,570,759,763,767],[526,570,763,768],[526,570,763,765,767,769,772],[526,570,759,760,762,763,764],[526,570,760,761,762,767,768],[526,570,765],[526,570,920],[526,570,917,921],[526,570,585,602],[526,570,1014],[526,570,1015,1057],[526,570,886,1015,1053,1056],[526,570,1055,1057],[526,570,856,884,1015,1054,1055,1061,1133,1134],[526,570,1011,1015,1054,1055,1056,1057,1058,1059,1061,1135,1136,1137],[526,570,1015,1054,1056,1057],[526,570,948,1010],[526,570,1057,1061,1135],[526,570,1061],[526,570,856,884,1054,1061,1122,1132,1138],[526,570,1054,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121],[526,570,856,884,1054,1061],[526,570,1015,1060,1122],[526,570,1015],[526,570,856,884,886,1015,1054],[526,570,582,606,620],[526,570,620,1152,1153,1154],[526,570,602,620,1152],[526,570,1158],[526,570,919],[526,570,1189],[526,570,583,1188],[526,570,929],[421,526,570,714,928],[421,526,570,929],[526,570,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045],[526,570,1031],[526,570,1031,1042],[526,570,1017,1033],[526,570,1033],[526,570,1040],[526,570,1016],[526,570,1017],[526,570,1025],[526,570,1047],[526,570,1046,1048,1049,1050,1051,1052],[526,570,1049],[526,570,1048],[526,570,585,590,610,613,616,890,894,928,929,930,931],[83,526,570],[83,84,526,570],[83,84,85,86,87,526,570]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"5684c530792712f3fc7e4024dd049c70d625567f71d77319a6bad39aead104f8","signature":"843c634ce6233d18664296c1f1e4aec8c5e0e98ca6e824ace666ccc5c1a06f89","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"284700f874fa1e32428eb6a18d4d6c36e1783dc9c315370f558d9e8d36f8a615","signature":"01a371d63558066ec9e08b3bcfccef9890517d98c483b08c5264677abb36d878","impliedFormat":1},{"version":"00c167f32444b220a604a8308f4466cb83b1e3de66ccffdcdefb65a49c26f161","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"294985ec97b28343d1d6e2730a13a839c375a2ffb5f6b37acbf5dacf35613785","impliedFormat":1},{"version":"3896fddb08ec18856f5e88f9f7776c1c58c41d6129f8ee5158513a5de3febd01","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"4e2af0853ef2aa0bd0c97121d37255db91d57a5a5d67cc937f2367a949373f3f","impliedFormat":1},{"version":"d53ba569f15be8659ba0f726dddb7a24bb875b63b8614c6b007d38cabfa3217b","impliedFormat":1},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"9c479340e2f7537bbd31dd0a08aeeec28db302d9bef096eef3cc09f20eb56097","impliedFormat":1},{"version":"952d81d65c1cb9a3bb736f233db638e50fdd4e7ae75a5624e7b8be24dad92851","impliedFormat":1},{"version":"2767eb79f4b9e754efff56d654aa71715baac18a6157170f423cbd460f2445ab","impliedFormat":1},{"version":"3d6f89fb6ab035027268da5a90e31369876b5f2c37339b1212590c8727bc920a","impliedFormat":1},{"version":"6b05adc37cce53629f7740a2ce72a17d231cb1332dd20d725f49918db5f90ec4","impliedFormat":1},{"version":"cb364f282ace685f66e8fa777804a36e96892e4c92cf4e8816ae9156c3551453","impliedFormat":1},{"version":"afe1be833b5a9e15f35b72d4aedaac24c0fd903e374c4eb4be90334a0e5ad9ae","impliedFormat":1},{"version":"42b59521c78a8daeaf087752adb5de9753e7c4b701fc7c3e435ef1d737140091","impliedFormat":1},{"version":"eedad1c380f5737f1220feb0ee83212f602acae8f0553837c098878e5c73c198","impliedFormat":1},{"version":"e0fdb256e83c39f7794908de553930ce2581ba109b8de90937bf972fa75485d5","impliedFormat":1},{"version":"dafdf0b0ccb55128f83fe0acaddadfb5d223887a7e8d59a0623860a68b1f59a7","impliedFormat":1},{"version":"6f3ef4208d2d6933180ac1bc813efbfb319b05e49ef0cdbeea15126b982578c4","impliedFormat":1},{"version":"02e7a692feb22c829d837e40e82070d47b696a0c64ea192ba2c438f6a55902a4","impliedFormat":1},{"version":"685b232bf1f8763afa58c62d964f677478fac68ccd9e761e4d9a0cf6b5f9a378","impliedFormat":1},{"version":"2d205c767099a9c1719b2884eeb878470d81e3418ffe9ae8db8139e597f3e34d","impliedFormat":1},{"version":"0c0ccc47a6e4cdaf336181d46a262c591dad7098f431a4234364fccf7ced258f","impliedFormat":1},{"version":"cf68f71517959967c83d4585d1cd37376fbbe8174ddd0140274c228488149190","impliedFormat":1},{"version":"d6cadb48c29a13aeb7be79d14980f2aa4ebfe9c6118726a906cc429fba582079","impliedFormat":1},{"version":"56e6a902d2aa94175f75bdc0ad822bf787b67bb6dbf52018c389d3643d203539","impliedFormat":1},{"version":"650b748b635b9299a8d2ba23ff02f403aac044a946b7e10bfb95942367bc1489","impliedFormat":1},{"version":"c4e474945611676435f1807a5ab049becffc54a32a1a4cfc96731cdb34fdc8c1","impliedFormat":1},{"version":"a23c0e88e5d4204898c2087a5950b974c594343f78aa8e3e758bb85c3d30dfde","impliedFormat":1},{"version":"8d071caad80707dc1853c718e6372349df8fdd4790ac57550cb243545ac91806","impliedFormat":1},{"version":"6138f6a183b6ab187becc7f4f37ea7b9b072874c75699d2bd10950fe07726aec","impliedFormat":1},{"version":"ddbafa89c2b1b11251b96deef3869fa0b567766c43bd31224838ecb024297b8b","impliedFormat":1},{"version":"3cc6ec5641587a673473f9613880b63f531446bc631a6f96adbb033672cf6d2d","impliedFormat":1},{"version":"3901548cb8b4d914800927f9def278f34dfa106e65be38ee47d59c4efdd45ef9","impliedFormat":1},{"version":"21856903077f053172be7ab1027ccfb94fecbb0d22dbc34e7208c4553575ccbc","impliedFormat":1},{"version":"6cf6409ce9b90a14cd1e146d00fd21973d5d6b2da875283f3da0f27e0b786eaa","impliedFormat":1},{"version":"2a527df5c4828328fa6b35cf8b8f5bf0640933a4602c517faace7a1c3af0d446","impliedFormat":1},{"version":"2a46d72fe8eac64f8337c839bba3e558a07cdf6f2574d88dd5852d6ee8bf7d9c","impliedFormat":1},{"version":"0787ec67c199917f7c0f2a127432dc65f5d422e15992b8a7c3d7765f94075390","impliedFormat":1},{"version":"8494cb4b789a1f5e0710a4db2e111b4e20ee373251cb958b79f2d19d8adb3743","impliedFormat":1},{"version":"b8a25d32e4a2a187e2169f0936416cfcac8926f56166f3895fb5f82942f3150e","impliedFormat":1},{"version":"7552cf0a2915702d6cf9a8c6a2a242b713214728dbb81353132d2d986e74e521","impliedFormat":1},{"version":"c3789c53874f2aba5a7c21e1ac1e467f95522ba5a0c8f9c8b8c519efa7aec51b","impliedFormat":1},{"version":"dec52a42c912503c35463f974fb86cb1a772cab001c2c9ed413093845be2f677","impliedFormat":1},{"version":"d2a2a7be324ab271073676edb22f5de259d4baf5bad32bd2e5545f957f503ac4","impliedFormat":1},{"version":"63fd6e8e4f5403337124c82bf46fb17ce24923d8a9223b387ad312a4b075e7c9","impliedFormat":1},{"version":"bce453d2e25d1104b3b84c97aee92111e194691e5b254af318499745c8e041c6","impliedFormat":1},{"version":"22f897e17f18b702f8aa1c6e6412fcd33d180f8ef61297fec6c395a2b18d9908","impliedFormat":1},{"version":"0afe2ed080fb1ca424bbcecca1874d7fa24aaba54535722b00607d38dd150f8a","impliedFormat":1},{"version":"04260ae2a15ef601034f94c4b4c91b76a4c4197d48137d04859d9aa9c83f2f16","impliedFormat":1},{"version":"507fe2b965da84e42b4d17d35264be1e70694a8692c75fc07207d38deda42ad7","impliedFormat":1},{"version":"4a9bdce843a6bc8bdc71287de2808e7438fd718e17c55d175f0f2d0a8883947e","impliedFormat":1},{"version":"8a0a5c90711b4d4d55b0edf7d097faf872f65d6f7be1a5a42fdcfb62c751a135","impliedFormat":1},{"version":"756c0a51db689803dcbcb94cec65edd6f0212fcda9abf264001ae975a5c6a18b","impliedFormat":1},{"version":"2873b8fe4083b54fb60dd1d03ee8b22496e41f96a4e536e06cd59a481aba01de","impliedFormat":1},{"version":"5fc9e50135f4163989ce74b83b68a5ee44d151f04ec44078adbe913c8dad694e","impliedFormat":1},{"version":"e2949c84dcb7b6a3fb40fc8bfcd9fa6b74d1e2c830de0d5ace7159cc4fb4b5a5","impliedFormat":1},{"version":"34a80ad568a06a539e43bde102bed1fcb8bec196811caa9abc3a0cf44a95fdde","impliedFormat":1},{"version":"e634a64172adde8d23f6df23f252d35e16eaa4bc33e881700967498a955e0b25","impliedFormat":1},{"version":"b1432d91fcf4cf709d71adc1a00e04ac1948380b8552310d0509dbdc3b2cf97a","impliedFormat":1},{"version":"e3d05607f9e532c806395e8765913736c42900c5c3ab5ab52d910da6fd57121c","impliedFormat":1},{"version":"eca0a0e9725ccbf8b13ee72cdab75b489992f2ce7f4dd198767831982463c294","impliedFormat":1},{"version":"26d1f4beb9d50d83557de587f5168dacb4dc81935f4880afa7d48dd7b13d5d10","impliedFormat":1},{"version":"67d2cca28154842dd7b1d5cde8c94b9fc24afad1089eab0f1de7294d143605d5","impliedFormat":1},{"version":"28c9bcc4c2323e859523b1edd20a69b66784bb3ca58568ac1c2448d90c1e1fce","impliedFormat":1},{"version":"b2434d709c9dcf1bee9223a19b449cf9d8a0b411fa5bb2ecc8ce25fa92889c77","impliedFormat":1},{"version":"6cbfcc72a73f25c47951ebb87118ecc43d04781e02b51236d4fab69dbc63926e","impliedFormat":1},{"version":"e0fdb256e83c39f7794908de553930ce2581ba109b8de90937bf972fa75485d5","impliedFormat":1},{"version":"dafdf0b0ccb55128f83fe0acaddadfb5d223887a7e8d59a0623860a68b1f59a7","impliedFormat":1},{"version":"ec314adb4116647307480f138c5c23f98bb5ad4efba51aeb1957fc4519429d8b","impliedFormat":1},{"version":"5297455afc3c8eff9ae459f28eeb846fd86a51678afbceb7c27696eefdcf1e5b","impliedFormat":1},{"version":"532aeb172f2a735739956f48d7862681212baeca1bbde9185eae73f6dcb95faa","impliedFormat":1},{"version":"2d205c767099a9c1719b2884eeb878470d81e3418ffe9ae8db8139e597f3e34d","impliedFormat":1},{"version":"cb33e3ca7c3b2cda0d04b6aafe6f9ddad719ef615bdeae9cb88384ad798807ec","impliedFormat":1},{"version":"2c9b150c52c2c876fd5e91e1c63be66a6e2d052a1f381d362ad649c6ffd8fba5","impliedFormat":1},{"version":"d6cadb48c29a13aeb7be79d14980f2aa4ebfe9c6118726a906cc429fba582079","impliedFormat":1},{"version":"1fecc438d1dbb692dcc38564aa5ea06a108cb37661327d8c0e0c065e07efb3aa","impliedFormat":1},{"version":"650b748b635b9299a8d2ba23ff02f403aac044a946b7e10bfb95942367bc1489","impliedFormat":1},{"version":"c4e474945611676435f1807a5ab049becffc54a32a1a4cfc96731cdb34fdc8c1","impliedFormat":1},{"version":"8d071caad80707dc1853c718e6372349df8fdd4790ac57550cb243545ac91806","impliedFormat":1},{"version":"3cc6ec5641587a673473f9613880b63f531446bc631a6f96adbb033672cf6d2d","impliedFormat":1},{"version":"3901548cb8b4d914800927f9def278f34dfa106e65be38ee47d59c4efdd45ef9","impliedFormat":1},{"version":"21856903077f053172be7ab1027ccfb94fecbb0d22dbc34e7208c4553575ccbc","impliedFormat":1},{"version":"6cf6409ce9b90a14cd1e146d00fd21973d5d6b2da875283f3da0f27e0b786eaa","impliedFormat":1},{"version":"2a527df5c4828328fa6b35cf8b8f5bf0640933a4602c517faace7a1c3af0d446","impliedFormat":1},{"version":"7f2eab4f5f276996d3e13aa12f589048fe198eea8dbd78ddcee60c38a8ff5606","impliedFormat":1},{"version":"0787ec67c199917f7c0f2a127432dc65f5d422e15992b8a7c3d7765f94075390","impliedFormat":1},{"version":"095b26151a4ce7b9da003174d4a22db9f867928d3bc7718966d0e95f0c9d160f","impliedFormat":1},{"version":"b8a25d32e4a2a187e2169f0936416cfcac8926f56166f3895fb5f82942f3150e","impliedFormat":1},{"version":"7552cf0a2915702d6cf9a8c6a2a242b713214728dbb81353132d2d986e74e521","impliedFormat":1},{"version":"c3789c53874f2aba5a7c21e1ac1e467f95522ba5a0c8f9c8b8c519efa7aec51b","impliedFormat":1},{"version":"dec52a42c912503c35463f974fb86cb1a772cab001c2c9ed413093845be2f677","impliedFormat":1},{"version":"d2a2a7be324ab271073676edb22f5de259d4baf5bad32bd2e5545f957f503ac4","impliedFormat":1},{"version":"e8125d329bd068dfa97035914b87f0d561f8bbc5a5883ad883c5484dd8315eee","impliedFormat":1},{"version":"22f897e17f18b702f8aa1c6e6412fcd33d180f8ef61297fec6c395a2b18d9908","impliedFormat":1},{"version":"9b48fb7d6521c10569a09921fea776719fab153e4b24d6bf4290fe6fab9be6d3","impliedFormat":1},{"version":"9c2c8c2162f810ac21c9a9df55ef59085b82790d9b17a916c6d025ba3e3b8edf","impliedFormat":1},{"version":"507fe2b965da84e42b4d17d35264be1e70694a8692c75fc07207d38deda42ad7","impliedFormat":1},{"version":"8a0a5c90711b4d4d55b0edf7d097faf872f65d6f7be1a5a42fdcfb62c751a135","impliedFormat":1},{"version":"3ae18d6fa578fc0025f43e6b2f26bc3d1ba110e9149273bd213a5cb7fb878848","impliedFormat":1},{"version":"2873b8fe4083b54fb60dd1d03ee8b22496e41f96a4e536e06cd59a481aba01de","impliedFormat":1},{"version":"5fc9e50135f4163989ce74b83b68a5ee44d151f04ec44078adbe913c8dad694e","impliedFormat":1},{"version":"e2949c84dcb7b6a3fb40fc8bfcd9fa6b74d1e2c830de0d5ace7159cc4fb4b5a5","impliedFormat":1},{"version":"34a80ad568a06a539e43bde102bed1fcb8bec196811caa9abc3a0cf44a95fdde","impliedFormat":1},{"version":"e0f1bf295d165e3e7fdb6bbd9910888e9c5645e19cb4ae4b86303ee5ba2c951d","impliedFormat":1},{"version":"7c6d7a526120d34a336b995d5a5b2f52d934b89d364b333b850c15ef3b5bffce","impliedFormat":1},{"version":"e3d05607f9e532c806395e8765913736c42900c5c3ab5ab52d910da6fd57121c","impliedFormat":1},{"version":"0a019658c43651da76cdbc673aab961f4c6e9fab4006e3aaedb5b13e5dbab37d","impliedFormat":1},{"version":"956b961306d285dc2c1d3b5020baf1e2c57f564876f50dd42e0976bc75a020d3","impliedFormat":1},{"version":"dcb2d6a6e0b8900a46f9cc664fc1c6e3cc9a4d99249bad1605749d651e8cdd2e","impliedFormat":1},{"version":"9b33ad40fa8b00650b695638c8e08df88bbbfed00283ff5eabbf11b8813e03f8","impliedFormat":1},{"version":"fa90ab24a39247e1e9874784e7b56a93ab9f1a04daadff9d9cb99d7223d91486","impliedFormat":1},{"version":"4b91eb2d2841e34c371710ec924e8ac947911d9941bdfb6a11730e741f287005","impliedFormat":1},{"version":"ce980562ed0d193d700d6d55ff717131e4bb58b88b5448e7e05dfceae719f47c","impliedFormat":1},{"version":"4d66be39bdb7a62696866426ec835920b2cdce7124b54aa14b1f9fef4d41cd93","impliedFormat":1},{"version":"dd679f95f944384711ac7c9ed85d6b46b15f82c023c4919ba3232fd753532c90","impliedFormat":1},{"version":"8b4a688f685193540c8164ebe48624c4e82b8769d74dfb3557c4dbb9fa567898","impliedFormat":1},{"version":"b5f9c5b2f54ce4c0baf948d885a7a21aeba477dc9356beefd63c4bddac366d6c","impliedFormat":1},{"version":"48079abf5a74f7028473652a9cf64e3d260c44bf4060b05485a6e3d7f0370dc2","impliedFormat":1},{"version":"ea22fbc1dbd8fac6df7dbd5870183a9d14ccb8358c253bf844ced890a7f38dd6","impliedFormat":1},{"version":"773078223907d9936c05dddfed60cafeebd4249acbcc189001370261718f0258","impliedFormat":1},{"version":"17e344c68488e5787eebf3ec125565d51a468af5701e214367a42ce8e5eef059","impliedFormat":1},{"version":"aadf00554ac0118fcf308d7ae1cafd86a7931b41e038022dd891af248d72ef35","impliedFormat":1},{"version":"733ec8bd6c210af3ea70cfd0ae7924949de5ecb384d9d1db3744b3af2f9d0f00","impliedFormat":1},{"version":"d95f40246c4a53a739dec1818a4f3cb39aac4965ae1a4faf614f78bf3b85c347","impliedFormat":1},{"version":"3a844741079e4c4e38e5dfa7b182ef7030a8c787bc08efacebe0d7b3bb685f37","impliedFormat":1},{"version":"5f5ff006e411f34b3ecf4fe66bbf7c9978bab7fb7f09646c91b8549acc8d487f","impliedFormat":1},{"version":"70e812cb0393e7100087a2203ee9349dab49974032429d29c84222be1356e6f8","impliedFormat":1},{"version":"856aae51a27c4c285b39701ee870dae66bd5b8e007c8dc153bd66fd56fa901ea","impliedFormat":1},{"version":"739130f4f55f33efe791911603f2276169bc0554dbb789bd907870774bbf30d0","impliedFormat":1},{"version":"9ee7eea77d7631e7d95b4f5efc9972fea3a82a3947bac97e0c5c3a9ad2f8d509","impliedFormat":1},{"version":"748b8a93f92a5e3c6c45e9252efe5f70312dbaabf23c32882b0901d530698b40","impliedFormat":1},{"version":"59a6a3f236c937dcc8a6d99557b4317712c0b82f53e73f7a0070c82fc795ed6e","impliedFormat":1},{"version":"dfd624f05e679a330f8b0b8c27b97cc6d09cb8c5547c229eedcf71ee60716f50","impliedFormat":1},{"version":"33bcff4a7c9c06dd05a7635f1a7ba8ccd1a26250caf6fef41fe4bf3677437356","impliedFormat":1},{"version":"001bb2fff6cc7d1cfb99e5eb13b745764230c0a48c9832cd4b8196acbb63a402","impliedFormat":1},{"version":"7f843004c1f9cc2d32f9778227813cfeb8f47733f4485130d999f51eb97a45df","impliedFormat":1},{"version":"1489c494f095baea8f9e67d37a9fdd4025c172c1e74ee783093ee2756a665a1d","impliedFormat":1},{"version":"d4946c3a7c18a8ba1e60a1578c676f51a81d1767fcbbf60b072803ed3fa7f9f9","impliedFormat":1},{"version":"a56648d6831b9b5552b56f0eae7536666d181c86fdcc422f9143e4a5cece6a39","impliedFormat":1},{"version":"f15ff88fe1895cda331b45ceaf23dca027937395a64daa6867cbde52dea7b8c2","impliedFormat":1},{"version":"37046d990462ee09b87b6045d32d62f04d2285351a0977aec83050d994cd6992","impliedFormat":1},{"version":"67294340fe22775adae3b562bdd25adbb1b0d9926b54dfca251418e0e9df8730","impliedFormat":1},{"version":"38b2ce306ab9f13712896b0a4aa876c3e0af5b4466266938e7c5988d822a3f76","impliedFormat":1},{"version":"40e954fecc5f79d6d0890a64713d5e2f8083ae960b6b4e541d44efb9b1c4a899","impliedFormat":1},{"version":"0203a29de8ad74bc916100aad38ccaef5efd37435c8e2f6f6fbfaf2449cf9c03","impliedFormat":1},{"version":"c7aedf7a48b01d06a7a163a63bf1d544fc0bd00417885bae592319cd3f8a97e9","impliedFormat":1},{"version":"e5873895fef4cf12c0bed5b157849e6784d24280bd41ed90854180eebdaa5026","impliedFormat":1},{"version":"65cfc8c1b0ef79383524acaf8151508cb09d163850c4a50dc53574583afd4761","impliedFormat":1},{"version":"c38a0a8b43a6403d1381c32af260513432885aa4c0ae03addad9bad07fd2a2d7","impliedFormat":1},{"version":"d34cbb43422395aa227955f37c7d2b5fcaa2e6675e2a7f7e4e25ee704ab912be","impliedFormat":1},{"version":"af560f62851c384acb21284b9127d53411951056010ff0971f0e66d88e66a7b5","impliedFormat":1},{"version":"b34a0615615cbc69750d9fffe16f31563d917330413219225915cbf4fd473fb7","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"82d7a9061cc31434ca602b01abf3bd3aa3d93eeba3d92ca4d7ec5ff0e401bcc1","impliedFormat":1},{"version":"4ca12ab9d4783b7180b61b96b798b62f6da47e3ee15ff54a5a41607349e15ffe","impliedFormat":1},{"version":"143c3bff41eab3e0d761a3cab2bd580a642beb7509d21fdae5ad6ef04eaec846","impliedFormat":1},{"version":"92538fb1b4ade68cef4fc7b35b8b919e1f2d0c95a080865f991bb10254bb198e","impliedFormat":1},{"version":"963a1f038a096850feadc16b1f4877bae9b98f70fb5471e8af07813fc440d9c8","impliedFormat":1},{"version":"636458e860b725e326083020eac20d68df8c765c22870550ad78727f08d354ab","impliedFormat":1},{"version":"b2597f8e5cc644c743602ec4a9196f1a4f981383bc666806c673061d5a974d7f","impliedFormat":1},{"version":"9ea5135bc86b361d9f7d7559979d3749945a5976bf85e7f5c63b5439f122e5fa","impliedFormat":1},{"version":"11606f2a7b32a47aa2fede3d93f3a4505cf57bb4fbae758b0cbebebed1dae817","impliedFormat":1},{"version":"ec5ef2d24ec079093f3e8aeafc36110e32d586c3f2c3af395823aae744e7b69f","impliedFormat":1},{"version":"181baa25db7c55954e1d4114485cd3ed96df14a6e26fb8c9ba702a8a118d9254","impliedFormat":1},{"version":"fb553e78cd953e6b36a394021bd392446638033c9e3388a9f1babb613617a20a","impliedFormat":1},{"version":"6139c7fcac07fead5b35781d146198019e176f8d32c9b6ae89acfa22b16a9fbc","impliedFormat":1},{"version":"86b2abd6ddc37ca8fbed9606367ce4b8fa1d6b2fa3c30cd8f5fcb6d3ae996268","impliedFormat":1},{"version":"5a699f07f692f146028a8d2a24dea3df3bebec19a2f6dc7e1624274b8a0765b8","impliedFormat":1},{"version":"e891cc403ec4588c43e67f20d4f44c2de1995e1a778e7a255e0a1f8c7d263005","impliedFormat":1},{"version":"7a07b0e6d8f5356cb3473723d1853c9505301e05329df8a72ba6c42a2657ca66","impliedFormat":1},{"version":"e54bfc9e643070779ab10e9d572a776562725c6533f9b8eefe30d5ee2e87b22e","impliedFormat":1},{"version":"b60efbac98231283107121b5b3327f56a6632c2d14d7616920bc309a4f6d4bc3","impliedFormat":1},{"version":"46036e7d150725b12b0ef99ca77cfd4ee662c6a0e011f85a679827dd65d1f42c","impliedFormat":99},{"version":"33235f0c8a3cdf9917c3a2b8eca15fba28d554a48d8eeca24c417a16e317d0ac","impliedFormat":99},{"version":"783a9a7d35f9b922e0d72452e85245829e5618776b3243c4adb9bcd554443ca5","impliedFormat":99},{"version":"dd9d62565b1d4e0885e9b1f1fb55c7a304e5710303d31821a7daeeada9662aa0","impliedFormat":99},{"version":"ef14aa59689ac1bd4b725220fafe753eff9acd8cdc445c04e5b98ac3fe28bff2","impliedFormat":99},{"version":"8c184a7193d318242db5e31ef4bbd73e88c3a0e333c0f4c8523ee2d9ad76cf84","impliedFormat":99},{"version":"dc7600229385bd96566e63a48e336a38a71f223de213b9a5c04f84a9c59d1342","impliedFormat":99},{"version":"907df4219dc9e9e4310be2f3e9e118aa092d073612b9ab1247e447c6ce902260","impliedFormat":99},{"version":"4f4f2beae13a724e7f1b45b5af86a94500d799c7a59181eae1098f549698b09a","impliedFormat":99},{"version":"62478b6c261fee944784c9039e465e03600d68b60d312aba7040143dc1189d91","impliedFormat":99},{"version":"72a845236a24235f598a7da1dc89c0e38a74e1c8cdf4db833c5618e12adc4a50","impliedFormat":99},{"version":"0d2a83bc35ebb75a347d16b72836cf7d407563a7827a585590fae7e2873fcdab","impliedFormat":99},{"version":"aa95d55cbdb02fd4cfcc5b52f04453dbaa86a1fcf31e051bcfb3716f398ccefa","impliedFormat":1},{"version":"55cc31850bb3aec591a02f4e2d2999f1484a52f0afa8ed6934dbb0cfa0635128","impliedFormat":1},{"version":"ae5648da65ae89098d2238037b8b739303ff1f1ed7f711f5e1dab85c0cde73dc","impliedFormat":1},{"version":"21cc4c106db99d082b2b726f4feea224fa40b10a6cc7de03c2ac8ecaded86faf","impliedFormat":1},{"version":"51b46e83520f9dc3e1380657071ab165ada01fee49e7b41b186da91bd287503d","impliedFormat":1},{"version":"f577f333d0679c82bbf346c3983de5f6e5730e264937021a506b13ab1cee5e52","impliedFormat":1},{"version":"47ec9752d4882a64ef06ce90067439f39e1f64831efb82d6b61a27e46c27665e","impliedFormat":1},{"version":"4550d4a71bfe8407890afd7c7953e4ff732e848e6569cd94fbf33b45c4339a94","impliedFormat":1},{"version":"79954720b311aed13a8b28effcf9f043816ff2a8f1887ffbc4f5ea604c3ab0ae","impliedFormat":1},{"version":"0c0f1398bc2cb82a901d38593309ab3e9a025718c31d2d41096373661fa943e8","impliedFormat":1},{"version":"ac994da1b115d9aed1ca0100a607032122ec0b1cac07436a3215e6c7f8c2ef2f","impliedFormat":1},{"version":"85a143aa41b4a16f8836a9c1059b84fcaf9380b37fb28624cc35b49bb2c834fc","impliedFormat":1},{"version":"b759e7b85c5337b457a1d61df4b47fb2e97665b05e666e75289d808f3aa4f1bf","impliedFormat":1},{"version":"fa36037b4be0f7c122eb03efb72e79c1799981028f6bfc6b8dea307c97f3529c","impliedFormat":1},{"version":"820fc91384a1b27caba7f2411a1535e9313bf46411e290b3480b030837c6f985","impliedFormat":1},{"version":"da7e68de00deb6259533046617b8a3cd35e61a1be103d0e0487584cef7f1da2c","impliedFormat":1},{"version":"ad4172e0e6d5be3841679dec15e80a2dd09d768a6936ae0df2c05c2c8d45523b","impliedFormat":1},{"version":"706230799de1bc03f4d1e927b0f535f4c9f74061b40138f5ade2e3a470b7f3ea","impliedFormat":1},{"version":"a09dc5f7d149bcbdbc83db02b54ba7cc83bda0148454782c41521e1e9a42233e","impliedFormat":1},{"version":"6fd319d50603e1200a24078e3e92dd1b17ff058681ef451dffa890ba8e84514b","impliedFormat":1},{"version":"2ad76a8f378c771219e4a1c9fc1fc6a66a4ad7192edc3e84a5e0cd79a806dbd5","impliedFormat":1},{"version":"bb40c13d89e52602b3af4cce60ccc46644e30cc2fa5f47d5c8d0fa645c85532a","impliedFormat":1},{"version":"8c2cb956a171e41734bf8ebf4308eac8e21025a4501d3729d0d378f6d259cd02","impliedFormat":1},{"version":"a6dbb9a79212baa8a46fdf91ab2b8210665d55cd739ed1668f109d1976f213f1","impliedFormat":1},{"version":"84dc7636681d2cd0ccc6a365e9123da5a0908b280b1cc485dc5d354a2ca79746","impliedFormat":1},{"version":"eb4f2a4043e45b0452ed473b674229d4a7fda48a8092b7e34d88188df0c8af47","impliedFormat":1},{"version":"95ebe1415645192fdf015b46b4c542bb60e736624bfee59559af8a7671016202","impliedFormat":1},{"version":"d19c66a5a7376840dc3811fa0465038e3e270fe2e9d0d17d1f0c1b2c27481b92","impliedFormat":1},{"version":"0e396f97cc7eae97b942cccbe7c17f60f8af207d8c4aa6c154267eaca86ab11c","impliedFormat":1},{"version":"f4c5d65fe7e93cecddd537d46af01820cdb9f72bb94b09c6309debbb50ad5ada","impliedFormat":1},{"version":"ff526238d3fbb56031ca203f8014f5e75077f04d842f441d2c050df01e849f7a","impliedFormat":1},{"version":"dad84d1b803af8326557fd1c7710ce845a6d590e462c802d380e9d947ec14c6e","impliedFormat":1},{"version":"5806973501dd13a50b30b3f23751f28d9eb8ee103228af39d07491e1de7484fc","impliedFormat":1},{"version":"a3caaf2245d2567ffdda491cbc817df385ef549dc186a39c2a3452daa07dc034","impliedFormat":1},{"version":"a8ff496bbaa5cf7145cc4ca8df03e2dc480bbe24dcbd1f9734200eb12d5aaad7","impliedFormat":1},{"version":"e236821607e4c3dc1adbdaca5cd7fe55ff8d19051672532639e76f045889e9ee","impliedFormat":1},{"version":"f9e2c40b4a0686af8576ad4aad9dfb9e62f5daf309101bc9956a497f38f92b39","impliedFormat":1},{"version":"fff48e97d33173e8b75b9a2b74ed71e6d0d3b7e4aa81b821a90c09a95e0423e0","impliedFormat":1},{"version":"928b23be870338067bbc9381ffb3de5cc3b088abe73c8e4995444fbabd7edaf1","impliedFormat":1},{"version":"a26d74bc8768e134734fa049d5a89fb674a560292f4bf1b39392416dc04cf49e","impliedFormat":1},{"version":"ea7f3d87bb25b8cf26c1b440de31b628c53b5e72e8f1ab1726356bf58acf5946","impliedFormat":1},{"version":"7ec047b73f621c526468517fea779fec2007dd05baa880989def59126c98ef79","impliedFormat":1},{"version":"8dd450de6d756cee0761f277c6dc58b0b5a66b8c274b980949318b8cad26d712","impliedFormat":1},{"version":"904d6ad970b6bd825449480488a73d9b98432357ab38cf8d31ffd651ae376ff5","impliedFormat":1},{"version":"dfcf16e716338e9fe8cf790ac7756f61c85b83b699861df970661e97bf482692","impliedFormat":1},{"version":"3b3fe018cdd6ab5fc1c1b9de009f365e0d6653add071f5fcd383bc9a298cdcee","impliedFormat":1},{"version":"6b5f886fe41e2e767168e491fe6048398ed6439d44e006d9f51cc31265f08978","impliedFormat":1},{"version":"f4a1eba860f7493d19df42373ddde4f3c6f31aa574b608e55e5b2bd459bba587","impliedFormat":1},{"version":"6b863463764ae572b9ada405bf77aac37b5e5089a3ab420d0862e4471051393b","impliedFormat":1},{"version":"ec69ebd1c4850514ebb6724911ad56e71caa0d076891ed6b67cb10d3ebbf2586","impliedFormat":1},{"version":"89783bd45ab35df55203b522f8271500189c3526976af533a599a86caaf31362","impliedFormat":1},{"version":"26e6c521a290630ea31f0205a46a87cab35faac96e2b30606f37bae7bcda4f9d","impliedFormat":1},{"version":"a51e18dc7e00eb6961c55b2a4ba4b70ab8c5cd601dc73337a0f5fd8292a5e944","impliedFormat":1},{"version":"3ff6e9ce7c3ad38dfe5165e90c826a27b289c9d0e7d9e934f654566867700fb7","impliedFormat":1},{"version":"f976134f9fc2369f6d4694eea7db6c2fb3c757ae5dbb047aeb06f02a21886443","impliedFormat":1},{"version":"d7e7199291e479bebe7f2bcefeba3498c80ce70c3b3440174fa211cfdab7bedb","impliedFormat":1},{"version":"233267a4a036c64aee95f66a0d31e3e0ef048cccc57dd66f9cf87582b38691e4","impliedFormat":1},{"version":"739fc10cb1f1c08f7578684ad660334e9617a81690d41d3dad234b3e4d5835b1","impliedFormat":1},{"version":"1af96cab9fbac290cbcaa07154ced5fb7a2b8bec02bcc6a34e77456d40fffc71","impliedFormat":1},{"version":"bed80e26fefb16b3eb7062e7878f38e1f0c0280fb61a6a608bdfb6dd64dbfc9b","impliedFormat":1},{"version":"39937ecb2516623611c287309f2b0e123fe5cb06d97487bb6fb6ec911e3ac652","impliedFormat":1},{"version":"9c171e2b0fa97a74c2437e746ea0127b49e6908e89ae6dc06ff238c3bc5c00fe","impliedFormat":1},{"version":"717cf65141e976becda69384a57148f4f6339ec04ff431ebb2ad19c558be4346","impliedFormat":1},{"version":"7f24ea5b058a109f8c9cf8f7711fb20cd2ead9817fa88415f94e47a108d9b149","impliedFormat":1},{"version":"3473f825e4648c65d597a0277245c250531c8fb946bdda179411e61a9eda50de","impliedFormat":1},{"version":"245125adc48737019481042b0e3dab6122528c1acc8933c5afd59e57dd2265cb","impliedFormat":1},{"version":"33f78f7ea02b6489407623b23b616dc8557fa8774c2e2528b33352c812fa1e68","impliedFormat":1},{"version":"e974b3d1188d8ecc1f08d82e9f03710005377d3a13d1af34bad5102aeb99a918","affectsGlobalScope":true,"impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"1cf82fb161af09ffaea6e23b9e319c760c136224a391fffbf0df3870433e11f2","impliedFormat":1},{"version":"8110e3abbdf7ee47ce8787813edab6dc79f6f178214ec0efdb9d5d0ebf1afd6a","signature":"081df8dd1109d4b1be003fc3e35beae79880eb7012992f432beb41ac97341ec2","impliedFormat":1},{"version":"7ef00db6015dea5c1c0c14e4974a87616695ce2c78934143d189853a398e2af3","signature":"1afb7e5024f4c7ced94c9b7efbd06967da114542851dc57085b2bcda83d1406e","impliedFormat":1},{"version":"8a490c241435125c6ae8ab6cfbca88de697726191f25f8c09fd378314576c806","signature":"b37cc76c2787c14293866b0a7a616c67e7ec8ac740a3d96c906259e83deaa145","impliedFormat":1},{"version":"d3e6842cfef26390d76cc1bbbcf1c3fdb306924ec76626003a2e16c70e3baf1a","signature":"9398147c02a5a6e1cfa1056ee3ee617c15db397244e372907542229e222fe92f","impliedFormat":1},{"version":"6fdca0b5481f175fd0600d021f2e842c7edffb5e1a4aae7b4f62a85659e6c640","signature":"215277ca189beae36fcbd2792c295f6fab4fea459a1688671605387d0aa9b9f9","impliedFormat":1},{"version":"049cf34dff60d9e701f134c66e0a1c620576df35d7251e70c9877db562067ba6","signature":"71b2d126e939c1ce534264d8bdaccc9f4444eca1afa3649732c383c69386e522","impliedFormat":1},{"version":"3684b02f98e890173229c2f140eeab5e9d15053c831fd276269d4f38d844c64e","signature":"4fccae5d922d4186b7a8c9dbd236f57593b600a056327d79b000d6acc592f4cf","impliedFormat":1},{"version":"2d327f300226ff08a24487e8cd8f8907486c3fdbe82093fc4299f3cda9308735","signature":"051ace40248ab48179838b720dc626daa82a0e03d8fd3076afffc537d7c43ad4","affectsGlobalScope":true,"impliedFormat":1},{"version":"57306bcd9e27c0066fd4960f47778ee3bfc3baadb7a804203e3bcbc07e1e8473","signature":"a97b75e1aa9ba79ca70be9447e9df2eb39bc0bafcb74f566f9a6a652e7c86b79","impliedFormat":1},{"version":"0f6eaa7bc8029e73058f9994d2b5083e0dcdab0a207397dc3446d82df6fc9a51","impliedFormat":1},{"version":"0ba4ae0808c4f9aff6bc8ad71680861aa124b2fb7579e648eed262a5bc6bfd4f","impliedFormat":1},{"version":"ef28deabba43cca7acfaf6f5d75a7ef65342c95c42e13abe0d60d70f2ada113d","impliedFormat":1},{"version":"22dac6bb7d3681dfc86509727deab4d3593ed81fdd1156ffe0f3196414372624","impliedFormat":1},{"version":"716388fac8967b1479097de38a9ecafbb06f65d479d80221c3cdf80c6b03bf8b","impliedFormat":1},{"version":"485ce84a2e2c29a7f50819be204670d079d4cf87fad634d025181872b66c10c4","impliedFormat":1},{"version":"8571d0d500038b851e99ea611fd51c41259550685a7afca8a921732ff758b01e","impliedFormat":1},{"version":"23028135160c7b164e6f09317ff80168b688ae150bd9a99954b3f8840a8046fd","impliedFormat":1},{"version":"f1faa3bad5cd9e57221700c0a25a306bc411971a00cfee559ad93e23f7ee663d","impliedFormat":1},{"version":"a11f87984c9661ea33da75c9582545900f2c900c6663b766518f8700a2e443ef","impliedFormat":1},{"version":"f91a7d05afb252a08ff7c867cbdf3d2a45758e28e3fd272a4c77ba2c940251a1","impliedFormat":1},{"version":"82b59f6e26149c9daee7d25458a8e92d9a6e831ff30c345c01ed7438c4b73fbb","impliedFormat":1},{"version":"daa771190928d0a5fb9d18135397087d63d13f23ebe899a9f2b72416492e1e75","impliedFormat":1},{"version":"7f9835185d1d2404c9a83bf516340f3ac0cd79f9363d4e48195ac6f70b8da62f","impliedFormat":1},{"version":"85d4be2bac99c440d93113d1613163bf3c8f11b5bd9112d3a26d9e16376cdc76","impliedFormat":1},{"version":"73e0fc700725b01d37fd169d71a6bcecc6a46c2ff81d5cc9f6b25eaf809c9889","impliedFormat":1},{"version":"00b5d0e3c24ce1d3f9feaef698b746fec7ed3594a69620e19b2f2dbe37c334be","impliedFormat":1},{"version":"3d52b11e160b46cc21959f96603225f203c05be09937bd158015ba3842659f9f","impliedFormat":1},{"version":"0a077f4a3167699a2641066e601f72de9473f36a7c8b82837388864e7eb607aa","impliedFormat":1},{"version":"8a15aa7c47b0bd7de370741ad2e918fd05a246166f2dd407673dac7ca2d3d36b","impliedFormat":1},{"version":"fffa755863c80aa266c9723381923cac427e737fd265e3a179c61ce0dd5ed3d2","impliedFormat":1},{"version":"b9a34c74d148a26614c30051c17bd98437c84b7202da3693bbb4138af453591f","impliedFormat":1},{"version":"0fed0e7547e58a507103a3798a3dbd704635abe6c5f1e12fd0be31ab8751c5f7","impliedFormat":1},{"version":"031be0c1405e8129404b2dc82894d7fffae8e3b8e7ea0890f3f18b07501132e5","signature":"33577734ee3acddcc3c015090fe6ce6ed3638e22eeb5647f291cbfd81a707489","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"bd1586cd0ce05d2acb582596d81dfa433d96cd81bfed6bf4e75445e755f27a26","impliedFormat":99},{"version":"fbdeada267fe6c0ee05b03ff761147ac2c7484ccf8aa5be8540bf13e50537543","signature":"c04c781355979c86de6e8f9561ad6bfa289dca866eebbba0a0371901d82e3a83","affectsGlobalScope":true,"impliedFormat":1},{"version":"4793f0912df98155da0f0a0e36a388c524fadb6767c8077e453f115b2c5ef278","signature":"ea951e2aee6f35e90cd6b38a66e8e660d2a02c9daa88e654c98000cc98aec91b","affectsGlobalScope":true,"impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"a6613ee552418429af38391e37389036654a882c342a1b81f2711e8ddac597f2","impliedFormat":1},{"version":"da47cb979ae4a849f9b983f43ef34365b7050c4f5ae2ebf818195858774e1d67","impliedFormat":1},{"version":"ac3bcb82d7280fc313a967f311764258d18caf33db6d2b1a0243cde607ff01a0","impliedFormat":1},{"version":"c9b5632d6665177030428d02603aeac3e920d31ec83ac500b55d44c7da74bd84","impliedFormat":1},{"version":"46456824df16d60f243a7e386562b27bac838aaba66050b9bc0f31e1ab34c1f2","impliedFormat":1},{"version":"b91034069e217212d8dda6c92669ee9f180b4c36273b5244c3be2c657f9286c7","impliedFormat":1},{"version":"0697277dd829ac2610d68fe1b457c9e758105bb52d40e149d9c15e5e2fe6dca4","impliedFormat":1},{"version":"b0d06dbb409369169143ede5df1fb58b2fca8d44588e199bd624b6f6d966bf08","impliedFormat":1},{"version":"88dfdb2a44912a28aea3ebb657dc7fcec6ba59f7233005e3405824995b713dac","impliedFormat":1},{"version":"23d7168f75797443d2c05542d1ede64851b2cf14d713dc078febb0c6538b4ba0","impliedFormat":1},{"version":"d9aed3df3f4a1e42a18d442c85950f57decf2474a062f01ab9bf224c066a1d1e","impliedFormat":1},{"version":"c3886d64fc80d215640d9fbffa90ebfd387d8eb012243dd044c9810d9f33b136","impliedFormat":1},{"version":"6e50b2017454705ff94359fc0a2daeba2fa19c133f2f204213d33deed52cf7b4","impliedFormat":1},{"version":"5ffe93378264ba2dba287bce8eabc389b0bfe2266016cc95bd66b64c5a6492a0","impliedFormat":1},{"version":"7ca788d6efb81cf64221b171bbeadc65491fe2e0fc2918efe3ecdaca395ea748","impliedFormat":1},{"version":"da35d6a8ee45e3349b4d577148bdd20c9b29862872e3c40f5d428c32557e5e0c","impliedFormat":1},{"version":"62941034216275e4541d6cfeeb80ae805fcc9639582a540bab4252554f3a613c","impliedFormat":1},{"version":"13aeadb616f9d2b44ea9da3cbfca62e70d30eb616c35425b78a2af3c3bc65b30","impliedFormat":1},{"version":"6ba418e319a0200ab67c2277d9354b6fa8755eed39ab9b584a3acaac6754ff7c","impliedFormat":1},{"version":"4fe80f12b1d5189384a219095c2eabadbb389c2d3703aae7c5376dbaa56061df","impliedFormat":1},{"version":"9eb1d2dceae65d1c82fc6be7e9b6b19cf3ca93c364678611107362b6ad4d2d41","impliedFormat":1},{"version":"cf1dc1d2914dd0f9462bc04c394084304dff5196cce7b725029c792e4e622a5b","impliedFormat":1},{"version":"4523dfd2dda07c1ab19f97034ba371f6553327b2a7189411a70a442546660fd6","impliedFormat":1},{"version":"2e5afb93fc3e6da3486a10effebc44f62bf9c11bec1eebe1d3b03cae91e4434c","impliedFormat":1},{"version":"a8a3779913ddff18d1f516d51bec89f5e3eb149928b859ad3684fae0e10fb2d3","impliedFormat":1},{"version":"a87090ce4dff0ec78b895d3a8803b864680e0b60c457f6bba961892a19954272","impliedFormat":1},{"version":"1991baf0ed3c21f4db584389462764d0519353ef477406f7e4e783c2b2408750","impliedFormat":1},{"version":"388ac09a64783588f92a7787237c2f8a417f402ef8605f154977c395a054b6bc","impliedFormat":1},{"version":"bbd0fce6da05dd72dc1f7c23e31cdcb5088e18f66a5e54450b28de31cfc27ce3","impliedFormat":1},{"version":"c059d7e5d3105a9067e0c0a9e392344a9a16b34d7ce7e41cea3ae9e50e0639f0","impliedFormat":1},{"version":"feeb4514da40bd3c50f6c884c607adb142002b3c8e6a3fe76db41ba8cce644ad","impliedFormat":1},{"version":"e3b0808e9afa9dce875873c2785b771a326e665276099380319637516d8d1aac","impliedFormat":1},{"version":"7247fd1853426de8fdc38a7027b488498bb00ea62c9a99037a760520e3944a26","impliedFormat":1},{"version":"0b6a84d1c3a325b7ed90153f5aad8bf6c8a6fba26f0b6385503218cae4080e25","impliedFormat":1},{"version":"1fadd13460f0bf9e3ca9f9547ba2f422815b413219a148daea0ed999929d3567","impliedFormat":1},{"version":"7e69d416bcd7ed2de96b68192ef3428ab9f0030b5c22ccab5fb94f0559944c8f","impliedFormat":1},{"version":"c118188652cfabf30142e24ac112bcf9e05a80cbd25e60f34bf29746e2358d1e","signature":"ae703a66d8cc760eabbc2a0afe7fd00749f3612d36e732b8d89893809b6cbcc0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3a6672ef484dc0516eabb76ee1b06d0d4dfd2576d715139e01b69bfc701ae30","impliedFormat":99},{"version":"6024e94b0c68b4092949f8a240398c51e7a6e3af55056064b8aa5db0bc7cf903","impliedFormat":99},{"version":"affa3ed45d5647f930f2bc335d51fbf6bc67cc0035e1c3e7a899b6ee347efc7c","impliedFormat":1},{"version":"72c0c2d2a621ee1c9c8676da0fb95d60da2fac306ff69c28e77815d192a4d05f","impliedFormat":1},{"version":"b3f5c18e3f40c78ac6cb98be36789242e0c218f2ad23d1121dfc6164546a9b4c","impliedFormat":1},{"version":"25d490c7b28a3358f6ec70f76334966775d446dc30ba36db3f3d58f289907b00","impliedFormat":1},{"version":"7b6c7ffb68dc666edeb3f648c207c80d00b42ff6d22bf10a4ce0628982418b7c","signature":"60c0971c8c6a1000be2cceabef7d431d678f493e8161c74001b0cb71c9be38c8","affectsGlobalScope":true,"impliedFormat":1},{"version":"d41393eec4438dd812940c3efa292499b3031d31b1d8d4d72a269b95b341f3cf","impliedFormat":1},{"version":"074388271346577d825792a48a86992091d913aaf31c9b5ea3cac25bd474c45a","impliedFormat":1},{"version":"984c26e8864dc326bf6f7a72f89625b3facd86a901d406b7e54aca3d6ef9d674","impliedFormat":1},{"version":"07af913df1d81e6d4c963ceea4d5deedc0b49e91f1cf14283976b19d3b2caffc","impliedFormat":1},{"version":"7b7ff39f07939974bf05d962473edf639147545fae61e39ae6734a4ede55b008","impliedFormat":1},{"version":"5c9b631fd684665b7ab77aadfae34060a03e049bf2b39166a4e3878a2fe978dc","impliedFormat":1},{"version":"65783c6213a9709a5b28a29e8c6602aa4f441fcd3428e5ef30c7d42ed762b34c","impliedFormat":1},{"version":"6d5b33f862a60d8a3ab06dbc703679a5fb1c7cc15d04fca31eda60244f8548e6","impliedFormat":1},{"version":"90195f314de6f89ab09c81406d3d4b5cfe684520f237e3f89941ba4c70d3383a","impliedFormat":1},{"version":"3fb52d31b8bcd5d78ce4d849e1fcefd5fbc5106dbf393a61c2e4c2c9ec936057","impliedFormat":1},{"version":"6f57d264fbb19264ae5aebe606037360c323871fe0287255d93ed864c8baa04d","impliedFormat":1},{"version":"b98e9017e21e894141be4c1811052825875a8f97f7a86fd9c8a9991f3b99cea4","impliedFormat":1},{"version":"ca3251ff37b9334ebe11efe63afb88c9f15cc4d6921456a86d697fc93d185d7f","impliedFormat":1},{"version":"3d70943897bc336fe28c721b463bab2fcda5def22457ea7881e7cd436c79bc34","impliedFormat":1},{"version":"84a488c5fe017f799e54ff0fda5eed362f01553ae989548ded98865cb3930c51","impliedFormat":1},{"version":"69804cd696f09a0a877bc9753a0446cd3f625849026a54c9e20a2f9c544b9d61","impliedFormat":1},{"version":"ac944faf4e74128595eefd0cc96a0a06f9005365b626091c60854001cbcfa5c0","signature":"0c2154fdaf1678880f13464e3ee05c2a4097c4253e4a2add0a9a89b67370354a","affectsGlobalScope":true,"impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"d86d3470d8b9b63fedb10dcc6af7e8c798e3524acb45722adc9b1faa4d579096","signature":"ab62444ce0ea2b41a0b3eeffc7bd9f57cc9f57021f808024629d14f8aee983fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"60ff18bf41b7b6293a6f4038644952b8a7ad3b1d0a6588d8ef0c735d0a69d605","signature":"370a63f01c5f7c0767cfb9309121077ca905c729626e018664fc02a6c2927f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[81,262,[623,631],655,668,669,751,758,775,784,845],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":9,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[1263,1],[527,1],[259,2],[193,1],[192,1],[239,1],[247,1],[231,3],[235,4],[248,5],[249,6],[233,7],[232,8],[236,9],[250,10],[244,1],[251,10],[245,11],[230,12],[261,13],[242,14],[246,15],[252,16],[206,17],[253,18],[241,9],[254,9],[234,19],[195,20],[237,21],[238,15],[218,15],[219,22],[220,23],[194,24],[221,25],[197,26],[196,27],[215,28],[222,17],[223,15],[224,5],[199,29],[200,5],[201,30],[202,5],[203,30],[204,31],[225,32],[205,33],[229,34],[207,35],[208,31],[209,36],[210,20],[198,37],[226,38],[211,39],[243,40],[212,33],[227,32],[228,5],[213,5],[214,5],[216,41],[217,35],[255,9],[256,1],[257,42],[82,1],[240,43],[260,1],[263,44],[81,45],[629,46],[655,47],[262,48],[630,49],[626,50],[627,51],[628,52],[624,53],[625,54],[669,55],[751,56],[758,57],[775,58],[784,59],[845,60],[668,61],[623,62],[631,51],[519,63],[520,64],[986,1],[848,65],[846,1],[642,66],[653,1],[654,67],[651,66],[644,66],[648,68],[649,66],[645,69],[647,66],[650,66],[646,66],[652,66],[643,70],[641,71],[640,72],[638,73],[637,74],[634,75],[635,74],[639,76],[636,77],[633,72],[724,78],[725,1],[727,79],[749,80],[272,81],[273,82],[460,83],[455,84],[457,85],[459,86],[462,87],[270,88],[453,89],[463,90],[454,91],[456,92],[461,93],[269,94],[458,95],[464,96],[465,97],[467,98],[468,99],[469,97],[470,99],[471,98],[472,98],[473,97],[474,97],[475,100],[476,97],[477,101],[466,102],[478,103],[479,104],[480,105],[481,106],[489,107],[516,108],[482,100],[485,109],[483,110],[484,105],[486,1],[512,107],[513,99],[515,111],[514,112],[491,107],[490,107],[498,113],[505,112],[511,114],[506,107],[507,107],[508,107],[510,115],[488,1],[487,107],[442,116],[443,116],[441,117],[444,1],[445,44],[446,44],[447,44],[452,118],[448,1],[451,119],[450,120],[449,119],[399,121],[400,44],[401,122],[330,123],[398,124],[396,44],[397,125],[378,126],[395,127],[352,44],[375,1],[372,44],[345,44],[344,44],[365,44],[373,128],[359,44],[346,129],[340,130],[350,129],[349,129],[334,44],[335,44],[336,44],[343,44],[368,44],[348,129],[358,44],[347,44],[333,44],[364,131],[377,132],[331,44],[370,1],[371,44],[332,129],[362,1],[351,129],[355,1],[366,1],[341,133],[342,129],[338,130],[354,130],[360,44],[353,134],[376,44],[357,129],[356,44],[361,130],[337,44],[363,44],[339,135],[369,1],[367,129],[374,1],[379,136],[383,137],[384,138],[385,138],[386,138],[387,138],[394,139],[388,138],[389,138],[390,136],[382,138],[381,140],[391,138],[392,138],[393,138],[380,44],[304,44],[326,44],[294,44],[296,44],[313,141],[293,44],[280,1],[318,44],[327,141],[311,44],[295,141],[289,142],[281,1],[282,1],[302,141],[301,141],[283,44],[284,44],[285,44],[292,44],[322,44],[300,141],[310,44],[297,44],[279,44],[317,44],[329,143],[277,144],[324,1],[325,44],[278,145],[315,1],[303,141],[307,1],[320,1],[290,146],[291,141],[287,142],[306,142],[312,44],[305,141],[298,147],[276,44],[309,141],[308,44],[319,44],[314,142],[286,44],[316,44],[288,148],[323,1],[321,141],[299,147],[328,1],[948,1],[982,149],[981,149],[980,1],[984,150],[985,150],[983,1],[951,1],[949,151],[952,152],[950,152],[953,1],[992,1],[993,1],[997,1],[994,1],[1004,151],[1003,1],[1005,1],[1006,153],[998,154],[1002,155],[999,156],[995,1],[1000,157],[1001,158],[996,1],[968,151],[964,151],[967,151],[966,151],[965,151],[961,151],[960,151],[963,151],[962,151],[955,151],[956,159],[954,1],[959,160],[957,151],[1010,161],[989,162],[991,162],[990,162],[987,163],[988,162],[1008,1],[1007,1],[1009,1],[969,164],[970,1],[973,1],[976,1],[971,1],[978,1],[979,165],[975,1],[972,1],[974,1],[977,1],[958,1],[916,1],[919,166],[499,167],[492,107],[497,168],[494,167],[504,169],[495,167],[503,170],[501,171],[496,167],[493,107],[502,172],[509,173],[500,1],[918,1],[776,174],[594,1],[785,1],[786,1],[787,1],[844,175],[788,176],[833,177],[790,178],[789,179],[791,176],[792,176],[794,180],[793,176],[795,181],[796,181],[797,176],[799,182],[800,176],[801,182],[802,176],[804,176],[805,176],[806,176],[807,183],[803,176],[808,1],[809,184],[810,184],[811,184],[812,184],[813,184],[822,185],[814,184],[815,184],[816,184],[817,184],[819,184],[818,184],[820,184],[821,184],[823,176],[824,176],[798,176],[825,182],[827,186],[826,176],[828,176],[829,176],[830,187],[832,176],[831,176],[834,176],[836,176],[837,188],[835,176],[838,176],[839,176],[840,176],[841,176],[842,176],[843,176],[851,189],[847,65],[849,190],[850,65],[664,191],[852,192],[853,1],[268,1],[854,193],[663,174],[781,1],[779,194],[777,195],[855,1],[857,196],[858,196],[859,1],[860,1],[862,197],[863,1],[864,1],[865,196],[866,1],[867,1],[868,198],[869,1],[870,1],[871,199],[872,1],[873,200],[874,1],[875,1],[876,1],[877,1],[880,1],[879,201],[856,1],[881,202],[882,1],[878,1],[883,1],[884,196],[885,203],[886,204],[888,205],[894,206],[893,207],[892,208],[889,1],[891,209],[890,1],[660,210],[666,211],[665,210],[897,212],[861,1],[899,213],[900,214],[902,215],[904,216],[905,216],[906,216],[903,1],[909,217],[907,218],[908,218],[910,1],[780,1],[661,1],[911,219],[912,220],[913,1],[914,221],[915,222],[924,223],[421,1],[895,224],[896,1],[925,225],[778,1],[926,226],[927,227],[782,227],[783,228],[933,229],[935,230],[936,231],[934,232],[937,233],[938,234],[939,235],[940,236],[941,237],[942,238],[943,239],[944,240],[945,241],[946,242],[947,215],[656,1],[898,1],[1139,1],[1140,1],[1146,243],[1143,244],[1142,245],[1145,246],[1141,1],[1144,244],[887,1],[1147,220],[567,247],[568,247],[569,248],[526,249],[570,250],[571,251],[572,252],[521,1],[524,253],[522,1],[523,1],[573,254],[574,255],[575,256],[576,257],[577,258],[578,259],[579,259],[581,260],[580,261],[582,262],[583,263],[584,264],[566,265],[525,1],[585,266],[586,267],[587,268],[620,269],[588,270],[589,271],[590,272],[544,273],[554,274],[543,273],[564,275],[535,276],[534,277],[563,220],[557,278],[562,279],[537,280],[551,281],[536,282],[560,283],[532,284],[531,220],[561,285],[533,286],[538,287],[539,1],[542,287],[529,1],[565,288],[555,289],[546,290],[547,291],[549,292],[545,293],[548,294],[558,220],[540,295],[541,296],[550,297],[530,298],[553,289],[552,287],[556,1],[559,299],[591,300],[592,301],[593,302],[595,303],[596,304],[597,305],[598,306],[599,306],[600,307],[601,1],[602,308],[604,309],[603,310],[605,311],[606,312],[607,313],[608,314],[609,315],[610,316],[611,317],[612,318],[613,319],[614,320],[615,321],[616,322],[617,323],[618,324],[619,325],[1148,220],[1149,1],[1150,1],[1156,326],[1151,1],[1157,1],[1160,1],[266,1],[1161,1],[658,1],[1164,327],[1163,328],[659,1],[1165,107],[1170,329],[1169,330],[1172,329],[1171,331],[1168,332],[1166,1],[1167,333],[264,1],[267,334],[271,107],[1173,335],[1174,1],[1191,336],[1216,337],[1217,338],[1192,339],[1195,339],[1214,337],[1215,337],[1205,337],[1204,340],[1202,337],[1197,337],[1210,337],[1208,337],[1212,337],[1196,337],[1209,337],[1213,337],[1198,337],[1199,337],[1211,337],[1193,337],[1200,337],[1201,337],[1203,337],[1207,337],[1218,341],[1206,337],[1194,337],[1231,342],[1230,1],[1225,341],[1227,343],[1226,341],[1219,341],[1220,341],[1222,341],[1224,341],[1228,343],[1229,343],[1221,343],[1223,343],[657,344],[1233,345],[1232,195],[662,346],[1234,174],[1235,1],[1236,1],[1237,1],[1240,347],[1239,348],[1238,349],[1013,350],[1012,1],[1242,351],[901,1],[1258,352],[1256,353],[1255,354],[1246,355],[1247,356],[1254,357],[1248,356],[1249,355],[1250,355],[1251,355],[1252,358],[1245,359],[1253,354],[1244,1],[1257,360],[1259,361],[1260,1],[667,362],[621,362],[1261,1],[1262,363],[632,1],[714,364],[671,1],[673,365],[672,366],[677,367],[712,368],[709,369],[711,370],[674,369],[675,371],[679,371],[678,372],[676,373],[710,374],[723,375],[708,369],[713,376],[706,1],[707,1],[680,377],[685,369],[687,369],[682,369],[683,377],[689,369],[690,378],[681,369],[686,369],[688,369],[684,369],[704,379],[703,369],[705,380],[699,369],[720,381],[718,382],[717,369],[715,367],[722,383],[719,384],[716,382],[721,382],[701,369],[700,369],[696,369],[702,385],[697,369],[698,386],[691,369],[692,369],[693,369],[694,369],[695,369],[670,1],[1243,1],[528,1],[917,1],[435,387],[436,388],[755,1],[753,389],[752,1],[265,1],[1130,390],[1126,1],[1127,1],[1125,1],[1128,1],[1129,1],[1131,1],[1123,1],[1124,391],[1132,392],[1014,393],[191,1],[923,394],[726,395],[748,396],[734,174],[736,397],[735,226],[745,398],[743,399],[746,400],[741,401],[740,402],[737,403],[738,404],[739,405],[733,406],[744,407],[742,408],[731,409],[747,410],[732,411],[730,412],[728,413],[1186,414],[1187,415],[1185,416],[1188,417],[1182,418],[1183,419],[1184,420],[1178,418],[1179,418],[1181,421],[1180,418],[1177,422],[517,423],[518,424],[406,425],[407,1],[404,426],[402,427],[408,428],[403,429],[405,430],[275,1],[434,431],[418,432],[419,432],[429,433],[430,434],[432,435],[431,436],[433,437],[414,438],[410,439],[415,432],[416,440],[413,441],[412,439],[411,439],[409,442],[417,443],[422,44],[420,44],[424,444],[427,445],[423,446],[428,447],[425,444],[426,44],[438,448],[437,44],[440,449],[439,448],[750,450],[622,451],[99,452],[167,453],[166,454],[165,455],[104,456],[120,457],[118,458],[119,459],[105,460],[190,461],[90,1],[94,1],[92,462],[93,1],[97,463],[100,1],[117,464],[95,1],[112,465],[98,466],[113,467],[116,468],[114,468],[111,469],[91,1],[96,1],[115,470],[121,471],[109,1],[103,472],[101,473],[110,474],[107,475],[106,475],[102,476],[108,477],[186,478],[180,479],[173,480],[172,481],[181,482],[182,468],[174,483],[187,484],[168,485],[169,486],[170,487],[189,488],[171,481],[175,484],[176,489],[183,490],[184,466],[185,489],[188,468],[177,487],[122,491],[178,492],[179,493],[164,494],[162,495],[163,495],[126,495],[127,495],[128,495],[129,495],[130,495],[131,495],[132,495],[133,495],[134,495],[154,495],[135,495],[136,495],[137,495],[138,495],[139,495],[140,495],[161,495],[141,495],[142,495],[143,495],[144,495],[159,495],[145,495],[160,495],[146,495],[157,495],[158,495],[147,495],[148,495],[149,495],[155,495],[156,495],[150,495],[151,495],[152,495],[153,495],[125,496],[124,497],[123,498],[89,1],[757,499],[771,500],[772,501],[770,502],[767,503],[774,504],[768,505],[769,506],[773,507],[765,508],[759,1],[763,509],[764,510],[760,1],[761,1],[766,1],[762,1],[756,1],[258,1],[921,511],[922,512],[729,513],[1176,1],[1015,514],[1058,515],[1057,516],[1056,517],[1059,1],[1135,518],[1134,1],[1138,519],[1136,520],[1011,521],[1137,522],[1060,523],[1133,524],[1122,525],[1062,526],[1063,526],[1064,526],[1065,526],[1066,526],[1119,526],[1067,526],[1068,526],[1069,526],[1070,526],[1071,526],[1072,526],[1073,526],[1074,526],[1118,526],[1075,526],[1076,526],[1077,526],[1078,526],[1079,526],[1080,526],[1081,526],[1082,526],[1083,526],[1084,526],[1085,526],[1086,526],[1121,526],[1087,526],[1088,526],[1089,526],[1090,526],[1091,526],[1092,526],[1093,526],[1094,526],[1095,526],[1096,526],[1097,526],[1098,526],[1120,526],[1099,526],[1100,526],[1101,526],[1102,526],[1103,526],[1104,526],[1105,526],[1106,526],[1107,526],[1108,526],[1109,526],[1110,526],[1111,526],[1112,526],[1113,526],[1114,526],[1115,526],[1116,526],[1117,526],[1061,527],[1054,528],[1055,529],[1175,530],[1155,531],[1152,220],[1154,532],[1153,1],[1158,1],[1159,533],[920,534],[1190,535],[1189,536],[930,537],[929,538],[928,539],[1241,1],[931,1],[1162,328],[79,1],[1046,540],[1032,541],[1043,542],[1016,1],[1034,543],[1033,1],[1035,544],[1041,545],[1040,1],[1017,1],[1038,1],[1039,1],[1025,546],[1020,1],[1019,547],[1018,1],[1027,1],[1044,548],[1023,546],[1026,1],[1031,1],[1024,546],[1021,547],[1022,1],[1028,547],[1029,547],[1042,1],[1037,1],[1045,1],[1036,1],[1047,1],[1030,1],[1048,549],[1049,549],[1053,550],[1050,551],[1051,552],[1052,551],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[754,1],[274,1],[932,553],[84,554],[85,555],[88,556],[83,1],[86,554],[87,554],[80,1]],"latestChangedDtsFile":"./dist/servers/lambda/v1/index.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Copy.d.ts b/grafast/ruru-components/dist/components/Copy.d.ts new file mode 100644 index 0000000000..acb5525382 --- /dev/null +++ b/grafast/ruru-components/dist/components/Copy.d.ts @@ -0,0 +1,7 @@ +import type { FC } from "react"; +export declare const Copy: FC<{ + text?: string; + json?: any; + children: string | JSX.Element | JSX.Element[]; +}>; +//# sourceMappingURL=Copy.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Copy.d.ts.map b/grafast/ruru-components/dist/components/Copy.d.ts.map new file mode 100644 index 0000000000..ba3b91d17e --- /dev/null +++ b/grafast/ruru-components/dist/components/Copy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Copy.d.ts","sourceRoot":"","sources":["../../src/components/Copy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CAChD,CA8BA,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Copy.js b/grafast/ruru-components/dist/components/Copy.js new file mode 100644 index 0000000000..3c72492b41 --- /dev/null +++ b/grafast/ruru-components/dist/components/Copy.js @@ -0,0 +1,20 @@ +import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; +import { useCallback, useMemo, useRef } from "react"; +export const Copy = ({ text: rawText, json, children }) => { + const text = useMemo(() => rawText ?? (json !== undefined ? JSON.stringify(json) : undefined), [rawText, json]); + const ref = useRef(null); + const copy = useCallback(() => { + const el = ref.current; + if (el) { + /* Select the text field */ + el.select(); + el.setSelectionRange(0, 99999); /* For mobile devices */ + /* Copy the text inside the text field */ + navigator.clipboard.writeText(el.value); + } + }, []); + return (_jsxs(_Fragment, { children: [_jsx("textarea", { ref: (el) => { + ref.current = el; + }, value: text, readOnly: true, style: { display: "none" } }), _jsx("button", { onClick: copy, children: children })] })); +}; +//# sourceMappingURL=Copy.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Copy.js.map b/grafast/ruru-components/dist/components/Copy.js.map new file mode 100644 index 0000000000..6695352ef7 --- /dev/null +++ b/grafast/ruru-components/dist/components/Copy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Copy.js","sourceRoot":"","sources":["../../src/components/Copy.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,CAAC,MAAM,IAAI,GAIZ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,OAAO,CAClB,GAAG,EAAE,CAAC,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EACxE,CAAC,OAAO,EAAE,IAAI,CAAC,CAChB,CAAC;IACF,MAAM,GAAG,GAAG,MAAM,CAA6B,IAAI,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE;QAC5B,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;QACvB,IAAI,EAAE,EAAE,CAAC;YACP,2BAA2B;YAC3B,EAAE,CAAC,MAAM,EAAE,CAAC;YACZ,EAAE,CAAC,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,wBAAwB;YAExD,yCAAyC;YACzC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACL,8BACE,mBACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE;oBACV,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC;gBACnB,CAAC,EACD,KAAK,EAAE,IAAI,EACX,QAAQ,QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAC1B,EACF,iBAAQ,OAAO,EAAE,IAAI,YAAG,QAAQ,GAAU,IACzC,CACJ,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/ErrorPopup.d.ts b/grafast/ruru-components/dist/components/ErrorPopup.d.ts new file mode 100644 index 0000000000..46c2b3ae84 --- /dev/null +++ b/grafast/ruru-components/dist/components/ErrorPopup.d.ts @@ -0,0 +1,6 @@ +import type { FC } from "react"; +export declare const ErrorPopup: FC<{ + error: Error; + onClose: () => void; +}>; +//# sourceMappingURL=ErrorPopup.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/ErrorPopup.d.ts.map b/grafast/ruru-components/dist/components/ErrorPopup.d.ts.map new file mode 100644 index 0000000000..faa53d5348 --- /dev/null +++ b/grafast/ruru-components/dist/components/ErrorPopup.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ErrorPopup.d.ts","sourceRoot":"","sources":["../../src/components/ErrorPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAUhE,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/ErrorPopup.js b/grafast/ruru-components/dist/components/ErrorPopup.js new file mode 100644 index 0000000000..3ab15d5bd2 --- /dev/null +++ b/grafast/ruru-components/dist/components/ErrorPopup.js @@ -0,0 +1,4 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +// TODO: this needs proper design and accessibility considerations +export const ErrorPopup = ({ error, onClose, }) => (_jsxs("div", { className: "errorPopup", children: [_jsx("button", { className: "errorPopupClose", onClick: onClose, children: "\uD83D\uDDD9" }), _jsx("div", { className: "errorPopupError", children: String(error) })] })); +//# sourceMappingURL=ErrorPopup.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/ErrorPopup.js.map b/grafast/ruru-components/dist/components/ErrorPopup.js.map new file mode 100644 index 0000000000..580fda91ce --- /dev/null +++ b/grafast/ruru-components/dist/components/ErrorPopup.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ErrorPopup.js","sourceRoot":"","sources":["../../src/components/ErrorPopup.tsx"],"names":[],"mappings":";AAEA,kEAAkE;AAElE,MAAM,CAAC,MAAM,UAAU,GAA8C,CAAC,EACpE,KAAK,EACL,OAAO,GACR,EAAE,EAAE,CAAC,CACJ,eAAK,SAAS,EAAC,YAAY,aACzB,iBAAQ,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,OAAO,6BAE3C,EACT,cAAK,SAAS,EAAC,iBAAiB,YAAE,MAAM,CAAC,KAAK,CAAC,GAAO,IAClD,CACP,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Explain.d.ts b/grafast/ruru-components/dist/components/Explain.d.ts new file mode 100644 index 0000000000..8fbcc1b1a9 --- /dev/null +++ b/grafast/ruru-components/dist/components/Explain.d.ts @@ -0,0 +1,19 @@ +import type { FC } from "react"; +import type { ExplainHelpers } from "../hooks/useExplain.js"; +import type { ExplainResults } from "../hooks/useFetcher.js"; +declare global { + interface Window { + mermaid?: any; + } +} +export declare const Explain: FC<{ + explain: boolean; + setExplain: (newExplain: boolean) => void; + helpers: ExplainHelpers; + results: ExplainResults | null; +}>; +export declare const ExplainMain: FC<{ + helpers: ExplainHelpers; + results: ExplainResults; +}>; +//# sourceMappingURL=Explain.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Explain.d.ts.map b/grafast/ruru-components/dist/components/Explain.d.ts.map new file mode 100644 index 0000000000..1bef8969c1 --- /dev/null +++ b/grafast/ruru-components/dist/components/Explain.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Explain.d.ts","sourceRoot":"","sources":["../../src/components/Explain.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE,GAAG,CAAC;KACf;CACF;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC,CA6BA,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC;IAC3B,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;CACzB,CAgJA,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Explain.js b/grafast/ruru-components/dist/components/Explain.js new file mode 100644 index 0000000000..475994567e --- /dev/null +++ b/grafast/ruru-components/dist/components/Explain.js @@ -0,0 +1,82 @@ +import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; +import { planToMermaid } from "grafast/mermaid"; +import { useCallback, useEffect, useRef, useState } from "react"; +import { createPortal } from "react-dom"; +import { Copy } from "./Copy.js"; +import { FormatSQL } from "./FormatSQL.js"; +import { Mermaid } from "./Mermaid.js"; +export const Explain = ({ explain, setExplain, helpers, results }) => { + return (_jsx(_Fragment, { children: !results ? (!explain ? (_jsxs(_Fragment, { children: [_jsx("p", { children: "WARNING: you've not enabled the 'explain' functionality" }), _jsx("p", { children: _jsx("button", { onClick: () => setExplain(true), children: "Enable explain" }) })] })) : (_jsx("p", { children: "There are no explain results to display - perhaps you have not yet ran an operation against a server that supports this feature?" }))) : results.operations.length === 0 ? (_jsx("p", { children: "Empty explain results" })) : (_jsx("div", { children: _jsx(ExplainMain, { helpers: helpers, results: results }) })) })); +}; +export const ExplainMain = ({ results }) => { + const [selectedIndex, setSelectedIndex] = useState(0); + useEffect(() => { + setSelectedIndex(0); + }, [results]); + const selectedResult = results.operations[selectedIndex]; + const [expanded, setExpanded] = useState(false); + const expand = useCallback(() => { + setExpanded(true); + }, []); + const nodeRef = useRef(); + if (!nodeRef.current) { + nodeRef.current = document.createElement("div"); + } + const node = nodeRef.current; + useEffect(() => { + document.body.appendChild(node); + return () => { + document.body.removeChild(node); + }; + }, [node]); + const [saving, setSaving] = useState(false); + const saveSVG = useCallback(() => { + if (!selectedResult || selectedResult.type !== "plan") + return; + setSaving(true); + setTimeout(() => { + if (window.mermaid) { + const diagram = planToMermaid(selectedResult.plan); + window.mermaid.mermaidAPI + .render("id1", diagram) + .then(({ svg }) => { + const file = new File([svg.replace(/
/g, "
")], "grafast-plan.svg"); + const a = document.createElement("a"); + a.href = URL.createObjectURL(file); + a.download = file.name; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + setSaving(false); + setTimeout(() => { + URL.revokeObjectURL(a.href); + a.parentNode.removeChild(a); + }, 0); + }); + } + else { + alert("Mermaid hasn't loaded (yet)"); + } + }, 0); + }, [selectedResult]); + const component = (() => { + switch (selectedResult?.type) { + case "sql": { + return (_jsxs("div", { children: [selectedResult.explain ? (_jsxs(_Fragment, { children: [_jsxs("h4", { children: ["Result from SQL", " ", _jsx("a", { href: "https://www.postgresql.org/docs/current/sql-explain.html", children: "EXPLAIN" }), " ", "on executed query:"] }), _jsx("pre", { className: "explain-plan", children: _jsx("code", { children: selectedResult.explain }) }), _jsx(Copy, { text: selectedResult.explain, children: "Copy plan" })] })) : null, _jsx("h4", { children: "Executed SQL query:" }), _jsx(FormatSQL, { sql: selectedResult.query }), _jsx(Copy, { text: selectedResult.query, children: "Copy SQL" })] })); + } + case "plan": { + return (_jsxs(_Fragment, { children: [_jsx(Copy, { json: selectedResult.plan, children: "Copy plan JSON" }), _jsx("button", { onClick: saveSVG, disabled: saving, children: "Save Mermaid Diagram" }), _jsx("div", { onClick: expand, children: _jsx(Mermaid, { plan: selectedResult.plan }) }), expanded + ? createPortal(_jsxs("div", { className: "explainExpandedContainer", children: [_jsx("div", { className: "explainExpandedTitle", children: "Operation Plan" }), _jsx("div", { className: "explainExpandedCloseContainer", children: _jsx("button", { className: "explainExpandedCloseButton", onClick: () => setExpanded(false), children: "\u00D7" }) }), _jsx("div", { className: "explainExpandedMain", children: _jsx(Mermaid, { plan: selectedResult.plan }) })] }), node) + : null] })); + } + case undefined: { + return (_jsxs("div", { children: ["Explain result type '$", selectedResult.type, "' not yet supported."] })); + } + default: { + return _jsx("div", {}); + } + } + })(); + return (_jsxs("div", { children: [_jsx("select", { value: String(selectedIndex), onChange: (e) => setSelectedIndex(parseInt(e.target.value, 10)), children: results.operations.map((o, i) => (_jsx("option", { value: String(i), children: o.title }, i))) }), component] })); +}; +//# sourceMappingURL=Explain.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Explain.js.map b/grafast/ruru-components/dist/components/Explain.js.map new file mode 100644 index 0000000000..d3d8641d14 --- /dev/null +++ b/grafast/ruru-components/dist/components/Explain.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Explain.js","sourceRoot":"","sources":["../../src/components/Explain.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAIzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,MAAM,CAAC,MAAM,OAAO,GAKf,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IACjD,OAAO,CACL,4BACG,CAAC,OAAO,CAAC,CAAC,CAAC,CACV,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,8BACE,kFAGI,EACJ,sBACE,iBAAQ,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,+BAAyB,GAC9D,IACH,CACJ,CAAC,CAAC,CAAC,CACF,2JAGI,CACL,CACF,CAAC,CAAC,CAAC,OAAO,CAA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AAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,uBAG1B,GACL,EACN,cAAK,SAAS,EAAC,qBAAqB,YAClC,KAAC,OAAO,IAAC,IAAI,EAAE,cAAc,CAAC,IAAI,GAAI,GAClC,IACF,EAEN,IAAI,CACL;4BACH,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;YACJ,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,OAAO,CACL,oDAC+B,cAAsB,CAAC,IAAI,4BAEpD,CACP,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,eAAW,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,CACL,0BACE,iBACE,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,EAC5B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,YAE9D,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAChC,iBAAQ,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,YACrB,CAAC,CAAC,KAAK,IADqB,CAAC,CAEvB,CACV,CAAC,GACK,EACR,SAAS,IACN,CACP,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Footer.d.ts b/grafast/ruru-components/dist/components/Footer.d.ts new file mode 100644 index 0000000000..14d3717f3d --- /dev/null +++ b/grafast/ruru-components/dist/components/Footer.d.ts @@ -0,0 +1,3 @@ +import type { FC } from "react"; +export declare const RuruFooter: FC; +//# sourceMappingURL=Footer.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Footer.d.ts.map b/grafast/ruru-components/dist/components/Footer.d.ts.map new file mode 100644 index 0000000000..d6c1db40e4 --- /dev/null +++ b/grafast/ruru-components/dist/components/Footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../src/components/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,eAAO,MAAM,UAAU,EAAE,EAYxB,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Footer.js b/grafast/ruru-components/dist/components/Footer.js new file mode 100644 index 0000000000..5a45b04c7f --- /dev/null +++ b/grafast/ruru-components/dist/components/Footer.js @@ -0,0 +1,3 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +export const RuruFooter = () => (_jsxs("div", { style: { padding: 7 }, children: ["Community-funded OSS \uD83D\uDE4F", " ", _jsx("a", { title: "All our projects are supported by the community, please sponsor ongoing development", href: "https://graphile.org/sponsor/", target: "new", children: "please sponsor" }), " ", "\uD83D\uDC96"] })); +//# sourceMappingURL=Footer.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Footer.js.map b/grafast/ruru-components/dist/components/Footer.js.map new file mode 100644 index 0000000000..29b5928a8a --- /dev/null +++ b/grafast/ruru-components/dist/components/Footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../src/components/Footer.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,UAAU,GAAO,GAAG,EAAE,CAAC,CAClC,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,kDACA,GAAG,EAC3B,YACE,KAAK,EAAC,qFAAqF,EAC3F,IAAI,EAAC,+BAA+B,EACpC,MAAM,EAAC,KAAK,+BAGV,EAAC,GAAG,oBAEJ,CACP,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/FormatSQL.d.ts b/grafast/ruru-components/dist/components/FormatSQL.d.ts new file mode 100644 index 0000000000..e215ea1dd9 --- /dev/null +++ b/grafast/ruru-components/dist/components/FormatSQL.d.ts @@ -0,0 +1,5 @@ +import type { FC } from "react"; +export declare const FormatSQL: FC<{ + sql: string; +}>; +//# sourceMappingURL=FormatSQL.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/FormatSQL.d.ts.map b/grafast/ruru-components/dist/components/FormatSQL.d.ts.map new file mode 100644 index 0000000000..35a87ad308 --- /dev/null +++ b/grafast/ruru-components/dist/components/FormatSQL.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FormatSQL.d.ts","sourceRoot":"","sources":["../../src/components/FormatSQL.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CA+DzC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/FormatSQL.js b/grafast/ruru-components/dist/components/FormatSQL.js new file mode 100644 index 0000000000..9af5e94d55 --- /dev/null +++ b/grafast/ruru-components/dist/components/FormatSQL.js @@ -0,0 +1,83 @@ +import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime"; +import { useCallback, useMemo, useState } from "react"; +export const FormatSQL = ({ sql }) => { + const [highlitIndex, setHighlitIndex] = useState(null); + const formattedSQL = useMemo(() => { + const lines = sql.split("\n"); + const elements = []; + const knownIdentifiers = new Map(); + let identifierCount = 0; + const makeParts = (line) => { + const parts = []; + let idx = 0; + const re = /__([a-zA-Z0-9](_?[a-zA-Z0-9])*)(__|_[0-9]+(?![a-zA-Z0-9_]))/g; + let matches; + while ((matches = re.exec(line))) { + const start = matches.index; + const fin = re.lastIndex; + if (start > idx) { + parts.push(_jsx(_Fragment, { children: line.substring(idx, start) })); + } + idx = fin; + const [full] = matches; + const f = knownIdentifiers.get(full); + if (f) { + parts.push(f); + } + else { + const index = identifierCount++; + const sub = (_jsx(Highlight, { n: index, highlit: index === highlitIndex, setHighlitIndex: setHighlitIndex, children: full })); + knownIdentifiers.set(full, sub); + parts.push(sub); + } + } + if (idx < line.length) { + parts.push(_jsx(_Fragment, { children: line.substring(idx) })); + } + return parts; + }; + for (let i = 0, l = lines.length; i < l; i++) { + const line = lines[i]; + const parts = makeParts(line); + elements.push(_jsx("code", { style: { + display: "block", + marginLeft: "1.8rem", + textIndent: "-1.8rem", + }, children: parts }, i)); + } + return elements; + }, [sql, highlitIndex]); + return _jsx("pre", { className: "explain-sql", children: formattedSQL }); +}; +const COLORS = [ + "#00bfff", + "#ffa500", + "#7fff00", + "#ff1493", + "#808000", + "#dda0dd", + "#ff0000", + "#4169e1", + "#3cb371", + "#a52a2a", + "#ff00ff", +]; +const Highlight = ({ n, highlit, setHighlitIndex, children }) => { + const color = COLORS[n % COLORS.length]; + const style = highlit + ? { + color, + borderRadius: "3px", + fontWeight: "900", + backgroundColor: "hsla(var(--color-primary),var(--alpha-background-medium))", + } + : { color }; + const onMouseEnter = useCallback(() => { + setHighlitIndex(n); + }, [setHighlitIndex, n]); + const onMouseLeave = useCallback(() => { + setHighlitIndex(null); + }, [setHighlitIndex]); + return (_jsx("strong", { style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: children })); +}; +//# sourceMappingURL=FormatSQL.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/FormatSQL.js.map b/grafast/ruru-components/dist/components/FormatSQL.js.map new file mode 100644 index 0000000000..08d37c244b --- /dev/null +++ b/grafast/ruru-components/dist/components/FormatSQL.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FormatSQL.js","sourceRoot":"","sources":["../../src/components/FormatSQL.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAwB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IACxD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,IAAI,CAA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CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,OAAO;QACnB,CAAC,CAAC;YACE,KAAK;YACL,YAAY,EAAE,KAAK;YACnB,UAAU,EAAE,KAAK;YACjB,eAAe,EACb,2DAA2D;SAC9D;QACH,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IACd,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,eAAe,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,OAAO,CACL,iBACE,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,YAEzB,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Mermaid.d.ts b/grafast/ruru-components/dist/components/Mermaid.d.ts new file mode 100644 index 0000000000..524c818c9e --- /dev/null +++ b/grafast/ruru-components/dist/components/Mermaid.d.ts @@ -0,0 +1,6 @@ +import type { GrafastPlanJSON } from "grafast/mermaid"; +import type { FC } from "react"; +export declare const Mermaid: FC<{ + plan: GrafastPlanJSON; +}>; +//# sourceMappingURL=Mermaid.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Mermaid.d.ts.map b/grafast/ruru-components/dist/components/Mermaid.d.ts.map new file mode 100644 index 0000000000..e28fc2edd1 --- /dev/null +++ b/grafast/ruru-components/dist/components/Mermaid.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Mermaid.d.ts","sourceRoot":"","sources":["../../src/components/Mermaid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,CA2BjD,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Mermaid.js b/grafast/ruru-components/dist/components/Mermaid.js new file mode 100644 index 0000000000..a45d9c2586 --- /dev/null +++ b/grafast/ruru-components/dist/components/Mermaid.js @@ -0,0 +1,28 @@ +import { jsx as _jsx } from "react/jsx-runtime"; +import { planToMermaid } from "grafast/mermaid"; +import { useEffect, useMemo } from "react"; +let initialized = false; +export const Mermaid = ({ plan }) => { + const diagram = useMemo(() => planToMermaid(plan), [plan]); + useEffect(() => { + if (window.mermaid) { + if (!initialized) { + initialized = true; + window.mermaid.initialize({ + startOnLoad: true, + maxTextSize: 1000000, + }); + } + if (diagram) { + window.mermaid.contentLoaded(); + } + } + }, [diagram]); + if (window.mermaid) { + return (_jsx("div", { className: "mermaid", children: diagram }, diagram)); + } + else { + return (_jsx("div", { children: "Mermaid hasn't (yet) loaded, so we cannot render plan diagrams" })); + } +}; +//# sourceMappingURL=Mermaid.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/components/Mermaid.js.map b/grafast/ruru-components/dist/components/Mermaid.js.map new file mode 100644 index 0000000000..8d9451820f --- /dev/null +++ b/grafast/ruru-components/dist/components/Mermaid.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Mermaid.js","sourceRoot":"","sources":["../../src/components/Mermaid.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,OAAO,GAAkC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,WAAW,GAAG,IAAI,CAAC;gBACnB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;oBACxB,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,OAAO;iBACrB,CAAC,CAAC;YACL,CAAC;YACD,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;YACjC,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACd,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,CACL,cAAK,SAAS,EAAC,SAAS,YACrB,OAAO,IADoB,OAAO,CAE/B,CACP,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CACL,2FAAyE,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/defaultQuery.d.ts b/grafast/ruru-components/dist/defaultQuery.d.ts new file mode 100644 index 0000000000..22a5525bd0 --- /dev/null +++ b/grafast/ruru-components/dist/defaultQuery.d.ts @@ -0,0 +1,2 @@ +export declare const defaultQuery = "# Welcome to Ruru, our distribution of GraphiQL and related tooling to\n# inspect your GraphQL API.\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Type queries into this side of the screen, and you will see intelligent\n# typeaheads aware of the current GraphQL type schema and live syntax and\n# validation errors highlighted within the text.\n#\n# GraphQL queries typically start with a \"{\" character. Lines that starts\n# with a # are ignored.\n#\n# An example GraphQL query might look like:\n#\n# {\n# field(arg: \"value\") {\n# subField\n# }\n# }\n#\n# Keyboard shortcuts:\n#\n# Prettify Query: Shift-Ctrl-P (or press the prettify button above)\n#\n# Merge Query: Shift-Ctrl-M (or press the merge button above)\n#\n# Run Query: Ctrl-Enter (or press the play button above)\n#\n# Auto Complete: Ctrl-Space (or just start typing)\n#\n"; +//# sourceMappingURL=defaultQuery.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/defaultQuery.d.ts.map b/grafast/ruru-components/dist/defaultQuery.d.ts.map new file mode 100644 index 0000000000..a954c3a1c4 --- /dev/null +++ b/grafast/ruru-components/dist/defaultQuery.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultQuery.d.ts","sourceRoot":"","sources":["../src/defaultQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,66BAgCxB,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/defaultQuery.js b/grafast/ruru-components/dist/defaultQuery.js new file mode 100644 index 0000000000..a93ed65303 --- /dev/null +++ b/grafast/ruru-components/dist/defaultQuery.js @@ -0,0 +1,34 @@ +export const defaultQuery = `\ +# Welcome to Ruru, our distribution of GraphiQL and related tooling to +# inspect your GraphQL API. +# +# GraphiQL is an in-browser tool for writing, validating, and +# testing GraphQL queries. +# +# Type queries into this side of the screen, and you will see intelligent +# typeaheads aware of the current GraphQL type schema and live syntax and +# validation errors highlighted within the text. +# +# GraphQL queries typically start with a "{" character. Lines that starts +# with a # are ignored. +# +# An example GraphQL query might look like: +# +# { +# field(arg: "value") { +# subField +# } +# } +# +# Keyboard shortcuts: +# +# Prettify Query: Shift-Ctrl-P (or press the prettify button above) +# +# Merge Query: Shift-Ctrl-M (or press the merge button above) +# +# Run Query: Ctrl-Enter (or press the play button above) +# +# Auto Complete: Ctrl-Space (or just start typing) +# +`; +//# sourceMappingURL=defaultQuery.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/defaultQuery.js.map b/grafast/ruru-components/dist/defaultQuery.js.map new file mode 100644 index 0000000000..f7d9ee3f8b --- /dev/null +++ b/grafast/ruru-components/dist/defaultQuery.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultQuery.js","sourceRoot":"","sources":["../src/defaultQuery.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC3B,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useExplain.d.ts b/grafast/ruru-components/dist/hooks/useExplain.d.ts new file mode 100644 index 0000000000..e501f4ad36 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useExplain.d.ts @@ -0,0 +1,18 @@ +import type { ExplainResults } from "./useFetcher.js"; +import type { RuruStorage } from "./useStorage.js"; +export interface ExplainHelpers { + showExplain: boolean; + explainSize: number; + explainAtBottom: boolean; + setExplainSize: (newSize: number) => void; + setExplainAtBottom: (atBottom: boolean) => void; + setShowExplain: (newShow: boolean) => void; +} +export declare const ExplainContext: import("react").Context<{ + explainHelpers: ExplainHelpers; + explain: boolean; + setExplain: (newExplain: boolean) => void; + explainResults: ExplainResults | null; +}>; +export declare const useExplain: (storage: RuruStorage) => ExplainHelpers; +//# sourceMappingURL=useExplain.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useExplain.d.ts.map b/grafast/ruru-components/dist/hooks/useExplain.d.ts.map new file mode 100644 index 0000000000..b9e4d112ee --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useExplain.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useExplain.d.ts","sourceRoot":"","sources":["../../src/hooks/useExplain.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,cAAc;oBACT,cAAc;aACrB,OAAO;gBACJ,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI;oBACzB,cAAc,GAAG,IAAI;EAarC,CAAC;AAEH,eAAO,MAAM,UAAU,GAAI,SAAS,WAAW,KAAG,cA0CjD,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useExplain.js b/grafast/ruru-components/dist/hooks/useExplain.js new file mode 100644 index 0000000000..8e4ff5756f --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useExplain.js @@ -0,0 +1,43 @@ +import { createContext, useCallback, useState } from "react"; +export const ExplainContext = createContext({ + explainHelpers: { + showExplain: false, + explainSize: 0, + explainAtBottom: true, + setExplainSize: () => { }, + setExplainAtBottom: () => { }, + setShowExplain: () => { }, + }, + explain: true, + setExplain: () => { }, + explainResults: null, +}); +export const useExplain = (storage) => { + const [showExplain, _setShowExplain] = useState(storage.get("explainIsOpen") === "true"); + const [explainSize, _setExplainSize] = useState(parseInt(storage.get("explainSize") ?? "", 10) || 300); + const [explainAtBottom, _setExplainAtBottom] = useState([null, "true"].includes(storage.get("explainAtBottom"))); + const setShowExplain = useCallback((nextShowExplain) => { + _setShowExplain(nextShowExplain); + if (nextShowExplain) { + storage.set("explain", "true"); + } + storage.set("explainIsOpen", nextShowExplain ? "true" : ""); + }, [storage]); + const setExplainAtBottom = useCallback((nextAtBottom) => { + _setExplainAtBottom(nextAtBottom); + storage.set("explainAtBottom", nextAtBottom ? "true" : ""); + }, [storage]); + const setExplainSize = useCallback((nextSize) => { + _setExplainSize(nextSize); + storage.set("explainSize", String(nextSize)); + }, [storage]); + return { + showExplain, + explainSize, + explainAtBottom, + setExplainSize, + setExplainAtBottom, + setShowExplain, + }; +}; +//# sourceMappingURL=useExplain.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useExplain.js.map b/grafast/ruru-components/dist/hooks/useExplain.js.map new file mode 100644 index 0000000000..1e7b6f833c --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useExplain.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useExplain.js","sourceRoot":"","sources":["../../src/hooks/useExplain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAc7D,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAKxC;IACD,cAAc,EAAE;QACd,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,CAAC;QACd,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;QACxB,kBAAkB,EAAE,GAAG,EAAE,GAAE,CAAC;QAC5B,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;KACzB;IACD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,cAAc,EAAE,IAAI;CACrB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAoB,EAAkB,EAAE;IACjE,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC7C,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,MAAM,CACxC,CAAC;IACF,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC7C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,GAAG,CACtD,CAAC;IACF,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CACrD,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CACxD,CAAC;IACF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,eAAwB,EAAE,EAAE;QAC3B,eAAe,CAAC,eAAe,CAAC,CAAC;QACjC,IAAI,eAAe,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IACF,MAAM,kBAAkB,GAAG,WAAW,CACpC,CAAC,YAAqB,EAAE,EAAE;QACxB,mBAAmB,CAAC,YAAY,CAAC,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IACF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,QAAgB,EAAE,EAAE;QACnB,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/C,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IACF,OAAO;QACL,WAAW;QACX,WAAW;QACX,eAAe;QACf,cAAc;QACd,kBAAkB;QAClB,cAAc;KACf,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useFetcher.d.ts b/grafast/ruru-components/dist/hooks/useFetcher.d.ts new file mode 100644 index 0000000000..f5e1fa5be7 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useFetcher.d.ts @@ -0,0 +1,29 @@ +import type { FetcherParams, FetcherReturnType } from "@graphiql/toolkit"; +import type { GrafastPlanJSON } from "grafast"; +import type { RuruProps } from "../interfaces.js"; +export interface IExplainedOperation { + type: string; + title: string; +} +export interface ExplainedSQLOperation extends IExplainedOperation { + type: "sql"; + query: string; + explain?: string; +} +export interface ExplainedPlanOperation extends IExplainedOperation { + type: "plan"; + plan: GrafastPlanJSON; +} +export type ExplainedOperation = ExplainedSQLOperation | ExplainedPlanOperation; +export interface ExplainResults { + operations: Array; +} +export declare const useFetcher: (props: RuruProps, options?: { + explain?: boolean; + verbose?: boolean; +}) => { + fetcher: (graphQLParams: FetcherParams, opts?: import("@graphiql/toolkit").FetcherOpts | undefined) => Promise>; + explainResults: ExplainResults | null; + streamEndpoint: string | null; +}; +//# sourceMappingURL=useFetcher.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useFetcher.d.ts.map b/grafast/ruru-components/dist/hooks/useFetcher.d.ts.map new file mode 100644 index 0000000000..9f58cfd700 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useFetcher.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useFetcher.d.ts","sourceRoot":"","sources":["../../src/hooks/useFetcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,aAAa,EACb,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;CACvC;AAwDD,eAAO,MAAM,UAAU,GACrB,OAAO,SAAS,EAChB,UAAS;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO;2GAqIjD,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;;;CA0CzC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useFetcher.js b/grafast/ruru-components/dist/hooks/useFetcher.js new file mode 100644 index 0000000000..ed2eb67f5e --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useFetcher.js @@ -0,0 +1,191 @@ +import { createGraphiQLFetcher, isAsyncIterable, isPromise, } from "@graphiql/toolkit"; +import { getOperationAST, parse } from "graphql"; +import { useEffect, useMemo, useState } from "react"; +const isExplainOperationLike = (op) => { + return (typeof op === "object" && + op && + typeof op.type === "string" && + typeof op.title === "string"); +}; +const isExplainResultsLike = (explain) => { + return (explain && + Array.isArray(explain.operations) && + explain.operations.every(isExplainOperationLike)); +}; +const isIntrospectionQuery = (params) => { + try { + if (params.operationName === "IntrospectionQuery") { + return true; + } + if (params.operationName) { + return false; + } + const ast = parse(params.query); + const def = getOperationAST(ast, params.operationName); + if (def?.name?.value === "IntrospectionQuery") { + return true; + } + return false; + } + catch (e) { + return false; + } +}; +function makeWsUrl(url) { + if (url.startsWith("/")) { + return `ws${window.location.protocol === "https:" ? "s" : ""}://${window.location.host}${url}`; + } + else if (/^https?:\/\//.test(url)) { + return `ws${url.substring(4)}`; + } + else { + return url; + } +} +function hideProperty(obj, property) { + const value = obj[property]; + delete obj[property]; + Object.defineProperty(obj, property, { value, enumerable: false }); +} +export const useFetcher = (props, options = {}) => { + const [streamEndpoint, setStreamEndpoint] = useState(null); + const endpoint = props.endpoint ?? "/graphql"; + const url = endpoint.startsWith("/") + ? (typeof window !== "undefined" ? window.location.origin : "") + endpoint + : endpoint; + const subscriptionUrl = props.subscriptionEndpoint + ? makeWsUrl(props.subscriptionEndpoint) + : props.endpoint + ? makeWsUrl(props.endpoint) + : undefined; + const [explainResults, setExplainResults] = useState(null); + // Reset the stream endpoint every time the URL changes. + useEffect(() => { + if (url) { + setStreamEndpoint(null); + } + }, [url]); + const explain = options.explain && + (!props.debugTools || props.debugTools.includes("explain")); + const verbose = !!options.verbose; + const ourFetch = useMemo(() => { + return (...args) => { + const result = fetch(...args); + result.then((response) => { + const stream = response.headers.get("X-GraphQL-Event-Stream"); + if (typeof stream === "string") { + const streamUrl = new URL(stream, url); + setStreamEndpoint(streamUrl.toString()); + } + }, () => { }); + return result; + }; + }, [url]); + const fetcherOptions = useMemo(() => { + const headers = explain + ? { "X-PostGraphile-Explain": "on", "X-GraphQL-Explain": "plan,sql" } + : {}; + return { + url, + headers, + wsConnectionParams: headers, + fetch: ourFetch, + subscriptionUrl, + }; + }, [explain, url, subscriptionUrl, ourFetch]); + const fetcher = useMemo(() => props.fetcher ?? createGraphiQLFetcher(fetcherOptions), [fetcherOptions, props.fetcher]); + const wrappedFetcher = useMemo(() => { + const processPayload = (inResult) => { + if (inResult == null) { + return inResult; + } + if (Array.isArray(inResult)) { + return inResult.map(processPayload); + } + // Mutable result + const result = { + ...inResult, + ...(inResult.extensions + ? { extensions: { ...inResult.extensions } } + : null), + }; + // Legacy PostGraphile v4 support + const legacy = result.explain; + if (result.extensions?.explain) { + const explain = result.extensions.explain; + if (typeof explain === "object" && isExplainResultsLike(explain)) { + setTimeout(() => { + setExplainResults(explain); + }, 100); + } + else { + console.warn("The response had `extensions.explain` set, but in an incompatible format."); + } + // Hide it if not verbose + if (!verbose) { + if (Object.keys(result.extensions).length === 1) { + hideProperty(result, "extensions"); + } + else { + hideProperty(result.extensions, "explain"); + } + } + } + else if (legacy) { + setTimeout(() => { + setExplainResults({ + operations: legacy.map((l, i) => ({ + type: "sql", + title: `Legacy explain ${i + 1}`, + query: l.query, + explain: l.plan, + })), + }); + }, 100); + } + return result; + }; + return async function (...args) { + const result = await fetcher(...args); + // Short circuit the introspection query so as to not confuse people + if (isIntrospectionQuery(args[0])) { + return result; + } + setTimeout(() => { + setExplainResults(null); + }, 100); + if ("subscribe" in result) { + // TODO: support wrapping subscriptions + return result; + } + else if (isAsyncIterable(result)) { + const iterator = result[Symbol.asyncIterator](); + // Return a new iterator, equivalent to the old, but that calls 'processPayload' + return { + throw: iterator.throw?.bind(iterator), + return: iterator.return?.bind(iterator), + next(...args) { + const n = iterator.next(...args); + if (isPromise(n)) { + return n.then(({ done, value }) => { + return { done, value: processPayload(value) }; + }); + } + else { + const { done, value } = n; + return { done, value: processPayload(value) }; + } + }, + [Symbol.asyncIterator]() { + return this; + }, + }; + } + else { + return processPayload(result); + } + }; + }, [fetcher, verbose]); + return { fetcher: wrappedFetcher, explainResults, streamEndpoint }; +}; +//# sourceMappingURL=useFetcher.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useFetcher.js.map b/grafast/ruru-components/dist/hooks/useFetcher.js.map new file mode 100644 index 0000000000..90a6116b1e --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useFetcher.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useFetcher.js","sourceRoot":"","sources":["../../src/hooks/useFetcher.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,SAAS,GACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA0BrD,MAAM,sBAAsB,GAAG,CAAC,EAAO,EAA6B,EAAE;IACpE,OAAO,CACL,OAAO,EAAE,KAAK,QAAQ;QACtB,EAAE;QACF,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ;QAC3B,OAAO,EAAE,CAAC,KAAK,KAAK,QAAQ,CAC7B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,oB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;gBAChD,gFAAgF;gBAChF,OAAO;oBACL,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;oBACrC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;oBACvC,IAAI,CAAC,GAAG,IAAI;wBACV,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;wBACjC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;4BACjB,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAO,EAAE,EAAE;gCACrC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;4BAChD,CAAC,CAAC,CAAC;wBACL,CAAC;6BAAM,CAAC;4BACN,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAiC,CAAC;4BAC1D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;wBAChD,CAAC;oBACH,CAAC;oBACD,CAAC,MAAM,CAAC,aAAa,CAAC;wBACpB,OAAO,IAAI,CAAC;oBACd,CAAC;iBAC4B,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,OAAO,cAAc,CAAC,MAAM,CAAQ,CAAC;YACvC,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AACrE,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.d.ts b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.d.ts new file mode 100644 index 0000000000..d9f4a15ca0 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.d.ts @@ -0,0 +1,5 @@ +import type { RuruProps } from "../interfaces.js"; +export declare const useGraphQLChangeStream: (props: RuruProps, refetch: () => void, streamEndpoint: string | null) => { + error: Error | null; +}; +//# sourceMappingURL=useGraphQLChangeStream.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.d.ts.map b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.d.ts.map new file mode 100644 index 0000000000..214a433b10 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useGraphQLChangeStream.d.ts","sourceRoot":"","sources":["../../src/hooks/useGraphQLChangeStream.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,sBAAsB,GACjC,OAAO,SAAS,EAChB,SAAS,MAAM,IAAI,EACnB,gBAAgB,MAAM,GAAG,IAAI;;CA0D9B,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.js b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.js new file mode 100644 index 0000000000..91b986cc0f --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.js @@ -0,0 +1,52 @@ +import { useEffect, useRef, useState } from "react"; +export const useGraphQLChangeStream = (props, refetch, streamEndpoint) => { + const [error, setError] = useState(null); + const eventSourceRef = useRef(null); + // Starts listening to the event stream at the `sourceUrl`. + useEffect(() => { + eventSourceRef.current = streamEndpoint + ? new EventSource(streamEndpoint, props.eventSourceInit) + : null; + const eventSource = eventSourceRef.current; + return () => { + if (eventSource) { + eventSource.close(); + if (eventSourceRef.current !== eventSource) { + console.error("Logic error in EventSource handling in useGraphQLChangeStream"); + } + eventSourceRef.current = null; + } + }; + }, [streamEndpoint]); + const eventSource = eventSourceRef.current; + useEffect(() => { + if (eventSource) { + if (eventSource.readyState === eventSource.CLOSED) { + console.warn("Ruru: EventSource is closed, reopening"); + setError(new Error("Ruru: EventSource is closed, reopening")); + } + const onOpen = () => { + console.log("Ruru: Listening for server sent events"); + setError(null); + refetch(); + }; + const onError = (error) => { + console.error("Ruru: Failed to connect to event stream", error); + setError(new Error("Failed to connect to event stream")); + }; + // When we get a change notification, we want to update our schema. + eventSource.addEventListener("change", refetch, false); + // Add event listeners that just log things in the console. + eventSource.addEventListener("open", onOpen, false); + eventSource.addEventListener("error", onError, false); + // Make sure to unsubscribe when we're not needed any more. + return () => { + eventSource.removeEventListener("change", refetch, false); + eventSource.removeEventListener("open", onOpen, false); + eventSource.removeEventListener("error", onError, false); + }; + } + }, [error, eventSource, refetch, streamEndpoint]); + return { error }; +}; +//# sourceMappingURL=useGraphQLChangeStream.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.js.map b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.js.map new file mode 100644 index 0000000000..6e4efa6fd6 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useGraphQLChangeStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useGraphQLChangeStream.js","sourceRoot":"","sources":["../../src/hooks/useGraphQLChangeStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,KAAgB,EAChB,OAAmB,EACnB,cAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IAExD,2DAA2D;IAC3D,SAAS,CAAC,GAAG,EAAE;QACb,cAAc,CAAC,OAAO,GAAG,cAAc;YACrC,CAAC,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,eAAe,CAAC;YACxD,CAAC,CAAC,IA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C;YACpD,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAEtD,2DAA2D;YAC3D,OAAO,GAAG,EAAE;gBACV,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;gBAC1D,WAAW,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;gBACvD,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAC3D,CAAC,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IAClD,OAAO,EAAE,KAAK,EAAE,CAAC;AACnB,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/usePrettify.d.ts b/grafast/ruru-components/dist/hooks/usePrettify.d.ts new file mode 100644 index 0000000000..f7e4d09518 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/usePrettify.d.ts @@ -0,0 +1,12 @@ +declare global { + interface Window { + prettier: any; + prettierPlugins: any; + } +} +/** + * Prettifies with 'prettier' if available, otherwise using GraphiQL's built in + * prettify. + */ +export declare const usePrettify: () => () => void; +//# sourceMappingURL=usePrettify.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/usePrettify.d.ts.map b/grafast/ruru-components/dist/hooks/usePrettify.d.ts.map new file mode 100644 index 0000000000..bb1c9afe04 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/usePrettify.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"usePrettify.d.ts","sourceRoot":"","sources":["../../src/hooks/usePrettify.tsx"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,QAAQ,EAAE,GAAG,CAAC;QACd,eAAe,EAAE,GAAG,CAAC;KACtB;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,kBAwBvB,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/usePrettify.js b/grafast/ruru-components/dist/hooks/usePrettify.js new file mode 100644 index 0000000000..313e0114e1 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/usePrettify.js @@ -0,0 +1,29 @@ +import { useEditorContext, usePrettifyEditors } from "@graphiql/react"; +import { useCallback } from "react"; +/** + * Prettifies with 'prettier' if available, otherwise using GraphiQL's built in + * prettify. + */ +export const usePrettify = () => { + const editorContext = useEditorContext(); + const fallbackPrettify = usePrettifyEditors(); + return useCallback(() => { + const queryEditor = editorContext?.queryEditor; + if (!queryEditor) { + return; + } + if (queryEditor && + typeof window.prettier !== "undefined" && + typeof window.prettierPlugins !== "undefined") { + // TODO: window.prettier.formatWithCursor + queryEditor.setValue(window.prettier.format(queryEditor.getValue(), { + parser: "graphql", + plugins: window.prettierPlugins, + })); + } + else { + fallbackPrettify(); + } + }, [editorContext?.queryEditor, fallbackPrettify]); +}; +//# sourceMappingURL=usePrettify.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/usePrettify.js.map b/grafast/ruru-components/dist/hooks/usePrettify.js.map new file mode 100644 index 0000000000..91c411ba19 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/usePrettify.js.map @@ -0,0 +1 @@ +{"version":3,"file":"usePrettify.js","sourceRoot":"","sources":["../../src/hooks/usePrettify.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AASpC;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,gBAAgB,GAAG,kBAAkB,EAAE,CAAC;IAC9C,OAAO,WAAW,CAAC,GAAG,EAAE;QACtB,MAAM,WAAW,GAAG,aAAa,EAAE,WAAW,CAAC;QAC/C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QACD,IACE,WAAW;YACX,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;YACtC,OAAO,MAAM,CAAC,eAAe,KAAK,WAAW,EAC7C,CAAC;YACD,yCAAyC;YACzC,WAAW,CAAC,QAAQ,CAClB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE;gBAC7C,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,MAAM,CAAC,eAAe;aAChC,CAAC,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,gBAAgB,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC;AACrD,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useStorage.d.ts b/grafast/ruru-components/dist/hooks/useStorage.d.ts new file mode 100644 index 0000000000..7ee6b4b7a7 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useStorage.d.ts @@ -0,0 +1,16 @@ +export interface StoredKeys { + saveHeaders: "true" | ""; + explain: "true" | ""; + explorerIsOpen: "true" | ""; + explainIsOpen: "true" | ""; + explainAtBottom: "true" | ""; + explainSize: string; + verbose: "true" | ""; +} +export interface RuruStorage { + get(key: TKey): StoredKeys[TKey] | null; + set(key: TKey, value: StoredKeys[TKey]): void; + toggle(key: TKey): void; +} +export declare const useStorage: () => RuruStorage; +//# sourceMappingURL=useStorage.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useStorage.d.ts.map b/grafast/ruru-components/dist/hooks/useStorage.d.ts.map new file mode 100644 index 0000000000..6074393653 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useStorage.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"useStorage.d.ts","sourceRoot":"","sources":["../../src/hooks/useStorage.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,GAAG,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,EAAE,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC;CACtB;AAcD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,IAAI,SAAS,MAAM,UAAU,EAAE,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvE,GAAG,CAAC,IAAI,SAAS,MAAM,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7E,MAAM,CAAC,IAAI,SAAS,MAAM,UAAU,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;CACxD;AAED,eAAO,MAAM,UAAU,QAAO,WA4C7B,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useStorage.js b/grafast/ruru-components/dist/hooks/useStorage.js new file mode 100644 index 0000000000..62b286a18e --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useStorage.js @@ -0,0 +1,57 @@ +import { useMemo, useState } from "react"; +const KEYS = { + saveHeaders: "Ruru:saveHeadersText", + explain: "Ruru:explain", + explainSize: "Ruru:explainSize", + explainIsOpen: "Ruru:explainIsOpen", + explainAtBottom: "Ruru:explainAtBottom", + explorerIsOpen: "graphiql:explorerIsOpen", + verbose: "Ruru:verbose", +}; +const up = (v) => v + 1; +export const useStorage = () => { + const storage = typeof window !== "undefined" ? window.localStorage : null; + // Trigger re-render every time we set + const [revision, bump] = useState(0); + const [cache] = useState(Object.create(null)); + return useMemo(() => { + if (!storage) { + return { + _revision: revision, + get(key) { + return cache[key] ?? null; + }, + set(key, value) { + cache[key] = value; + }, + toggle(key) { + cache[key] = cache[key] ? "" : "true"; + }, + }; + } + return { + _revision: revision, + get(key) { + const val = storage.getItem(KEYS[key]); + if (val === "null" || val === "undefined") { + storage.removeItem(KEYS[key]); + return null; + } + return val ?? null; + }, + set(key, value) { + storage.setItem(KEYS[key], value); + bump(up); + }, + toggle(key) { + if (this.get(key)) { + this.set(key, ""); + } + else { + this.set(key, "true"); + } + }, + }; + }, [storage, revision, cache]); +}; +//# sourceMappingURL=useStorage.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/hooks/useStorage.js.map b/grafast/ruru-components/dist/hooks/useStorage.js.map new file mode 100644 index 0000000000..f4fda5f156 --- /dev/null +++ b/grafast/ruru-components/dist/hooks/useStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"useStorage.js","sourceRoot":"","sources":["../../src/hooks/useStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAY1C,MAAM,IAAI,GAA0C;IAClD,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,kBAAkB;IAC/B,aAAa,EAAE,oBAAoB;IACnC,eAAe,EAAE,sBAAsB;IACvC,cAAc,EAAE,yBAAyB;IACzC,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,MAAM,EAAE,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AAQhC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAgB,EAAE;IAC1C,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3E,sCAAsC;IACtC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACr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E,CAAC,CAAC;gBACpB,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;gBACxB,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/index.d.ts b/grafast/ruru-components/dist/index.d.ts new file mode 100644 index 0000000000..bcbcd53302 --- /dev/null +++ b/grafast/ruru-components/dist/index.d.ts @@ -0,0 +1,3 @@ +export { Fetcher, RuruProps } from "./interfaces.js"; +export { Ruru } from "./ruru.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/index.d.ts.map b/grafast/ruru-components/dist/index.d.ts.map new file mode 100644 index 0000000000..4655fdd00c --- /dev/null +++ b/grafast/ruru-components/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/index.js b/grafast/ruru-components/dist/index.js new file mode 100644 index 0000000000..8e4bf251eb --- /dev/null +++ b/grafast/ruru-components/dist/index.js @@ -0,0 +1,2 @@ +export { Ruru } from "./ruru.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/index.js.map b/grafast/ruru-components/dist/index.js.map new file mode 100644 index 0000000000..8009e7b462 --- /dev/null +++ b/grafast/ruru-components/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/interfaces.d.ts b/grafast/ruru-components/dist/interfaces.d.ts new file mode 100644 index 0000000000..cf33165822 --- /dev/null +++ b/grafast/ruru-components/dist/interfaces.d.ts @@ -0,0 +1,71 @@ +import type { Fetcher } from "@graphiql/toolkit"; +import type { GraphiQLProps } from "graphiql"; +export { Fetcher }; +/** + * The `EventSource` specification only specifies the `withCredentials` option, + * but some implementations support additional options. Our configuration + * allows arbitrary options. + */ +interface RuruEventSourceInit extends EventSourceInit, Record { +} +export interface RuruProps { + /** + * Optionally override the fetcher. + */ + fetcher?: Fetcher; + /** + * The URL to the GraphQL endpoint. (http:// or https://) + */ + endpoint?: string; + /** + * The URL to the GraphQL subscriptions endpoint. (ws:// or wss://) + */ + subscriptionEndpoint?: string; + editorTheme?: GraphiQLProps["editorTheme"]; + /** + * The list of debug tools available to the user. + * + * explain - output the SQL executed + * plan - output the plan executed + */ + debugTools?: Array<"explain" | "plan">; + /** + * The query to use when the user has never visited the page before (unless `initialQuery` is set). + */ + defaultQuery?: string; + /** + * @deprecated Use `query` instead + */ + initialQuery?: string; + /** + * @deprecated Use `variables` instead + */ + initialVariables?: string; + /** + * The query to prepopulate the editor with. + */ + query?: string; + /** + * The variables to prepopulate the editor with. + */ + variables?: string; + /** + * Callback executed when the current query changes. + */ + onEditQuery?: GraphiQLProps["onEditQuery"]; + /** + * Callback executed when the variables change. + */ + onEditVariables?: GraphiQLProps["onEditVariables"]; + /** + * Will be passed to `new EventSource(url, eventSourceInit)`. + * + * Per the specification, the only option is `withCredentials`; however, some + * implementations support additional options. For example: + * + * - `reconnectInterval: 1000` + * - `maxReconnectAttempts: 3` + */ + eventSourceInit?: RuruEventSourceInit; +} +//# sourceMappingURL=interfaces.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/interfaces.d.ts.map b/grafast/ruru-components/dist/interfaces.d.ts.map new file mode 100644 index 0000000000..743cb21f15 --- /dev/null +++ b/grafast/ruru-components/dist/interfaces.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB;;;;GAIG;AACH,UAAU,mBAAoB,SAAQ,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAAG;AAE7E,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAE3C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;IAEvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAE3C;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAEnD;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/interfaces.js b/grafast/ruru-components/dist/interfaces.js new file mode 100644 index 0000000000..c30bb68c19 --- /dev/null +++ b/grafast/ruru-components/dist/interfaces.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/interfaces.js.map b/grafast/ruru-components/dist/interfaces.js.map new file mode 100644 index 0000000000..8fb5f7d179 --- /dev/null +++ b/grafast/ruru-components/dist/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/grafast/ruru-components/dist/plugins/explain.d.ts b/grafast/ruru-components/dist/plugins/explain.d.ts new file mode 100644 index 0000000000..6d80ba6949 --- /dev/null +++ b/grafast/ruru-components/dist/plugins/explain.d.ts @@ -0,0 +1,3 @@ +import type { GraphiQLPlugin } from "@graphiql/react"; +export declare const EXPLAIN_PLUGIN: GraphiQLPlugin; +//# sourceMappingURL=explain.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/plugins/explain.d.ts.map b/grafast/ruru-components/dist/plugins/explain.d.ts.map new file mode 100644 index 0000000000..9db8160b4d --- /dev/null +++ b/grafast/ruru-components/dist/plugins/explain.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../src/plugins/explain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AA6BtD,eAAO,MAAM,cAAc,EAAE,cAI5B,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/plugins/explain.js b/grafast/ruru-components/dist/plugins/explain.js new file mode 100644 index 0000000000..da8a6f31a1 --- /dev/null +++ b/grafast/ruru-components/dist/plugins/explain.js @@ -0,0 +1,15 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { MagnifyingGlassIcon } from "@graphiql/react"; +import { useContext } from "react"; +import { Explain } from "../components/Explain.js"; +import { ExplainContext } from "../hooks/useExplain.js"; +const ExplainPanel = () => { + const { explainHelpers, explain, explainResults, setExplain } = useContext(ExplainContext); + return (_jsxs("div", { children: [_jsx("div", { className: "graphiql-doc-explorer-header", children: _jsx("div", { className: "graphiql-doc-explorer-title", children: "Explain" }) }), _jsx("div", { className: "graphiql-doc-explorer-content", children: _jsx(Explain, { explain: explain, setExplain: setExplain, helpers: explainHelpers, results: explainResults }) })] })); +}; +export const EXPLAIN_PLUGIN = { + title: "Explain", + icon: MagnifyingGlassIcon, + content: ExplainPanel, +}; +//# sourceMappingURL=explain.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/plugins/explain.js.map b/grafast/ruru-components/dist/plugins/explain.js.map new file mode 100644 index 0000000000..bb60889443 --- /dev/null +++ b/grafast/ruru-components/dist/plugins/explain.js.map @@ -0,0 +1 @@ +{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../src/plugins/explain.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,YAAY,GAAO,GAAG,EAAE;IAC5B,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,GAC3D,UAAU,CAAC,cAAc,CAAC,CAAC;IAE7B,OAAO,CACL,0BACE,cAAK,SAAS,EAAC,8BAA8B,YAC3C,cAAK,SAAS,EAAC,6BAA6B,wBAAc,GACtD,EACN,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,OAAO,IACN,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,cAAc,GACvB,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,YAAY;CACtB,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/ruru.d.ts b/grafast/ruru-components/dist/ruru.d.ts new file mode 100644 index 0000000000..cedea0ce03 --- /dev/null +++ b/grafast/ruru-components/dist/ruru.d.ts @@ -0,0 +1,15 @@ +import type { GraphiQLProps } from "graphiql"; +import type { FC } from "react"; +import type { RuruStorage } from "./hooks/useStorage.js"; +import type { RuruProps } from "./interfaces.js"; +export declare const Ruru: FC; +export declare const RuruInner: FC<{ + editorTheme?: string; + storage: RuruStorage; + error: Error | null; + setError: React.Dispatch>; + onEditQuery?: GraphiQLProps["onEditQuery"]; + onEditVariables?: GraphiQLProps["onEditVariables"]; + streamEndpoint: string | null; +}>; +//# sourceMappingURL=ruru.d.ts.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/ruru.d.ts.map b/grafast/ruru-components/dist/ruru.d.ts.map new file mode 100644 index 0000000000..be6e83999c --- /dev/null +++ b/grafast/ruru-components/dist/ruru.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ruru.d.ts","sourceRoot":"","sources":["../src/ruru.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAUhC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgBjD,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAkD9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7D,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACnD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CA2HA,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/dist/ruru.js b/grafast/ruru-components/dist/ruru.js new file mode 100644 index 0000000000..2a123aa0fa --- /dev/null +++ b/grafast/ruru-components/dist/ruru.js @@ -0,0 +1,70 @@ +import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; +import { explorerPlugin as makeExplorerPlugin } from "@graphiql/plugin-explorer"; +import { CopyIcon, GraphiQLProvider as GP2, MergeIcon, PrettifyIcon, SettingsIcon, ToolbarButton, ToolbarMenu, useCopyQuery, useMergeQuery, useSchemaContext, } from "@graphiql/react"; +import { GraphiQL, GraphiQLInterface, GraphiQLProvider } from "graphiql"; +import { useCallback, useState } from "react"; +import { ErrorPopup } from "./components/ErrorPopup.js"; +import { RuruFooter } from "./components/Footer.js"; +import { defaultQuery as DEFAULT_QUERY } from "./defaultQuery.js"; +import { ExplainContext, useExplain } from "./hooks/useExplain.js"; +import { useFetcher } from "./hooks/useFetcher.js"; +import { useGraphQLChangeStream } from "./hooks/useGraphQLChangeStream.js"; +import { usePrettify } from "./hooks/usePrettify.js"; +import { useStorage } from "./hooks/useStorage.js"; +import { EXPLAIN_PLUGIN } from "./plugins/explain.js"; +if (GP2 !== GraphiQLProvider) { + throw new Error("PACKAGE MANAGEMENT ERROR! The providers don't match up!"); +} +const checkCss = { width: "1.5rem", display: "inline-block" }; +const check = _jsx("span", { style: checkCss, children: "\u2714" }); +const nocheck = _jsx("span", { style: checkCss }); +const explorerPlugin = makeExplorerPlugin({ + showAttribution: false, +}); +const plugins = [explorerPlugin, EXPLAIN_PLUGIN]; +export const Ruru = (props) => { + const storage = useStorage(); + const explain = storage.get("explain") === "true"; + const verbose = storage.get("verbose") === "true"; + const saveHeaders = storage.get("saveHeaders") === "true"; + const setExplain = useCallback((newExplain) => { + storage.set("explain", newExplain ? "true" : ""); + }, [storage]); + const { fetcher, explainResults, streamEndpoint } = useFetcher(props, { + explain, + verbose, + }); + const [error, setError] = useState(null); + const explainHelpers = useExplain(storage); + const defaultQuery = props.defaultQuery ?? DEFAULT_QUERY; + return ( + //EditorContextProvider + _jsx(ExplainContext.Provider, { value: { + explainHelpers, + explain, + setExplain, + explainResults, + }, children: _jsx(GraphiQLProvider, { inputValueDeprecation: true, schemaDescription: true, fetcher: fetcher, defaultQuery: defaultQuery, query: props.query ?? props.initialQuery, variables: props.variables ?? props.initialVariables, plugins: plugins, shouldPersistHeaders: saveHeaders, children: _jsx(RuruInner, { storage: storage, editorTheme: props.editorTheme, error: error, setError: setError, onEditQuery: props.onEditQuery, onEditVariables: props.onEditVariables, streamEndpoint: streamEndpoint }) }) })); +}; +export const RuruInner = (props) => { + const { storage, editorTheme, error, setError, onEditQuery, onEditVariables, streamEndpoint, } = props; + const prettify = usePrettify(); + const mergeQuery = useMergeQuery(); + const copyQuery = useCopyQuery(); + const schemaContext = useSchemaContext({ nonNull: true }); + useGraphQLChangeStream(props, schemaContext.introspect, streamEndpoint); + return (_jsxs("div", { className: "graphiql-container", style: { + position: "absolute", + width: "100%", + height: "100%", + display: "flex", + flexDirection: "column", + overflow: "hidden", + }, children: [_jsx("div", { style: { + display: "flex", + flex: "1 1 100%", + overflow: "hidden", + position: "relative", + }, children: _jsxs(GraphiQLInterface, { editorTheme: editorTheme ?? "graphiql", onEditQuery: onEditQuery, onEditVariables: onEditVariables, children: [_jsx(GraphiQL.Logo, { children: _jsx("a", { href: "https://grafast.org/ruru", style: { textDecoration: "none" }, target: "_blank", rel: "noreferrer", children: "Ruru" }) }), _jsxs(GraphiQL.Toolbar, { children: [_jsx(ToolbarButton, { onClick: prettify, label: "Prettify Query (Shift-Ctrl-P)", children: _jsx(PrettifyIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" }) }), _jsx(ToolbarButton, { onSelect: mergeQuery, label: "Merge Query (Shift-Ctrl-M)", children: _jsx(MergeIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" }) }), _jsx(ToolbarButton, { onClick: copyQuery, label: "Copy query (Shift-Ctrl-C)", children: _jsx(CopyIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" }) }), _jsxs(ToolbarMenu, { label: "Options", button: _jsx(ToolbarButton, { label: "Options", children: _jsx(SettingsIcon, { className: "graphiql-toolbar-icon", "aria-hidden": "true" }) }), children: [_jsx(ToolbarMenu.Item, { title: "View the SQL statements that this query invokes", onSelect: () => storage.toggle("explain"), children: _jsxs("span", { children: [storage.get("explain") === "true" ? check : nocheck, "Explain (if supported)"] }) }), _jsx(ToolbarMenu.Item, { title: "Don't hide explain from results", onSelect: () => storage.toggle("verbose"), children: _jsxs("span", { children: [storage.get("verbose") === "true" ? check : nocheck, "Verbose"] }) }), _jsx(ToolbarMenu.Item, { title: "Should we persist the headers to localStorage? Header editor is next to variable editor at the bottom.", onSelect: () => storage.toggle("saveHeaders"), children: _jsxs("span", { children: [storage.get("saveHeaders") === "true" ? check : nocheck, "Save headers"] }) })] })] }), _jsx(GraphiQL.Footer, { children: _jsx(RuruFooter, {}) })] }) }), error ? (_jsx(ErrorPopup, { error: error, onClose: () => setError(null) })) : null] })); +}; +//# sourceMappingURL=ruru.js.map \ No newline at end of file diff --git a/grafast/ruru-components/dist/ruru.js.map b/grafast/ruru-components/dist/ruru.js.map new file mode 100644 index 0000000000..f213189872 --- /dev/null +++ b/grafast/ruru-components/dist/ruru.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ruru.js","sourceRoot":"","sources":["../src/ruru.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EACL,QAAQ,EACR,gBAAgB,IAAI,GAAG,EACvB,SAAS,EACT,YAAY,EACZ,YAA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E/C,GACU,EACnB,KAAC,WAAW,CAAC,IAAI,IACf,KAAK,EAAC,wGAAwG,EAC9G,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,YAE7C,2BACG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,oBAEnD,GACU,IACP,IACG,EACnB,KAAC,QAAQ,CAAC,MAAM,cACd,KAAC,UAAU,KAAG,GACE,IACA,GAChB,EACL,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAI,CAC5D,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/grafast/ruru-components/tsconfig.tsbuildinfo b/grafast/ruru-components/tsconfig.tsbuildinfo new file mode 100644 index 0000000000..57cf395972 --- /dev/null +++ b/grafast/ruru-components/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.es2024.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/tslib/modules/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react/jsx-runtime.d.ts","./src/defaultquery.ts","../../node_modules/graphql/version.d.ts","../../node_modules/graphql/jsutils/maybe.d.ts","../../node_modules/graphql/language/source.d.ts","../../node_modules/graphql/jsutils/path.d.ts","../../node_modules/graphql/jsutils/promiseorvalue.d.ts","../../node_modules/graphql/jsutils/objmap.d.ts","../../node_modules/graphql/language/kinds.d.ts","../../node_modules/graphql/language/tokenkind.d.ts","../../node_modules/graphql/language/ast.d.ts","../../node_modules/graphql/language/location.d.ts","../../node_modules/graphql/error/graphqlerror.d.ts","../../node_modules/graphql/language/directivelocation.d.ts","../../node_modules/graphql/type/directives.d.ts","../../node_modules/graphql/type/schema.d.ts","../../node_modules/graphql/type/definition.d.ts","../../node_modules/graphql/execution/execute.d.ts","../../node_modules/graphql/graphql.d.ts","../../node_modules/graphql/type/scalars.d.ts","../../node_modules/graphql/type/introspection.d.ts","../../node_modules/graphql/type/validate.d.ts","../../node_modules/graphql/type/assertname.d.ts","../../node_modules/graphql/type/index.d.ts","../../node_modules/graphql/language/printlocation.d.ts","../../node_modules/graphql/language/lexer.d.ts","../../node_modules/graphql/language/parser.d.ts","../../node_modules/graphql/language/printer.d.ts","../../node_modules/graphql/language/visitor.d.ts","../../node_modules/graphql/language/predicates.d.ts","../../node_modules/graphql/language/index.d.ts","../../node_modules/graphql/execution/subscribe.d.ts","../../node_modules/graphql/execution/values.d.ts","../../node_modules/graphql/execution/index.d.ts","../../node_modules/graphql/subscription/index.d.ts","../../node_modules/graphql/utilities/typeinfo.d.ts","../../node_modules/graphql/validation/validationcontext.d.ts","../../node_modules/graphql/validation/validate.d.ts","../../node_modules/graphql/validation/specifiedrules.d.ts","../../node_modules/graphql/validation/rules/deferstreamdirectiveonrootfieldrule.d.ts","../../node_modules/graphql/validation/rules/executabledefinitionsrule.d.ts","../../node_modules/graphql/validation/rules/fieldsoncorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/fragmentsoncompositetypesrule.d.ts","../../node_modules/graphql/validation/rules/knownargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowndirectivesrule.d.ts","../../node_modules/graphql/validation/rules/knownfragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/knowntypenamesrule.d.ts","../../node_modules/graphql/validation/rules/loneanonymousoperationrule.d.ts","../../node_modules/graphql/validation/rules/nofragmentcyclesrule.d.ts","../../node_modules/graphql/validation/rules/noundefinedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/nounusedfragmentsrule.d.ts","../../node_modules/graphql/validation/rules/nounusedvariablesrule.d.ts","../../node_modules/graphql/validation/rules/overlappingfieldscanbemergedrule.d.ts","../../node_modules/graphql/validation/rules/possiblefragmentspreadsrule.d.ts","../../node_modules/graphql/validation/rules/providedrequiredargumentsrule.d.ts","../../node_modules/graphql/validation/rules/scalarleafsrule.d.ts","../../node_modules/graphql/validation/rules/singlefieldsubscriptionsrule.d.ts","../../node_modules/graphql/validation/rules/streamdirectiveonlistfieldrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivesperlocationrule.d.ts","../../node_modules/graphql/validation/rules/uniquefragmentnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueinputfieldnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquevariablenamesrule.d.ts","../../node_modules/graphql/validation/rules/valuesofcorrecttyperule.d.ts","../../node_modules/graphql/validation/rules/variablesareinputtypesrule.d.ts","../../node_modules/graphql/validation/rules/variablesinallowedpositionrule.d.ts","../../node_modules/graphql/validation/rules/loneschemadefinitionrule.d.ts","../../node_modules/graphql/validation/rules/uniqueoperationtypesrule.d.ts","../../node_modules/graphql/validation/rules/uniquetypenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueenumvaluenamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquefielddefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniqueargumentdefinitionnamesrule.d.ts","../../node_modules/graphql/validation/rules/uniquedirectivenamesrule.d.ts","../../node_modules/graphql/validation/rules/possibletypeextensionsrule.d.ts","../../node_modules/graphql/validation/rules/custom/nodeprecatedcustomrule.d.ts","../../node_modules/graphql/validation/rules/custom/noschemaintrospectioncustomrule.d.ts","../../node_modules/graphql/validation/index.d.ts","../../node_modules/graphql/error/syntaxerror.d.ts","../../node_modules/graphql/error/locatederror.d.ts","../../node_modules/graphql/error/index.d.ts","../../node_modules/graphql/utilities/getintrospectionquery.d.ts","../../node_modules/graphql/utilities/getoperationast.d.ts","../../node_modules/graphql/utilities/getoperationroottype.d.ts","../../node_modules/graphql/utilities/introspectionfromschema.d.ts","../../node_modules/graphql/utilities/buildclientschema.d.ts","../../node_modules/graphql/utilities/buildastschema.d.ts","../../node_modules/graphql/utilities/extendschema.d.ts","../../node_modules/graphql/utilities/lexicographicsortschema.d.ts","../../node_modules/graphql/utilities/printschema.d.ts","../../node_modules/graphql/utilities/typefromast.d.ts","../../node_modules/graphql/utilities/valuefromast.d.ts","../../node_modules/graphql/utilities/valuefromastuntyped.d.ts","../../node_modules/graphql/utilities/astfromvalue.d.ts","../../node_modules/graphql/utilities/coerceinputvalue.d.ts","../../node_modules/graphql/utilities/concatast.d.ts","../../node_modules/graphql/utilities/separateoperations.d.ts","../../node_modules/graphql/utilities/stripignoredcharacters.d.ts","../../node_modules/graphql/utilities/typecomparators.d.ts","../../node_modules/graphql/utilities/assertvalidname.d.ts","../../node_modules/graphql/utilities/findbreakingchanges.d.ts","../../node_modules/graphql/utilities/typedquerydocumentnode.d.ts","../../node_modules/graphql/utilities/index.d.ts","../../node_modules/graphql/index.d.ts","../../node_modules/graphql-ws/lib/common.d.ts","../../node_modules/graphql-ws/lib/client.d.ts","../../node_modules/graphql-ws/lib/server.d.ts","../../node_modules/graphql-ws/lib/index.d.ts","../../node_modules/@graphiql/toolkit/dist/esm/create-fetcher/types.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/async-helpers/index.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/create-fetcher/createfetcher.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/format/index.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/auto-complete.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/merge-ast.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/graphql-helpers/operation-name.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/base.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/query.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/history.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/storage/custom.d.mts","../../node_modules/@graphiql/toolkit/dist/esm/index.d.mts","../../node_modules/@types/codemirror/index.d.ts","../../node_modules/@graphiql/react/types/editor/types.d.ts","../../node_modules/@graphiql/react/types/editor/header-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/header-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/image-preview.d.ts","../../node_modules/vscode-languageserver-types/lib/umd/main.d.ts","../../node_modules/graphql-config/types.d.ts","../../node_modules/@graphql-tools/utils/schemavisitor.d.ts","../../node_modules/@graphql-tools/utils/interfaces.d.ts","../../node_modules/@graphql-tools/utils/loaders.d.ts","../../node_modules/@graphql-tools/utils/helpers.d.ts","../../node_modules/@graphql-tools/utils/debug-log.d.ts","../../node_modules/@graphql-tools/utils/fix-windows-path.d.ts","../../node_modules/@graphql-tools/utils/flatten-array.d.ts","../../node_modules/@graphql-tools/utils/get-directives.d.ts","../../node_modules/@graphql-tools/utils/get-fields-with-directives.d.ts","../../node_modules/@graphql-tools/utils/get-implementing-types.d.ts","../../node_modules/@graphql-tools/utils/types.d.ts","../../node_modules/@graphql-tools/utils/print-schema-with-directives.d.ts","../../node_modules/@graphql-tools/utils/validate-documents.d.ts","../../node_modules/@graphql-tools/utils/fix-schema-ast.d.ts","../../node_modules/@graphql-tools/utils/parse-graphql-json.d.ts","../../node_modules/@graphql-tools/utils/parse-graphql-sdl.d.ts","../../node_modules/@graphql-tools/utils/get-user-types-from-schema.d.ts","../../node_modules/@graphql-tools/utils/create-schema-definition.d.ts","../../node_modules/@graphql-tools/utils/build-operation-for-field.d.ts","../../node_modules/@graphql-tools/utils/filterschema.d.ts","../../node_modules/@graphql-tools/utils/clone.d.ts","../../node_modules/@graphql-tools/utils/heal.d.ts","../../node_modules/@graphql-tools/utils/schemadirectivevisitor.d.ts","../../node_modules/@graphql-tools/utils/visitschema.d.ts","../../node_modules/@graphql-tools/utils/getresolversfromschema.d.ts","../../node_modules/@graphql-tools/utils/foreachfield.d.ts","../../node_modules/@graphql-tools/utils/foreachdefaultvalue.d.ts","../../node_modules/@graphql-tools/utils/mapschema.d.ts","../../node_modules/@graphql-tools/utils/addtypes.d.ts","../../node_modules/@graphql-tools/utils/rewire.d.ts","../../node_modules/@graphql-tools/utils/prune.d.ts","../../node_modules/@graphql-tools/utils/mergedeep.d.ts","../../node_modules/@graphql-tools/utils/stub.d.ts","../../node_modules/@graphql-tools/utils/selectionsets.d.ts","../../node_modules/@graphql-tools/utils/getresponsekeyfrominfo.d.ts","../../node_modules/@graphql-tools/utils/fields.d.ts","../../node_modules/@graphql-tools/utils/renametype.d.ts","../../node_modules/@graphql-tools/utils/collectfields.d.ts","../../node_modules/@graphql-tools/utils/transforminputvalue.d.ts","../../node_modules/@graphql-tools/utils/mapasynciterator.d.ts","../../node_modules/@graphql-tools/utils/updateargument.d.ts","../../node_modules/@graphql-tools/utils/implementsabstracttype.d.ts","../../node_modules/@graphql-tools/utils/errors.d.ts","../../node_modules/@graphql-tools/utils/toconfig.d.ts","../../node_modules/@graphql-tools/utils/observabletoasynciterable.d.ts","../../node_modules/@graphql-tools/utils/visitresult.d.ts","../../node_modules/@graphql-tools/utils/getargumentvalues.d.ts","../../node_modules/@graphql-tools/utils/valuematchescriteria.d.ts","../../node_modules/@graphql-tools/utils/isasynciterable.d.ts","../../node_modules/@graphql-tools/utils/isdocumentnode.d.ts","../../node_modules/@graphql-tools/utils/astfromvalueuntyped.d.ts","../../node_modules/@graphql-tools/utils/executor.d.ts","../../node_modules/@graphql-tools/utils/withcancel.d.ts","../../node_modules/@graphql-tools/utils/index.d.ts","../../node_modules/@graphql-tools/load/load-typedefs.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/interfaces.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/loaders.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/helpers.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-fields-with-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-implementing-types.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/types.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/print-schema-with-directives.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/validate-documents.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/fix-schema-ast.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/parse-graphql-json.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/parse-graphql-sdl.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/get-user-types-from-schema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/create-schema-definition.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/build-operation-for-field.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/filterschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/heal.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getresolversfromschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/foreachfield.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/foreachdefaultvalue.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mapschema.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/addtypes.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/rewire.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/prune.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mergedeep.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/stub.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/selectionsets.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getresponsekeyfrominfo.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/fields.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/renametype.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/transforminputvalue.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/mapasynciterator.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/updateargument.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/implementsabstracttype.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/errors.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/observabletoasynciterable.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/visitresult.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/getargumentvalues.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/valuematchescriteria.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/isasynciterable.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/isdocumentnode.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/astfromvalueuntyped.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/executor.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/withcancel.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/aggregateerror.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/roottypes.d.ts","../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/index.d.ts","../../node_modules/@graphql-tools/merge/merge-resolvers.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/arguments.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/utils.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-typedefs.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-nodes.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/comments.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/directives.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/enum-values.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/enum.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/fields.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/input-type.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/interface.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/merge-named-type-array.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/scalar.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/type.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/union.d.ts","../../node_modules/@graphql-tools/merge/typedefs-mergers/index.d.ts","../../node_modules/@graphql-tools/merge/merge-schemas.d.ts","../../node_modules/@graphql-tools/merge/extensions.d.ts","../../node_modules/@graphql-tools/merge/index.d.ts","../../node_modules/@graphql-tools/load/schema.d.ts","../../node_modules/@graphql-tools/load/documents.d.ts","../../node_modules/@graphql-tools/load/filter-document-kind.d.ts","../../node_modules/@graphql-tools/load/index.d.ts","../../node_modules/graphql-config/helpers/utils.d.ts","../../node_modules/graphql-config/loaders.d.ts","../../node_modules/graphql-config/extension.d.ts","../../node_modules/graphql-config/project-config.d.ts","../../node_modules/graphql-config/config.d.ts","../../node_modules/graphql-config/errors.d.ts","../../node_modules/graphql-config/index.d.ts","../../node_modules/graphql-language-service/dist/parser/types.d.ts","../../node_modules/graphql-language-service/dist/parser/characterstream.d.ts","../../node_modules/graphql-language-service/dist/parser/rules.d.ts","../../node_modules/graphql-language-service/dist/parser/rulehelpers.d.ts","../../node_modules/graphql-language-service/dist/parser/onlineparser.d.ts","../../node_modules/graphql-language-service/dist/parser/api.d.ts","../../node_modules/graphql-language-service/dist/parser/gettypeinfo.d.ts","../../node_modules/graphql-language-service/dist/parser/index.d.ts","../../node_modules/graphql-language-service/dist/types.d.ts","../../node_modules/graphql-language-service/dist/interface/autocompleteutils.d.ts","../../node_modules/graphql-language-service/dist/interface/getautocompletesuggestions.d.ts","../../node_modules/graphql-language-service/dist/utils/fragmentdependencies.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/graphql-language-service/dist/utils/collectvariables.d.ts","../../node_modules/graphql-language-service/dist/utils/getvariablesjsonschema.d.ts","../../node_modules/graphql-language-service/dist/utils/getastnodeatposition.d.ts","../../node_modules/graphql-language-service/dist/utils/range.d.ts","../../node_modules/graphql-language-service/dist/utils/validatewithcustomrules.d.ts","../../node_modules/graphql-language-service/dist/utils/getoperationfacts.d.ts","../../node_modules/graphql-language-service/dist/utils/index.d.ts","../../node_modules/graphql-language-service/dist/interface/getdefinition.d.ts","../../node_modules/graphql-language-service/dist/interface/getdiagnostics.d.ts","../../node_modules/graphql-language-service/dist/interface/getoutline.d.ts","../../node_modules/graphql-language-service/dist/interface/gethoverinformation.d.ts","../../node_modules/graphql-language-service/dist/interface/index.d.ts","../../node_modules/graphql-language-service/dist/index.d.ts","../../node_modules/codemirror-graphql/utils/gettypeinfo.d.ts","../../node_modules/codemirror-graphql/utils/schemareference.d.ts","../../node_modules/@graphiql/react/types/editor/hooks.d.ts","../../node_modules/@graphiql/react/types/editor/query-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/query-editor.d.ts","../../node_modules/@graphiql/react/types/editor/response-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/response-editor.d.ts","../../node_modules/@graphiql/react/types/editor/variable-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/variable-editor.d.ts","../../node_modules/@graphiql/react/types/editor/components/index.d.ts","../../node_modules/@graphiql/react/types/editor/tabs.d.ts","../../node_modules/@graphiql/react/types/editor/context.d.ts","../../node_modules/@graphiql/react/types/editor/index.d.ts","../../node_modules/@graphiql/react/types/execution.d.ts","../../node_modules/@graphiql/react/types/explorer/components/argument.d.ts","../../node_modules/@graphiql/react/types/explorer/context.d.ts","../../node_modules/@graphiql/react/types/explorer/components/default-value.d.ts","../../node_modules/@graphiql/react/types/explorer/components/deprecation-reason.d.ts","../../node_modules/@graphiql/react/types/explorer/components/directive.d.ts","../../node_modules/@graphiql/react/types/explorer/components/doc-explorer.d.ts","../../node_modules/@graphiql/react/types/explorer/components/field-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/field-link.d.ts","../../node_modules/@graphiql/react/types/explorer/components/schema-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/search.d.ts","../../node_modules/@graphiql/react/types/explorer/components/section.d.ts","../../node_modules/@graphiql/react/types/explorer/components/type-documentation.d.ts","../../node_modules/@graphiql/react/types/explorer/components/type-link.d.ts","../../node_modules/@graphiql/react/types/explorer/index.d.ts","../../node_modules/@graphiql/react/types/history/components.d.ts","../../node_modules/@graphiql/react/types/history/context.d.ts","../../node_modules/@graphiql/react/types/history/index.d.ts","../../node_modules/@graphiql/react/types/plugin.d.ts","../../node_modules/@graphiql/react/types/schema.d.ts","../../node_modules/@graphiql/react/types/storage.d.ts","../../node_modules/@graphiql/react/types/provider.d.ts","../../node_modules/@graphiql/react/types/theme.d.ts","../../node_modules/@graphiql/react/types/utility/resize.d.ts","../../node_modules/@graphiql/react/types/utility/is-macos.d.ts","../../node_modules/@graphiql/react/types/icons/index.d.ts","../../node_modules/@graphiql/react/types/ui/button.d.ts","../../node_modules/@graphiql/react/types/ui/button-group.d.ts","../../node_modules/@radix-ui/react-context/dist/index.d.ts","../../node_modules/@radix-ui/react-primitive/dist/index.d.ts","../../node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts","../../node_modules/@radix-ui/react-focus-scope/dist/index.d.ts","../../node_modules/@radix-ui/react-portal/dist/index.d.ts","../../node_modules/@radix-ui/react-dialog/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/dialog.d.ts","../../node_modules/@radix-ui/react-arrow/dist/index.d.ts","../../node_modules/@radix-ui/rect/dist/index.d.ts","../../node_modules/@radix-ui/react-popper/dist/index.d.ts","../../node_modules/@radix-ui/react-roving-focus/dist/index.d.ts","../../node_modules/@radix-ui/react-menu/dist/index.d.ts","../../node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/dropdown.d.ts","../../node_modules/@graphiql/react/types/ui/markdown.d.ts","../../node_modules/@graphiql/react/types/ui/spinner.d.ts","../../node_modules/@graphiql/react/types/ui/tabs.d.ts","../../node_modules/@radix-ui/react-tooltip/dist/index.d.ts","../../node_modules/@graphiql/react/types/ui/tooltip.d.ts","../../node_modules/@graphiql/react/types/ui/index.d.ts","../../node_modules/@graphiql/react/types/toolbar/button.d.ts","../../node_modules/@graphiql/react/types/toolbar/execute.d.ts","../../node_modules/@graphiql/react/types/toolbar/menu.d.ts","../../node_modules/@graphiql/react/types/toolbar/index.d.ts","../../node_modules/@graphiql/react/types/index.d.ts","../../node_modules/graphiql/dist/graphiql.d.ts","../../node_modules/graphiql/dist/index.d.ts","./src/interfaces.ts","../../node_modules/@graphiql/plugin-explorer/types/graphiql-explorer.d.ts","../../node_modules/@graphiql/plugin-explorer/types/index.d.ts","./src/components/errorpopup.tsx","./src/components/footer.tsx","../grafast/dist/therecanbeonlyone.d.ts","../../utils/lru/dist/index.d.ts","../../utils/graphile-config/dist/interfaces.d.ts","../../utils/graphile-config/dist/functionality.d.ts","../../utils/graphile-config/dist/hooks.d.ts","../../utils/graphile-config/dist/middleware.d.ts","../../utils/graphile-config/dist/resolvepresets.d.ts","../../utils/graphile-config/dist/index.d.ts","../../node_modules/eventemitter3/index.d.ts","../grafast/dist/constraints.d.ts","../grafast/dist/bucket.d.ts","../grafast/dist/steps/__item.d.ts","../grafast/dist/steps/__flag.d.ts","../grafast/dist/steps/access.d.ts","../grafast/dist/steps/__value.d.ts","../grafast/dist/steps/listtransform.d.ts","../grafast/dist/steps/connection.d.ts","../grafast/dist/steps/constant.d.ts","../grafast/dist/steps/each.d.ts","../grafast/dist/steps/error.d.ts","../grafast/dist/steps/filter.d.ts","../grafast/dist/steps/first.d.ts","../grafast/dist/steps/groupby.d.ts","../grafast/dist/multistep.d.ts","../grafast/dist/steps/lambda.d.ts","../grafast/dist/steps/last.d.ts","../grafast/dist/steps/list.d.ts","../grafast/dist/steps/listen.d.ts","../grafast/dist/steps/node.d.ts","../grafast/dist/steps/partitionbyindex.d.ts","../grafast/dist/steps/remapkeys.d.ts","../grafast/dist/steps/reverse.d.ts","../grafast/dist/steps/applyinput.d.ts","../grafast/dist/steps/setter.d.ts","../grafast/dist/steps/sideeffect.d.ts","../grafast/dist/steps/__inputlist.d.ts","../grafast/dist/steps/__inputobject.d.ts","../grafast/dist/steps/__inputstaticleaf.d.ts","../grafast/dist/steps/__trackedvalue.d.ts","../grafast/dist/steps/applytransforms.d.ts","../grafast/dist/steps/bakedinput.d.ts","../grafast/dist/steps/condition.d.ts","../grafast/dist/steps/graphqlresolver.d.ts","../grafast/dist/steps/load.d.ts","../grafast/dist/steps/polymorphicbranch.d.ts","../grafast/dist/steps/proxy.d.ts","../grafast/dist/steps/index.d.ts","../grafast/dist/graphqlcollectfields.d.ts","../grafast/dist/engine/executeoutputplan.d.ts","../grafast/dist/engine/outputplan.d.ts","../grafast/dist/engine/operationplan.d.ts","../grafast/dist/step.d.ts","../grafast/dist/engine/layerplan.d.ts","../grafast/dist/error.d.ts","../grafast/dist/steps/__inputdefault.d.ts","../grafast/dist/steps/__inputdynamicscalar.d.ts","../grafast/dist/deferred.d.ts","../grafast/dist/utils.d.ts","../grafast/dist/planjsoninterfaces.d.ts","../grafast/dist/interfaces.d.ts","../grafast/dist/steps/object.d.ts","../grafast/dist/exportas.d.ts","../grafast/dist/grafastprint.d.ts","../grafast/dist/makegrafastschema.d.ts","../grafast/dist/dev.d.ts","../grafast/dist/engine/lib/defaultplanresolver.d.ts","../grafast/dist/engine/lib/withgloballayerplan.d.ts","../grafast/dist/execute.d.ts","../grafast/dist/grafastgraphql.d.ts","../grafast/dist/middleware.d.ts","../grafast/dist/operationplan-input.d.ts","../grafast/dist/polymorphic.d.ts","../grafast/dist/stringifypayload.d.ts","../grafast/dist/stripansi.d.ts","../grafast/dist/subscribe.d.ts","../../node_modules/iterall/index.d.ts","../grafast/dist/args.d.ts","../grafast/dist/version.d.ts","../grafast/dist/index.d.ts","./src/hooks/usefetcher.ts","./src/hooks/usestorage.ts","./src/hooks/useexplain.ts","./src/hooks/usegraphqlchangestream.ts","./src/hooks/useprettify.tsx","../grafast/dist/mermaid.d.ts","../../node_modules/@iconify/types/types.d.ts","../../node_modules/@iconify/utils/lib/customisations/defaults.d.ts","../../node_modules/@iconify/utils/lib/customisations/merge.d.ts","../../node_modules/@iconify/utils/lib/customisations/bool.d.ts","../../node_modules/@iconify/utils/lib/customisations/flip.d.ts","../../node_modules/@iconify/utils/lib/customisations/rotate.d.ts","../../node_modules/@iconify/utils/lib/icon/name.d.ts","../../node_modules/@iconify/utils/lib/icon/defaults.d.ts","../../node_modules/@iconify/utils/lib/icon/merge.d.ts","../../node_modules/@iconify/utils/lib/icon/transformations.d.ts","../../node_modules/@iconify/utils/lib/svg/viewbox.d.ts","../../node_modules/@iconify/utils/lib/icon/square.d.ts","../../node_modules/@iconify/utils/lib/icon-set/tree.d.ts","../../node_modules/@iconify/utils/lib/icon-set/parse.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate.d.ts","../../node_modules/@iconify/utils/lib/icon-set/validate-basic.d.ts","../../node_modules/@iconify/utils/lib/icon-set/expand.d.ts","../../node_modules/@iconify/utils/lib/icon-set/minify.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icons.d.ts","../../node_modules/@iconify/utils/lib/icon-set/get-icon.d.ts","../../node_modules/@iconify/utils/lib/icon-set/convert-info.d.ts","../../node_modules/@iconify/utils/lib/svg/build.d.ts","../../node_modules/@iconify/utils/lib/svg/defs.d.ts","../../node_modules/@iconify/utils/lib/svg/id.d.ts","../../node_modules/@iconify/utils/lib/svg/size.d.ts","../../node_modules/@iconify/utils/lib/svg/encode-svg-for-css.d.ts","../../node_modules/@iconify/utils/lib/svg/trim.d.ts","../../node_modules/@iconify/utils/lib/svg/pretty.d.ts","../../node_modules/@iconify/utils/lib/svg/html.d.ts","../../node_modules/@iconify/utils/lib/svg/url.d.ts","../../node_modules/@iconify/utils/lib/svg/inner-html.d.ts","../../node_modules/@iconify/utils/lib/svg/parse.d.ts","../../node_modules/@iconify/utils/lib/colors/types.d.ts","../../node_modules/@iconify/utils/lib/colors/keywords.d.ts","../../node_modules/@iconify/utils/lib/colors/index.d.ts","../../node_modules/@iconify/utils/lib/css/types.d.ts","../../node_modules/@iconify/utils/lib/css/icon.d.ts","../../node_modules/@iconify/utils/lib/css/icons.d.ts","../../node_modules/@antfu/utils/dist/index.d.mts","../../node_modules/@iconify/utils/lib/loader/types.d.ts","../../node_modules/@iconify/utils/lib/loader/utils.d.ts","../../node_modules/@iconify/utils/lib/loader/custom.d.ts","../../node_modules/@iconify/utils/lib/loader/modern.d.ts","../../node_modules/@iconify/utils/lib/loader/loader.d.ts","../../node_modules/@iconify/utils/lib/emoji/cleanup.d.ts","../../node_modules/@iconify/utils/lib/emoji/convert.d.ts","../../node_modules/@iconify/utils/lib/emoji/format.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/variations.d.ts","../../node_modules/@iconify/utils/lib/emoji/data.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/components.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/name.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/similar.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/tree.d.ts","../../node_modules/@iconify/utils/lib/emoji/test/missing.d.ts","../../node_modules/@iconify/utils/lib/emoji/regex/create.d.ts","../../node_modules/@iconify/utils/lib/emoji/parse.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/find.d.ts","../../node_modules/@iconify/utils/lib/emoji/replace/replace.d.ts","../../node_modules/@iconify/utils/lib/misc/strings.d.ts","../../node_modules/@iconify/utils/lib/misc/objects.d.ts","../../node_modules/@iconify/utils/lib/misc/title.d.ts","../../node_modules/@iconify/utils/lib/index.d.ts","../../node_modules/mermaid/dist/rendering-util/icons.d.ts","../../node_modules/@types/trusted-types/lib/index.d.ts","../../node_modules/@types/trusted-types/index.d.ts","../../node_modules/dompurify/dist/purify.es.d.mts","../../node_modules/mermaid/dist/config.type.d.ts","../../node_modules/@types/d3-array/index.d.ts","../../node_modules/@types/d3-selection/index.d.ts","../../node_modules/@types/d3-axis/index.d.ts","../../node_modules/@types/d3-brush/index.d.ts","../../node_modules/@types/d3-chord/index.d.ts","../../node_modules/@types/d3-color/index.d.ts","../../node_modules/@types/geojson/index.d.ts","../../node_modules/@types/d3-contour/index.d.ts","../../node_modules/@types/d3-delaunay/index.d.ts","../../node_modules/@types/d3-dispatch/index.d.ts","../../node_modules/@types/d3-drag/index.d.ts","../../node_modules/@types/d3-dsv/index.d.ts","../../node_modules/@types/d3-ease/index.d.ts","../../node_modules/@types/d3-fetch/index.d.ts","../../node_modules/@types/d3-force/index.d.ts","../../node_modules/@types/d3-format/index.d.ts","../../node_modules/@types/d3-geo/index.d.ts","../../node_modules/@types/d3-hierarchy/index.d.ts","../../node_modules/@types/d3-interpolate/index.d.ts","../../node_modules/@types/d3-path/index.d.ts","../../node_modules/@types/d3-polygon/index.d.ts","../../node_modules/@types/d3-quadtree/index.d.ts","../../node_modules/@types/d3-random/index.d.ts","../../node_modules/@types/d3-time/index.d.ts","../../node_modules/@types/d3-scale/index.d.ts","../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../node_modules/@types/d3-shape/index.d.ts","../../node_modules/@types/d3-time-format/index.d.ts","../../node_modules/@types/d3-timer/index.d.ts","../../node_modules/@types/d3-transition/index.d.ts","../../node_modules/@types/d3-zoom/index.d.ts","../../node_modules/@types/d3/index.d.ts","../../node_modules/type-fest/source/basic.d.ts","../../node_modules/type-fest/source/except.d.ts","../../node_modules/type-fest/source/mutable.d.ts","../../node_modules/type-fest/source/merge.d.ts","../../node_modules/type-fest/source/merge-exclusive.d.ts","../../node_modules/type-fest/source/require-at-least-one.d.ts","../../node_modules/type-fest/source/require-exactly-one.d.ts","../../node_modules/type-fest/source/partial-deep.d.ts","../../node_modules/type-fest/source/readonly-deep.d.ts","../../node_modules/type-fest/source/literal-union.d.ts","../../node_modules/type-fest/source/promisable.d.ts","../../node_modules/type-fest/source/opaque.d.ts","../../node_modules/type-fest/source/set-optional.d.ts","../../node_modules/type-fest/source/set-required.d.ts","../../node_modules/type-fest/source/value-of.d.ts","../../node_modules/type-fest/source/promise-value.d.ts","../../node_modules/type-fest/source/async-return-type.d.ts","../../node_modules/type-fest/source/conditional-keys.d.ts","../../node_modules/type-fest/source/conditional-except.d.ts","../../node_modules/type-fest/source/conditional-pick.d.ts","../../node_modules/type-fest/source/union-to-intersection.d.ts","../../node_modules/type-fest/source/stringified.d.ts","../../node_modules/type-fest/source/fixed-length-array.d.ts","../../node_modules/type-fest/source/iterable-element.d.ts","../../node_modules/type-fest/source/entry.d.ts","../../node_modules/type-fest/source/entries.d.ts","../../node_modules/type-fest/source/set-return-type.d.ts","../../node_modules/type-fest/source/asyncify.d.ts","../../node_modules/type-fest/source/package-json.d.ts","../../node_modules/type-fest/source/tsconfig-json.d.ts","../../node_modules/type-fest/base.d.ts","../../node_modules/type-fest/source/utilities.d.ts","../../node_modules/type-fest/ts41/camel-case.d.ts","../../node_modules/type-fest/ts41/delimiter-case.d.ts","../../node_modules/type-fest/ts41/kebab-case.d.ts","../../node_modules/type-fest/ts41/pascal-case.d.ts","../../node_modules/type-fest/ts41/snake-case.d.ts","../../node_modules/type-fest/ts41/index.d.ts","../../node_modules/mermaid/dist/types.d.ts","../../node_modules/mermaid/dist/utils.d.ts","../../node_modules/mermaid/dist/diagram.d.ts","../../node_modules/mermaid/dist/diagram-api/types.d.ts","../../node_modules/mermaid/dist/diagram-api/detecttype.d.ts","../../node_modules/mermaid/dist/errors.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/clusters.d.ts","../../node_modules/mermaid/dist/rendering-util/types.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/anchor.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/bowtierect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/card.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/choice.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/circle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/crossedcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraceright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curlybraces.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/curvedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/cylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/dividedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/doublecircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/filledcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/flippedtriangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/forkjoin.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/halfroundedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hexagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/hourglass.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/icon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconcircle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconrounded.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/iconsquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/imagesquare.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/invertedtrapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/labelrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanleft.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/leanright.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/lightningbolt.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/linedwaveedgedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multirect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/multiwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/note.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/question.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectleftinvarrow.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/rectwithtitle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/roundedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/shadedprocess.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/slopedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/squarerect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stadium.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/state.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/stateend.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/statestart.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/subroutine.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedrect.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/taggedwaveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/text.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/tiltedcylinder.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoid.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/trapezoidalpentagon.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/triangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waveedgedrectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/waverectangle.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/windowpane.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/erbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/classbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/requirementbox.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes/kanbanitem.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/shapes.d.ts","../../node_modules/dagre-d3-es/src/graphlib/graph.d.ts","../../node_modules/dagre-d3-es/src/graphlib/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/intersect/index.d.ts","../../node_modules/dagre-d3-es/src/dagre-js/render.d.ts","../../node_modules/dagre-d3-es/src/index.d.ts","../../node_modules/mermaid/dist/rendering-util/rendering-elements/nodes.d.ts","../../node_modules/mermaid/dist/logger.d.ts","../../node_modules/mermaid/dist/internals.d.ts","../../node_modules/mermaid/dist/mermaidapi.d.ts","../../node_modules/mermaid/dist/rendering-util/render.d.ts","../../node_modules/mermaid/dist/mermaid.d.ts","../../node_modules/@types/react-dom/index.d.ts","./src/components/copy.tsx","./src/components/formatsql.tsx","./src/components/mermaid.tsx","./src/components/explain.tsx","./src/plugins/explain.tsx","./src/ruru.tsx","./src/index.tsx","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/events/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@types/node/node_modules/undici-types/header.d.ts","../../node_modules/@types/node/node_modules/undici-types/readable.d.ts","../../node_modules/@types/node/node_modules/undici-types/file.d.ts","../../node_modules/@types/node/node_modules/undici-types/fetch.d.ts","../../node_modules/@types/node/node_modules/undici-types/formdata.d.ts","../../node_modules/@types/node/node_modules/undici-types/connector.d.ts","../../node_modules/@types/node/node_modules/undici-types/client.d.ts","../../node_modules/@types/node/node_modules/undici-types/errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/@types/node/node_modules/undici-types/global-origin.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool-stats.d.ts","../../node_modules/@types/node/node_modules/undici-types/pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/handlers.d.ts","../../node_modules/@types/node/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-client.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-pool.d.ts","../../node_modules/@types/node/node_modules/undici-types/mock-errors.d.ts","../../node_modules/@types/node/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-handler.d.ts","../../node_modules/@types/node/node_modules/undici-types/retry-agent.d.ts","../../node_modules/@types/node/node_modules/undici-types/api.d.ts","../../node_modules/@types/node/node_modules/undici-types/interceptors.d.ts","../../node_modules/@types/node/node_modules/undici-types/util.d.ts","../../node_modules/@types/node/node_modules/undici-types/cookies.d.ts","../../node_modules/@types/node/node_modules/undici-types/patch.d.ts","../../node_modules/@types/node/node_modules/undici-types/websocket.d.ts","../../node_modules/@types/node/node_modules/undici-types/eventsource.d.ts","../../node_modules/@types/node/node_modules/undici-types/filereader.d.ts","../../node_modules/@types/node/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/@types/node/node_modules/undici-types/content-type.d.ts","../../node_modules/@types/node/node_modules/undici-types/cache.d.ts","../../node_modules/@types/node/node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/assert/index.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/@types/accepts/index.d.ts","../../node_modules/@types/aws-lambda/common/api-gateway.d.ts","../../node_modules/@types/aws-lambda/common/cloudfront.d.ts","../../node_modules/@types/aws-lambda/handler.d.ts","../../node_modules/@types/aws-lambda/trigger/alb.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts","../../node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/autoscaling.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts","../../node_modules/@types/aws-lambda/trigger/eventbridge.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts","../../node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts","../../node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts","../../node_modules/@types/aws-lambda/trigger/codecommit.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts","../../node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts","../../node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts","../../node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts","../../node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/iot.d.ts","../../node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts","../../node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts","../../node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts","../../node_modules/@types/aws-lambda/trigger/lex.d.ts","../../node_modules/@types/aws-lambda/trigger/lex-v2.d.ts","../../node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts","../../node_modules/@types/aws-lambda/trigger/msk.d.ts","../../node_modules/@types/aws-lambda/trigger/s3.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-batch.d.ts","../../node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts","../../node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts","../../node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts","../../node_modules/@types/aws-lambda/trigger/ses.d.ts","../../node_modules/@types/aws-lambda/trigger/sns.d.ts","../../node_modules/@types/aws-lambda/trigger/sqs.d.ts","../../node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts","../../node_modules/@types/aws-lambda/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/body-parser/index.d.ts","../../node_modules/@types/bonjour/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/mime/index.d.ts","../../node_modules/@types/send/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../node_modules/@types/content-disposition/index.d.ts","../../node_modules/@types/http-errors/index.d.ts","../../node_modules/@types/serve-static/index.d.ts","../../node_modules/@types/cookies/node_modules/@types/express/index.d.ts","../../node_modules/@types/keygrip/index.d.ts","../../node_modules/@types/cookies/index.d.ts","../../node_modules/@types/ms/index.d.ts","../../node_modules/@types/debug/index.d.ts","../../node_modules/@types/eslint/helpers.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint-scope/node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/express/node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/express/index.d.ts","../../node_modules/@types/jsonfile/index.d.ts","../../node_modules/@types/jsonfile/utils.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/unist/index.d.ts","../../node_modules/@types/hast/index.d.ts","../../node_modules/@types/history/domutils.d.ts","../../node_modules/@types/history/createbrowserhistory.d.ts","../../node_modules/@types/history/createhashhistory.d.ts","../../node_modules/@types/history/creatememoryhistory.d.ts","../../node_modules/@types/history/locationutils.d.ts","../../node_modules/@types/history/pathutils.d.ts","../../node_modules/@types/history/index.d.ts","../../node_modules/@types/html-minifier-terser/index.d.ts","../../node_modules/@types/http-assert/index.d.ts","../../node_modules/@types/http-proxy/index.d.ts","../../node_modules/@types/interpret/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/@jest/expect-utils/build/index.d.ts","../../node_modules/chalk/index.d.ts","../../node_modules/@sinclair/typebox/typebox.d.ts","../../node_modules/@jest/schemas/build/index.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/expect/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/jsonwebtoken/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/koa-compose/index.d.ts","../../node_modules/@types/koa/index.d.ts","../../node_modules/@types/koa-bodyparser/index.d.ts","../../node_modules/schema-utils/declarations/validationerror.d.ts","../../node_modules/ajv/node_modules/fast-uri/types/index.d.ts","../../node_modules/ajv/dist/compile/codegen/code.d.ts","../../node_modules/ajv/dist/compile/codegen/scope.d.ts","../../node_modules/ajv/dist/compile/codegen/index.d.ts","../../node_modules/ajv/dist/compile/rules.d.ts","../../node_modules/ajv/dist/compile/util.d.ts","../../node_modules/ajv/dist/compile/validate/subschema.d.ts","../../node_modules/ajv/dist/compile/errors.d.ts","../../node_modules/ajv/dist/compile/validate/index.d.ts","../../node_modules/ajv/dist/compile/validate/datatype.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalitems.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/contains.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/propertynames.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/additionalproperties.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/not.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/anyof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/oneof.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/if.d.ts","../../node_modules/ajv/dist/vocabularies/applicator/index.d.ts","../../node_modules/ajv/dist/vocabularies/validation/limitnumber.d.ts","../../node_modules/ajv/dist/vocabularies/validation/multipleof.d.ts","../../node_modules/ajv/dist/vocabularies/validation/pattern.d.ts","../../node_modules/ajv/dist/vocabularies/validation/required.d.ts","../../node_modules/ajv/dist/vocabularies/validation/uniqueitems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/const.d.ts","../../node_modules/ajv/dist/vocabularies/validation/enum.d.ts","../../node_modules/ajv/dist/vocabularies/validation/index.d.ts","../../node_modules/ajv/dist/vocabularies/format/format.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedproperties.d.ts","../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluateditems.d.ts","../../node_modules/ajv/dist/vocabularies/validation/dependentrequired.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/types.d.ts","../../node_modules/ajv/dist/vocabularies/discriminator/index.d.ts","../../node_modules/ajv/dist/vocabularies/errors.d.ts","../../node_modules/ajv/dist/types/json-schema.d.ts","../../node_modules/ajv/dist/types/jtd-schema.d.ts","../../node_modules/ajv/dist/runtime/validation_error.d.ts","../../node_modules/ajv/dist/compile/ref_error.d.ts","../../node_modules/ajv/dist/core.d.ts","../../node_modules/ajv/dist/compile/resolve.d.ts","../../node_modules/ajv/dist/compile/index.d.ts","../../node_modules/ajv/dist/types/index.d.ts","../../node_modules/ajv/dist/ajv.d.ts","../../node_modules/schema-utils/declarations/validate.d.ts","../../node_modules/schema-utils/declarations/index.d.ts","../../node_modules/tapable/tapable.d.ts","../../node_modules/webpack/types.d.ts","../../node_modules/@types/license-checker-webpack-plugin/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/mdast/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/mock-fs/lib/item.d.ts","../../node_modules/@types/mock-fs/lib/file.d.ts","../../node_modules/@types/mock-fs/lib/directory.d.ts","../../node_modules/@types/mock-fs/lib/symlink.d.ts","../../node_modules/@types/mock-fs/lib/filesystem.d.ts","../../node_modules/@types/mock-fs/index.d.ts","../../node_modules/@types/node-forge/index.d.ts","../../node_modules/@types/nodemon/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/parse5/index.d.ts","../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../node_modules/pg-protocol/dist/messages.d.ts","../../node_modules/pg-protocol/dist/serializer.d.ts","../../node_modules/pg-protocol/dist/parser.d.ts","../../node_modules/pg-protocol/dist/index.d.ts","../../node_modules/@types/pg/index.d.ts","../../node_modules/@types/pluralize/index.d.ts","../../node_modules/prettier/doc.d.ts","../../node_modules/prettier/index.d.ts","../../node_modules/@types/prismjs/index.d.ts","../../node_modules/@types/ps-tree/index.d.ts","../../node_modules/ts-toolbelt/out/index.d.ts","../../node_modules/@types/ramda/tools.d.ts","../../node_modules/@types/ramda/index.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-config/index.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-router-dom/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/retry/index.d.ts","../../node_modules/minipass/dist/commonjs/index.d.ts","../../node_modules/lru-cache/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/path-scurry/dist/commonjs/index.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/ast.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/escape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/unescape.d.ts","../../node_modules/glob/node_modules/minimatch/dist/commonjs/index.d.ts","../../node_modules/glob/dist/commonjs/pattern.d.ts","../../node_modules/glob/dist/commonjs/processor.d.ts","../../node_modules/glob/dist/commonjs/walker.d.ts","../../node_modules/glob/dist/commonjs/ignore.d.ts","../../node_modules/glob/dist/commonjs/glob.d.ts","../../node_modules/glob/dist/commonjs/has-magic.d.ts","../../node_modules/glob/dist/commonjs/index.d.ts","../../node_modules/rimraf/dist/commonjs/opt-arg.d.ts","../../node_modules/rimraf/dist/commonjs/index.d.ts","../../node_modules/@types/sax/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/serve-index/node_modules/@types/express/index.d.ts","../../node_modules/@types/serve-index/index.d.ts","../../node_modules/@types/sockjs/index.d.ts","../../node_modules/@types/source-list-map/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/tapable/index.d.ts","../../node_modules/@types/tern/lib/tern/index.d.ts","../../node_modules/@types/tern/lib/infer/index.d.ts","../../node_modules/@types/tern/index.d.ts","../../node_modules/source-map/source-map.d.ts","../../node_modules/@types/uglify-js/index.d.ts","../../node_modules/anymatch/index.d.ts","../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../node_modules/@types/webpack-sources/lib/source.d.ts","../../node_modules/@types/webpack-sources/lib/compatsource.d.ts","../../node_modules/@types/webpack-sources/lib/concatsource.d.ts","../../node_modules/@types/webpack-sources/lib/originalsource.d.ts","../../node_modules/@types/webpack-sources/lib/prefixsource.d.ts","../../node_modules/@types/webpack-sources/lib/rawsource.d.ts","../../node_modules/@types/webpack-sources/lib/replacesource.d.ts","../../node_modules/@types/webpack-sources/lib/sizeonlysource.d.ts","../../node_modules/@types/webpack-sources/lib/sourcemapsource.d.ts","../../node_modules/@types/webpack-sources/lib/index.d.ts","../../node_modules/@types/webpack-sources/lib/cachedsource.d.ts","../../node_modules/@types/webpack-sources/index.d.ts","../../node_modules/@types/webpack/index.d.ts","../../node_modules/@types/webpack-bundle-analyzer/index.d.ts","../../node_modules/@types/websocket/index.d.ts","../../node_modules/@types/which/index.d.ts","../../node_modules/@types/ws/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../node_modules/@types/react-router-config/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-router-dom/node_modules/@types/react/global.d.ts"],"fileIdsList":[[766,810],[189,502,504,523,766,810],[455,494,766,810],[455,490,495,496,766,810],[490,496,504,766,810],[497,523,766,810],[189,454,492,494,497,502,504,523,766,810],[189,446,455,490,493,496,497,502,504,523,766,810],[504,766,810],[92,189,502,504,523,766,810],[455,766,810],[189,491,502,523,766,810],[189,445,446,452,468,490,491,495,496,498,501,502,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,766,810],[93,189,452,453,454,477,490,491,495,496,497,498,499,500,502,503,523,766,810],[189,490,496,502,504,523,766,810],[503,504,766,810],[452,766,810],[490,496,766,810],[189,490,495,496,502,504,523,766,810],[189,491,495,497,502,504,523,766,810],[456,490,496,504,766,810],[483,490,496,504,766,810],[189,462,490,496,502,504,523,766,810],[189,462,490,496,502,523,766,810],[490,496,504,523,766,810],[189,454,457,458,459,490,496,502,504,523,766,810],[458,490,496,523,766,810],[457,490,496,504,766,810],[189,490,491,496,502,504,523,766,810],[460,490,496,504,766,810],[456,460,461,490,496,766,810],[461,490,496,504,766,810],[189,490,496,502,523,766,810],[460,461,490,496,766,810],[456,457,458,459,460,461,462,463,464,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,505,523,766,810],[468,490,496,504,766,810],[457,462,490,496,504,766,810],[456,461,490,496,504,523,766,810],[457,468,490,496,504,523,766,810],[189,469,490,496,502,504,523,766,810],[462,490,496,504,766,810],[477,523,766,810],[92,189,502,523,766,810],[189,490,495,496,501,502,504,523,766,810],[81,85,86,766,810],[81,85,86,524,526,529,752,753,754,755,756,766,810],[81,85,86,529,766,810],[81,86,766,810],[81,85,86,524,525,766,810],[81,85,86,189,205,440,502,523,766,810],[81,85,86,440,766,810],[81,85,86,437,766,810],[81,86,440,759,766,810],[81,86,205,439,766,810],[81,85,86,437,526,757,766,810],[81,85,86,87,437,439,440,442,443,444,524,525,526,527,528,758,766,810],[766,810,922],[85,189,502,523,766,810],[437,441,766,810],[86,208,766,810],[86,206,766,810],[209,210,376,378,380,766,810],[86,375,766,810],[86,377,766,810],[86,379,766,810],[85,86,189,207,371,382,502,523,766,810],[85,207,766,810],[205,206,207,373,766,810],[207,208,374,375,377,379,381,382,383,766,810],[85,189,207,373,374,502,523,766,810],[85,206,207,766,810],[205,207,383,766,810],[206,766,810],[85,207,373,766,810],[85,86,205,374,766,810],[86,189,502,523,766,810],[86,387,766,810],[86,766,810],[85,86,766,810],[85,86,189,502,523,766,810],[386,387,388,389,390,391,392,393,394,395,396,397,398,766,810],[86,205,766,810],[85,86,205,766,810],[400,401,766,810],[85,766,810],[384,385,399,402,403,404,405,406,407,408,409,410,432,436,766,810],[86,384,385,387,402,403,404,405,766,810],[85,86,189,205,502,523,766,810],[433,434,435,766,810],[85,86,425,766,810],[85,418,766,810],[411,412,419,426,427,428,429,431,766,810],[85,430,766,810],[189,193,194,502,523,766,810],[189,193,502,523,766,810],[189,502,523,766,810],[189,193,194,195,196,197,198,199,200,201,202,203,204,502,523,766,810],[201,766,810],[201,202,766,810],[266,267,766,810],[267,335,336,337,766,810],[266,766,810],[189,267,334,502,523,766,810],[315,331,332,333,766,810],[314,766,810],[189,314,318,502,523,766,810],[268,766,810],[189,268,502,523,766,810],[189,274,502,523,766,810],[189,314,502,523,766,810],[268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,766,810],[189,269,274,502,523,766,810],[101,189,502,523,766,810],[189,269,502,523,766,810],[189,331,502,523,766,810],[189,319,502,523,766,810],[189,318,502,523,766,810],[316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,766,810],[189,314,317,502,523,766,810],[189,214,502,523,766,810],[189,223,502,523,766,810],[213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,766,810],[189,213,502,523,766,810],[101,189,214,502,523,766,810],[101,189,215,223,502,523,766,810],[189,213,214,502,523,766,810],[189,215,502,523,766,810],[562,766,810],[530,565,766,810],[530,766,810],[530,531,766,810],[587,766,810],[577,579,766,810],[577,579,580,581,582,583,766,810],[577,579,580,766,810],[577,579,580,581,766,810],[577,579,580,581,582,766,810],[530,537,766,810],[530,540,766,810],[530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,766,810],[530,531,568,569,766,810],[530,531,568,766,810],[530,531,540,766,810],[530,531,540,551,766,810],[766,810,978],[85,414,766,810],[85,413,414,415,416,417,766,810],[85,413,414,424,766,810],[85,413,414,415,416,417,422,423,766,810],[85,413,414,420,421,766,810],[85,413,414,766,810],[85,413,414,415,417,422,766,810],[766,810,825,860],[766,810,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920],[766,810,864],[766,810,864,868],[766,810,862,864,866],[766,810,862,864],[766,810,864,870],[766,810,863,864],[766,810,875],[766,810,864,881,882,883],[766,810,864,885],[766,810,864,886,887,888,889,890,891,892,893,894,895,896,897,898],[766,810,864,867],[766,810,864,866],[766,810,864,875],[766,810,922,923,924,925,926],[766,810,922,924],[766,810,825,860,928],[766,810,816,860],[766,810,853,860,936],[766,810,825,860,928,941,942],[766,810,929,936,940],[599,627,766,810],[598,604,766,810],[609,766,810],[604,766,810],[603,766,810],[621,766,810],[617,766,810],[599,616,627,766,810],[598,599,600,601,602,603,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,766,810],[766,810,944],[766,810,947,950],[358,766,810,947,949],[766,810,950],[358,766,810,946,947],[766,810,822,825,860,933,934,935],[766,810,929,934,936,940,952],[766,810,823,860,954,955],[766,810,822,823,860,957],[766,810,823,860],[766,810,960],[766,810,962,968],[766,810,963,964,965,966,967],[766,810,968],[766,810,822,825,827,830,842,853,860],[766,810,860],[766,810,973],[766,810,974],[766,810,980,983],[766,810,823,853,860],[766,810,815,860,944],[766,810,822,860],[766,810,988],[766,809,810,822,825,826,830,837,853,860,861,938,939,942,943,970,987],[766,810,1039],[766,810,1041,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053],[766,810,1041,1042,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053],[766,810,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053],[766,810,1041,1042,1043,1045,1046,1047,1048,1049,1050,1051,1052,1053],[766,810,1041,1042,1043,1044,1046,1047,1048,1049,1050,1051,1052,1053],[766,810,1041,1042,1043,1044,1045,1047,1048,1049,1050,1051,1052,1053],[766,810,1041,1042,1043,1044,1045,1046,1048,1049,1050,1051,1052,1053],[766,810,1041,1042,1043,1044,1045,1046,1047,1049,1050,1051,1052,1053],[766,810,1041,1042,1043,1044,1045,1046,1047,1048,1050,1051,1052,1053],[766,810,1041,1042,1043,1044,1045,1046,1047,1048,1049,1051,1052,1053],[766,810,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1052,1053],[766,810,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1053],[766,810,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052],[766,810,1058,1059,1060,1061],[766,810,1057],[766,810,860,1057],[766,810,1057,1058,1059,1060],[766,807,810],[766,809,810],[810],[766,810,815,845],[766,810,811,816,822,823,830,842,853],[766,810,811,812,822,830],[761,762,763,766,810],[766,810,813,854],[766,810,814,815,823,831],[766,810,815,842,850],[766,810,816,818,822,830],[766,809,810,817],[766,810,818,819],[766,810,822],[766,810,820,822],[766,809,810,822],[766,810,822,823,824,842,853],[766,810,822,823,824,838,842,845],[766,805,810,858],[766,810,818,822,825,830,842,853],[766,810,822,823,825,826,830,842,850,853],[766,810,825,827,842,850,853],[764,765,766,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859],[766,810,822,828],[766,810,829,853,858],[766,810,818,822,830,842],[766,777,781,810,853],[766,777,810,842,853],[766,772,810],[766,774,777,810,850,853],[766,810,830,850],[766,772,810,860],[766,774,777,810,830,853],[766,769,770,773,776,810,822,842,853],[766,777,784,810],[766,769,775,810],[766,777,798,799,810],[766,773,777,810,845,853,860],[766,798,810,860],[766,771,772,810,860],[766,777,810],[766,771,772,773,774,775,776,777,778,779,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,799,800,801,802,803,804,810],[766,777,792,810],[766,777,784,785,810],[766,775,777,785,786,810],[766,776,810],[766,769,772,777,810],[766,777,781,785,786,810],[766,781,810],[766,775,777,780,810,853],[766,769,774,777,784,810],[766,810,842],[766,772,777,798,810,858,860],[766,810,831],[766,810,832],[766,809,810,833],[766,807,808,809,810,811,812,813,814,815,816,817,818,819,820,822,823,824,825,826,827,828,829,830,831,832,833,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859],[766,810,836],[766,810,837],[766,810,822,838,839],[766,810,838,840,854,856],[766,810,822,842,843,845],[766,810,844,845],[766,810,842,843],[766,810,845],[766,810,846],[766,807,810,842],[766,810,822,848,849],[766,810,848,849],[766,810,815,830,842,850],[766,810,851],[766,810,830,852],[766,810,825,837,853],[766,810,815,854],[766,810,842,855],[766,810,829,856],[766,810,857],[766,810,815,822,824,833,842,853,856,858],[766,810,842,859],[766,810,822,842,850,860,1067,1068,1071,1072],[766,810,1078,1079],[766,810,1078],[766,810,968,1082,1083],[83,766,810,1180],[83,766,810,1181],[766,810,968,1082],[83,766,810,1081],[82,83,84,766,810],[766,810,825,842,860],[766,810,842,860],[766,810,1107,1146],[766,810,1107,1131,1146],[766,810,1146],[766,810,1107],[766,810,1107,1132,1146],[766,810,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145],[766,810,1132,1146],[766,810,823,842,860,932],[766,810,823,941],[766,810,825,860,933,939],[766,810,1153,1154],[766,810,947,1153],[766,810,947,1154],[594,766,810],[766,810,1156],[766,810,825,830,860,1039],[766,810,860,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170],[766,810,1159,1160,1169],[766,810,1160,1169],[766,810,1150,1159,1160,1169],[766,810,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1170],[766,810,1160],[766,810,815,1159,1169],[766,810,815,860,1038,1156,1157,1158,1171],[766,810,822,825,827,830,853,860],[766,810,822,825,827,830,842,850,853,859,860],[766,810,1177],[766,810,994,995,999,1026,1027,1029,1030,1031,1033,1034],[766,810,992,993],[766,810,992],[766,810,994,1034],[766,810,994,995,1031,1032,1034],[766,810,1034],[766,810,991,1034,1035],[766,810,994,995,1033,1034],[766,810,994,995,997,998,1033,1034],[766,810,994,995,996,1033,1034],[766,810,994,995,999,1026,1027,1028,1029,1030,1033,1034],[766,810,991,994,995,999,1031,1033],[766,810,999,1034],[766,810,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1034],[766,810,1024,1034],[766,810,1000,1011,1019,1020,1021,1022,1023,1025],[766,810,1004,1034],[766,810,1012,1013,1014,1015,1016,1017,1018,1034],[189,371,502,523,766,810],[89,189,372,502,523,766,810],[739,740,741,742,743,766,810],[737,766,810],[738,744,745,766,810],[595,766,810],[766,810,976,982],[766,810,1090,1092,1096,1097,1100],[766,810,1101],[766,810,1092,1096,1099],[766,810,1090,1092,1096,1099,1100,1101,1102],[766,810,1096],[766,810,1092,1096,1097,1099],[766,810,1090,1092,1097,1098,1100],[766,810,1093,1094,1095],[766,810,823,832,860,1090,1091],[85,437,766,810],[437,438,766,810],[212,341,342,766,810],[340,766,810],[212,766,810],[212,266,341,342,343,344,766,810],[189,266,338,339,502,523,766,810],[189,212,266,338,341,502,523,766,810],[353,354,365,370,766,810],[189,353,354,502,523,766,810],[189,354,365,502,523,766,810],[189,211,354,502,523,766,810],[189,211,353,354,502,523,766,810],[354,766,810],[355,356,366,367,368,369,766,810],[189,353,371,502,523,766,810],[346,766,810],[346,347,348,349,350,351,352,766,810],[346,347,348,766,810],[189,347,354,502,523,766,810],[189,211,345,353,502,523,766,810],[189,354,502,523,766,810],[189,359,502,523,766,810],[358,359,766,810],[357,359,360,361,362,363,364,766,810],[189,190,502,523,766,810],[190,191,192,766,810],[89,90,96,97,766,810],[98,164,165,766,810],[89,96,98,766,810],[90,98,766,810],[89,91,92,93,96,98,101,102,766,810],[91,103,117,118,766,810],[89,96,101,102,103,766,810],[89,93,96,98,100,101,102,766,810],[89,90,101,102,103,766,810],[88,104,109,116,119,120,163,166,188,766,810],[89,766,810],[90,94,95,766,810],[90,94,95,96,97,99,110,111,112,113,114,115,766,810],[90,95,96,766,810],[90,766,810],[89,90,95,96,98,111,766,810],[96,766,810],[90,96,97,766,810],[94,96,766,810],[103,117,766,810],[89,91,92,93,96,101,766,810],[89,96,99,102,766,810],[91,100,101,102,105,106,107,108,766,810],[102,766,810],[89,93,96,98,100,102,766,810],[98,101,766,810],[98,766,810],[89,96,102,766,810],[90,96,101,112,766,810],[101,167,766,810],[98,102,766,810],[96,101,766,810],[101,766,810],[89,99,766,810],[89,96,766,810],[96,101,102,766,810],[121,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,766,810],[101,102,766,810],[93,96,766,810],[89,96,100,101,102,114,766,810],[89,93,96,102,766,810],[89,93,96,766,810],[122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,766,810],[114,122,766,810],[122,766,810],[89,96,98,101,121,122,766,810],[89,96,98,100,101,102,114,121,766,810],[766,810,980],[766,810,977,981],[596,766,810],[597,671,766,810],[597,629,667,670,766,810],[669,671,766,810],[597,599,627,668,669,675,747,748,766,810],[593,597,668,669,670,671,672,673,675,749,750,751,766,810],[597,668,670,671,766,810],[530,592,766,810],[671,675,749,766,810],[675,766,810],[599,627,668,675,736,746,752,766,810],[668,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,766,810],[599,627,668,675,766,810],[597,674,736,766,810],[597,766,810],[597,599,627,629,668,766,810],[766,810,822,846,860],[766,810,860,1068,1069,1070],[766,810,842,860,1068],[766,810,1074],[766,810,979],[766,810,1104],[766,810,823,1103],[766,810,1036],[358,766,810,990,1035],[358,766,810,1036],[80,766,810],[630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,766,810],[645,766,810],[645,656,766,810],[631,647,766,810],[647,766,810],[654,766,810],[630,766,810],[631,766,810],[639,766,810],[661,766,810],[660,662,663,664,665,666,766,810],[663,766,810],[662,766,810],[766,810,825,830,850,853,856,947,951,990,1036,1037,1038],[447,766,810],[447,448,766,810],[447,448,449,450,451,766,810]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"b8f34dd1757f68e03262b1ca3ddfa668a855b872f8bdd5224d6f993a7b37dc2c","impliedFormat":99},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"65ff5a0aefd7817a03c1ad04fee85c9cdd3ec415cc3c9efec85d8008d4d5e4ee","impliedFormat":1},{"version":"b2546f0fbeae6ef5e232c04100e1d8c49d36d1fff8e4755f663a3e3f06e7f2d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"cf34a21f6c44f83469723a66b660c1495f7f030d64f8f9595c621f4b6f713aa3","signature":"60e870100c81f21aa79a91d9f486e3f10b4a1fe20baf577b885b793c78b8c4c4","impliedFormat":99},{"version":"78647004e18e4c16b8a2e8345fca9267573d1c5a29e11ddfee71858fd077ef6e","impliedFormat":1},{"version":"0804044cd0488cb7212ddbc1d0f8e1a5bd32970335dbfc613052304a1b0318f9","impliedFormat":1},{"version":"b725acb041d2a18fde8f46c48a1408418489c4aa222f559b1ef47bf267cb4be0","impliedFormat":1},{"version":"898ec2410fae172e0a9416448b0838bed286322a5c0c8959e8e39400cd4c5697","impliedFormat":1},{"version":"692345a43bac37c507fa7065c554258435ab821bbe4fb44b513a70063e932b45","impliedFormat":1},{"version":"85084ae98c1d319e38ef99b1216d3372a9afd7a368022c01c3351b339d52cb58","impliedFormat":1},{"version":"f473be7c909dbd10c40f013e70da40f24648b2abb01025436fe0a0eecd0e83be","impliedFormat":1},{"version":"c98583f02275727ead0256c97298c15fb77a1c1e473b03c3b61291c63c66d385","impliedFormat":1},{"version":"9a7904e39add402d71343ac8de5303e990d9abb1fc703c64991c655b718267a5","impliedFormat":1},{"version":"522edc786ed48304671b935cf7d3ed63acc6636ab9888c6e130b97a6aea92b46","impliedFormat":1},{"version":"f671901909a26ae633328d6d899992193ca9ea718e6315f2c3d46f39c437f02c","impliedFormat":1},{"version":"7920b8aa27a7b6a90bf9f5dc21eedac7f38ca8717ebe70495ab616eb52b3247b","impliedFormat":1},{"version":"485fb40ef0ae61e1f8f5f494a2aa4a69df73dc860b5c94ef8fc8dc42679fdb26","impliedFormat":1},{"version":"1f53ae308869bfb894735576727f3dca47d0405ba7fee4f076a701b449ce6f94","impliedFormat":1},{"version":"84bdeff726a44cad4c07230ccdd2b777e53608d081eb8b27f6d28540ac22a915","impliedFormat":1},{"version":"1950e4d79983ccc330513fb28324280bbd138fc69e2739353008ae5a75f976e6","impliedFormat":1},{"version":"2e9b3ece2914738d48a674dc4d677a6cef576ef045356961120a7915735e13f4","impliedFormat":1},{"version":"8decb32fc5d44b403b46c3bb4741188df4fbc3c66d6c65669000c5c9cd506523","impliedFormat":1},{"version":"3c8c852d93800512dc47f4554efe94789bd81733947e2066a916ba70fe6992fd","impliedFormat":1},{"version":"c26dd198f2793bbdcc55103823a2767d6223a7fdb92486c18b86deaf63208354","impliedFormat":1},{"version":"93551b302a808f226f0846ad8012354f2d53d6dedc33b540d6ca69836781a574","impliedFormat":1},{"version":"5a2ae43daf9d478f37780e3ae08089a46347e395812c7c4526684878e34b1401","impliedFormat":1},{"version":"d60984fcae46158649bf553c1a649428ced1dfaa789086a7fb79a819536b0023","impliedFormat":1},{"version":"ff90925b7aef60c568d491966f90f37cfe4eb126a590e68a33c017b9be483f84","impliedFormat":1},{"version":"cbd12dce7f4a3542b0f00690efcf1211e50ad87bd78cedbf7beb60acb27d20a0","impliedFormat":1},{"version":"be8f369f8d7e887eab87a3e4e41f1afcf61bf06056801383152aa83bda1f6a72","impliedFormat":1},{"version":"352bfb5f3a9d8a9c2464ad2dc0b2dc56a8212650a541fb550739c286dd341de1","impliedFormat":1},{"version":"6b6fdab709d30fbedb090e783a610662e60b4922843f42ef801e3073a23392ee","impliedFormat":1},{"version":"65b2a90560049039460015abe63b8fa7f205bb78796a8de48a3661cfe7e07e28","impliedFormat":1},{"version":"1b6173159974df8ff78f3b01b8b89449053c1912c2ec715a2dc664d8d93a54c1","impliedFormat":1},{"version":"2b4b6a59d7d1020b65f9c878850b1aa2ae8eceb26025224d6bee2c5d7883d815","impliedFormat":1},{"version":"d45acd2463649e59b4dafb4ee051426783c6a13a72c21fac94265676f7fc01d8","impliedFormat":1},{"version":"70441eda704feffd132be0c1541f2c7f6bbaafce25cb9b54b181e26af3068e79","impliedFormat":1},{"version":"7ef6d45ce6f0ee16a0441063ca89cebfbe4c00647132f5fe31bbe5420e20843b","impliedFormat":1},{"version":"11c2481df1d73d5d667ce282d1ec9fbcedee39f0a0382fd591cf6434b21f05d0","impliedFormat":1},{"version":"ea4b5d319625203a5a96897b057fddf6017d0f9a902c16060466fe69cc007243","impliedFormat":1},{"version":"ac7eec65e925055052e4c3d88a303457150e7ddf8f02256a674315335b95af70","impliedFormat":1},{"version":"bb61172ecd43ac71849821f49ef6afa6515230386b253817c380873bdc49da50","impliedFormat":1},{"version":"ab01d8fcb89fae8eda22075153053fefac69f7d9571a389632099e7a53f1922d","impliedFormat":1},{"version":"bac0ec1f4c61abc7c54ccebb0f739acb0cdbc22b1b19c91854dc142019492961","impliedFormat":1},{"version":"566b0806f9016fa067b7fecf3951fcc295c30127e5141223393bde16ad04aa4a","impliedFormat":1},{"version":"1b3a76621e54583d0f1a9fcde6b7aa7642283412b103744f7b2a5c3c19108959","impliedFormat":1},{"version":"6f0f5830c13abe710e1e7e97bed1ae039f3a9fc8b5ce2a076141eaf0c854fee6","impliedFormat":1},{"version":"a3727a926e697919fb59407938bd8573964b3bf543413b685996a47df5645863","impliedFormat":1},{"version":"3307e5b71a5eea118476097fde4580e60c20b187e945f42d7eb69a8dbbe7e09a","impliedFormat":1},{"version":"dce7d69c17a438554c11bbf930dec2bee5b62184c0494d74da336daee088ab69","impliedFormat":1},{"version":"1e8f2cda9735002728017933c54ccea7ebee94b9c68a59a4aac1c9a58aa7da7d","impliedFormat":1},{"version":"e327a2b222cf9e5c93d7c1ed6468ece2e7b9d738e5da04897f1a99f49d42cca1","impliedFormat":1},{"version":"65165246b59654ec4e1501dd87927a0ef95d57359709e00e95d1154ad8443bc7","impliedFormat":1},{"version":"f1bacba19e2fa2eb26c499e36b5ab93d6764f2dba44be3816f12d2bc9ac9a35b","impliedFormat":1},{"version":"bce38da5fd851520d0cb4d1e6c3c04968cec2faa674ed321c118e97e59872edc","impliedFormat":1},{"version":"3398f46037f21fb6c33560ceca257259bd6d2ea03737179b61ea9e17cbe07455","impliedFormat":1},{"version":"0a08db8f792dd2b329dfb09bb2c7805298d03888608acd9eb554a8ad820e1079","impliedFormat":1},{"version":"12b9bcf8395d33837f301a8e6d545a24dfff80db9e32f8e8e6cf4b11671bb442","impliedFormat":1},{"version":"04295cc38689e32a4ea194c954ea6604e6afb6f1c102104f74737cb8cf744422","impliedFormat":1},{"version":"490725ebec9ddfc97663887989ff1a49323b7cce7293970732ef962cffed3699","impliedFormat":1},{"version":"7418f434c136734b23f634e711cf44613ca4c74e63a5ae7429acaee46c7024c8","impliedFormat":1},{"version":"27d40290b7caba1c04468f2b53cf7112f247f8acdd7c20589cd7decf9f762ad0","impliedFormat":1},{"version":"2608b8b83639baf3f07316df29202eead703102f1a7e32f74a1b18cf1eee54b5","impliedFormat":1},{"version":"c93657567a39bd589effe89e863aaadbc339675fca6805ae4d97eafbcce0a05d","impliedFormat":1},{"version":"909d5db5b3b19f03dfb4a8f1d00cf41d2f679857c28775faf1f10794cbbe9db9","impliedFormat":1},{"version":"e4504bffce13574bab83ab900b843590d85a0fd38faab7eff83d84ec55de4aff","impliedFormat":1},{"version":"8ab707f3c833fc1e8a51106b8746c8bc0ce125083ea6200ad881625ae35ce11e","impliedFormat":1},{"version":"730ddc2386276ac66312edbcc60853fedbb1608a99cb0b1ff82ebf26911dba1f","impliedFormat":1},{"version":"c1b3fa201aa037110c43c05ea97800eb66fea3f2ecc5f07c6fd47f2b6b5b21d2","impliedFormat":1},{"version":"636b44188dc6eb326fd566085e6c1c6035b71f839d62c343c299a35888c6f0a9","impliedFormat":1},{"version":"3b2105bf9823b53c269cabb38011c5a71360c8daabc618fec03102c9514d230c","impliedFormat":1},{"version":"f96e63eb56e736304c3aef6c745b9fe93db235ddd1fec10b45319c479de1a432","impliedFormat":1},{"version":"acb4f3cee79f38ceba975e7ee3114eb5cd96ccc02742b0a4c7478b4619f87cd6","impliedFormat":1},{"version":"cfc85d17c1493b6217bad9052a8edc332d1fde81a919228edab33c14aa762939","impliedFormat":1},{"version":"eebda441c4486c26de7a8a7343ebbc361d2b0109abff34c2471e45e34a93020a","impliedFormat":1},{"version":"727b4b8eb62dd98fa4e3a0937172c1a0041eb715b9071c3de96dad597deddcab","impliedFormat":1},{"version":"708e2a347a1b9868ccdb48f3e43647c6eccec47b8591b220afcafc9e7eeb3784","impliedFormat":1},{"version":"6bb598e2d45a170f302f113a5b68e518c8d7661ae3b59baf076be9120afa4813","impliedFormat":1},{"version":"c28e058db8fed2c81d324546f53d2a7aaefff380cbe70f924276dbad89acd7d1","impliedFormat":1},{"version":"cf3f331aad22bfead8f79aae52f022f25bf9ce25185cfc87f3c4a59c060a699e","impliedFormat":1},{"version":"826a98cb79deab45ccc4e5a8b90fa64510b2169781a7cbb83c4a0a8867f4cc58","impliedFormat":1},{"version":"618189f94a473b7fdc5cb5ba8b94d146a0d58834cd77cd24d56995f41643ccd5","impliedFormat":1},{"version":"da129261494c4094bf55c761ba5f0ae4d5426d83ed5e312bc7f8600727bb8a05","impliedFormat":1},{"version":"cd2f8f7d90d8d283bb4b91b57406bf793df731d39bc2c119e3fa514a057d21f8","impliedFormat":1},{"version":"91b0965538a5eaafa8c09cf9f62b46d6125aa1b3c0e0629dce871f5f41413f90","impliedFormat":1},{"version":"1930700210612b5324055fd9d335f4f2a7bb3f1b1433e1adadd7bdc5ee50272f","impliedFormat":1},{"version":"b998db2d97135f8958613fd1d795fc58a17b8fcc452288eaec13e8c8d870d1ac","impliedFormat":1},{"version":"608dbaf8c8bb64f4024013e73d7107c16dba4664999a8c6e58f3e71545e48f66","impliedFormat":1},{"version":"2d8df720a088cfdc1253782b120f400cbe0d4516bb06e98c88ae7c2af1447653","impliedFormat":1},{"version":"99acda6ceb0b1e5a754aa8e7af740702e50ab515561be3d987392f04d0f7078e","impliedFormat":1},{"version":"d6ce98a960f1b99a72de771fb0ba773cb202c656b8483f22d47d01d68f59ea86","impliedFormat":1},{"version":"806f43175b88c9a2ef89448cef56bc95c4df32a27be99748c517e5ca076919e8","impliedFormat":1},{"version":"5832c4ed86047766c1d4cfe2aa5780e3ab5d8d842d12664d0f71faf78c80dd7e","impliedFormat":1},{"version":"a43d21378510cf4ed5aad29f64f3d0fc6e0a30bb2bb81af0ea776b239a77d068","impliedFormat":1},{"version":"60c4cb259d73efe80ca3854715efdf93710a8b11a560a7f9741d6638280b4a80","impliedFormat":1},{"version":"9e3e3932fe16b9288ec8c948048aef4edf1295b09a5412630d63f4a42265370e","impliedFormat":1},{"version":"8bdba132259883bac06056f7bacd29a4dcf07e3f14ce89edb022fe9b78dcf9b3","impliedFormat":1},{"version":"5a5406107d9949d83e1225273bcee1f559bb5588942907d923165d83251a0e37","impliedFormat":1},{"version":"ca0ca4ca5ad4772161ee2a99741d616fea780d777549ba9f05f4a24493ab44e1","impliedFormat":1},{"version":"e7ee7be996db0d7cce41a85e4cae3a5fc86cf26501ad94e0a20f8b6c1c55b2d4","impliedFormat":1},{"version":"faa402775a4c220279f9c26074a0010f10a7f0293c506ffd0857ea45e8ba7733","impliedFormat":1},{"version":"b498375d015f01585269588b6221008aae6f0c0dc53ead8796ace64bdfcf62ea","impliedFormat":1},{"version":"08b603e3737ff32a685eefca3e7f21324b8b868f3322416cef759f8a54d234ef","impliedFormat":1},{"version":"34534c0ead52cc753bdfdd486430ef67f615ace54a4c0e5a3652b4116af84d6d","impliedFormat":1},{"version":"14d8af44e19148423a5a0817544a229e3ba324e1cd814c1d7b4ca2690baf434c","impliedFormat":1},{"version":"91122fba45414382787d7cffbd90298118a2970f8f12d91cff302f3a482f01e1","impliedFormat":1},{"version":"e891cc403ec4588c43e67f20d4f44c2de1995e1a778e7a255e0a1f8c7d263005","impliedFormat":1},{"version":"7a07b0e6d8f5356cb3473723d1853c9505301e05329df8a72ba6c42a2657ca66","impliedFormat":1},{"version":"e54bfc9e643070779ab10e9d572a776562725c6533f9b8eefe30d5ee2e87b22e","impliedFormat":1},{"version":"b60efbac98231283107121b5b3327f56a6632c2d14d7616920bc309a4f6d4bc3","impliedFormat":1},{"version":"46036e7d150725b12b0ef99ca77cfd4ee662c6a0e011f85a679827dd65d1f42c","impliedFormat":99},{"version":"33235f0c8a3cdf9917c3a2b8eca15fba28d554a48d8eeca24c417a16e317d0ac","impliedFormat":99},{"version":"783a9a7d35f9b922e0d72452e85245829e5618776b3243c4adb9bcd554443ca5","impliedFormat":99},{"version":"dd9d62565b1d4e0885e9b1f1fb55c7a304e5710303d31821a7daeeada9662aa0","impliedFormat":99},{"version":"ef14aa59689ac1bd4b725220fafe753eff9acd8cdc445c04e5b98ac3fe28bff2","impliedFormat":99},{"version":"8c184a7193d318242db5e31ef4bbd73e88c3a0e333c0f4c8523ee2d9ad76cf84","impliedFormat":99},{"version":"dc7600229385bd96566e63a48e336a38a71f223de213b9a5c04f84a9c59d1342","impliedFormat":99},{"version":"907df4219dc9e9e4310be2f3e9e118aa092d073612b9ab1247e447c6ce902260","impliedFormat":99},{"version":"4f4f2beae13a724e7f1b45b5af86a94500d799c7a59181eae1098f549698b09a","impliedFormat":99},{"version":"62478b6c261fee944784c9039e465e03600d68b60d312aba7040143dc1189d91","impliedFormat":99},{"version":"72a845236a24235f598a7da1dc89c0e38a74e1c8cdf4db833c5618e12adc4a50","impliedFormat":99},{"version":"0d2a83bc35ebb75a347d16b72836cf7d407563a7827a585590fae7e2873fcdab","impliedFormat":99},{"version":"f4584e95c63371b5d507749924d94e324c7e041f964975a92e7c8a1abc840328","impliedFormat":1},{"version":"294985ec97b28343d1d6e2730a13a839c375a2ffb5f6b37acbf5dacf35613785","impliedFormat":1},{"version":"3896fddb08ec18856f5e88f9f7776c1c58c41d6129f8ee5158513a5de3febd01","impliedFormat":1},{"version":"4e2af0853ef2aa0bd0c97121d37255db91d57a5a5d67cc937f2367a949373f3f","impliedFormat":1},{"version":"d53ba569f15be8659ba0f726dddb7a24bb875b63b8614c6b007d38cabfa3217b","impliedFormat":1},{"version":"2e900e22ef301dafb3a35df7aaab4f139bf1602c8e5dc0bb0ca8b24305af388e","impliedFormat":1},{"version":"9c479340e2f7537bbd31dd0a08aeeec28db302d9bef096eef3cc09f20eb56097","impliedFormat":1},{"version":"952d81d65c1cb9a3bb736f233db638e50fdd4e7ae75a5624e7b8be24dad92851","impliedFormat":1},{"version":"2767eb79f4b9e754efff56d654aa71715baac18a6157170f423cbd460f2445ab","impliedFormat":1},{"version":"3d6f89fb6ab035027268da5a90e31369876b5f2c37339b1212590c8727bc920a","impliedFormat":1},{"version":"6b05adc37cce53629f7740a2ce72a17d231cb1332dd20d725f49918db5f90ec4","impliedFormat":1},{"version":"cb364f282ace685f66e8fa777804a36e96892e4c92cf4e8816ae9156c3551453","impliedFormat":1},{"version":"afe1be833b5a9e15f35b72d4aedaac24c0fd903e374c4eb4be90334a0e5ad9ae","impliedFormat":1},{"version":"42b59521c78a8daeaf087752adb5de9753e7c4b701fc7c3e435ef1d737140091","impliedFormat":1},{"version":"eedad1c380f5737f1220feb0ee83212f602acae8f0553837c098878e5c73c198","impliedFormat":1},{"version":"e0fdb256e83c39f7794908de553930ce2581ba109b8de90937bf972fa75485d5","impliedFormat":1},{"version":"dafdf0b0ccb55128f83fe0acaddadfb5d223887a7e8d59a0623860a68b1f59a7","impliedFormat":1},{"version":"6f3ef4208d2d6933180ac1bc813efbfb319b05e49ef0cdbeea15126b982578c4","impliedFormat":1},{"version":"02e7a692feb22c829d837e40e82070d47b696a0c64ea192ba2c438f6a55902a4","impliedFormat":1},{"version":"685b232bf1f8763afa58c62d964f677478fac68ccd9e761e4d9a0cf6b5f9a378","impliedFormat":1},{"version":"2d205c767099a9c1719b2884eeb878470d81e3418ffe9ae8db8139e597f3e34d","impliedFormat":1},{"version":"0c0ccc47a6e4cdaf336181d46a262c591dad7098f431a4234364fccf7ced258f","impliedFormat":1},{"version":"cf68f71517959967c83d4585d1cd37376fbbe8174ddd0140274c228488149190","impliedFormat":1},{"version":"d6cadb48c29a13aeb7be79d14980f2aa4ebfe9c6118726a906cc429fba582079","impliedFormat":1},{"version":"56e6a902d2aa94175f75bdc0ad822bf787b67bb6dbf52018c389d3643d203539","impliedFormat":1},{"version":"650b748b635b9299a8d2ba23ff02f403aac044a946b7e10bfb95942367bc1489","impliedFormat":1},{"version":"c4e474945611676435f1807a5ab049becffc54a32a1a4cfc96731cdb34fdc8c1","impliedFormat":1},{"version":"a23c0e88e5d4204898c2087a5950b974c594343f78aa8e3e758bb85c3d30dfde","impliedFormat":1},{"version":"8d071caad80707dc1853c718e6372349df8fdd4790ac57550cb243545ac91806","impliedFormat":1},{"version":"6138f6a183b6ab187becc7f4f37ea7b9b072874c75699d2bd10950fe07726aec","impliedFormat":1},{"version":"ddbafa89c2b1b11251b96deef3869fa0b567766c43bd31224838ecb024297b8b","impliedFormat":1},{"version":"3cc6ec5641587a673473f9613880b63f531446bc631a6f96adbb033672cf6d2d","impliedFormat":1},{"version":"3901548cb8b4d914800927f9def278f34dfa106e65be38ee47d59c4efdd45ef9","impliedFormat":1},{"version":"21856903077f053172be7ab1027ccfb94fecbb0d22dbc34e7208c4553575ccbc","impliedFormat":1},{"version":"6cf6409ce9b90a14cd1e146d00fd21973d5d6b2da875283f3da0f27e0b786eaa","impliedFormat":1},{"version":"2a527df5c4828328fa6b35cf8b8f5bf0640933a4602c517faace7a1c3af0d446","impliedFormat":1},{"version":"2a46d72fe8eac64f8337c839bba3e558a07cdf6f2574d88dd5852d6ee8bf7d9c","impliedFormat":1},{"version":"0787ec67c199917f7c0f2a127432dc65f5d422e15992b8a7c3d7765f94075390","impliedFormat":1},{"version":"8494cb4b789a1f5e0710a4db2e111b4e20ee373251cb958b79f2d19d8adb3743","impliedFormat":1},{"version":"b8a25d32e4a2a187e2169f0936416cfcac8926f56166f3895fb5f82942f3150e","impliedFormat":1},{"version":"7552cf0a2915702d6cf9a8c6a2a242b713214728dbb81353132d2d986e74e521","impliedFormat":1},{"version":"c3789c53874f2aba5a7c21e1ac1e467f95522ba5a0c8f9c8b8c519efa7aec51b","impliedFormat":1},{"version":"dec52a42c912503c35463f974fb86cb1a772cab001c2c9ed413093845be2f677","impliedFormat":1},{"version":"d2a2a7be324ab271073676edb22f5de259d4baf5bad32bd2e5545f957f503ac4","impliedFormat":1},{"version":"63fd6e8e4f5403337124c82bf46fb17ce24923d8a9223b387ad312a4b075e7c9","impliedFormat":1},{"version":"bce453d2e25d1104b3b84c97aee92111e194691e5b254af318499745c8e041c6","impliedFormat":1},{"version":"22f897e17f18b702f8aa1c6e6412fcd33d180f8ef61297fec6c395a2b18d9908","impliedFormat":1},{"version":"0afe2ed080fb1ca424bbcecca1874d7fa24aaba54535722b00607d38dd150f8a","impliedFormat":1},{"version":"04260ae2a15ef601034f94c4b4c91b76a4c4197d48137d04859d9aa9c83f2f16","impliedFormat":1},{"version":"507fe2b965da84e42b4d17d35264be1e70694a8692c75fc07207d38deda42ad7","impliedFormat":1},{"version":"4a9bdce843a6bc8bdc71287de2808e7438fd718e17c55d175f0f2d0a8883947e","impliedFormat":1},{"version":"8a0a5c90711b4d4d55b0edf7d097faf872f65d6f7be1a5a42fdcfb62c751a135","impliedFormat":1},{"version":"756c0a51db689803dcbcb94cec65edd6f0212fcda9abf264001ae975a5c6a18b","impliedFormat":1},{"version":"2873b8fe4083b54fb60dd1d03ee8b22496e41f96a4e536e06cd59a481aba01de","impliedFormat":1},{"version":"5fc9e50135f4163989ce74b83b68a5ee44d151f04ec44078adbe913c8dad694e","impliedFormat":1},{"version":"e2949c84dcb7b6a3fb40fc8bfcd9fa6b74d1e2c830de0d5ace7159cc4fb4b5a5","impliedFormat":1},{"version":"34a80ad568a06a539e43bde102bed1fcb8bec196811caa9abc3a0cf44a95fdde","impliedFormat":1},{"version":"e634a64172adde8d23f6df23f252d35e16eaa4bc33e881700967498a955e0b25","impliedFormat":1},{"version":"b1432d91fcf4cf709d71adc1a00e04ac1948380b8552310d0509dbdc3b2cf97a","impliedFormat":1},{"version":"e3d05607f9e532c806395e8765913736c42900c5c3ab5ab52d910da6fd57121c","impliedFormat":1},{"version":"eca0a0e9725ccbf8b13ee72cdab75b489992f2ce7f4dd198767831982463c294","impliedFormat":1},{"version":"26d1f4beb9d50d83557de587f5168dacb4dc81935f4880afa7d48dd7b13d5d10","impliedFormat":1},{"version":"67d2cca28154842dd7b1d5cde8c94b9fc24afad1089eab0f1de7294d143605d5","impliedFormat":1},{"version":"28c9bcc4c2323e859523b1edd20a69b66784bb3ca58568ac1c2448d90c1e1fce","impliedFormat":1},{"version":"b2434d709c9dcf1bee9223a19b449cf9d8a0b411fa5bb2ecc8ce25fa92889c77","impliedFormat":1},{"version":"6cbfcc72a73f25c47951ebb87118ecc43d04781e02b51236d4fab69dbc63926e","impliedFormat":1},{"version":"e0fdb256e83c39f7794908de553930ce2581ba109b8de90937bf972fa75485d5","impliedFormat":1},{"version":"dafdf0b0ccb55128f83fe0acaddadfb5d223887a7e8d59a0623860a68b1f59a7","impliedFormat":1},{"version":"ec314adb4116647307480f138c5c23f98bb5ad4efba51aeb1957fc4519429d8b","impliedFormat":1},{"version":"5297455afc3c8eff9ae459f28eeb846fd86a51678afbceb7c27696eefdcf1e5b","impliedFormat":1},{"version":"532aeb172f2a735739956f48d7862681212baeca1bbde9185eae73f6dcb95faa","impliedFormat":1},{"version":"2d205c767099a9c1719b2884eeb878470d81e3418ffe9ae8db8139e597f3e34d","impliedFormat":1},{"version":"cb33e3ca7c3b2cda0d04b6aafe6f9ddad719ef615bdeae9cb88384ad798807ec","impliedFormat":1},{"version":"2c9b150c52c2c876fd5e91e1c63be66a6e2d052a1f381d362ad649c6ffd8fba5","impliedFormat":1},{"version":"d6cadb48c29a13aeb7be79d14980f2aa4ebfe9c6118726a906cc429fba582079","impliedFormat":1},{"version":"1fecc438d1dbb692dcc38564aa5ea06a108cb37661327d8c0e0c065e07efb3aa","impliedFormat":1},{"version":"650b748b635b9299a8d2ba23ff02f403aac044a946b7e10bfb95942367bc1489","impliedFormat":1},{"version":"c4e474945611676435f1807a5ab049becffc54a32a1a4cfc96731cdb34fdc8c1","impliedFormat":1},{"version":"8d071caad80707dc1853c718e6372349df8fdd4790ac57550cb243545ac91806","impliedFormat":1},{"version":"3cc6ec5641587a673473f9613880b63f531446bc631a6f96adbb033672cf6d2d","impliedFormat":1},{"version":"3901548cb8b4d914800927f9def278f34dfa106e65be38ee47d59c4efdd45ef9","impliedFormat":1},{"version":"21856903077f053172be7ab1027ccfb94fecbb0d22dbc34e7208c4553575ccbc","impliedFormat":1},{"version":"6cf6409ce9b90a14cd1e146d00fd21973d5d6b2da875283f3da0f27e0b786eaa","impliedFormat":1},{"version":"2a527df5c4828328fa6b35cf8b8f5bf0640933a4602c517faace7a1c3af0d446","impliedFormat":1},{"version":"7f2eab4f5f276996d3e13aa12f589048fe198eea8dbd78ddcee60c38a8ff5606","impliedFormat":1},{"version":"0787ec67c199917f7c0f2a127432dc65f5d422e15992b8a7c3d7765f94075390","impliedFormat":1},{"version":"095b26151a4ce7b9da003174d4a22db9f867928d3bc7718966d0e95f0c9d160f","impliedFormat":1},{"version":"b8a25d32e4a2a187e2169f0936416cfcac8926f56166f3895fb5f82942f3150e","impliedFormat":1},{"version":"7552cf0a2915702d6cf9a8c6a2a242b713214728dbb81353132d2d986e74e521","impliedFormat":1},{"version":"c3789c53874f2aba5a7c21e1ac1e467f95522ba5a0c8f9c8b8c519efa7aec51b","impliedFormat":1},{"version":"dec52a42c912503c35463f974fb86cb1a772cab001c2c9ed413093845be2f677","impliedFormat":1},{"version":"d2a2a7be324ab271073676edb22f5de259d4baf5bad32bd2e5545f957f503ac4","impliedFormat":1},{"version":"e8125d329bd068dfa97035914b87f0d561f8bbc5a5883ad883c5484dd8315eee","impliedFormat":1},{"version":"22f897e17f18b702f8aa1c6e6412fcd33d180f8ef61297fec6c395a2b18d9908","impliedFormat":1},{"version":"9b48fb7d6521c10569a09921fea776719fab153e4b24d6bf4290fe6fab9be6d3","impliedFormat":1},{"version":"9c2c8c2162f810ac21c9a9df55ef59085b82790d9b17a916c6d025ba3e3b8edf","impliedFormat":1},{"version":"507fe2b965da84e42b4d17d35264be1e70694a8692c75fc07207d38deda42ad7","impliedFormat":1},{"version":"8a0a5c90711b4d4d55b0edf7d097faf872f65d6f7be1a5a42fdcfb62c751a135","impliedFormat":1},{"version":"3ae18d6fa578fc0025f43e6b2f26bc3d1ba110e9149273bd213a5cb7fb878848","impliedFormat":1},{"version":"2873b8fe4083b54fb60dd1d03ee8b22496e41f96a4e536e06cd59a481aba01de","impliedFormat":1},{"version":"5fc9e50135f4163989ce74b83b68a5ee44d151f04ec44078adbe913c8dad694e","impliedFormat":1},{"version":"e2949c84dcb7b6a3fb40fc8bfcd9fa6b74d1e2c830de0d5ace7159cc4fb4b5a5","impliedFormat":1},{"version":"34a80ad568a06a539e43bde102bed1fcb8bec196811caa9abc3a0cf44a95fdde","impliedFormat":1},{"version":"e0f1bf295d165e3e7fdb6bbd9910888e9c5645e19cb4ae4b86303ee5ba2c951d","impliedFormat":1},{"version":"7c6d7a526120d34a336b995d5a5b2f52d934b89d364b333b850c15ef3b5bffce","impliedFormat":1},{"version":"e3d05607f9e532c806395e8765913736c42900c5c3ab5ab52d910da6fd57121c","impliedFormat":1},{"version":"0a019658c43651da76cdbc673aab961f4c6e9fab4006e3aaedb5b13e5dbab37d","impliedFormat":1},{"version":"956b961306d285dc2c1d3b5020baf1e2c57f564876f50dd42e0976bc75a020d3","impliedFormat":1},{"version":"dcb2d6a6e0b8900a46f9cc664fc1c6e3cc9a4d99249bad1605749d651e8cdd2e","impliedFormat":1},{"version":"9b33ad40fa8b00650b695638c8e08df88bbbfed00283ff5eabbf11b8813e03f8","impliedFormat":1},{"version":"fa90ab24a39247e1e9874784e7b56a93ab9f1a04daadff9d9cb99d7223d91486","impliedFormat":1},{"version":"4b91eb2d2841e34c371710ec924e8ac947911d9941bdfb6a11730e741f287005","impliedFormat":1},{"version":"ce980562ed0d193d700d6d55ff717131e4bb58b88b5448e7e05dfceae719f47c","impliedFormat":1},{"version":"4d66be39bdb7a62696866426ec835920b2cdce7124b54aa14b1f9fef4d41cd93","impliedFormat":1},{"version":"dd679f95f944384711ac7c9ed85d6b46b15f82c023c4919ba3232fd753532c90","impliedFormat":1},{"version":"8b4a688f685193540c8164ebe48624c4e82b8769d74dfb3557c4dbb9fa567898","impliedFormat":1},{"version":"b5f9c5b2f54ce4c0baf948d885a7a21aeba477dc9356beefd63c4bddac366d6c","impliedFormat":1},{"version":"48079abf5a74f7028473652a9cf64e3d260c44bf4060b05485a6e3d7f0370dc2","impliedFormat":1},{"version":"ea22fbc1dbd8fac6df7dbd5870183a9d14ccb8358c253bf844ced890a7f38dd6","impliedFormat":1},{"version":"773078223907d9936c05dddfed60cafeebd4249acbcc189001370261718f0258","impliedFormat":1},{"version":"17e344c68488e5787eebf3ec125565d51a468af5701e214367a42ce8e5eef059","impliedFormat":1},{"version":"aadf00554ac0118fcf308d7ae1cafd86a7931b41e038022dd891af248d72ef35","impliedFormat":1},{"version":"733ec8bd6c210af3ea70cfd0ae7924949de5ecb384d9d1db3744b3af2f9d0f00","impliedFormat":1},{"version":"d95f40246c4a53a739dec1818a4f3cb39aac4965ae1a4faf614f78bf3b85c347","impliedFormat":1},{"version":"3a844741079e4c4e38e5dfa7b182ef7030a8c787bc08efacebe0d7b3bb685f37","impliedFormat":1},{"version":"5f5ff006e411f34b3ecf4fe66bbf7c9978bab7fb7f09646c91b8549acc8d487f","impliedFormat":1},{"version":"70e812cb0393e7100087a2203ee9349dab49974032429d29c84222be1356e6f8","impliedFormat":1},{"version":"856aae51a27c4c285b39701ee870dae66bd5b8e007c8dc153bd66fd56fa901ea","impliedFormat":1},{"version":"739130f4f55f33efe791911603f2276169bc0554dbb789bd907870774bbf30d0","impliedFormat":1},{"version":"9ee7eea77d7631e7d95b4f5efc9972fea3a82a3947bac97e0c5c3a9ad2f8d509","impliedFormat":1},{"version":"748b8a93f92a5e3c6c45e9252efe5f70312dbaabf23c32882b0901d530698b40","impliedFormat":1},{"version":"59a6a3f236c937dcc8a6d99557b4317712c0b82f53e73f7a0070c82fc795ed6e","impliedFormat":1},{"version":"dfd624f05e679a330f8b0b8c27b97cc6d09cb8c5547c229eedcf71ee60716f50","impliedFormat":1},{"version":"33bcff4a7c9c06dd05a7635f1a7ba8ccd1a26250caf6fef41fe4bf3677437356","impliedFormat":1},{"version":"001bb2fff6cc7d1cfb99e5eb13b745764230c0a48c9832cd4b8196acbb63a402","impliedFormat":1},{"version":"7f843004c1f9cc2d32f9778227813cfeb8f47733f4485130d999f51eb97a45df","impliedFormat":1},{"version":"1489c494f095baea8f9e67d37a9fdd4025c172c1e74ee783093ee2756a665a1d","impliedFormat":1},{"version":"d4946c3a7c18a8ba1e60a1578c676f51a81d1767fcbbf60b072803ed3fa7f9f9","impliedFormat":1},{"version":"a56648d6831b9b5552b56f0eae7536666d181c86fdcc422f9143e4a5cece6a39","impliedFormat":1},{"version":"f15ff88fe1895cda331b45ceaf23dca027937395a64daa6867cbde52dea7b8c2","impliedFormat":1},{"version":"37046d990462ee09b87b6045d32d62f04d2285351a0977aec83050d994cd6992","impliedFormat":1},{"version":"67294340fe22775adae3b562bdd25adbb1b0d9926b54dfca251418e0e9df8730","impliedFormat":1},{"version":"38b2ce306ab9f13712896b0a4aa876c3e0af5b4466266938e7c5988d822a3f76","impliedFormat":1},{"version":"40e954fecc5f79d6d0890a64713d5e2f8083ae960b6b4e541d44efb9b1c4a899","impliedFormat":1},{"version":"0203a29de8ad74bc916100aad38ccaef5efd37435c8e2f6f6fbfaf2449cf9c03","impliedFormat":1},{"version":"c7aedf7a48b01d06a7a163a63bf1d544fc0bd00417885bae592319cd3f8a97e9","impliedFormat":1},{"version":"e5873895fef4cf12c0bed5b157849e6784d24280bd41ed90854180eebdaa5026","impliedFormat":1},{"version":"65cfc8c1b0ef79383524acaf8151508cb09d163850c4a50dc53574583afd4761","impliedFormat":1},{"version":"c38a0a8b43a6403d1381c32af260513432885aa4c0ae03addad9bad07fd2a2d7","impliedFormat":1},{"version":"d34cbb43422395aa227955f37c7d2b5fcaa2e6675e2a7f7e4e25ee704ab912be","impliedFormat":1},{"version":"af560f62851c384acb21284b9127d53411951056010ff0971f0e66d88e66a7b5","impliedFormat":1},{"version":"b34a0615615cbc69750d9fffe16f31563d917330413219225915cbf4fd473fb7","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"82d7a9061cc31434ca602b01abf3bd3aa3d93eeba3d92ca4d7ec5ff0e401bcc1","impliedFormat":1},{"version":"4ca12ab9d4783b7180b61b96b798b62f6da47e3ee15ff54a5a41607349e15ffe","impliedFormat":1},{"version":"143c3bff41eab3e0d761a3cab2bd580a642beb7509d21fdae5ad6ef04eaec846","impliedFormat":1},{"version":"92538fb1b4ade68cef4fc7b35b8b919e1f2d0c95a080865f991bb10254bb198e","impliedFormat":1},{"version":"963a1f038a096850feadc16b1f4877bae9b98f70fb5471e8af07813fc440d9c8","impliedFormat":1},{"version":"636458e860b725e326083020eac20d68df8c765c22870550ad78727f08d354ab","impliedFormat":1},{"version":"b2597f8e5cc644c743602ec4a9196f1a4f981383bc666806c673061d5a974d7f","impliedFormat":1},{"version":"9ea5135bc86b361d9f7d7559979d3749945a5976bf85e7f5c63b5439f122e5fa","impliedFormat":1},{"version":"11606f2a7b32a47aa2fede3d93f3a4505cf57bb4fbae758b0cbebebed1dae817","impliedFormat":1},{"version":"ec5ef2d24ec079093f3e8aeafc36110e32d586c3f2c3af395823aae744e7b69f","impliedFormat":1},{"version":"181baa25db7c55954e1d4114485cd3ed96df14a6e26fb8c9ba702a8a118d9254","impliedFormat":1},{"version":"fb553e78cd953e6b36a394021bd392446638033c9e3388a9f1babb613617a20a","impliedFormat":1},{"version":"6139c7fcac07fead5b35781d146198019e176f8d32c9b6ae89acfa22b16a9fbc","impliedFormat":1},{"version":"86b2abd6ddc37ca8fbed9606367ce4b8fa1d6b2fa3c30cd8f5fcb6d3ae996268","impliedFormat":1},{"version":"5a699f07f692f146028a8d2a24dea3df3bebec19a2f6dc7e1624274b8a0765b8","impliedFormat":1},{"version":"aa95d55cbdb02fd4cfcc5b52f04453dbaa86a1fcf31e051bcfb3716f398ccefa","impliedFormat":1},{"version":"55cc31850bb3aec591a02f4e2d2999f1484a52f0afa8ed6934dbb0cfa0635128","impliedFormat":1},{"version":"ae5648da65ae89098d2238037b8b739303ff1f1ed7f711f5e1dab85c0cde73dc","impliedFormat":1},{"version":"21cc4c106db99d082b2b726f4feea224fa40b10a6cc7de03c2ac8ecaded86faf","impliedFormat":1},{"version":"51b46e83520f9dc3e1380657071ab165ada01fee49e7b41b186da91bd287503d","impliedFormat":1},{"version":"f577f333d0679c82bbf346c3983de5f6e5730e264937021a506b13ab1cee5e52","impliedFormat":1},{"version":"47ec9752d4882a64ef06ce90067439f39e1f64831efb82d6b61a27e46c27665e","impliedFormat":1},{"version":"4550d4a71bfe8407890afd7c7953e4ff732e848e6569cd94fbf33b45c4339a94","impliedFormat":1},{"version":"79954720b311aed13a8b28effcf9f043816ff2a8f1887ffbc4f5ea604c3ab0ae","impliedFormat":1},{"version":"0c0f1398bc2cb82a901d38593309ab3e9a025718c31d2d41096373661fa943e8","impliedFormat":1},{"version":"ac994da1b115d9aed1ca0100a607032122ec0b1cac07436a3215e6c7f8c2ef2f","impliedFormat":1},{"version":"85a143aa41b4a16f8836a9c1059b84fcaf9380b37fb28624cc35b49bb2c834fc","impliedFormat":1},{"version":"b759e7b85c5337b457a1d61df4b47fb2e97665b05e666e75289d808f3aa4f1bf","impliedFormat":1},{"version":"fa36037b4be0f7c122eb03efb72e79c1799981028f6bfc6b8dea307c97f3529c","impliedFormat":1},{"version":"820fc91384a1b27caba7f2411a1535e9313bf46411e290b3480b030837c6f985","impliedFormat":1},{"version":"da7e68de00deb6259533046617b8a3cd35e61a1be103d0e0487584cef7f1da2c","impliedFormat":1},{"version":"ad4172e0e6d5be3841679dec15e80a2dd09d768a6936ae0df2c05c2c8d45523b","impliedFormat":1},{"version":"706230799de1bc03f4d1e927b0f535f4c9f74061b40138f5ade2e3a470b7f3ea","impliedFormat":1},{"version":"a09dc5f7d149bcbdbc83db02b54ba7cc83bda0148454782c41521e1e9a42233e","impliedFormat":1},{"version":"6fd319d50603e1200a24078e3e92dd1b17ff058681ef451dffa890ba8e84514b","impliedFormat":1},{"version":"2ad76a8f378c771219e4a1c9fc1fc6a66a4ad7192edc3e84a5e0cd79a806dbd5","impliedFormat":1},{"version":"bb40c13d89e52602b3af4cce60ccc46644e30cc2fa5f47d5c8d0fa645c85532a","impliedFormat":1},{"version":"8c2cb956a171e41734bf8ebf4308eac8e21025a4501d3729d0d378f6d259cd02","impliedFormat":1},{"version":"a6dbb9a79212baa8a46fdf91ab2b8210665d55cd739ed1668f109d1976f213f1","impliedFormat":1},{"version":"84dc7636681d2cd0ccc6a365e9123da5a0908b280b1cc485dc5d354a2ca79746","impliedFormat":1},{"version":"eb4f2a4043e45b0452ed473b674229d4a7fda48a8092b7e34d88188df0c8af47","impliedFormat":1},{"version":"95ebe1415645192fdf015b46b4c542bb60e736624bfee59559af8a7671016202","impliedFormat":1},{"version":"d19c66a5a7376840dc3811fa0465038e3e270fe2e9d0d17d1f0c1b2c27481b92","impliedFormat":1},{"version":"0e396f97cc7eae97b942cccbe7c17f60f8af207d8c4aa6c154267eaca86ab11c","impliedFormat":1},{"version":"f4c5d65fe7e93cecddd537d46af01820cdb9f72bb94b09c6309debbb50ad5ada","impliedFormat":1},{"version":"ff526238d3fbb56031ca203f8014f5e75077f04d842f441d2c050df01e849f7a","impliedFormat":1},{"version":"dad84d1b803af8326557fd1c7710ce845a6d590e462c802d380e9d947ec14c6e","impliedFormat":1},{"version":"5806973501dd13a50b30b3f23751f28d9eb8ee103228af39d07491e1de7484fc","impliedFormat":1},{"version":"a3caaf2245d2567ffdda491cbc817df385ef549dc186a39c2a3452daa07dc034","impliedFormat":1},{"version":"a8ff496bbaa5cf7145cc4ca8df03e2dc480bbe24dcbd1f9734200eb12d5aaad7","impliedFormat":1},{"version":"e236821607e4c3dc1adbdaca5cd7fe55ff8d19051672532639e76f045889e9ee","impliedFormat":1},{"version":"f9e2c40b4a0686af8576ad4aad9dfb9e62f5daf309101bc9956a497f38f92b39","impliedFormat":1},{"version":"fff48e97d33173e8b75b9a2b74ed71e6d0d3b7e4aa81b821a90c09a95e0423e0","impliedFormat":1},{"version":"928b23be870338067bbc9381ffb3de5cc3b088abe73c8e4995444fbabd7edaf1","impliedFormat":1},{"version":"a26d74bc8768e134734fa049d5a89fb674a560292f4bf1b39392416dc04cf49e","impliedFormat":1},{"version":"ea7f3d87bb25b8cf26c1b440de31b628c53b5e72e8f1ab1726356bf58acf5946","impliedFormat":1},{"version":"7ec047b73f621c526468517fea779fec2007dd05baa880989def59126c98ef79","impliedFormat":1},{"version":"8dd450de6d756cee0761f277c6dc58b0b5a66b8c274b980949318b8cad26d712","impliedFormat":1},{"version":"904d6ad970b6bd825449480488a73d9b98432357ab38cf8d31ffd651ae376ff5","impliedFormat":1},{"version":"dfcf16e716338e9fe8cf790ac7756f61c85b83b699861df970661e97bf482692","impliedFormat":1},{"version":"3b3fe018cdd6ab5fc1c1b9de009f365e0d6653add071f5fcd383bc9a298cdcee","impliedFormat":1},{"version":"6b5f886fe41e2e767168e491fe6048398ed6439d44e006d9f51cc31265f08978","impliedFormat":1},{"version":"f4a1eba860f7493d19df42373ddde4f3c6f31aa574b608e55e5b2bd459bba587","impliedFormat":1},{"version":"6b863463764ae572b9ada405bf77aac37b5e5089a3ab420d0862e4471051393b","impliedFormat":1},{"version":"ec69ebd1c4850514ebb6724911ad56e71caa0d076891ed6b67cb10d3ebbf2586","impliedFormat":1},{"version":"89783bd45ab35df55203b522f8271500189c3526976af533a599a86caaf31362","impliedFormat":1},{"version":"26e6c521a290630ea31f0205a46a87cab35faac96e2b30606f37bae7bcda4f9d","impliedFormat":1},{"version":"a51e18dc7e00eb6961c55b2a4ba4b70ab8c5cd601dc73337a0f5fd8292a5e944","impliedFormat":1},{"version":"3ff6e9ce7c3ad38dfe5165e90c826a27b289c9d0e7d9e934f654566867700fb7","impliedFormat":1},{"version":"f976134f9fc2369f6d4694eea7db6c2fb3c757ae5dbb047aeb06f02a21886443","impliedFormat":1},{"version":"d7e7199291e479bebe7f2bcefeba3498c80ce70c3b3440174fa211cfdab7bedb","impliedFormat":1},{"version":"233267a4a036c64aee95f66a0d31e3e0ef048cccc57dd66f9cf87582b38691e4","impliedFormat":1},{"version":"739fc10cb1f1c08f7578684ad660334e9617a81690d41d3dad234b3e4d5835b1","impliedFormat":1},{"version":"1af96cab9fbac290cbcaa07154ced5fb7a2b8bec02bcc6a34e77456d40fffc71","impliedFormat":1},{"version":"bed80e26fefb16b3eb7062e7878f38e1f0c0280fb61a6a608bdfb6dd64dbfc9b","impliedFormat":1},{"version":"39937ecb2516623611c287309f2b0e123fe5cb06d97487bb6fb6ec911e3ac652","impliedFormat":1},{"version":"9c171e2b0fa97a74c2437e746ea0127b49e6908e89ae6dc06ff238c3bc5c00fe","impliedFormat":1},{"version":"717cf65141e976becda69384a57148f4f6339ec04ff431ebb2ad19c558be4346","impliedFormat":1},{"version":"7f24ea5b058a109f8c9cf8f7711fb20cd2ead9817fa88415f94e47a108d9b149","impliedFormat":1},{"version":"3473f825e4648c65d597a0277245c250531c8fb946bdda179411e61a9eda50de","impliedFormat":1},{"version":"245125adc48737019481042b0e3dab6122528c1acc8933c5afd59e57dd2265cb","impliedFormat":1},{"version":"ec5510125c844298eccc5fc88ef4ad95e6b8b2b01e9f8c1fb386caa5c977accc","signature":"c0bc5355c16006ea922ca857e0c4c5f7f1aaac38a2995e90bc2a358135373b91","impliedFormat":99},{"version":"97def7e74834d3459b1b2f60157d402bfac36f8948423e3e7a97653a445c6f2f","impliedFormat":1},{"version":"6082f7412f0db000b1c4e32724c1fb8effff05724250fd2f65646c63cc427cb5","impliedFormat":1},{"version":"a9f912dd4203649b12db6d4ddac9d97cd38ef14b70194c2274ffc81ee5b861b3","signature":"79d057cb85a55359b91235e0f854de114a2ecce354489b88dbfac42564703f64","impliedFormat":99},{"version":"d978b01e53c41bd8c9cac4ac4a3c0e61d24c90b128a2bfbbea67dc2369fe5905","signature":"86474f854973e6890cc624ef7aed9c584a06bcc891f2a0d9946ab7049a73587f","impliedFormat":99},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"8c2f60c3192f66fe9e5e7a7a941534583cdff4f5a059fad30b1b863a547f388a","impliedFormat":1},{"version":"27b4308d9e3db258a09b8b7bd92677320d654f5fc089abbbcb1fd2f70b14c909","impliedFormat":1},{"version":"d1d7e7d247badcbc50cf0bd6b1096dc7ab3cd36b31e9803b3c0acbbfacc493d2","impliedFormat":1},{"version":"6c2a2e7e8500f70a127dbb259d99c0f3951394df7c46a69eb2569f0e8c14665e","impliedFormat":1},{"version":"924e12558578f341179bb878e75cfd9aa648254f5ac6cf228832fae40a52c067","impliedFormat":1},{"version":"3f7705b6434455ff25ac2d336388564173179a4aed8cd0d1b1ea235f0fd3de23","impliedFormat":1},{"version":"b5f6aef5039b1b98a67bf3a3ed52f8693a56be698da9e4a41e2d67b0751ee005","affectsGlobalScope":true,"impliedFormat":1},{"version":"27679e96d1bd38c5938178aaf4abe8627493090b63d6bae2ce8436e6a87ebe4d","impliedFormat":1},{"version":"b6ac3e813f3bc41717619291caf2fbc75ee84b4f5bd3abd3e48885831ebdaf96","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"691e623f6b017a026baf823394aa6d74efabfe877b799c539e085e3f82247cd8","impliedFormat":1},{"version":"a4808116b12ab27b11b3800dbc2b64dd122d4748d48a111957b87b52fd3cda2d","impliedFormat":1},{"version":"2501feb6d0a73d980a9b8e5e03c7e15053788a7fbae6d55cf93df3b0e06dbedb","impliedFormat":1},{"version":"dc9412bbe64fc748d330f3e574c0440753daefc81cc74791198a0223f2114b5a","impliedFormat":1},{"version":"bbd9e6f68bf6e418bd44d7991a4860b1d386a30b798d1be773931ac7bd1e657a","impliedFormat":1},{"version":"f7ff9fd2db48fbabaf6516a4c3515b07325baf4c7a35766a7bc1ce72a1bb9b83","impliedFormat":1},{"version":"e383a277c8c485ffafdeea2bd0d28036bd8d1be4b2d6099a7b27ecc4419fe8d4","impliedFormat":1},{"version":"66a1d3c8e68134692c9784cfcd8ca275d8e24ace1bc01c432c5a2cc27ef27701","impliedFormat":1},{"version":"18b79e1c4ef00056857db2070ed947e32dae63dbbaefadee3cb6e8f21d5193d2","impliedFormat":1},{"version":"cbce9fb00ac5676380dafebfd7e5ce1561f17dfbe6356597d6e5d9b6b9bd5fe2","impliedFormat":1},{"version":"ae042e01074576c186a734888cd420dcf9eccf57053c9d7de5326cc235b7d3ac","impliedFormat":1},{"version":"040c519477a40f166f9d3d1f1e792761de759c5301466833b74d119957c794b3","impliedFormat":1},{"version":"d5a20d626aa5d02f7732d87050b9f3589627f36e4b4d01fe171d2cb9a958b21c","impliedFormat":1},{"version":"d36fb912245b9e1c7a4ac59cffe51d83546d2b03f52e2b3b9fff969d01257800","impliedFormat":1},{"version":"70ecd65df736dcf74d8304cd3767a863b7fab2bfa04a73c039c995cfd88489dc","impliedFormat":1},{"version":"53960fc36042dc4aef356c0273674bb0e7f65059720fb42ac36d29a8d2e3cbf1","impliedFormat":1},{"version":"8c607552166070130883b20fb7da9c7b7006e065239c2075f47e3349f3664c66","impliedFormat":1},{"version":"d3878648b6e0c7f8ca809b4a03d8d13ddccdde282c6c84aa1faf59f0780a888c","impliedFormat":1},{"version":"c1a24626823048792dc4440975646629ae984fa3354cd2f09270834d90fd997d","impliedFormat":1},{"version":"696e8b13ed6b15e0395fa6438f43e1363e09204f080640c6cb5437323f9ed8fb","impliedFormat":1},{"version":"a5d6fe2a52c03c4f5edb8c1ef06ccfc777ae377d0f0dbd7df3b066b0f9cec946","impliedFormat":1},{"version":"34b4698d4b6ccfb2b1e3e034d4463ecf490a6c700d229685f7b5b08ccc150393","impliedFormat":1},{"version":"f19baa96f4a8c3b23453401f7864ef337ebd2533dca12c042155cbd526341f29","impliedFormat":1},{"version":"a1604f4912418542596cf7598f199be7f276b7ad715416c59603d048894733e4","impliedFormat":1},{"version":"11b0c060c13dcf6fd09d60d9870f4921492a4d3c1b39a33f9d93f22f1dfb7c3b","impliedFormat":1},{"version":"a59bdaea7395061b93e12c89996770f196ada0f3e9197e2343763c65d0588dd8","impliedFormat":1},{"version":"9ffe848f345f1ac8c2fa2f4706c38840fe2beb455e19c5dce756e0ad09776235","impliedFormat":1},{"version":"013c10b8066b319a9dc033db24f0467737406810561d0c55d8bab3c8212788bb","impliedFormat":1},{"version":"b424df9fec80812448f7b2977e3220d5a2eb88e6c8e8b675c282f4eb1f4b8834","impliedFormat":1},{"version":"d66670300c6ad07603217e119240d129d327ee2cb4e05cdfc86f7f01e36a42ea","impliedFormat":1},{"version":"3dbba617428a6892f0e7a3c16d960738db464eb8df6724df7d95e7a4f116f110","impliedFormat":1},{"version":"3d7926e64b370e31cd4080bb432adb9e92fe096e31bee0685ee49d75cd317120","impliedFormat":1},{"version":"5862b0752f1eeef4061683d1311ebec322696c9ccd497e14b9d0c97545b317b6","impliedFormat":1},{"version":"c9829971663604cc72b30018b901c7cd97483587953e8a9535616ae04c808867","impliedFormat":1},{"version":"b0b73baeadd229c956da12d8b08f9c464b15e653d6dc5838bea41c733de7fe00","impliedFormat":1},{"version":"88ad86557665308c7957b0aeefbba159d9c99ed57e1d9a696cb4b068ea30f68d","impliedFormat":1},{"version":"8ce9716f8368167c631c4240de8cb2b5997c1c2ad9d885609079ec4c30877139","impliedFormat":1},{"version":"35595df80753dbc2b21a04ddb000835b32f0b9ad56ea259d4e6e9ee674debef4","impliedFormat":1},{"version":"efc5e846a8dcc7aeb97cdf4d6e529079e4ab45ac3cd39ab38ca96599bbcf232f","impliedFormat":1},{"version":"730450f8a576f827f2044ff9e3f0f7130e605b79087552c11ac5d92fda9a7e1d","impliedFormat":1},{"version":"9a62c9484c14c0cb33dbcdcc11e405821ee668e714799f7a125b840eeb8e89ef","impliedFormat":1},{"version":"1fb8ecfdc58a9071337c56072dd9b3c78c7d2f76730a1be8d27224ca083227a5","impliedFormat":1},{"version":"3bb99d9565690ee166e65b90817eb27c7c942b0efa84609bf2fcf0a8cc9405b8","impliedFormat":1},{"version":"c742fe995845140002d0baa8785af21a3bab8527b5584cdb0b407a226107f585","impliedFormat":1},{"version":"ffa065aa3455b257438ce8c9768c5e0f80ea3820094ee8a1120fb4437cc3e7a4","impliedFormat":1},{"version":"c325aac67ed6a692a807c9396d513ce37ed8f56c8d8ca7bf4ea76d4cd09e7c20","impliedFormat":1},{"version":"9d39a014e37dc53a1dafdb2ef5099417bd00174b815ac7e390414372b30a14bd","impliedFormat":1},{"version":"86a07b0fb1f46d39132ef555b215e7db97e906596697469df465c310646d3528","impliedFormat":1},{"version":"0e198c29a6251d421945c8d803c593eeaa2e92de8d8aee6412a2911195055162","impliedFormat":1},{"version":"f7df54c02497181cc6e63d6eada933f477a18b3a72776a0a77e63de603439061","impliedFormat":1},{"version":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":1},{"version":"a6292eb5c4a48e71b5f49c4ca89b9aa76108a93b7ac98c656a8f1dfc5a614bd7","impliedFormat":1},{"version":"7a9121b2912c6821f2783964444cac3050e17b3b75512965e0a32e66b414d592","impliedFormat":1},{"version":"9e8cb3ec89db85e85513bb89adbe63b8acccad3fffe11d6d8df01c865c77fb5a","impliedFormat":1},{"version":"f3dd8466af3baf161e0d203a1a28c7bbf9f863679c3b0e659371b1835b40f193","impliedFormat":1},{"version":"e8f141e5548179b835f699a1026f79ea581eeac1a4e57f5f22dcd0b4a772cbbc","impliedFormat":1},{"version":"2ef7e3af3848886c22ace971e69966b203eb67b2d1787d5e44c99519c09892aa","impliedFormat":1},{"version":"ddad846edb02abe8e625649c4a5dd64be1bde5d7631302d1fa4d45d14ed8b51f","impliedFormat":1},{"version":"a119ad4d2a84d13a333dbfa30e43bfccf4a0dc040c732d676adab436626f25ee","impliedFormat":1},{"version":"a7e006e3243d9746d204b7addb1f034e5deb4a0d157d8c85ecada87a86f222ff","impliedFormat":1},{"version":"fda09dd5bb69c3fdf9ae579b4b9f5a7db565223896f50aed99760821c1517bbc","impliedFormat":1},{"version":"261a9e319315e52f88b1cb347db2ce4277ea7a6eb6fccd90c289b119353d5b78","impliedFormat":1},{"version":"4871318522f755858f7edb640a4c3ea1614ff99be9d69340f5a51ce82fd809df","impliedFormat":1},{"version":"5208acbce57501f3d5dd58f4956d43734b3a007b8b86578c935785ec72408e04","impliedFormat":1},{"version":"41449e5c8ad2b4ad46497762cb72ec680457e35e03b658842f257a79da3d694c","impliedFormat":1},{"version":"2e567bb91461de2ab714bfd4261ce4f58c389cd3dba268958fdaef6cf20f7e3c","impliedFormat":1},{"version":"7c296bb31e778cea0fd700a14fbe683b665db7115f09700d8416cf24b83cdfcc","impliedFormat":1},{"version":"0b3109399eb9e01963064b099613e2f79810b0771aef56b628c4e6651f35440e","affectsGlobalScope":true,"impliedFormat":1},{"version":"82b3f65b26feecbe204f8211604187c10cf4eda0250d49e0b7a7c971b4fa07dc","signature":"ecc3d40c7cb9029820c260751d09dd27676f478894edabb70fc482e3e727525e","impliedFormat":99},{"version":"9dd85bafaa78a8745582373d61c04cfb2d571a2cf0866d0030a5167dbd28c279","signature":"a2edbc939d6db071d85add433b82d0c3d1b3d1a71b021d6ee9995cf16d7d473b","impliedFormat":99},{"version":"d0dcecca28b9ec8c739817af29346a481d28a3013fdd73b09be230dde34cf504","signature":"576790593cc4195a6b6d45f18bb574cfd305601f0bb5638e7091e4aa952f809a","impliedFormat":99},{"version":"efca436d013b17baf462e07101b0c52414ff99708205ec6f1dfacdd5f1bc5489","signature":"07fae2cd3ed547f36b27eeac1a822d84eb4bbcd70fe27da5581fcaac896e3bf3","impliedFormat":99},{"version":"b69566c78b9f6ee07b0e0101477b34ddddd6aeaf3574e5e14a9f440accb55f8a","signature":"51d2233c56db532b32632537b67298d226d08bc56ee5810b4bf2ec5ce4047b05","affectsGlobalScope":true,"impliedFormat":99},{"version":"0fd310a550f41282f2331513b61cc3add05d3126c9fa4440d7501c42deeb6af2","impliedFormat":1},{"version":"12baec7a4e2c3acddd09ab665e0ae262395044396e41ecde616fefdd33dc75ff","impliedFormat":99},{"version":"100985057cdd198e32b471b9c92a39080e5e50720b2cb290d04ddf40fbe71c84","impliedFormat":99},{"version":"333d9b9067c0213cd7b275d1d78bab0577ba31ef7a63306ab65a74e83a546a65","impliedFormat":99},{"version":"85566a0b81339b43e063f5cd8cc49a9b9bc177bc5ad3ffd5e4874700040ec11e","impliedFormat":99},{"version":"c2688779f6804c3bc6dfa33d05a810464c684a74f92aee6b0f0d4bcd7dbeed6d","impliedFormat":99},{"version":"16331f489efb6af7d06037074020644d9175f70a7a6466d926f63e74af5a77d8","impliedFormat":99},{"version":"2b2b8b64b39f152439ecb9f04b3d6c1d88d35c75bf14a4eb98f1cc791f092366","impliedFormat":99},{"version":"395548b309c8fe9ffadd8b1055898fffa29bd28ea1f8079f33e48a65601589e2","impliedFormat":99},{"version":"e38871affeac7cf4dd4cc3a55714ff38d55f137c30788d30e454a6e3058f36bc","impliedFormat":99},{"version":"783a0f8fb88d659272c1ac541719e32235881815705b44fb63b6af579885ea75","impliedFormat":99},{"version":"6a60957e322c4c060ddf3073130cbcbcbc5e639e21cd2279df43184bfa8cb9a3","impliedFormat":99},{"version":"5b353617eeb8a37c7a9497ebaeacc027bd7487eec10ffbebca41dcdc2634af70","impliedFormat":99},{"version":"cedbd20d98f3fd7c1fa00742292ab5b13c3fec266ae41b90c47b716ef06cd983","impliedFormat":99},{"version":"9713bcf79cd728919262a2a543484a5f9bd24a15cfec1cee096d9d17a9f5524d","impliedFormat":99},{"version":"35fb129972553f809a7045f3cb952c2598299548018a23238304c020cb16945f","impliedFormat":99},{"version":"855b0379a6b6e96eda055cff16da442b4a7a4548101848b9ae48bce22879569e","impliedFormat":99},{"version":"ea2ac8d236dddbce748dbaffcaa1bfcadae6fbcae1fd0a67e17d5e35d5e38dfc","impliedFormat":99},{"version":"a7750935d6a1cbd259861b5acf1c912f9d3b10efd8602f61fc858f04f261595d","impliedFormat":99},{"version":"e0aa3276d014f3c798dd3101af8c8545b56d79665a7a982b4cf6fe28551a3b56","impliedFormat":99},{"version":"ea744987345eb5ae036495b0185e95eeb7d2d999b0ef80265f79434e83863e9e","impliedFormat":99},{"version":"c3bc54ba21655aaf1db5bb97c42f56bbfe5a3a3c40e3884ef3ba2cdaa9f34c1f","impliedFormat":99},{"version":"705917c38d2e92347b5e57c1c6007da46f1005874ef2257cc8dfff59cba4710f","impliedFormat":99},{"version":"40925b4938b527a6267b1fe56a2e97cc52ea9d73eec90ea8e05df773a182101e","impliedFormat":99},{"version":"2930156137f4885c3ad168804c557edfc9bb88ae0e1df487f4adcdc771286ad7","impliedFormat":99},{"version":"b63e990c632eeee9375c2c43bbd5cdcb23418b79edcb57afa53edf4dd597b33c","impliedFormat":99},{"version":"721dcf072e75b71b5ab7a0bbbd6578f908c36a0bfaefa1454d3e43938bde67a5","impliedFormat":99},{"version":"5704f5ee2642dd0b810bb07ce6e4e51319ed4d6db78747ff54675e72c3fede06","impliedFormat":99},{"version":"da2be38a98356fdd540580a68338df2d2450ec071b1cb5bdbfe8e52075ddde9e","impliedFormat":99},{"version":"3af0bb87094d80e20b0d451626eef1e2da701891c41998ac0a6a6c91cff86f74","impliedFormat":99},{"version":"30a211e9de0dd587f8c690f9ed9378c15c79bcbe762dd85a61c548e5058c3fd6","impliedFormat":99},{"version":"a7cda498cd929d2f958ce49abbaef1abf999ec40884a04cd28ff34317d844e54","impliedFormat":99},{"version":"e48b510f40f29a89d9dbe19a9fca96d7f02b721aec6754fd5c242f9893d06508","impliedFormat":99},{"version":"30d88e2e7c4ca1cdfeb37cf05a2d7a351c68b14ac472e6238401ecb7b75686ea","impliedFormat":99},{"version":"03b34718c02b6225c2f7d7c374cb701ab04461a5cfa66d150531c9f31e39da49","impliedFormat":99},{"version":"7dfe7da785eafad3e3d0cc66545e97f1acf934ebe5b2ec8f4a34341a9ca76ed4","impliedFormat":99},{"version":"8c7829855345152b7b3c196e82147153115d5b568ff97be0e40d161e8d9d2f51","impliedFormat":99},{"version":"f30a36ff98b099ea8c635146dfdd1d810bc14ec303acb653ca938445047b0e41","impliedFormat":99},{"version":"07fa63aca536ca8d8d8c6a56eabcf77f746609921fe23d780a69e2c0a2a65701","impliedFormat":99},{"version":"c8fe48c4437d4ead0a841128d179f8bb99e0e38f9ccb80ca6be14833e30bc129","impliedFormat":99},{"version":"5eac3facc9f59e960c00f41502b34a908776cfba6d7e1a5a4ead5030682b7434","impliedFormat":99},{"version":"d44f8de16b9c6ef4ebd88d4162bc24942bee9975f88162a8962bb572e62dc5df","impliedFormat":99},{"version":"0251c18e8c863bf5ef510043644299aceab6debf3d87aab8c8cfded5aef7d6af","impliedFormat":99},{"version":"292f7dc6b4be74f148f5e5b57b9e8a7f515d7d4f6183d3f9162e127e50959ba9","impliedFormat":99},{"version":"c1608d867d6ddda5c0f4736cf4959e2b2c6bcda660c4c72f7feb36b3998df2bb","impliedFormat":99},{"version":"02d77b0d27ecb78e28d3a376c6cdce05fabcf58f2fd01c102f031d8e375191da","impliedFormat":99},{"version":"daef84b3b89e60054fab1abaafe38eda673f88abdedc3920015d61f1cc5358b8","impliedFormat":99},{"version":"f3318054dc392b6661785263095ed8f1555f0d8f3ce534c8c2de8895b4ec7bd3","impliedFormat":99},{"version":"6c3aa7e0c4eb4d8d7fc24df037980369e70a28f9237cae77511b4cfc6a1b74d0","impliedFormat":99},{"version":"ecc7e0840690cc4b9a2587a4f550b292c35d36150c6c108803bbdfc3bead5b91","impliedFormat":99},{"version":"e11a23b343084cdec24d718fc64369dc8b6dece71314b41d4b5938f2a568834d","impliedFormat":99},{"version":"ce678766176812e8eda3f4925304d4159d806f50fa8a93a72da56e95dae8bbc8","impliedFormat":99},{"version":"bb21d35a36dc1db80a2cf29383bb7304919708cde205bbe246ec47176336e255","impliedFormat":99},{"version":"df657f732e32af7c7550da93e66dfdfa142fc1282b4a392ec78fc9aefbd6fdd0","impliedFormat":99},{"version":"b20ef0766a8a578e5c542aafaa8c53b7e2b0e32a5522f9cf18bc021a81d54dd7","impliedFormat":99},{"version":"9ea0cd8a367cab9b1c632740d1bd998f8c4dbbbda4505f47bebd38a46afbaaa6","impliedFormat":99},{"version":"97980bb49a7e4b15df6f988f914070c831a39426cd9a29a6f7a9af82f397b28c","impliedFormat":99},{"version":"3ddf05b5259b9a0e2b1da1559585655202670e1f78396b4d4efccea0195a41b4","impliedFormat":99},{"version":"1e99c59aadb1af6d090976ade8280ea37208e8f064f79e9a18231fe5b7232890","impliedFormat":99},{"version":"c7ee77eec320d6312899cd8c16484c82b98385e175c57ff00d49cc5a2c291e0d","impliedFormat":99},{"version":"b38d9a4927465a8a5d1ae84e00d323bedfc7f5e77f4bc360078c6f283b964acb","impliedFormat":99},{"version":"27d6b338ff280dc86ff167217c29d7e71b52bd25a3c3b8eb1f5a56c887571d00","impliedFormat":99},{"version":"da60046c4cc6b018869ea8fc71a7b7bf5591d9f5d90ee52c4a614ecc69ff3433","impliedFormat":99},{"version":"8bee1fe0b3dd1b324f08189d81e55f9952007ce2304df07a15568b821b7e524f","impliedFormat":99},{"version":"a3dd2d53781729214a67f4b91d9a65d5310c1bbdcd0595789a5152a493cded91","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e20fc6cca2cf901917bc09c88bf9ee380383717ed990900aa99962ff9e3f786","impliedFormat":99},{"version":"7410b87e621ce92f484a13dfbe72069a6470fb72cc418df865f31b601193595c","impliedFormat":99},{"version":"e0c868a08451c879984ccf4d4e3c1240b3be15af8988d230214977a3a3dad4ce","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"7f15c8d21ca2c062f4760ff3408e1e0ec235bad2ca4e2842d1da7fc76bb0b12f","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"bb220eaac1677e2ad82ac4e7fd3e609a0c7b6f2d6d9c673a35068c97f9fcd5cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"f20c9c09c8a0fea4784952305a937bdb092417908bad669dc789d3e54d8a5386","affectsGlobalScope":true,"impliedFormat":1},{"version":"c58be3e560989a877531d3ff7c9e5db41c5dd9282480ccf197abfcc708a95b8d","impliedFormat":1},{"version":"91f23ddc3971b1c8938c638fb55601a339483953e1eb800675fa5b5e8113db72","impliedFormat":1},{"version":"50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e","impliedFormat":1},{"version":"d33782b82eea0ee17b99ca563bd19b38259a3aaf096d306ceaf59cd4422629be","impliedFormat":1},{"version":"55a84db1ca921c86709117fabae152ab802511dd395c26d6049e6d4fb1e78112","impliedFormat":1},{"version":"2d14198b25428b7b8010a895085add8edfaae476ab863c0c15fe2867fc214fe4","impliedFormat":1},{"version":"61046f12c3cfafd353d2d03febc96b441c1a0e3bb82a5a88de78cc1be9e10520","impliedFormat":1},{"version":"f4e7f5824ac7b35539efc3bef36b3e6be89603b88224cb5c0ad3526a454fc895","impliedFormat":1},{"version":"b29ef0a32e75e0d2a08762d6af502c0ffcd7a83fec07ed7a153e95329b89d761","impliedFormat":1},{"version":"537aff717746703d2157ec563b5de4f6393ce9f69a84ae62b49e9b6c80b6e587","impliedFormat":1},{"version":"d4220a16027ddf0cc7d105d80cbb01f5070ca7ddd8b2d007cfb024b27e22b912","impliedFormat":1},{"version":"fb3aa3fb5f4fcd0d57d389a566c962e92dbfdaea3c38e3eaf27d466e168871c6","impliedFormat":1},{"version":"0af1485d84516c1a080c1f4569fea672caac8051e29f33733bf8d01df718d213","impliedFormat":1},{"version":"69630ad0e50189fb7a6b8f138c5492450394cb45424a903c8b53b2d5dd1dbce2","impliedFormat":1},{"version":"c585e44fdf120eba5f6b12c874966f152792af727115570b21cb23574f465ce1","impliedFormat":1},{"version":"8e067d3c170e56dfe3502fc8ebd092ae76a5235baad6f825726f3bbcc8a3836a","impliedFormat":1},{"version":"ae7f57067310d6c4acbc4862b91b5799e88831f4ab77f865443a9bc5057b540a","impliedFormat":1},{"version":"955d0c60502897e9735fcd08d2c1ad484b6166786328b89386074aebcd735776","impliedFormat":1},{"version":"2fa69d202a513f2a6553f263d473cba85d598ce250261715d78e8aab42df6b93","impliedFormat":1},{"version":"55480aa69f3984607fa60b3862b5cd24c2ee7bdd4edaed1eef6a8b46554e947f","impliedFormat":1},{"version":"3c19e77a05c092cab5f4fd57f6864aa2657f3ad524882f917a05fdb025905199","impliedFormat":1},{"version":"708350608d7483a4c585233b95d2dc86d992d36e7da312d5802e9a8837b5829d","impliedFormat":1},{"version":"41ceb13974711a87f182145196a641ad804125baf1fca181595f1be8cb0a2cc1","impliedFormat":1},{"version":"13897f9cb8ddf535e2cc6448942410f18298c1540338c1276a17880362b1eb45","impliedFormat":1},{"version":"4d2f7644abb97ec0d681d89b455170cf2bd0e72ee2a3e52d396074d0def264c4","impliedFormat":1},{"version":"671da85fc40086ce6f7309c428511bd77aebc0405b88700a26590a75cf37ff10","impliedFormat":1},{"version":"6e95aab5b3ba30cdbc9d4ad350ae7cbeb519a1eda30a214d2b1ec1f53eecdf9c","impliedFormat":1},{"version":"e11ff96a6e720e91e52ac54c53ee5bea99929bf096ae6b34bca2276e2b277ef8","impliedFormat":1},{"version":"08ce78e8c4c047bb08ccadc6587f6b45f025d85829854199db891cf1de7b209e","impliedFormat":1},{"version":"3afed5176dbb8e33d3366dff69f6fb0948b6849e0d2b53f6d61f41357cd617a3","impliedFormat":1},{"version":"51f8343ee830b7003a644ac90122bd092413344f957f9f9bec64d5945f179927","impliedFormat":1},{"version":"15eb363cdbe0004d3db00bce07892a5f5eb55d281761f768ee0545df54b04a0c","impliedFormat":1},{"version":"9b83354a819146569dfe74a2468b7c11e287286d58b5654555ed1fec10688649","impliedFormat":1},{"version":"e90e58ad52b0d25a238f6a794be594bf647280a6e8478b2337ff729dce62a63c","impliedFormat":1},{"version":"ea1393c82a0cd229de6915d3682db9571c9b65803b971a04f6042bd3b3826b60","impliedFormat":1},{"version":"d4978c3f743921aefd2609c001cf4a6baf74dd5e67337b5088bb29cb6d832ebb","impliedFormat":1},{"version":"973aa2a5bc9b967d9c2ada4edc050ffe2832b09860bfa0ba0cb79b8253e81dd6","impliedFormat":1},{"version":"c96ac2cf9b266d5606f79d99191e3e2c2bede081f60aab6377d16b1e73841429","impliedFormat":99},{"version":"30a4dd54f1f39dee17bafcc0fb9a877932d607d8f24d3f1ac7f8998cf07f2649","impliedFormat":99},{"version":"5aa8b50a334af93ff1bb3da686178871a7e27e03791d07fd6107980076ddb90e","impliedFormat":99},{"version":"ccb5f2cdd46a60b0aa3b43aeeac9f0d499640f589806f2486f35ff8a9565784b","impliedFormat":99},{"version":"25c1448dafc60e4ee55022d86c9deb322b669b93743a01f415c7f3974e5eb265","impliedFormat":99},{"version":"43ac78f8e0c5defecc2e501f77d1e61d078c79975af401702c16b9828ab12ca8","impliedFormat":99},{"version":"ce7fb4fdf24dcaebb1fdcf2f36cf954da3b53d8f06fca67b89ef50898eeca489","impliedFormat":99},{"version":"5e8c09adb8be1b932100a9374cb0f8def9dda6a16a973e91c2322983ed669dd9","impliedFormat":99},{"version":"dcab5635cd67fbabb85fff25d7cebbe7f5ab4aaecba0d076376a467a628a892d","impliedFormat":99},{"version":"c8698ce13a61d68036ac8eb97141c168b619d80f3c1a5c6c435fe5b7700a7ece","impliedFormat":99},{"version":"7b90746131607190763112f9edb5f3319b6b2a695c2fa7a8d0227d9486e934c7","impliedFormat":99},{"version":"269b06e0b7605316080b5e34602dee2f228400076950bd58c56ffad1300a1ff1","impliedFormat":99},{"version":"cc89688d19046618e7f88ea7c25ff04560d939902bf49e60bd38fb4662e38b5b","impliedFormat":99},{"version":"73e7fad963b6273a64a9db125286890871f8cf11c8e8a0c6ace94f2fa476c260","impliedFormat":99},{"version":"8496476b1f719d9f197069fe18932133870a73e3aacf7e234c460e886e33a04d","impliedFormat":99},{"version":"3cb5ccb27576538fb71adba1fa647da73fae5d80c6cf6a76e1a229a0a8580ede","impliedFormat":99},{"version":"e66490a581bea6aeaa5779a10f3b59e2d021a46c1920713ae063baaba89e9a57","impliedFormat":99},{"version":"aea830b89cbed15feb1a4f82e944a18e4de8cecc8e1fbfaf480946265714e94e","impliedFormat":99},{"version":"1600536cd61f84efed3bb5e803df52c3fc13b3e1727d3230738476bcb179f176","impliedFormat":99},{"version":"b350b567766483689603b5df1b91ccaab40bb0b1089835265c21e1c290370e7e","impliedFormat":99},{"version":"d5a3e982d9d5610f7711be40d0c5da0f06bbb6bd50c154012ac1e6ce534561da","impliedFormat":99},{"version":"ddbe1301fdf5670f0319b7fb1d2567dc08da0343cb16bf95dc63108922c781dc","impliedFormat":99},{"version":"ff5321e692b2310e1eb714e2bc787d30c45f7b47b96665549953ccfd5b0b6d55","impliedFormat":99},{"version":"8a0e4db16deae4e4d8c91ee6e5027b85899b6431ace9f2d5cec7d590170d83cd","impliedFormat":99},{"version":"c6d6182d16bf45a4875bf8e64a755eb3997faeb1dfc7ef6c5ead3096f4922cb6","impliedFormat":99},{"version":"d5585e9bae6909f69918ea370d6003887ea379663001afccca14c0f1f9e3243f","impliedFormat":99},{"version":"2103118e29cf7d25535bde1bae30667a27891aae1e6898df5f42fd84775ae852","impliedFormat":99},{"version":"58c28d9cb640cac0b9a3e46449e134b137ec132c315f8cb8041a1132202c6ff1","impliedFormat":99},{"version":"d7efb2609ff11f5b746238d42a621afcfb489a9f26ac31da9dff1ab3c55fc8f3","impliedFormat":99},{"version":"556b4615c5bf4e83a73cbf5b8670cb9b8fd46ee2439e2da75e869f29e79c4145","impliedFormat":99},{"version":"51fc38fbb3e2793ec77ef8ffa886530b1fed9118df02943679f1c4a7479f565d","impliedFormat":99},{"version":"03a4f9132fe1ffa58f1889e3a2f8ae047dcb6d0a1a52aa2454de84edc705e918","impliedFormat":99},{"version":"437dd98ff7257140b495b4ff5911da0363a26f2d59df1042d6849ecb42c1ee84","impliedFormat":99},{"version":"8345eadc4cceddc707e9e386c4ad19df40ed6a1e47f07e3f44d8ecf4fe06d37f","impliedFormat":99},{"version":"2df69f11080a8916d3d570f75ddf5c51e701fc408fd1f07629c2f9a20f37f1ea","impliedFormat":99},{"version":"2c19fb4e886b618b989d1f28d4ee4bee16296f0521d800b93fd20e7c013344fe","impliedFormat":99},{"version":"61085fe7d6889b5fc65c30c49506a240f5fbb1d51024f4b79eef12254e374e76","impliedFormat":99},{"version":"aad42bbf26fe21915c6a0f90ef5c8f1e9972771a22f0ea0e0f3658e696d01717","impliedFormat":99},{"version":"7a504df16e0b4b65f4c1f20f584df45bc75301e8e35c8a800bcdec83fc59e340","impliedFormat":99},{"version":"37077b8bf4928dcc3effd21898b9b54fa7b4b55ff40d2e0df844c11aed58197b","impliedFormat":99},{"version":"a508144cd34322c6ad98f75b909ba18fa764db86c32e7098f6a786a5dcca7e03","impliedFormat":99},{"version":"021bf96e46520559d2d9cc3d6d12fb03ca82598e910876fdb7ee2f708add4ce9","impliedFormat":99},{"version":"44cbc604b6e5c96d23704a6b3228bd7ca970b8b982f7b240b1c6d975b2753e4c","impliedFormat":99},{"version":"7bfb0450c4de8f1d62b11e05bbfdc3b25ccb9d0c39ae730233b6c93d1d47aea2","impliedFormat":99},{"version":"51696f7c8c3794dcf5f0250f43eda013d588f0db74b102def76d3055e039afff","impliedFormat":99},{"version":"fc67adfb454cf82752ab00e969d14a95fa762f55c34e25327dc77174b0d5f742","impliedFormat":99},{"version":"39d8d14a745c2a567b8c25d24bb06d76dbffc5409ab1f348fde5bc1290abd690","impliedFormat":99},{"version":"6d9aeea6853ed156d226f2411d82cb1951c8bb81c7a882eeb92083f974f15197","impliedFormat":99},{"version":"1fed41ee4ba0fb55df2fbf9c26ec1b560179ea6227709742ec83f415cebef33e","impliedFormat":99},{"version":"d5982015553b9672974a08f12fc21dcee67d812eeb626fcaf19930bc25c2a709","impliedFormat":99},{"version":"6ad9d297c0feca586c7b55e52dbd5015f0e92001a80105059b092a1d3ecfc105","impliedFormat":99},{"version":"13fa4f4ee721c2740a26fe7058501c9ba10c34398cdf47ad73431b3951eea4e2","impliedFormat":99},{"version":"3a9b807bd0e0b0cd0e4b6028bec2301838a8d172bcc7f18f2205b9974c5d1ecc","impliedFormat":99},{"version":"8c5b994a640ef2a5f6c551d1b53b00fbbd893a1743cbae010e922ac32e207737","impliedFormat":99},{"version":"688424fbbef17ee891e1066c3fb04d61d0d0f68be31a70123415f824b633720a","impliedFormat":99},{"version":"25eafa9f24b7d938a895ab15ed5d295bc000187d4a6aa5bfd310f32ba2d4eea5","impliedFormat":99},{"version":"d9df062c57b3795e2cae045c72a881fb24c4137cea283557669d3e393aa10031","impliedFormat":99},{"version":"72f4b1dc4c34418935d4d87a90486b86d5450286139e4c25eeee8b905d2886b2","impliedFormat":99},{"version":"92efd5d38691eece63952e89297adcc9cb4c9b8878d635c76d5473c20489fd4d","impliedFormat":99},{"version":"a4b4d0ac8882e2d857f76f75ca33694d315715cdc19d275ac37e9ef2a8d8693b","impliedFormat":99},{"version":"e185a44b6e46dc9621704f471ed0a39b56ce5b5027dbc81949b67cbcb59da7d0","impliedFormat":99},{"version":"5102e449a65c1f816d6ac1199b683f9ddf21b107f4eec5ce8316e957350d1b8d","impliedFormat":99},{"version":"73397fcaa8afa955ae1ac27c8ff5473418195ecacc90b275abbac0b8099b7e91","impliedFormat":99},{"version":"3a8b3e4e8ee1784e46e8151b4b0717b8a22e045b20257ad4491815f7cdb3ab22","impliedFormat":99},{"version":"823a190056fa78cfe888a24a0679624cfc36cab0ce9cfc875b1856e8a535bc9f","impliedFormat":99},{"version":"28b5d252374af23b8db3d80154078d76ab4af7635d6f20ec892cf86651bb5f52","impliedFormat":99},{"version":"d6d72de42c0a81f3d22b71fca1ff348f4bc3a50deb9382ebdfd71214794ec58e","impliedFormat":99},{"version":"1a4fae85bd066e1f57250ecd3be398f45c0ee35fd639d1a91f2b816ad37cf4db","impliedFormat":99},{"version":"bc79bd6403aa643e99c8e6733d5a8c7bf214e4528e79c882e77e9e441049e45e","impliedFormat":99},{"version":"3828353b7c352649166506cefb1bc4de2d98591796e4b7afda4650eadefb3c2b","impliedFormat":99},{"version":"c6fb620f7d3160662e9bae07262b192fd257259220c46b090c84b7e7f02e2da3","impliedFormat":99},{"version":"2a7bd12de58b9b8cb10dabf6c1eb933b4d4efe1d1b57dcc541f43061d0e0f70b","impliedFormat":99},{"version":"0e8e5b2568b6b1bebacc2b4a10d84badf973554f069ded173c88c59d74ce7524","impliedFormat":99},{"version":"f3159181773938d1ecd732e44ce25abe7e5c08dd1d90770e2fd9f8b92fab6c22","impliedFormat":99},{"version":"a574154c958cdaaee26294e338024932d9cc403bae2d85ff1de76363aad04bbe","impliedFormat":99},{"version":"5fa60c104a981a5430b937b09b5b9a06ceb392f6bb724d4a2f527c60f6f768b8","impliedFormat":99},{"version":"006dabdcdcc1f1fa70b71da50791f380603dd2fe2ef3da9dec4f70c8c7a72fd9","impliedFormat":99},{"version":"8fa1dc3b4a2f43c688f6f4cf1721e1d26d641ef322c14adac867ecfa41aa2109","impliedFormat":99},{"version":"e351fc610efbbdbe1d92a7df4b75e0bc4b7678ee3585f416df1e0cc8894d2b20","impliedFormat":99},{"version":"33c06a102df241666a34e69fe5f9a6808e575d684fcfcf95886d470517a456cd","impliedFormat":99},{"version":"404818f4f7cfc01054eeb0a3568da67a02b67b9ed375e745fdc20c2c22ad9f9b","impliedFormat":99},{"version":"2d9ad35b54c1413e9ee0e74945cd5c8a99516c1fbbd0a12f673c75073436a931","impliedFormat":99},{"version":"586f4a88fffdfa6f4d2e2fae23d55c946d4aad8c81573aa851b18884b185b67e","impliedFormat":99},{"version":"ad4b3aa66c7d3c3e7a5fb2126ca0aedafcded91b2d175fca89f50fcb6d3a1258","impliedFormat":99},{"version":"23e028cc298226d1f8e87d57950673b3a19b91f23538ee9287d52e77540af8cf","impliedFormat":99},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"3811b0e3366620e3899d6d35241685481ee2f9dec8df37eb3d06462ced2fc202","signature":"5f75adebdbbad4f3d72826415684caeaa20e2fa77f99793928c64dc4ae23da35","impliedFormat":99},{"version":"f341af0934dab65b7984a60662a866b274a0a49e3912312103709d87400f23a9","signature":"44c285d55eb3cdba203fcdad811ba021bb2aedb51ee53c22892ab6cb6dbcb930","impliedFormat":99},{"version":"f15d634848721e1cab785e0d011e651692fcf6d0dc38f444995ee896ffb525bc","signature":"89affcf871a301443816f03765bbdcc9f2ef972ae1900a22805f357eb0d5d04b","impliedFormat":99},{"version":"ecf8dc9486bde27d8edd264a2c38fcb7fdbf2ba310ba00ca43085645252bc9d9","signature":"949911a800215dadfc4b08258cbf9c7c73f4f924e76de451e2f61279ab5cb3cf","affectsGlobalScope":true,"impliedFormat":99},{"version":"155c5e60782c46636991cd66cf474b60d119d9430c78a8f3e13ac39a21fbb53b","signature":"701315316b41d72ab97a1ae8ab114d0a90b300aa1fde9da7a13ec7f7d715e79e","impliedFormat":99},{"version":"4369526cfe2baf3d1a846eeb967978a314cd50a401591f239755b03357ebde49","signature":"0b698cc8f21cfc3b6767bbbee9de830254378e36d3eabc2cc88c86ac1f97b4fb","impliedFormat":99},{"version":"738b15b5cb8fab7eb7b0141d444f2b0cd2a04ff0bb6f665655999796efc308d1","impliedFormat":99},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b80c6175da9de59bace50a72c2d68490d4ab5b07016ff5367bc7ba33cf2f219","affectsGlobalScope":true,"impliedFormat":1},{"version":"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935","impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"08faa97886e71757779428dd4c69a545c32c85fd629d1116d42710b32c6378bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"3d77c73be94570813f8cadd1f05ebc3dc5e2e4fdefe4d340ca20cd018724ee36","impliedFormat":1},{"version":"23cfd70b42094e54cc3c5dab996d81b97e2b6f38ccb24ead85454b8ddfe2fc4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"a3e8bafb2af8e850c644f4be7f5156cf7d23b7bfdc3b786bd4d10ed40329649c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"3c884d9d9ec454bdf0d5a0b8465bf8297d2caa4d853851d92cc417ac6f30b969","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a37b8d00d03f0381d2db2fe31b0571dc9d7cc0f4b87ca103cc3cd2277690ba0","impliedFormat":1},{"version":"71adf5dbc59568663d252a46179e71e4d544c053978bfc526d11543a3f716f42","impliedFormat":1},{"version":"38bf8ff1b403c861e9052c9ea651cb4f38c1ecc084a34d79f8acc6d6477a7321","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"e184c4b8918ef56c8c9e68bd79f3f3780e2d0d75bf2b8a41da1509a40c2deb46","affectsGlobalScope":true,"impliedFormat":1},{"version":"d206b4baf4ddcc15d9d69a9a2f4999a72a2c6adeaa8af20fa7a9960816287555","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"70731d10d5311bd4cf710ef7f6539b62660f4b0bfdbb3f9fbe1d25fe6366a7fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"afbe82d2b4857d674686255c44c8590dfe0b40927713876f875fdf4960473441","impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"137c2894e8f3e9672d401cc0a305dc7b1db7c69511cf6d3970fb53302f9eae09","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"ba1f814c22fd970255ddd60d61fb7e00c28271c933ab5d5cc19cd3ca66b8f57c","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"295f068af94245ee9d780555351bef98adfd58f8baf0b9dadbc31a489b881f8b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"4f029899f9bae07e225c43aef893590541b2b43267383bf5e32e3a884d219ed5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"bce947017cb7a2deebcc4f5ba04cead891ce6ad1602a4438ae45ed9aa1f39104","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"e2c72c065a36bc9ab2a00ac6a6f51e71501619a72c0609defd304d46610487a4","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"616075a6ac578cf5a013ee12964188b4412823796ce0b202c6f1d2e4ca8480d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"87f287f296f3ff07dbd14ea7853c2400d995dccd7bd83206196d6c0974774e96","impliedFormat":1},{"version":"78ef0198c323d0f7b16f993ada3459f0e7e20567e7f56fe0c5ee78f31cb0840c","impliedFormat":1},{"version":"01dea450d742aa55ce9b8ab8877bbda8eb73bf88609e440cc34f6f59f35080db","impliedFormat":1},{"version":"5ec614ed82e045de15417a47e2568be5310d43d4764ee43d295ea38caafbfd17","impliedFormat":1},{"version":"b788ef070e70003842cbd03c3e04f87d46b67a47b71e9e7d8713fd8c58c5f5ec","impliedFormat":1},{"version":"583d365dc19f813f1e2767771e844c7c4ea9ab1a01e85e0119f2e083488379c2","impliedFormat":1},{"version":"b82fc3869c625b828dd3feac4b5ebf335ed007d586dc16176602db73bc4e7c65","impliedFormat":1},{"version":"05e30605274c26f405c411eebed776fa2102418c05beec885e5c9bd0fa716f32","impliedFormat":1},{"version":"58c7f7820dc027a539b0437be7e1f8bdf663f91fbc9e861d80bb9368a38d4a94","impliedFormat":1},{"version":"d67d6b779d0dece9450d7a4170d3ee58ea7fcae0af2ab5e1d0ad711474b4f7f5","impliedFormat":1},{"version":"1066c11177d085898185548e1b38ed15fcea50061508f7c313ab8bec35d46b95","impliedFormat":1},{"version":"bbc49fd9dc6ee162ba3d270c834398e0c1d44e657ac4edfa55ac837902b7e0da","impliedFormat":1},{"version":"6993f360de4984b6743764fad3b88246d5dc6cfa45567783fc23833ad4e50c13","impliedFormat":1},{"version":"f11eb1fb4e569b293a7cae9e7cdae57e13efc12b0e4510e927868c93ec055e82","impliedFormat":1},{"version":"715682cddbefe50e27e5e7896acf4af0ffc48f9e18f64b0a0c2f8041e3ea869b","impliedFormat":1},{"version":"6d2f5a67bfe2034aa77b38f10977a57e762fd64e53c14372bcc5f1d3175ca322","impliedFormat":1},{"version":"4ff4add7b8cf26df217f2c883292778205847aefb0fd2aee64f5a229d0ffd399","impliedFormat":1},{"version":"33859aa36b264dd91bef77c279a5a0d259c6b63684d0c6ad538e515c69a489ec","impliedFormat":1},{"version":"33fa69f400b34c83e541dd5f4474f1c6fb2788614a1790c6c7b346b5c7eaa7dd","impliedFormat":1},{"version":"be213d7cbc3e5982b22df412cf223c2ac9d841c75014eae4c263761cd9d5e4c0","impliedFormat":1},{"version":"66451f9540fdf68a5fd93898257ccd7428cf7e49029f2e71b8ce70c8d927b87a","impliedFormat":1},{"version":"8a051690018330af516fd9ea42b460d603f0839f44d3946ebb4b551fe3bc7703","impliedFormat":1},{"version":"301fb04ef91ae1340bec1ebc3acdd223861c887a4a1127303d8eef7638b2d893","impliedFormat":1},{"version":"06236dfec90a14b0c3db8249831069ea3f90b004d73d496a559a4466e5a344a4","impliedFormat":1},{"version":"fc26991e51514bfc82e0f20c25132268b1d41e8928552dbaed7cc6f3d08fc3ac","impliedFormat":1},{"version":"5d82bb58dec5014c02aaeb3da465d34f4b7d5c724afea07559e3dfca6d8da5bc","impliedFormat":1},{"version":"44448f58f4d731dc28a02b5987ab6f20b9f77ad407dcf57b68c853fe52195cd7","impliedFormat":1},{"version":"b2818e8d05d6e6ad0f1899abf90a70309240a15153ea4b8d5e0c151e117b7338","impliedFormat":1},{"version":"1c708c15bb96473ce8ec2a946bd024ecded341169a0b84846931f979172244ba","impliedFormat":1},{"version":"ed0f5e1f45dc7c3f40356e0a855e8594aa57c125a5d8dfeef118e0a3024f98ff","impliedFormat":1},{"version":"dc187f457333356ddc1ab8ec7833cd836f85e0bbcade61290dc55116244867cb","impliedFormat":1},{"version":"25525e173de74143042e824eaa786fa18c6b19e9dafb64da71a5faacc5bd2a5c","impliedFormat":1},{"version":"7a3d649f2de01db4b316cf4a0ce5d96832ee83641f1dc84d3e9981accf29c3a1","impliedFormat":1},{"version":"26e4260ee185d4af23484d8c11ef422807fb8f51d33aa68d83fab72eb568f228","impliedFormat":1},{"version":"c4d52d78e3fb4f66735d81663e351cf56037270ed7d00a9b787e35c1fc7183ce","impliedFormat":1},{"version":"864a5505d0e9db2e1837dce8d8aae8b7eeaa5450754d8a1967bf2843124cc262","impliedFormat":1},{"version":"2d045f00292ac7a14ead30d1f83269f1f0ad3e75d1f8e5a245ab87159523cf98","impliedFormat":1},{"version":"54bcb32ab0c7c72b61becd622499a0ae1c309af381801a30878667e21cba85bb","impliedFormat":1},{"version":"20666518864143f162a9a43249db66ca1d142e445e2d363d5650a524a399b992","impliedFormat":1},{"version":"28439c9ebd31185ae3353dd8524115eaf595375cd94ca157eefcf1280920436a","impliedFormat":1},{"version":"84344d56f84577d4ac1d0d59749bb2fde14c0fb460d0bfb04e57c023748c48a6","impliedFormat":1},{"version":"89bcaf21b0531640604ca9e0796f54a6e1b4e2d43c07422ffa1e3d2e1bb0e456","impliedFormat":1},{"version":"66738976a7aa2d5fb2770a1b689f8bc643af958f836b7bc08e412d4092de3ab9","impliedFormat":1},{"version":"35a0eac48984d20f6da39947cf81cd71e0818feefc03dcb28b4ac7b87a636cfd","impliedFormat":1},{"version":"f6c226d8222108b3485eb0745e8b0ee48b0b901952660db20e983741e8852654","impliedFormat":1},{"version":"93c3b758c4dc64ea499c9416b1ed0e69725133644b299b86c5435e375d823c75","impliedFormat":1},{"version":"4e85f443714cff4858fdaffed31052492fdd03ff7883b22ed938fc0e34b48093","impliedFormat":1},{"version":"0146912d3cad82e53f779a0b7663f181824bba60e32715adb0e9bd02c560b8c6","impliedFormat":1},{"version":"70754650d1eba1fc96a4ed9bbbc8458b341b41063fe79f8fa828db7059696712","impliedFormat":1},{"version":"220783c7ca903c6ce296b210fae5d7e5c5cc1942c5a469b23d537f0fbd37eb18","impliedFormat":1},{"version":"0974c67cf3e2d539d0046c84a5e816e235b81c8516b242ece2ed1bdbb5dbd3d6","impliedFormat":1},{"version":"b4186237e7787a397b6c5ae64e155e70ac2a43fdd13ff24dfb6c1e3d2f930570","impliedFormat":1},{"version":"2647784fffa95a08af418c179b7b75cf1d20c3d32ed71418f0a13259bf505c54","impliedFormat":1},{"version":"0480102d1a385b96c05316b10de45c3958512bb9e834dbecbbde9cc9c0b22db3","impliedFormat":1},{"version":"eea44cfed69c9b38cc6366bd149a5cfa186776ca2a9fb87a3746e33b7e4f5e74","impliedFormat":1},{"version":"7f375e5ef1deb2c2357cba319b51a8872063d093cab750675ac2eb1cef77bee9","impliedFormat":1},{"version":"b7f06aec971823244f909996a30ef2bbeae69a31c40b0b208d0dfd86a8c16d4f","impliedFormat":1},{"version":"0421510c9570dfae34b3911e1691f606811818df00354df7abd028cee454979f","impliedFormat":1},{"version":"1517236728263863a79500653cc15ceb286f048907b3dba3141a482ca6946bd7","impliedFormat":1},{"version":"7c7b418e467a88a714b4c6dac321923b933f82875f063f48abf952021a2c2df1","impliedFormat":1},{"version":"33120063a7e106818ce109be9238569edca74d4e8530f853bd30d298d1375fd8","impliedFormat":1},{"version":"8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","impliedFormat":1},{"version":"2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","impliedFormat":1},{"version":"1c2cd862994b1fbed3cde0d1e8de47835ff112d197a3debfddf7b2ee3b2c52bc","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"9e0cf651e8e2c5b9bebbabdff2f7c6f8cedd91b1d9afcc0a854cdff053a88f1b","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"f9e22729fa06ed20f8b1fe60670b7c74933fdfd44d869ddfb1919c15a5cf12fb","impliedFormat":1},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"b78cd10245a90e27e62d0558564f5d9a16576294eee724a59ae21b91f9269e4a","impliedFormat":1},{"version":"936eb43a381712a8ec1249f2afc819f6fc7ca68f10dfec71762b428dfdc53bf1","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"86ea91bfa7fef1eeb958056f30f1db4e0680bc9b5132e5e9d6e9cfd773c0c4fd","affectsGlobalScope":true,"impliedFormat":1},{"version":"689be50b735f145624c6f391042155ae2ff6b90a93bac11ca5712bc866f6010c","impliedFormat":1},{"version":"0504070e7eaba788f5d0d5926782ed177f1db01cee28363c488fae94950c0bbc","impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"0e13570a7e86c6d83dd92e81758a930f63747483e2cd34ef36fcdb47d1f9726a","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"6847334317c1bc1e6fc4b679b0095bbd2b6ee3b85fe3f26fc26bac462f68ef5e","impliedFormat":1},{"version":"2224f3072e3cc07906eeed5c71746779511fba2dd224addc5489bcdb489bdee5","impliedFormat":1},{"version":"fb893a0dfc3c9fb0f9ca93d0648694dd95f33cbad2c0f2c629f842981dfd4e2e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"dd0c1b380ba3437adedef134b2e48869449b1db0b07b2a229069309ce7b9dd39","impliedFormat":1},{"version":"a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","impliedFormat":1},{"version":"bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","impliedFormat":1},{"version":"1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe","impliedFormat":1},{"version":"a45c25e77c911c1f2a04cade78f6f42b4d7d896a3882d4e226efd3a3fcd5f2c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","impliedFormat":1},{"version":"211440ce81e87b3491cdf07155881344b0a61566df6e749acff0be7e8b9d1a07","impliedFormat":1},{"version":"5d9a0b6e6be8dbb259f64037bce02f34692e8c1519f5cd5d467d7fa4490dced4","impliedFormat":1},{"version":"880da0e0f3ebca42f9bd1bc2d3e5e7df33f2619d85f18ee0ed4bd16d1800bc32","impliedFormat":1},{"version":"963d59066dd6742da1918a6213a209bcc205b8ee53b1876ee2b4e6d80f97c85e","impliedFormat":1},{"version":"9c5c92b7fb8c38ff1b46df69701f2d1ea8e2d6468e3cd8f73d8af5e6f7864576","impliedFormat":1},{"version":"afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","impliedFormat":1},{"version":"6d09838b65c3c780513878793fc394ae29b8595d9e4729246d14ce69abc71140","impliedFormat":1},{"version":"fefa1d4c62ddb09c78d9f46e498a186e72b5e7aeb37093aa6b2c321b9d6ecd14","impliedFormat":1},{"version":"271cde49dfd9b398ccc91bb3aaa43854cf76f4d14e10fed91cbac649aa6cbc63","affectsGlobalScope":true,"impliedFormat":1},{"version":"2bcecd31f1b4281710c666843fc55133a0ee25b143e59f35f49c62e168123f4b","impliedFormat":1},{"version":"a6273756fa05f794b64fe1aff45f4371d444f51ed0257f9364a8b25f3501915d","impliedFormat":1},{"version":"9c4e644fe9bf08d93c93bd892705842189fe345163f8896849d5964d21b56b78","impliedFormat":1},{"version":"25d91fb9ed77a828cc6c7a863236fb712dafcd52f816eec481bd0c1f589f4404","impliedFormat":1},{"version":"4cd14cea22eed1bfb0dc76183e56989f897ac5b14c0e2a819e5162eafdcfe243","impliedFormat":1},{"version":"8d32432f68ca4ce93ad717823976f2db2add94c70c19602bf87ee67fe51df48b","impliedFormat":1},{"version":"ee65fe452abe1309389c5f50710f24114e08a302d40708101c4aa950a2a7d044","impliedFormat":1},{"version":"fbf802b3a028f5eb22ad406ee5fc7c368f0acfd3a2a6d0f805120766f5717ec8","impliedFormat":1},{"version":"63786b6f821dee19eb898afb385bd58f1846e6cba593a35edcf9631ace09ba25","impliedFormat":1},{"version":"ff954afaefd9bd5fad03678cae63fd23e0aaaf4d311b27bfb35e1d6d83833997","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"818e7c86776c67f49dbd781d445e13297b59aa7262e54b065b1332d7dcc6f59a","impliedFormat":1},{"version":"fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","impliedFormat":1},{"version":"7e8d3f08435ad2cefe67f58182618bfc9a0a29db08cf2544b94cbcae754a9bd9","impliedFormat":1},{"version":"8cf9b9045a614f883b623c2f1a631ec6a93321747e933330b2eec0ee47164a34","impliedFormat":1},{"version":"cee62e64fc4bdfb3798ab8e21486fadd2027ce4128349989acc63905366f91c5","impliedFormat":1},{"version":"dee5d387e2e6f3015cbf91fc0c13ed6f016f9c5c1f2ad9c62602f4fd398fa83a","impliedFormat":1},{"version":"c68eb17ea7b2ff7f8bcfe1a9e82b8210c3112820d9e74b56b0fbecaab5ce8866","impliedFormat":1},{"version":"2d225e7bda2871c066a7079c88174340950fb604f624f2586d3ea27bb9e5f4ff","impliedFormat":1},{"version":"6a785f84e63234035e511817dd48ada756d984dd8f9344e56eb8b2bdcd8fd001","impliedFormat":1},{"version":"c1422d016f7df2ccd3594c06f2923199acd09898f2c42f50ea8159f1f856f618","impliedFormat":1},{"version":"2973b1b7857ca144251375b97f98474e9847a890331e27132d5a8b3aea9350a8","impliedFormat":1},{"version":"0eb6152d37c84d6119295493dfcc20c331c6fda1304a513d159cdaa599dcb78b","impliedFormat":1},{"version":"237df26f8c326ca00cd9d2deb40214a079749062156386b6d75bdcecc6988a6b","impliedFormat":1},{"version":"cd44995ee13d5d23df17a10213fed7b483fabfd5ea08f267ab52c07ce0b6b4da","impliedFormat":1},{"version":"58ce1486f851942bd2d3056b399079bc9cb978ec933fe9833ea417e33eab676e","impliedFormat":1},{"version":"7557d4d7f19f94341f4413575a3453ba7f6039c9591015bcf4282a8e75414043","impliedFormat":1},{"version":"a3b2cc16f3ce2d882eca44e1066f57a24751545f2a5e4a153d4de31b4cac9bb5","impliedFormat":1},{"version":"ac2b3b377d3068bfb6e1cb8889c99098f2c875955e2325315991882a74d92cc8","impliedFormat":1},{"version":"8deb39d89095469957f73bd194d11f01d9894b8c1f1e27fbf3f6e8122576b336","impliedFormat":1},{"version":"a38a9c41f433b608a0d37e645a31eecf7233ef3d3fffeb626988d3219f80e32f","impliedFormat":1},{"version":"8e1428dcba6a984489863935049893631170a37f9584c0479f06e1a5b1f04332","impliedFormat":1},{"version":"1fce9ecb87a2d3898941c60df617e52e50fb0c03c9b7b2ba8381972448327285","impliedFormat":1},{"version":"5ef0597b8238443908b2c4bf69149ed3894ac0ddd0515ac583d38c7595b151f1","impliedFormat":1},{"version":"ac52b775a80badff5f4ac329c5725a26bd5aaadd57afa7ad9e98b4844767312a","impliedFormat":1},{"version":"6ae5b4a63010c82bf2522b4ecfc29ffe6a8b0c5eea6b2b35120077e9ac54d7a1","impliedFormat":1},{"version":"dd7109c49f416f218915921d44f0f28975df78e04e437c62e1e1eb3be5e18a35","impliedFormat":1},{"version":"eee181112e420b345fc78422a6cc32385ede3d27e2eaf8b8c4ad8b2c29e3e52e","impliedFormat":1},{"version":"25fbe57c8ee3079e2201fe580578fab4f3a78881c98865b7c96233af00bf9624","impliedFormat":1},{"version":"62cc8477858487b4c4de7d7ae5e745a8ce0015c1592f398b63ee05d6e64ca295","impliedFormat":1},{"version":"cc2a9ec3cb10e4c0b8738b02c31798fad312d21ef20b6a2f5be1d077e9f5409d","impliedFormat":1},{"version":"4b4fadcda7d34034737598c07e2dca5d7e1e633cb3ba8dd4d2e6a7782b30b296","impliedFormat":1},{"version":"360fdc8829a51c5428636f1f83e7db36fef6c5a15ed4411b582d00a1c2bd6e97","impliedFormat":1},{"version":"1cf0d15e6ab1ecabbf329b906ae8543e6b8955133b7f6655f04d433e3a0597ab","impliedFormat":1},{"version":"7c9f98fe812643141502b30fb2b5ec56d16aaf94f98580276ae37b7924dd44a4","impliedFormat":1},{"version":"b3547893f24f59d0a644c52f55901b15a3fa1a115bc5ea9a582911469b9348b7","impliedFormat":1},{"version":"596e5b88b6ca8399076afcc22af6e6e0c4700c7cd1f420a78d637c3fb44a885e","impliedFormat":1},{"version":"adddf736e08132c7059ee572b128fdacb1c2650ace80d0f582e93d097ed4fbaf","impliedFormat":1},{"version":"d4cad9dc13e9c5348637170ddd5d95f7ed5fdfc856ddca40234fa55518bc99a6","impliedFormat":1},{"version":"d70675ba7ba7d02e52b7070a369957a70827e4b2bca2c1680c38a832e87b61fd","impliedFormat":1},{"version":"3be71f4ce8988a01e2f5368bdd58e1d60236baf511e4510ee9291c7b3729a27e","impliedFormat":1},{"version":"423d2ccc38e369a7527988d682fafc40267bcd6688a7473e59c5eea20a29b64f","impliedFormat":1},{"version":"2f9fde0868ed030277c678b435f63fcf03d27c04301299580a4017963cc04ce6","impliedFormat":1},{"version":"feeb73d48cc41c6dd23d17473521b0af877751504c30c18dc84267c8eeea429a","impliedFormat":1},{"version":"25f1159094dc0bf3a71313a74e0885426af21c5d6564a254004f2cadf9c5b052","impliedFormat":1},{"version":"cde493e09daad4bb29922fe633f760be9f0e8e2f39cdca999cce3b8690b5e13a","impliedFormat":1},{"version":"3d7f9eb12aface876f7b535cc89dcd416daf77f0b3573333f16ec0a70bcf902a","impliedFormat":1},{"version":"b83139ae818dd20f365118f9999335ca4cd84ae518348619adc5728e7e0372d5","impliedFormat":1},{"version":"e0205f04611bea8b5b82168065b8ef1476a8e96236201494eb8c785331c43118","impliedFormat":1},{"version":"62d26d8ba4fa15ab425c1b57a050ed76c5b0ecbffaa53f182110aa3a02405a07","impliedFormat":1},{"version":"9941cbf7ca695e95d588f5f1692ab040b078d44a95d231fa9a8f828186b7b77d","impliedFormat":1},{"version":"41b8775befd7ded7245a627e9f4de6110236688ce4c124d2d40c37bc1a3bfe05","impliedFormat":1},{"version":"ee736931bcb117efdd2118795ccfa4b2d0beb8fec426f91ae448e51b03510707","impliedFormat":1},{"version":"75f191b59fe7ce72d1d7d11d0f329a193843f54af93182fc5a65c37d0a82c85a","impliedFormat":1},{"version":"cd74c8275483d3fe0d07a9b4bba28845a8a611f0aa399e961dbd40e5d46dd9ad","impliedFormat":1},{"version":"9068fb04d9df0cb5de85ced5c4d70a935096c4cb289ab76b038e0a2496c92503","impliedFormat":1},{"version":"1f2bcc8836f72a2ff7a6804dc5379e9b73bf94a51d8e60c43cf5b874b5f4f6ff","impliedFormat":1},{"version":"7220461ab7f6d600b313ce621346c315c3a0ebc65b5c6f268488c5c55b68d319","impliedFormat":1},{"version":"f90d4c1ae3af9afb35920b984ba3e41bdd43f0dc7bae890b89fbd52b978f0cac","impliedFormat":1},{"version":"fcf79300e5257a23ed3bacaa6861d7c645139c6f7ece134d15e6669447e5e6db","impliedFormat":1},{"version":"187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","impliedFormat":1},{"version":"aa2c18a1b5a086bbcaae10a4efba409cc95ba7287d8cf8f2591b53704fea3dea","impliedFormat":1},{"version":"b88749bdb18fc1398370e33aa72bc4f88274118f4960e61ce26605f9b33c5ba2","impliedFormat":1},{"version":"0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","impliedFormat":1},{"version":"00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","impliedFormat":1},{"version":"a873c50d3e47c21aa09fbe1e2023d9a44efb07cc0cb8c72f418bf301b0771fd3","impliedFormat":1},{"version":"7c14ccd2eaa82619fffc1bfa877eb68a012e9fb723d07ee98db451fadb618906","impliedFormat":1},{"version":"49c36529ee09ea9ce19525af5bb84985ea8e782cb7ee8c493d9e36d027a3d019","impliedFormat":1},{"version":"df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","impliedFormat":1},{"version":"4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","impliedFormat":1},{"version":"202f8582ee3cd89e06c4a17d8aabb925ff8550370559c771d1cc3ec3934071c2","impliedFormat":1},{"version":"fbca5ffaebf282ec3cdac47b0d1d4a138a8b0bb32105251a38acb235087d3318","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1},{"version":"b95f2a78de34a873c6dd76dc538b7a5fec77da6a0e0e7efc7aa58f58ddfce270","impliedFormat":1},{"version":"1231f32d791b0fcc13e0c836543b34e83dea6e0b494ee35194a66a50dd25427e","impliedFormat":1},{"version":"66880e558be5ee57d23c12ffd0a90bf07840e088f8fa9b608fadeaf45af78969","impliedFormat":1},{"version":"058186f212307a621cd51160e2124c26208649600b4f0a27835f1d1caae81e65","impliedFormat":1},{"version":"c2bfeeadb18ba18386d7549a69c2049e57f31758b71343543a5c27919197b0fa","impliedFormat":1},{"version":"63b0be497f88d815c410b76985b798132d6c470199f2f31e1390a48480619758","impliedFormat":1},{"version":"8b5402ae709d042c3530ed3506c135a967159f42aed3221267e70c5b7240b577","impliedFormat":1},{"version":"95a31f8eea43d175dfeda85accc45bddce5678acae4e22e2f683b48e0e0188de","impliedFormat":1},{"version":"916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","impliedFormat":1},{"version":"c555dd691dd05955e99cd93dd99c685a65e5287813ccb5e6bfde951183248e26","impliedFormat":1},{"version":"a589f9f052276a3fc00b75e62f73b93ea568fce3e935b86ed7052945f99d9dc2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"9b4f7ff9681448c72abe38ea8eefd7ffe0c3aefe495137f02012a08801373f71","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"c21e3729094ed9ecdcb97724ce5b20625bb9ac3b9146d681cafa97d667c12bb5","impliedFormat":1},{"version":"5adf3c3c7204b3614dbc585681a33ef598c68df387298859f9a2521cfb449437","impliedFormat":1},{"version":"f63cb353cd53da6be4a34f6fdece6316dac14fd62cccf9a4d2ce6bab2c37bc8c","impliedFormat":1},{"version":"54751c34f1e8c3bedd7a4501762c8a9567160ac76bd6bc35b73429d3e2cf2ec7","impliedFormat":1},{"version":"e85d04f57b46201ddc8ba238a84322432a4803a5d65e0bbd8b3b4f05345edd51","impliedFormat":1},{"version":"bbf7c864f1ffbacf54b524d028b6a77da9f0be0b8fff5c088e3185ee50496762","impliedFormat":1},{"version":"9df147746b0cbd11d022b564e6fdd43ac79b643dc579d2123317ee01cc4f0d70","impliedFormat":1},{"version":"fa244c20411dd53d853ce4b85e7146860be364946da477dad721e66301097460","impliedFormat":1},{"version":"fab2754e047c7818a8eb650cc2194aef4388193acdc4606eb601cb60923f7798","impliedFormat":1},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1d4bc73751d6ec6285331d1ca378904f55d9e5e8aeaa69bc45b675c3df83e778","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"1cfafc077fd4b420e5e1c5f3e0e6b086f6ea424bf96a6c7af0d6d2ef2b008a81","impliedFormat":1},{"version":"9d37372c385ea35087857d10afe0ae636503035feee2f742c4031c3658b17d80","impliedFormat":1},{"version":"8017277c3843df85296d8730f9edf097d68d7d5f9bc9d8124fcacf17ecfd487e","impliedFormat":1},{"version":"8718fa41d7cf4aa91de4e8f164c90f88e0bf343aa92a1b9b725a9c675c64e16b","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"041597c12abeaa2ef07766775955fc87cfc65c43e0fe86c836071bea787e967c","impliedFormat":1},{"version":"0838507efff4f479c6f603ec812810ddfe14ab32abf8f4a8def140be970fe439","impliedFormat":1},{"version":"f67c92f5cb2bf5a9929ee73216f08749db4f22b04a18e5205ed6e75ca48e9feb","impliedFormat":1},{"version":"7212c2d58855b8df35275180e97903a4b6093d4fbaefea863d8d028da63938c6","impliedFormat":1},{"version":"de0199a112f75809a7f80ec071495159dcf3e434bc021347e0175627398264c3","impliedFormat":1},{"version":"1a2bed55cfa62b4649485df27c0e560b04d4da4911e3a9f0475468721495563f","impliedFormat":1},{"version":"854045924626ba585f454b53531c42aed4365f02301aa8eca596423f4675b71f","impliedFormat":1},{"version":"dd9faff42b456b5f03b85d8fbd64838eb92f6f7b03b36322cbc59c005b7033d3","impliedFormat":1},{"version":"6ff702721d87c0ba8e7f8950e7b0a3b009dfd912fab3997e0b63fab8d83919c3","impliedFormat":1},{"version":"9dce9fc12e9a79d1135699d525aa6b44b71a45e32e3fa0cf331060b980b16317","impliedFormat":1},{"version":"586b2fd8a7d582329658aaceec22f8a5399e05013deb49bcfde28f95f093c8ee","impliedFormat":1},{"version":"dedc0ab5f7babe4aef870618cd2d4bc43dc67d1584ee43b68fc6e05554ef8f34","impliedFormat":1},{"version":"ef1f3eadd7bed282de45bafd7c2c00105cf1db93e22f6cd763bec8a9c2cf6df1","impliedFormat":1},{"version":"3d8885d13f76ff35b7860039e83c936ff37553849707c2fd1d580d193a52be5b","impliedFormat":1},{"version":"b75188f1d06bba9e266aad819df75b51ed1fcc19ac0750dc6a55a8eb1b7c2134","impliedFormat":1},{"version":"d8272401aa994ed8a60f71067acbcc9a73d847be6badf1b9397a8ce965af6318","impliedFormat":1},{"version":"c73834a2aee5e08dea83bd8d347f131bc52f9ec5b06959165c55ef7a544cae82","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1},{"version":"d26a79f97f25eb1c5fc36a8552e4decc7ad11104a016d31b1307c3afaf48feb1","impliedFormat":1},{"version":"ddef25f825320de051dcb0e62ffce621b41c67712b5b4105740c32fd83f4c449","impliedFormat":1},{"version":"1b3dffaa4ca8e38ac434856843505af767a614d187fb3a5ef4fcebb023c355aa","impliedFormat":1},{"version":"1087c6c9066684d3e72a8fcc5445f34e85572792bc16f5aab01208bcbbbe64be","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"eb27bc1c8d46234252298d3d7252c8459667daa0953b974f9d2c581c46703b2a","impliedFormat":1},{"version":"1b096ca6b209d1fed9ce68edd110ff6de8bec4fab2689d2adc481ffc1b1dc20b","impliedFormat":1},{"version":"9c02f12da30d30dd5f5ccaeedfb9b925ed4e5114059e9be6ed2ecf87a492fd16","impliedFormat":1},{"version":"8c8f8e816a38f1a0cc2dd3813d3bede2d773df36e72f4cb55d9daabd22016925","impliedFormat":1},{"version":"2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","impliedFormat":1},{"version":"f86d0150d5abc55bf5bb479beacc34a7e9d4ab4e3014315fb74626baf1558857","impliedFormat":1},{"version":"eac647a94fb1f09789e12dfecb52dcd678d05159a4796b4e415aa15892f3b103","impliedFormat":1},{"version":"b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","impliedFormat":1},{"version":"d77523951427fca92c7fdcaafb776bfb5d76cb0dfd8a7b18f38710332386ad6d","impliedFormat":1},{"version":"d9dcda644a9ecb57df163cbeaaca093c696335a53f47b5dbbf7cf0671b76e2eb","impliedFormat":1},{"version":"2d4d871246a21c785aec2a5b745ad79cdc877de3866f586887c8c74ddec97b8d","impliedFormat":1},{"version":"0cfa403fc15d0fda3214c3d8b75a42abcfa60c07e739de908e57d1f76220b7f9","impliedFormat":1},{"version":"d99cef4ae065cde21bd536998282a9882d8fb36a902725f03d71c3a9e3a24aa4","impliedFormat":1},{"version":"f3d4606a83fbdeedeeecd982ac35945bc02d50499cc65c72d71a143afa7e7334","impliedFormat":1},{"version":"bc919e8ad895c43568f8125523ab0f91810d5208afcc5bff2ba4713dffda0d97","impliedFormat":1},{"version":"6771b9c4bb2253e2a51c5ef7155419558289b885857e275ff61f90a979049cc3","impliedFormat":1},{"version":"6a1fb700b666a19112cddb4ab24e671c83ce40f6bfe64d1e7cb59c88263d0ec2","impliedFormat":1},{"version":"cc060af11b9bc0ed723d1200951bdc3255ff189475183a1f9ed06fd9c57206a6","impliedFormat":1},{"version":"a0aa9907949f7688394904c4d16b93c8d3154a9eda70ab096e0cfb37ef48e9b1","impliedFormat":1},{"version":"816dd83b87f2f1986f4c9072d38262ae96ee6589fab8a9ebc3b8d8f30263b8d3","impliedFormat":1},{"version":"5512a0ca56d3a21dd2843b62c939ff885d8853e55524bada67d1e393649e4bd6","impliedFormat":1},{"version":"3cd6ea92f13a0bf3c120ac271bc0ba57bf4cc3078e010150887c657f78b41959","impliedFormat":1},{"version":"4266ccd2cf1d6a281efd9c7ddf9efd7daecf76575364148bd233e18919cac3ed","impliedFormat":1},{"version":"d9a256f69f3956993e65efd88336644be8f8dd36d149e859c14704ef6c6c0eec","impliedFormat":1},{"version":"d18f13c33148de7f0b1241734cb10dfe4c1e9505acad51ee48c3f4c1bd09e0dd","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1},{"version":"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","impliedFormat":1}],"root":[87,440,443,444,[524,528],[754,760]],"options":{"allowJs":false,"composite":true,"declaration":true,"declarationDir":"./dist","declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"jsx":4,"module":199,"noFallthroughCasesInSwitch":false,"noImplicitAny":true,"noUncheckedIndexedAccess":false,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":8,"useDefineForClassFields":false,"useUnknownInCatchVariables":false},"referencedMap":[[1179,1],[767,1],[521,2],[455,1],[454,1],[501,1],[509,1],[493,3],[497,4],[510,5],[511,6],[495,7],[494,8],[498,9],[512,10],[506,1],[513,10],[507,11],[492,12],[523,13],[504,14],[508,15],[529,16],[514,17],[468,18],[515,19],[503,9],[516,9],[496,20],[457,21],[499,22],[500,15],[480,15],[481,23],[482,24],[456,25],[483,26],[459,27],[458,28],[477,29],[484,18],[485,15],[486,5],[461,30],[462,5],[463,31],[464,5],[465,31],[466,32],[487,33],[467,34],[491,35],[469,36],[470,32],[471,37],[472,21],[460,38],[488,39],[473,40],[505,41],[474,34],[489,33],[490,5],[475,5],[476,5],[478,42],[479,36],[517,9],[518,1],[519,43],[445,1],[502,44],[522,1],[754,45],[443,45],[757,46],[444,45],[755,45],[756,47],[87,48],[526,49],[524,50],[527,51],[528,52],[525,45],[760,53],[440,54],[758,55],[759,56],[568,1],[924,57],[922,1],[441,58],[442,59],[209,60],[210,61],[381,62],[376,63],[378,64],[380,65],[383,66],[208,67],[374,68],[384,69],[375,70],[377,71],[382,72],[207,73],[379,74],[385,75],[386,76],[388,77],[389,78],[390,76],[391,78],[392,77],[393,77],[394,76],[395,76],[396,79],[397,76],[398,58],[387,80],[399,81],[400,82],[401,83],[402,84],[410,85],[437,86],[403,79],[406,87],[404,88],[405,83],[407,1],[433,85],[434,78],[436,89],[435,90],[412,85],[411,85],[419,91],[426,90],[432,92],[427,85],[428,85],[429,85],[431,93],[409,1],[408,85],[195,94],[196,94],[194,95],[197,1],[198,96],[199,96],[200,96],[205,97],[201,1],[204,98],[203,99],[202,98],[336,100],[337,96],[338,101],[267,102],[335,103],[333,96],[334,104],[315,105],[332,106],[289,96],[312,1],[309,96],[282,96],[281,96],[302,96],[310,107],[296,96],[283,108],[277,109],[287,108],[286,108],[271,96],[272,96],[273,96],[280,96],[305,96],[285,108],[295,96],[284,96],[270,96],[301,110],[314,111],[268,96],[307,1],[308,96],[269,108],[299,1],[288,108],[292,1],[303,1],[278,112],[279,108],[275,109],[291,109],[297,96],[290,113],[313,96],[294,108],[293,96],[298,109],[274,96],[300,96],[276,114],[306,1],[304,108],[311,1],[316,115],[320,116],[321,117],[322,117],[323,117],[324,117],[331,118],[325,117],[326,117],[327,115],[319,117],[318,119],[328,117],[329,117],[330,117],[317,96],[241,96],[263,96],[231,96],[233,96],[250,120],[230,96],[217,1],[255,96],[264,120],[248,96],[232,120],[226,121],[218,1],[219,1],[239,120],[238,120],[220,96],[221,96],[222,96],[229,96],[259,96],[237,120],[247,96],[234,96],[216,96],[254,96],[266,122],[214,123],[261,1],[262,96],[215,124],[252,1],[240,120],[244,1],[257,1],[227,125],[228,120],[224,121],[243,121],[249,96],[242,120],[235,126],[213,96],[246,120],[245,96],[256,96],[251,121],[223,96],[253,96],[225,127],[260,1],[258,120],[236,126],[265,1],[530,1],[564,128],[563,128],[562,1],[566,129],[567,129],[565,1],[533,1],[531,130],[534,131],[532,131],[535,1],[574,1],[575,1],[579,1],[576,1],[586,130],[585,1],[587,1],[588,132],[580,133],[584,134],[581,135],[577,1],[582,136],[583,137],[578,1],[550,130],[546,130],[549,130],[548,130],[547,130],[543,130],[542,130],[545,130],[544,130],[537,130],[538,138],[536,1],[541,139],[539,130],[592,140],[571,141],[573,141],[572,141],[569,142],[570,141],[590,1],[589,1],[591,1],[551,143],[552,1],[555,1],[558,1],[553,1],[560,1],[561,144],[557,1],[554,1],[556,1],[559,1],[540,1],[976,1],[979,145],[420,146],[413,85],[418,147],[415,146],[425,148],[416,146],[424,149],[422,150],[417,146],[414,85],[423,151],[430,152],[421,1],[978,1],[861,153],[834,1],[862,1],[863,1],[864,1],[921,154],[865,155],[910,156],[867,157],[866,158],[868,155],[869,155],[871,159],[870,155],[872,160],[873,160],[874,155],[876,161],[877,155],[878,161],[879,155],[881,155],[882,155],[883,155],[884,162],[880,155],[885,1],[886,163],[887,163],[888,163],[889,163],[890,163],[899,164],[891,163],[892,163],[893,163],[894,163],[896,163],[895,163],[897,163],[898,163],[900,155],[901,155],[875,155],[902,161],[904,165],[903,155],[905,155],[906,155],[907,166],[909,155],[908,155],[911,155],[913,155],[914,167],[912,155],[915,155],[916,155],[917,155],[918,155],[919,155],[920,155],[927,168],[923,57],[925,169],[926,57],[929,170],[930,171],[931,1],[206,1],[937,172],[928,153],[938,1],[943,173],[941,174],[598,1],[600,175],[601,175],[602,1],[603,1],[605,176],[606,1],[607,1],[608,175],[609,1],[610,1],[611,177],[612,1],[613,1],[614,178],[615,1],[616,179],[617,1],[618,1],[619,1],[620,1],[623,1],[622,180],[599,1],[624,181],[625,1],[621,1],[626,1],[627,175],[628,182],[629,183],[945,184],[951,185],[950,186],[949,187],[946,1],[948,188],[947,1],[936,189],[953,190],[952,189],[956,191],[604,1],[958,192],[959,193],[961,194],[963,195],[964,195],[965,195],[962,1],[968,196],[966,197],[967,197],[969,1],[970,1],[939,1],[971,198],[972,199],[973,1],[974,200],[975,201],[984,202],[358,1],[954,203],[955,1],[985,204],[942,1],[986,205],[989,206],[987,206],[988,207],[1040,208],[1042,209],[1043,210],[1041,211],[1044,212],[1045,213],[1046,214],[1047,215],[1048,216],[1049,217],[1050,218],[1051,219],[1052,220],[1053,221],[1054,194],[932,1],[957,1],[1055,1],[1056,1],[1062,222],[1059,223],[1058,224],[1061,225],[1057,1],[1060,223],[944,1],[1063,199],[807,226],[808,226],[809,227],[766,228],[810,229],[811,230],[812,231],[761,1],[764,232],[762,1],[763,1],[813,233],[814,234],[815,235],[816,236],[817,237],[818,238],[819,238],[821,239],[820,240],[822,241],[823,242],[824,243],[806,244],[765,1],[825,245],[826,246],[827,247],[860,248],[828,249],[829,250],[830,251],[784,252],[794,253],[783,252],[804,254],[775,255],[774,256],[803,199],[797,257],[802,258],[777,259],[791,260],[776,261],[800,262],[772,263],[771,199],[801,264],[773,265],[778,266],[779,1],[782,266],[769,1],[805,267],[795,268],[786,269],[787,270],[789,271],[785,272],[788,273],[798,199],[780,274],[781,275],[790,276],[770,277],[793,268],[792,266],[796,1],[799,278],[831,279],[832,280],[833,281],[835,282],[836,283],[837,284],[838,285],[839,285],[840,286],[841,1],[842,287],[844,288],[843,289],[845,290],[846,291],[847,292],[848,293],[849,294],[850,295],[851,296],[852,297],[853,298],[854,299],[855,300],[856,301],[857,302],[858,303],[859,304],[1064,199],[1065,1],[1066,1],[1072,305],[1067,1],[1073,1],[1076,1],[84,1],[1077,1],[934,1],[1080,306],[1079,307],[935,1],[753,85],[1085,308],[1084,309],[1087,308],[1086,310],[1083,311],[1081,1],[1082,312],[82,1],[85,313],[86,85],[1088,314],[1089,1],[1106,315],[1131,316],[1132,317],[1107,318],[1110,318],[1129,316],[1130,316],[1120,316],[1119,319],[1117,316],[1112,316],[1125,316],[1123,316],[1127,316],[1111,316],[1124,316],[1128,316],[1113,316],[1114,316],[1126,316],[1108,316],[1115,316],[1116,316],[1118,316],[1122,316],[1133,320],[1121,316],[1109,316],[1146,321],[1145,1],[1140,320],[1142,322],[1141,320],[1134,320],[1135,320],[1137,320],[1139,320],[1143,322],[1144,322],[1136,322],[1138,322],[933,323],[1148,324],[1147,174],[940,325],[1149,153],[1150,1],[1151,1],[1152,1],[1155,326],[1154,327],[1153,328],[595,329],[594,1],[1157,330],[960,1],[1173,331],[1171,332],[1170,333],[1161,334],[1162,335],[1169,336],[1163,335],[1164,334],[1165,334],[1166,334],[1167,337],[1160,338],[1168,333],[1159,1],[1172,339],[1174,340],[1175,1],[1176,341],[1177,1],[1178,342],[1035,343],[992,1],[994,344],[993,345],[998,346],[1033,347],[1030,348],[1032,349],[995,348],[996,350],[1000,350],[999,351],[997,352],[1031,353],[1029,348],[1034,354],[1027,1],[1028,1],[1001,355],[1006,348],[1008,348],[1003,348],[1004,355],[1010,348],[1011,356],[1002,348],[1007,348],[1009,348],[1005,348],[1025,357],[1024,348],[1026,358],[1020,348],[1022,348],[1021,348],[1017,348],[1023,359],[1018,348],[1019,360],[1012,348],[1013,348],[1014,348],[1015,348],[1016,348],[991,1],[1158,1],[768,1],[977,1],[372,361],[373,362],[83,1],[744,363],[740,1],[741,1],[739,1],[742,1],[743,1],[745,1],[737,1],[738,364],[746,365],[596,366],[453,1],[983,367],[1101,368],[1102,369],[1100,370],[1103,371],[1097,372],[1098,373],[1099,374],[1093,372],[1094,372],[1096,375],[1095,372],[1092,376],[438,377],[439,378],[343,379],[344,1],[341,380],[339,381],[345,382],[340,383],[342,384],[212,1],[371,385],[355,386],[356,386],[366,387],[367,388],[369,389],[368,390],[370,391],[351,392],[347,393],[352,386],[353,394],[350,395],[349,393],[348,393],[346,396],[354,397],[359,96],[357,96],[361,398],[364,399],[360,400],[365,401],[362,398],[363,96],[191,402],[190,96],[193,403],[192,402],[98,404],[166,405],[165,406],[164,407],[103,408],[119,409],[117,410],[118,411],[104,412],[189,413],[89,1],[93,1],[91,414],[92,1],[96,415],[99,1],[116,416],[94,1],[111,417],[97,418],[112,419],[115,420],[113,420],[110,421],[90,1],[95,1],[114,422],[120,423],[108,1],[102,424],[100,425],[109,426],[106,427],[105,427],[101,428],[107,429],[185,430],[179,431],[172,432],[171,433],[180,434],[181,420],[173,435],[186,436],[167,437],[168,438],[169,439],[188,440],[170,433],[174,436],[175,441],[182,442],[183,418],[184,441],[187,420],[176,439],[121,443],[177,444],[178,445],[163,446],[161,447],[162,447],[125,447],[126,447],[127,447],[128,447],[129,447],[130,447],[131,447],[132,447],[133,447],[153,447],[134,447],[135,447],[136,447],[137,447],[138,447],[139,447],[160,447],[140,447],[141,447],[142,447],[143,447],[158,447],[144,447],[159,447],[145,447],[156,447],[157,447],[146,447],[147,447],[148,447],[154,447],[155,447],[149,447],[150,447],[151,447],[152,447],[124,448],[123,449],[122,450],[88,1],[520,1],[981,451],[982,452],[1091,1],[597,453],[672,454],[671,455],[670,456],[673,1],[749,457],[748,1],[752,458],[750,459],[593,460],[751,461],[674,462],[747,463],[736,464],[676,465],[677,465],[678,465],[679,465],[680,465],[733,465],[681,465],[682,465],[683,465],[684,465],[685,465],[686,465],[687,465],[688,465],[732,465],[689,465],[690,465],[691,465],[692,465],[693,465],[694,465],[695,465],[696,465],[697,465],[698,465],[699,465],[700,465],[735,465],[701,465],[702,465],[703,465],[704,465],[705,465],[706,465],[707,465],[708,465],[709,465],[710,465],[711,465],[712,465],[734,465],[713,465],[714,465],[715,465],[716,465],[717,465],[718,465],[719,465],[720,465],[721,465],[722,465],[723,465],[724,465],[725,465],[726,465],[727,465],[728,465],[729,465],[730,465],[731,465],[675,466],[668,467],[669,468],[1090,469],[1071,470],[1068,199],[1070,471],[1069,1],[1074,1],[1075,472],[980,473],[1105,474],[1104,475],[1037,476],[1036,477],[990,478],[1156,1],[1038,1],[1078,307],[81,479],[80,1],[660,480],[646,481],[657,482],[630,1],[648,483],[647,1],[649,484],[655,485],[654,1],[631,1],[652,1],[653,1],[639,486],[634,1],[633,487],[632,1],[641,1],[658,488],[637,486],[640,1],[645,1],[638,486],[635,487],[636,1],[642,487],[643,487],[656,1],[651,1],[659,1],[650,1],[661,1],[644,1],[662,489],[663,489],[667,490],[664,491],[665,492],[666,491],[78,1],[79,1],[13,1],[15,1],[14,1],[2,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[3,1],[24,1],[25,1],[4,1],[26,1],[30,1],[27,1],[28,1],[29,1],[31,1],[32,1],[33,1],[5,1],[34,1],[35,1],[36,1],[37,1],[6,1],[41,1],[38,1],[39,1],[40,1],[42,1],[7,1],[43,1],[48,1],[49,1],[44,1],[45,1],[46,1],[47,1],[8,1],[53,1],[50,1],[51,1],[52,1],[54,1],[9,1],[55,1],[56,1],[57,1],[59,1],[58,1],[60,1],[61,1],[10,1],[62,1],[63,1],[64,1],[11,1],[65,1],[66,1],[67,1],[68,1],[69,1],[1,1],[70,1],[71,1],[12,1],[75,1],[73,1],[77,1],[72,1],[76,1],[74,1],[211,1],[1039,493],[448,494],[449,495],[452,496],[447,1],[450,494],[451,494],[446,1]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.8.3"} \ No newline at end of file diff --git a/grafast/ruru/bundle/ruru.min.js b/grafast/ruru/bundle/ruru.min.js new file mode 100644 index 0000000000..2623e60dfd --- /dev/null +++ b/grafast/ruru/bundle/ruru.min.js @@ -0,0 +1,2 @@ +/*! For license information please see ruru.min.js.LICENSE.txt */ +var RuruBundle;(()=>{var e,t,n={48:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5198),o=n(8255),i=n(2114);function a(e){return{Field(t){const n=e.getType(),a=t.selectionSet;if(n)if((0,i.zf)((0,i.MR)(n))){if(a){const i=t.name.value,s=(0,r.N)(n);e.reportError(new o.eO(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,a))}}else if(!a){const i=t.name.value,a=(0,r.N)(n);e.reportError(new o.eO(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,t))}}}}},62:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},79:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAACJEAA4AAAAARTQAACHrAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGkAbjgwcgTAGYACDFBEMCuQQ1CoLg3oAATYCJAOHcAQgBYMyByAbYTpFB2LYOAAQ8m8bRbBxQATaNIqSwUgH/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iKAUf8UgSGFL+xk3sfoazJ7FvI12FXSQb/30eATj5205q3t1zP/TB890b3U1ENbmWqOJHoz8qyYjSYxNxHuKpf0ey2ym23hUewmV7k6lOVPKdGo9BbuRQDFjebbR4mecNb2KSVbIH5PH+E25xAkaTFb3A8O3BBNP8M+ICMN2+m2OtctHvV6x7WsRJQSO78BwCEdxvbcWhivmaLZsYw2tgYP8iMTKe+y6Istei5WrajpD6r3fph9f6o7v0NF2BgmJ4HNalKjnWNYv6mv9NekL2jdbBM/Q2tki+FmUCCw9XTwjyraS4Tn8mS1GHOAdIlHSeHg8jGpaNRtRlC1PNjYw7giUooO2Ij7wGhGC39G8iWib2SuzCSBaiIEvYYrIIR6+jBgiMlFKVZ+sRHPd6CBPSttlmoXIVUQa8ZsrhPgjqugBxFXtBcTWNwcQWUQXpFqoua8lWoneQ5+oMVA1/vn4dTXXPWpEr/JBIMBAC0kBiOLOYAkMdiCSfLixaDjUqQA8AakHIiu0B4YhtwdOW+WwhB5EmvYJpPD9hmIEfmL/zykhb39xYsTKpMyAHn3WRZmzFMlvlSiqT1fJIuhyW0dIzPEt1jNEHiUroqTLHnlkosJXivVcyHSVecx+vHGyJHGVKVyiOBHqBZWf9YAl7Axx0JPrFXTrDJmyrH5BU9PF01katXszpbKwggVzuG6oTapwO4ouWeliQAvdKMmr5BnYnjtX9hx58hO6TkUfSA8ONAcUT6QEAAAA"},99:(e,t,n)=>{"use strict";n.d(t,{R:()=>a});var r=n(8255),o=n(2455),i=n(5261);function a(e){return{OperationDefinition(t){if("subscription"===t.operation){const n=e.getSchema(),a=n.getSubscriptionType();if(a){const s=t.name?t.name.value:null,l=Object.create(null),c=e.getDocument(),u=Object.create(null);for(const e of c.definitions)e.kind===o.b.FRAGMENT_DEFINITION&&(u[e.name.value]=e);const{fields:d}=(0,i._)(n,u,l,a,t.selectionSet);if(d.size>1){const t=[...d.values()].slice(1).flat();e.reportError(new r.eO(null!=s?`Subscription "${s}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",t))}for(const t of d.values())t[0].name.value.startsWith("__")&&e.reportError(new r.eO(null!=s?`Subscription "${s}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",t))}}}}}},190:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=Object.assign||function(e){for(var t=1;t0?""+a+s:a;var c=r.type.toString(),d={kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:t}},type:(0,l.parseType)(c),directives:[]},f=void 0,p={};if(null!=n){var h=(0,l.visit)(n,{Variable:function(t){var n,r=t.name.value,o=(n=r,(e.props.definition.variableDefinitions||[]).find((function(e){return e.variable.name.value===n})));if(p[r]=p[r]+1||1,o)return o.defaultValue}}),m="NonNullType"===d.type.kind?i({},d,{type:d.type.type}):d;f=i({},m,{defaultValue:h})}else f=d;var g=Object.entries(p).filter((function(e){var t=o(e,2);return t[0],t[1]<2})).map((function(e){var t=o(e,2),n=t[0];return t[1],n}));if(f){var v=e.props.setArgValue(f,!1);if(v){var y=v.definitions.find((function(t){return!!(t.operation&&t.name&&t.name.value&&e.props.definition.name&&e.props.definition.name.value)&&t.name.value===e.props.definition.name.value})),b=[].concat(u(y.variableDefinitions||[]),[f]).filter((function(e){return-1===g.indexOf(e.variable.name.value)})),A=i({},y,{variableDefinitions:b}),w=v.definitions.map((function(e){return y===e?A:e})),x=i({},v,{definitions:w});e.props.onCommit(x)}}}()},style:a.styles.actionButtonStyle},s.createElement("span",{style:{color:a.colors.variable}},"$")):null;return s.createElement("div",{style:{cursor:"pointer",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-arg-name":r.name,"data-arg-type":c.name,className:"graphiql-explorer-"+r.name},s.createElement("span",{style:{cursor:"pointer"},onClick:function(t){var r=!n;r?e.props.addArg(!0):e.props.removeArg(!0),e.setState({displayArgActions:r})}},(0,l.isInputObjectType)(c)?s.createElement("span",null,n?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):s.createElement(A,{checked:!!n,styleConfig:this.props.styleConfig}),s.createElement("span",{style:{color:a.colors.attribute},title:r.description,onMouseEnter:function(){null!=n&&e.setState({displayArgActions:!0})},onMouseLeave:function(){return e.setState({displayArgActions:!1})}},r.name,x(r)?"*":"",": ",h," ")," "),d||s.createElement("span",null)," ")}}]),t}(s.PureComponent),I=function(e){function t(){var e,n,r;d(this,t);for(var o=arguments.length,i=Array(o),a=0;a0&&e.setState({displayFieldActions:!0})},onMouseLeave:function(){return e.setState({displayFieldActions:!1})}},(0,l.isObjectType)(f)?s.createElement("span",null,d?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):null,(0,l.isObjectType)(f)?null:s.createElement(A,{checked:!!d,styleConfig:this.props.styleConfig}),s.createElement("span",{style:{color:c.colors.property},className:"graphiql-explorer-field-view"},r.name),this.state.displayFieldActions?s.createElement("button",{type:"submit",className:"toolbar-button",title:"Extract selections into a new reusable fragment",onClick:function(t){t.preventDefault(),t.stopPropagation();var n=f.name+"Fragment",r=(m||[]).filter((function(e){return e.name.value.startsWith(n)})).length;r>0&&(n=""+n+r);var o=d&&d.selectionSet?d.selectionSet.selections:[],a=[{kind:"FragmentSpread",name:{kind:"Name",value:n},directives:[]}],s={kind:"FragmentDefinition",name:{kind:"Name",value:n},typeCondition:{kind:"NamedType",name:{kind:"Name",value:f.name}},directives:[],selectionSet:{kind:"SelectionSet",selections:o}},l=e._modifyChildSelections(a,!1);if(l){var c=i({},l,{definitions:[].concat(u(l.definitions),[s])});e.props.onCommit(c)}else console.warn("Unable to complete extractFragment operation")},style:i({},c.styles.actionButtonStyle)},s.createElement("span",null,"…")):null),d&&p.length?s.createElement("div",{style:{marginLeft:16},className:"graphiql-explorer-graphql-arguments"},p.map((function(t){return s.createElement(N,{key:t.name,parentField:r,arg:t,selection:d,modifyArguments:e._setArguments,getDefaultScalarArgValue:e.props.getDefaultScalarArgValue,makeDefaultArg:e.props.makeDefaultArg,onRunOperation:e.props.onRunOperation,styleConfig:e.props.styleConfig,onCommit:e.props.onCommit,definition:e.props.definition})}))):null);if(d&&((0,l.isObjectType)(f)||(0,l.isInterfaceType)(f)||(0,l.isUnionType)(f))){var v=(0,l.isUnionType)(f)?{}:f.getFields(),y=d&&d.selectionSet?d.selectionSet.selections:[];return s.createElement("div",{className:"graphiql-explorer-"+r.name},g,s.createElement("div",{style:{marginLeft:16}},m?m.map((function(t){var n=o.getType(t.typeCondition.name.value),r=t.name.value;return n?s.createElement(L,{key:r,fragment:t,selections:y,modifySelections:e._modifyChildSelections,schema:o,styleConfig:e.props.styleConfig,onCommit:e.props.onCommit}):null})):null,Object.keys(v).sort().map((function(n){return s.createElement(t,{key:n,field:v[n],selections:y,modifySelections:e._modifyChildSelections,schema:o,getDefaultFieldNames:a,getDefaultScalarArgValue:e.props.getDefaultScalarArgValue,makeDefaultArg:e.props.makeDefaultArg,onRunOperation:e.props.onRunOperation,styleConfig:e.props.styleConfig,onCommit:e.props.onCommit,definition:e.props.definition,availableFragments:e.props.availableFragments})})),(0,l.isInterfaceType)(f)||(0,l.isUnionType)(f)?o.getPossibleTypes(f).map((function(t){return s.createElement(I,{key:t.name,implementingType:t,selections:y,modifySelections:e._modifyChildSelections,schema:o,getDefaultFieldNames:a,getDefaultScalarArgValue:e.props.getDefaultScalarArgValue,makeDefaultArg:e.props.makeDefaultArg,onRunOperation:e.props.onRunOperation,styleConfig:e.props.styleConfig,onCommit:e.props.onCommit,definition:e.props.definition})})):null))}return g}}]),t}(s.PureComponent),P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",variableDefinitions:[],name:{kind:"Name",value:"MyQuery"},directives:[],selectionSet:{kind:"SelectionSet",selections:[]}}]},j=null;var V={buttonStyle:{fontSize:"1.2em",padding:"0px",backgroundColor:"white",border:"none",margin:"5px 0px",height:"40px",width:"100%",display:"block",maxWidth:"none"},actionButtonStyle:{padding:"0px",backgroundColor:"white",border:"none",margin:"0px",maxWidth:"none",height:"15px",width:"15px",display:"inline-block",fontSize:"smaller"},explorerActionsStyle:{margin:"4px -8px -8px",paddingLeft:"8px",bottom:"0px",width:"100%",textAlign:"center",background:"none",borderTop:"none",borderBottom:"none"}},q=function(e){function t(){var e,n,r;d(this,t);for(var o=arguments.length,a=Array(o),s=0;s{"use strict";var r=n(1761),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}},354:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var r=n(8255);function o(e){const t=e.getSchema(),n=Object.create(null),o=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){var i;const a=null!==(i=t.operationTypes)&&void 0!==i?i:[];for(const t of a){const i=t.operation,a=n[i];o[i]?e.reportError(new r.eO(`Type for ${i} already defined in the schema. It cannot be redefined.`,t)):a?e.reportError(new r.eO(`There can be only one ${i} type in schema.`,[a,t])):n[i]=t}return!1}}},377:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6758),o=n.n(r),i=n(935),a=n.n(i)()(o());a.push([e.id,'.mermaid {\n background-color: white;\n}\n.explainExpandedContainer {\n position: absolute;\n top: 1rem;\n left: 1rem;\n bottom: 1rem;\n right: 1rem;\n border-radius: 1rem;\n background-color: white;\n border: 1px solid black;\n box-shadow: rgba(0, 0, 0, 0.8) 3px 3px 15px;\n overflow: hidden;\n padding: 1rem;\n z-index: 1000;\n font-family: "Roboto", sans-serif;\n}\n.explainExpandedTitle {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 2rem;\n text-align: center;\n font-size: 1.5rem;\n}\n.explainExpandedCloseContainer {\n position: absolute;\n top: 0;\n right: 0;\n}\n.explainExpandedCloseButton {\n font-size: 2rem;\n padding: 0;\n margin: 0;\n background: transparent;\n border: none;\n outline: none;\n width: 2rem;\n height: 2rem;\n}\n.explainExpandedMain {\n overflow: auto;\n position: absolute;\n top: 2rem;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.errorPopup {\n position: absolute;\n top: 10px;\n right: 10px;\n background-color: #ff9999;\n color: black;\n border: 1px solid black;\n border-radius: 7;\n width: 20rem;\n max-width: 90vw;\n}\n.errorPopupClose {\n float: right;\n background: transparent;\n border: none;\n margin-left: 10px;\n margin-bottom: 10px;\n}\n.errorPopupError {\n padding: 10px;\n}\n\n.explain-plan,\n.explain-sql {\n font-size: 0.75rem;\n white-space: pre-wrap;\n}\n',""]);const s=a},424:(e,t,n)=>{"use strict";n.d(t,{UY:()=>d,XO:()=>u,YR:()=>l,oP:()=>c,sP:()=>s});var r=n(5198),o=n(3217),i=n(9762),a=n(2455);const s=Object.freeze({});function l(e,t,n=i.aD){const l=new Map;for(const e of Object.values(a.b))l.set(e,u(t,e));let c,d,f,p,h=Array.isArray(e),m=[e],g=-1,v=[];const y=[],b=[];let A=e;do{g++;const e=g===m.length,a=e&&0!==v.length;if(e){if(f=0===b.length?void 0:y[y.length-1],d=p,p=b.pop(),a)if(h){d=d.slice();let e=0;for(const[t,n]of v){const r=t-e;null===n?(d.splice(r,1),e++):d[r]=n}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[e,t]of v)d[e]=t}g=c.index,m=c.keys,v=c.edits,h=c.inArray,c=c.prev}else{if(f=p?h?g:m[g]:void 0,d=p?p[f]:A,null==d)continue;p&&y.push(f)}let u;if(!Array.isArray(d)){var w,x;(0,i.Ll)(d)||(0,o.U)(!1,`Invalid AST Node: ${(0,r.N)(d)}.`);const n=e?null===(w=l.get(d.kind))||void 0===w?void 0:w.leave:null===(x=l.get(d.kind))||void 0===x?void 0:x.enter;if(u=null==n?void 0:n.call(t,d,f,p,y,b),u===s)break;if(!1===u){if(!e){y.pop();continue}}else if(void 0!==u&&(v.push([f,u]),!e)){if(!(0,i.Ll)(u)){y.pop();continue}d=u}}var E;void 0===u&&a&&v.push([f,d]),e?y.pop():(c={inArray:h,index:g,keys:m,edits:v,prev:c},h=Array.isArray(d),m=h?d:null!==(E=n[d.kind])&&void 0!==E?E:[],g=-1,v=[],p&&b.push(p),p=d)}while(void 0!==c);return 0!==v.length&&(A=v[v.length-1][1]),A}function c(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(a.b)){let o=!1;const i=new Array(e.length).fill(void 0),a=new Array(e.length).fill(void 0);for(let t=0;t{"use strict";n.d(t,{A:()=>s,I:()=>a});var r=n(3217),o=n(8255),i=n(5881);function a(e){if(null!=e||(0,r.U)(!1,"Must provide name."),"string"==typeof e||(0,r.U)(!1,"Expected name to be a string."),0===e.length)throw new o.eO("Expected name to be a non-empty string.");for(let t=1;t{!function(e){"use strict";function t(t){return function(n,r){var o=r.line,i=n.getLine(o);function a(t){for(var a,s=r.ch,l=0;;){var c=s<=0?-1:i.lastIndexOf(t[0],s-1);if(-1!=c){if(1==l&&ct.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var o=n,i=Math.min(t.lastLine(),n+10);o<=i;++o){var a=t.getLine(o).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(o,a)}}}var o,i=n.line,a=r(i);if(!a||r(i-1)||(o=r(i-2))&&o.end.line==i-1)return null;for(var s=a.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(i,a.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(nt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var o=n.line,i=r(o);if(null==i||null!=r(o-1))return null;for(var a=o;null!=r(a+1);)++a;return{from:e.Pos(o,i+1),to:t.clipPos(e.Pos(a))}}))}(n(1448))},656:(e,t,n)=>{"use strict";n.d(t,{C:()=>i});var r=n(1306),o=n(8255);function i(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const e=t.pop();e||(0,r.V)(!1),n=e}},ObjectField(t){const r=t.name.value;n[r]?e.reportError(new o.eO(`There can be only one input field named "${r}".`,[n[r],t.name])):n[r]=t.name}}}},698:(e,t,n)=>{"use strict";function r(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}n.d(t,{z:()=>r})},792:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});const r=function(e,t){return e instanceof t}},825:(e,t,n)=>{"use strict";n.d(t,{P:()=>l,W:()=>c});var r=n(4833),o=n(6382),i=n(8255),a=n(2455),s=n(7274);function l(e){return{...c(e),Argument(t){const n=e.getArgument(),a=e.getFieldDef(),s=e.getParentType();if(!n&&a&&s){const n=t.name.value,l=a.args.map((e=>e.name)),c=(0,o.x)(n,l);e.reportError(new i.eO(`Unknown argument "${n}" on field "${s.name}.${a.name}".`+(0,r.a)(c),t))}}}}function c(e){const t=Object.create(null),n=e.getSchema(),l=n?n.getDirectives():s.rc;for(const e of l)t[e.name]=e.args.map((e=>e.name));const c=e.getDocument().definitions;for(const e of c)if(e.kind===a.b.DIRECTIVE_DEFINITION){var u;const n=null!==(u=e.arguments)&&void 0!==u?u:[];t[e.name.value]=n.map((e=>e.name.value))}return{Directive(n){const a=n.name.value,s=t[a];if(n.arguments&&s)for(const t of n.arguments){const n=t.name.value;if(!s.includes(n)){const l=(0,o.x)(n,s);e.reportError(new i.eO(`Unknown argument "${n}" on directive "@${a}".`+(0,r.a)(l),t))}}return!1}}}},855:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1051:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAChwAA4AAAAATiAAACgaAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGoFOG5JCHDYGYACCWBEMCvMI3BYLg1oAATYCJAOHMAQgBYJ0ByAb3T9FB2LYOAAglrxtJELYOABUw9YoSngMI/i/TLCNmT9WC4twiJLUlJ4ZsavRKHQioGS7EZWN5R0c4mDd73UtXuPfCFPxnHBrr4UHwI2QxsTy0Gf39Lenq3r2Q86ISI4AhQAjOSZ0cuLtTh/wc/t7G2OAVAlKlE0IH3UWWEikEtkDRouAlCM2cpISggx6Q2QjxQDpEPWDYmA0qnA54AllfYjT7acZJE5FHIaeqe7u0+U7KziYWUlWALgDrKmPdvfAwLqzjB9PmkZnd5LdhuqkDxdVXiog6TaEdf5+bmNxo2RClesqX45FKA16JYo9+TLH/k9n2c4Y3lp3F2AoSuyuqfJSpehmvrRjzcgyyAuiIzkkH0o+AsOSd4NduAcgewNeCDBXTK9PmzJVmbbeqwJY1G14eDsxfr34S6EKQ/v5y+DSHC+Fk2Vg812FqjCRwf9/+/3q3DX76fmYDMlXJzRqNLmIaiISCpUYxXQMtQS1Z5fhw6w/x/JH7TplkV6YVG8o/eNPqQKFG4BHoIg7AwehRRdCnz6EsRsQpsygWbOBcOIM4coVwos3RIBgiDDhEJEIEHHiIBIlQ6TLgCAiQuTIgSAjQ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HifFWnnLWk/hTMYCf2oD0YIgCOkomGc8UAD3gFnXlwpag8qGAly5NzwX5ga2MlerRddpWBG047YUdBGdrDYXUvLgA="},1070:(e,t,n)=>{"use strict";function r(e){return"object"==typeof e&&null!==e}n.d(t,{Z:()=>r})},1085:(e,t,n)=>{"use strict";e.exports=n(3335)},1098:(e,t,n)=>{"use strict";const{deleteProperty:r}=Reflect,o=n(5858),i=n(2685),a=e=>"object"==typeof e&&null!==e||"function"==typeof e,s=e=>{if(!o(e))throw new TypeError("Object keys must be strings or symbols");if((e=>"__proto__"===e||"constructor"===e||"prototype"===e)(e))throw new Error(`Cannot set unsafe key: "${e}"`)},l=(e,t)=>t&&"function"==typeof t.split?t.split(e):"symbol"==typeof e?[e]:Array.isArray(e)?e:((e,t,n)=>{const r=(e=>Array.isArray(e)?e.flat().map(String).join(","):e)(t?((e,t)=>{if("string"!=typeof e||!t)return e;let n=e+";";return void 0!==t.arrays&&(n+=`arrays=${t.arrays};`),void 0!==t.separator&&(n+=`separator=${t.separator};`),void 0!==t.split&&(n+=`split=${t.split};`),void 0!==t.merge&&(n+=`merge=${t.merge};`),void 0!==t.preservePaths&&(n+=`preservePaths=${t.preservePaths};`),n})(e,t):e);s(r);const o=u.cache.get(r)||n();return u.cache.set(r,o),o})(e,t,(()=>((e,t={})=>{const n=t.separator||".",r="/"!==n&&t.preservePaths;if("string"==typeof e&&!1!==r&&/\//.test(e))return[e];const o=[];let i="";const a=e=>{let t;""!==e.trim()&&Number.isInteger(t=Number(e))?o.push(t):o.push(e)};for(let t=0;t{if(s(t),void 0===n)r(e,t);else if(o&&o.merge){const r="function"===o.merge?o.merge:Object.assign;r&&i(e[t])&&i(n)?e[t]=r(e[t],n):e[t]=n}else e[t]=n;return e},u=(e,t,n,r)=>{if(!t||!a(e))return e;const o=l(t,r);let i=e;for(let e=0;e{u.cache=new Map},e.exports=u},1262:(e,t,n)=>{"use strict";function r(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",o=t.directiveIsRepeatable?"isRepeatable":"";function i(e){return t.inputValueDeprecation?e:""}return`\n query IntrospectionQuery {\n __schema {\n ${t.schemaDescription?n:""}\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ${n}\n ${o}\n locations\n args${i("(includeDeprecated: true)")} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${n}\n ${r}\n fields(includeDeprecated: true) {\n name\n ${n}\n args${i("(includeDeprecated: true)")} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${i("(includeDeprecated: true)")} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${n}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${n}\n type { ...TypeRef }\n defaultValue\n ${i("isDeprecated")}\n ${i("deprecationReason")}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n `}n.d(t,{I:()=>r})},1298:(e,t,n)=>{!function(e){"use strict";var t={},n=/[^\s\u00a0]/,r=e.Pos,o=e.cmpPos;function i(e){var t=e.search(n);return-1==t?0:t}function a(e,t){var n=e.getMode();return!1!==n.useInnerComments&&n.innerMode?e.getModeAt(t):n}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=t);for(var n=this,o=1/0,i=this.listSelections(),a=null,s=i.length-1;s>=0;s--){var l=i[s].from(),c=i[s].to();l.line>=o||(c.line>=o&&(c=r(o,0)),o=l.line,null==a?n.uncomment(l,c,e)?a="un":(n.lineComment(l,c,e),a="line"):"un"==a?n.uncomment(l,c,e):n.lineComment(l,c,e))}})),e.defineExtension("lineComment",(function(e,o,s){s||(s=t);var l,c,u=this,d=a(u,e),f=u.getLine(e.line);if(null!=f&&(l=e,c=f,!/\bstring\b/.test(u.getTokenTypeAt(r(l.line,0)))||/^[\'\"\`]/.test(c))){var p=s.lineComment||d.lineComment;if(p){var h=Math.min(0!=o.ch||o.line==e.line?o.line+1:o.line,u.lastLine()+1),m=null==s.padding?" ":s.padding,g=s.commentBlankLines||e.line==o.line;u.operation((function(){if(s.indent){for(var t=null,o=e.line;oa.length)&&(t=a)}for(o=e.line;of||l.operation((function(){if(0!=s.fullLines){var t=n.test(l.getLine(f));l.replaceRange(p+d,r(f)),l.replaceRange(u+p,r(e.line,0));var a=s.blockCommentLead||c.blockCommentLead;if(null!=a)for(var h=e.line+1;h<=f;++h)(h!=f||t)&&l.replaceRange(a+p,r(h,0))}else{var m=0==o(l.getCursor("to"),i),g=!l.somethingSelected();l.replaceRange(d,i),m&&l.setSelection(g?i:l.getCursor("from"),i),l.replaceRange(u,e)}}))}}else(s.lineComment||c.lineComment)&&0!=s.fullLines&&l.lineComment(e,i,s)})),e.defineExtension("uncomment",(function(e,o,i){i||(i=t);var s,l=this,c=a(l,e),u=Math.min(0!=o.ch||o.line==e.line?o.line:o.line-1,l.lastLine()),d=Math.min(e.line,u),f=i.lineComment||c.lineComment,p=[],h=null==i.padding?" ":i.padding;e:if(f){for(var m=d;m<=u;++m){var g=l.getLine(m),v=g.indexOf(f);if(v>-1&&!/comment/.test(l.getTokenTypeAt(r(m,v+1)))&&(v=-1),-1==v&&n.test(g))break e;if(v>-1&&n.test(g.slice(0,v)))break e;p.push(g)}if(l.operation((function(){for(var e=d;e<=u;++e){var t=p[e-d],n=t.indexOf(f),o=n+f.length;n<0||(t.slice(o,o+h.length)==h&&(o+=h.length),s=!0,l.replaceRange("",r(e,n),r(e,o)))}})),s)return!0}var y=i.blockCommentStart||c.blockCommentStart,b=i.blockCommentEnd||c.blockCommentEnd;if(!y||!b)return!1;var A=i.blockCommentLead||c.blockCommentLead,w=l.getLine(d),x=w.indexOf(y);if(-1==x)return!1;var E=u==d?w:l.getLine(u),C=E.indexOf(b,u==d?x+y.length:0),k=r(d,x+1),T=r(u,C+1);if(-1==C||!/comment/.test(l.getTokenTypeAt(k))||!/comment/.test(l.getTokenTypeAt(T))||l.getRange(k,T,"\n").indexOf(b)>-1)return!1;var S=w.lastIndexOf(y,e.ch),N=-1==S?-1:w.slice(0,e.ch).indexOf(b,S+y.length);if(-1!=S&&-1!=N&&N+b.length!=e.ch)return!1;N=E.indexOf(b,o.ch);var D=E.slice(o.ch).lastIndexOf(y,N-o.ch);return S=-1==N||-1==D?-1:o.ch+D,(-1==N||-1==S||S==o.ch)&&(l.operation((function(){l.replaceRange("",r(u,C-(h&&E.slice(C-h.length,C)==h?h.length:0)),r(u,C+b.length));var e=x+y.length;if(h&&w.slice(e,e+h.length)==h&&(e+=h.length),l.replaceRange("",r(d,x),r(d,e)),A)for(var t=d+1;t<=u;++t){var o=l.getLine(t),i=o.indexOf(A);if(-1!=i&&!n.test(o.slice(0,i))){var a=i+A.length;h&&o.slice(a,a+h.length)==h&&(a+=h.length),l.replaceRange("",r(t,i),r(t,a))}}})),!0)}))}(n(1448))},1306:(e,t,n)=>{"use strict";function r(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,{V:()=>r})},1427:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAABK8AA4AAAAAIgAAABJmAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbi3YcNgZgAIFkEQwKqUCgdAuBSAABNgIkA4MMBCAFgwAHIBv5G7MREWwcAAjqiQT/ZYJtzPyxTqRrsF1IYVrRiFiApETA1++dMFq11kZtOhdxHMTvna14XthLn3dGSDLLg/3yf+feJLvv07tDOZClulqMQCikLU04jMMxKJjN/62Zf2Zn6Q/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e8sccFZfoUCTnjmQNeWeeTkHHqfBGyQ4tNDtllhbOEVkLICseUKdJjnga1hJArhlRY55R7SuwzyQl1aomOJguYCS6JuCPiicf4b2aDh5FUKviWM/SZdr6UvaAdzAXtf9Y0xqwAAAAAUABsAK0AxgDeAPYBGAExAVwBfgGwAdcB/wISAjECSAJeAooCtgLrAvwDHAMvA2EDkwObA6MDqwOzA8oD0gPaA+IEGwQjBCsEQQRJBFEEbAR0BHwEhASiBKoEsgTtBPUFHgVXBWMFbwV7BYcFkwWfBasFtgXBBdQF9QX9BjYGbAaMBqsGzQcBByoHNgdBB3kHgQezB7sH7Af5CAYISgiTCL4JCglJCYgJtgnxChEKPgpqCnIKkgrlCu0LHAtOC4kLwQvuDBcMWAyIDLsNAQ0MDRcNIg0tDTgNQw1ODVkNZA1vDXoNlw23DeMOEQ4eDisOXg6eDsgO/Q8zD4cP2hAXEF8QtRDyETwRahFyEXoRghGqEeQR7BIIEjUSPhJGEk4SgRKJEpESmxKqErIS2BLvEvgTExMiEzETXxNnAAB42mNgZGBgmMfExpDAUMHABeYhADMDCwAlBwGSeNqUkMVZhDEQQB/uXHHIDXd354Lrdd3ldxwKoJatgQKogG6QfIPrRl8yPkAl1xRRUFwB5EC4gFZywoXUcidcxAL3wsX0FdQLl9BYsCZcSleBX7iWkYIbNBdAdcGtsPbJMgYmZ9gkiBHHRTHEAIOM0MsT6a04IE4ExRoJbAIobRnWfzvYGCSfOKTtF/FwiWNg46Do0H5dTBym6KefGAmt4RGkjxAGGfpxMcjikOKMfiTSa5zOb2NvvOa9R+SJPNIEsBmljwGd/TTLHLDC0hN99vlm3fvJ/vdY6pP2ERFsHBK6AvUWPY+I0iPpkEMImwQmLg592neaPgxsYvSzzRobPC6cIRVmHgCRt1ftAHjaY2BmAIP/cxiMgBQjAxoAACqUAdIAAA=="},1448:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,s=a&&(r?document.documentMode||6:+(i||o)[1]),l=!i&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!i&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=g||/Mac/.test(t),A=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,l=!0);var E=b&&(c||f&&(null==x||x<12.11)),C=n||a&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,S=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function D(e,t){return N(e).appendChild(t)}function O(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(P=function(e){try{e.select()}catch(e){}});var Y=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};function W(e,t){for(var n=0;n=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var J=[""];function _(e){for(;J.length<=e;)J.push($(J)+" ");return J[e]}function $(e){return e[e.length-1]}function ee(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function ie(e,t){return t?!!(t.source.indexOf("\\w")>-1&&oe(e))||t.test(e):oe(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var se=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(e){return e.charCodeAt(0)>=768&&se.test(e)}function ce(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var de=null;function fe(e,t,n){var r;de=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:de=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:de=o)}return null!=r?r:de}var pe=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l,c="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u=a.length,d=[],f=0;f-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function be(e,t){var n=ve(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function Ee(e){e.prototype.on=function(e,t){ge(this,e,t)},e.prototype.off=function(e,t){ye(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Te(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){Ce(e),ke(e)}function Ne(e){return e.target||e.srcElement}function De(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Ie,Le=function(){if(a&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==Oe){var t=O("span","​");D(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Oe?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Fe(e){if(null!=Ie)return Ie;var t=D(e,document.createTextNode("AخA")),n=T(t,0,1).getBoundingClientRect(),r=T(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Ie=r.right-n.right<3)}var Re,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},je=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ve="oncopy"in(Re=O("div"))||(Re.setAttribute("oncopy","return;"),"function"==typeof Re.oncopy),qe=null;var Be={},Ue={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=t}function He(e){if("string"==typeof e&&Ue.hasOwnProperty(e))e=Ue[e];else if(e&&"string"==typeof e.name&&Ue.hasOwnProperty(e.name)){var t=Ue[e.name];"string"==typeof t&&(t={name:t}),(e=ne(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return He("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return He("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=He(t);var n=Be[t.name];if(!n)return Ye(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var o=We[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var We={};function Ge(e,t){z(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function Qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Xe(e,t,n){return!e.startState||e.startState(t,n)}var Ke=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Je(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t=e.first&&tn?it(n,Je(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}(t,Je(e,t.line).text.length)}function pt(e,t){for(var n=[],r=0;r=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.post},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ht=function(e,t){this.state=e,this.lookAhead=t},mt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,r){var o=[e.state.modeGen],i={};kt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,s=function(r){n.baseTokens=o;var s=e.state.overlays[r],l=1,c=0;n.state=!0,kt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&o.splice(l,1,e,o[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Qe(e.doc.mode,r.state),i=gt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new mt(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var l=Je(i,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ht?c.lookAhead:0)<=i.modeFrontier))return s;var u=H(l.text,null,e.options.tabSize);(null==o||r>u)&&(o=s-1,r=u)}return o}(e,t,n),a=i>r.first&&Je(r,i-1).stateAfter,s=a?mt.fromSaved(r,a,i):new mt(r,Xe(r.mode),i);return r.iter(i,t,(function(n){bt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}mt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mt.fromSaved=function(e,t,n){return t instanceof ht?new mt(e,Qe(e.mode,t.state),n,t.lookAhead):new mt(e,Qe(e.mode,t),n)},mt.prototype.save=function(e){var t=!1!==e?Qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ht(t,this.maxLookAhead):t};var xt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Et(e,t,n,r){var o,i,a=e.doc,s=a.mode,l=Je(a,(t=ft(a,t)).line),c=yt(e,t.line,n),u=new Ke(l.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&bt(e,t,r,d.pos),d.pos=t.length,l=null):l=Ct(wt(n,d,r.state,f),i),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c=t:i.to>t);(r||(r=[])).push(new Nt(a,i.from,s?null:i.to))}}return r}(n,o,a),l=function(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&s)for(var b=0;bt)&&(!n||jt(n,i.marker)<0)&&(n=i.marker)}return n}function zt(e,t,n,r,o){var i=Je(e,t),a=St&&i.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(c.to,n)>=0:at(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(c.from,r)<=0:at(c.from,r)<0)))return!0}}}function Ht(e){for(var t;t=qt(e);)e=t.find(-1,!0).line;return e}function Yt(e,t){var n=Je(e,t),r=Ht(n);return n==r?t:tt(r)}function Wt(e,t){if(t>e.lastLine())return t;var n,r=Je(e,t);if(!Gt(e,r))return t;for(;n=Bt(r);)r=n.find(1,!0).line;return tt(r)+1}function Gt(e,t){var n=St&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Jt=function(e,t,n){this.text=e,Ft(this,t),this.height=n?n(this):1};function _t(e){e.parent=null,Mt(e)}Jt.prototype.lineNo=function(){return tt(this)},Ee(Jt);var $t={},en={};function tn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?en:$t;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function nn(e,t){var n=I("span",null,null,l?"padding-right: .1px":null),r={pre:I("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=on,Fe(e.display.measure)&&(a=he(i,e.doc.direction))&&(r.addToken=an(r.addToken,a)),r.map=[],ln(i,r,vt(e,i,t!=e.display.externalMeasured&&tt(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=R(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=R(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Me(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return be(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function rn(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function on(e,t,n,r,o,i,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;oc&&d.from<=c);f++);if(d.to>=u)return e(n,r,o,i,a,s,l);e(n,r.slice(0,d.to-c),o,i,null,s,l),i=null,r=r.slice(d.to-c),c=d.to}}}function sn(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function ln(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,c,u,d,f,p=o.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,A=0;Ah||x.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==h&&(u+=" "+x.startStyle),x.endStyle&&w.to==v&&(b||(b=[])).push(x.endStyle,w.to),x.title&&((f||(f={})).title=x.title),x.attributes)for(var E in x.attributes)(f||(f={}))[E]=x.attributes[E];x.collapsed&&(!d||jt(d.marker,x)<0)&&(d=w)}else w.from>h&&v>w.from&&(v=w.from)}if(b)for(var C=0;C=p)break;for(var T=Math.min(p,v);;){if(g){var S=h+g.length;if(!d){var N=S>T?g.slice(0,T-h):g;t.addToken(t,N,a?a+l:l,u,h+N.length==v?c:"",s,f)}if(S>=T){g=g.slice(T-h),h=T;break}h=S,u=""}g=o.slice(i,i=n[m++]),a=tn(n[m++],t.cm.options)}}else for(var D=1;Dn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Rn(e,t,n,r){return Vn(e,jn(e,t),n,r)}function Pn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=Un(t.map,n,r),l=i.node,c=i.start,u=i.end,d=i.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&le(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var p;c>0&&(d=r="right"),o=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var h=l.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+cr(e.display),top:h.top,bottom:h.bottom}:Bn}for(var m=o.top-t.rect.top,g=o.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(o=(i=l-s)-1,t>=l&&(a="right")),null!=o){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&o==l-s)for(;c=0&&(n=e[o]).left==n.right;o--);return n}function Hn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=fe(s,l,c),f=de,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function $n(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=cr(e.display)*t.ch);var r=Je(e.doc,t.line),o=Zt(r)+Nn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function er(e,t,n,r,o){var i=it(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function tr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return er(r.first,0,null,-1,-1);var o=nt(r,n),i=r.first+r.size-1;if(o>i)return er(r.first+r.size-1,Je(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=Je(r,o);;){var s=ir(e,a,o,t,n),l=Ut(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Je(r,o=c.line)}}function nr(e,t,n,r){r-=Zn(t);var o=t.text.length,i=ue((function(t){return Vn(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ue((function(t){return Vn(e,n,t).top>r}),i,o)}}function rr(e,t,n,r){return n||(n=jn(e,t)),nr(e,t,n,Xn(e,t,Vn(e,n,r),"line").top)}function or(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function ir(e,t,n,r,o){o-=Zt(t);var i=jn(e,t),a=Zn(t),s=0,l=t.text.length,c=!0,u=he(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?sr:ar)(e,t,n,i,u,r,o);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,g=ue((function(t){var n=Vn(e,i,t);return n.top+=a,n.bottom+=a,!!or(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=A.bottom?1:0}return er(n,g=ce(t.text,g,1),p,v,r-f)}function ar(e,t,n,r,o,i,a){var s=ue((function(s){var l=o[s],c=1!=l.level;return or(_n(e,it(n,c?l.to:l.from,c?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=_n(e,it(n,c?l.from:l.to,c?"after":"before"),"line",t,r);or(u,i,a,!0)&&u.top>a&&(l=o[s-1])}return l}function sr(e,t,n,r,o,i,a){var s=nr(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f=c||p.to<=l)){var h=Vn(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=hm)&&(u=p,d=m)}}return u||(u=o[o.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function lr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==qn){qn=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)qn.appendChild(document.createTextNode("x")),qn.appendChild(O("br"));qn.appendChild(document.createTextNode("x"))}D(e.measure,qn);var n=qn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function cr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),n=O("pre",[t],"CodeMirror-line-like");D(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ur(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:dr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function dr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function fr(e){var t=lr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/cr(e.display)-3);return function(o){if(Gt(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(l=Je(e.doc,c.line).text).length==c.ch){var u=H(l,l.length,e.options.tabSize)-l.length;c=it(c.line,Math.max(0,Math.round((i-On(e.display).left)/cr(e.display))-u))}return c}function mr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)St&&Yt(e.doc,t)o.viewFrom?yr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)yr(e);else if(t<=o.viewFrom){var i=br(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):yr(e)}else if(n>=o.viewTo){var a=br(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):yr(e)}else{var s=br(e,t,t,-1),l=br(e,n,n+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(un(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):yr(e)}var c=o.externalMeasured;c&&(n=o.lineN&&t=r.viewTo)){var i=r.view[mr(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==W(a,n)&&a.push(n)}}}function yr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function br(e,t,n,r){var o,i=mr(e,t),a=e.display.view;if(!St||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,n+=o}for(;Yt(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Ar(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||l.to().line0?a:e.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Cr(e,t){return e.top-t.top||e.left-t.left}function kr(e,t,n){var r=e.display,o=e.doc,i=document.createDocumentFragment(),a=On(e.display),s=a.left,l=Math.max(r.sizerWidth,Ln(e)-r.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var i,a,d=Je(o,t),f=d.text.length;function p(n,r){return Jn(e,it(t,n),"div",d,r)}function h(t,n,r){var o=rr(e,d,null,t),i="ltr"==n==("after"==r)?"left":"right";return p("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),i)[i]}var m=he(d,o.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;it||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,o,d){var g="ltr"==o,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,A=null==r&&t==f,w=0==d,x=!m||d==m.length-1;if(y.top-v.top<=3){var E=(c?A:b)&&x,C=(c?b:A)&&w?s:(g?v:y).left,k=E?l:(g?y:v).right;u(C,v.top,k-C,v.bottom)}else{var T,S,N,D;g?(T=c&&b&&w?s:v.left,S=c?l:h(e,o,"before"),N=c?s:h(t,o,"after"),D=c&&A&&x?l:y.right):(T=c?h(e,o,"before"):s,S=!c&&b&&w?l:v.right,N=!c&&A&&x?s:y.left,D=c?h(t,o,"after"):l),u(T,v.top,S-T,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Or(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Sr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Dr(e))}function Nr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Or(e))}),100)}function Dr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(be(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Tr(e))}function Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(be(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Ir(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,i=0,l=0;l.005||m<-.005)&&(oe.display.sizerWidth){var v=Math.ceil(f/cr(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(t.scroller.scrollTop+=i)}function Lr(e){if(e.widgets)for(var t=0;t=a&&(i=nt(t,Zt(Je(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Fr(e,t){var n=e.display,r=lr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Mn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+Dn(n),l=t.tops-r;if(t.topo+i){var u=Math.min(t.top,(c?s:t.bottom)-i);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Ln(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function Rr(e,t){null!=t&&(Vr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){Vr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function jr(e,t,n){null==t&&null==n||Vr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Vr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,qr(e,$n(e,t.from),$n(e,t.to),t.margin))}function qr(e,t,n,r){var o=Fr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});jr(e,o.scrollLeft,o.scrollTop)}function Br(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ho(e,{top:t}),Ur(e,t,!0),n&&ho(e),lo(e,100))}function Ur(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function zr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,vo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Hr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Dn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+In(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Yr=function(e,t,n){this.cm=n;var r=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),ge(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),ge(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Yr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Yr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Yr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Yr.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Y,this.disableVert=new Y},Yr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,r)}))},Yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Wr=function(){};function Gr(e,t){t||(t=Hr(e));var n=e.display.barWidth,r=e.display.barHeight;Qr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Ir(e),Qr(e,Hr(e)),n=e.display.barWidth,r=e.display.barHeight}function Qr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Zr={native:Yr,null:Wr};function Xr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Zr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ge(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?zr(e,t):Br(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Kr=0;function Jr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Kr,markArrays:null},t=e.curOp,dn?dn.ops.push(t):t.ownsGroup=dn={ops:[t],delayedCallbacks:[]}}function _r(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new uo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function eo(e){e.updatedDisplay=e.mustUpdate&&fo(e.cm,e.update)}function to(e){var t=e.cm,n=t.display;e.updatedDisplay&&Ir(t),e.barMeasure=Hr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Rn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+In(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ln(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function no(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(i.defaultView.innerHeight||i.documentElement.clientHeight)&&(o=!1),null!=o&&!m){var a=O("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Nn(e.display))+"px;\n height: "+(t.bottom-t.top+In(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,s=_n(e,t),l=n&&n!=t?_n(e,n):s,c=Fr(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Br(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(zr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,ft(r,e.scrollToPos.from),ft(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=yt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?Qe(t.mode,r.state):null,l=gt(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&fn)return lo(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&oo(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ar(e))return!1;yo(e)&&(yr(e),t.dims=ur(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),St&&(i=Yt(e.doc,i),a=Wt(e.doc,a));var s=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;(function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=un(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=un(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,mr(e,n)))),r.viewTo=n})(e,i,a),n.viewOffset=Zt(Je(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=Ar(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=M(V(e));if(!t||!L(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=B(e).getSelection();r.anchorNode&&r.extend&&L(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(p=!1),mn(e,f,u,n)),p&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ot(e.options,u)))),a=f.node.nextSibling}else{var h=xn(e,f,u,n);i.insertBefore(h,a)}u+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=M(q(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,lo(e,400)),n.updateLineNumbers=null,!0}function po(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ln(e))r&&(t.visible=Mr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Dn(e.display)-Mn(e),n.top)}),t.visible=Mr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!fo(e,t))break;Ir(e);var o=Hr(e);wr(e),Gr(e,o),go(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ho(e,t){var n=new uo(e,t);if(fo(e,n)){Ir(e),po(e,n);var r=Hr(e);wr(e),Gr(e,r),go(e,r),n.finish()}}function mo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",pn(e,"gutterChanged",e)}function go(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+In(e)+"px"}function vo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=dr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&y||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=bo(o.gutters,o.lineNumbers),Ao(i),r.init(i)}uo.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},uo.prototype.finish=function(){for(var e=0;ec.clientWidth,h=c.scrollHeight>c.clientHeight;if(o&&p||i&&h){if(i&&b&&l)e:for(var m=t.target,g=s.view;m!=c;m=m.parentNode)for(var v=0;v=0&&at(e,r.to())<=0)return n}return-1};var Do=function(e,t){this.anchor=e,this.head=t};function Oo(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=W(t,o);for(var i=1;i0:l>=0){var c=ut(s.from(),a.from()),u=ct(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=n&&--n,t.splice(--i,2,new Do(d?u:c,d?c:u))}}return new No(t,n)}function Io(e,t){return new No([new Do(e,t||e)],0)}function Lo(e){return e.text?it(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Mo(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return Lo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Lo(t).ch-t.to.ch),it(n,r)}function Fo(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}pn(e,"change",e,t)}function Bo(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Wo(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(o,o.lastOp==r)))a=$(i.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=Lo(t):i.changes.push(Yo(e,t));else{var l=$(o.done);for(l&&l.ranges||Zo(e.sel,o.done),i={changes:[Yo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||be(e,"historyAdded")}function Qo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,$(o.done),t))?o.done[o.done.length-1]=t:Zo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Wo(o.undone)}function Zo(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Xo(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Ko(e){if(!e)return null;for(var t,n=0;n-1&&($(s)[d]=c[d],delete c[d])}}}return r}function $o(e,t,n,r){if(r){var o=e.anchor;if(n){var i=at(t,o)<0;i!=at(n,o)<0?(o=t,t=n):i!=at(t,n)<0&&(t=n)}return new Do(o,t)}return new Do(n||t,t)}function ei(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ii(e,new No([$o(e.sel.primary(),t,n,o)],0),r)}function ti(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:s.to>t.ch))){if(o&&(be(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=fi(e,d,-r,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(f=at(d,n))&&(r<0?f<0:f>0))return ui(e,d,t,r,o)}var p=l.find(r<0?-1:1);return(r<0?c:u)&&(p=fi(e,p,r,p.line==t.line?i:null)),p?ui(e,p,t,r,o):null}}return t}function di(e,t,n,r,o){var i=r||1;return ui(e,t,n,i,o)||!o&&ui(e,t,n,i,!0)||ui(e,t,n,-i,o)||!o&&ui(e,t,n,-i,!0)||(e.cantEdit=!0,it(e.first,0))}function fi(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ft(e,it(t.line-1)):null:n>0&&t.ch==(r||Je(e,t.line)).text.length?t.line0)){var u=[l,1],d=at(c.from,s.from),f=at(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)gi(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else gi(e,t)}}function gi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=Fo(e,t);Go(e,t,n,e.cm?e.cm.curOp.id:NaN),bi(e,t,n,It(e,t));var r=[];Bo(e,(function(e,n){n||-1!=W(r,e.history)||(Ei(e.history,t),r.push(e.history)),bi(e,t,null,It(e,t))}))}}function vi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,c=0;c=0;--p){var h=f(p);if(h)return h.v}}}}function yi(e,t){if(0!=t&&(e.first+=t,e.sel=new No(ee(e.sel.ranges,(function(e){return new Do(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:it(i,Je(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_e(e,t.from,t.to),n||(n=Fo(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=tt(Ht(Je(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&we(e),qo(r,t,n,fr(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,(function(e){var t=Xt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=Je(e,r).stateAfter;if(o&&(!(o instanceof ht)||r+o.lookAhead1||!(this.children[0]instanceof ki))){var s=[];this.collapse(s),this.children=[new ki(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=I("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(zt(e,t.line,t,n,i)||t.line!=n.line&&zt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");St=!0}i.addToHistory&&Go(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&i.collapsed&&!c.options.lineWrapping&&Ht(r)==c.display.maxLine&&(s=!0),i.collapsed&&l!=t.line&&et(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new Nt(i,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Gt(e,t)&&et(t,0)})),i.clearOnEnter&&ge(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Tt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Di,i.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),i.collapsed)gr(c,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=n.line;u++)vr(c,u,"text");i.atomic&&li(c.doc),pn(c,"markerAdded",c,i)}return i}Oi.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Jr(e),xe(this,"clear")){var n=this.find();n&&pn(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&gr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&li(e.doc)),e&&pn(e,"markerCleared",e,this,r,o),t&&_r(e),this.parent&&this.parent.clear()}},Oi.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)mi(this,r[l]);s?oi(this,s):this.cm&&Pr(this.cm)})),undo:so((function(){vi(this,"undo")})),redo:so((function(){vi(this,"redo")})),undoSelection:so((function(){vi(this,"undo",!0)})),redoSelection:so((function(){vi(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=ft(this,e),t=ft(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n})),ft(this,it(n,t))},indexFromPos:function(e){var t=(e=ft(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),ai(t.doc,Io(n,n)),f)for(var p=0;p=0;t--)Ai(e.doc,"",r[t].from,r[t].to,"+delete");Pr(e)}))}function ra(e,t,n){var r=ce(e.text,t+n,n);return r<0||r>e.text.length?null:r}function oa(e,t,n){var r=ra(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function ia(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=he(n,t.doc.direction);if(i){var a,s=o<0?$(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=jn(t,n);a=o<0?n.text.length-1:0;var u=Vn(t,c,a).top;a=ue((function(e){return Vn(t,c,e).top==u}),o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=ra(n,a,1))}else a=o<0?s.to:s.from;return new it(r,a,l)}}return new it(r,o<0?n.text.length:0,o<0?"before":"after")}Zi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Zi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Zi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Zi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Zi.default=b?Zi.macDefault:Zi.pcDefault;var aa={selectAll:pi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Q)},killLine:function(e){return na(e,(function(t){if(t.empty()){var n=Je(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new it(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),it(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Je(e.doc,o.line-1).text;a&&(o=new it(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(o.line-1,a.length-1),o,"+transpose"))}n.push(new Do(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return oo(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(at((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(at(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,c=io(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Nr(e)),ye(o.wrapper.ownerDocument,"mouseup",c),ye(o.wrapper.ownerDocument,"mousemove",u),ye(o.scroller,"dragstart",d),ye(o.scroller,"drop",c),i||(Ce(t),r.addNew||ei(e.doc,n,null,null,r.extend),l&&!p||a&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,ge(o.wrapper.ownerDocument,"mouseup",c),ge(o.wrapper.ownerDocument,"mousemove",u),ge(o.scroller,"dragstart",d),ge(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,t,i):function(e,t,n,r){a&&Nr(e);var o=e.display,i=e.doc;Ce(t);var s,l,c=i.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=i.sel.contains(n),s=l>-1?u[l]:new Do(n,n)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Do(n,n)),n=hr(e,t,!0,!0),l=-1;else{var d=xa(e,n,r.unit);s=r.extend?$o(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,ii(i,Oo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(ii(i,Oo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):ni(i,l,s,Z):(l=0,ii(i,new No([s],0),Z),c=i.sel);var f=n;function p(t){if(0!=at(f,t))if(f=t,"rectangle"==r.unit){for(var o=[],a=e.options.tabSize,u=H(Je(i,n.line).text,n.ch,a),d=H(Je(i,t.line).text,t.ch,a),p=Math.min(u,d),h=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Je(i,m).text,y=K(v,p,a);p==h?o.push(new Do(it(m,y),it(m,y))):v.length>y&&o.push(new Do(it(m,y),it(m,K(v,h,a))))}o.length||o.push(new Do(n,n)),ii(i,Oo(e,c.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,A=s,w=xa(e,t,r.unit),x=A.anchor;at(w.anchor,x)>0?(b=w.head,x=ut(A.from(),w.anchor)):(b=w.anchor,x=ct(A.to(),w.head));var E=c.ranges.slice(0);E[l]=function(e,t){var n=t.anchor,r=t.head,o=Je(e.doc,n.line);if(0==at(n,r)&&n.sticky==r.sticky)return t;var i=he(o);if(!i)return t;var a=fe(i,n.ch,n.sticky),s=i[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==i.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=fe(i,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=i[c+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new Do(new it(n.line,h,m),r)}(e,new Do(ft(i,x),b)),ii(i,Oo(e,E,l),Z)}}var h=o.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=hr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=at(a,f)){e.curOp.focus=M(V(e)),p(a);var s=Mr(o,i);(a.line>=s.to||a.lineh.bottom?20:0;l&&setTimeout(io(e,(function(){m==n&&(o.scroller.scrollTop+=l,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Ce(t),o.input.focus()),ye(o.wrapper.ownerDocument,"mousemove",y),ye(o.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var y=io(e,(function(e){0!==e.buttons&&De(e)?g(e):v(e)})),b=io(e,v);e.state.selectingText=b,ge(o.wrapper.ownerDocument,"mousemove",y),ge(o.wrapper.ownerDocument,"mouseup",b)}(e,r,t,i)}(t,r,i,e):Ne(e)==n.scroller&&Ce(e):2==o?(r&&ei(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(C?t.display.input.onContextMenu(e):Nr(t)))}}function xa(e,t,n){if("char"==n)return new Do(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Do(it(t.line,0),ft(e.doc,it(t.line+1,0)));var r=n(e,t);return new Do(r.from,r.to)}function Ea(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ce(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!xe(e,n))return Te(t);i-=s.top-a.viewOffset;for(var l=0;l=o)return be(e,n,e,nt(e.doc,i),e.display.gutterSpecs[l].className,t),Te(t)}}function Ca(e,t){return Ea(e,t,"gutterClick",!0)}function ka(e,t){Sn(e.display,t)||function(e,t){return!!xe(e,"gutterContextMenu")&&Ea(e,t,"gutterContextMenu",!1)}(e,t)||Ae(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ta(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(e)}Aa.prototype.compare=function(e,t,n){return this.time+400>e&&0==at(t,this.pos)&&n==this.button};var Sa={toString:function(){return"CodeMirror.Init"}},Na={},Da={};function Oa(e,t,n){if(!t!=!(n&&n!=Sa)){var r=e.display.dragFunctions,o=t?ge:ye;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Ia(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),pr(e),gr(e),Wn(e),setTimeout((function(){return Gr(e)}),100)}function La(e,t){var n=this;if(!(this instanceof La))return new La(e,t);this.options=t=t?z(t):{},z(Na,t,!1);var r=t.value;"string"==typeof r?r=new Pi(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new La.inputStyles[t.inputStyle](this),i=this.display=new xo(e,r,o,t);for(var c in i.wrapper.CodeMirror=this,Ta(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Xr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Y,keySeq:null,specialChars:null},t.autofocus&&!y&&i.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;ge(t.scroller,"mousedown",io(e,wa)),ge(t.scroller,"dblclick",a&&s<11?io(e,(function(t){if(!Ae(e,t)){var n=hr(e,t);if(n&&!Ca(e,t)&&!Sn(e.display,t)){Ce(t);var r=e.findWordAt(n);ei(e.doc,r.anchor,r.head)}}})):function(t){return Ae(e,t)||Ce(t)}),ge(t.scroller,"contextmenu",(function(t){return ka(e,t)})),ge(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||ka(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}ge(t.scroller,"touchstart",(function(o){if(!Ae(e,o)&&!i(o)&&!Ca(e,o)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),ge(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ge(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Sn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!r.prev||l(r,r.prev)?new Do(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new Do(it(a.line,0),ft(e.doc,it(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),Ce(n)}o()})),ge(t.scroller,"touchcancel",o),ge(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Br(e,t.scroller.scrollTop),zr(e,t.scroller.scrollLeft,!0),be(e,"scroll",e))})),ge(t.scroller,"mousewheel",(function(t){return So(e,t)})),ge(t.scroller,"DOMMouseScroll",(function(t){return So(e,t)})),ge(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){Ae(e,t)||Se(t)},over:function(t){Ae(e,t)||(function(e,t){var n=hr(e,t);if(n){var r=document.createDocumentFragment();Er(e,n,r),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),D(e.display.dragCursor,r)}}(e,t),Se(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-ji<100))Se(t);else if(!Ae(e,t)&&!Sn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=O("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:io(e,Vi),leave:function(t){Ae(e,t)||qi(e)}};var c=t.input.getField();ge(c,"keyup",(function(t){return ga.call(e,t)})),ge(c,"keydown",io(e,ma)),ge(c,"keypress",io(e,va)),ge(c,"focus",(function(t){return Dr(e,t)})),ge(c,"blur",(function(t){return Or(e,t)}))}(this),zi(),Jr(this),this.curOp.forceUpdate=!0,Uo(this,r),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Dr(n)}),20):Or(this),Da)Da.hasOwnProperty(c)&&Da[c](this,t[c],Sa);yo(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>i.first?H(Je(i,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(fa,l=Pe(t),c=null;if(s&&r.ranges.length>1)if(Ra&&Ra.text.join("\n")==t){if(r.ranges.length%Ra.text.length==0){c=[];for(var u=0;u=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=it(h.line,h.ch-n):e.state.overwrite&&!s?m=it(m.line,Math.min(Je(i,m.line).text.length,m.ch+$(l).length)):s&&Ra&&Ra.lineWise&&Ra.text.join("\n")==l.join("\n")&&(h=m=it(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};mi(e.doc,g),pn(e,"inputRead",e,g)}t&&!s&&qa(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Va(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||oo(t,(function(){return ja(t,n,0,null,"paste")})),!0}function qa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=Fa(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Je(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Fa(e,o.head.line,"smart"));a&&pn(e,"electricInput",e,o.head.line)}}}function Ba(e){for(var t=[],n=[],r=0;r0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new it(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?function(e,t,n,r){var o=he(t,e.doc.direction);if(!o)return oa(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=fe(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=u.begin)){var p=d?"before":"after";return new it(n.line,f,p)}}var h=function(e,t,r){for(var i=function(e,t){return t?new it(n.line,l(e,1),"before"):new it(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:o.length-1,r,c(g)))?null:m}(e.cm,s,t,n):oa(s,t,n);if(null==a){if(i||((c=t.line+l)=e.first+e.size||(t=new it(c,t.ch,t.sticky),!(s=Je(e,c)))))return!1;t=ia(o,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var h=s.text.charAt(t.ch)||"\n",m=ie(h,f)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||p||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!p))break}var g=di(e,t,i,a,!0);return st(i,g)&&(g.hitSide=!0),g}function Ya(e,t,n,r){var o,i,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,B(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(l-.5*lr(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=tr(e,s,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Wa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Y,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ga(e,t){var n=Pn(e,t.line);if(!n||n.hidden)return null;var r=Je(e.doc,t.line),o=Fn(n,r,t.line),i=he(r,e.doc.direction),a="left";i&&(a=fe(i,t.ch)%2?"right":"left");var s=Un(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Qa(e,t){return t&&(e.bad=!0),e}function Za(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Qa(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||i.line=t.display.viewFrom&&Ga(t,o)||{node:l[0].measure.map[2],offset:0},u=i.liner.firstLine()&&(a=it(a.line-1,Je(r.doc,a.line-1).length)),s.ch==Je(r.doc,s.line).text.length&&s.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=mr(r,a.line))?(t=tt(o.view[0].line),n=o.view[0].node):(t=tt(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,c,u=mr(r,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=tt(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(e){e&&(c(),i+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var i,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(it(r,0),it(o+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(i=p[0].find(0))&&u(_e(e.doc,i.from,i.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m1&&f.length>1;)if($(d)==$(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=it(t,p),x=it(l,f.length?$(f).length-h:0);return d.length>1||d[0]||at(w,x)?(Ai(r.doc,d,w,x,"+input"),!0):void 0},Wa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wa.prototype.reset=function(){this.forceCompositionEnd()},Wa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Wa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||oo(this.cm,(function(){return gr(e.cm)}))},Wa.prototype.setUneditable=function(e){e.contentEditable="false"},Wa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||io(this.cm,ja)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Wa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Wa.prototype.onContextMenu=function(){},Wa.prototype.resetPosition=function(){},Wa.prototype.needsContentAttribute=!0;var Ka=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Y,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ka.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!Ae(r,e)){if(r.somethingSelected())Pa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ba(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Q):(n.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),ge(o,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ge(o,"paste",(function(e){Ae(r,e)||Va(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),ge(o,"cut",i),ge(o,"copy",i),ge(e.scroller,"paste",(function(t){if(!Sn(e,t)&&!Ae(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),ge(e.lineSpace,"selectstart",(function(t){Sn(e,t)||Ce(t)})),ge(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),ge(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ka.prototype.createField=function(e){this.wrapper=za(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Ua(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ka.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ka.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=xr(e);if(e.options.moveInputWithCursor){var o=_n(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ka.prototype.showSelection=function(e){var t=this.cm.display;D(t.cursorDiv,e.cursors),D(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ka.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&P(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.resetting=!1}},Ka.prototype.getField=function(){return this.textarea},Ka.prototype.supportsTouch=function(){return!1},Ka.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||M(q(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},Ka.prototype.blur=function(){this.textarea.blur()},Ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ka.prototype.receivedFocus=function(){this.slowPoll()},Ka.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ka.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ka.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||je(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,o.length);l1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ka.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ka.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=hr(n,e),c=r.scroller.scrollTop;if(i&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&io(n,ii)(n.doc,Io(i),Q);var u,d=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=o.ownerDocument.defaultView.scrollY),r.input.focus(),l&&o.ownerDocument.defaultView.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),C){Se(e);var m=function(){ye(window,"mouseup",m),setTimeout(v,20)};ge(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?io(n,pi)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ka.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ka.prototype.setUneditable=function(){},Ka.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=Sa&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Sa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Po(e)}),!0),n("indentUnit",2,Po,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){jo(e),Wn(e),gr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(it(r,i))}r++}));for(var o=n.length-1;o>=0;o--)Ai(e.doc,t,n[o],it(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Sa&&e.refresh()})),n("specialCharPlaceholder",rn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ta(e),wo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=ta(t),o=n!=Sa&&ta(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ia,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=bo(t,e.options.lineNumbers),wo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?dr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Gr(e)}),!0),n("scrollbarStyle","native",(function(e){Xr(e),Gr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=bo(e.options.gutters,t),wo(e)}),!0),n("firstLineNumber",1,wo,!0),n("lineNumberFormatter",(function(e){return e}),wo,!0),n("showCursorWhenSelecting",!1,wr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Or(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Oa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,wr,!0),n("singleCursorHeightPerLine",!0,wr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,jo,!0),n("addModeClass",!1,jo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,jo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(La),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){B(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&io(this,t[e])(this,n,o),be(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ta(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Fa(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Pr(this));else{var i=o.from(),a=o.to(),s=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&ni(this.doc,r,new Do(i,c[r].to()),Q)}}})),getTokenAt:function(e,t){return Et(this,e,t)},getLineTokens:function(e,t){return Et(this,it(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=vt(this,Je(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]i&&(e=i,o=!0),r=Je(this.doc,e)}else r=e;return Xn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Zt(r):0)},defaultTextHeight:function(){return lr(this.display)},defaultCharWidth:function(){return cr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,s,l=this.display,c=(e=_n(this,ft(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(i=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Fr(i,a)).scrollTop&&Br(i,s.scrollTop),null!=s.scrollLeft&&zr(i,s.scrollLeft))},triggerOnKeyDown:ao(ma),triggerOnKeyPress:ao(va),triggerOnKeyUp:ga,triggerOnMouseDown:ao(wa),execCommand:function(e){if(aa.hasOwnProperty(e))return aa[e].call(null,this)},triggerElectric:ao((function(e){qa(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=ft(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&pr(this),be(this,"refresh",this)})),swapDoc:ao((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Uo(this,e),Wn(this),this.display.input.reset(),jr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,pn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ee(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(La);var Ja="iter insert remove copy getEditor constructor".split(" ");for(var _a in Pi.prototype)Pi.prototype.hasOwnProperty(_a)&&W(Ja,_a)<0&&(La.prototype[_a]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pi.prototype[_a]));return Ee(Pi),La.inputStyles={textarea:Ka,contenteditable:Wa},La.defineMode=function(e){La.defaults.mode||"null"==e||(La.defaults.mode=e),ze.apply(this,arguments)},La.defineMIME=function(e,t){Ue[e]=t},La.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),La.defineMIME("text/plain","null"),La.defineExtension=function(e,t){La.prototype[e]=t},La.defineDocExtension=function(e,t){Pi.prototype[e]=t},La.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=M(q(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var o;if(e.form&&(ge(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ye(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=La((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=ye,e.on=ge,e.wheelEventPixels=To,e.Doc=Pi,e.splitLines=Pe,e.countColumn=H,e.findColumn=K,e.isWordChar=oe,e.Pass=G,e.signal=be,e.Line=Jt,e.changeEnd=Lo,e.scrollbarModel=Zr,e.Pos=it,e.cmpPos=at,e.modes=Be,e.mimeModes=Ue,e.resolveMode=He,e.getMode=Ye,e.modeExtensions=We,e.extendMode=Ge,e.copyState=Qe,e.startState=Xe,e.innerMode=Ze,e.commands=aa,e.keyMap=Zi,e.keyName=ea,e.isModifierKey=_i,e.lookupKey=Ji,e.normalizeKeyMap=Ki,e.StringStream=Ke,e.SharedTextMarker=Li,e.TextMarker=Oi,e.LineWidget=Si,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Se,e.addClass=F,e.contains=L,e.rmClass=S,e.keyNames=Yi}(La),La.version="5.65.19",La}()},1505:(e,t,n)=>{"use strict";n.d(t,{kr:()=>rt,Rq:()=>Ye,vM:()=>We,yX:()=>Ot,CE:()=>At,VS:()=>cn,JR:()=>Nt,Jb:()=>_t,pi:()=>He,p_:()=>Be,r5:()=>Ze,m7:()=>qe,p:()=>ze,t:()=>Ue});var r,o,i,a,s,l,c,u,d,f,p,h,m,g,v,y,b,A,w,x,E,C,k,T,S,N,D,O,I,L,M,F,R,P,j,V,q,B,U,z,H,Y,W,G,Q,Z,X,K,J,_,$,ee,te,ne,re,oe,ie,ae,se,le,ce,ue,de,fe,pe,he,me,ge,ve,ye,be,Ae,we,xe,Ee,Ce,ke,Te,Se,Ne,De=n(424),Oe=n(8195),Ie=n(2455),Le=n(2114),Me=n(8957),Fe=n(4143),Re=n(4917),Pe=n(2868);!function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(a||(a={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=a.MAX_VALUE),t===Number.MAX_VALUE&&(t=a.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.line)&&Ne.uinteger(t.character)}}(s||(s={})),function(e){e.create=function(e,t,n,r){if(Ne.uinteger(e)&&Ne.uinteger(t)&&Ne.uinteger(n)&&Ne.uinteger(r))return{start:s.create(e,t),end:s.create(n,r)};if(s.is(e)&&s.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Ne.objectLiteral(t)&&s.is(t.start)&&s.is(t.end)}}(l||(l={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Ne.objectLiteral(t)&&l.is(t.range)&&(Ne.string(t.uri)||Ne.undefined(t.uri))}}(c||(c={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Ne.objectLiteral(t)&&l.is(t.targetRange)&&Ne.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||Ne.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.numberRange(t.red,0,1)&&Ne.numberRange(t.green,0,1)&&Ne.numberRange(t.blue,0,1)&&Ne.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&l.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.undefined(t.textEdit)||x.is(t))&&(Ne.undefined(t.additionalTextEdits)||Ne.typedArray(t.additionalTextEdits,x.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,r,o,i){const a={startLine:e,endLine:t};return Ne.defined(n)&&(a.startCharacter=n),Ne.defined(r)&&(a.endCharacter=r),Ne.defined(o)&&(a.kind=o),Ne.defined(i)&&(a.collapsedText=i),a},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.startLine)&&Ne.uinteger(t.startLine)&&(Ne.undefined(t.startCharacter)||Ne.uinteger(t.startCharacter))&&(Ne.undefined(t.endCharacter)||Ne.uinteger(t.endCharacter))&&(Ne.undefined(t.kind)||Ne.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Ne.defined(t)&&c.is(t.location)&&Ne.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(v||(v={})),function(e){e.Unnecessary=1,e.Deprecated=2}(y||(y={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,n,r,o,i){let a={range:e,message:t};return Ne.defined(n)&&(a.severity=n),Ne.defined(r)&&(a.code=r),Ne.defined(o)&&(a.source=o),Ne.defined(i)&&(a.relatedInformation=i),a},e.is=function(e){var t;let n=e;return Ne.defined(n)&&l.is(n.range)&&Ne.string(n.message)&&(Ne.number(n.severity)||Ne.undefined(n.severity))&&(Ne.integer(n.code)||Ne.string(n.code)||Ne.undefined(n.code))&&(Ne.undefined(n.codeDescription)||Ne.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ne.string(n.source)||Ne.undefined(n.source))&&(Ne.undefined(n.relatedInformation)||Ne.typedArray(n.relatedInformation,g.is))}}(A||(A={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Ne.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.title)&&Ne.string(t.command)}}(w||(w={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.newText)&&l.is(t.range)}}(x||(x={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ne.string(t.description)||void 0===t.description)}}(E||(E={})),function(e){e.is=function(e){const t=e;return Ne.string(t)}}(C||(C={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return x.is(t)&&(E.is(t.annotationId)||C.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Ne.defined(t)&&M.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Ne.string(t.oldUri)&&Ne.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(N||(N={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ne.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ne.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(D||(D={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ne.string(e.kind)?S.is(e)||N.is(e)||D.is(e):T.is(e))))}}(O||(O={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.integer(t.version)}}(L||(L={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)&&(null===t.version||Ne.integer(t.version))}}(M||(M={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.string(t.languageId)&&Ne.integer(t.version)&&Ne.string(t.text)}}(F||(F={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(R||(R={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(e)&&R.is(t.kind)&&Ne.string(t.value)}}(P||(P={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(j||(j={})),function(e){e.PlainText=1,e.Snippet=2}(V||(V={})),function(e){e.Deprecated=1}(q||(q={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ne.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}}(B||(B={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){const t=e;return t&&(Ne.string(t.detail)||void 0===t.detail)&&(Ne.string(t.description)||void 0===t.description)}}(z||(z={})),function(e){e.create=function(e){return{label:e}}}(H||(H={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(Y||(Y={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ne.string(t)||Ne.objectLiteral(t)&&Ne.string(t.language)&&Ne.string(t.value)}}(W||(W={})),function(e){e.is=function(e){let t=e;return!!t&&Ne.objectLiteral(t)&&(P.is(t.contents)||W.is(t.contents)||Ne.typedArray(t.contents,W.is))&&(void 0===e.range||l.is(e.range))}}(G||(G={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Q||(Q={})),function(e){e.create=function(e,t,...n){let r={label:e};return Ne.defined(t)&&(r.documentation=t),Ne.defined(n)?r.parameters=n:r.parameters=[],r}}(Z||(Z={})),function(e){e.Text=1,e.Read=2,e.Write=3}(X||(X={})),function(e){e.create=function(e,t){let n={range:e};return Ne.number(t)&&(n.kind=t),n}}(K||(K={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(J||(J={})),function(e){e.Deprecated=1}(_||(_={})),function(e){e.create=function(e,t,n,r,o){let i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}($||($={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,o,i){let a={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(a.children=i),a},e.is=function(e){let t=e;return t&&Ne.string(t.name)&&Ne.number(t.kind)&&l.is(t.range)&&l.is(t.selectionRange)&&(void 0===t.detail||Ne.string(t.detail))&&(void 0===t.deprecated||Ne.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.typedArray(t.diagnostics,A.is)&&(void 0===t.only||Ne.typedArray(t.only,Ne.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(oe||(oe={})),function(e){e.create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):w.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Ne.string(t.title)&&(void 0===t.diagnostics||Ne.typedArray(t.diagnostics,A.is))&&(void 0===t.kind||Ne.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||w.is(t.command))&&(void 0===t.isPreferred||Ne.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))}}(ie||(ie={})),function(e){e.create=function(e,t){let n={range:e};return Ne.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Ne.defined(t)&&l.is(t.range)&&(Ne.undefined(t.command)||w.is(t.command))}}(ae||(ae={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.uinteger(t.tabSize)&&Ne.boolean(t.insertSpaces)}}(se||(se={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Ne.defined(t)&&l.is(t.range)&&(Ne.undefined(t.target)||Ne.string(t.target))}}(le||(le={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Ne.objectLiteral(n)&&l.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ce||(ce={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ue||(ue={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&l.is(t.range)&&Ne.string(t.text)}}(pe||(pe={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&l.is(t.range)&&Ne.boolean(t.caseSensitiveLookup)&&(Ne.string(t.variableName)||void 0===t.variableName)}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&l.is(t.range)&&(Ne.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ne.defined(t)&&l.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.tooltip||Ne.string(t.tooltip)||P.is(t.tooltip))&&(void 0===t.location||c.is(t.location))&&(void 0===t.command||w.is(t.command))}}(ye||(ye={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&s.is(t.position)&&(Ne.string(t.label)||Ne.typedArray(t.label,ye.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||Ne.typedArray(t.textEdits,x.is)&&(void 0===t.tooltip||Ne.string(t.tooltip)||P.is(t.tooltip))&&(void 0===t.paddingLeft||Ne.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ne.boolean(t.paddingRight))}}(be||(be={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Ae||(Ae={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(we||(we={})),function(e){e.create=function(e){return{items:e}}}(xe||(xe={})),function(e){e.Invoked=0,e.Automatic=1}(Ee||(Ee={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Ce||(Ce={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(ke||(ke={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&o.is(t.uri)&&Ne.string(t.name)}}(Te||(Te={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let a=0,s=0,l=0;for(;a{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=r.length;for(let t=o.length-1;t>=0;t--){let n=o[t],a=e.offsetAt(n.range.start),s=e.offsetAt(n.range.end);if(!(s<=i))throw new Error("Overlapping edit");r=r.substring(0,a)+n.newText+r.substring(s,r.length),i=a}return r}}(Se||(Se={}));class je{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return s.create(0,e);for(;ne?r=o:n=o+1}let o=n-1;return s.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=(e,t=!0,n=!1)=>{let r=null,o=null;return"string"==typeof e?(o=new RegExp(e,n?"i":"g").test(this._sourceText.slice(this._pos,this._pos+e.length)),r=e):e instanceof RegExp&&(o=this._sourceText.slice(this._pos).match(e),r=null==o?void 0:o[0]),!(null==o||!("string"==typeof e||o instanceof Array&&this._sourceText.startsWith(o[0],this._pos)))&&(t&&(this._start=this._pos,r&&r.length&&(this._pos+=r.length)),o)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0!==e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"==typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}function qe(e){return{ofRule:e}}function Be(e,t){return{ofRule:e,isList:!0,separator:t}}function Ue(e,t){return{style:t,match:t=>t.kind===e}}function ze(e,t){return{style:t||"punctuation",match:t=>"Punctuation"===t.kind&&t.value===e}}const He=e=>" "===e||"\t"===e||","===e||"\n"===e||"\r"===e||"\ufeff"===e||" "===e,Ye={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},We={Document:[Be("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return Ie.b.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[Ge("query"),qe(Qe("def")),qe("VariableDefinitions"),Be("Directive"),"SelectionSet"],Mutation:[Ge("mutation"),qe(Qe("def")),qe("VariableDefinitions"),Be("Directive"),"SelectionSet"],Subscription:[Ge("subscription"),qe(Qe("def")),qe("VariableDefinitions"),Be("Directive"),"SelectionSet"],VariableDefinitions:[ze("("),Be("VariableDefinition"),ze(")")],VariableDefinition:["Variable",ze(":"),"Type",qe("DefaultValue")],Variable:[ze("$","variable"),Qe("variable")],DefaultValue:[ze("="),"Value"],SelectionSet:[ze("{"),Be("Selection"),ze("}")],Selection:(e,t)=>"..."===e.value?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field",AliasedField:[Qe("property"),ze(":"),Qe("qualifier"),qe("Arguments"),Be("Directive"),qe("SelectionSet")],Field:[Qe("property"),qe("Arguments"),Be("Directive"),qe("SelectionSet")],Arguments:[ze("("),Be("Argument"),ze(")")],Argument:[Qe("attribute"),ze(":"),"Value"],FragmentSpread:[ze("..."),Qe("def"),Be("Directive")],InlineFragment:[ze("..."),qe("TypeCondition"),Be("Directive"),"SelectionSet"],FragmentDefinition:[Ge("fragment"),qe(function(e,t){const n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every((t=>t.match&&!t.match(e)))},e}(Qe("def"),[Ge("on")])),"TypeCondition",Be("Directive"),"SelectionSet"],TypeCondition:[Ge("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return"null"===e.value?"NullValue":"EnumValue"}},NumberValue:[Ue("Number","number")],StringValue:[{style:"string",match:e=>"String"===e.kind,update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[Ue("Name","builtin")],NullValue:[Ue("Name","keyword")],EnumValue:[Qe("string-2")],ListValue:[ze("["),Be("Value"),ze("]")],ObjectValue:[ze("{"),Be("ObjectField"),ze("}")],ObjectField:[Qe("attribute"),ze(":"),"Value"],Type:e=>"["===e.value?"ListType":"NonNullType",ListType:[ze("["),"Type",ze("]"),qe(ze("!"))],NonNullType:["NamedType",qe(ze("!"))],NamedType:[{style:"atom",match:e=>"Name"===e.kind,update(e,t){var n;(null===(n=e.prevState)||void 0===n?void 0:n.prevState)&&(e.name=t.value,e.prevState.prevState.type=t.value)}}],Directive:[ze("@","meta"),Qe("meta"),qe("Arguments")],DirectiveDef:[Ge("directive"),ze("@","meta"),Qe("meta"),qe("ArgumentsDef"),Ge("on"),Be("DirectiveLocation",ze("|"))],InterfaceDef:[Ge("interface"),Qe("atom"),qe("Implements"),Be("Directive"),ze("{"),Be("FieldDef"),ze("}")],Implements:[Ge("implements"),Be("NamedType",ze("&"))],DirectiveLocation:[Qe("string-2")],SchemaDef:[Ge("schema"),Be("Directive"),ze("{"),Be("OperationTypeDef"),ze("}")],OperationTypeDef:[Qe("keyword"),ze(":"),Qe("atom")],ScalarDef:[Ge("scalar"),Qe("atom"),Be("Directive")],ObjectTypeDef:[Ge("type"),Qe("atom"),qe("Implements"),Be("Directive"),ze("{"),Be("FieldDef"),ze("}")],FieldDef:[Qe("property"),qe("ArgumentsDef"),ze(":"),"Type",Be("Directive")],ArgumentsDef:[ze("("),Be("InputValueDef"),ze(")")],InputValueDef:[Qe("attribute"),ze(":"),"Type",qe("DefaultValue"),Be("Directive")],UnionDef:[Ge("union"),Qe("atom"),Be("Directive"),ze("="),Be("UnionMember",ze("|"))],UnionMember:["NamedType"],EnumDef:[Ge("enum"),Qe("atom"),Be("Directive"),ze("{"),Be("EnumValueDef"),ze("}")],EnumValueDef:[Qe("string-2"),Be("Directive")],InputDef:[Ge("input"),Qe("atom"),Be("Directive"),ze("{"),Be("InputValueDef"),ze("}")],ExtendDef:[Ge("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return Ie.b.SCHEMA_EXTENSION;case"scalar":return Ie.b.SCALAR_TYPE_EXTENSION;case"type":return Ie.b.OBJECT_TYPE_EXTENSION;case"interface":return Ie.b.INTERFACE_TYPE_EXTENSION;case"union":return Ie.b.UNION_TYPE_EXTENSION;case"enum":return Ie.b.ENUM_TYPE_EXTENSION;case"input":return Ie.b.INPUT_OBJECT_TYPE_EXTENSION}},[Ie.b.SCHEMA_EXTENSION]:["SchemaDef"],[Ie.b.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[Ie.b.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[Ie.b.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[Ie.b.UNION_TYPE_EXTENSION]:["UnionDef"],[Ie.b.ENUM_TYPE_EXTENSION]:["EnumDef"],[Ie.b.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function Ge(e){return{style:"keyword",match:t=>"Name"===t.kind&&t.value===e}}function Qe(e){return{style:e,match:e=>"Name"===e.kind,update(e,t){e.name=t.value}}}function Ze(e={eatWhitespace:e=>e.eatWhile(He),lexRules:Ye,parseRules:We,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return Je(e.parseRules,t,Ie.b.DOCUMENT),t},token:(t,n)=>function(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:o,parseRules:i,eatWhitespace:a,editorConfig:s}=n;if(t.rule&&0===t.rule.length?_e(t):t.needsAdvance&&(t.needsAdvance=!1,$e(t,!0)),e.sol()){const n=(null==s?void 0:s.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/n)}if(a(e))return"ws";const l=function(e,t){const n=Object.keys(e);for(let r=0;r0&&e.at(-1){let t=rt.UNKNOWN;if(e)try{(0,De.YR)((0,Oe.qg)(e),{enter(e){if("Document"!==e.kind)return!!ot.includes(e.kind)&&(t=rt.TYPE_SYSTEM,De.sP);t=rt.EXECUTABLE}})}catch(e){return t}return t};function at(e,t,n){return n===Me.S0.name&&e.getQueryType()===t?Me.S0:n===Me.Xe.name&&e.getQueryType()===t?Me.Xe:n===Me.of.name&&(0,Le.ML)(t)?Me.of:"getFields"in t?t.getFields()[n]:null}function st(e,t){const n=[];let r=e;for(;null==r?void 0:r.kind;)n.push(r),r=r.prevState;for(let e=n.length-1;e>=0;e--)t(n[e])}const lt=Object.assign(Object.assign({},Ie.b),{ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"});var ct;function ut(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let o=0;o!e.isDeprecated));return ft(ft(e.map((e=>({proximity:ht(pt(e.label),t),entry:e}))),(e=>e.proximity<=2)),(e=>!e.entry.isDeprecated)).sort(((e,t)=>(e.entry.isDeprecated?1:0)-(t.entry.isDeprecated?1:0)||e.proximity-t.proximity||e.entry.label.length-t.entry.label.length)).map((e=>e.entry))}(t,pt(e.string))}function ft(e,t){const n=e.filter(t);return 0===n.length?e:n}function pt(e){return e.toLowerCase().replaceAll(/\W/g,"")}function ht(e,t){let n=function(e,t){let n,r;const o=[],i=e.length,a=t.length;for(n=0;n<=i;n++)o[n]=[n];for(r=1;r<=a;r++)o[0][r]=r;for(n=1;n<=i;n++)for(r=1;r<=a;r++){const i=e[n-1]===t[r-1]?0:1;o[n][r]=Math.min(o[n-1][r]+1,o[n][r-1]+1,o[n-1][r-1]+i),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(o[n][r]=Math.min(o[n][r],o[n-2][r-2]+i))}return o[i][a]}(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=0===e.indexOf(t)?0:.5),n}!function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ct||(ct={}));const mt=(e,t,n)=>{if(!t)return null!=n?n:e;const r=(0,Le.MR)(t);return(0,Le.YQ)(r)||(0,Le.qK)(r)||(0,Le.Fs)(r)||(0,Le.Lc)(r)?e+" {\n $1\n}":null!=n?n:e},gt=(e,t,n)=>{if((0,Le.Fs)(t)){const n=(0,Le.MR)(t.ofType);return e+`[${mt("",n,"$1")}]`}return mt(e,t,n)},vt=e=>{const t=e.args.filter((e=>e.type.toString().endsWith("!")));if(t.length)return e.name+`(${t.map(((e,t)=>`${e.name}: $${t+1}`))}) ${mt("",e.type,"\n")}`},yt={command:"editor.action.triggerSuggest",title:"Suggestions"},bt=e=>{const t=[];if(e)try{(0,De.YR)((0,Oe.qg)(e),{FragmentDefinition(e){t.push(e)}})}catch(e){return[]}return t};function At(e,t,n,r,o,i){var a;const s=Object.assign(Object.assign({},i),{schema:e}),l=function(e,t,n,r,o){const i=r||function(e,t,n=0){let r=null,o=null,i=null;const a=nt(e,((e,a,s,l)=>{if(!(l!==t.line||e.getCurrentPosition()+n{var p;switch(t.kind){case lt.QUERY:case"ShortQuery":d=e.getQueryType();break;case lt.MUTATION:d=e.getMutationType();break;case lt.SUBSCRIPTION:d=e.getSubscriptionType();break;case lt.INLINE_FRAGMENT:case lt.FRAGMENT_DEFINITION:t.type&&(d=e.getType(t.type));break;case lt.FIELD:case lt.ALIASED_FIELD:d&&t.name?(a=u?at(e,u,t.name):null,d=a?a.type:null):a=null;break;case lt.SELECTION_SET:u=(0,Le.MR)(d);break;case lt.DIRECTIVE:o=t.name?e.getDirective(t.name):null;break;case lt.INTERFACE_DEF:t.name&&(l=null,f=new Le.VA({name:t.name,interfaces:[],fields:{}}));break;case lt.OBJECT_TYPE_DEF:t.name&&(f=null,l=new Le.bh({name:t.name,interfaces:[],fields:{}}));break;case lt.ARGUMENTS:if(t.prevState)switch(t.prevState.kind){case lt.FIELD:r=a&&a.args;break;case lt.DIRECTIVE:r=o&&o.args;break;case lt.ALIASED_FIELD:{const n=null===(p=t.prevState)||void 0===p?void 0:p.name;if(!n){r=null;break}const o=u?at(e,u,n):null;if(!o){r=null;break}r=o.args;break}default:r=null}else r=null;break;case lt.ARGUMENT:if(r)for(let e=0;ee.value===t.name)):null;break;case lt.LIST_VALUE:const m=(0,Le.yl)(s);s=m instanceof Le.KT?m.ofType:null;break;case lt.OBJECT_VALUE:const g=(0,Le.MR)(s);c=g instanceof Le.zP?g.getFields():null;break;case lt.OBJECT_FIELD:const v=t.name&&c?c[t.name]:null;s=null==v?void 0:v.type,a=v,d=a?a.type:null;break;case lt.NAMED_TYPE:t.name&&(d=e.getType(t.name))}})),{argDef:n,argDefs:r,directiveDef:o,enumValue:i,fieldDef:a,inputType:s,objectFieldDefs:c,parentType:u,type:d,interfaceDef:f,objectTypeDef:l}}(n,i.state);var l,c;return{token:i,state:a,typeInfo:s,mode:(null==o?void 0:o.mode)||(l=e,(null==(c=null==o?void 0:o.uri)?void 0:c.endsWith(".graphqls"))?rt.TYPE_SYSTEM:it(l))}}(t,n,e,r,i);if(!l)return[];const{state:c,typeInfo:u,mode:d,token:f}=l,{kind:p,step:h,prevState:m}=c;if(p===lt.DOCUMENT)return d===rt.TYPE_SYSTEM?function(e){return dt(e,[{label:"extend",kind:ct.Function},...wt])}(f):d===rt.EXECUTABLE?function(e){return dt(e,xt)}(f):function(e){return dt(e,[{label:"extend",kind:ct.Function},...xt,...wt])}(f);if(p===lt.EXTEND_DEF)return function(e){return dt(e,wt)}(f);if((null===(a=null==m?void 0:m.prevState)||void 0===a?void 0:a.kind)===lt.EXTENSION_DEFINITION&&c.name)return dt(f,[]);if((null==m?void 0:m.kind)===Ie.b.SCALAR_TYPE_EXTENSION)return dt(f,Object.values(e.getTypeMap()).filter(Le.lg).map((e=>({label:e.name,kind:ct.Function}))));if((null==m?void 0:m.kind)===Ie.b.OBJECT_TYPE_EXTENSION)return dt(f,Object.values(e.getTypeMap()).filter((e=>(0,Le.YQ)(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:ct.Function}))));if((null==m?void 0:m.kind)===Ie.b.INTERFACE_TYPE_EXTENSION)return dt(f,Object.values(e.getTypeMap()).filter(Le.kD).map((e=>({label:e.name,kind:ct.Function}))));if((null==m?void 0:m.kind)===Ie.b.UNION_TYPE_EXTENSION)return dt(f,Object.values(e.getTypeMap()).filter(Le.CK).map((e=>({label:e.name,kind:ct.Function}))));if((null==m?void 0:m.kind)===Ie.b.ENUM_TYPE_EXTENSION)return dt(f,Object.values(e.getTypeMap()).filter((e=>(0,Le.oF)(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:ct.Function}))));if((null==m?void 0:m.kind)===Ie.b.INPUT_OBJECT_TYPE_EXTENSION)return dt(f,Object.values(e.getTypeMap()).filter(Le.qK).map((e=>({label:e.name,kind:ct.Function}))));if(p===lt.IMPLEMENTS||p===lt.NAMED_TYPE&&(null==m?void 0:m.kind)===lt.IMPLEMENTS)return function(e,t,n,r,o){if(t.needsSeparator)return[];const i=ut(n.getTypeMap()).filter(Le.kD),a=i.map((({name:e})=>e)),s=new Set;nt(r,((e,t)=>{var r,i,l,c,u;if(t.name&&(t.kind!==lt.INTERFACE_DEF||a.includes(t.name)||s.add(t.name),t.kind===lt.NAMED_TYPE&&(null===(r=t.prevState)||void 0===r?void 0:r.kind)===lt.IMPLEMENTS))if(o.interfaceDef){if(null===(i=o.interfaceDef)||void 0===i?void 0:i.getInterfaces().find((({name:e})=>e===t.name)))return;const e=n.getType(t.name),r=null===(l=o.interfaceDef)||void 0===l?void 0:l.toConfig();o.interfaceDef=new Le.VA(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new Le.VA({name:t.name,fields:{}})]}))}else if(o.objectTypeDef){if(null===(c=o.objectTypeDef)||void 0===c?void 0:c.getInterfaces().find((({name:e})=>e===t.name)))return;const e=n.getType(t.name),r=null===(u=o.objectTypeDef)||void 0===u?void 0:u.toConfig();o.objectTypeDef=new Le.bh(Object.assign(Object.assign({},r),{interfaces:[...r.interfaces,e||new Le.VA({name:t.name,fields:{}})]}))}}));const l=o.interfaceDef||o.objectTypeDef,c=((null==l?void 0:l.getInterfaces())||[]).map((({name:e})=>e));return dt(e,i.concat([...s].map((e=>({name:e})))).filter((({name:e})=>e!==(null==l?void 0:l.name)&&!c.includes(e))).map((e=>{const t={label:e.name,kind:ct.Interface,type:e};return(null==e?void 0:e.description)&&(t.documentation=e.description),t})))}(f,c,e,t,u);if(p===lt.SELECTION_SET||p===lt.FIELD||p===lt.ALIASED_FIELD)return function(e,t,n){var r;if(t.parentType){const{parentType:o}=t;let i=[];return"getFields"in o&&(i=ut(o.getFields())),(0,Le.ML)(o)&&i.push(Me.of),o===(null===(r=null==n?void 0:n.schema)||void 0===r?void 0:r.getQueryType())&&i.push(Me.S0,Me.Xe),dt(e,i.map(((t,r)=>{var o;const i={sortText:String(r)+t.name,label:t.name,detail:String(t.type),documentation:null!==(o=t.description)&&void 0!==o?o:void 0,deprecated:Boolean(t.deprecationReason),isDeprecated:Boolean(t.deprecationReason),deprecationReason:t.deprecationReason,kind:ct.Field,labelDetails:{detail:" "+t.type.toString()},type:t.type};return(null==n?void 0:n.fillLeafsOnComplete)&&(i.insertText=vt(t),i.insertText||(i.insertText=mt(t.name,t.type,t.name+(e.state.needsAdvance?"":"\n"))),i.insertText&&(i.insertTextFormat=V.Snippet,i.insertTextMode=U.adjustIndentation,i.command=yt)),i})))}return[]}(f,u,s);if(p===lt.ARGUMENTS||p===lt.ARGUMENT&&0===h){const{argDefs:e}=u;if(e)return dt(f,e.map((e=>{var t;return{label:e.name,insertText:gt(e.name+": ",e.type),insertTextMode:U.adjustIndentation,insertTextFormat:V.Snippet,command:yt,labelDetails:{detail:" "+String(e.type)},documentation:null!==(t=e.description)&&void 0!==t?t:void 0,kind:ct.Variable,type:e.type}})))}if((p===lt.OBJECT_VALUE||p===lt.OBJECT_FIELD&&0===h)&&u.objectFieldDefs){const e=ut(u.objectFieldDefs),t=p===lt.OBJECT_VALUE?ct.Value:ct.Field;return dt(f,e.map((e=>{var n;return{label:e.name,detail:String(e.type),documentation:null!==(n=null==e?void 0:e.description)&&void 0!==n?n:void 0,kind:t,type:e.type,insertText:gt(e.name+": ",e.type),insertTextMode:U.adjustIndentation,insertTextFormat:V.Snippet,command:yt}})))}if(p===lt.ENUM_VALUE||p===lt.LIST_VALUE&&1===h||p===lt.OBJECT_FIELD&&2===h||p===lt.ARGUMENT&&2===h)return function(e,t,n,r){const o=(0,Le.MR)(t.inputType),i=Ct(n,r,e).filter((e=>e.detail===(null==o?void 0:o.name)));return o instanceof Le.Zb?dt(e,o.getValues().map((e=>{var t;return{label:e.name,detail:String(o),documentation:null!==(t=e.description)&&void 0!==t?t:void 0,deprecated:Boolean(e.deprecationReason),isDeprecated:Boolean(e.deprecationReason),deprecationReason:e.deprecationReason,kind:ct.EnumMember,type:o}})).concat(i)):o===Fe.kk?dt(e,i.concat([{label:"true",detail:String(Fe.kk),documentation:"Not false.",kind:ct.Variable,type:Fe.kk},{label:"false",detail:String(Fe.kk),documentation:"Not true.",kind:ct.Variable,type:Fe.kk}])):i}(f,u,t,e);if(p===lt.VARIABLE&&1===h){const n=(0,Le.MR)(u.inputType);return dt(f,Ct(t,e,f).filter((e=>e.detail===(null==n?void 0:n.name))))}if(p===lt.TYPE_CONDITION&&1===h||p===lt.NAMED_TYPE&&null!=m&&m.kind===lt.TYPE_CONDITION)return function(e,t,n){let r;if(t.parentType)if((0,Le.Lc)(t.parentType)){const e=(0,Le.N_)(t.parentType),o=n.getPossibleTypes(e),i=Object.create(null);for(const e of o)for(const t of e.getInterfaces())i[t.name]=t;r=o.concat(ut(i))}else r=[t.parentType];else r=ut(n.getTypeMap()).filter((e=>(0,Le.ML)(e)&&!e.name.startsWith("__")));return dt(e,r.map((e=>{const t=(0,Le.MR)(e);return{label:String(e),documentation:(null==t?void 0:t.description)||"",kind:ct.Field}})))}(f,u,e);if(p===lt.FRAGMENT_SPREAD&&1===h)return function(e,t,n,r,o){if(!r)return[];const i=n.getTypeMap(),a=function(e){let t;return st(e,(e=>{switch(e.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=e}})),t}(e.state),s=function(e){const t=[];return nt(e,((e,n)=>{n.kind===lt.FRAGMENT_DEFINITION&&n.name&&n.type&&t.push({kind:lt.FRAGMENT_DEFINITION,name:{kind:Ie.b.NAME,value:n.name},selectionSet:{kind:lt.SELECTION_SET,selections:[]},typeCondition:{kind:lt.NAMED_TYPE,name:{kind:Ie.b.NAME,value:n.type}}})})),t}(r);o&&o.length>0&&s.push(...o);return dt(e,s.filter((e=>i[e.typeCondition.name.value]&&!(a&&a.kind===lt.FRAGMENT_DEFINITION&&a.name===e.name.value)&&(0,Le.ML)(t.parentType)&&(0,Le.ML)(i[e.typeCondition.name.value])&&(0,Re.uI)(n,t.parentType,i[e.typeCondition.name.value]))).map((e=>({label:e.name.value,detail:String(i[e.typeCondition.name.value]),documentation:`fragment ${e.name.value} on ${e.typeCondition.name.value}`,labelDetails:{detail:`fragment ${e.name.value} on ${e.typeCondition.name.value}`},kind:ct.Field,type:i[e.typeCondition.name.value]}))))}(f,u,e,t,Array.isArray(o)?o:bt(o));const g=kt(c);return g.kind===lt.FIELD_DEF?dt(f,Object.values(e.getTypeMap()).filter((e=>(0,Le.oH)(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:ct.Function,insertText:(null==i?void 0:i.fillLeafsOnComplete)?e.name+"\n":e.name,insertTextMode:U.adjustIndentation})))):g.kind===lt.INPUT_VALUE_DEF&&2===h?dt(f,Object.values(e.getTypeMap()).filter((e=>(0,Le.dX)(e)&&!e.name.startsWith("__"))).map((e=>({label:e.name,kind:ct.Function,insertText:(null==i?void 0:i.fillLeafsOnComplete)?e.name+"\n$1":e.name,insertTextMode:U.adjustIndentation,insertTextFormat:V.Snippet})))):p===lt.VARIABLE_DEFINITION&&2===h||p===lt.LIST_TYPE&&1===h||p===lt.NAMED_TYPE&&m&&(m.kind===lt.VARIABLE_DEFINITION||m.kind===lt.LIST_TYPE||m.kind===lt.NON_NULL_TYPE)?function(e,t){return dt(e,ut(t.getTypeMap()).filter(Le.dX).map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:ct.Variable}))))}(f,e):p===lt.DIRECTIVE?function(e,t,n){var r;if(null===(r=t.prevState)||void 0===r?void 0:r.kind){const r=n.getDirectives().filter((e=>function(e,t){if(!(null==e?void 0:e.kind))return!1;const{kind:n,prevState:r}=e,{locations:o}=t;switch(n){case lt.QUERY:return o.includes(Pe.H.QUERY);case lt.MUTATION:return o.includes(Pe.H.MUTATION);case lt.SUBSCRIPTION:return o.includes(Pe.H.SUBSCRIPTION);case lt.FIELD:case lt.ALIASED_FIELD:return o.includes(Pe.H.FIELD);case lt.FRAGMENT_DEFINITION:return o.includes(Pe.H.FRAGMENT_DEFINITION);case lt.FRAGMENT_SPREAD:return o.includes(Pe.H.FRAGMENT_SPREAD);case lt.INLINE_FRAGMENT:return o.includes(Pe.H.INLINE_FRAGMENT);case lt.SCHEMA_DEF:return o.includes(Pe.H.SCHEMA);case lt.SCALAR_DEF:return o.includes(Pe.H.SCALAR);case lt.OBJECT_TYPE_DEF:return o.includes(Pe.H.OBJECT);case lt.FIELD_DEF:return o.includes(Pe.H.FIELD_DEFINITION);case lt.INTERFACE_DEF:return o.includes(Pe.H.INTERFACE);case lt.UNION_DEF:return o.includes(Pe.H.UNION);case lt.ENUM_DEF:return o.includes(Pe.H.ENUM);case lt.ENUM_VALUE:return o.includes(Pe.H.ENUM_VALUE);case lt.INPUT_DEF:return o.includes(Pe.H.INPUT_OBJECT);case lt.INPUT_VALUE_DEF:switch(null==r?void 0:r.kind){case lt.ARGUMENTS_DEF:return o.includes(Pe.H.ARGUMENT_DEFINITION);case lt.INPUT_DEF:return o.includes(Pe.H.INPUT_FIELD_DEFINITION)}}return!1}(t.prevState,e)));return dt(e,r.map((e=>({label:e.name,documentation:(null==e?void 0:e.description)||"",kind:ct.Function}))))}return[]}(f,c,e):p===lt.DIRECTIVE_DEF?function(e,t,n){const r=n.getDirectives().find((e=>e.name===t.name));return dt(e,(null==r?void 0:r.args.map((e=>({label:e.name,documentation:e.description||"",kind:ct.Field}))))||[])}(f,c,e):[]}const wt=[{label:"type",kind:ct.Function},{label:"interface",kind:ct.Function},{label:"union",kind:ct.Function},{label:"input",kind:ct.Function},{label:"scalar",kind:ct.Function},{label:"schema",kind:ct.Function}],xt=[{label:"query",kind:ct.Function},{label:"mutation",kind:ct.Function},{label:"subscription",kind:ct.Function},{label:"fragment",kind:ct.Function},{label:"{",kind:ct.Constructor}],Et=(e,t)=>{var n,r,o,i,a,s,l,c,u,d;return(null===(n=e.prevState)||void 0===n?void 0:n.kind)===t?e.prevState:(null===(o=null===(r=e.prevState)||void 0===r?void 0:r.prevState)||void 0===o?void 0:o.kind)===t?e.prevState.prevState:(null===(s=null===(a=null===(i=e.prevState)||void 0===i?void 0:i.prevState)||void 0===a?void 0:a.prevState)||void 0===s?void 0:s.kind)===t?e.prevState.prevState.prevState:(null===(d=null===(u=null===(c=null===(l=e.prevState)||void 0===l?void 0:l.prevState)||void 0===c?void 0:c.prevState)||void 0===u?void 0:u.prevState)||void 0===d?void 0:d.kind)===t?e.prevState.prevState.prevState.prevState:void 0};function Ct(e,t,n){let r,o=null;const i=Object.create({});return nt(e,((e,a)=>{var s;if((null==a?void 0:a.kind)===lt.VARIABLE&&a.name&&(o=a.name),(null==a?void 0:a.kind)===lt.NAMED_TYPE&&o){const e=Et(a,lt.TYPE);(null==e?void 0:e.type)&&(r=t.getType(null==e?void 0:e.type))}if(o&&r&&!i[o]){const e="$"===n.string||"Variable"===(null===(s=null==n?void 0:n.state)||void 0===s?void 0:s.kind)?o:"$"+o;i[o]={detail:r.toString(),insertText:e,label:"$"+o,rawInsert:e,type:r,kind:ct.Variable},o=null,r=null}})),ut(i)}function kt(e){return e.prevState&&e.kind&&[lt.NAMED_TYPE,lt.LIST_TYPE,lt.TYPE,lt.NON_NULL_TYPE].includes(e.kind)?kt(e.prevState):e}var Tt=n(2012),St=n.n(Tt);const Nt=(e,t)=>{if(!t)return[];const n=new Map,r=new Set;(0,De.YR)(e,{FragmentDefinition(e){n.set(e.name.value,!0)},FragmentSpread(e){r.has(e.name.value)||r.add(e.name.value)}});const o=new Set;for(const e of r)!n.has(e)&&t.has(e)&&o.add(St()(t.get(e)));const i=[];for(const e of o)(0,De.YR)(e,{FragmentSpread(e){!r.has(e.name.value)&&t.get(e.name.value)&&(o.add(St()(t.get(e.name.value))),r.add(e.name.value))}}),n.has(e.name.value)||i.push(e);return i};class Dt{constructor(e,t){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=t}setStart(e,t){this.start=new Ot(e,t)}setEnd(e,t){this.end=new Ot(e,t)}}class Ot{constructor(e,t){this.lessThanOrEqualTo=e=>this.line{if(!e)throw new Error(t)};function cn(e,t=null,n,r,o){var i,a;let s=null,l="";o&&(l="string"==typeof o?o:o.reduce(((e,t)=>e+(0,$t.y)(t)+"\n\n"),""));const c=l?`${e}\n\n${l}`:e;try{s=(0,Oe.qg)(c)}catch(e){if(e instanceof en.eO){const t=function(e,t){const n=Ze(),r=n.startState(),o=t.split("\n");ln(o.length>=e.line,"Query text must have more lines than where the error happened");let i=null;for(let t=0;te!==Qt.z&&e!==Zt.T&&(!r||e!==Xt.K)));return n&&Array.prototype.push.apply(o,n),(0,Kt.tf)(e,t,o).filter((e=>{if(e.message.includes("Unknown directive")&&e.nodes){const t=e.nodes[0];if(t&&t.kind===Ie.b.DIRECTIVE){const e=t.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0}))}(t,e,n,r).flatMap((e=>un(e,sn.Error,"Validation"))),i=(0,Kt.tf)(t,e,[tn.k]).flatMap((e=>un(e,sn.Warning,"Deprecation")));return o.concat(i)}(s,t,n,r)}function un(e,t,n){if(!e.nodes)return[];const r=[];for(const[o,i]of e.nodes.entries()){const a="Variable"!==i.kind&&"name"in i&&void 0!==i.name?i.name:"variable"in i&&void 0!==i.variable?i.variable:i;if(a){ln(e.locations,"GraphQL validation error requires locations.");const i=e.locations[o],s=dn(a),l=i.column+(s.end-s.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new Dt(new Ot(i.line-1,i.column-1),new Ot(i.line-1,l))})}}return r}function dn(e){const t=e.loc;return ln(t,"Expected ASTNode to have a location."),t}const{INLINE_FRAGMENT:fn}=Ie.b},1653:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAA8YAA4AAAAAIAwAAA7AAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjQbhlocNgZgAIEAEQwKqgSlAAuCFgABNgIkA4QoBCAFgwoHIBt7G6OilpNWKhD8VYINh9o6+IoibkckFlELYovEnhpqEw5rTn/e1suwBSjaNcu4suz9n3jcWQcRrZXVPXCMsw+MIR+FMuwj40/HiI9xLIFVlPzc/Dy/zT/3XR5pAGb8ja8LKxcWukgzwYhaYGNU/ZQFxqLUVbuKhLd+MV/4m+w5Zhh/TqIcXmFFha2pbQiiNXT2bz+xUcQ2ClBzETSjEUCShW9ljKqw9VUk7wy62bj2txdropFFKSzBta/GGt+Y27eGWiiWyt7ti0gzFst8qOChQ0ge4e4Xlam50l6yu9/9571CniizBRTuQZii8rm9Jr3MJgXO5YHQ3fG/aiWhUC9UCdG2QoIRVa66XrCQtr6N6d8LoO2fUBohjoNU0/lfEUIVAcAkglGnCGlSg8wqhwgFeZAnQEDWpEUo2+9j5/Cu5Dy+i3cj9dodvLthT+/jQXc+j+9jQ4rqABCgQFVZgfgbAXENFhRCfbAhSLvJmn6RxTicVSDHB8Ca+Dznc0Prx37oR1d4uq/bnwjmW1rxklSRuTn+CMHl/qVl73Pmgos3js84a3+7n77Iq+1vE+1Fe3EhBXNMmbNkzZa9pZZz5IzPDdJur1AZsxYCloY5KVb4Id2f00SQWKZSyXIZxEFWb0ciZZweIg8biEPPNMhI8ZFLF97yWrRtwsAfKm+mqTSkjNRXIJrSEARYZDpddprdgvERSxcFBLCwysSI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=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1761:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAABMAAA4AAAAAIkQAABKpAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbjEocNgZgAIFkEQwKqTygfguBSAABNgIkA4MMBCAFgnQHIBtLHFWHQtg4AAgt+xD8f52gxWG1uR5EatWEsKGGtrrROAfbhgbsqkcTXk+8cSb2t2LbKz7fybPEC/ukeYa3NyHy/D9ptl4bLoAhSAAYADqGVSx0WQHh8fA07v9/zew9c855UgO/QqKTM9GVxCaWLiSi/R+i08U+4Of29xZE90hzRJVRRI2MqR/4UtI5wcAcNqPDApToUSUYjSpcT+QXXn5a+zaz/t9buUVDpmsnSVyZE7W9V3YRW6gkIqFwHZOEz8yZNyAkBtwZfVEjWAD/BrYL002IehYA///at/ruuWv2EJXQqGQIjZBoM3fW3rxv6/Pmr9n8VURk8MZm0uZNVBEb8CpidRMVQqs0Ks39/d7Xgqlu7zjk2DtDHDX28bUfHg0KCwA3QGEkSBBCijSEPHkIRYoQODgINWoQxx2HOOkUBJ4+hKFzEBe4QyBQwDZgGwRowBZSlGAuvdzKCWRuiw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6LCNe1GDCVC+1utfTOYo1v+SSOc7HAvE4wytTlXUe+RkelmT2KhmFdt5wZg2jjugI5TN0qGeumPHCU7q7xqOJ9UhzbjgIzSSe2aImUZQz1ZW045HSAjNVbmaJ68W6Moh0bPPKbvJBWGvUcrVK7POi7FHLdZS5PIvFJUlsGtTUNGMx5tfIKPnxvE52XGmPglod6sU1vGujF1f5HGi8dZoFMc1DQ3NrXKMRyDd5I7/kieZBc6L5GLOyvpFHEmqF6iTJ732AALfJxsMJFgKwA3SoE2ggwJI3NCRXwI1AG45gcmk4CgvCxuiwMYaGY8mIGU4Ti1CVVxZOFMPgkNgwPx/fCDF1VbVssJhpsMY8wGt08yAPZaFfgYCgQ7MMV5VXeK7CopLyVK6oYHeGCIKUT2S7cAOlC67C/UgG9QblFo2Tmk7cJ202gUvUXU9OCF4lw2ihDIiQXHhAwktVwWGNoCL8amGvIJ8inPdkZW5obOMoJM5HlSraakb/CJ4AAA=="},1838:(e,t,n)=>{"use strict";n.d(t,{U:()=>u});var r=n(5487),o=n(5198),i=n(4833),a=n(6382),s=n(8255),l=n(2704),c=n(2114);function u(e){return{ListValue(t){const n=(0,c.yl)(e.getParentInputType());if(!(0,c.Fs)(n))return d(e,t),!1},ObjectValue(t){const n=(0,c.MR)(e.getInputType());if(!(0,c.qK)(n))return d(e,t),!1;const i=(0,r.K)(t.fields,(e=>e.name.value));for(const r of Object.values(n.getFields()))if(!i[r.name]&&(0,c.YX)(r)){const i=(0,o.N)(r.type);e.reportError(new s.eO(`Field "${n.name}.${r.name}" of required type "${i}" was not provided.`,t))}},ObjectField(t){const n=(0,c.MR)(e.getParentInputType());if(!e.getInputType()&&(0,c.qK)(n)){const r=(0,a.x)(t.name.value,Object.keys(n.getFields()));e.reportError(new s.eO(`Field "${t.name.value}" is not defined by type "${n.name}".`+(0,i.a)(r),t))}},NullValue(t){const n=e.getInputType();(0,c.bd)(n)&&e.reportError(new s.eO(`Expected value of type "${(0,o.N)(n)}", found ${(0,l.y)(t)}.`,t))},EnumValue:t=>d(e,t),IntValue:t=>d(e,t),FloatValue:t=>d(e,t),StringValue:t=>d(e,t),BooleanValue:t=>d(e,t)}}function d(e,t){const n=e.getInputType();if(!n)return;const r=(0,c.MR)(n);if((0,c.zf)(r))try{if(void 0===r.parseLiteral(t,void 0)){const r=(0,o.N)(n);e.reportError(new s.eO(`Expected value of type "${r}", found ${(0,l.y)(t)}.`,t))}}catch(r){const i=(0,o.N)(n);r instanceof s.eO?e.reportError(r):e.reportError(new s.eO(`Expected value of type "${i}", found ${(0,l.y)(t)}; `+r.message,t,void 0,void 0,void 0,r))}else{const r=(0,o.N)(n);e.reportError(new s.eO(`Expected value of type "${r}", found ${(0,l.y)(t)}.`,t))}}},1875:(e,t,n)=>{"use strict";n.d(t,{dY:()=>l,ot:()=>s});var r=n(2455),o=n(424),i=n(7350);class a{constructor(e,t){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=t}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let t;if(this._fragments)t=this._fragments;else{t=Object.create(null);for(const e of this.getDocument().definitions)e.kind===r.b.FRAGMENT_DEFINITION&&(t[e.name.value]=e);this._fragments=t}return t[e]}getFragmentSpreads(e){let t=this._fragmentSpreads.get(e);if(!t){t=[];const n=[e];let o;for(;o=n.pop();)for(const e of o.selections)e.kind===r.b.FRAGMENT_SPREAD?t.push(e):e.selectionSet&&n.push(e.selectionSet);this._fragmentSpreads.set(e,t)}return t}getRecursivelyReferencedFragments(e){let t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];const n=Object.create(null),r=[e.selectionSet];let o;for(;o=r.pop();)for(const e of this.getFragmentSpreads(o)){const o=e.name.value;if(!0!==n[o]){n[o]=!0;const e=this.getFragment(o);e&&(t.push(e),r.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t}}class s extends a{constructor(e,t,n){super(e,n),this._schema=t}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class l extends a{constructor(e,t,n,r){super(t,r),this._schema=e,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let t=this._variableUsages.get(e);if(!t){const n=[],r=new i.D(this._schema);(0,o.YR)(e,(0,i.S)(r,{VariableDefinition:()=>!1,Variable(e){n.push({node:e,type:r.getInputType(),defaultValue:r.getDefaultValue()})}})),t=n,this._variableUsages.set(e,t)}return t}getRecursiveVariableUsages(e){let t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(const n of this.getRecursivelyReferencedFragments(e))t=t.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(e,t)}return t}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}},1918:e=>{"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},1945:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAALsAA4AAAAABWAAAAKbAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANBEMCoIYgXsLEAABNgIkAxwEIAWCdAcgG0AEAB6HcYyyEjO2Dy0eKLv4XvfsrGs+wIhEBOHOERRRTI2158fc/aln0WYmSJq8uTRSIgUyIVMqpfa/7uYHCqzWDuHREj0f5UuuL+ZAokTaYgiIs5sF5aUutjO7QhBlgMaYvCAIIqqoCggoq0+HjRlX70MGclDLyR3Z8fb0q/ectzCv30obmLesvO5hBhRhcp7kToaLpaRXpL0htKmb5C3rIgzUIwA1fnqrhHSbqXhA3v+sK1wRtcWuhdyg9E5tGXERkaAhroCGeNqCnJxAm6m1Sb58SICvFhXFWnVAAWQoYRjYADJUQQqIYm0uSZKkfpYv1sv21dm9b7kWbV6i3BQ2Z/sOf/hl+ezXH88LRz75pnLuq4/MO/Zx+eyHc3x9VDn3yfx9n1ILyusq3ps75y90fVZ657PJ2iXgF+odHbvzv7Lrm+uTsPR0WJqYcelN7180rHDDnbeWbrx0QHht49uXjCzffOsd5RsvGvHe4yF5o+Ej97/ZMP62+Z+3Wz/08CtZ/FezhpdvG/nb6PMhC9vNvHFx3Du9X47etewROuONg4L0v2eI+L9X7dt0evq+gNihfvWttiuWK4f8VmxWBM/+WK8b8F6Y9evfLf57r9SjuA2URBAobPm/Smni3y3+n1TqgQEACsl5awAI/5AetjNp65A+/38vDAUXaayPL4CMKHYkEFC0DlfIlbAMegyqlmGU2eSTO58TTHX2xLyWvlczc/wY7eDo5WxlYenKyMvNg9Go5MAatqis2Jty2oytLaPupFxOlsgFObsjM05dBxMHVwcMbeFma4xFh8jZxUr2e62Th09I7Bd96I2RI3gzYzqKcsHjqZzGjsamlojTwdmCy9bKFNm7IBcudRU5BU09BQ5eTm5coMaMAw=="},1954:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="},1981:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var r=n(8255);function o(e){const t=[],n=[];return{OperationDefinition:e=>(t.push(e),!1),FragmentDefinition:e=>(n.push(e),!1),Document:{leave(){const o=Object.create(null);for(const n of t)for(const t of e.getRecursivelyReferencedFragments(n))o[t.name.value]=!0;for(const t of n){const n=t.name.value;!0!==o[n]&&e.reportError(new r.eO(`Fragment "${n}" is never used.`,t))}}}}}},2012:e=>{"use strict";function t(e,t){if(null!=e)return e;var n=new Error(void 0!==t?t:"Got unexpected "+e);throw n.framesToPop=1,n}e.exports=t,e.exports.default=t,Object.defineProperty(e.exports,"__esModule",{value:!0})},2027:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8255);function o(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const o=e.getRecursiveVariableUsages(n);for(const{node:i}of o){const o=i.name.value;!0!==t[o]&&e.reportError(new r.eO(n.name?`Variable "$${o}" is not defined by operation "${n.name.value}".`:`Variable "$${o}" is not defined.`,[i,n]))}}},VariableDefinition(e){t[e.variable.name.value]=!0}}}},2039:(e,t,n)=>{"use strict";let r;n.d(t,{Y:()=>r}),function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(r||(r={}))},2112:()=>{},2114:(e,t,n)=>{"use strict";n.d(t,{Zb:()=>ve,zP:()=>be,VA:()=>he,KT:()=>Q,Gc:()=>Z,bh:()=>ae,Ag:()=>ie,hI:()=>me,g0:()=>fe,N_:()=>G,Ye:()=>Y,el:()=>O,Yq:()=>L,L9:()=>V,qL:()=>T,D0:()=>z,dL:()=>F,sF:()=>te,ZX:()=>P,wG:()=>_,qC:()=>C,yh:()=>B,Zx:()=>x,j:()=>A,EG:()=>N,B3:()=>K,Kx:()=>ce,MR:()=>ne,yl:()=>$,Lc:()=>W,ML:()=>H,oF:()=>D,qK:()=>I,dX:()=>j,kD:()=>k,zf:()=>U,Fs:()=>M,sy:()=>ee,bd:()=>R,wj:()=>J,YQ:()=>E,oH:()=>q,xP:()=>pe,YX:()=>we,lg:()=>w,Xj:()=>b,CK:()=>S,lS:()=>X});var r=n(5198),o=n(5487),i=n(3871),a=n(698),s=n(3217),l=n(6394),c=n(792),u=n(4833),d=n(1070);function f(e){return e}var p=n(6382),h=n(8255),m=n(2455),g=n(2704),v=n(8542),y=n(567);function b(e){return w(e)||E(e)||k(e)||S(e)||D(e)||I(e)||M(e)||R(e)}function A(e){if(!b(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL type.`);return e}function w(e){return(0,c.h)(e,ie)}function x(e){if(!w(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Scalar type.`);return e}function E(e){return(0,c.h)(e,ae)}function C(e){if(!E(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Object type.`);return e}function k(e){return(0,c.h)(e,he)}function T(e){if(!k(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Interface type.`);return e}function S(e){return(0,c.h)(e,me)}function N(e){if(!S(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Union type.`);return e}function D(e){return(0,c.h)(e,ve)}function O(e){if(!D(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Enum type.`);return e}function I(e){return(0,c.h)(e,be)}function L(e){if(!I(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Input Object type.`);return e}function M(e){return(0,c.h)(e,Q)}function F(e){if(!M(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL List type.`);return e}function R(e){return(0,c.h)(e,Z)}function P(e){if(!R(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL Non-Null type.`);return e}function j(e){return w(e)||D(e)||I(e)||X(e)&&j(e.ofType)}function V(e){if(!j(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL input type.`);return e}function q(e){return w(e)||E(e)||k(e)||S(e)||D(e)||X(e)&&q(e.ofType)}function B(e){if(!q(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL output type.`);return e}function U(e){return w(e)||D(e)}function z(e){if(!U(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL leaf type.`);return e}function H(e){return E(e)||k(e)||S(e)}function Y(e){if(!H(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL composite type.`);return e}function W(e){return k(e)||S(e)}function G(e){if(!W(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL abstract type.`);return e}class Q{constructor(e){b(e)||(0,s.U)(!1,`Expected ${(0,r.N)(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class Z{constructor(e){J(e)||(0,s.U)(!1,`Expected ${(0,r.N)(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function X(e){return M(e)||R(e)}function K(e){if(!X(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL wrapping type.`);return e}function J(e){return b(e)&&!R(e)}function _(e){if(!J(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL nullable type.`);return e}function $(e){if(e)return R(e)?e.ofType:e}function ee(e){return w(e)||E(e)||k(e)||S(e)||D(e)||I(e)}function te(e){if(!ee(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL named type.`);return e}function ne(e){if(e){let t=e;for(;X(t);)t=t.ofType;return t}}function re(e){return"function"==typeof e?e():e}function oe(e){return"function"==typeof e?e():e}class ie{constructor(e){var t,n,o,i;const l=null!==(t=e.parseValue)&&void 0!==t?t:f;this.name=(0,y.I)(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:f,this.parseValue=l,this.parseLiteral=null!==(o=e.parseLiteral)&&void 0!==o?o:(e,t)=>l((0,v.F)(e,t)),this.extensions=(0,a.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(i=e.extensionASTNodes)&&void 0!==i?i:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||(0,s.U)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,r.N)(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||(0,s.U)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||(0,s.U)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class ae{constructor(e){var t;this.name=(0,y.I)(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=(0,a.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=()=>le(e),this._interfaces=()=>se(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||(0,s.U)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,r.N)(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:de(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function se(e){var t;const n=re(null!==(t=e.interfaces)&&void 0!==t?t:[]);return Array.isArray(n)||(0,s.U)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function le(e){const t=oe(e.fields);return ue(t)||(0,s.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,i.I)(t,((t,n)=>{var o;ue(t)||(0,s.U)(!1,`${e.name}.${n} field config must be an object.`),null==t.resolve||"function"==typeof t.resolve||(0,s.U)(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${(0,r.N)(t.resolve)}.`);const i=null!==(o=t.args)&&void 0!==o?o:{};return ue(i)||(0,s.U)(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:(0,y.I)(n),description:t.description,type:t.type,args:ce(i),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:(0,a.z)(t.extensions),astNode:t.astNode}}))}function ce(e){return Object.entries(e).map((([e,t])=>({name:(0,y.I)(e),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:(0,a.z)(t.extensions),astNode:t.astNode})))}function ue(e){return(0,d.Z)(e)&&!Array.isArray(e)}function de(e){return(0,i.I)(e,(e=>({description:e.description,type:e.type,args:fe(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function fe(e){return(0,l.L)(e,(e=>e.name),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})))}function pe(e){return R(e.type)&&void 0===e.defaultValue}class he{constructor(e){var t;this.name=(0,y.I)(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=(0,a.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=le.bind(void 0,e),this._interfaces=se.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,s.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,r.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:de(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class me{constructor(e){var t;this.name=(0,y.I)(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=(0,a.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._types=ge.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,s.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,r.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function ge(e){const t=re(e.types);return Array.isArray(t)||(0,s.U)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class ve{constructor(e){var t,n,i;this.name=(0,y.I)(e.name),this.description=e.description,this.extensions=(0,a.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._values=(n=this.name,ue(i=e.values)||(0,s.U)(!1,`${n} values must be an object with value names as keys.`),Object.entries(i).map((([e,t])=>(ue(t)||(0,s.U)(!1,`${n}.${e} must refer to an object with a "value" key representing an internal value but got: ${(0,r.N)(t)}.`),{name:(0,y.A)(e),description:t.description,value:void 0!==t.value?t.value:e,deprecationReason:t.deprecationReason,extensions:(0,a.z)(t.extensions),astNode:t.astNode})))),this._valueLookup=new Map(this._values.map((e=>[e.value,e]))),this._nameLookup=(0,o.K)(this._values,(e=>e.name))}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(e){return this._nameLookup[e]}serialize(e){const t=this._valueLookup.get(e);if(void 0===t)throw new h.eO(`Enum "${this.name}" cannot represent value: ${(0,r.N)(e)}`);return t.name}parseValue(e){if("string"!=typeof e){const t=(0,r.N)(e);throw new h.eO(`Enum "${this.name}" cannot represent non-string value: ${t}.`+ye(this,t))}const t=this.getValue(e);if(null==t)throw new h.eO(`Value "${e}" does not exist in "${this.name}" enum.`+ye(this,e));return t.value}parseLiteral(e,t){if(e.kind!==m.b.ENUM){const t=(0,g.y)(e);throw new h.eO(`Enum "${this.name}" cannot represent non-enum value: ${t}.`+ye(this,t),e)}const n=this.getValue(e.value);if(null==n){const t=(0,g.y)(e);throw new h.eO(`Value "${t}" does not exist in "${this.name}" enum.`+ye(this,t),e)}return n.value}toConfig(){const e=(0,l.L)(this.getValues(),(e=>e.name),(e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function ye(e,t){const n=e.getValues().map((e=>e.name)),r=(0,p.x)(t,n);return(0,u.a)("the enum value",r)}class be{constructor(e){var t;this.name=(0,y.I)(e.name),this.description=e.description,this.extensions=(0,a.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._fields=Ae.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=(0,i.I)(this.getFields(),(e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode})));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Ae(e){const t=oe(e.fields);return ue(t)||(0,s.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,i.I)(t,((t,n)=>(!("resolve"in t)||(0,s.U)(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,y.I)(n),description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:(0,a.z)(t.extensions),astNode:t.astNode})))}function we(e){return R(e.type)&&void 0===e.defaultValue}},2168:(e,t,n)=>{"use strict";n.d(t,{k:()=>a});var r=n(1306),o=n(8255),i=n(2114);function a(e){return{Field(t){const n=e.getFieldDef(),i=null==n?void 0:n.deprecationReason;if(n&&null!=i){const a=e.getParentType();null!=a||(0,r.V)(!1),e.reportError(new o.eO(`The field ${a.name}.${n.name} is deprecated. ${i}`,t))}},Argument(t){const n=e.getArgument(),i=null==n?void 0:n.deprecationReason;if(n&&null!=i){const a=e.getDirective();if(null!=a)e.reportError(new o.eO(`Directive "@${a.name}" argument "${n.name}" is deprecated. ${i}`,t));else{const a=e.getParentType(),s=e.getFieldDef();null!=a&&null!=s||(0,r.V)(!1),e.reportError(new o.eO(`Field "${a.name}.${s.name}" argument "${n.name}" is deprecated. ${i}`,t))}}},ObjectField(t){const n=(0,i.MR)(e.getParentInputType());if((0,i.qK)(n)){const r=n.getFields()[t.name.value],i=null==r?void 0:r.deprecationReason;null!=i&&e.reportError(new o.eO(`The input field ${n.name}.${r.name} is deprecated. ${i}`,t))}},EnumValue(t){const n=e.getEnumValue(),a=null==n?void 0:n.deprecationReason;if(n&&null!=a){const s=(0,i.MR)(e.getInputType());null!=s||(0,r.V)(!1),e.reportError(new o.eO(`The enum value "${s.name}.${n.name}" is deprecated. ${a}`,t))}}}}},2278:(e,t,n)=>{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function i(e,t,i){var s=e.getLineHandle(t.line),l=t.ch-1,c=i&&i.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=o(i),d=!c&&l>=0&&u.test(s.text.charAt(l))&&r[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(f>0?1:0)),f,p,i);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function a(e,t,i,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=o(s),f=i>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),p=t.line;p!=f;p+=i){var h=e.getLine(p);if(h){var m=i>0?0:h.length-1,g=i>0?h.length:-1;if(!(h.length>l))for(p==t.line&&(m=t.ch-(i<0?1:0));m!=g;m+=i){var v=h.charAt(m);if(d.test(v)&&(void 0===a||(e.getTokenTypeAt(n(p,m+1))||"")==(a||""))){var y=r[v];if(y&&">"==y.charAt(1)==i>0)u.push(v);else{if(!u.length)return{pos:n(p,m),ch:v};u.pop()}}}}}return p-i!=(i>0?e.lastLine():e.firstLine())&&null}function s(e,r,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=o&&o.highlightNonMatching,l=[],c=e.listSelections(),u=0;u{"use strict";let r;n.d(t,{b:()=>r}),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(r||(r={}))},2475:(e,t,n)=>{"use strict";n.d(t,{J:()=>i});var r=n(6712),o=n(8255);function i(e){return{Field:t,Directive:t};function t(t){var n;const i=null!==(n=t.arguments)&&void 0!==n?n:[],a=(0,r.$)(i,(e=>e.name.value));for(const[t,n]of a)n.length>1&&e.reportError(new o.eO(`There can be only one argument named "${t}".`,n.map((e=>e.name))))}}},2568:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;ri(l,n))ci(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(ci(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function A(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,A(e),!m)if(null!==r(c))m=!0,M(x);else{var t=r(u);null!==t&&F(w,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,y(T),T=-1),h=!0;var i=p;try{for(A(n),f=r(c);null!==f&&(!(f.expirationTime>n)||e&&!D());){var a=f.callback;if("function"==typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?f.callback=s:f===r(c)&&o(c),A(n)}else o(c);f=r(c)}if(null!==f)var l=!0;else{var d=r(u);null!==d&&F(w,d.startTime-n),l=!1}return l}finally{f=null,p=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,C=!1,k=null,T=-1,S=5,N=-1;function D(){return!(t.unstable_now()-Ne||125a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(y(T),T=-1):g=!0,F(w,i-a))):(e.sortIndex=s,n(c,e),m||h||(m=!0,M(x))),e},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},2584:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(6712),o=n(8255);function i(e){return{OperationDefinition(t){var n;const i=null!==(n=t.variableDefinitions)&&void 0!==n?n:[],a=(0,r.$)(i,(e=>e.variable.name.value));for(const[t,n]of a)n.length>1&&e.reportError(new o.eO(`There can be only one variable named "$${t}".`,n.map((e=>e.variable.name))))}}}},2591:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var r=n(1918);function o(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")}},2704:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(424),o=n(7714);const i=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function a(e){return s[e.charCodeAt(0)]}const s=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function l(e){return(0,r.YR)(e,c)}const c={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>u(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=f("(",u(e.variableDefinitions,", "),")"),n=u([e.operation,u([e.name,t]),u(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+f(" = ",n)+f(" ",u(r," "))},SelectionSet:{leave:({selections:e})=>d(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:o}){const i=f("",e,": ")+t;let a=i+f("(",u(n,", "),")");return a.length>80&&(a=i+f("(\n",p(u(n,"\n")),"\n)")),u([a,u(r," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+f(" ",u(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>u(["...",f("on ",e),u(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o})=>`fragment ${e}${f("(",u(n,", "),")")} on ${t} ${f("",u(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,o.yo)(e):`"${e.replace(i,a)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+u(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+u(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+f("(",u(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>f("",e,"\n")+u(["schema",u(t," "),d(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>f("",e,"\n")+u(["scalar",t,u(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>f("",e,"\n")+u(["type",t,f("implements ",u(n," & ")),u(r," "),d(o)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:o})=>f("",e,"\n")+t+(h(n)?f("(\n",p(u(n,"\n")),"\n)"):f("(",u(n,", "),")"))+": "+r+f(" ",u(o," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:o})=>f("",e,"\n")+u([t+": "+n,f("= ",r),u(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>f("",e,"\n")+u(["interface",t,f("implements ",u(n," & ")),u(r," "),d(o)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>f("",e,"\n")+u(["union",t,u(n," "),f("= ",u(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>f("",e,"\n")+u(["enum",t,u(n," "),d(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>f("",e,"\n")+u([t,u(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>f("",e,"\n")+u(["input",t,u(n," "),d(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:o})=>f("",e,"\n")+"directive @"+t+(h(n)?f("(\n",p(u(n,"\n")),"\n)"):f("(",u(n,", "),")"))+(r?" repeatable":"")+" on "+u(o," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>u(["extend schema",u(e," "),d(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>u(["extend scalar",e,u(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>u(["extend type",e,f("implements ",u(t," & ")),u(n," "),d(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>u(["extend interface",e,f("implements ",u(t," & ")),u(n," "),d(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>u(["extend union",e,u(t," "),f("= ",u(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>u(["extend enum",e,u(t," "),d(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>u(["extend input",e,u(t," "),d(n)]," ")}};function u(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function d(e){return f("{\n",p(u(e,"\n")),"\n}")}function f(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function p(e){return f(" ",e.replace(/\n/g,"\n "))}function h(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}},2804:(e,t,n)=>{!function(e){function t(t,n,r){var o,i=t.getWrapperElement();return(o=i.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),e.addClass(i,"dialog-opened"),o}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,o,i){i||(i={}),n(this,null);var a=t(this,r,i.bottom),s=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),i.onClose&&i.onClose(a)}}var u,d=a.getElementsByTagName("input")[0];return d?(d.focus(),i.value&&(d.value=i.value,!1!==i.selectValueOnOpen&&d.select()),i.onInput&&e.on(d,"input",(function(e){i.onInput(e,d.value,c)})),i.onKeyUp&&e.on(d,"keyup",(function(e){i.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){i&&i.onKeyDown&&i.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==i.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&o(d.value,t))})),!1!==i.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==i.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,o,i){n(this,null);var a=t(this,r,i&&i.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var f=0;f{"use strict";n.d(t,{n:()=>o});var r=n(8255);function o(e){const t=Object.create(null),n=[],o=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(i(e),!1)};function i(a){if(t[a.name.value])return;const s=a.name.value;t[s]=!0;const l=e.getFragmentSpreads(a.selectionSet);if(0!==l.length){o[s]=n.length;for(const t of l){const a=t.name.value,s=o[a];if(n.push(t),void 0===s){const t=e.getFragment(a);t&&i(t)}else{const t=n.slice(s),o=t.slice(0,-1).map((e=>'"'+e.name.value+'"')).join(", ");e.reportError(new r.eO(`Cannot spread fragment "${a}" within itself`+(""!==o?` via ${o}.`:"."),t))}n.pop()}o[s]=void 0}}}},2868:(e,t,n)=>{"use strict";let r;n.d(t,{H:()=>r}),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(r||(r={}))},2878:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAB38AA4AAAAAQFAAAB2lAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGkAbjgwcgTAGYACDFBEMCtpgyyoLg3oAATYCJAOHcAQgBYMAByAbrzVFB2LYOABo7N+XKCoG0eD/OoEbQ/R9SCk6Co0tw5CRuS8arZIo5VZbrrY7musceT/cbsXfaJajqVAAOHS7rE8Nn8E0r4xcj9HQSGLyENo9/J/JJtkHuhJYwShF1IA6foB35wd+br2/gj4YtEodZQCDdvSQBQNGiaBUW0hECBYl9qgQBtJtn2AVZZEzThmyRLewajg+hAIAdLoB5bmyit47tW/GLfGMZG+h//8rgFZ49FiVpWy2tGZniPyORbvwKuEd0KOOc6348XObtI1W8dDIX5AUyVXE7t+boXK2LbWT3F8dhkf+XpfZ6vt/TbSGQreO4Vg3o8h3IegPpt+bpGiAi2r11tJK+v4m2tzISLthXVAO6JBCXDGsfcBcB6Ho0lRpytRpey7aMh2wOd/POiNw2t4rRgif8IlggjHafX/fcy1BZNpqHogH+uw11Nr+nq4NgppcfiAEFEEA1oaCpc8AgsgMgoQC4acE4ootCAQKmAeYBwIEMBdFB2C233H3/SkfGXvGSZSPDTv6RMoneZ91CmXIiUefcQohCEGiAAEUoMBTBXeihZZ/wgB96MMypQZqmKdZPXzQjEIQPkzdzMx5F7pHSX7VYxqc2zyfPbE+8nv+gzX0A9fMMYTOgwm9iCQbTxy5blecK0pwLZNcmpRFOid1I3yi2E2ImXRhM5dfHFde8kMgF+c243zuLR90nqpa9gtDHPabzAjD54QfJ2UuaDdD1rhQmwT3snJ0sSlgAULZ5lgR50/VSVufLiyNLqnKlQiMN+nZzUzOr4S+lsfmY/BYlEMQN4k8Raaf1L6M0QqQD7GuOOe7yOjzgTUNOBRB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getSchema(),n=t?t.getTypeMap():Object.create(null),i=Object.create(null);return{EnumTypeDefinition:a,EnumTypeExtension:a};function a(t){var a;const s=t.name.value;i[s]||(i[s]=Object.create(null));const l=null!==(a=t.values)&&void 0!==a?a:[],c=i[s];for(const t of l){const i=t.name.value,a=n[s];(0,o.oF)(a)&&a.getValue(i)?e.reportError(new r.eO(`Enum value "${s}.${i}" already exists in the schema. It cannot also be defined in this type extension.`,t.name)):c[i]?e.reportError(new r.eO(`Enum value "${s}.${i}" can only be defined once.`,[c[i],t.name])):c[i]=t.name}return!1}}},3002:(e,t,n)=>{"use strict";n.r(t);var r=n(1448),o=n.n(r),i=n(1505),a=n(6078);o().defineMode("graphql-results",(e=>{const t=(0,i.r5)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:l,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a.A,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},l={Document:[(0,i.p)("{"),(0,i.p_)("Entry",(0,i.p)(",")),(0,i.p)("}")],Entry:[(0,i.t)("String","def"),(0,i.p)(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,i.t)("Number","number")],StringValue:[(0,i.t)("String","string")],BooleanValue:[(0,i.t)("Keyword","builtin")],NullValue:[(0,i.t)("Keyword","keyword")],ListValue:[(0,i.p)("["),(0,i.p_)("Value",(0,i.p)(",")),(0,i.p)("]")],ObjectValue:[(0,i.p)("{"),(0,i.p_)("ObjectField",(0,i.p)(",")),(0,i.p)("}")],ObjectField:[(0,i.t)("String","property"),(0,i.p)(":"),"Value"]}},3016:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6758),o=n.n(r),i=n(935),a=n.n(i)()(o());a.push([e.id,".docExplorerWrap{height:unset!important;min-width:unset!important;width:unset!important}.docExplorerWrap svg{display:unset}.doc-explorer-title{font-size:var(--font-size-h2);font-weight:var(--font-weight-medium)}.doc-explorer-rhs{display:none}.graphiql-explorer-root{font-family:var(--font-family-mono)!important;font-size:var(--font-size-body)!important;padding:0!important}.graphiql-explorer-root>div>div{border-color:hsla(var(--color-neutral),var(--alpha-background-heavy))!important;padding-top:var(--px-16)}.graphiql-explorer-root input{background:unset}.graphiql-explorer-root select{background:hsl(var(--color-base))!important;border:1px solid hsla(var(--color-neutral),var(--alpha-secondary));border-radius:var(--border-radius-4);color:hsl(var(--color-neutral))!important;margin:0 var(--px-8);padding:var(--px-4) var(--px-6)}.graphiql-operation-title-bar .toolbar-button{line-height:0;margin-left:var(--px-8);color:hsla(var(--color-neutral),var(--alpha-secondary, .6));font-size:var(--font-size-h3);vertical-align:middle}.graphiql-explorer-graphql-arguments input{line-height:0}.graphiql-explorer-actions{border-color:hsla(var(--color-neutral),var(--alpha-background-heavy))!important}\n",""]);const s=a},3051:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3123:(e,t,n)=>{"use strict";n.r(t);var r=n(1448),o=n.n(r),i=n(1505),a=n(6078);o().defineMode("graphql-variables",(e=>{const t=(0,i.r5)({eatWhitespace:e=>e.eatSpace(),lexRules:s,parseRules:l,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:a.A,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}}));const s={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},l={Document:[(0,i.p)("{"),(0,i.p_)("Variable",(0,i.m7)((0,i.p)(","))),(0,i.p)("}")],Variable:[c("variable"),(0,i.p)(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[(0,i.t)("Number","number")],StringValue:[(0,i.t)("String","string")],BooleanValue:[(0,i.t)("Keyword","builtin")],NullValue:[(0,i.t)("Keyword","keyword")],ListValue:[(0,i.p)("["),(0,i.p_)("Value",(0,i.m7)((0,i.p)(","))),(0,i.p)("]")],ObjectValue:[(0,i.p)("{"),(0,i.p_)("ObjectField",(0,i.m7)((0,i.p)(","))),(0,i.p)("}")],ObjectField:[c("attribute"),(0,i.p)(":"),"Value"]};function c(e){return{style:e,match:e=>"String"===e.kind,update(e,t){e.name=t.value.slice(1,-1)}}}},3144:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(7400)},3153:(e,t,n)=>{"use strict";function r(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}n.d(t,{A:()=>r})},3217:(e,t,n)=>{"use strict";function r(e,t){if(!Boolean(e))throw new Error(t)}n.d(t,{U:()=>r})},3335:(e,t,n)=>{"use strict";var r=n(4041),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},3420:(e,t,n)=>{"use strict";n.d(t,{MD:()=>o,TZ:()=>l,VK:()=>a,_m:()=>i,a6:()=>d,aR:()=>s,dI:()=>c,fT:()=>f,i7:()=>p,xu:()=>u});var r=n(2455);function o(e){return i(e)||u(e)||f(e)}function i(e){return e.kind===r.b.OPERATION_DEFINITION||e.kind===r.b.FRAGMENT_DEFINITION}function a(e){return e.kind===r.b.FIELD||e.kind===r.b.FRAGMENT_SPREAD||e.kind===r.b.INLINE_FRAGMENT}function s(e){return e.kind===r.b.VARIABLE||e.kind===r.b.INT||e.kind===r.b.FLOAT||e.kind===r.b.STRING||e.kind===r.b.BOOLEAN||e.kind===r.b.NULL||e.kind===r.b.ENUM||e.kind===r.b.LIST||e.kind===r.b.OBJECT}function l(e){return s(e)&&(e.kind===r.b.LIST?e.values.some(l):e.kind===r.b.OBJECT?e.fields.some((e=>l(e.value))):e.kind!==r.b.VARIABLE)}function c(e){return e.kind===r.b.NAMED_TYPE||e.kind===r.b.LIST_TYPE||e.kind===r.b.NON_NULL_TYPE}function u(e){return e.kind===r.b.SCHEMA_DEFINITION||d(e)||e.kind===r.b.DIRECTIVE_DEFINITION}function d(e){return e.kind===r.b.SCALAR_TYPE_DEFINITION||e.kind===r.b.OBJECT_TYPE_DEFINITION||e.kind===r.b.INTERFACE_TYPE_DEFINITION||e.kind===r.b.UNION_TYPE_DEFINITION||e.kind===r.b.ENUM_TYPE_DEFINITION||e.kind===r.b.INPUT_OBJECT_TYPE_DEFINITION}function f(e){return e.kind===r.b.SCHEMA_EXTENSION||p(e)}function p(e){return e.kind===r.b.SCALAR_TYPE_EXTENSION||e.kind===r.b.OBJECT_TYPE_EXTENSION||e.kind===r.b.INTERFACE_TYPE_EXTENSION||e.kind===r.b.UNION_TYPE_EXTENSION||e.kind===r.b.ENUM_TYPE_EXTENSION||e.kind===r.b.INPUT_OBJECT_TYPE_EXTENSION}},3537:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});var r=n(8255),o=n(2114);function i(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),o=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(t){var i;const s=t.name.value;o[s]||(o[s]=Object.create(null));const l=null!==(i=t.fields)&&void 0!==i?i:[],c=o[s];for(const t of l){const o=t.name.value;a(n[s],o)?e.reportError(new r.eO(`Field "${s}.${o}" already exists in the schema. It cannot also be defined in this type extension.`,t.name)):c[o]?e.reportError(new r.eO(`Field "${s}.${o}" can only be defined once.`,[c[o],t.name])):c[o]=t.name}return!1}}function a(e,t){return!!((0,o.YQ)(e)||(0,o.kD)(e)||(0,o.qK)(e))&&null!=e.getFields()[t]}},3548:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3604:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="},3656:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3858:(e,t,n)=>{"use strict";function r(e,t){let n=0,r=0;for(;n0);let c=0;do{++r,c=10*c+s-o,s=t.charCodeAt(r)}while(a(s)&&c>0);if(lc)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}n.d(t,{p:()=>r});const o=48,i=57;function a(e){return!isNaN(e)&&o<=e&&e<=i}},3871:(e,t,n)=>{"use strict";function r(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}n.d(t,{I:()=>r})},3906:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAABnoAA4AAAAANCAAABmTAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmobmnocNgZgAIIEEQwKvFyuQwuCEAABNgIkA4QcBCAFgwAHIBsCKxNuLDxsHADb+BwnipK9GMj+6wROh0BumfMiQUaoWDWaO4tGa4WtoMBMtavqtY9jb+C3vkgTR9zAS1e/IWxxDF8nN8NnIySZbQnEMfLSJu0/j0DNGWDPYAygn5QTdsbNTj30B5rbv1uyEcI2asaoFhtnA2LT5ogc1WNUbGR+OkdahUGpWImfEQbGTnvg5bSUZNmnbZKdUhrPBMAA8r0bfrNviW+exRNAwgNgAnCj14Z0y0NEpndEJQYcwb5mQTQJojV027rMxWjbnm5QEFNrXv7Xrv7PmovbEC2FaJXXoeJN1OMyScVP/kE693vn3tyqdjdUGoXedOBNAVFUJpNf7wKFUdmHn6u0efc3V8CUeEo8Qp4+X2FqTP7/2fTe/MlCFv9mMVvKzdGU56aUhTJbVhXyMlOCA3YFBSyBjai9ugrjSG1PWFVbm5WaYS8hpY9WXEMXvMakfb2MWbr52d5cqHmLkIcY4+hYuy0CMCADAO7DgBSoUYOALkMIGDOGwEYbIbCZCQSYDkLgsMMQsGQNAVu2EGBxgYAbPwgE4EEAAQyAHQA7gAAIAFugwQDO/GqtA7Re7BdToPVm0ZsAr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uq0wSm6oOJQEYfZYUlsexVQpudHk9VkRGqKw+lbVMrU7y3khnuJGncrCsqw6FJQH5gwAas4FCPnag2hRXO8Miw9bhzKp+K6wMubNS+fytfNApjd8qiwj5Zc1v2qvLn1QyDivz5PVTePmD9uBYkwqOZDl+BsrLCqoDC5Z5KQX9O/V6wD4f4PXZnEcu/vgovhQxRlCG3ny97WxGqoIMpp0h64XU248pa4Ywn2Qsw6zj27LXi98wkl86KqlU/qb50EE6fcbrMqVKr2hVPoXUK4iOoza6o17KFVXV1dyE1Ie0a3sh5SPGrOhWqdIrvxUPmpuEvjr5kU1VhzYuar5p04g4GVCBAPghjwJL+CtjtvIVxuq6cQPYsIDgSNuhj8EpCNA5nYIBGeDeFqu7LS4+BQ9a+CTAnc+/Kyt1/Ff67yz27UYGhlYeBP/ny8BCbEAm8qZ6ZyTQKF4WDph2txqY5ZXtWdIubJTdFFtF/iBWyQOoqY2szWAcLHbqexZvSgtLI0Nbh3d1SEwKy+1jhpbwqERqxkryfYht5vUdq6QG5T1ejIUBp3lSB0Pj5BJFNYQSRF27G4/laT+exYVVows="},3958:(e,t,n)=>{"use strict";n.d(t,{Hh:()=>a,IR:()=>s,Q0:()=>o,a2:()=>l,t8:()=>i});var r=n(2114);function o(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:c(e.fieldDef)?null:e.parentType}}function i(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}function a(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:c(e.fieldDef)?null:e.parentType}}function s(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?(0,r.MR)(e.inputType):void 0}}function l(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}function c(e){return"__"===e.name.slice(0,2)}},3971:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(1306);const o=/\r\n|[\n\r]/g;function i(e,t){let n=0,i=1;for(const a of e.body.matchAll(o)){if("number"==typeof a.index||(0,r.V)(!1),a.index>=t)break;n=a.index+a[0].length,i+=1}return{line:i,column:t+1-n}}},4041:(e,t,n)=>{"use strict";e.exports=n(4304)},4086:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAAMAAA4AAAAABWwAAAKuAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANBEMCoIYgXkLEAABNgIkAxwEIAWDAAcgG0oEAB6D426JQgSiDJGrY+EepR5ejwf4/fWd+/C1EBKYZDS7sRFxHTf9uCJn/m9Of4qsOwRQBbqEex0QSbKziM9Pj42dA85/tYTLU84Cj+f+PIAlq3AtV5GCrQWUqr11TNFedSEUjKs7rSju46fX7RWCSHFAeYQcQRBEKIqiAgIKlGZBdO5a3w4akEBWj6orkgSzThrq5iF0WjfiKGe7e/0dAHkwOR8nW+GblHR72hyEGmzEl02NcDPu9oBKt35NVVBcoyEuIJNhau72SE3EHkhapkdqCiZGhBhliQWUJVETSCQCNfr8o/boWoBjI3miLHqQC4ojH22AaUBxFAUpIBJlJeIVGIvLFI6PlFi4hGYVs0brZ4ZZlT0rbz1SLT+50xlW3X269vh2x+CpO/n7bw02ebvIys0wMkpteMHUIq4PGfxCRBdKjxXGaDRIc42rK+a/qgeebsfBvjGMiQ14cnJjW8fSe6fHlr2NIrgbeH2jS+k9X+md9WJP/5IvZ8LRg1cQ3gz+dJMePnr2/6ZSiy3c9rHc87Zj4tqOx0WLe1U0VR2OOEt9kq4gV/r/NBEyVbPvpL70poCoTunu3LVVZ4nW3xWV8gAKP5VqBMD10Pruq+7/52x5c4B8EQjkzs5oyJ/1JzxT0mgEACA3XjUZACFDut7UuAEqPZepikCuTcprJBVAcSJREzIBeaYSC4kSGAs2BJU5IFLcQjt+sxNAqr55kwOx947iBrvVCRYwpBuDQusVLFWyFCmCVcEwCg8JVsPPK1GwEjxesNZJv6dyHtID6dYP8UnUCvPAemHBGiA+jD6CVgilD8+tWyfSPRiYXwVJDNNkydPUzvrRmeBZvFdArqSTDSCJ3ALcvDp0JBHWjTK8pb0Qvx7N35CkXo0yFRq1qZAgVaJkYiA7H3AA"},4143:(e,t,n)=>{"use strict";n.d(t,{BW:()=>c,FV:()=>p,Fh:()=>d,N1:()=>m,PZ:()=>v,YC:()=>g,kk:()=>h,nM:()=>u,qS:()=>f});var r=n(5198),o=n(1070),i=n(2455),a=n(2704),s=n(8255),l=n(2114);const c=2147483647,u=-2147483648,d=new l.Ag({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=y(e);if("boolean"==typeof t)return t?1:0;let n=t;if("string"==typeof t&&""!==t&&(n=Number(t)),"number"!=typeof n||!Number.isInteger(n))throw new s.eO(`Int cannot represent non-integer value: ${(0,r.N)(t)}`);if(n>c||nc||ec||te.name===t))}function y(e){if((0,o.Z)(e)){if("function"==typeof e.valueOf){const t=e.valueOf();if(!(0,o.Z)(t))return t}if("function"==typeof e.toJSON)return e.toJSON()}return e}},4206:(e,t,n)=>{!function(e){"use strict";var t="CodeMirror-lint-markers";function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(t,r,o,i){var a=function(t,n,r){var o=document.createElement("div");function i(t){if(!o.parentNode)return e.off(document,"mousemove",i);var n=Math.max(0,t.clientY-o.offsetHeight-5),r=Math.max(0,Math.min(t.clientX+5,o.ownerDocument.defaultView.innerWidth-o.offsetWidth));o.style.top=n+"px",o.style.left=r+"px"}return o.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,o.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(o):document.body.appendChild(o),e.on(document,"mousemove",i),i(n),null!=o.style.opacity&&(o.style.opacity=1),o}(t,r,o);function s(){var t;e.off(i,"mouseout",s),a&&((t=a).parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout((function(){n(t)}),600)),a=null)}var l=setInterval((function(){if(a)for(var e=i;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){s();break}}if(!a)return clearInterval(l)}),400);e.on(i,"mouseout",s)}function o(e,t,n){for(var o in this.marked=[],t instanceof Function&&(t={getAnnotations:t}),t&&!0!==t||(t={}),this.options={},this.linterOptions=t.options||{},i)this.options[o]=i[o];for(var o in t)i.hasOwnProperty(o)?null!=t[o]&&(this.options[o]=t[o]):t.options||(this.linterOptions[o]=t[o]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var o=n.getBoundingClientRect(),i=(o.left+o.right)/2,a=(o.top+o.bottom)/2,s=e.findMarksAt(e.coordsChar({left:i,top:a},"client")),c=[],u=0;u1,c.tooltips)),c.highlightLines&&e.addLineClass(d,"wrap","CodeMirror-lint-line-"+p)}}c.onUpdateLinting&&c.onUpdateLinting(n,u,e)}}function d(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){c(e)}),t.options.delay))}e.defineOption("lint",!1,(function(n,r,i){if(i&&i!=e.Init&&(a(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",d),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var s=n.getOption("gutters"),l=!1,u=0;u{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var A=b.prototype=new y;A.constructor=b,m(A,v.prototype),A.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,E={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,o)&&!C.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1{"use strict";n.d(t,{E:()=>i});var r=n(6712),o=n(8255);function i(e){return{DirectiveDefinition(e){var t;const r=null!==(t=e.arguments)&&void 0!==t?t:[];return n(`@${e.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(e){var t;const r=e.name.value,o=null!==(t=e.fields)&&void 0!==t?t:[];for(const e of o){var i;n(`${r}.${e.name.value}`,null!==(i=e.arguments)&&void 0!==i?i:[])}return!1}function n(t,n){const i=(0,r.$)(n,(e=>e.name.value));for(const[n,r]of i)r.length>1&&e.reportError(new o.eO(`Argument "${t}(${n}:)" can only be defined once.`,r.map((e=>e.name))));return!1}}},4466:(e,t,n)=>{"use strict";n.d(t,{y:()=>c});var r=n(4833),o=n(6382),i=n(8255),a=n(3420),s=n(4143),l=n(8957);function c(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),s=Object.create(null);for(const t of e.getDocument().definitions)(0,a.a6)(t)&&(s[t.name.value]=!0);const l=[...Object.keys(n),...Object.keys(s)];return{NamedType(t,c,d,f,p){const h=t.name.value;if(!n[h]&&!s[h]){var m;const n=null!==(m=p[2])&&void 0!==m?m:d,s=null!=n&&"kind"in(g=n)&&((0,a.xu)(g)||(0,a.fT)(g));if(s&&u.includes(h))return;const c=(0,o.x)(h,s?u.concat(l):l);e.reportError(new i.eO(`Unknown type "${h}".`+(0,r.a)(c),t))}var g}}}const u=[...s.YC,...l.V4].map((e=>e.name))},4594:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAABU0AA4AAAAAJLgAABTeAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbi3YcNgZgAIFkEQwKrkSlZwuBSAABNgIkA4MMBCAFgzIHIBueHrOiVpNataT4nwk2nboHhRIwDgpKyhjHLyLzQxmFwTYyDE5esZ3+2EabADRB2gAnegV3sg2h4vmn/cH/ujNn5kEfUoTVzJCo7tDcxAh1qBL7aK6c2RAfYY5oH5jywGzfVxj2dQKMqiNV1SGa2/3fsqgYgzZIg4jcRiiRIlUD6TaSLHVGBGIUGIlSIiAWaB/Nlf92N3lGYYsKSKjZnfSTB8DmMi27e2FKIBTaKlRVsztJrgQ/v1ar83g3J/7Bm3pohA6p0P68Qebt32Vvzv+J+e5iNnizRruQrw0imsSTJfEmoUCohFIvESLYkJkG86bdWhrvEfNUcXTtnhaEruXzgVaEu0VRWgYqCFQSqCJQjUANMogmzaJVj+izItbskHExWMtGIeDVV4+zjD3+RFc+yF6RlRIHstekRMaC7I2haQkgC2+4KiUBmJDOA0pVozaXNfBR9QCXV2CAnZZ/Pa939bym2tY015bSKkq/1bW5rl2W3bLb9zSVW4Drhr5Xrw/3s6jw6wK1JMm+D+n/woA6vO4yKdplbgIyweLmY2gZzWw+oG+f+/mW70DuJgYtfT7LzTxPyqddT+nC3/NdfLWlUjfjXEzmQ/hpKLyQ98ii2GeJyRwXTdK9mWCse91WkQMY68rJFB88T8t35mpaolV7x53YfELcGYe/k5e+Q8OkBTnHYqOSF4OEEujtXNjCIqJi4hKSUjJyiiqq1KhTr1m7bj36DRk1YdKUaTPmrFizRZJMikLoKiG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LBBB7f5SuhHF3rD7iKaer/sXCd6bi9V57pCqtkg0PwS15zTpP/Xh53uZEOSf74EPNOsl0NdkC6gnptWCcrgFSMqadxvxPi0vaaNQKaHEWQ/0XjRFSVY01PJr91+7jWZMMQ0Qq8F45WkTAZ+gGRqUcAorIBw2zQNMD+E++aMzfTgjptQ3ESwC7QbZyTlSvAks5q+3wqS6LsC6sxsGUwreQJ0kvV/aOHuz0W+ta1zhcVMltnswAX1aBlryUxplHde/b9VfMh7BOt4vGjkv3HS6XXwojp3WsGXahpyMjEZUx8CbddNNpTrsksM098IMisB4L3fFgXAF+j946+e/0ZXZa5MRUgIwAJW3Pg/BcCqgzRJ/4cdAfBl7TxX9J0inGb5Cxj7p6s+yVU8Sxy1HZqJhlqok+Yo14TGKKcDqO70ovf1NVfqmi91PJOVrqWP2+tpvrPteVV87I+VL9EEy6pS8xMOB4HoaM7ACLAxZHO4RGA8blWJ8nKMmB2V0ocpqW7QWYOZ7D+JKlFzOcoX1kElsqpcXGuTUN7p6/+Y1xPrlZiR4morkeaSclGOFsd++qOXxYzl1B6eFe58Oltc5e+IT9CoTVQzSczYIjC04jc8RVsb8i7Q6rZqJ4hoN0hJgFZArskxuSVHtBu0S7Q79k7pzzmlQFdLpIzcToRA93ckLeCQ8oHQjByMh+dd6QADaxVwMQCmoZCNaYTqaRoj721xdhon6yvw5o871Tn+ARuXrjy7cezQkTu2WtVquom2IZeWKM7szzriwi7KPRjOwrOl6hbxfiaZvvGQ9B6K9aUdgrti24TU+di9cyON3naGdndX67WTWpiAb4EkdeEWaHudJm3evU2Wu1eZmJx3vnOlVVWHj0w1o65s632U9I3DYJdZWF2skW+D37gRfQZMmuOq4ucnVWNAvgGJsacFAA=="},4671:(e,t,n)=>{"use strict";var r=n(1448),o=n.n(r),i=n(9786),a=n(3958);function s(e,t){const n=t.target||t.srcElement;if(!(n instanceof HTMLElement))return;if("SPAN"!==(null==n?void 0:n.nodeName))return;const r=n.getBoundingClientRect(),o={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=o,e.state.jump.isHoldingModifier&&d(e)}function l(e){e.state.jump.isHoldingModifier||!e.state.jump.cursor?e.state.jump.isHoldingModifier&&e.state.jump.marker&&f(e):e.state.jump.cursor=null}function c(e,t){if(e.state.jump.isHoldingModifier||t.key!==(u?"Meta":"Control"))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&d(e);const n=a=>{a.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&f(e),o().off(document,"keyup",n),o().off(document,"click",r),e.off("mousedown",i))},r=t=>{const{destination:n,options:r}=e.state.jump;n&&r.onClick(n,t)},i=(t,n)=>{e.state.jump.destination&&(n.codemirrorIgnore=!0)};o().on(document,"keyup",n),o().on(document,"click",r),e.on("mousedown",i)}o().defineOption("jump",!1,((e,t,n)=>{if(n&&n!==o().Init){const t=e.state.jump.onMouseOver;o().off(e.getWrapperElement(),"mouseover",t);const n=e.state.jump.onMouseOut;o().off(e.getWrapperElement(),"mouseout",n),o().off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const n=e.state.jump={options:t,onMouseOver:s.bind(null,e),onMouseOut:l.bind(null,e),onKeyDown:c.bind(null,e)};o().on(e.getWrapperElement(),"mouseover",n.onMouseOver),o().on(e.getWrapperElement(),"mouseout",n.onMouseOut),o().on(document,"keydown",n.onKeyDown)}}));const u="undefined"!=typeof navigator&&navigator.userAgent.includes("Mac");function d(e){if(e.state.jump.marker)return;const{cursor:t,options:n}=e.state.jump,r=e.coordsChar(t),o=e.getTokenAt(r,!0),i=n.getDestination||e.getHelper(r,"jump");if(i){const t=i(o,n,e);if(t){const n=e.markText({line:r.line,ch:o.start},{line:r.line,ch:o.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=n,e.state.jump.destination=t}}}function f(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}o().registerHelper("jump","graphql",((e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:o}=n,s=(0,i.A)(t.schema,n);return"Field"===r&&0===o&&s.fieldDef||"AliasedField"===r&&2===o&&s.fieldDef?(0,a.Q0)(s):"Directive"===r&&1===o&&s.directiveDef?(0,a.t8)(s):"Argument"===r&&0===o&&s.argDef?(0,a.Hh)(s):"EnumValue"===r&&s.enumValue?(0,a.IR)(s):"NamedType"===r&&s.type?(0,a.a2)(s):void 0}))},4719:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});var r=n(8255),o=n(2455);function i(e){let t=0;return{Document(e){t=e.definitions.filter((e=>e.kind===o.b.OPERATION_DEFINITION)).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new r.eO("This anonymous operation must be the only defined operation.",n))}}}},4728:(e,t,n)=>{!function(e){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new t)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function o(e,t,n){return e.getSearchCursor(t,n,{caseFold:r(t),multiline:!0})}function i(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(n,r))}function a(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function s(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function l(e,t,n){t.queryText=n,t.query=s(n),e.removeOverlay(t.overlay,r(t.query)),t.overlay=function(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,"searching";n?t.pos=n.index:t.skipToEnd()}}}(t.query,r(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,r(t.query)))}function c(t,r,o,a){var s=n(t);if(s.query)return u(t,r);var c=t.getSelection()||s.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),o&&t.openDialog){var f=null,h=function(n,r){e.e_stop(r),n&&(n!=s.queryText&&(l(t,s,n),s.posFrom=s.posTo=t.getCursor()),f&&(f.style.opacity=1),u(t,r.shiftKey,(function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((f=r).style.opacity=.4)})))};(function(e,t,n,r,o){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){d(e)},onKeyDown:o,bottom:e.options.search.bottom})})(t,p(t),c,h,(function(r,o){var i=e.keyName(r),a=t.getOption("extraKeys"),s=a&&a[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(r),l(t,n(t),o),t.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(r),h(o,r))})),a&&c&&(l(t,s,c),u(t,r))}else i(t,p(t),"Search for:",c,(function(e){e&&!s.query&&t.operation((function(){l(t,s,e),s.posFrom=s.posTo=t.getCursor(),u(t,r)}))}))}function u(t,r,i){t.operation((function(){var a=n(t),s=o(t,a.query,r?a.posFrom:a.posTo);(s.find(r)||(s=o(t,a.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))}))}function d(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function f(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var o=2;o{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAABX0AA4AAAAAJRAAABWfAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmQbjEocNgZgAIFkEQwKrnCmEwuBSAABNgIkA4MMBCAFgwoHIBv2HiMRwsYBgKA2n+CvErg5YHVUkRAJo8aMqlEXjSMQVVUI6BratcEu3sY+K7ZekZeA+A0njZBklodqv8j3p3tmdw+YExmNDtAheGKX00EoHxYmFQmkWBjkHp7m9u9iY7vbmoqRigEWosAXkErltiNG5XAoTBmcQQn+AUahfoRWfpmA0V8wEmSBYEEbCfqjFvQsfYGTMtEF8B8A/Q/gH/Cv6Te7j3ct9L3rjt41CA3K4LLvWjZl/uaX4W9oNRdKPr2H7jgL6jQS1ZoqpSsOBRLXhEI4hwUJGhujCVj/LcbY6dJ0qD2ma4OVuMgfXDi53SubwDhW8tKexpmpkSF27EEcOWQ+hyzkkMUc4mIyd7WCu/HmPmK5VAppTwWWnVdAgFxyvMoF0LPPDSWAw3VF+bnA4ab8dBlwuD1ZIQcOoNtuyJcDHgiHPlDsNFpZIAmo0nzO01UoYE+jI1djPK62RW11i25b2/4sa0daU8CIV+Tk/iiJyuiU+hla6b4Ymsp/SdD1c54WYrICuy+DAnm6W+LBnUx2DVCOxqn53kqk+eZrgq/O7P74j7aIk+5z1vtg/Lj/SWHqK7OfGWUqjh35+oQWvdQg5a8d64pqw6dbvqMlDoZHj9/Hqzc//TxeY5mToe174gl9Z2qQ2k6OWKlP6mwi72fEfM5dCn1fuVRWDLlqPpr+5U0wKzsnN69AwUJFihUvWSYoW75ipWq16ukbmVpY29ja2Tt6ePnhBCWL28URN/PpHCv5T5T4q/x99f/W/pTgmIFEvTPrMyTHpKDfQEq9k9YnsWzjXOPAqJ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yWTqcFK0dCQ6sqA3NY/cEjgtW8qVu8Gka5xgIZFI4XpunBUWSieoYr1knc7J9c2XyXlqOrl5WWDIUCn04SdcVOUsNPGDFkGA+hWoW9OcAA=="},4833:(e,t,n)=>{"use strict";n.d(t,{a:()=>o});const r=5;function o(e,t){const[n,o]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const a=o.map((e=>`"${e}"`));switch(a.length){case 0:return"";case 1:return i+a[0]+"?";case 2:return i+a[0]+" or "+a[1]+"?"}const s=a.slice(0,r),l=s.pop();return i+s.join(", ")+", or "+l+"?"}},4862:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BREAK:()=>ae.sP,BreakingChangeType:()=>jt,DEFAULT_DEPRECATION_REASON:()=>x.Il,DangerousChangeType:()=>Vt,DirectiveLocation:()=>se.H,ExecutableDefinitionsRule:()=>he.T,FieldsOnCorrectTypeRule:()=>me.Z,FragmentsOnCompositeTypesRule:()=>ge.T,GRAPHQL_MAX_INT:()=>_.BW,GRAPHQL_MIN_INT:()=>_.nM,GraphQLBoolean:()=>_.kk,GraphQLDeferDirective:()=>x.BR,GraphQLDeprecatedDirective:()=>x.yK,GraphQLDirective:()=>x.RR,GraphQLEnumType:()=>E.Zb,GraphQLError:()=>g.eO,GraphQLFloat:()=>_.qS,GraphQLID:()=>_.N1,GraphQLIncludeDirective:()=>x.HQ,GraphQLInputObjectType:()=>E.zP,GraphQLInt:()=>_.Fh,GraphQLInterfaceType:()=>E.VA,GraphQLList:()=>E.KT,GraphQLNonNull:()=>E.Gc,GraphQLObjectType:()=>E.bh,GraphQLScalarType:()=>E.Ag,GraphQLSchema:()=>J.V4,GraphQLSkipDirective:()=>x.MQ,GraphQLSpecifiedByDirective:()=>x.gw,GraphQLStreamDirective:()=>x.nK,GraphQLString:()=>_.FV,GraphQLUnionType:()=>E.hI,Kind:()=>A.b,KnownArgumentNamesRule:()=>ve.P,KnownDirectivesRule:()=>ye.e,KnownFragmentNamesRule:()=>be.K,KnownTypeNamesRule:()=>Ae.y,Lexer:()=>re.J,Location:()=>b.aZ,LoneAnonymousOperationRule:()=>we.P,LoneSchemaDefinitionRule:()=>Be.l,NoDeprecatedCustomRule:()=>Ze.k,NoFragmentCyclesRule:()=>xe.n,NoSchemaIntrospectionCustomRule:()=>de,NoUndefinedVariablesRule:()=>Ee.Z,NoUnusedFragmentsRule:()=>Ce.z,NoUnusedVariablesRule:()=>ke.p,OperationTypeNode:()=>b.cE,OverlappingFieldsCanBeMergedRule:()=>Te.K,PossibleFragmentSpreadsRule:()=>Se.y,PossibleTypeExtensionsRule:()=>Qe.S,ProvidedRequiredArgumentsRule:()=>Ne.X,ScalarLeafsRule:()=>De.A,SchemaMetaFieldDef:()=>w.S0,SingleFieldSubscriptionsRule:()=>Oe.R,Source:()=>ee.k,Token:()=>b.ou,TokenKind:()=>oe.Y,TypeInfo:()=>an.D,TypeKind:()=>w.fY,TypeMetaFieldDef:()=>w.Xe,TypeNameMetaFieldDef:()=>w.of,UniqueArgumentDefinitionNamesRule:()=>We.E,UniqueArgumentNamesRule:()=>Ie.J,UniqueDirectiveNamesRule:()=>Ge.Z,UniqueDirectivesPerLocationRule:()=>Le.U,UniqueEnumValueNamesRule:()=>He.g,UniqueFieldDefinitionNamesRule:()=>Ye.X,UniqueFragmentNamesRule:()=>Me.K,UniqueInputFieldNamesRule:()=>Fe.C,UniqueOperationNamesRule:()=>Re.H,UniqueOperationTypesRule:()=>Ue.u,UniqueTypeNamesRule:()=>ze.i,UniqueVariableNamesRule:()=>Pe._,ValidationContext:()=>fe.dY,ValuesOfCorrectTypeRule:()=>je.U,VariablesAreInputTypesRule:()=>Ve.J,VariablesInAllowedPositionRule:()=>qe.E,__Directive:()=>w.sv,__DirectiveLocation:()=>w.$4,__EnumValue:()=>w.B1,__Field:()=>w.z9,__InputValue:()=>w.Ym,__Schema:()=>w.em,__Type:()=>w.P8,__TypeKind:()=>w.B0,assertAbstractType:()=>E.N_,assertCompositeType:()=>E.Ye,assertDirective:()=>x.yq,assertEnumType:()=>E.el,assertEnumValueName:()=>$.A,assertInputObjectType:()=>E.Yq,assertInputType:()=>E.L9,assertInterfaceType:()=>E.qL,assertLeafType:()=>E.D0,assertListType:()=>E.dL,assertName:()=>$.I,assertNamedType:()=>E.sF,assertNonNullType:()=>E.ZX,assertNullableType:()=>E.wG,assertObjectType:()=>E.qC,assertOutputType:()=>E.yh,assertScalarType:()=>E.Zx,assertSchema:()=>J.GU,assertType:()=>E.j,assertUnionType:()=>E.EG,assertValidName:()=>Rt,assertValidSchema:()=>u.Y,assertWrappingType:()=>E.B3,astFromValue:()=>gt.K,buildASTSchema:()=>st,buildClientSchema:()=>nn.D,buildSchema:()=>lt,coerceInputValue:()=>sn.v,concatAST:()=>Ot,createSourceEventStream:()=>ue,defaultFieldResolver:()=>H,defaultTypeResolver:()=>z,doTypesOverlap:()=>ln.uI,execute:()=>S,executeSync:()=>N,extendSchema:()=>nt,findBreakingChanges:()=>qt,findDangerousChanges:()=>Bt,formatError:()=>g.Wk,getDirectiveValues:()=>C.YY,getEnterLeaveForKind:()=>ae.XO,getIntrospectionQuery:()=>Je.I,getLocation:()=>te.g,getNamedType:()=>E.MR,getNullableType:()=>E.yl,getOperationAST:()=>tn.A,getOperationRootType:()=>Ke,getVisitFn:()=>ae.UY,graphql:()=>Z,graphqlSync:()=>X,introspectionFromSchema:()=>_e,introspectionTypes:()=>w.V4,isAbstractType:()=>E.Lc,isCompositeType:()=>E.ML,isConstValueNode:()=>le.TZ,isDefinitionNode:()=>le.MD,isDirective:()=>x.qT,isEnumType:()=>E.oF,isEqualType:()=>ln.n8,isExecutableDefinitionNode:()=>le._m,isInputObjectType:()=>E.qK,isInputType:()=>E.dX,isInterfaceType:()=>E.kD,isIntrospectionType:()=>w.Yh,isLeafType:()=>E.zf,isListType:()=>E.Fs,isNamedType:()=>E.sy,isNonNullType:()=>E.bd,isNullableType:()=>E.wj,isObjectType:()=>E.YQ,isOutputType:()=>E.oH,isRequiredArgument:()=>E.xP,isRequiredInputField:()=>E.YX,isScalarType:()=>E.lg,isSchema:()=>J.Wl,isSelectionNode:()=>le.VK,isSpecifiedDirective:()=>x.Qe,isSpecifiedScalarType:()=>_.PZ,isType:()=>E.Xj,isTypeDefinitionNode:()=>le.a6,isTypeExtensionNode:()=>le.i7,isTypeNode:()=>le.dI,isTypeSubTypeOf:()=>ln.sP,isTypeSystemDefinitionNode:()=>le.xu,isTypeSystemExtensionNode:()=>le.fT,isUnionType:()=>E.CK,isValidNameError:()=>Pt,isValueNode:()=>le.aR,isWrappingType:()=>E.lS,lexicographicSortSchema:()=>dt,locatedError:()=>y,parse:()=>l.qg,parseConstValue:()=>l.u8,parseType:()=>l.Mb,parseValue:()=>l.$x,print:()=>ie.y,printError:()=>g.yJ,printIntrospectionSchema:()=>yt,printLocation:()=>ne.V,printSchema:()=>vt,printSourceLocation:()=>ne.C,printType:()=>xt,responsePathAsArray:()=>h.A,separateOperations:()=>It,specifiedDirectives:()=>x.rc,specifiedRules:()=>pe.g,specifiedScalarTypes:()=>_.YC,stripIgnoredCharacters:()=>Ft,subscribe:()=>ce,syntaxError:()=>Xe.I,typeFromAST:()=>rn.v,validate:()=>c.tf,validateSchema:()=>u.i,valueFromAST:()=>tt.i,valueFromASTUntyped:()=>on.F,version:()=>r,versionInfo:()=>o,visit:()=>ae.YR,visitInParallel:()=>ae.oP,visitWithTypeInfo:()=>an.S});const r="16.1.0-experimental-stream-defer.6",o=Object.freeze({major:16,minor:1,patch:0,preReleaseTag:"experimental-stream-defer.6"});var i=n(3217);function a(e){return"function"==typeof(null==e?void 0:e.then)}function s(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}var l=n(8195),c=n(8553),u=n(7626),d=n(5198),f=n(1306),p=n(1070),h=n(7407),m=n(3153),g=n(8255);class v extends Error{constructor(e){super("Unexpected error value: "+(0,d.N)(e)),this.name="NonErrorThrown",this.thrownValue=e}}function y(e,t,n){var r;const o=(i=e)instanceof Error?i:new v(i);var i,a;return a=o,Array.isArray(a.path)?o:new g.eO(o.message,null!==(r=o.nodes)&&void 0!==r?r:t,o.source,o.positions,n,o)}var b=n(9762),A=n(2455),w=n(8957),x=n(7274),E=n(2114),C=n(9390),k=n(5261);const T=function(){let e;return function(t,n,r){void 0===e&&(e=new WeakMap);let o=e.get(t);void 0===o&&(o=new WeakMap,e.set(t,o));let i=o.get(n);void 0===i&&(i=new WeakMap,o.set(n,i));let a=i.get(r);return void 0===a&&(s=t,l=n,c=r,a=(0,k.S)(s.schema,s.fragments,s.variableValues,l,c),i.set(r,a)),a;var s,l,c}}();function S(e){arguments.length<2||(0,i.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:o}=e;O(t,n,r);const s=I(e);if(!("schema"in s))return{errors:s};try{const{operation:e}=s,t=function(e,t,n){const r=e.schema.getRootType(t.operation);if(null==r)throw new g.eO(`Schema is not configured to execute ${t.operation} operation.`,t);const{fields:o,patches:i}=(0,k._)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;let l;switch(t.operation){case b.cE.QUERY:l=L(e,r,n,s,o);break;case b.cE.MUTATION:l=function(e,t,n,r,o){return function(e,t){let n=Object.create(null);for(const r of e)n=a(n)?n.then((e=>t(e,r))):t(n,r);return n}(o.entries(),((o,[i,s])=>{const l=(0,h.f)(r,i,t.name),c=M(e,t,n,s,l);return void 0===c?o:a(c)?c.then((e=>(o[i]=e,o))):(o[i]=c,o)}))}(e,r,n,s,o);break;case b.cE.SUBSCRIPTION:l=L(e,r,n,s,o)}for(const t of i){const{label:o,fields:i}=t;e.dispatcher.addFields(e,r,n,i,o,s)}return l}(s,e,o);if(a(t))return t.then((e=>{const t=D(e,s.errors);return s.dispatcher.hasSubsequentPayloads()?s.dispatcher.get(t):t}),(e=>(s.errors.push(e),D(null,s.errors))));const n=D(t,s.errors);return s.dispatcher.hasSubsequentPayloads()?s.dispatcher.get(n):n}catch(e){return s.errors.push(e),D(null,s.errors)}}function N(e){const t=S(e);if(a(t)||s(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function D(e,t){return 0===t.length?{data:e}:{errors:t,data:e}}function O(e,t,n){t||(0,i.U)(!1,"Must provide document."),(0,u.Y)(e),null==n||(0,p.Z)(n)||(0,i.U)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function I(e){var t,n;const{schema:r,document:o,rootValue:i,contextValue:a,variableValues:s,operationName:l,fieldResolver:c,typeResolver:u,subscribeFieldResolver:d}=e;let f;const p=Object.create(null);for(const e of o.definitions)switch(e.kind){case A.b.OPERATION_DEFINITION:if(null==l){if(void 0!==f)return[new g.eO("Must provide operation name if query contains multiple operations.")];f=e}else(null===(t=e.name)||void 0===t?void 0:t.value)===l&&(f=e);break;case A.b.FRAGMENT_DEFINITION:p[e.name.value]=e}if(!f)return null!=l?[new g.eO(`Unknown operation named "${l}".`)]:[new g.eO("Must provide an operation.")];const h=null!==(n=f.variableDefinitions)&&void 0!==n?n:[],m=(0,C.VE)(r,h,null!=s?s:{},{maxErrors:50});return m.errors?m.errors:{schema:r,fragments:p,rootValue:i,contextValue:a,operation:f,variableValues:m.coerced,fieldResolver:null!=c?c:H,typeResolver:null!=u?u:z,subscribeFieldResolver:null!=d?d:H,dispatcher:new W,errors:[]}}function L(e,t,n,r,o,i){const s=Object.create(null);let l=!1;for(const[c,u]of o.entries()){const o=M(e,t,n,u,(0,h.f)(r,c,t.name),i);void 0!==o&&(s[c]=o,a(o)&&(l=!0))}return l?(c=s,Promise.all(Object.values(c)).then((e=>{const t=Object.create(null);for(const[n,r]of Object.keys(c).entries())t[r]=e[n];return t}))):s;var c}function M(e,t,n,r,o,i){var s,l;const c=null!==(s=null==i?void 0:i.errors)&&void 0!==s?s:e.errors,u=Y(e.schema,t,r[0]);if(!u)return;const d=u.type,f=null!==(l=u.resolve)&&void 0!==l?l:e.fieldResolver,p=F(e,u,r,t,o);try{const t=f(n,(0,C.IA)(u,r[0],e.variableValues),e.contextValue,p);let s;return s=a(t)?t.then((t=>P(e,d,r,p,o,t,i))):P(e,d,r,p,o,t,i),a(s)?s.then(void 0,(e=>R(y(e,r,(0,h.A)(o)),d,c))):s}catch(e){return R(y(e,r,(0,h.A)(o)),d,c)}}function F(e,t,n,r,o){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:o,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function R(e,t,n){if((0,E.bd)(t))throw e;return n.push(e),null}function P(e,t,n,r,o,i,l){if(i instanceof Error)throw i;if((0,E.bd)(t)){const a=P(e,t.ofType,n,r,o,i,l);if(null===a)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return a}return null==i?null:(0,E.Fs)(t)?function(e,t,n,r,o,i,l){var c;const u=t.ofType,d=null!==(c=null==l?void 0:l.errors)&&void 0!==c?c:e.errors;if(s(i)){const t=i[Symbol.asyncIterator]();return function(e,t,n,r,o,i,s){var l;let c=!1;const u=null!==(l=null==s?void 0:s.errors)&&void 0!==l?l:e.errors,d=j(e,n);return new Promise(((l,f)=>{!function p(m,g){if(d&&"number"==typeof d.initialCount&&m>=d.initialCount)return e.dispatcher.addAsyncIteratorValue(m,i,e,n,r,t,o,d.label,s),void l(g);const v=(0,h.f)(o,m,void 0);i.next().then((({value:o,done:i})=>{if(i)l(g);else{try{const i=P(e,t,n,r,v,o,s);a(i)&&(c=!0),g.push(i)}catch(e){g.push(null),R(y(e,n,(0,h.A)(v)),t,u),l(g)}p(m+1,g)}}),(e=>{g.push(null),R(y(e,n,(0,h.A)(v)),t,u),l(g)})).then(null,(e=>{f(e)}))}(0,[])})).then((e=>c?Promise.all(e):e))}(e,u,n,r,o,t,l)}if(!(0,m.A)(i))throw new g.eO(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const f=j(e,n);let p=!1,v=l;const b=[];let A=0;for(const t of i){const i=(0,h.f)(o,A,void 0);try{let o;if(f&&"number"==typeof f.initialCount&&A>=f.initialCount){v=e.dispatcher.addValue(i,t,e,n,r,u,f.label,v),A++;continue}o=a(t)?t.then((t=>P(e,u,n,r,i,t,l))):P(e,u,n,r,i,t,l),a(o)?(p=!0,b.push(o.then(void 0,(e=>R(y(e,n,(0,h.A)(i)),u,d))))):b.push(o)}catch(e){const t=y(e,n,(0,h.A)(i));b.push(R(t,u,d))}A++}return p?Promise.all(b):b}(e,t,n,r,o,i,l):(0,E.zf)(t)?function(e,t){const n=e.serialize(t);if(null==n)throw new Error(`Expected \`${(0,d.N)(e)}.serialize(${(0,d.N)(t)})\` to return non-nullable value, returned: ${(0,d.N)(n)}`);return n}(t,i):(0,E.Lc)(t)?function(e,t,n,r,o,i,s){var l;const c=null!==(l=t.resolveType)&&void 0!==l?l:e.typeResolver,u=e.contextValue,d=c(i,u,r,t);return a(d)?d.then((a=>q(e,V(a,e,t,n,r,i),n,r,o,i,s))):q(e,V(d,e,t,n,r,i),n,r,o,i,s)}(e,t,n,r,o,i,l):(0,E.YQ)(t)?q(e,t,n,r,o,i,l):void(0,f.V)(!1,"Cannot complete value of unexpected output type: "+(0,d.N)(t))}function j(e,t){if(!0!==e.schema._enableDeferStream)return;const n=(0,C.YY)(x.nK,t[0],e.variableValues);return n&&!1!==n.if?("number"==typeof n.initialCount||(0,f.V)(!1,"initialCount must be a number"),n.initialCount>=0||(0,f.V)(!1,"initialCount must be a positive integer"),{initialCount:n.initialCount,label:"string"==typeof n.label?n.label:void 0}):void 0}function V(e,t,n,r,o,i){if(null==e)throw new g.eO(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if((0,E.YQ)(e))throw new g.eO("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new g.eO(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}" with value ${(0,d.N)(i)}, received "${(0,d.N)(e)}".`);const a=t.schema.getType(e);if(null==a)throw new g.eO(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,r);if(!(0,E.YQ)(a))throw new g.eO(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,r);if(!t.schema.isSubType(n,a))throw new g.eO(`Runtime Object type "${a.name}" is not a possible type for "${n.name}".`,r);return a}function q(e,t,n,r,o,i,s){if(t.isTypeOf){const l=t.isTypeOf(i,e.contextValue,r);if(a(l))return l.then((r=>{if(!r)throw B(t,i,n);return U(e,t,n,o,i,s)}));if(!l)throw B(t,i,n)}return U(e,t,n,o,i,s)}function B(e,t,n){return new g.eO(`Expected value of type "${e.name}" but got: ${(0,d.N)(t)}.`,n)}function U(e,t,n,r,o,i){const{fields:a,patches:s}=T(e,t,n),l=L(e,t,o,r,a,i);for(const n of s){const{label:a,fields:s}=n;e.dispatcher.addFields(e,t,o,s,a,r,i)}return l}const z=function(e,t,n,r){if((0,p.Z)(e)&&"string"==typeof e.__typename)return e.__typename;const o=n.schema.getPossibleTypes(r),i=[];for(let r=0;r{for(let t=0;tnull!=a&&a.dataPromise?a.dataPromise.then((()=>e)):e)).then((e=>({value:Q(e,s),done:!1})),(e=>(s.errors.push(e),{value:Q(null,s),done:!1})));return s.addDataPromise(c),this._subsequentPayloads.push(c),s}addValue(e,t,n,r,o,i,a,s){const l=new G({label:a,path:e}),c=Promise.resolve(t).then((t=>P(n,i,r,o,e,t,l))).then(void 0,(t=>R(y(t,r,(0,h.A)(e)),i,l.errors))).then((e=>null!=s&&s.dataPromise?s.dataPromise.then((()=>e)):e)).then((e=>({value:Q(e,l),done:!1})),(e=>(l.errors.push(e),{value:Q(null,l),done:!1})));return l.addDataPromise(c),this._subsequentPayloads.push(c),l}addAsyncIteratorValue(e,t,n,r,o,i,s,l,c){const u=this._subsequentPayloads,d=this._iterators;d.push(t),function e(f){const p=(0,h.f)(s,f,void 0),m=new G({label:l,path:p}),g=t.next().then((({value:s,done:l})=>{if(l)return d.splice(d.indexOf(t),1),{value:void 0,done:!0};try{const t=P(n,i,r,o,p,s,m);return a(t)?t.then((t=>(e(f+1),{value:Q(t,m),done:!1}))):(e(f+1),{value:Q(t,m),done:!1})}catch(t){return R(y(t,r,(0,h.A)(p)),i,m.errors),e(f+1),{value:Q(null,m),done:!1}}}),(e=>(R(y(e,r,(0,h.A)(p)),i,m.errors),{value:Q(null,m),done:!1}))).then((e=>null!=c&&c.dataPromise?c.dataPromise.then((()=>e)):e)).then(null,(e=>(m.errors.push(e),{value:Q(null,m),done:!1})));m.addDataPromise(g),u.push(g)}(e)}_race(){return 0===this._subsequentPayloads.length||this._isDone?Promise.resolve({value:{hasNext:!1},done:!1}):new Promise((e=>{let t=!1;this._subsequentPayloads.forEach((n=>{n.then((r=>{if(t)return;if(t=!0,0===this._subsequentPayloads.length)return void e({value:void 0,done:!0});const o=this._subsequentPayloads.indexOf(n);if(-1===o)return void e(this._race());this._subsequentPayloads.splice(o,1);const{value:i,done:a}=r;if(a)return void e(this._race());const s={...i,hasNext:this._subsequentPayloads.length>0};e({value:s,done:!1})}))}))}))}_next(){return this._hasReturnedInitialResult?0===this._subsequentPayloads.length?Promise.resolve({value:void 0,done:!0}):this._race():(this._hasReturnedInitialResult=!0,Promise.resolve({value:{...this._initialResult,hasNext:!0},done:!1}))}async _return(){return await Promise.all(this._iterators.map((e=>{var t;return null===(t=e.return)||void 0===t?void 0:t.call(e)}))),this._isDone=!0,{value:void 0,done:!0}}async _throw(e){return await Promise.all(this._iterators.map((e=>{var t;return null===(t=e.return)||void 0===t?void 0:t.call(e)}))),this._isDone=!0,Promise.reject(e)}get(e){return this._initialResult=e,{[Symbol.asyncIterator](){return this},next:()=>this._next(),return:()=>this._return(),throw:e=>this._throw(e)}}}class G{constructor(e){this.label=e.label,this.path=e.path,this.errors=[]}addDataPromise(e){this.dataPromise=e}}function Q(e,t){const{path:n,label:r,errors:o}=t,i={data:e,path:n?(0,h.A)(n):[]};return null!=r&&(i.label=r),o&&o.length>0&&(i.errors=o),i}function Z(e){return new Promise((t=>t(K(e))))}function X(e){const t=K(e);if(a(t)||s(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function K(e){arguments.length<2||(0,i.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:o,variableValues:a,operationName:s,fieldResolver:d,typeResolver:f}=e,p=(0,u.i)(t);if(p.length>0)return{errors:p};let h;try{h=(0,l.qg)(n)}catch(e){return{errors:[e]}}const m=(0,c.tf)(t,h);return m.length>0?{errors:m}:S({schema:t,document:h,rootValue:r,contextValue:o,variableValues:a,operationName:s,fieldResolver:d,typeResolver:f})}var J=n(5329),_=n(4143),$=n(567),ee=n(9537),te=n(3971),ne=n(8238),re=n(8472),oe=n(2039),ie=n(2704),ae=n(424),se=n(2868),le=n(3420);async function ce(e){arguments.length<2||(0,i.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,rootValue:r,contextValue:o,variableValues:a,operationName:l,fieldResolver:c,subscribeFieldResolver:u}=e,d=await ue(t,n,r,o,a,l,u);return s(d)?function(e){const t=e[Symbol.asyncIterator].call(e);let n=[t];return{next:async function e(){const t=n[0];if(!t)return{value:void 0,done:!0};const r=await t.next();if(r.done)return n.shift(),e();if(s(r.value)){const t=r.value[Symbol.asyncIterator]();return n.unshift(t),e()}return r},return:()=>(n=[],t.return()),throw:e=>(n=[],t.throw(e)),[Symbol.asyncIterator](){return this}}}(function(e){const r=e[Symbol.asyncIterator]();async function i(e){if(e.done)return e;try{return{value:await(i=e.value,S({schema:t,document:n,rootValue:i,contextValue:o,variableValues:a,operationName:l,fieldResolver:c})),done:!1}}catch(e){if("function"==typeof r.return)try{await r.return()}catch(e){}throw e}var i}return{next:async()=>i(await r.next()),return:async()=>"function"==typeof r.return?i(await r.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof r.throw)return i(await r.throw(e));throw e},[Symbol.asyncIterator](){return this}}}(d)):d}async function ue(e,t,n,r,o,i,a){O(e,t,o);const l=I({schema:e,document:t,rootValue:n,contextValue:r,variableValues:o,operationName:i,subscribeFieldResolver:a});if(!("schema"in l))return{errors:l};try{const e=await async function(e){const{schema:t,fragments:n,operation:r,variableValues:o,rootValue:i}=e,a=t.getSubscriptionType();if(null==a)throw new g.eO("Schema is not configured to execute subscription operation.",r);const{fields:s}=(0,k._)(t,n,o,a,r.selectionSet),[l,c]=[...s.entries()][0],u=Y(t,a,c[0]);if(!u){const e=c[0].name.value;throw new g.eO(`The subscription field "${e}" is not defined.`,c)}const d=(0,h.f)(void 0,l,a.name),f=F(e,u,c,a,d);try{var p;const t=(0,C.IA)(u,c[0],o),n=e.contextValue,r=null!==(p=u.subscribe)&&void 0!==p?p:e.subscribeFieldResolver,a=await r(i,t,n,f);if(a instanceof Error)throw a;return a}catch(e){throw y(e,c,(0,h.A)(d))}}(l);if(!s(e))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,d.N)(e)}.`);return e}catch(e){if(e instanceof g.eO)return{errors:[e]};throw e}}function de(e){return{Field(t){const n=(0,E.MR)(e.getType());n&&(0,w.Yh)(n)&&e.reportError(new g.eO(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,t))}}}var fe=n(1875),pe=n(5272),he=n(8489),me=n(5449),ge=n(9911),ve=n(825),ye=n(6868),be=n(8898),Ae=n(4466),we=n(4719),xe=n(2833),Ee=n(2027),Ce=n(1981),ke=n(9201),Te=n(5106),Se=n(8644),Ne=n(7565),De=n(48),Oe=n(99),Ie=n(2475),Le=n(6886),Me=n(5536),Fe=n(656),Re=n(5157),Pe=n(2584),je=n(1838),Ve=n(9461),qe=n(8022),Be=n(5343),Ue=n(354),ze=n(7368),He=n(2954),Ye=n(3537),We=n(4410),Ge=n(7065),Qe=n(5966),Ze=n(2168),Xe=n(9841);function Ke(e,t){if("query"===t.operation){const n=e.getQueryType();if(!n)throw new g.eO("Schema does not define the required query root type.",t);return n}if("mutation"===t.operation){const n=e.getMutationType();if(!n)throw new g.eO("Schema is not configured for mutations.",t);return n}if("subscription"===t.operation){const n=e.getSubscriptionType();if(!n)throw new g.eO("Schema is not configured for subscriptions.",t);return n}throw new g.eO("Can only have query, mutation and subscription operations.",t)}var Je=n(1262);function _e(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=N({schema:e,document:(0,l.qg)((0,Je.I)(n))});return!r.errors&&r.data||(0,f.V)(!1),r.data}var $e=n(5487),et=n(3871),tt=n(9327);function nt(e,t,n){(0,J.GU)(e),null!=t&&t.kind===A.b.DOCUMENT||(0,i.U)(!1,"Must provide valid Document AST."),!0!==(null==n?void 0:n.assumeValid)&&!0!==(null==n?void 0:n.assumeValidSDL)&&(0,c.$T)(t,e);const r=e.toConfig(),o=rt(r,t,n);return r===o?e:new J.V4(o)}function rt(e,t,n){var r,o,i,a,s;const l=[],c=Object.create(null),u=[];let p;const h=[];for(const e of t.definitions)if(e.kind===A.b.SCHEMA_DEFINITION)p=e;else if(e.kind===A.b.SCHEMA_EXTENSION)h.push(e);else if((0,le.a6)(e))l.push(e);else if((0,le.i7)(e)){const t=e.name.value,n=c[t];c[t]=n?n.concat([e]):[e]}else e.kind===A.b.DIRECTIVE_DEFINITION&&u.push(e);if(0===Object.keys(c).length&&0===l.length&&0===u.length&&0===h.length&&null==p)return e;const m=Object.create(null);for(const t of e.types)m[t.name]=(g=t,(0,w.Yh)(g)||(0,_.PZ)(g)?g:(0,E.lg)(g)?function(e){var t;const n=e.toConfig(),r=null!==(t=c[n.name])&&void 0!==t?t:[];let o=n.specifiedByURL;for(const e of r){var i;o=null!==(i=at(e))&&void 0!==i?i:o}return new E.Ag({...n,specifiedByURL:o,extensionASTNodes:n.extensionASTNodes.concat(r)})}(g):(0,E.YQ)(g)?function(e){var t;const n=e.toConfig(),r=null!==(t=c[n.name])&&void 0!==t?t:[];return new E.bh({...n,interfaces:()=>[...e.getInterfaces().map(C),...F(r)],fields:()=>({...(0,et.I)(n.fields,k),...O(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(g):(0,E.kD)(g)?function(e){var t;const n=e.toConfig(),r=null!==(t=c[n.name])&&void 0!==t?t:[];return new E.VA({...n,interfaces:()=>[...e.getInterfaces().map(C),...F(r)],fields:()=>({...(0,et.I)(n.fields,k),...O(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(g):(0,E.CK)(g)?function(e){var t;const n=e.toConfig(),r=null!==(t=c[n.name])&&void 0!==t?t:[];return new E.hI({...n,types:()=>[...e.getTypes().map(C),...R(r)],extensionASTNodes:n.extensionASTNodes.concat(r)})}(g):(0,E.oF)(g)?function(e){var t;const n=e.toConfig(),r=null!==(t=c[e.name])&&void 0!==t?t:[];return new E.Zb({...n,values:{...n.values,...M(r)},extensionASTNodes:n.extensionASTNodes.concat(r)})}(g):(0,E.qK)(g)?function(e){var t;const n=e.toConfig(),r=null!==(t=c[n.name])&&void 0!==t?t:[];return new E.zP({...n,fields:()=>({...(0,et.I)(n.fields,(e=>({...e,type:b(e.type)}))),...L(r)}),extensionASTNodes:n.extensionASTNodes.concat(r)})}(g):void(0,f.V)(!1,"Unexpected type: "+(0,d.N)(g)));var g;for(const e of l){var v;const t=e.name.value;m[t]=null!==(v=ot[t])&&void 0!==v?v:P(e)}const y={query:e.query&&C(e.query),mutation:e.mutation&&C(e.mutation),subscription:e.subscription&&C(e.subscription),...p&&S([p]),...S(h)};return{description:null===(r=p)||void 0===r||null===(o=r.description)||void 0===o?void 0:o.value,...y,types:Object.values(m),directives:[...e.directives.map((function(e){const t=e.toConfig();return new x.RR({...t,args:(0,et.I)(t.args,T)})})),...u.map((function(e){var t;return new x.RR({name:e.name.value,description:null===(t=e.description)||void 0===t?void 0:t.value,locations:e.locations.map((({value:e})=>e)),isRepeatable:e.repeatable,args:I(e.arguments),astNode:e})}))],extensions:Object.create(null),astNode:null!==(i=p)&&void 0!==i?i:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(h),assumeValid:null!==(a=null==n?void 0:n.assumeValid)&&void 0!==a&&a,enableDeferStream:null!==(s=null==n?void 0:n.enableDeferStream)&&void 0!==s&&s};function b(e){return(0,E.Fs)(e)?new E.KT(b(e.ofType)):(0,E.bd)(e)?new E.Gc(b(e.ofType)):C(e)}function C(e){return m[e.name]}function k(e){return{...e,type:b(e.type),args:e.args&&(0,et.I)(e.args,T)}}function T(e){return{...e,type:b(e.type)}}function S(e){const t={};for(const r of e){var n;const e=null!==(n=r.operationTypes)&&void 0!==n?n:[];for(const n of e)t[n.operation]=N(n.type)}return t}function N(e){var t;const n=e.name.value,r=null!==(t=ot[n])&&void 0!==t?t:m[n];if(void 0===r)throw new Error(`Unknown type: "${n}".`);return r}function D(e){return e.kind===A.b.LIST_TYPE?new E.KT(D(e.type)):e.kind===A.b.NON_NULL_TYPE?new E.Gc(D(e.type)):N(e)}function O(e){const t=Object.create(null);for(const o of e){var n;const e=null!==(n=o.fields)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={type:D(n.type),description:null===(r=n.description)||void 0===r?void 0:r.value,args:I(n.arguments),deprecationReason:it(n),astNode:n}}}return t}function I(e){const t=null!=e?e:[],n=Object.create(null);for(const e of t){var r;const t=D(e.type);n[e.name.value]={type:t,description:null===(r=e.description)||void 0===r?void 0:r.value,defaultValue:(0,tt.i)(e.defaultValue,t),deprecationReason:it(e),astNode:e}}return n}function L(e){const t=Object.create(null);for(const o of e){var n;const e=null!==(n=o.fields)&&void 0!==n?n:[];for(const n of e){var r;const e=D(n.type);t[n.name.value]={type:e,description:null===(r=n.description)||void 0===r?void 0:r.value,defaultValue:(0,tt.i)(n.defaultValue,e),deprecationReason:it(n),astNode:n}}}return t}function M(e){const t=Object.create(null);for(const o of e){var n;const e=null!==(n=o.values)&&void 0!==n?n:[];for(const n of e){var r;t[n.name.value]={description:null===(r=n.description)||void 0===r?void 0:r.value,deprecationReason:it(n),astNode:n}}}return t}function F(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.interfaces)||void 0===n?void 0:n.map(N))&&void 0!==t?t:[]}))}function R(e){return e.flatMap((e=>{var t,n;return null!==(t=null===(n=e.types)||void 0===n?void 0:n.map(N))&&void 0!==t?t:[]}))}function P(e){var t;const n=e.name.value,r=null!==(t=c[n])&&void 0!==t?t:[];switch(e.kind){case A.b.OBJECT_TYPE_DEFINITION:{var o;const t=[e,...r];return new E.bh({name:n,description:null===(o=e.description)||void 0===o?void 0:o.value,interfaces:()=>F(t),fields:()=>O(t),astNode:e,extensionASTNodes:r})}case A.b.INTERFACE_TYPE_DEFINITION:{var i;const t=[e,...r];return new E.VA({name:n,description:null===(i=e.description)||void 0===i?void 0:i.value,interfaces:()=>F(t),fields:()=>O(t),astNode:e,extensionASTNodes:r})}case A.b.ENUM_TYPE_DEFINITION:{var a;const t=[e,...r];return new E.Zb({name:n,description:null===(a=e.description)||void 0===a?void 0:a.value,values:M(t),astNode:e,extensionASTNodes:r})}case A.b.UNION_TYPE_DEFINITION:{var s;const t=[e,...r];return new E.hI({name:n,description:null===(s=e.description)||void 0===s?void 0:s.value,types:()=>R(t),astNode:e,extensionASTNodes:r})}case A.b.SCALAR_TYPE_DEFINITION:var l;return new E.Ag({name:n,description:null===(l=e.description)||void 0===l?void 0:l.value,specifiedByURL:at(e),astNode:e,extensionASTNodes:r});case A.b.INPUT_OBJECT_TYPE_DEFINITION:{var u;const t=[e,...r];return new E.zP({name:n,description:null===(u=e.description)||void 0===u?void 0:u.value,fields:()=>L(t),astNode:e,extensionASTNodes:r})}}}}const ot=(0,$e.K)([..._.YC,...w.V4],(e=>e.name));function it(e){const t=(0,C.YY)(x.yK,e);return null==t?void 0:t.reason}function at(e){const t=(0,C.YY)(x.gw,e);return null==t?void 0:t.url}function st(e,t){null!=e&&e.kind===A.b.DOCUMENT||(0,i.U)(!1,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&(0,c.uq)(e);const n=rt({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(null==n.astNode)for(const e of n.types)switch(e.name){case"Query":n.query=e;break;case"Mutation":n.mutation=e;break;case"Subscription":n.subscription=e}const r=[...n.directives,...x.rc.filter((e=>n.directives.every((t=>t.name!==e.name))))];return new J.V4({...n,directives:r})}function lt(e,t){return st((0,l.qg)(e,{noLocation:null==t?void 0:t.noLocation,allowLegacyFragmentVariables:null==t?void 0:t.allowLegacyFragmentVariables}),{assumeValidSDL:null==t?void 0:t.assumeValidSDL,assumeValid:null==t?void 0:t.assumeValid,enableDeferStream:null==t?void 0:t.enableDeferStream})}var ct=n(6394),ut=n(3858);function dt(e){const t=e.toConfig(),n=(0,ct.L)(pt(t.types),(e=>e.name),(function(e){if((0,E.lg)(e)||(0,w.Yh)(e))return e;if((0,E.YQ)(e)){const t=e.toConfig();return new E.bh({...t,interfaces:()=>l(t.interfaces),fields:()=>s(t.fields)})}if((0,E.kD)(e)){const t=e.toConfig();return new E.VA({...t,interfaces:()=>l(t.interfaces),fields:()=>s(t.fields)})}if((0,E.CK)(e)){const t=e.toConfig();return new E.hI({...t,types:()=>l(t.types)})}if((0,E.oF)(e)){const t=e.toConfig();return new E.Zb({...t,values:ft(t.values,(e=>e))})}if((0,E.qK)(e)){const t=e.toConfig();return new E.zP({...t,fields:()=>ft(t.fields,(e=>({...e,type:r(e.type)})))})}(0,f.V)(!1,"Unexpected type: "+(0,d.N)(e))}));return new J.V4({...t,types:Object.values(n),directives:pt(t.directives).map((function(e){const t=e.toConfig();return new x.RR({...t,locations:ht(t.locations,(e=>e)),args:a(t.args)})})),query:i(t.query),mutation:i(t.mutation),subscription:i(t.subscription)});function r(e){return(0,E.Fs)(e)?new E.KT(r(e.ofType)):(0,E.bd)(e)?new E.Gc(r(e.ofType)):o(e)}function o(e){return n[e.name]}function i(e){return e&&o(e)}function a(e){return ft(e,(e=>({...e,type:r(e.type)})))}function s(e){return ft(e,(e=>({...e,type:r(e.type),args:e.args&&a(e.args)})))}function l(e){return pt(e).map(o)}}function ft(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(ut.p))n[r]=t(e[r]);return n}function pt(e){return ht(e,(e=>e.name))}function ht(e,t){return e.slice().sort(((e,n)=>{const r=t(e),o=t(n);return(0,ut.p)(r,o)}))}var mt=n(7714),gt=n(9709);function vt(e){return At(e,(e=>!(0,x.Qe)(e)),bt)}function yt(e){return At(e,x.Qe,w.Yh)}function bt(e){return!(0,_.PZ)(e)&&!(0,w.Yh)(e)}function At(e,t,n){const r=e.getDirectives().filter(t),o=Object.values(e.getTypeMap()).filter(n);return[wt(e),...r.map((e=>function(e){return Dt(e)+"directive @"+e.name+Tt(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e))),...o.map((e=>xt(e)))].filter(Boolean).join("\n\n")}function wt(e){if(null==e.description&&function(e){const t=e.getQueryType();if(t&&"Query"!==t.name)return!1;const n=e.getMutationType();if(n&&"Mutation"!==n.name)return!1;const r=e.getSubscriptionType();return!r||"Subscription"===r.name}(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const o=e.getSubscriptionType();return o&&t.push(` subscription: ${o.name}`),Dt(e)+`schema {\n${t.join("\n")}\n}`}function xt(e){return(0,E.lg)(e)?function(e){return Dt(e)+`scalar ${e.name}`+(null==(t=e).specifiedByURL?"":` @specifiedBy(url: ${(0,ie.y)({kind:A.b.STRING,value:t.specifiedByURL})})`);var t}(e):(0,E.YQ)(e)?function(e){return Dt(e)+`type ${e.name}`+Et(e)+Ct(e)}(e):(0,E.kD)(e)?function(e){return Dt(e)+`interface ${e.name}`+Et(e)+Ct(e)}(e):(0,E.CK)(e)?function(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Dt(e)+"union "+e.name+n}(e):(0,E.oF)(e)?function(e){const t=e.getValues().map(((e,t)=>Dt(e," ",!t)+" "+e.name+Nt(e.deprecationReason)));return Dt(e)+`enum ${e.name}`+kt(t)}(e):(0,E.qK)(e)?function(e){const t=Object.values(e.getFields()).map(((e,t)=>Dt(e," ",!t)+" "+St(e)));return Dt(e)+`input ${e.name}`+kt(t)}(e):void(0,f.V)(!1,"Unexpected type: "+(0,d.N)(e))}function Et(e){const t=e.getInterfaces();return t.length?" implements "+t.map((e=>e.name)).join(" & "):""}function Ct(e){return kt(Object.values(e.getFields()).map(((e,t)=>Dt(e," ",!t)+" "+e.name+Tt(e.args," ")+": "+String(e.type)+Nt(e.deprecationReason))))}function kt(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function Tt(e,t=""){return 0===e.length?"":e.every((e=>!e.description))?"("+e.map(St).join(", ")+")":"(\n"+e.map(((e,n)=>Dt(e," "+t,!n)+" "+t+St(e))).join("\n")+"\n"+t+")"}function St(e){const t=(0,gt.K)(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,ie.y)(t)}`),n+Nt(e.deprecationReason)}function Nt(e){return null==e?"":e!==x.Il?` @deprecated(reason: ${(0,ie.y)({kind:A.b.STRING,value:e})})`:" @deprecated"}function Dt(e,t="",n=!0){const{description:r}=e;return null==r?"":(t&&!n?"\n"+t:t)+(0,ie.y)({kind:A.b.STRING,value:r,block:(0,mt.CS)(r)}).replace(/\n/g,"\n"+t)+"\n"}function Ot(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:A.b.DOCUMENT,definitions:t}}function It(e){const t=[],n=Object.create(null);for(const r of e.definitions)switch(r.kind){case A.b.OPERATION_DEFINITION:t.push(r);break;case A.b.FRAGMENT_DEFINITION:n[r.name.value]=Mt(r.selectionSet)}const r=Object.create(null);for(const o of t){const t=new Set;for(const e of Mt(o.selectionSet))Lt(t,n,e);r[o.name?o.name.value:""]={kind:A.b.DOCUMENT,definitions:e.definitions.filter((e=>e===o||e.kind===A.b.FRAGMENT_DEFINITION&&t.has(e.name.value)))}}return r}function Lt(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(void 0!==r)for(const n of r)Lt(e,t,n)}}function Mt(e){const t=[];return(0,ae.YR)(e,{FragmentSpread(e){t.push(e.name.value)}}),t}function Ft(e){const t=(0,ee._)(e)?e:new ee.k(e),n=t.body,r=new re.J(t);let o="",i=!1;for(;r.advance().kind!==oe.Y.EOF;){const e=r.token,t=e.kind,a=!(0,re.Z)(e.kind);i&&(a||e.kind===oe.Y.SPREAD)&&(o+=" ");const s=n.slice(e.start,e.end);t===oe.Y.BLOCK_STRING?o+=(0,mt.yo)(e.value,{minimize:!0}):o+=s,i=a}return o}function Rt(e){const t=Pt(e);if(t)throw t;return e}function Pt(e){if("string"==typeof e||(0,i.U)(!1,"Expected name to be a string."),e.startsWith("__"))return new g.eO(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,$.I)(e)}catch(e){return e}}let jt,Vt;function qt(e,t){return Ut(e,t).filter((e=>e.type in jt))}function Bt(e,t){return Ut(e,t).filter((e=>e.type in Vt))}function Ut(e,t){return[...Ht(e,t),...zt(e,t)]}function zt(e,t){const n=[],r=en(e.getDirectives(),t.getDirectives());for(const e of r.removed)n.push({type:jt.DIRECTIVE_REMOVED,description:`${e.name} was removed.`});for(const[e,t]of r.persisted){const r=en(e.args,t.args);for(const t of r.added)(0,E.xP)(t)&&n.push({type:jt.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${t.name} on directive ${e.name} was added.`});for(const t of r.removed)n.push({type:jt.DIRECTIVE_ARG_REMOVED,description:`${t.name} was removed from ${e.name}.`});e.isRepeatable&&!t.isRepeatable&&n.push({type:jt.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${e.name}.`});for(const r of e.locations)t.locations.includes(r)||n.push({type:jt.DIRECTIVE_LOCATION_REMOVED,description:`${r} was removed from ${e.name}.`})}return n}function Ht(e,t){const n=[],r=en(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const e of r.removed)n.push({type:jt.TYPE_REMOVED,description:(0,_.PZ)(e)?`Standard scalar ${e.name} was removed because it is not referenced anymore.`:`${e.name} was removed.`});for(const[e,t]of r.persisted)(0,E.oF)(e)&&(0,E.oF)(t)?n.push(...Gt(e,t)):(0,E.CK)(e)&&(0,E.CK)(t)?n.push(...Wt(e,t)):(0,E.qK)(e)&&(0,E.qK)(t)?n.push(...Yt(e,t)):(0,E.YQ)(e)&&(0,E.YQ)(t)||(0,E.kD)(e)&&(0,E.kD)(t)?n.push(...Zt(e,t),...Qt(e,t)):e.constructor!==t.constructor&&n.push({type:jt.TYPE_CHANGED_KIND,description:`${e.name} changed from ${_t(e)} to ${_t(t)}.`});return n}function Yt(e,t){const n=[],r=en(Object.values(e.getFields()),Object.values(t.getFields()));for(const t of r.added)(0,E.YX)(t)?n.push({type:jt.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${t.name} on input type ${e.name} was added.`}):n.push({type:Vt.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${t.name} on input type ${e.name} was added.`});for(const t of r.removed)n.push({type:jt.FIELD_REMOVED,description:`${e.name}.${t.name} was removed.`});for(const[t,o]of r.persisted)Jt(t.type,o.type)||n.push({type:jt.FIELD_CHANGED_KIND,description:`${e.name}.${t.name} changed type from ${String(t.type)} to ${String(o.type)}.`});return n}function Wt(e,t){const n=[],r=en(e.getTypes(),t.getTypes());for(const t of r.added)n.push({type:Vt.TYPE_ADDED_TO_UNION,description:`${t.name} was added to union type ${e.name}.`});for(const t of r.removed)n.push({type:jt.TYPE_REMOVED_FROM_UNION,description:`${t.name} was removed from union type ${e.name}.`});return n}function Gt(e,t){const n=[],r=en(e.getValues(),t.getValues());for(const t of r.added)n.push({type:Vt.VALUE_ADDED_TO_ENUM,description:`${t.name} was added to enum type ${e.name}.`});for(const t of r.removed)n.push({type:jt.VALUE_REMOVED_FROM_ENUM,description:`${t.name} was removed from enum type ${e.name}.`});return n}function Qt(e,t){const n=[],r=en(e.getInterfaces(),t.getInterfaces());for(const t of r.added)n.push({type:Vt.IMPLEMENTED_INTERFACE_ADDED,description:`${t.name} added to interfaces implemented by ${e.name}.`});for(const t of r.removed)n.push({type:jt.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${t.name}.`});return n}function Zt(e,t){const n=[],r=en(Object.values(e.getFields()),Object.values(t.getFields()));for(const t of r.removed)n.push({type:jt.FIELD_REMOVED,description:`${e.name}.${t.name} was removed.`});for(const[t,o]of r.persisted)n.push(...Xt(e,t,o)),Kt(t.type,o.type)||n.push({type:jt.FIELD_CHANGED_KIND,description:`${e.name}.${t.name} changed type from ${String(t.type)} to ${String(o.type)}.`});return n}function Xt(e,t,n){const r=[],o=en(t.args,n.args);for(const n of o.removed)r.push({type:jt.ARG_REMOVED,description:`${e.name}.${t.name} arg ${n.name} was removed.`});for(const[n,i]of o.persisted)if(Jt(n.type,i.type)){if(void 0!==n.defaultValue)if(void 0===i.defaultValue)r.push({type:Vt.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${n.name} defaultValue was removed.`});else{const o=$t(n.defaultValue,n.type),a=$t(i.defaultValue,i.type);o!==a&&r.push({type:Vt.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${n.name} has changed defaultValue from ${o} to ${a}.`})}}else r.push({type:jt.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${n.name} has changed type from ${String(n.type)} to ${String(i.type)}.`});for(const n of o.added)(0,E.xP)(n)?r.push({type:jt.REQUIRED_ARG_ADDED,description:`A required arg ${n.name} on ${e.name}.${t.name} was added.`}):r.push({type:Vt.OPTIONAL_ARG_ADDED,description:`An optional arg ${n.name} on ${e.name}.${t.name} was added.`});return r}function Kt(e,t){return(0,E.Fs)(e)?(0,E.Fs)(t)&&Kt(e.ofType,t.ofType)||(0,E.bd)(t)&&Kt(e,t.ofType):(0,E.bd)(e)?(0,E.bd)(t)&&Kt(e.ofType,t.ofType):(0,E.sy)(t)&&e.name===t.name||(0,E.bd)(t)&&Kt(e,t.ofType)}function Jt(e,t){return(0,E.Fs)(e)?(0,E.Fs)(t)&&Jt(e.ofType,t.ofType):(0,E.bd)(e)?(0,E.bd)(t)&&Jt(e.ofType,t.ofType)||!(0,E.bd)(t)&&Jt(e.ofType,t):(0,E.sy)(t)&&e.name===t.name}function _t(e){return(0,E.lg)(e)?"a Scalar type":(0,E.YQ)(e)?"an Object type":(0,E.kD)(e)?"an Interface type":(0,E.CK)(e)?"a Union type":(0,E.oF)(e)?"an Enum type":(0,E.qK)(e)?"an Input type":void(0,f.V)(!1,"Unexpected type: "+(0,d.N)(e))}function $t(e,t){const n=(0,gt.K)(e,t);null!=n||(0,f.V)(!1);const r=(0,ae.YR)(n,{ObjectValue(e){const t=[...e.fields];return t.sort(((e,t)=>(0,ut.p)(e.name.value,t.name.value))),{...e,fields:t}}});return(0,ie.y)(r)}function en(e,t){const n=[],r=[],o=[],i=(0,$e.K)(e,(({name:e})=>e)),a=(0,$e.K)(t,(({name:e})=>e));for(const t of e){const e=a[t.name];void 0===e?r.push(t):o.push([t,e])}for(const e of t)void 0===i[e.name]&&n.push(e);return{added:n,persisted:o,removed:r}}!function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"}(jt||(jt={})),function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"}(Vt||(Vt={}));var tn=n(5187),nn=n(5410),rn=n(9494),on=n(8542),an=n(7350),sn=n(9818),ln=n(4917)},4912:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="},4917:(e,t,n)=>{"use strict";n.d(t,{n8:()=>o,sP:()=>i,uI:()=>a});var r=n(2114);function o(e,t){return e===t||((0,r.bd)(e)&&(0,r.bd)(t)||!(!(0,r.Fs)(e)||!(0,r.Fs)(t)))&&o(e.ofType,t.ofType)}function i(e,t,n){return t===n||((0,r.bd)(n)?!!(0,r.bd)(t)&&i(e,t.ofType,n.ofType):(0,r.bd)(t)?i(e,t.ofType,n):(0,r.Fs)(n)?!!(0,r.Fs)(t)&&i(e,t.ofType,n.ofType):!(0,r.Fs)(t)&&(0,r.Lc)(n)&&((0,r.kD)(t)||(0,r.YQ)(t))&&e.isSubType(n,t))}function a(e,t,n){return t===n||((0,r.Lc)(t)?(0,r.Lc)(n)?e.getPossibleTypes(t).some((t=>e.isSubType(n,t))):e.isSubType(t,n):!!(0,r.Lc)(n)&&e.isSubType(n,t))}},4949:e=>{"use strict";e.exports="data:font/woff;base64,d09GRgABAAAAAB4cAA8AAAAAKSgAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABWAAAADYAAABAAdsBp0dQT1MAAAGQAAAAIAAAACBEdkx1R1NVQgAAAbAAAABAAAAAQodMa01PUy8yAAAB8AAAAFYAAABgc4zF9lNUQVQAAAJIAAAAKgAAAC55kWzdY21hcAAAAnQAAAC/AAABEGjeCRlnYXNwAAADNAAAAAgAAAAIAAAAEGdseWYAAAM8AAAXagAAINJZlxASaGVhZAAAGqgAAAA2AAAANhL1JvtoaGVhAAAa4AAAAB8AAAAkAzn9jmhtdHgAABsAAAAAxwAAARIsXijQbG9jYQAAG8gAAAESAAABElQQS61tYXhwAAAc3AAAABwAAAAgAPYCg25hbWUAABz4AAABCwAAAkgzWFNlcG9zdAAAHgQAAAAWAAAAIP+fADN42mNgZGBi4GOAAAMgm5VBisEGKGrH4AYkPRh8gaQ/Qx6QLGCoBZJA9UCVPCAMZDMAAGrQA4MAAAABAAAACgAcAB4AAURGTFQACAAEAAAAAP//AAAAAAAAeNpjYGRgYOBisGNwYGBzcfMJYVBLrizKYTBIL0rNZjDISSzJYzCoyszLAJKVlZUMBgwsDEDw/z8DHAAAwqUNgnjaY2Bh2ck4gYGVgYHlC8skBgaGSRCaaTWDEVMFkObm4GQFUgwsIAIIOBigwDnExYnhAAuDohj7nr81QIkS5hcJDAzz718HmiXLmghUosDACgDVgg+uAAB42mNgBEIOIGZgEAGTMgxM5ekZJSAmAxMDM4hkZGKcAKT2M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AGwArQDfAPgBEAEoAUoBdQGnAc4CEwImAkUChgK0AusDFwM9A1MDfwOrA98EIAQ9BF8EZwSSBJoEqwS2BM4FCgUSBR0FKAVQBZYFtgXBBcwF6AXzBhcGHwYnBi8GQgZKBlIGWgZ9BogGwwbLBvEHDAclB0gHYgeKB7QH3ggVCEUITQiDCLYIvgjJCNEI+Qk1CV4JkQmxCbkKAwpAClAKWwpzCqwKtAq/CsoK8gsyC1ILXQtoC4QLjwuxC9oL8gv6DA0MFQwdDDAMOAxDDJwMpAzGDOMM/A0fDTkNXw2JDbYN7A4eDiYOWA6KDpIOnQ6lDq0O5Q8QD0kPaQ+5D98P7g/9EAYQFRAkEEIQYBBpAAB42mNgZGBg6GBiY0hgqGDgAvMQgJmBBQAitQF8eNqUkMVZhDEQQB/uXHHIDXd354Lrdd3ldxwKoJatgQKogG6QfIPrRl8yPkAl1xRRUFwB5EC4gFZywoXUcidcxAL3wsX0FdQLl9BYsCZcSleBX7iWkYIbNBdAdcGtsPbJMgYmZ9gkiBHHRTHEAIOM0MsT6a04IE4ExRoJbAIobRnWfzvYGCSfOKTtF/FwiWNg46Do0H5dTBym6KefGAmt4RGkjxAGGfpxMcjikOKMfiTSa5zOb2NvvOa9R+SJPNIEsBmljwGd/TTLHLDC0hN99vlm3fvJ/vdY6pP2ERFsHBK6AvUWPY+I0iPpkEMImwQmLg592neaPgxsYvSzzRobPC6cIRVmHgCRt1ftAHjaY2BmAIP/cxiMgBQjAxoAACqUAdIAAA=="},4999:(e,t,n)=>{!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(i(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(o))}));var o={Backspace:function(t){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;for(var i=r(o,"pairs"),a=t.listSelections(),l=0;l=0;l--){var d=a[l].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),o=n&&r(n,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),a=0;a1&&h.indexOf(o)>=0&&t.getRange(n(w.line,w.ch-2),w)==o+o){if(w.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(w.line,w.ch-2))))return e.Pass;b="addFour"}else if(m){var E=0==w.ch?" ":t.getRange(n(w.line,w.ch-1),w);if(e.isWordChar(x)||E==o||e.isWordChar(E))return e.Pass;b="both"}else{if(!v||!(0===x.length||/\s/.test(x)||p.indexOf(x)>-1))return e.Pass;b="both"}else b=m&&d(t,w)?"both":h.indexOf(o)>=0&&t.getRange(w,n(w.line,w.ch+3))==o+o+o?"skipThree":"skip";if(f){if(f!=b)return e.Pass}else f=b}var C=u%2?a.charAt(u-1):o,k=u%2?o:a.charAt(u+1);t.operation((function(){if("skip"==f)l(t,1);else if("skipThree"==f)l(t,3);else if("surround"==f){for(var e=t.getSelections(),n=0;n0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,o)}function c(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function u(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function d(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}i(t.pairs+"`")}(n(1448))},5106:(e,t,n)=>{"use strict";n.d(t,{K:()=>u});var r=n(5198),o=n(8255),i=n(2455),a=n(2704),s=n(2114),l=n(9494);function c(e){return Array.isArray(e)?e.map((([e,t])=>`subfields "${e}" conflict because `+c(t))).join(" and "):e}function u(e){const t=new x,n=new Map;return{SelectionSet(r){const i=function(e,t,n,r,o){const i=[],[a,s]=b(e,t,r,o);if(function(e,t,n,r,o){for(const[i,a]of Object.entries(o))if(a.length>1)for(let o=0;o{const t=D.find((t=>t.name.value===e.name.value));return!!t&&v(e.value,t.value)})))return[[i,"they have differing arguments"],[u],[w]];if(!function(e,t){const n=g(e),r=g(t);return!n&&!r||!(!n||!r)&&(m(n,r,"initialCount")&&m(n,r,"label"))}(null!==(T=u.directives)&&void 0!==T?T:[],null!==(S=w.directives)&&void 0!==S?S:[]))return[[i,"they have differing stream directives"],[u],[w]]}var N,D;const O=null==h?void 0:h.type,I=null==x?void 0:x.type;if(O&&I&&y(O,I))return[[i,`they return conflicting types "${(0,r.N)(O)}" and "${(0,r.N)(I)}"`],[u],[w]];const L=u.selectionSet,M=w.selectionSet;if(L&&M){const r=function(e,t,n,r,o,i,a,s){const l=[],[c,u]=b(e,t,o,i),[h,m]=b(e,t,a,s);p(e,l,t,n,r,c,h);for(const o of m)d(e,l,t,n,r,c,o);for(const o of u)d(e,l,t,n,r,h,o);for(const o of u)for(const i of m)f(e,l,t,n,r,o,i);return l}(e,t,n,E,(0,s.MR)(O),L,(0,s.MR)(I),M);return function(e,t,n,r){if(e.length>0)return[[t,e.map((([e])=>e))],[n,...e.map((([,e])=>e)).flat()],[r,...e.map((([,,e])=>e)).flat()]]}(r,i,u,w)}}function m(e,t,n){var r,o;const i=(null!==(r=e.arguments)&&void 0!==r?r:[]).find((e=>e.name.value===n));if(!i)return!1;const a=(null!==(o=t.arguments)&&void 0!==o?o:[]).find((e=>e.name.value===n));return!!a&&v(i.value,a.value)}function g(e){return e.find((e=>"stream"===e.name.value))}function v(e,t){return(0,a.y)(e)===(0,a.y)(t)}function y(e,t){return(0,s.Fs)(e)?!(0,s.Fs)(t)||y(e.ofType,t.ofType):!!(0,s.Fs)(t)||((0,s.bd)(e)?!(0,s.bd)(t)||y(e.ofType,t.ofType):!!(0,s.bd)(t)||!(!(0,s.zf)(e)&&!(0,s.zf)(t))&&e!==t)}function b(e,t,n,r){const o=t.get(r);if(o)return o;const i=Object.create(null),a=Object.create(null);w(e,n,r,i,a);const s=[i,Object.keys(a)];return t.set(r,s),s}function A(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const o=(0,l.v)(e.getSchema(),n.typeCondition);return b(e,t,o,n.selectionSet)}function w(e,t,n,r,o){for(const a of n.selections)switch(a.kind){case i.b.FIELD:{const e=a.name.value;let n;((0,s.YQ)(t)||(0,s.kD)(t))&&(n=t.getFields()[e]);const o=a.alias?a.alias.value:e;r[o]||(r[o]=[]),r[o].push([t,a,n]);break}case i.b.FRAGMENT_SPREAD:o[a.name.value]=!0;break;case i.b.INLINE_FRAGMENT:{const n=a.typeCondition,i=n?(0,l.v)(e.getSchema(),n):t;w(e,i,a.selectionSet,r,o);break}}}class x{constructor(){this._data=new Map}has(e,t,n){var r;const[o,i]=e{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAByUAA4AAAAANagAABw8AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmobllYcNgZgAIIEEQwKw3y2PwuCEAABNgIkA4QcBCAFgwoHIBvkLKOipNV2jiiCjQMF4peCvzqwwRj5aGHyaBhljLHOdnTs2BiTuV25u1Hu0SDvNTVqKC5bf7FJY/2tfvWUhxyhsU9yefhvf/C/596ZO/MENLIS7fkLWag/SRVe3dEZrMT5e53l+5IMzCtYQMlmeYFA9gLZC4DVXbgFmj6TOlVKwipFmaK64Wlu/+5ueYNtbESZjQXaZAxjCCpRNoKjU6Id+aFFMKYyaoQxYtAywMYxqhTQ/vBPdI/vedmZTYC+6udyoVIBzj3aX1+exrsHsGWqXShK7WrWx5UudbrMrsCMRWlnesTTrfK6WAaWgf9eG2zfRQtUtE5SVEBVcvpT/E3C9vzUkmry11e6UhpapxbAcjihCQ9h0pP85adnbZG95a9SXK7putfXuvdKSmuEBK3SrxW0G+I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zt7ZbZOpoFVKfCN/iHEcKXq5+zlvrZin9m0c9oSI8XfpxiaFDUEQf/VEXJ0fdv5+OPtII6Vgmfz8hvqsJ+8OnqOP5YRufnpvy18u2myM28hv0SsW+ZeDglQpsiv9HRPtPev3jTWyW7Vn6sFnLvBLmd83Jf4GdS0+rYv791zp+YnHOK44M5Rsipjfj9EyXnD99EoOc4eiKjbTswE47+yzh8C1uuZ4rqg2s6uwz09RCcD8YuVWcNTlU1XJvcbBxNw+Dx5r6bF69v7ZRdQSc2NdJ4ggQ/2FxfvAJWql6fEhG0Gq9nsSaonu6B7IUhefSlFPyEjTqgnnQPmuh0gD9RVETvOlkIAXVCPVEP1BUhIKs+F0S1PvfNmTN7fVs/4A2zMSJVvF1OYCbpR2yW4VAeAZwHtGsRpTlguXXGPTocdyWuFQl7w+I+912r2oif5T9p4ORga1as2udVh1FL3V7tKq7Zm8o37rRNQHG2wWbvkFv2VFO2x2bXYZgSqjEVS4Z97jSzaHP4SGH/SO+UsRizZw2ynQnUmnrN2ISPbOaFSCI30qo2NKkjpqSLqhZNGeXX7lpBJ2Xb6Xmv4R5L8vhPLgmPTJHFwEEsg7i+2i0AAAA="},5139:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"},5157:(e,t,n)=>{"use strict";n.d(t,{H:()=>o});var r=n(8255);function o(e){const t=Object.create(null);return{OperationDefinition(n){const o=n.name;return o&&(t[o.value]?e.reportError(new r.eO(`There can be only one operation named "${o.value}".`,[t[o.value],o])):t[o.value]=o),!1},FragmentDefinition:()=>!1}}},5187:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2455);function o(e,t){let n=null;for(const i of e.definitions){var o;if(i.kind===r.b.OPERATION_DEFINITION)if(null==t){if(n)return null;n=i}else if((null===(o=i.name)||void 0===o?void 0:o.value)===t)return i}return n}},5198:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});const r=10,o=2;function i(e){return a(e,[])}function a(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:a(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>o)return"[Array]";const n=Math.min(r,e.length),i=e.length-n,s=[];for(let r=0;r1&&s.push(`... ${i} more items`),"["+s.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>o)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+a(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5214:(e,t,n)=>{"use strict";t.A_=void 0;var r,o=(r=n(190))&&r.__esModule?r:{default:r};t.A_=o.default,o.default},5229:(e,t,n)=>{!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy((function(o){return t.display.shift||t.doc.extend||o.empty()?function(t,r,o){if(o<0&&0==r.ch)return t.clipPos(n(r.line-1));var i=t.getLine(r.line);if(o>0&&r.ch>=i.length)return t.clipPos(n(r.line+1,0));for(var a,s="start",l=r.ch,c=l,u=o<0?0:i.length,d=0;c!=u;c+=o,d++){var f=i.charAt(o<0?c-1:c),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==s)"o"!=p?(s="in",a=p):l=c+o;else if("in"==s&&a!=p){if("w"==a&&"W"==p&&o<0&&c--,"W"==a&&"w"==p&&o>0){if(c==l+1){a="w";continue}c--}break}}return n(r.line,c)}(t.doc,o.head,r):r<0?o.from():o.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,o=[],i=-1,a=0;a=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],o=0;oi.line&&s==a.line&&0==a.ch||r.push({anchor:s==i.line?i:n(s,0),head:s==a.line?a:n(s)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],o=0;o=0;s--){var c=r[o[s]];if(!(l&&e.cmpPos(c.head,l)>0)){var u=i(t,c.head);l=u.from,t.replaceRange(n(u.word),u.from,u.to)}}}))}function f(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function p(e,t){var r=f(e);if(r){var o=r.query,i=e.getSearchCursor(o,t?r.to:r.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(o,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){l(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!l(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var o=t.scanForBracket(r.head,1,c(t.getTokenTypeAt(r.head)));if(o&&0!=e.cmpPos(o.pos,r.head))return o.pos;var i=t.scanForBracket(r.head,-1,c(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return i&&n(i.pos.line,i.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],i=t.firstLine()-1,a=[],s=0;si?o.push(c,u):o.length&&(o[o.length-1]=u),i=u}t.operation((function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+s,n(t.lastLine()),null,"+swapLine"):t.replaceRange(s+"\n",n(i,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],i=t.lastLine()+1,a=r.length-1;a>=0;a--){var s=r[a],l=s.to().line+1,c=s.from().line;0!=s.to().ch||s.empty()||l--,l=0;e-=2){var r=o[e],i=o[e+1],a=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(a+"\n",n(i,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],o=0;o=0;i--){var a=r[i].head,s=t.getRange({line:a.line,ch:0},a),l=e.countColumn(s,null,t.getOption("tabSize")),c=t.findPosH(a,-1,"char",!1);if(s&&!/\S/.test(s)&&l%o==0){var u=new n(a.line,e.findColumn(s,l-o,o));u.ch!=a.ch&&(c=u)}t.replaceRange("",c,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){d(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){d(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var i=o;o=r,r=i}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){p(e,!0)},t.findUnderPrevious=function(e){p(e,!1)},t.findAllUnder=function(e){var t=f(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],o=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&o++;e.setSelections(r,o)}};var h=e.keyMap;h.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(h.macSublime),h.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(h.pcSublime);var m=h.default==h.macDefault;h.sublime=m?h.macSublime:h.pcSublime}(n(1448),n(5530),n(2278))},5261:(e,t,n)=>{"use strict";n.d(t,{S:()=>c,_:()=>l});var r=n(2455),o=n(7274),i=n(2114),a=n(9494),s=n(9390);function l(e,t,n,r,o){const i=new Map,a=[];return u(e,t,n,r,o,i,a,new Set),{fields:i,patches:a}}function c(e,t,n,r,o){const i=new Map,a=new Set,s=[],l={fields:i,patches:s};for(const l of o)l.selectionSet&&u(e,t,n,r,l.selectionSet,i,s,a);return l}function u(e,t,n,o,i,a,s,l){for(const h of i.selections)switch(h.kind){case r.b.FIELD:{if(!f(n,h))continue;const e=(c=h).alias?c.alias.value:c.name.value,t=a.get(e);void 0!==t?t.push(h):a.set(e,[h]);break}case r.b.INLINE_FRAGMENT:{if(!f(n,h)||!p(e,h,o))continue;const r=d(e,n,h);if(r){const i=new Map;u(e,t,n,o,h.selectionSet,i,s,l),s.push({label:r.label,fields:i})}else u(e,t,n,o,h.selectionSet,a,s,l);break}case r.b.FRAGMENT_SPREAD:{const r=h.name.value;if(!f(n,h))continue;const i=d(e,n,h);if(l.has(r)&&!i)continue;const c=t[r];if(!c||!p(e,c,o))continue;if(l.add(r),i){const r=new Map;u(e,t,n,o,c.selectionSet,r,s,l),s.push({label:i.label,fields:r})}else u(e,t,n,o,c.selectionSet,a,s,l);break}}var c}function d(e,t,n){if(!0!==e._enableDeferStream)return;const r=(0,s.YY)(o.BR,n,t);return r&&!1!==r.if?{label:"string"==typeof r.label?r.label:void 0}:void 0}function f(e,t){const n=(0,s.YY)(o.MQ,t,e);if(!0===(null==n?void 0:n.if))return!1;const r=(0,s.YY)(o.HQ,t,e);return!1!==(null==r?void 0:r.if)}function p(e,t,n){const r=t.typeCondition;if(!r)return!0;const o=(0,a.v)(e,r);return o===n||!!(0,i.Lc)(o)&&e.isSubType(o,n)}},5272:(e,t,n)=>{"use strict";n.d(t,{g:()=>B,H:()=>U});var r=n(8489),o=n(5157),i=n(4719),a=n(99),s=n(4466),l=n(9911),c=n(9461),u=n(48),d=n(5449),f=n(5536),p=n(8898),h=n(1981),m=n(8644),g=n(2833),v=n(2584),y=n(2027),b=n(9201),A=n(6868),w=n(6886),x=n(8255),E=n(7274),C=n(2114),k=n(825),T=n(2475),S=n(1838),N=n(7565),D=n(8022),O=n(5106),I=n(656),L=n(5343),M=n(354),F=n(7368),R=n(2954),P=n(3537),j=n(4410),V=n(7065),q=n(5966);const B=Object.freeze([r.T,o.H,i.P,a.R,s.y,l.T,c.J,u.A,d.Z,f.K,p.K,h.z,m.y,g.n,v._,y.Z,b.p,A.e,w.U,function(e){return{Directive(t){const n=e.getSchema().getMutationType(),r=e.getSchema().getSubscriptionType(),o=e.getParentType();o&&t.name.value===E.BR.name&&(n&&o===n&&e.reportError(new x.eO(`Defer directive cannot be used on root mutation type "${o.name}".`,t)),r&&o===r&&e.reportError(new x.eO(`Defer directive cannot be used on root subscription type "${o.name}".`,t))),o&&t.name.value===E.nK.name&&(n&&o===n&&e.reportError(new x.eO(`Stream directive cannot be used on root mutation type "${o.name}".`,t)),r&&o===r&&e.reportError(new x.eO(`Stream directive cannot be used on root subscription type "${o.name}".`,t)))}}},function(e){return{Directive(t){const n=e.getFieldDef(),r=e.getParentType();n&&r&&t.name.value===E.nK.name&&!((0,C.Fs)(n.type)||(0,C.lS)(n.type)&&(0,C.Fs)(n.type.ofType))&&e.reportError(new x.eO(`Stream directive cannot be used on non-list field "${n.name}" on type "${r.name}".`,t))}}},k.P,T.J,S.U,N.X,D.E,O.K,I.C]),U=Object.freeze([L.l,M.u,F.i,R.g,P.X,j.E,V.Z,s.y,A.e,w.U,q.S,k.W,T.J,I.C,N.A])},5302:(e,t,n)=>{const r=n(1918);function o(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function i(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function a(e){return r(e)||Array.isArray(e)||"function"==typeof e}e.exports=function(e,t,n){if(r(n)||(n={default:n}),!a(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));const s=Array.isArray(t),l="string"==typeof t,c=n.separator||".",u=n.joinChar||("string"==typeof c?c:".");if(!l&&!s)return e;if(l&&t in e)return i(t,e,n)?e[t]:n.default;let d=s?t:function(e,t,n){return"function"==typeof n.split?n.split(e):e.split(t)}(t,c,n),f=d.length,p=0;do{let t=d[p];for("number"==typeof t&&(t=String(t));t&&"\\"===t.slice(-1);)t=o([t.slice(0,-1),d[++p]||""],u,n);if(t in e){if(!i(t,e,n))return n.default;e=e[t]}else{let r=!1,a=p+1;for(;a{"use strict";n.d(t,{GU:()=>p,V4:()=>h,Wl:()=>f});var r=n(5198),o=n(698),i=n(3217),a=n(792),s=n(1070),l=n(9762),c=n(8957),u=n(7274),d=n(2114);function f(e){return(0,a.h)(e,h)}function p(e){if(!f(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL schema.`);return e}class h{constructor(e){var t,n;this.__validationErrors=!0===e.assumeValid?[]:void 0,this._enableDeferStream=e.enableDeferStream,(0,s.Z)(e)||(0,i.U)(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||(0,i.U)(!1,`"types" must be Array if provided but got: ${(0,r.N)(e.types)}.`),!e.directives||Array.isArray(e.directives)||(0,i.U)(!1,`"directives" must be Array if provided but got: ${(0,r.N)(e.directives)}.`),this.description=e.description,this.extensions=(0,o.z)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(t=e.extensionASTNodes)&&void 0!==t?t:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(n=e.directives)&&void 0!==n?n:u.rc,!0===e.enableDeferStream&&(this._directives.some((e=>"defer"===e.name))||(this._directives=[...this._directives,u.BR]),this._directives.some((e=>"stream"===e.name))||(this._directives=[...this._directives,u.nK]));const a=new Set(e.types);if(null!=e.types)for(const t of e.types)a.delete(t),m(t,a);null!=this._queryType&&m(this._queryType,a),null!=this._mutationType&&m(this._mutationType,a),null!=this._subscriptionType&&m(this._subscriptionType,a);for(const e of this._directives)if((0,u.qT)(e))for(const t of e.args)m(t.type,a);m(c.em,a),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const e of a){if(null==e)continue;const t=e.name;if(t||(0,i.U)(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[t])throw new Error(`Schema must contain uniquely named types but contains multiple types named "${t}".`);if(this._typeMap[t]=e,(0,d.kD)(e)){for(const t of e.getInterfaces())if((0,d.kD)(t)){let n=this._implementationsMap[t.name];void 0===n&&(n=this._implementationsMap[t.name]={objects:[],interfaces:[]}),n.interfaces.push(e)}}else if((0,d.YQ)(e))for(const t of e.getInterfaces())if((0,d.kD)(t)){let n=this._implementationsMap[t.name];void 0===n&&(n=this._implementationsMap[t.name]={objects:[],interfaces:[]}),n.objects.push(e)}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case l.cE.QUERY:return this.getQueryType();case l.cE.MUTATION:return this.getMutationType();case l.cE.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return(0,d.CK)(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const t=this._implementationsMap[e.name];return null!=t?t:{objects:[],interfaces:[]}}isSubType(e,t){let n=this._subTypeMap[e.name];if(void 0===n){if(n=Object.create(null),(0,d.CK)(e))for(const t of e.getTypes())n[t.name]=!0;else{const t=this.getImplementations(e);for(const e of t.objects)n[e.name]=!0;for(const e of t.interfaces)n[e.name]=!0}this._subTypeMap[e.name]=n}return void 0!==n[t.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find((t=>t.name===e))}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function m(e,t){const n=(0,d.MR)(e);if(!t.has(n))if(t.add(n),(0,d.CK)(n))for(const e of n.getTypes())m(e,t);else if((0,d.YQ)(n)||(0,d.kD)(n)){for(const e of n.getInterfaces())m(e,t);for(const e of Object.values(n.getFields())){m(e.type,t);for(const n of e.args)m(n.type,t)}}else if((0,d.qK)(n))for(const e of Object.values(n.getFields()))m(e.type,t);return t}},5343:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(8255);function o(e){var t,n,o;const i=e.getSchema(),a=null!==(t=null!==(n=null!==(o=null==i?void 0:i.astNode)&&void 0!==o?o:null==i?void 0:i.getQueryType())&&void 0!==n?n:null==i?void 0:i.getMutationType())&&void 0!==t?t:null==i?void 0:i.getSubscriptionType();let s=0;return{SchemaDefinition(t){a?e.reportError(new r.eO("Cannot define a new schema within a schema extension.",t)):(s>0&&e.reportError(new r.eO("Must provide only one schema definition.",t)),++s)}}}},5410:(e,t,n)=>{"use strict";n.d(t,{D:()=>h});var r=n(5198),o=n(3217),i=n(6394),a=n(1070),s=n(8195),l=n(5329),c=n(7274),u=n(4143),d=n(8957),f=n(2114),p=n(9327);function h(e,t){(0,a.Z)(e)&&(0,a.Z)(e.__schema)||(0,o.U)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,r.N)(e)}.`);const n=e.__schema,h=(0,i.L)(n.types,(e=>e.name),(e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case d.fY.SCALAR:return o=e,new f.Ag({name:o.name,description:o.description,specifiedByURL:o.specifiedByURL});case d.fY.OBJECT:return n=e,new f.bh({name:n.name,description:n.description,interfaces:()=>E(n),fields:()=>C(n)});case d.fY.INTERFACE:return t=e,new f.VA({name:t.name,description:t.description,interfaces:()=>E(t),fields:()=>C(t)});case d.fY.UNION:return function(e){if(!e.possibleTypes){const t=(0,r.N)(e);throw new Error(`Introspection result missing possibleTypes: ${t}.`)}return new f.hI({name:e.name,description:e.description,types:()=>e.possibleTypes.map(w)})}(e);case d.fY.ENUM:return function(e){if(!e.enumValues){const t=(0,r.N)(e);throw new Error(`Introspection result missing enumValues: ${t}.`)}return new f.Zb({name:e.name,description:e.description,values:(0,i.L)(e.enumValues,(e=>e.name),(e=>({description:e.description,deprecationReason:e.deprecationReason})))})}(e);case d.fY.INPUT_OBJECT:return function(e){if(!e.inputFields){const t=(0,r.N)(e);throw new Error(`Introspection result missing inputFields: ${t}.`)}return new f.zP({name:e.name,description:e.description,fields:()=>T(e.inputFields)})}(e)}var t,n,o;const a=(0,r.N)(e);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${a}.`)}(e)));for(const e of[...u.YC,...d.V4])h[e.name]&&(h[e.name]=e);const m=n.queryType?w(n.queryType):null,g=n.mutationType?w(n.mutationType):null,v=n.subscriptionType?w(n.subscriptionType):null,y=n.directives?n.directives.map((function(e){if(!e.args){const t=(0,r.N)(e);throw new Error(`Introspection result missing directive args: ${t}.`)}if(!e.locations){const t=(0,r.N)(e);throw new Error(`Introspection result missing directive locations: ${t}.`)}return new c.RR({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:T(e.args)})})):[];return new l.V4({description:n.description,query:m,mutation:g,subscription:v,types:Object.values(h),directives:y,assumeValid:null==t?void 0:t.assumeValid});function b(e){if(e.kind===d.fY.LIST){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return new f.KT(b(t))}if(e.kind===d.fY.NON_NULL){const t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");const n=b(t);return new f.Gc((0,f.wG)(n))}return A(e)}function A(e){const t=e.name;if(!t)throw new Error(`Unknown type reference: ${(0,r.N)(e)}.`);const n=h[t];if(!n)throw new Error(`Invalid or incomplete schema, unknown type: ${t}. Ensure that a full introspection query is used in order to build a client schema.`);return n}function w(e){return(0,f.qC)(A(e))}function x(e){return(0,f.qL)(A(e))}function E(e){if(null===e.interfaces&&e.kind===d.fY.INTERFACE)return[];if(!e.interfaces){const t=(0,r.N)(e);throw new Error(`Introspection result missing interfaces: ${t}.`)}return e.interfaces.map(x)}function C(e){if(!e.fields)throw new Error(`Introspection result missing fields: ${(0,r.N)(e)}.`);return(0,i.L)(e.fields,(e=>e.name),k)}function k(e){const t=b(e.type);if(!(0,f.oH)(t)){const e=(0,r.N)(t);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const t=(0,r.N)(e);throw new Error(`Introspection result missing field args: ${t}.`)}return{description:e.description,deprecationReason:e.deprecationReason,type:t,args:T(e.args)}}function T(e){return(0,i.L)(e,(e=>e.name),S)}function S(e){const t=b(e.type);if(!(0,f.dX)(t)){const e=(0,r.N)(t);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const n=null!=e.defaultValue?(0,p.i)((0,s.$x)(e.defaultValue),t):void 0;return{description:e.description,type:t,defaultValue:n,deprecationReason:e.deprecationReason}}}},5423:(e,t,n)=>{"use strict";n.r(t);var r=n(1448),o=n.n(r),i=n(1505);const a=["error","warning","information","hint"],s={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};o().registerHelper("lint","graphql",((e,t)=>{const{schema:n,validationRules:r,externalFragments:l}=t;return(0,i.VS)(e,n,r,void 0,l).map((e=>({message:e.message,severity:e.severity?a[e.severity-1]:a[0],type:e.source?s[e.source]:void 0,from:o().Pos(e.range.start.line,e.range.start.character),to:o().Pos(e.range.end.line,e.range.end.character)})))}))},5449:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(4833),o=n(6382),i=n(3858),a=n(8255),s=n(2114);function l(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const l=e.getSchema(),c=t.name.value;let u=(0,r.a)("to use an inline fragment on",function(e,t,n){if(!(0,s.Lc)(t))return[];const r=new Set,o=Object.create(null);for(const i of e.getPossibleTypes(t))if(i.getFields()[n]){r.add(i),o[i.name]=1;for(const e of i.getInterfaces()){var a;e.getFields()[n]&&(r.add(e),o[e.name]=(null!==(a=o[e.name])&&void 0!==a?a:0)+1)}}return[...r].sort(((t,n)=>{const r=o[n.name]-o[t.name];return 0!==r?r:(0,s.kD)(t)&&e.isSubType(t,n)?-1:(0,s.kD)(n)&&e.isSubType(n,t)?1:(0,i.p)(t.name,n.name)})).map((e=>e.name))}(l,n,c));""===u&&(u=(0,r.a)(function(e,t){if((0,s.YQ)(e)||(0,s.kD)(e)){const n=Object.keys(e.getFields());return(0,o.x)(t,n)}return[]}(n,c))),e.reportError(new a.eO(`Cannot query field "${c}" on type "${n.name}".`+u,t))}}}}},5479:(e,t,n)=>{!function(e){"use strict";function t(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var n=e.getCursor();!function(e,t,n,r,o){e.openDialog?e.openDialog(t,o,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(n,r))}(e,function(e){return e.phrase("Jump to line:")+' '+e.phrase("(Use line:column or scroll% syntax)")+""}(e),e.phrase("Jump to line:"),n.line+1+":"+n.ch,(function(r){var o;if(r)if(o=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(r))e.setCursor(t(e,o[1]),Number(o[2]));else if(o=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(r)){var i=Math.round(e.lineCount()*Number(o[1])/100);/^[-+]/.test(o[1])&&(i=n.line+i+1),e.setCursor(i-1,n.ch)}else(o=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(r))&&e.setCursor(t(e,o[1]),n.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(n(1448),n(2804))},5487:(e,t,n)=>{"use strict";function r(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}n.d(t,{K:()=>r})},5530:(e,t,n)=>{!function(e){"use strict";var t,n,r=e.Pos;function o(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),r=n,o=0;ou);d++){var f=e.getLine(c++);s=null==s?f:s+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(s);if(p){var h=s.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function l(e,t,n){for(var r,o=0;o<=e.length;){t.lastIndex=o;var i=t.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=i),o=i.index+1}return r}function c(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.firstLine();i>=s;i--,a=-1){var c=e.getLine(i),u=l(c,t,a<0?0:c.length-a);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function u(e,t,n){if(!i(t))return c(e,t,n);t=o(t,"gm");for(var a,s=1,u=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p=f;p++){var h=e.getLine(d--);a=null==a?h:h+"\n"+a}s*=2;var m=l(a,t,u);if(m){var g=a.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function d(e,t,n,r){if(e.length==t.length)return n;for(var o=0,i=n+Math.max(0,e.length-t.length);;){if(o==i)return o;var a=o+i>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?i=a:o=a+1}}function f(e,o,i,a){if(!o.length)return null;var s=a?t:n,l=s(o).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,f=e.lastLine()+1-l.length;c<=f;c++,u=0){var p=e.getLine(c).slice(u),h=s(p);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return i=d(p,h,m,s)+u,{from:r(c,d(p,h,m,s)+u),to:r(c,d(p,h,m+l[0].length,s)+u)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v=f;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var h=s(p);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(c,d(p,h,m,s)),to:r(c,d(p,h,m+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(i=c-l.length+1;v(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var o=this.matches(t,n);if(this.afterEmptyMatch=o&&0==e.cmpPos(o.from,o.to),o)return this.pos=o,this.atOccurrence=!0,this.pos.match||!0;var i=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var o=e.splitLines(t);this.doc.replaceRange(o,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new h(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new h(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)}))}(n(1448))},5536:(e,t,n)=>{"use strict";n.d(t,{K:()=>o});var r=n(8255);function o(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const o=n.name.value;return t[o]?e.reportError(new r.eO(`There can be only one fragment named "${o}".`,[t[o],n.name])):t[o]=n.name,!1}}}},5541:(e,t,n)=>{!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,o){var i;o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",l),t.off("changes",u),t.off("viewportChange",d),t.off("fold",f),t.off("unfold",f),t.off("swapDoc",u),t.off("optionChange",c)),r&&(t.state.foldGutter=new n((!0===(i=r)&&(i={}),null==i.gutter&&(i.gutter="CodeMirror-foldgutter"),null==i.indicatorOpen&&(i.indicatorOpen="CodeMirror-foldgutter-open"),null==i.indicatorFolded&&(i.indicatorFolded="CodeMirror-foldgutter-folded"),i)),s(t),t.on("gutterClick",l),t.on("changes",u),t.on("viewportChange",d),t.on("fold",f),t.on("unfold",f),t.on("swapDoc",u),t.on("optionChange",c))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),o=0;o=c){if(f&&a&&f.test(a.className))return;i=o(s.indicatorOpen)}}(i||a)&&e.setGutterMarker(n,s.gutter,i)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){i(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function l(e,n,o){var i=e.state.foldGutter;if(i){var a=i.options;if(o==a.gutter){var s=r(e,n);s?s.clear():e.foldCode(t(n,0),a)}}}function c(e,t){"mode"==t&&u(e)}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),n.foldOnChangeTimeSpan||600)}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation((function(){n.fromt.to&&(i(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function f(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAB44AA4AAAAAQKAAAB3hAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGkAbjgwcgTAGYACDFBEMCts8zA4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dRtPtg/O4sQQuoBy1xt/dANpb7Rsu2xjQ4PFYUHZgrxAdWnVFdcWJZeYzaPH49Sr5a7prWiotzRN2a/fKaIR6OCjGEyOgieFFKNK8cQSja3C9ICG4SIg3xmyUC8YeowiUAcTUuBYitYw5AZGEUEMPDyB09YZZw6cFlYsTAsDjn43KE1gQSdkOfBwjwf8WkecNCABaBArUWHASYEQUNqbPAKaDkRYg46EURFedGn3Zj8GJpSffiKGKni/I2zOrfESijUKxoMZIR6NNDNITAzmFVpQSRe3RARaETtKighGrPakorRiPRbGaSVJEi6Gj0sHBGyWBKjpYiQRiIfEkSmlhKbY10RhkwZtZJa2OfXNqf0FzdkEQkujgtoSNM4pJMESOSjgSTZqQbjUWZERV6nbsuZw6s2HDlFVHtPgbqQUtOqseJAAA="},5608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>R,__assign:()=>i,__asyncDelegator:()=>k,__asyncGenerator:()=>C,__asyncValues:()=>T,__await:()=>E,__awaiter:()=>h,__classPrivateFieldGet:()=>L,__classPrivateFieldIn:()=>F,__classPrivateFieldSet:()=>M,__createBinding:()=>g,__decorate:()=>s,__disposeResources:()=>j,__esDecorate:()=>c,__exportStar:()=>v,__extends:()=>o,__generator:()=>m,__importDefault:()=>I,__importStar:()=>O,__makeTemplateObject:()=>S,__metadata:()=>p,__param:()=>l,__propKey:()=>d,__read:()=>b,__rest:()=>a,__rewriteRelativeImportExtension:()=>V,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>A,__spreadArray:()=>x,__spreadArrays:()=>w,__values:()=>y,default:()=>q});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var g=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[c],h);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&o.unshift(s)}else(s=a(g))&&("field"===l?o.unshift(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),f=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function A(){for(var e=[],t=0;t1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof E?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function k(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:E(e[r](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var N=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},D=function(e){return D=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},D(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=D(e),r=0;r{"use strict";e.exports=function(e){return"object"==typeof e?null===e:"function"!=typeof e}},5873:(e,t,n)=>{"use strict";var r=n(3144);t.H=r.createRoot,r.hydrateRoot},5881:(e,t,n)=>{"use strict";function r(e){return 9===e||32===e}function o(e){return e>=48&&e<=57}function i(e){return e>=97&&e<=122||e>=65&&e<=90}function a(e){return i(e)||95===e}function s(e){return i(e)||o(e)||95===e}n.d(t,{i0:()=>r,un:()=>a,xr:()=>s,yp:()=>o})},5966:(e,t,n)=>{"use strict";n.d(t,{S:()=>d});var r=n(5198),o=n(1306),i=n(4833),a=n(6382),s=n(8255),l=n(2455),c=n(3420),u=n(2114);function d(e){const t=e.getSchema(),n=Object.create(null);for(const t of e.getDocument().definitions)(0,c.a6)(t)&&(n[t.name.value]=t);return{ScalarTypeExtension:d,ObjectTypeExtension:d,InterfaceTypeExtension:d,UnionTypeExtension:d,EnumTypeExtension:d,InputObjectTypeExtension:d};function d(c){const d=c.name.value,p=n[d],h=null==t?void 0:t.getType(d);let m;if(p?m=f[p.kind]:h&&(g=h,m=(0,u.lg)(g)?l.b.SCALAR_TYPE_EXTENSION:(0,u.YQ)(g)?l.b.OBJECT_TYPE_EXTENSION:(0,u.kD)(g)?l.b.INTERFACE_TYPE_EXTENSION:(0,u.CK)(g)?l.b.UNION_TYPE_EXTENSION:(0,u.oF)(g)?l.b.ENUM_TYPE_EXTENSION:(0,u.qK)(g)?l.b.INPUT_OBJECT_TYPE_EXTENSION:void(0,o.V)(!1,"Unexpected type: "+(0,r.N)(g))),m){if(m!==c.kind){const t=function(e){switch(e){case l.b.SCALAR_TYPE_EXTENSION:return"scalar";case l.b.OBJECT_TYPE_EXTENSION:return"object";case l.b.INTERFACE_TYPE_EXTENSION:return"interface";case l.b.UNION_TYPE_EXTENSION:return"union";case l.b.ENUM_TYPE_EXTENSION:return"enum";case l.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,o.V)(!1,"Unexpected kind: "+(0,r.N)(e))}}(c.kind);e.reportError(new s.eO(`Cannot extend non-${t} type "${d}".`,p?[p,c]:c))}}else{const r=Object.keys({...n,...null==t?void 0:t.getTypeMap()}),o=(0,a.x)(d,r);e.reportError(new s.eO(`Cannot extend type "${d}" because it is not defined.`+(0,i.a)(o),c.name))}var g}}const f={[l.b.SCALAR_TYPE_DEFINITION]:l.b.SCALAR_TYPE_EXTENSION,[l.b.OBJECT_TYPE_DEFINITION]:l.b.OBJECT_TYPE_EXTENSION,[l.b.INTERFACE_TYPE_DEFINITION]:l.b.INTERFACE_TYPE_EXTENSION,[l.b.UNION_TYPE_DEFINITION]:l.b.UNION_TYPE_EXTENSION,[l.b.ENUM_TYPE_DEFINITION]:l.b.ENUM_TYPE_EXTENSION,[l.b.INPUT_OBJECT_TYPE_DEFINITION]:l.b.INPUT_OBJECT_TYPE_EXTENSION}},5980:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="},6055:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAB0wAA4AAAAAN9AAABzZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmobmnocNgZgAIIEEQwKw1i2CQuCEAABNgIkA4QcBCAFgzIHIBv6LhXc9d0OQlLmtmQkQtg4gChsLYqSwfiU/X+9wI0hUv/ESljasdKOLTGMi44Ndgq6GqWg9LAyZSaQ1p2jO4gS3GO52RdM1zk/kVej1lvvb916njBD4+ETR2hyip0e/N39agQ2E4uSVEGghOwN6WYXpPWQqgRRjyha0wCtB/EaOgzLb9Pfu/Z2gDPJbgFAHz8PpANbQIyq/SvsAQrZCnUkaTL5UDx0hBQuWtrOtqcReJzBYjAGoQxOv0HSnf+5Fg+TUohWeR0q3kQ9Xiap+ObpzxX5eZrb+/dvcVuzkW1i0QoGPSIFiZZMqRKkVCpMjGZmYBZmYCEg1jDBJrQZ7OWgjSirppuMh67lD7df+KNVl3LJKjTepvzfWpntSoeoAgjCbWLjo3T1r05N/66uAe7XIZoFwNkwKiChowYCfEDgLutynkDoGHfenroNPE9TZ/PasmSEjKyMd5djvg7F/LDlMaaaXgSHm8Ya4L+51R3vQjmWFlJe/PwkCLK2ZIrao1UIT8JdOgs824sX1UVVR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pXxiWqqgk+YPrGc65TOIPkyMM9/39ZSZaQgEY5ozufO9zs8bVWNGJsbmTBprjX3OSxSKx/Rg2qK2vfXTd6YMr053Z4PIU01kJxslgRrWKUT3RUJZiHo9+efwYbWPrq5p+PtOtN11x0no+x2lUFcNa0S8Z1rXN+dZ9+hXrwkkw9Vw0tX6q3jcYZZBuzeJ+DMzO05Ymik2y6SwJpTzp5dut14NAIcWU40snpX1ZL+mkiHIry3rNu6SsciQ+2E3qjqa8+8jlD/ftWEEPe5A+3R1EL0v6IP64UnHu3trn+2gdUwFezSvnWkV4ftMtFhihBL1bc5QeToGUx7UR0CTQA4U7VYVb1SMHVA7URqAX2Hk5gdxTYY7bGBAH3VAHqA2gh/qAbkiLEr78N3bBhvWbDwQAVVZR4IsWSNhbMSXmEDZkQjQMiKTW2BAwF4GKkLkEcCBnLoZJKgqSc2lgYBeh97PLv6qwov9Sr1iQXr4XT541HXO+uIGOiUSC4om+Ky9M+SSwYmIj74F8hmwEWHZmbl1bsVTCfBMfjTS9Y1yElVMtHyh1H7yHQxUI+x+/yVNebCwm8lMisZa5+IQE7+9jOiRLOZBrjFRVkO3WO2hNRlc9rFxmJap7Msle2acybJCNRUnB8AqPtIj4neykQB5QlZI+AAA="},6078:(e,t,n)=>{"use strict";function r(e,t){var n,r;const{levels:o,indentLevel:i}=e;return((o&&0!==o.length?o.at(-1)-((null===(n=this.electricInput)||void 0===n?void 0:n.test(t))?1:0):i)||0)*((null===(r=this.config)||void 0===r?void 0:r.indentUnit)||0)}n.d(t,{A:()=>r})},6382:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var r=n(3858);function o(e,t){const n=Object.create(null),o=new i(e),a=Math.floor(.4*e.length)+1;for(const e of t){const t=o.measure(e,a);void 0!==t&&(n[e]=t)}return Object.keys(n).sort(((e,t)=>{const o=n[e]-n[t];return 0!==o?o:(0,r.p)(e,t)}))}class i{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=a(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,t){if(this._input===e)return 0;const n=e.toLowerCase();if(this._inputLowerCase===n)return 1;let r=a(n),o=this._inputArray;if(r.lengtht)return;const l=this._rows;for(let e=0;e<=s;e++)l[0][e]=e;for(let e=1;e<=i;e++){const n=l[(e-1)%3],i=l[e%3];let a=i[0]=e;for(let t=1;t<=s;t++){const s=r[e-1]===o[t-1]?0:1;let c=Math.min(n[t]+1,i[t-1]+1,n[t-1]+s);if(e>1&&t>1&&r[e-1]===o[t-2]&&r[e-2]===o[t-1]){const n=l[(e-2)%3][t-2];c=Math.min(c,n+1)}ct)return}const c=l[i%3][s];return c<=t?c:void 0}}function a(e){const t=e.length,n=new Array(t);for(let r=0;r{"use strict";function r(e,t,n){const r=Object.create(null);for(const o of e)r[t(o)]=n(o);return r}n.d(t,{L:()=>r})},6712:(e,t,n)=>{"use strict";function r(e,t){const n=new Map;for(const r of e){const e=t(r),o=n.get(e);void 0===o?n.set(e,[r]):o.push(r)}return n}n.d(t,{$:()=>r})},6758:e=>{"use strict";e.exports=function(e){return e[1]}},6818:(e,t,n)=>{"use strict";n.d(t,{A:()=>Fe});var r=n(6758),o=n.n(r),i=n(935),a=n.n(i),s=n(62),l=n.n(s),c=new URL(n(7694),n.b),u=new URL(n(5109),n.b),d=new URL(n(7766),n.b),f=new URL(n(4803),n.b),p=new URL(n(1653),n.b),h=new URL(n(7723),n.b),m=new URL(n(8107),n.b),g=new URL(n(8913),n.b),v=new URL(n(6055),n.b),y=new URL(n(7095),n.b),b=new URL(n(4594),n.b),A=new URL(n(8458),n.b),w=new URL(n(79),n.b),x=new URL(n(9653),n.b),E=new URL(n(1051),n.b),C=new URL(n(9256),n.b),k=new URL(n(1945),n.b),T=new URL(n(1781),n.b),S=new URL(n(2911),n.b),N=new URL(n(5579),n.b),D=new URL(n(9131),n.b),O=new URL(n(8467),n.b),I=new URL(n(3906),n.b),L=new URL(n(4086),n.b),M=new URL(n(1427),n.b),F=new URL(n(8643),n.b),R=new URL(n(2878),n.b),P=new URL(n(9756),n.b),j=new URL(n(7321),n.b),V=new URL(n(4949),n.b),q=new URL(n(9060),n.b),B=new URL(n(1435),n.b),U=new URL(n(8881),n.b),z=new URL(n(8150),n.b),H=new URL(n(1954),n.b),Y=new URL(n(4912),n.b),W=new URL(n(5980),n.b),G=new URL(n(3604),n.b),Q=new URL(n(5139),n.b),Z=a()(o()),X=l()(c),K=l()(u),J=l()(d),_=l()(f),$=l()(p),ee=l()(h),te=l()(m),ne=l()(g),re=l()(v),oe=l()(y),ie=l()(b),ae=l()(A),se=l()(w),le=l()(x),ce=l()(E),ue=l()(C),de=l()(k),fe=l()(T),pe=l()(S),he=l()(N),me=l()(D),ge=l()(O),ve=l()(I),ye=l()(L),be=l()(M),Ae=l()(F),we=l()(R),xe=l()(P),Ee=l()(j),Ce=l()(V),ke=l()(q),Te=l()(B),Se=l()(U),Ne=l()(z),De=l()(H),Oe=l()(Y),Ie=l()(W),Le=l()(G),Me=l()(Q);Z.push([e.id,`/*!*********************************************************************************************!*\\\n !*** css ../../../node_modules/css-loader/dist/cjs.js!../../graphiql-react/font/roboto.css ***!\n \\*********************************************************************************************/\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${X})\n format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\n U+FE2E-FE2F;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${K})\n format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${J})\n format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${_})\n format('woff2');\n unicode-range: U+0370-03FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${$})\n format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${ee})\n format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 400;\n font-display: swap;\n src: url(${te})\n format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\n U+FEFF, U+FFFD;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${ne})\n format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\n U+FE2E-FE2F;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${re})\n format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${oe})\n format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${ie})\n format('woff2');\n unicode-range: U+0370-03FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${ae})\n format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${se})\n format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: italic;\n font-weight: 500;\n font-display: swap;\n src: url(${le})\n format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\n U+FEFF, U+FFFD;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${ce})\n format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\n U+FE2E-FE2F;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${ue})\n format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${de})\n format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${fe})\n format('woff2');\n unicode-range: U+0370-03FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${pe})\n format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${he})\n format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${me})\n format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\n U+FEFF, U+FFFD;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${ge})\n format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\n U+FE2E-FE2F;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${ve})\n format('woff2');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${ye})\n format('woff2');\n unicode-range: U+1F00-1FFF;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${be})\n format('woff2');\n unicode-range: U+0370-03FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${Ae})\n format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,\n U+01AF-01B0, U+1EA0-1EF9, U+20AB;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${we})\n format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(${xe})\n format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\n U+FEFF, U+FFFD;\n}\n\n/*!************************************************************************************************!*\\\n !*** css ../../../node_modules/css-loader/dist/cjs.js!../../graphiql-react/font/fira-code.css ***!\n \\************************************************************************************************/\n@font-face {\n font-family: Fira Code;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${Ee})\n format('woff');\n unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,\n U+FE2E-FE2F;\n}\n@font-face {\n font-family: Fira Code;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${Ce})\n format('woff');\n unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n@font-face {\n font-family: Fira Code;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${ke})\n format('woff');\n unicode-range: U+1F00-1FFF;\n}\n@font-face {\n font-family: Fira Code;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${Te})\n format('woff');\n unicode-range: U+0370-03FF;\n}\n@font-face {\n font-family: Fira Code;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${Se})\n format('woff');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,\n U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n@font-face {\n font-family: Fira Code;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(${Ne})\n format('woff');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,\n U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,\n U+FEFF, U+FFFD;\n}\n\n/*!********************************************************************************************!*\\\n !*** css ../../../node_modules/css-loader/dist/cjs.js!../../graphiql-react/dist/style.css ***!\n \\********************************************************************************************/\n/* a very simple box-model reset, intentionally does not include pseudo elements */\n.graphiql-container * {\n box-sizing: border-box;\n font-variant-ligatures: none;\n}\n\n.graphiql-container,\n.CodeMirror-info,\n.CodeMirror-lint-tooltip,\n.graphiql-dialog,\n.graphiql-dialog-overlay,\n.graphiql-tooltip,\n[data-radix-popper-content-wrapper] {\n /* Colors */\n --color-primary: 320, 95%, 43%;\n --color-secondary: 242, 51%, 61%;\n --color-tertiary: 188, 100%, 36%;\n --color-info: 208, 100%, 46%;\n --color-success: 158, 60%, 42%;\n --color-warning: 36, 100%, 41%;\n --color-error: 13, 93%, 58%;\n --color-neutral: 219, 28%, 32%;\n --color-base: 219, 28%, 100%;\n\n /* Color alpha values */\n --alpha-secondary: 0.76;\n --alpha-tertiary: 0.5;\n --alpha-background-heavy: 0.15;\n --alpha-background-medium: 0.1;\n --alpha-background-light: 0.07;\n\n /* Font */\n --font-family: 'Roboto', sans-serif;\n --font-family-mono: 'Fira Code', monospace;\n --font-size-hint: calc(12rem / 16);\n --font-size-inline-code: calc(13rem / 16);\n --font-size-body: calc(15rem / 16);\n --font-size-h4: calc(18rem / 16);\n --font-size-h3: calc(22rem / 16);\n --font-size-h2: calc(29rem / 16);\n --font-weight-regular: 400;\n --font-weight-medium: 500;\n --line-height: 1.5;\n\n /* Spacing */\n --px-2: 2px;\n --px-4: 4px;\n --px-6: 6px;\n --px-8: 8px;\n --px-10: 10px;\n --px-12: 12px;\n --px-16: 16px;\n --px-20: 20px;\n --px-24: 24px;\n\n /* Border radius */\n --border-radius-2: 2px;\n --border-radius-4: 4px;\n --border-radius-8: 8px;\n --border-radius-12: 12px;\n\n /* Popover styles (tooltip, dialog, etc) */\n --popover-box-shadow: 0px 6px 20px rgba(59, 76, 106, 0.13),\n 0px 1.34018px 4.46726px rgba(59, 76, 106, 0.0774939),\n 0px 0.399006px 1.33002px rgba(59, 76, 106, 0.0525061);\n --popover-border: none;\n\n /* Layout */\n --sidebar-width: 60px;\n --toolbar-width: 40px;\n --session-header-height: 51px;\n}\n\n@media (prefers-color-scheme: dark) {\n body:not(.graphiql-light) .graphiql-container,\n body:not(.graphiql-light) .CodeMirror-info,\n body:not(.graphiql-light) .CodeMirror-lint-tooltip,\n body:not(.graphiql-light) .graphiql-dialog,\n body:not(.graphiql-light) .graphiql-dialog-overlay,\n body:not(.graphiql-light) .graphiql-tooltip,\n body:not(.graphiql-light) [data-radix-popper-content-wrapper] {\n --color-primary: 338, 100%, 67%;\n --color-secondary: 243, 100%, 77%;\n --color-tertiary: 188, 100%, 44%;\n --color-info: 208, 100%, 72%;\n --color-success: 158, 100%, 42%;\n --color-warning: 30, 100%, 80%;\n --color-error: 13, 100%, 58%;\n --color-neutral: 219, 29%, 78%;\n --color-base: 219, 29%, 18%;\n\n --popover-box-shadow: none;\n --popover-border: 1px solid hsl(var(--color-neutral));\n }\n}\n\nbody.graphiql-dark .graphiql-container,\nbody.graphiql-dark .CodeMirror-info,\nbody.graphiql-dark .CodeMirror-lint-tooltip,\nbody.graphiql-dark .graphiql-dialog,\nbody.graphiql-dark .graphiql-dialog-overlay,\nbody.graphiql-dark .graphiql-tooltip,\nbody.graphiql-dark [data-radix-popper-content-wrapper] {\n --color-primary: 338, 100%, 67%;\n --color-secondary: 243, 100%, 77%;\n --color-tertiary: 188, 100%, 44%;\n --color-info: 208, 100%, 72%;\n --color-success: 158, 100%, 42%;\n --color-warning: 30, 100%, 80%;\n --color-error: 13, 100%, 58%;\n --color-neutral: 219, 29%, 78%;\n --color-base: 219, 29%, 18%;\n\n --popover-box-shadow: none;\n --popover-border: 1px solid hsl(var(--color-neutral));\n}\n\n.graphiql-container,\n .CodeMirror-info,\n .CodeMirror-lint-tooltip,\n .graphiql-dialog,\n .graphiql-container:is(button),\n .CodeMirror-info:is(button),\n .CodeMirror-lint-tooltip:is(button),\n .graphiql-dialog:is(button) {\n color: hsl(var(--color-neutral));\n font-family: var(--font-family);\n font-size: var(--font-size-body);\n font-weight: var(--font-weight-regular);\n line-height: var(--line-height);\n }\n\n.graphiql-container input, .CodeMirror-info input, .CodeMirror-lint-tooltip input, .graphiql-dialog input {\n color: hsl(var(--color-neutral));\n font-family: var(--font-family);\n font-size: var(--font-size-caption)\n }\n\n.graphiql-container input::placeholder, .CodeMirror-info input::placeholder, .CodeMirror-lint-tooltip input::placeholder, .graphiql-dialog input::placeholder {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n }\n\n.graphiql-container a, .CodeMirror-info a, .CodeMirror-lint-tooltip a, .graphiql-dialog a {\n color: hsl(var(--color-primary))\n }\n\n.graphiql-container a:focus, .CodeMirror-info a:focus, .CodeMirror-lint-tooltip a:focus, .graphiql-dialog a:focus {\n outline: hsl(var(--color-primary)) auto 1px;\n }\n.graphiql-un-styled,\nbutton.graphiql-un-styled {\n all: unset;\n border-radius: var(--border-radius-4);\n cursor: pointer\n}\n\n:is(.graphiql-un-styled,button.graphiql-un-styled):hover {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n }\n\n:is(.graphiql-un-styled,button.graphiql-un-styled):active {\n background-color: hsla(\n var(--color-neutral),\n var(--alpha-background-medium)\n );\n }\n\n:is(.graphiql-un-styled,button.graphiql-un-styled):focus {\n outline: hsla(var(--color-neutral), var(--alpha-background-heavy)) auto 1px;\n }\n\n.graphiql-button,\nbutton.graphiql-button {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n border: none;\n border-radius: var(--border-radius-4);\n color: hsl(var(--color-neutral));\n cursor: pointer;\n font-size: var(--font-size-body);\n padding: var(--px-8) var(--px-12)\n}\n\n:is(.graphiql-button,button.graphiql-button):hover,\n :is(.graphiql-button,button.graphiql-button):active {\n background-color: hsla(\n var(--color-neutral),\n var(--alpha-background-medium)\n );\n }\n\n:is(.graphiql-button,button.graphiql-button):focus {\n outline: hsla(var(--color-neutral), var(--alpha-background-heavy)) auto 1px;\n }\n\n.graphiql-button-success:is(.graphiql-button,button.graphiql-button) {\n background-color: hsla(var(--color-success), var(--alpha-background-heavy));\n }\n\n.graphiql-button-error:is(.graphiql-button,button.graphiql-button) {\n background-color: hsla(var(--color-error), var(--alpha-background-heavy));\n }\n.graphiql-button-group {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n /* Border radius of button plus padding */\n border-radius: calc(var(--border-radius-4) + var(--px-4));\n display: flex;\n padding: var(--px-4)\n}\n.graphiql-button-group > button.graphiql-button {\n background-color: transparent\n }\n.graphiql-button-group > button.graphiql-button:hover {\n background-color: hsla(\n var(--color-neutral),\n var(--alpha-background-light)\n );\n }\n.graphiql-button-group > button.graphiql-button.active {\n background-color: hsl(var(--color-base));\n cursor: default;\n }\n.graphiql-button-group > * + * {\n margin-left: var(--px-8);\n }\n.graphiql-dialog-overlay {\n position: fixed;\n inset: 0;\n background-color: hsla(var(--color-neutral), var(--alpha-background-heavy));\n /**\n * CodeMirror has a \`z-index\` set for the container of the scrollbar of the\n * editor, so we have to add one here to make sure that the dialog is shown\n * above the editor scrollbar (if they are visible).\n */\n z-index: 10;\n}\n\n.graphiql-dialog {\n background-color: hsl(var(--color-base));\n border: var(--popover-border);\n border-radius: var(--border-radius-12);\n box-shadow: var(--popover-box-shadow);\n margin: 0;\n max-height: 80vh;\n max-width: 80vw;\n overflow: auto;\n padding: 0;\n width: unset;\n transform: translate(-50%, -50%);\n top: 50%;\n left: 50%;\n position: fixed;\n z-index: 10;\n}\n\n.graphiql-dialog-close > svg {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n display: block;\n height: var(--px-12);\n padding: var(--px-12);\n width: var(--px-12);\n}\n.graphiql-dropdown-content {\n background-color: hsl(var(--color-base));\n border: var(--popover-border);\n border-radius: var(--border-radius-8);\n box-shadow: var(--popover-box-shadow);\n font-size: inherit;\n max-width: 250px;\n padding: var(--px-4);\n font-family: var(--font-family);\n color: hsl(var(--color-neutral));\n max-height: min(\n calc(var(--radix-dropdown-menu-content-available-height) - 10px),\n 400px\n );\n overflow-y: scroll;\n}\n\n.graphiql-dropdown-item {\n border-radius: var(--border-radius-4);\n font-size: inherit;\n margin: var(--px-4);\n overflow: hidden;\n padding: var(--px-6) var(--px-8);\n text-overflow: ellipsis;\n white-space: nowrap;\n outline: none;\n cursor: pointer;\n line-height: var(--line-height)\n}\n\n.graphiql-dropdown-item[data-selected],\n .graphiql-dropdown-item[data-current-nav],\n .graphiql-dropdown-item:hover {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n color: inherit;\n }\n\n.graphiql-dropdown-item:not(:first-child) {\n margin-top: 0;\n }\n/**\n * We render markdown in the following places:\n * - In the hint tooltip when typing in the query editor (field description\n * and, optionally, deprecation reason).\n * - In the info tooltip when hovering over a field in the query editor\n * (field description and, optionally, deprecation reason).\n */\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) blockquote {\n margin-left: 0;\n margin-right: 0;\n padding-left: var(--px-8);\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) code,\n :is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre {\n border-radius: var(--border-radius-4);\n font-family: var(--font-family-mono);\n font-size: var(--font-size-inline-code);\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) code {\n padding: var(--px-2);\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre {\n overflow: auto;\n padding: var(--px-6) var(--px-8);\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) pre code {\n background-color: initial;\n border-radius: 0;\n padding: 0;\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ol,\n :is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ul {\n padding-left: var(--px-16);\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ol {\n list-style-type: decimal;\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) ul {\n list-style-type: disc;\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) img {\n border-radius: var(--border-radius-4);\n max-height: 120px;\n max-width: 100%;\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) > :first-child {\n margin-top: 0;\n }\n\n:is(.graphiql-markdown-description,.graphiql-markdown-deprecation,.CodeMirror-hint-information-description,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-description,.CodeMirror-info .info-deprecation) > :last-child {\n margin-bottom: 0;\n }\n\n:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) a {\n color: hsl(var(--color-primary));\n text-decoration: none\n }\n\n:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) a:hover {\n text-decoration: underline;\n }\n\n:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) blockquote {\n border-left: 1.5px solid hsla(var(--color-neutral), var(--alpha-tertiary));\n }\n\n:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) code,\n :is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) pre {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n color: hsl(var(--color-neutral));\n }\n\n:is(.graphiql-markdown-description,.CodeMirror-hint-information-description,.CodeMirror-info .info-description) > * {\n margin: var(--px-12) 0;\n }\n\n:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) a {\n color: hsl(var(--color-warning));\n text-decoration: underline;\n }\n\n:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) blockquote {\n border-left: 1.5px solid hsl(var(--color-warning));\n }\n\n:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) code,\n :is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) pre {\n background-color: hsla(var(--color-warning), var(--alpha-background-heavy));\n }\n\n:is(.graphiql-markdown-deprecation,.CodeMirror-hint-information-deprecation-reason,.CodeMirror-info .info-deprecation) > * {\n margin: var(--px-8) 0;\n }\n\n.graphiql-markdown-preview > :not(:first-child) {\n display: none;\n}\n\n/**\n * We show deprecations in the following places:\n * - In the hint tooltip when typing in the query editor.\n * - In the info tooltip when hovering over a field in the query editor.\n */\n\n.CodeMirror-hint-information-deprecation,\n.CodeMirror-info .info-deprecation {\n background-color: hsla(var(--color-warning), var(--alpha-background-light));\n border: 1px solid hsl(var(--color-warning));\n border-radius: var(--border-radius-4);\n color: hsl(var(--color-warning));\n margin-top: var(--px-12);\n padding: var(--px-6) var(--px-8);\n}\n\n.CodeMirror-hint-information-deprecation-label,\n.CodeMirror-info .info-deprecation-label {\n font-size: var(--font-size-hint);\n font-weight: var(--font-weight-medium);\n}\n\n.CodeMirror-hint-information-deprecation-reason,\n.CodeMirror-info .info-deprecation-reason {\n margin-top: var(--px-6);\n}\n.graphiql-spinner {\n height: 56px;\n margin: auto;\n margin-top: var(--px-16);\n width: 56px\n}\n\n.graphiql-spinner::after {\n animation: rotation 0.8s linear 0s infinite;\n border: 4px solid transparent;\n border-radius: 100%;\n border-top: 4px solid hsla(var(--color-neutral), var(--alpha-tertiary));\n content: '';\n display: inline-block;\n height: 46px;\n vertical-align: middle;\n width: 46px;\n }\n\n@keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.graphiql-tooltip {\n background: hsl(var(--color-base));\n border: var(--popover-border);\n border-radius: var(--border-radius-4);\n box-shadow: var(--popover-box-shadow);\n color: hsl(var(--color-neutral));\n font-size: inherit;\n padding: var(--px-4) var(--px-6);\n font-family: var(--font-family);\n}\n.graphiql-tabs {\n display: flex;\n align-items: center;\n overflow-x: auto;\n padding: var(--px-12)\n}\n\n.graphiql-tabs > :not(:first-child) {\n margin-left: var(--px-12);\n }\n\n.graphiql-tab {\n align-items: stretch;\n border-radius: var(--border-radius-8);\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n display: flex\n}\n\n.graphiql-tab > button.graphiql-tab-close {\n visibility: hidden;\n }\n\n.graphiql-tab.graphiql-tab-active > button.graphiql-tab-close,\n .graphiql-tab:hover > button.graphiql-tab-close,\n .graphiql-tab:focus-within > button.graphiql-tab-close {\n visibility: unset;\n }\n\n.graphiql-tab.graphiql-tab-active {\n background-color: hsla(var(--color-neutral), var(--alpha-background-heavy));\n color: hsla(var(--color-neutral), 1);\n }\n\nbutton.graphiql-tab-button {\n padding: var(--px-4) 0 var(--px-4) var(--px-8);\n}\n\nbutton.graphiql-tab-close {\n align-items: center;\n display: flex;\n padding: var(--px-4) var(--px-8)\n}\n\nbutton.graphiql-tab-close > svg {\n height: var(--px-8);\n width: var(--px-8);\n }\n.graphiql-history-header {\n font-size: var(--font-size-h2);\n font-weight: var(--font-weight-medium);\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.graphiql-history-header button {\n font-size: var(--font-size-inline-code);\n padding: var(--px-6) var(--px-10);\n}\n\n.graphiql-history-items {\n margin: var(--px-16) 0 0;\n list-style: none;\n padding: 0;\n}\n\n.graphiql-history-item {\n border-radius: var(--border-radius-4);\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n display: flex;\n font-size: var(--font-size-inline-code);\n font-family: var(--font-family-mono);\n height: 34px\n}\n\n.graphiql-history-item:hover {\n color: hsl(var(--color-neutral));\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n }\n\n.graphiql-history-item:not(:first-child) {\n margin-top: var(--px-4);\n }\n\n.graphiql-history-item.editable {\n background-color: hsla(\n var(--color-primary),\n var(--alpha-background-medium)\n )\n }\n\n.graphiql-history-item.editable > input {\n background: transparent;\n border: none;\n flex: 1;\n margin: 0;\n outline: none;\n padding: 0 var(--px-10);\n width: 100%\n }\n\n.graphiql-history-item.editable > input::placeholder {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n }\n\n.graphiql-history-item.editable > button {\n color: hsl(var(--color-primary));\n padding: 0 var(--px-10)\n }\n\n.graphiql-history-item.editable > button:active {\n background-color: hsla(\n var(--color-primary),\n var(--alpha-background-heavy)\n );\n }\n\n.graphiql-history-item.editable > button:focus {\n outline: hsl(var(--color-primary)) auto 1px;\n }\n\n.graphiql-history-item.editable > button > svg {\n display: block;\n }\n\nbutton.graphiql-history-item-label {\n flex: 1;\n padding: var(--px-8) var(--px-10);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\nbutton.graphiql-history-item-action {\n align-items: center;\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n display: flex;\n padding: var(--px-8) var(--px-6)\n}\n\nbutton.graphiql-history-item-action:hover {\n color: hsl(var(--color-neutral));\n }\n\nbutton.graphiql-history-item-action > svg {\n height: 14px;\n width: 14px;\n }\n\n.graphiql-history-item-spacer {\n height: var(--px-16);\n}\n.graphiql-doc-explorer-default-value {\n color: hsl(var(--color-success));\n}\na.graphiql-doc-explorer-type-name {\n color: hsl(var(--color-warning));\n text-decoration: none\n}\na.graphiql-doc-explorer-type-name:hover {\n text-decoration: underline;\n }\na.graphiql-doc-explorer-type-name:focus {\n outline: hsl(var(--color-warning)) auto 1px;\n }\n\n .graphiql-doc-explorer-argument > * + * {\n margin-top: var(--px-12);\n }\n\n.graphiql-doc-explorer-argument-name {\n color: hsl(var(--color-secondary));\n}\n\n.graphiql-doc-explorer-argument-deprecation {\n background-color: hsla(var(--color-warning), var(--alpha-background-light));\n border: 1px solid hsl(var(--color-warning));\n border-radius: var(--border-radius-4);\n color: hsl(var(--color-warning));\n padding: var(--px-8);\n}\n\n.graphiql-doc-explorer-argument-deprecation-label {\n font-size: var(--font-size-hint);\n font-weight: var(--font-weight-medium);\n}\n.graphiql-doc-explorer-deprecation {\n background-color: hsla(var(--color-warning), var(--alpha-background-light));\n border: 1px solid hsl(var(--color-warning));\n border-radius: var(--px-4);\n color: hsl(var(--color-warning));\n padding: var(--px-8);\n}\n\n.graphiql-doc-explorer-deprecation-label {\n font-size: var(--font-size-hint);\n font-weight: var(--font-weight-medium);\n}\n.graphiql-doc-explorer-directive {\n color: hsl(var(--color-secondary));\n}\n.graphiql-doc-explorer-section-title {\n align-items: center;\n display: flex;\n font-size: var(--font-size-hint);\n font-weight: var(--font-weight-medium);\n line-height: 1\n}\n\n.graphiql-doc-explorer-section-title > svg {\n height: var(--px-16);\n margin-right: var(--px-8);\n width: var(--px-16);\n }\n\n.graphiql-doc-explorer-section-content {\n margin-left: var(--px-8);\n margin-top: var(--px-16)\n}\n\n.graphiql-doc-explorer-section-content > * + * {\n margin-top: var(--px-16);\n }\n.graphiql-doc-explorer-root-type {\n color: hsl(var(--color-info));\n}\n.graphiql-doc-explorer-search {\n color: hsla(var(--color-neutral), var(--alpha-secondary))\n}\n\n.graphiql-doc-explorer-search:not([data-state='idle']) {\n border: var(--popover-border);\n border-radius: var(--border-radius-4);\n box-shadow: var(--popover-box-shadow);\n color: hsl(var(--color-neutral))\n }\n\n.graphiql-doc-explorer-search:not([data-state='idle']) .graphiql-doc-explorer-search-input {\n background: hsl(var(--color-base));\n }\n\n.graphiql-doc-explorer-search-input {\n align-items: center;\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n border-radius: var(--border-radius-4);\n display: flex;\n padding: var(--px-8) var(--px-12);\n}\n\n.graphiql-doc-explorer-search [role='combobox'] {\n border: none;\n background-color: transparent;\n margin-left: var(--px-4);\n width: 100%\n}\n\n.graphiql-doc-explorer-search [role='combobox']:focus {\n outline: none;\n }\n\n.graphiql-doc-explorer-search [role='listbox'] {\n background-color: hsl(var(--color-base));\n border: none;\n border-bottom-left-radius: var(--border-radius-4);\n border-bottom-right-radius: var(--border-radius-4);\n border-top: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n max-height: 400px;\n overflow-y: auto;\n margin: 0;\n font-size: var(--font-size-body);\n padding: var(--px-4);\n /**\n * This makes sure that the logic for auto-scrolling the search results when\n * using keyboard navigation works properly (we use \`offsetTop\` there).\n */\n position: relative;\n}\n\n.graphiql-doc-explorer-search [role='option'] {\n border-radius: var(--border-radius-4);\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n overflow-x: hidden;\n padding: var(--px-8) var(--px-12);\n text-overflow: ellipsis;\n white-space: nowrap;\n cursor: pointer\n}\n\n.graphiql-doc-explorer-search [role='option'][data-headlessui-state='active'] {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n }\n\n.graphiql-doc-explorer-search [role='option']:hover {\n background-color: hsla(\n var(--color-neutral),\n var(--alpha-background-medium)\n );\n }\n\n.graphiql-doc-explorer-search [role='option'][data-headlessui-state='active']:hover {\n background-color: hsla(var(--color-neutral), var(--alpha-background-heavy));\n }\n\n:is(.graphiql-doc-explorer-search [role='option']) + :is(.graphiql-doc-explorer-search [role='option']) {\n margin-top: var(--px-4);\n }\n\n.graphiql-doc-explorer-search-type {\n color: hsl(var(--color-info));\n}\n\n.graphiql-doc-explorer-search-field {\n color: hsl(var(--color-warning));\n}\n\n.graphiql-doc-explorer-search-argument {\n color: hsl(var(--color-secondary));\n}\n\n.graphiql-doc-explorer-search-divider {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n font-size: var(--font-size-hint);\n font-weight: var(--font-weight-medium);\n margin-top: var(--px-8);\n padding: var(--px-8) var(--px-12);\n}\n\n.graphiql-doc-explorer-search-empty {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n padding: var(--px-8) var(--px-12);\n}\na.graphiql-doc-explorer-field-name {\n color: hsl(var(--color-info));\n text-decoration: none\n}\na.graphiql-doc-explorer-field-name:hover {\n text-decoration: underline;\n }\na.graphiql-doc-explorer-field-name:focus {\n outline: hsl(var(--color-info)) auto 1px;\n }\n.graphiql-doc-explorer-item > :not(:first-child) {\n margin-top: var(--px-12);\n}\n\n.graphiql-doc-explorer-argument-multiple {\n margin-left: var(--px-8);\n}\n\n.graphiql-doc-explorer-enum-value {\n color: hsl(var(--color-info));\n}\n/* The header of the doc explorer */\n.graphiql-doc-explorer-header {\n display: flex;\n justify-content: space-between;\n position: relative\n}\n.graphiql-doc-explorer-header:focus-within .graphiql-doc-explorer-title {\n /* Hide the header when focussing the search input */\n visibility: hidden;\n }\n.graphiql-doc-explorer-header:focus-within .graphiql-doc-explorer-back:not(:focus) {\n /**\n * Make the back link invisible when focussing the search input. Hiding\n * it in any other way makes it impossible to focus the link by pressing\n * Shift-Tab while the input is focussed.\n */\n color: transparent;\n }\n.graphiql-doc-explorer-header-content {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n/* The search input in the header of the doc explorer */\n.graphiql-doc-explorer-search {\n position: absolute;\n right: 0;\n top: 0\n}\n.graphiql-doc-explorer-search:focus-within {\n left: 0;\n }\n.graphiql-doc-explorer-search:not(:focus-within) [role='combobox'] {\n height: 24px;\n width: 5ch;\n }\n.graphiql-doc-explorer-search [role='combobox']:focus {\n width: 100%;\n }\n\n/* The back-button in the doc explorer */\na.graphiql-doc-explorer-back {\n align-items: center;\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n display: flex;\n text-decoration: none\n}\na.graphiql-doc-explorer-back:hover {\n text-decoration: underline;\n }\na.graphiql-doc-explorer-back:focus {\n outline: hsla(var(--color-neutral), var(--alpha-secondary)) auto 1px\n }\na.graphiql-doc-explorer-back:focus + .graphiql-doc-explorer-title {\n /* Don't hide the header when focussing the back link */\n visibility: unset;\n }\na.graphiql-doc-explorer-back > svg {\n height: var(--px-8);\n margin-right: var(--px-8);\n width: var(--px-8);\n }\n\n/* The title of the currently active page in the doc explorer */\n.graphiql-doc-explorer-title {\n font-weight: var(--font-weight-medium);\n font-size: var(--font-size-h2);\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap\n}\n.graphiql-doc-explorer-title:not(:first-child) {\n font-size: var(--font-size-h3);\n margin-top: var(--px-8);\n }\n\n/* The contents of the currently active page in the doc explorer */\n.graphiql-doc-explorer-content > * {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n margin-top: var(--px-20);\n}\n\n/* Error message */\n.graphiql-doc-explorer-error {\n background-color: hsla(var(--color-error), var(--alpha-background-heavy));\n border: 1px solid hsl(var(--color-error));\n border-radius: var(--border-radius-8);\n color: hsl(var(--color-error));\n padding: var(--px-8) var(--px-12);\n}\n/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n\n.CodeMirror-linenumbers {}\n\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n\n/* Shown when moving in bi-directional text */\n\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n\n.cm-fat-cursor .CodeMirror-line::selection,\n.cm-fat-cursor .CodeMirror-line > span::selection, \n.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; }\n\n.cm-fat-cursor .CodeMirror-line::-moz-selection,\n.cm-fat-cursor .CodeMirror-line > span::-moz-selection,\n.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; }\n\n.cm-fat-cursor { caret-color: transparent; }\n\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: 0;\n overflow: hidden;\n}\n\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n\n.cm-s-default .cm-quote {color: #090;}\n\n.cm-negative {color: #d44;}\n\n.cm-positive {color: #292;}\n\n.cm-header, .cm-strong {font-weight: bold;}\n\n.cm-em {font-style: italic;}\n\n.cm-link {text-decoration: underline;}\n\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n\n.cm-s-default .cm-atom {color: #219;}\n\n.cm-s-default .cm-number {color: #164;}\n\n.cm-s-default .cm-def {color: #00f;}\n\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n\n.cm-s-default .cm-variable-2 {color: #05a;}\n\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n\n.cm-s-default .cm-comment {color: #a50;}\n\n.cm-s-default .cm-string {color: #a11;}\n\n.cm-s-default .cm-string-2 {color: #f50;}\n\n.cm-s-default .cm-meta {color: #555;}\n\n.cm-s-default .cm-qualifier {color: #555;}\n\n.cm-s-default .cm-builtin {color: #30a;}\n\n.cm-s-default .cm-bracket {color: #997;}\n\n.cm-s-default .cm-tag {color: #170;}\n\n.cm-s-default .cm-attribute {color: #00c;}\n\n.cm-s-default .cm-hr {color: #999;}\n\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\n\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 50px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -50px; margin-right: -50px;\n padding-bottom: 50px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n z-index: 0;\n}\n\n.CodeMirror-sizer {\n position: relative;\n border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n outline: none;\n}\n\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -50px;\n}\n\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\n\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n\n.CodeMirror-crosshair { cursor: crosshair; }\n\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background-color: #ffa;\n background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\n\nspan.CodeMirror-selectedtext { background: none; }\n\n/* Make the editors fill up their container and make them scrollable */\n\n.graphiql-container .CodeMirror {\n height: 100%;\n position: absolute;\n width: 100%;\n}\n\n/* Override font settings */\n\n.graphiql-container .CodeMirror {\n font-family: var(--font-family-mono);\n}\n\n/* Set default background color */\n\n.graphiql-container .CodeMirror,\n.graphiql-container .CodeMirror-gutters {\n background: none;\n background-color: var(--editor-background, hsl(var(--color-base)));\n}\n\n/* No padding around line numbers */\n\n.graphiql-container .CodeMirror-linenumber {\n padding: 0;\n}\n\n/* No border between gutter and editor */\n\n.graphiql-container .CodeMirror-gutters {\n border: none;\n}\n\n/**\n * Editor theme\n */\n\n.cm-s-graphiql {\n /* Default to punctuation */\n color: hsla(var(--color-neutral), var(--alpha-tertiary))\n\n /* OperationType, \`fragment\`, \`on\` */\n}\n\n.cm-s-graphiql .cm-keyword {\n color: hsl(var(--color-primary));\n }\n\n/* Name (OperationDefinition), FragmentName */\n\n.cm-s-graphiql .cm-def {\n color: hsl(var(--color-tertiary));\n }\n\n/* Punctuator (except \`$\` and \`@\`) */\n\n.cm-s-graphiql .cm-punctuation {\n color: hsla(var(--color-neutral), var(--alpha-tertiary));\n }\n\n/* Variable */\n\n.cm-s-graphiql .cm-variable {\n color: hsl(var(--color-secondary));\n }\n\n/* NamedType */\n\n.cm-s-graphiql .cm-atom {\n color: hsl(var(--color-tertiary));\n }\n\n/* IntValue, FloatValue */\n\n.cm-s-graphiql .cm-number {\n color: hsl(var(--color-success));\n }\n\n/* StringValue */\n\n.cm-s-graphiql .cm-string {\n color: hsl(var(--color-warning));\n }\n\n/* BooleanValue */\n\n.cm-s-graphiql .cm-builtin {\n color: hsl(var(--color-success));\n }\n\n/* EnumValue */\n\n.cm-s-graphiql .cm-string-2 {\n color: hsl(var(--color-secondary));\n }\n\n/* Name (ObjectField, Argument) */\n\n.cm-s-graphiql .cm-attribute {\n color: hsl(var(--color-tertiary));\n }\n\n/* Name (Directive) */\n\n.cm-s-graphiql .cm-meta {\n color: hsl(var(--color-tertiary));\n }\n\n/* Name (Alias, Field without Alias) */\n\n.cm-s-graphiql .cm-property {\n color: hsl(var(--color-info));\n }\n\n/* Name (Field with Alias) */\n\n.cm-s-graphiql .cm-qualifier {\n color: hsl(var(--color-secondary));\n }\n\n/* Comment */\n\n.cm-s-graphiql .cm-comment {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n }\n\n/* Whitespace */\n\n.cm-s-graphiql .cm-ws {\n color: hsla(var(--color-neutral), var(--alpha-tertiary));\n }\n\n/* Invalid characters */\n\n.cm-s-graphiql .cm-invalidchar {\n color: hsl(var(--color-error));\n }\n\n/* Cursor */\n\n.cm-s-graphiql .CodeMirror-cursor {\n border-left: 2px solid hsla(var(--color-neutral), var(--alpha-secondary));\n }\n\n/* Color for line numbers and fold-gutters */\n\n.cm-s-graphiql .CodeMirror-linenumber {\n color: hsla(var(--color-neutral), var(--alpha-tertiary));\n }\n\n/* Matching bracket colors */\n\n.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket,\n.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket {\n color: hsl(var(--color-warning));\n}\n\n/* Selected text blocks */\n\n.graphiql-container .CodeMirror-selected,\n.graphiql-container .CodeMirror-focused .CodeMirror-selected {\n background: hsla(var(--color-neutral), var(--alpha-background-heavy));\n}\n\n/* Position the search dialog */\n\n.graphiql-container .CodeMirror-dialog {\n background: inherit;\n color: inherit;\n left: 0;\n right: 0;\n overflow: hidden;\n padding: var(--px-2) var(--px-6);\n position: absolute;\n z-index: 6;\n}\n\n.graphiql-container .CodeMirror-dialog-top {\n border-bottom: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n padding-bottom: var(--px-12);\n top: 0;\n}\n\n.graphiql-container .CodeMirror-dialog-bottom {\n border-top: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n bottom: 0;\n padding-top: var(--px-12);\n}\n\n/* Hide the search hint */\n\n.graphiql-container .CodeMirror-search-hint {\n display: none;\n}\n\n/* Style the input field for searching */\n\n.graphiql-container .CodeMirror-dialog input {\n border: 1px solid hsla(var(--color-neutral), var(--alpha-background-heavy));\n border-radius: var(--border-radius-4);\n padding: var(--px-4);\n}\n\n.graphiql-container .CodeMirror-dialog input:focus {\n outline: hsl(var(--color-primary)) solid 2px;\n}\n\n/* Set the highlight color for search results */\n\n.graphiql-container .cm-searching {\n background-color: hsla(var(--color-warning), var(--alpha-background-light));\n /**\n * When cycling through search results, CodeMirror overlays the current \n * selection with another element that has the .CodeMirror-selected class\n * applied. This adds another background color (see above), but this extra\n * box does not quite match the height of this element. To match them up we\n * add some extra padding here. (Note that this doesn't affect the line\n * height of the CodeMirror editor as all line wrappers have a fixed height.)\n */\n padding-bottom: 1.5px;\n padding-top: 0.5px;\n}\n.CodeMirror-foldmarker {\n color: blue;\n text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n font-family: arial;\n line-height: .3;\n cursor: pointer;\n}\n.CodeMirror-foldgutter {\n width: .7em;\n}\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n cursor: pointer;\n}\n.CodeMirror-foldgutter-open:after {\n content: "\\25BE";\n}\n.CodeMirror-foldgutter-folded:after {\n content: "\\25B8";\n}\n.CodeMirror-foldgutter {\n width: var(--px-12);\n}\n.CodeMirror-foldmarker {\n background-color: hsl(var(--color-info));\n border-radius: var(--border-radius-4);\n color: hsl(var(--color-base));\n font-family: inherit;\n margin: 0 var(--px-4);\n padding: 0 var(--px-8);\n text-shadow: none;\n}\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n color: hsla(var(--color-neutral), var(--alpha-tertiary))\n}\n.CodeMirror-foldgutter-open::after, .CodeMirror-foldgutter-folded::after {\n margin: 0 var(--px-2);\n }\n.graphiql-editor {\n height: 100%;\n position: relative;\n width: 100%\n}\n.graphiql-editor.hidden {\n /* Just setting \`display: none;\` would break the editor gutters */\n left: -9999px;\n position: absolute;\n top: -9999px;\n visibility: hidden;\n }\n/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n.CodeMirror-lint-tooltip {\n background-color: #ffd;\n border: 1px solid black;\n border-radius: 4px 4px 4px 4px;\n color: black;\n font-family: monospace;\n font-size: 10pt;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n white-space: pre;\n white-space: pre-wrap;\n z-index: 100;\n max-width: 600px;\n opacity: 0;\n transition: opacity .4s;\n -moz-transition: opacity .4s;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n -ms-transition: opacity .4s;\n}\n.CodeMirror-lint-mark {\n background-position: left bottom;\n background-repeat: repeat-x;\n}\n.CodeMirror-lint-mark-warning {\n background-image: url(${De});\n}\n.CodeMirror-lint-mark-error {\n background-image: url(${Oe});\n}\n.CodeMirror-lint-marker {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n position: relative;\n}\n.CodeMirror-lint-message {\n padding-left: 18px;\n background-position: top left;\n background-repeat: no-repeat;\n}\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n background-image: url(${Ie});\n}\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url(${Le});\n}\n.CodeMirror-lint-marker-multiple {\n background-image: url(${Me});\n background-repeat: no-repeat;\n background-position: right bottom;\n width: 100%; height: 100%;\n}\n.CodeMirror-lint-line-error {\n background-color: rgba(183, 76, 81, 0.08);\n}\n.CodeMirror-lint-line-warning {\n background-color: rgba(255, 211, 0, 0.1);\n}\n/* Text styles */\n.CodeMirror-lint-mark-error,\n.CodeMirror-lint-mark-warning {\n background-repeat: repeat-x;\n /**\n * The following two are very specific to the font size, so we use \n * "magic values" instead of variables.\n */\n background-size: 10px 3px;\n background-position: 0 95%;\n}\n.cm-s-graphiql .CodeMirror-lint-mark-error {\n color: hsl(var(--color-error));\n}\n.CodeMirror-lint-mark-error {\n background-image: linear-gradient(\n 45deg,\n transparent 65%,\n hsl(var(--color-error)) 80%,\n transparent 90%\n ),\n linear-gradient(\n 135deg,\n transparent 5%,\n hsl(var(--color-error)) 15%,\n transparent 25%\n ),\n linear-gradient(\n 135deg,\n transparent 45%,\n hsl(var(--color-error)) 55%,\n transparent 65%\n ),\n linear-gradient(\n 45deg,\n transparent 25%,\n hsl(var(--color-error)) 35%,\n transparent 50%\n );\n}\n.cm-s-graphiql .CodeMirror-lint-mark-warning {\n color: hsl(var(--color-warning));\n}\n.CodeMirror-lint-mark-warning {\n background-image: linear-gradient(\n 45deg,\n transparent 65%,\n hsl(var(--color-warning)) 80%,\n transparent 90%\n ),\n linear-gradient(\n 135deg,\n transparent 5%,\n hsl(var(--color-warning)) 15%,\n transparent 25%\n ),\n linear-gradient(\n 135deg,\n transparent 45%,\n hsl(var(--color-warning)) 55%,\n transparent 65%\n ),\n linear-gradient(\n 45deg,\n transparent 25%,\n hsl(var(--color-warning)) 35%,\n transparent 50%\n );\n}\n/* Popup styles */\n.CodeMirror-lint-tooltip {\n background-color: hsl(var(--color-base));\n border: var(--popover-border);\n border-radius: var(--border-radius-8);\n box-shadow: var(--popover-box-shadow);\n font-size: var(--font-size-body);\n font-family: var(--font-family);\n max-width: 600px;\n overflow: hidden;\n padding: var(--px-12);\n}\n.CodeMirror-lint-message-error,\n.CodeMirror-lint-message-warning {\n background-image: none;\n padding: 0;\n}\n.CodeMirror-lint-message-error {\n color: hsl(var(--color-error));\n}\n.CodeMirror-lint-message-warning {\n color: hsl(var(--color-warning));\n}\n.CodeMirror-hints {\n position: absolute;\n z-index: 10;\n overflow: hidden;\n list-style: none;\n\n margin: 0;\n padding: 2px;\n\n -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n border-radius: 3px;\n border: 1px solid silver;\n\n background: white;\n font-size: 90%;\n font-family: monospace;\n\n max-height: 20em;\n overflow-y: auto;\n}\n\n.CodeMirror-hint {\n margin: 0;\n padding: 0 4px;\n border-radius: 2px;\n white-space: pre;\n color: black;\n cursor: pointer;\n}\n\nli.CodeMirror-hint-active {\n background: #08f;\n color: white;\n}\n\n/* Popup styles */\n\n.CodeMirror-hints {\n background: hsl(var(--color-base));\n border: var(--popover-border);\n border-radius: var(--border-radius-8);\n box-shadow: var(--popover-box-shadow);\n display: grid;\n font-family: var(--font-family);\n font-size: var(--font-size-body);\n grid-template-columns: auto fit-content(300px);\n /* By default this is equals exactly 8 items including margins */\n max-height: 264px;\n padding: 0;\n}\n\n/* Autocomplete items */\n\n.CodeMirror-hint {\n border-radius: var(--border-radius-4);\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n grid-column: 1 / 2;\n margin: var(--px-4);\n /* Override element style added by codemirror */\n padding: var(--px-6) var(--px-8) !important\n}\n\n.CodeMirror-hint:not(:first-child) {\n margin-top: 0;\n }\n\nli.CodeMirror-hint-active {\n background: hsla(var(--color-primary), var(--alpha-background-medium));\n color: hsl(var(--color-primary));\n}\n\n/* Sidebar with additional information */\n\n.CodeMirror-hint-information {\n border-left: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n grid-column: 2 / 3;\n grid-row: 1 / 99999;\n /* Same as the popup */\n max-height: 264px;\n overflow: auto;\n padding: var(--px-12);\n}\n\n.CodeMirror-hint-information-header {\n display: flex;\n align-items: baseline;\n}\n\n.CodeMirror-hint-information-field-name {\n font-size: var(--font-size-h4);\n font-weight: var(--font-weight-medium);\n}\n\n.CodeMirror-hint-information-type-name-pill {\n border: 1px solid hsla(var(--color-neutral), var(--alpha-tertiary));\n border-radius: var(--border-radius-4);\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n margin-left: var(--px-6);\n padding: var(--px-4);\n}\n\n.CodeMirror-hint-information-type-name {\n color: inherit;\n text-decoration: none\n}\n\n.CodeMirror-hint-information-type-name:hover {\n text-decoration: underline dotted;\n }\n\n.CodeMirror-hint-information-description {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n margin-top: var(--px-12);\n}\n/* Popup styles */\n.CodeMirror-info {\n background-color: hsl(var(--color-base));\n border: var(--popover-border);\n border-radius: var(--border-radius-8);\n box-shadow: var(--popover-box-shadow);\n color: hsl(var(--color-neutral));\n max-height: 300px;\n max-width: 400px;\n opacity: 0;\n overflow: auto;\n padding: var(--px-12);\n position: fixed;\n transition: opacity 0.15s;\n z-index: 10\n\n /* Link styles */\n}\n.CodeMirror-info a {\n color: inherit;\n text-decoration: none\n }\n.CodeMirror-info a:hover {\n text-decoration: underline dotted;\n }\n/* Align elements in header */\n.CodeMirror-info .CodeMirror-info-header {\n display: flex;\n align-items: baseline;\n }\n/* Main elements */\n.CodeMirror-info .CodeMirror-info-header > .type-name,\n .CodeMirror-info .CodeMirror-info-header > .field-name,\n .CodeMirror-info .CodeMirror-info-header > .arg-name,\n .CodeMirror-info .CodeMirror-info-header > .directive-name,\n .CodeMirror-info .CodeMirror-info-header > .enum-value {\n font-size: var(--font-size-h4);\n font-weight: var(--font-weight-medium);\n }\n/* Type names */\n.CodeMirror-info .type-name-pill {\n border: 1px solid hsla(var(--color-neutral), var(--alpha-tertiary));\n border-radius: var(--border-radius-4);\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n margin-left: var(--px-6);\n padding: var(--px-4);\n }\n/* Descriptions */\n.CodeMirror-info .info-description {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n margin-top: var(--px-12);\n overflow: hidden;\n }\n/* Underline the clickable token */\n.CodeMirror-jump-token {\n text-decoration: underline dotted;\n cursor: pointer;\n}\n.auto-inserted-leaf.cm-property {\n animation-duration: 6s;\n animation-name: insertionFade;\n border-radius: var(--border-radius-4);\n padding: var(--px-2);\n}\n\n@keyframes insertionFade {\n from,\n to {\n background-color: none;\n }\n\n 15%,\n 85% {\n background-color: hsla(var(--color-warning), var(--alpha-background-light));\n }\n}\nbutton.graphiql-toolbar-button {\n display: flex;\n align-items: center;\n justify-content: center;\n height: var(--toolbar-width);\n width: var(--toolbar-width)\n}\nbutton.graphiql-toolbar-button.error {\n background: hsla(var(--color-error), var(--alpha-background-heavy));\n }\n.graphiql-execute-button-wrapper {\n position: relative;\n}\n\nbutton.graphiql-execute-button {\n background-color: hsl(var(--color-primary));\n border: none;\n border-radius: var(--border-radius-8);\n cursor: pointer;\n height: var(--toolbar-width);\n padding: 0;\n width: var(--toolbar-width)\n}\n\nbutton.graphiql-execute-button:hover {\n background-color: hsla(var(--color-primary), 0.9);\n }\n\nbutton.graphiql-execute-button:active {\n background-color: hsla(var(--color-primary), 0.8);\n }\n\nbutton.graphiql-execute-button:focus {\n outline: hsla(var(--color-primary), 0.8) auto 1px;\n }\n\nbutton.graphiql-execute-button > svg {\n color: white;\n display: block;\n height: var(--px-16);\n margin: auto;\n width: var(--px-16);\n }\nbutton.graphiql-toolbar-menu {\n display: block;\n height: var(--toolbar-width);\n width: var(--toolbar-width);\n}\n\n/*!*********************************************************************************************************************!*\\\n !*** css ../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js!./style.css ***!\n \\*********************************************************************************************************************/\n/* Everything */\n.graphiql-container {\n background-color: hsl(var(--color-base));\n display: flex;\n height: 100%;\n margin: 0;\n overflow: hidden;\n width: 100%;\n}\n/* The sidebar */\n.graphiql-container .graphiql-sidebar {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: var(--px-8);\n width: var(--sidebar-width);\n}\n.graphiql-container .graphiql-sidebar .graphiql-sidebar-section {\n display: flex;\n flex-direction: column;\n gap: var(--px-8);\n}\n.graphiql-container .graphiql-sidebar button {\n display: flex;\n align-items: center;\n justify-content: center;\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n height: calc(var(--sidebar-width) - (2 * var(--px-8)));\n width: calc(var(--sidebar-width) - (2 * var(--px-8)));\n}\n.graphiql-container .graphiql-sidebar button.active {\n color: hsl(var(--color-neutral));\n}\n.graphiql-container .graphiql-sidebar button:not(:first-child) {\n margin-top: var(--px-4);\n}\n.graphiql-container .graphiql-sidebar button > svg {\n height: var(--px-20);\n width: var(--px-20);\n}\n/* The main content, i.e. everything except the sidebar */\n.graphiql-container .graphiql-main {\n display: flex;\n flex: 1;\n min-width: 0;\n}\n/* The current session and tabs */\n.graphiql-container .graphiql-sessions {\n background-color: hsla(var(--color-neutral), var(--alpha-background-light));\n /* Adding the 8px of padding to the inner border radius of the query editor */\n border-radius: calc(var(--border-radius-12) + var(--px-8));\n display: flex;\n flex-direction: column;\n flex: 1;\n max-height: 100%;\n margin: var(--px-16);\n margin-left: 0;\n min-width: 0;\n}\n/* The session header containing tabs and the logo */\n.graphiql-container .graphiql-session-header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n height: var(--session-header-height);\n}\n/* The button to add a new tab */\nbutton.graphiql-tab-add {\n height: 100%;\n padding: var(--px-4);\n}\nbutton.graphiql-tab-add > svg {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n display: block;\n height: var(--px-16);\n width: var(--px-16);\n}\n/* The right-hand-side of the session header */\n.graphiql-container .graphiql-session-header-right {\n align-items: center;\n display: flex;\n}\n/* The GraphiQL logo */\n.graphiql-container .graphiql-logo {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n font-size: var(--font-size-h4);\n font-weight: var(--font-weight-medium);\n padding: var(--px-12) var(--px-16);\n}\n/* Undo default link styling for the default GraphiQL logo link */\n.graphiql-container .graphiql-logo .graphiql-logo-link {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n text-decoration: none;\n}\n/* The editor of the session */\n.graphiql-container .graphiql-session {\n display: flex;\n flex: 1;\n padding: 0 var(--px-8) var(--px-8);\n}\n/* All editors (query, variable, headers) */\n.graphiql-container .graphiql-editors {\n background-color: hsl(var(--color-base));\n border-radius: calc(var(--border-radius-12));\n box-shadow: var(--popover-box-shadow);\n display: flex;\n flex: 1;\n flex-direction: column;\n}\n.graphiql-container .graphiql-editors.full-height {\n margin-top: calc(var(--px-8) - var(--session-header-height));\n}\n/* The query editor and the toolbar */\n.graphiql-container .graphiql-query-editor {\n border-bottom: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n padding: var(--px-16);\n column-gap: var(--px-16);\n display: flex;\n width: 100%;\n}\n/* The vertical toolbar next to the query editor */\n.graphiql-container .graphiql-toolbar {\n width: var(--toolbar-width);\n}\n.graphiql-container .graphiql-toolbar > * + * {\n margin-top: var(--px-8);\n}\n/* The toolbar icons */\n.graphiql-toolbar-icon {\n color: hsla(var(--color-neutral), var(--alpha-tertiary));\n display: block;\n height: calc(var(--toolbar-width) - (var(--px-8) * 2));\n width: calc(var(--toolbar-width) - (var(--px-8) * 2));\n}\n/* The tab bar for editor tools */\n.graphiql-container .graphiql-editor-tools {\n cursor: row-resize;\n display: flex;\n width: 100%;\n column-gap: var(--px-8);\n padding: var(--px-8);\n}\n.graphiql-container .graphiql-editor-tools button {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n}\n.graphiql-container .graphiql-editor-tools button.active {\n color: hsl(var(--color-neutral));\n}\n/* The tab buttons to switch between editor tools */\n.graphiql-container\n .graphiql-editor-tools\n > button:not(.graphiql-toggle-editor-tools) {\n padding: var(--px-8) var(--px-12);\n}\n.graphiql-container .graphiql-editor-tools .graphiql-toggle-editor-tools {\n margin-left: auto;\n}\n/* An editor tool, e.g. variable or header editor */\n.graphiql-container .graphiql-editor-tool {\n flex: 1;\n padding: var(--px-16);\n}\n/**\n * The way CodeMirror editors are styled they overflow their containing\n * element. For some OS-browser-combinations this might cause overlap issues,\n * setting the position of this to \`relative\` makes sure this element will\n * always be on top of any editors.\n */\n.graphiql-container .graphiql-toolbar,\n.graphiql-container .graphiql-editor-tools,\n.graphiql-container .graphiql-editor-tool {\n position: relative;\n}\n/* The response view */\n.graphiql-container .graphiql-response {\n --editor-background: transparent;\n display: flex;\n width: 100%;\n flex-direction: column;\n}\n/* The results editor wrapping container */\n.graphiql-container .graphiql-response .result-window {\n position: relative;\n flex: 1;\n}\n/* The footer below the response view */\n.graphiql-container .graphiql-footer {\n border-top: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n}\n/* The plugin container */\n.graphiql-container .graphiql-plugin {\n border-left: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n flex: 1;\n overflow-y: auto;\n padding: var(--px-16);\n}\n/* Generic drag bar for horizontal resizing */\n.graphiql-horizontal-drag-bar {\n width: var(--px-12);\n cursor: col-resize;\n}\n.graphiql-horizontal-drag-bar:hover::after {\n border: var(--px-2) solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n border-radius: var(--border-radius-2);\n content: '';\n display: block;\n height: 25%;\n margin: 0 auto;\n position: relative;\n /* (100% - 25%) / 2 = 37.5% */\n top: 37.5%;\n width: 0;\n}\n.graphiql-container .graphiql-chevron-icon {\n color: hsla(var(--color-neutral), var(--alpha-tertiary));\n display: block;\n height: var(--px-12);\n margin: var(--px-12);\n width: var(--px-12);\n}\n/* Generic spin animation */\n.graphiql-spin {\n animation: spin 0.8s linear 0s infinite;\n}\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n/* The header of the settings dialog */\n.graphiql-dialog .graphiql-dialog-header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n padding: var(--px-24);\n}\n/* The title of the settings dialog */\n.graphiql-dialog .graphiql-dialog-title {\n font-size: var(--font-size-h3);\n font-weight: var(--font-weight-medium);\n margin: 0;\n}\n/* A section inside the settings dialog */\n.graphiql-dialog .graphiql-dialog-section {\n align-items: center;\n border-top: 1px solid\n hsla(var(--color-neutral), var(--alpha-background-heavy));\n display: flex;\n justify-content: space-between;\n padding: var(--px-24);\n}\n.graphiql-dialog .graphiql-dialog-section > :not(:first-child) {\n margin-left: var(--px-24);\n}\n/* The section title in the settings dialog */\n.graphiql-dialog .graphiql-dialog-section-title {\n font-size: var(--font-size-h4);\n font-weight: var(--font-weight-medium);\n}\n/* The section caption in the settings dialog */\n.graphiql-dialog .graphiql-dialog-section-caption {\n color: hsla(var(--color-neutral), var(--alpha-secondary));\n}\n.graphiql-dialog .graphiql-warning-text {\n color: hsl(var(--color-warning));\n font-weight: var(--font-weight-medium);\n}\n.graphiql-dialog .graphiql-table {\n border-collapse: collapse;\n width: 100%;\n}\n.graphiql-dialog .graphiql-table :is(th, td) {\n border: 1px solid hsla(var(--color-neutral), var(--alpha-background-heavy));\n padding: var(--px-8) var(--px-12);\n}\n/* A single key the short-key dialog */\n.graphiql-dialog .graphiql-key {\n background-color: hsla(var(--color-neutral), var(--alpha-background-medium));\n border-radius: var(--border-radius-4);\n padding: var(--px-4);\n}\n/* Avoid showing native tooltips for icons with titles */\n.graphiql-container svg {\n pointer-events: none;\n}`,""]);const Fe=Z},6856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ANSI_REGEXP=void 0,t.stripAnsi=function(e){return e.replace(t.ANSI_REGEXP,"")},t.ANSI_REGEXP=/[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))/g},6868:(e,t,n)=>{"use strict";n.d(t,{e:()=>u});var r=n(5198),o=n(1306),i=n(8255),a=n(2455),s=n(9762),l=n(2868),c=n(7274);function u(e){const t=Object.create(null),n=e.getSchema(),u=n?n.getDirectives():c.rc;for(const e of u)t[e.name]=e.locations;const d=e.getDocument().definitions;for(const e of d)e.kind===a.b.DIRECTIVE_DEFINITION&&(t[e.name.value]=e.locations.map((e=>e.value)));return{Directive(n,c,u,d,f){const p=n.name.value,h=t[p];if(!h)return void e.reportError(new i.eO(`Unknown directive "@${p}".`,n));const m=function(e){const t=e[e.length-1];switch("kind"in t||(0,o.V)(!1),t.kind){case a.b.OPERATION_DEFINITION:return function(e){switch(e){case s.cE.QUERY:return l.H.QUERY;case s.cE.MUTATION:return l.H.MUTATION;case s.cE.SUBSCRIPTION:return l.H.SUBSCRIPTION}}(t.operation);case a.b.FIELD:return l.H.FIELD;case a.b.FRAGMENT_SPREAD:return l.H.FRAGMENT_SPREAD;case a.b.INLINE_FRAGMENT:return l.H.INLINE_FRAGMENT;case a.b.FRAGMENT_DEFINITION:return l.H.FRAGMENT_DEFINITION;case a.b.VARIABLE_DEFINITION:return l.H.VARIABLE_DEFINITION;case a.b.SCHEMA_DEFINITION:case a.b.SCHEMA_EXTENSION:return l.H.SCHEMA;case a.b.SCALAR_TYPE_DEFINITION:case a.b.SCALAR_TYPE_EXTENSION:return l.H.SCALAR;case a.b.OBJECT_TYPE_DEFINITION:case a.b.OBJECT_TYPE_EXTENSION:return l.H.OBJECT;case a.b.FIELD_DEFINITION:return l.H.FIELD_DEFINITION;case a.b.INTERFACE_TYPE_DEFINITION:case a.b.INTERFACE_TYPE_EXTENSION:return l.H.INTERFACE;case a.b.UNION_TYPE_DEFINITION:case a.b.UNION_TYPE_EXTENSION:return l.H.UNION;case a.b.ENUM_TYPE_DEFINITION:case a.b.ENUM_TYPE_EXTENSION:return l.H.ENUM;case a.b.ENUM_VALUE_DEFINITION:return l.H.ENUM_VALUE;case a.b.INPUT_OBJECT_TYPE_DEFINITION:case a.b.INPUT_OBJECT_TYPE_EXTENSION:return l.H.INPUT_OBJECT;case a.b.INPUT_VALUE_DEFINITION:{const t=e[e.length-3];return"kind"in t||(0,o.V)(!1),t.kind===a.b.INPUT_OBJECT_TYPE_DEFINITION?l.H.INPUT_FIELD_DEFINITION:l.H.ARGUMENT_DEFINITION}default:(0,o.V)(!1,"Unexpected kind: "+(0,r.N)(t.kind))}}(f);m&&!h.includes(m)&&e.reportError(new i.eO(`Directive "@${p}" may not be used on ${m}.`,n))}}}},6886:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(8255),o=n(2455),i=n(3420),a=n(7274);function s(e){const t=Object.create(null),n=e.getSchema(),s=n?n.getDirectives():a.rc;for(const e of s)t[e.name]=!e.isRepeatable;const l=e.getDocument().definitions;for(const e of l)e.kind===o.b.DIRECTIVE_DEFINITION&&(t[e.name.value]=!e.repeatable);const c=Object.create(null),u=Object.create(null);return{enter(n){if(!("directives"in n)||!n.directives)return;let a;if(n.kind===o.b.SCHEMA_DEFINITION||n.kind===o.b.SCHEMA_EXTENSION)a=c;else if((0,i.a6)(n)||(0,i.i7)(n)){const e=n.name.value;a=u[e],void 0===a&&(u[e]=a=Object.create(null))}else a=Object.create(null);for(const o of n.directives){const n=o.name.value;t[n]&&(a[n]?e.reportError(new r.eO(`The directive "@${n}" can only be used once at this location.`,[a[n],o])):a[n]=o)}}}}},7065:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(8255);function o(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(o){const i=o.name.value;if(null==n||!n.getDirective(i))return t[i]?e.reportError(new r.eO(`There can be only one directive named "@${i}".`,[t[i],o.name])):t[i]=o.name,!1;e.reportError(new r.eO(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,o.name))}}}},7095:e=>{"use strict";e.exports="data:font/woff2;base64,d09GMgABAAAAAANUAA4AAAAABbwAAAMBAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGiYbIBw2BmAANBEMCoI0ghgLEAABNgIkAxwEIAWDMgcgG5sECK4GbGM62A+KOMNGmZWUwcdhKI9l4Sh/WwYP/3af9w0W4ERa2bOg405uoSptTooGKkF8HniO5b+Iojvye4dReBbNtVHwcLQTG2gBzQfYOqjJ/XYU/jItwgxa4I3czM4Fj9LAAnlHz+dzgSO71Jqn2QML8H66dROj0qAFLYnRhtm0b89/erW/v8l/LA6we9gCizDBtQzSf4EtkcwDT6RtmgYEQXnDKGQslZyX/CkQSFgBAE4ERggEAgmwACwQgADMsONAJKVkFWEBgAJgwMz1NlLWec3G+jtZu+rXO1i7rx/sZi0AEwB5WVY28FUE1CORQAjvtSPftAwCQQjGAbTUfm4qwrvbNmDEf5pjR4JoxElAiYiMWjQyIAEy4EBGAA4UNKCgIMC7a5Cej2sCAA+SMEEyYA2AMQBWgCmQAObACrAAQAUAJCSDMEDmo7CztfXoRGu7SUeVdbvosOq6N6PHnZ2yf9l3eXPj/q2qXdkjBL+qrix1cYsqzItOvXfRPaMXkUvPeFWoxr7tZB8gfxIhMauBapmSUhO8d3O8wUt0MoI7UAxLzt0/zhCwJnVHrsPYXenm8suPeLYORWqn/3wwK6Qp+frDiYGvxHSXFzoXfpihfmlODl9oFbOqKa8nXbZgd6axNivh4JS8xEZKChij/nuDBPx/MrxQA/WBACCtK44947xa66g/k0YcALjxaesDuBuQP/7x/3bTwmQACVMkAAQYd/7HYBqK1H97hriqWIzlN7cD8Qu1mY6Ql7eR9v8qAcCY/apKqAgArEBCCmOEAExoJiOUENTgBAI3NSBhwSjIbLboV0Blo3PIiN06hxVFfmrr0WtMvzYtWg3SBPDjz58mVY8eLTrpNOm6NfKhidepk6ZAbgbym+oG6PoN0zXxUaBHgx6Demiy6Zq0GdIl3aB6ndo04r7WvSV0/Qa0Nd2+yKcNFCrSvh/6dNKO3xV33aBeEXxNZKTyQUaverfOR49+LZno1XUboBt4oSzpEiXLUSjZDgF8+JHBMIY0KQAA"},7122:(e,t,n)=>{!function(e){"use strict";var t="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=function(e,t,n){var r=e.options.hintOptions,o={};for(var i in c)o[i]=c[i];if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;ou.clientHeight+1;if(setTimeout((function(){D=s.getScrollInfo()})),O.bottom-N>0){var L=O.bottom-O.top,M=O.top-(y.bottom-y.top)-2;N-O.topM&&(u.style.height=(L=M)+"px"),u.style.top=(A=y.top-L)+E+"px",w=!1):u.style.height=N-O.top-2+"px"}var F,R=O.right-S;if(I&&(R+=s.display.nativeBarWidth),R>0&&(O.right-O.left>S&&(u.style.width=S-5+"px",R-=O.right-O.left-S),u.style.left=(b=Math.max(y.left-R-x,0))+"px"),I)for(var P=u.firstChild;P;P=P.nextSibling)P.style.paddingRight=s.display.nativeBarWidth+"px";s.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,o=r?{}:n;function i(e,r){var i;i="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,o[e]=i}if(r)for(var a in r)r.hasOwnProperty(a)&&i(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&i(a,s[a]);return o}(n,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:f.length,close:function(){n.close()},pick:function(){o.pick()},data:r})),n.options.closeOnUnfocus&&(s.on("blur",this.onBlur=function(){F=setTimeout((function(){n.close()}),100)}),s.on("focus",this.onFocus=function(){clearTimeout(F)})),s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),t=s.getWrapperElement().getBoundingClientRect();D||(D=s.getScrollInfo());var r=A+D.top-e.top,o=r-(c.pageYOffset||(l.documentElement||l.body).scrollTop);if(w||(o+=u.offsetHeight),o<=t.top||o>=t.bottom)return n.close();u.style.top=r+"px",u.style.left=b+D.left-e.left+"px"}),e.on(u,"dblclick",(function(e){var t=a(u,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(u,"click",(function(e){var t=a(u,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),n.options.completeOnSingleClick&&o.pick())})),e.on(u,"mousedown",(function(){setTimeout((function(){s.focus()}),20)}));var j=this.getSelectedHintRange();return 0===j.from&&0===j.to||this.scrollToActive(),e.signal(r,"select",f[this.selectedHint],u.childNodes[this.selectedHint]),!0}function l(e,t,n,r){if(e.async)e(t,r,n);else{var o=e(t,n);o&&o.then?o.then(r):r(o)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],o=this;this.cm.operation((function(){r.hint?r.hint(o.cm,t,r):o.cm.replaceRange(i(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?n=r?this.data.list.length-1:0:n<0&&(n=r?0:this.data.list.length-1),this.selectedHint!=n){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+t,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=n]).className+=" "+t,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,o=t.getHelpers(n,"hint");if(o.length){var i=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):o(i+1)}))}(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,o=t.getCursor(),i=t.getTokenAt(o),a=e.Pos(o.line,i.start),s=o;i.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(1448))},7258:(e,t,n)=>{"use strict";n.r(t);var r=n(2114),o=n(1448),i=n.n(o),a=n(9786),s=n(3958);function l(e,t,n,o){const i=document.createElement("span");i.className="type-name-pill",o instanceof r.Gc?(c(i,t,n,o.ofType),d(i,"!")):o instanceof r.KT?(d(i,"["),c(i,t,n,o.ofType),d(i,"]")):d(i,(null==o?void 0:o.name)||"","type-name",n,(0,s.a2)(t,o)),e.append(i)}function c(e,t,n,o){o instanceof r.Gc?(c(e,t,n,o.ofType),d(e,"!")):o instanceof r.KT?(d(e,"["),c(e,t,n,o.ofType),d(e,"]")):d(e,(null==o?void 0:o.name)||"","type-name",n,(0,s.a2)(t,o))}function u(e,t,n){const{description:r}=n;if(r){const n=document.createElement("div");n.className="info-description",t.renderDescription?n.innerHTML=t.renderDescription(r):n.append(document.createTextNode(r)),e.append(n)}!function(e,t,n){const r=n.deprecationReason;if(r){const n=document.createElement("div");n.className="info-deprecation",e.append(n);const o=document.createElement("span");o.className="info-deprecation-label",o.append(document.createTextNode("Deprecated")),n.append(o);const i=document.createElement("div");i.className="info-deprecation-reason",t.renderDescription?i.innerHTML=t.renderDescription(r):i.append(document.createTextNode(r)),n.append(i)}}(e,t,n)}function d(e,t,n="",r={onClick:null},o=null){if(n){const{onClick:i}=r;let a;i?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",(e=>{e.preventDefault(),i(o,e)}))):a=document.createElement("span"),a.className=n,a.append(document.createTextNode(t)),e.append(a)}else e.append(document.createTextNode(t))}n(8059),i().registerHelper("info","graphql",((e,t)=>{var n;if(!t.schema||!e.state)return;const{kind:r,step:o}=e.state,i=(0,a.A)(t.schema,e.state);if("Field"===r&&0===o&&i.fieldDef||"AliasedField"===r&&2===o&&i.fieldDef||"ObjectField"===r&&0===o&&i.fieldDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){(function(e,t,n){var r;d(e,(null===(r=t.fieldDef)||void 0===r?void 0:r.name)||"","field-name",n,(0,s.Q0)(t))})(e,t,n),l(e,t,n,t.type)}(e,i,t);const n=document.createElement("div");return n.append(e),u(n,t,i.fieldDef),n}if("Directive"===r&&1===o&&i.directiveDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;d(e,"@"+((null===(r=t.directiveDef)||void 0===r?void 0:r.name)||""),"directive-name",n,(0,s.t8)(t))}(e,i,t);const n=document.createElement("div");return n.append(e),u(n,t,i.directiveDef),n}if("Argument"===r&&0===o&&i.argDef){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;d(e,(null===(r=t.argDef)||void 0===r?void 0:r.name)||"","arg-name",n,(0,s.Hh)(t)),l(e,t,n,t.inputType)}(e,i,t);const n=document.createElement("div");return n.append(e),u(n,t,i.argDef),n}if("EnumValue"===r&&(null===(n=i.enumValue)||void 0===n?void 0:n.description)){const e=document.createElement("div");e.className="CodeMirror-info-header",function(e,t,n){var r;const o=(null===(r=t.enumValue)||void 0===r?void 0:r.name)||"";c(e,t,n,t.inputType),d(e,"."),d(e,o,"enum-value",n,(0,s.IR)(t))}(e,i,t);const n=document.createElement("div");return n.append(e),u(n,t,i.enumValue),n}if("NamedType"===r&&i.type&&i.type.description){const e=document.createElement("div");e.className="CodeMirror-info-header",c(e,i,t,i.type);const n=document.createElement("div");return n.append(e),u(n,t,i.type),n}}))},7274:(e,t,n)=>{"use strict";n.d(t,{BR:()=>v,HQ:()=>m,Il:()=>b,MQ:()=>g,Qe:()=>E,RR:()=>h,gw:()=>w,nK:()=>y,qT:()=>f,rc:()=>x,yK:()=>A,yq:()=>p});var r=n(5198),o=n(698),i=n(3217),a=n(792),s=n(1070),l=n(2868),c=n(567),u=n(4143),d=n(2114);function f(e){return(0,a.h)(e,h)}function p(e){if(!f(e))throw new Error(`Expected ${(0,r.N)(e)} to be a GraphQL directive.`);return e}class h{constructor(e){var t,n;this.name=(0,c.I)(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(t=e.isRepeatable)&&void 0!==t&&t,this.extensions=(0,o.z)(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||(0,i.U)(!1,`@${e.name} locations must be an Array.`);const r=null!==(n=e.args)&&void 0!==n?n:{};(0,s.Z)(r)&&!Array.isArray(r)||(0,i.U)(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=(0,d.Kx)(r)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,d.g0)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const m=new h({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[l.H.FIELD,l.H.FRAGMENT_SPREAD,l.H.INLINE_FRAGMENT],args:{if:{type:new d.Gc(u.kk),description:"Included when true."}}}),g=new h({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[l.H.FIELD,l.H.FRAGMENT_SPREAD,l.H.INLINE_FRAGMENT],args:{if:{type:new d.Gc(u.kk),description:"Skipped when true."}}}),v=new h({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[l.H.FRAGMENT_SPREAD,l.H.INLINE_FRAGMENT],args:{if:{type:u.kk,description:"Deferred when true or undefined."},label:{type:u.FV,description:"Unique name"}}}),y=new h({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[l.H.FIELD],args:{if:{type:u.kk,description:"Stream when true or undefined."},label:{type:u.FV,description:"Unique name"},initialCount:{defaultValue:0,type:u.Fh,description:"Number of items to return immediately"}}}),b="No longer supported",A=new h({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[l.H.FIELD_DEFINITION,l.H.ARGUMENT_DEFINITION,l.H.INPUT_FIELD_DEFINITION,l.H.ENUM_VALUE],args:{reason:{type:u.FV,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:b}}}),w=new h({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[l.H.SCALAR],args:{url:{type:new d.Gc(u.FV),description:"The URL that specifies the behavior of this scalar."}}}),x=Object.freeze([m,g,A,w]);function E(e){return x.some((({name:t})=>t===e.name))}},7321:e=>{"use strict";e.exports="data:font/woff;base64,d09GRgABAAAAADhUAA8AAAAAVfwAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABWAAAAHIAAACmCwIKakdQT1MAAAHMAAAAIAAAACBEdkx1R1NVQgAAAewAAABAAAAAQodMa01PUy8yAAACLAAAAFQAAABgc+SqD1NUQVQAAAKAAAAAKgAAAC55kWzdY21hcAAAAqwAAAFAAAABxDJPUwdnYXNwAAAD7AAAAAgAAAAIAAAAEGdseWYAAAP0AAAvawAASRaIk5X9aGVhZAAAM2AAAAA2AAAANhL1JvtoaGVhAAAzmAAAAB8AAAAkAzn+dWhtdHgAADO4AAABdwAAA7RA9GIebG9jYQAANTAAAAHhAAAB5vJU4EVtYXhwAAA3FAAAABwAAAAgAWACg25hbWUAADcwAAABCwAAAkgzWFNlcG9zdAAAODwAAAAWAAAAIP+fADN42h3DsTFFUQAFwD0vhQwyKQCQAgARNAENKEAMAHQAEEEPQANK+Xf+7KyoNAPOVFq1F9GhS/QYFCNFjJkQU+bEQhFLRaxYExu2xI5dsedAHDkWp87FVRE37sRDEU9FvHgTH77ETxF//qWo0FgfaprNFW0AAAABAAAACgAcAB4AAURGTFQACAAEAAAAAP//AAAAAAAAeNpjYGRgYOBisGNwYGBzcfMJYVBLrizKYTBIL0rNZjDISSzJYzCoyszLAJKVlZUMBgwsDEDw/z8DHAAAwqUNgnjaY2Bh2ck4gYGVgYHlC8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1Fj2PiNIj6ZBDCJsEJi4Ofdp3mj4MbGL0s80aGzwunCEVZh4AkbdX7QB42mNgZgCD/3MYjIAUIwMaAAAqlAHSAAA="},7350:(e,t,n)=>{"use strict";n.d(t,{D:()=>c,S:()=>d});var r=n(2455),o=n(9762),i=n(424),a=n(2114),s=n(8957),l=n(9494);class c{constructor(e,t,n){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=n?n:u,t&&((0,a.dX)(t)&&this._inputTypeStack.push(t),(0,a.ML)(t)&&this._parentTypeStack.push(t),(0,a.oH)(t)&&this._typeStack.push(t))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const t=this._schema;switch(e.kind){case r.b.SELECTION_SET:{const e=(0,a.MR)(this.getType());this._parentTypeStack.push((0,a.ML)(e)?e:void 0);break}case r.b.FIELD:{const n=this.getParentType();let r,o;n&&(r=this._getFieldDef(t,n,e),r&&(o=r.type)),this._fieldDefStack.push(r),this._typeStack.push((0,a.oH)(o)?o:void 0);break}case r.b.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case r.b.OPERATION_DEFINITION:{const n=t.getRootType(e.operation);this._typeStack.push((0,a.YQ)(n)?n:void 0);break}case r.b.INLINE_FRAGMENT:case r.b.FRAGMENT_DEFINITION:{const n=e.typeCondition,r=n?(0,l.v)(t,n):(0,a.MR)(this.getType());this._typeStack.push((0,a.oH)(r)?r:void 0);break}case r.b.VARIABLE_DEFINITION:{const n=(0,l.v)(t,e.type);this._inputTypeStack.push((0,a.dX)(n)?n:void 0);break}case r.b.ARGUMENT:{var n;let t,r;const o=null!==(n=this.getDirective())&&void 0!==n?n:this.getFieldDef();o&&(t=o.args.find((t=>t.name===e.name.value)),t&&(r=t.type)),this._argument=t,this._defaultValueStack.push(t?t.defaultValue:void 0),this._inputTypeStack.push((0,a.dX)(r)?r:void 0);break}case r.b.LIST:{const e=(0,a.yl)(this.getInputType()),t=(0,a.Fs)(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,a.dX)(t)?t:void 0);break}case r.b.OBJECT_FIELD:{const t=(0,a.MR)(this.getInputType());let n,r;(0,a.qK)(t)&&(r=t.getFields()[e.name.value],r&&(n=r.type)),this._defaultValueStack.push(r?r.defaultValue:void 0),this._inputTypeStack.push((0,a.dX)(n)?n:void 0);break}case r.b.ENUM:{const t=(0,a.MR)(this.getInputType());let n;(0,a.oF)(t)&&(n=t.getValue(e.value)),this._enumValue=n;break}}}leave(e){switch(e.kind){case r.b.SELECTION_SET:this._parentTypeStack.pop();break;case r.b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case r.b.DIRECTIVE:this._directive=null;break;case r.b.OPERATION_DEFINITION:case r.b.INLINE_FRAGMENT:case r.b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case r.b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case r.b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case r.b.LIST:case r.b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case r.b.ENUM:this._enumValue=null}}}function u(e,t,n){const r=n.name.value;return r===s.S0.name&&e.getQueryType()===t?s.S0:r===s.Xe.name&&e.getQueryType()===t?s.Xe:r===s.of.name&&(0,a.ML)(t)?s.of:(0,a.YQ)(t)||(0,a.kD)(t)?t.getFields()[r]:void 0}function d(e,t){return{enter(...n){const r=n[0];e.enter(r);const a=(0,i.XO)(t,r.kind).enter;if(a){const i=a.apply(t,n);return void 0!==i&&(e.leave(r),(0,o.Ll)(i)&&e.enter(i)),i}},leave(...n){const r=n[0],o=(0,i.XO)(t,r.kind).leave;let a;return o&&(a=o.apply(t,n)),e.leave(r),a}}}},7368:(e,t,n)=>{"use strict";n.d(t,{i:()=>o});var r=n(8255);function o(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:o,ObjectTypeDefinition:o,InterfaceTypeDefinition:o,UnionTypeDefinition:o,EnumTypeDefinition:o,InputObjectTypeDefinition:o};function o(o){const i=o.name.value;if(null==n||!n.getType(i))return t[i]?e.reportError(new r.eO(`There can be only one type named "${i}".`,[t[i],o.name])):t[i]=o.name,!1;e.reportError(new r.eO(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,o.name))}}},7400:(e,t,n)=>{"use strict";var r=n(4041),o=n(7967);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n