@teleporthq/teleport-project-plugin-parse-embed 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 teleporthq
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,17 @@
1
+ import { ProjectPluginStructure, ProjectPlugin, UIDLElementNode, UIDLRootComponent, ComponentUIDL } from '@teleporthq/teleport-types';
2
+ import { SUPPORTED_PROJECT_TYPES } from './utils';
3
+ export declare class ProjectPluginParseEmbed implements ProjectPlugin {
4
+ fromHtml: (value: string, opts: {
5
+ fragment: boolean;
6
+ }) => unknown;
7
+ hastToJsxOrHtml: (content: unknown) => string;
8
+ loadFromHTML(): Promise<(value: string, opts: {
9
+ fragment: boolean;
10
+ }) => unknown>;
11
+ loadNodeMapper(id: SUPPORTED_PROJECT_TYPES): Promise<(content: unknown) => string>;
12
+ traverseComponentUIDL(node: UIDLElementNode, id: SUPPORTED_PROJECT_TYPES): Promise<boolean>;
13
+ traverseNodeAndAddImport(componentUIDL: UIDLRootComponent | ComponentUIDL, projectType: SUPPORTED_PROJECT_TYPES): Promise<void>;
14
+ runBefore(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
15
+ runAfter(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAA6B,MAAM,SAAS,CAAA;AAQ5E,qBAAa,uBAAwB,YAAW,aAAa;IAC3D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAA;IACjE,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAEvC,YAAY,IAAI,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IAOhF,cAAc,CAAC,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAOlF,qBAAqB,CACzB,IAAI,EAAE,eAAe,EACrB,EAAE,EAAE,uBAAuB,GAC1B,OAAO,CAAC,OAAO,CAAC;IAiCb,wBAAwB,CAC5B,aAAa,EAAE,iBAAiB,GAAG,aAAa,EAChD,WAAW,EAAE,uBAAuB;IAYhC,SAAS,CAAC,SAAS,EAAE,sBAAsB;IAsB3C,QAAQ,CAAC,SAAS,EAAE,sBAAsB;CAcjD"}
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.ProjectPluginParseEmbed = void 0;
51
+ var teleport_shared_1 = require("@teleporthq/teleport-shared");
52
+ var utils_1 = require("./utils");
53
+ var NODE_MAPPER = {
54
+ 'teleport-project-html': import('hast-util-to-html').then(function (mod) { return mod.toHtml; }),
55
+ 'teleport-project-react': import('hast-util-to-jsx-inline-script').then(function (mod) { return mod.default; }),
56
+ 'teleport-project-next': import('hast-util-to-jsx-inline-script').then(function (mod) { return mod.default; }),
57
+ };
58
+ var ProjectPluginParseEmbed = /** @class */ (function () {
59
+ function ProjectPluginParseEmbed() {
60
+ }
61
+ ProjectPluginParseEmbed.prototype.loadFromHTML = function () {
62
+ return __awaiter(this, void 0, void 0, function () {
63
+ var _a;
64
+ return __generator(this, function (_b) {
65
+ switch (_b.label) {
66
+ case 0:
67
+ if (!!this.fromHtml) return [3 /*break*/, 2];
68
+ _a = this;
69
+ return [4 /*yield*/, import('hast-util-from-html')];
70
+ case 1:
71
+ _a.fromHtml = (_b.sent()).fromHtml;
72
+ _b.label = 2;
73
+ case 2: return [2 /*return*/, this.fromHtml];
74
+ }
75
+ });
76
+ });
77
+ };
78
+ ProjectPluginParseEmbed.prototype.loadNodeMapper = function (id) {
79
+ return __awaiter(this, void 0, void 0, function () {
80
+ var _a;
81
+ return __generator(this, function (_b) {
82
+ switch (_b.label) {
83
+ case 0:
84
+ if (!!this.hastToJsxOrHtml) return [3 /*break*/, 2];
85
+ _a = this;
86
+ return [4 /*yield*/, NODE_MAPPER[id]];
87
+ case 1:
88
+ _a.hastToJsxOrHtml = _b.sent();
89
+ _b.label = 2;
90
+ case 2: return [2 /*return*/, this.hastToJsxOrHtml];
91
+ }
92
+ });
93
+ });
94
+ };
95
+ ProjectPluginParseEmbed.prototype.traverseComponentUIDL = function (node, id) {
96
+ return __awaiter(this, void 0, void 0, function () {
97
+ var _this = this;
98
+ return __generator(this, function (_a) {
99
+ return [2 /*return*/, new Promise(function (resolve, reject) {
100
+ try {
101
+ var shouldAddJSDependency_1 = false;
102
+ teleport_shared_1.UIDLUtils.traverseElements(node, function (element) {
103
+ var _a;
104
+ if (element.elementType === 'html-node' && ((_a = element.attrs) === null || _a === void 0 ? void 0 : _a.html) && NODE_MAPPER[id]) {
105
+ var hastNodes = _this.fromHtml(element.attrs.html.content, {
106
+ fragment: true,
107
+ });
108
+ var content = _this.hastToJsxOrHtml(hastNodes);
109
+ element.elementType = 'container';
110
+ element.attrs = {};
111
+ element.style = { display: { type: 'static', content: 'contents' } };
112
+ element.children = [
113
+ {
114
+ type: 'inject',
115
+ content: content,
116
+ },
117
+ ];
118
+ if (content.includes('<Script')) {
119
+ shouldAddJSDependency_1 = true;
120
+ }
121
+ }
122
+ });
123
+ resolve(shouldAddJSDependency_1);
124
+ }
125
+ catch (error) {
126
+ reject(error);
127
+ }
128
+ })];
129
+ });
130
+ });
131
+ };
132
+ ProjectPluginParseEmbed.prototype.traverseNodeAndAddImport = function (componentUIDL, projectType) {
133
+ return __awaiter(this, void 0, void 0, function () {
134
+ var shouldAddJSDependency;
135
+ return __generator(this, function (_a) {
136
+ switch (_a.label) {
137
+ case 0: return [4 /*yield*/, this.traverseComponentUIDL(componentUIDL.node, projectType)];
138
+ case 1:
139
+ shouldAddJSDependency = _a.sent();
140
+ if (shouldAddJSDependency) {
141
+ componentUIDL.importDefinitions = __assign(__assign({}, ((componentUIDL === null || componentUIDL === void 0 ? void 0 : componentUIDL.importDefinitions) || {})), utils_1.JS_EXECUTION_DEPENDENCIES[projectType]);
142
+ }
143
+ return [2 /*return*/];
144
+ }
145
+ });
146
+ });
147
+ };
148
+ ProjectPluginParseEmbed.prototype.runBefore = function (structure) {
149
+ var _a;
150
+ return __awaiter(this, void 0, void 0, function () {
151
+ var projectType, promises, components, i;
152
+ return __generator(this, function (_b) {
153
+ switch (_b.label) {
154
+ case 0: return [4 /*yield*/, this.loadFromHTML()];
155
+ case 1:
156
+ _b.sent();
157
+ projectType = structure.strategy.id;
158
+ return [4 /*yield*/, this.loadNodeMapper(projectType)];
159
+ case 2:
160
+ _b.sent();
161
+ if (!NODE_MAPPER[projectType]) {
162
+ return [2 /*return*/, structure];
163
+ }
164
+ promises = [];
165
+ promises.push(this.traverseNodeAndAddImport(structure.uidl.root, projectType));
166
+ components = Object.keys(((_a = structure.uidl) === null || _a === void 0 ? void 0 : _a.components) || {});
167
+ for (i = 0; i < components.length; i++) {
168
+ promises.push(this.traverseNodeAndAddImport(structure.uidl.components[components[i]], projectType));
169
+ }
170
+ return [4 /*yield*/, Promise.all(promises)];
171
+ case 3:
172
+ _b.sent();
173
+ return [2 /*return*/, structure];
174
+ }
175
+ });
176
+ });
177
+ };
178
+ ProjectPluginParseEmbed.prototype.runAfter = function (structure) {
179
+ return __awaiter(this, void 0, void 0, function () {
180
+ return __generator(this, function (_a) {
181
+ if (!NODE_MAPPER[structure.strategy.id]) {
182
+ return [2 /*return*/, structure];
183
+ }
184
+ /* tslint:disable no-string-literal */
185
+ delete structure.dependencies['Script'];
186
+ if (structure.strategy.id === 'teleport-project-react') {
187
+ structure.dependencies['dangerous-html'] = '^0.1.13';
188
+ }
189
+ return [2 /*return*/, structure];
190
+ });
191
+ });
192
+ };
193
+ return ProjectPluginParseEmbed;
194
+ }());
195
+ exports.ProjectPluginParseEmbed = ProjectPluginParseEmbed;
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ {"program":{"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.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.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.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../src/hast-util-to-jsx-inline-script.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../../teleport-shared/dist/cjs/constants/index.d.ts","../../../teleport-shared/dist/cjs/utils/string-utils.d.ts","../../../teleport-shared/dist/cjs/utils/uidl-utils.d.ts","../../../teleport-shared/dist/cjs/index.d.ts","../../src/utils.ts","../../../../node_modules/@types/unist/index.d.ts","../../../../node_modules/@types/hast/index.d.ts","../../../../node_modules/hast-util-raw/complex-types.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/lib/util/format-smart.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/lib/core.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/lib/index.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/index.d.ts","../../../../node_modules/property-information/lib/util/info.d.ts","../../../../node_modules/property-information/lib/util/schema.d.ts","../../../../node_modules/property-information/lib/find.d.ts","../../../../node_modules/property-information/lib/hast-to-react.d.ts","../../../../node_modules/property-information/lib/normalize.d.ts","../../../../node_modules/property-information/index.d.ts","../../../../node_modules/hast-util-to-html/lib/types.d.ts","../../../../node_modules/hast-util-to-html/lib/index.d.ts","../../../../node_modules/hast-util-to-html/index.d.ts","../../../../node_modules/vfile-message/lib/index.d.ts","../../../../node_modules/vfile-message/index.d.ts","../../../../node_modules/vfile/lib/minurl.shared.d.ts","../../../../node_modules/vfile/lib/index.d.ts","../../../../node_modules/vfile/index.d.ts","../../../../node_modules/parse5/dist/common/html.d.ts","../../../../node_modules/parse5/dist/common/token.d.ts","../../../../node_modules/parse5/dist/common/error-codes.d.ts","../../../../node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../../../node_modules/parse5/dist/tokenizer/index.d.ts","../../../../node_modules/parse5/dist/tree-adapters/interface.d.ts","../../../../node_modules/parse5/dist/parser/open-element-stack.d.ts","../../../../node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../../../node_modules/parse5/dist/parser/index.d.ts","../../../../node_modules/parse5/dist/tree-adapters/default.d.ts","../../../../node_modules/parse5/dist/serializer/index.d.ts","../../../../node_modules/parse5/dist/common/foreign-content.d.ts","../../../../node_modules/parse5/dist/index.d.ts","../../../../node_modules/hast-util-from-parse5/lib/index.d.ts","../../../../node_modules/hast-util-from-parse5/index.d.ts","../../../../node_modules/hast-util-from-html/lib/index.d.ts","../../../../node_modules/hast-util-from-html/index.d.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.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/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/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/repl.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/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","impliedFormat":1},{"version":"27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true,"impliedFormat":1},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true,"impliedFormat":1},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true,"impliedFormat":1},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true,"impliedFormat":1},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true,"impliedFormat":1},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a51ec59808167919b26d173c7f192d531e8aecf80e6dee221144d664f572e11c","impliedFormat":1},{"version":"b0ad356fc4a8e013847bc92edf176c378bf8067bcd92c1b33da72cd7b0e7f12d","impliedFormat":1},{"version":"dc7b6fb4e681f2994276f15236dc87eda8b97143c997516fa379a1859b623661","impliedFormat":1},{"version":"4137c1e9ff2dafc313d40f0f6a53f15c940e8a8c598eb00c180442ce899e7098","impliedFormat":1},{"version":"d49a625c30294f92976c954fffb2bcc2faeb81957148a363969ee742a43e2913","impliedFormat":1},{"version":"5621ff944b21af7ee121d246ced471809a583960ea48d688a24845d37ab6658e","impliedFormat":1},{"version":"cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","impliedFormat":1},{"version":"28b22326000119f53de35f67ce3096ef475a2224274162b1283ef8718e1efdb5","impliedFormat":1},{"version":"18aecf77d74ed15ae1e875a0d43f2aa85387794fc447b2bc3c8ab7e2224d0ac6","impliedFormat":1},{"version":"dec878eee8200aa11e572e49df63ead625013b16713cd183d383b07c1f6df92e","impliedFormat":1},{"version":"d2ff55204dd4868d11a163c207d4fbe8d99cbf8cb36fa90d2a2f0bfc802b4d38","impliedFormat":1},{"version":"376c03c97a3a883c3e696a4f4c1fee69afd4b30aeaa1989b85df880135c333cc","signature":"ac00e6a637fbff6967140faceb66443ffe7df9ead70f794d075d880b3333b415","impliedFormat":1},{"version":"cddf5c26907c0b8378bc05543161c11637b830da9fadf59e02a11e675d11e180","impliedFormat":1},{"version":"3d2cd8f3047fff04a71e7037a6a4cb9f4accb28dbd8c0d83164d414811025af0","impliedFormat":1},{"version":"0e6d87e1af5b3cb046c54714f8afdd0d0fe3c499d96954f29466f92def0f435c","impliedFormat":99},{"version":"c19d7ac12ed3eba32c4a5de206abad95aff3076b9fca167964c0962796fa2ac7","impliedFormat":99},{"version":"5e60773fa7b8dd70abf9674592cad48ae23ca0c0c3461bcab2631233ea39db84","impliedFormat":99},{"version":"3f1434a62a74403ce9c0be66761cb6ee5029b25a4701ab3ababd55b1cc7a71e5","impliedFormat":99},{"version":"30b3c98174546f26a9c63a622fac4e6dee716dd7a30271a8a6eaf79e467fa702","impliedFormat":99},{"version":"7bd32cd2e05737c6a5041ca7a31ceca0c14ce065661c5d1ae5f7bfa35ff3fc5e","impliedFormat":99},{"version":"bdbb3f4e3f608f6034a78af17466f05ee85b1f1414f5e6f25f591c73a2f9b015","impliedFormat":99},{"version":"74e27c864416d1ad8947d13cef35e7c9afe0608255eb455096026e988c962295","impliedFormat":99},{"version":"46ab5ea5cdbc0ce75ade44ec0d9aa164f81e42b061d8e573b832a73ed181da57","impliedFormat":99},{"version":"d752d4dde165ab9bd56ddd111f59a6bf46eebbc6d4ba4e433f2ea21d1d0599e6","impliedFormat":99},{"version":"6527f50c0513ce908927055546f39578b9aaed6f1a69dec209b9101fd2d41017","impliedFormat":99},{"version":"b3afe3e29860550105c6b7c090457ffdf379c9cff3af7f971b4b98506156f413","impliedFormat":99},{"version":"6b8149d07a97d1cae2528d2a9d9592623fda9df6442dfcd8c64d551eb6e96cd9","impliedFormat":99},{"version":"d361b28568b863d605dffaa71640cea7c70cd8076f9471cd47ee59f5ce87b250","impliedFormat":99},{"version":"e0c7d85789b8811c90a8d21e25021349e8a756a256ae42d9e816ecd392f00f71","impliedFormat":99},{"version":"bb8aba28c9589792407d6ae0c1a6568f3ddc40be20da25bc1939e2c9d76436bb","impliedFormat":99},{"version":"8fa1868ab5af3818ff4746f383ea84206596e284f7dc5ffd40a0fac08ed093f9","impliedFormat":99},{"version":"8d4537ea6fcdde620af5bfb4e19f88db40d44073f76f567283aa043b81ef8a3e","impliedFormat":99},{"version":"0bb848976eff244e33741d63372cbfb4d15153a92c171d0a374a3c0ef327a175","impliedFormat":99},{"version":"3411c785dbe8fd42f7d644d1e05a7e72b624774a08a9356479754999419c3c5a","impliedFormat":99},{"version":"8fb8fdda477cd7382477ffda92c2bb7d9f7ef583b1aa531eb6b2dc2f0a206c10","impliedFormat":99},{"version":"66995b0c991b5c5d42eff1d950733f85482c7419f7296ab8952e03718169e379","impliedFormat":99},{"version":"33f3795a4617f98b1bb8dac36312119d02f31897ae75436a1e109ce042b48ee8","impliedFormat":99},{"version":"2850c9c5dc28d34ad5f354117d0419f325fc8932d2a62eadc4dc52c018cd569b","impliedFormat":99},{"version":"c753948f7e0febe7aa1a5b71a714001a127a68861309b2c4127775aa9b6d4f24","impliedFormat":99},{"version":"3e7a40e023e1d4a9eef1a6f08a3ded8edacb67ae5fce072014205d730f717ba5","impliedFormat":99},{"version":"a77be6fc44c876bc10c897107f84eaba10790913ebdcad40fcda7e47469b2160","impliedFormat":99},{"version":"382100b010774614310d994bbf16cc9cd291c14f0d417126c7a7cfad1dc1d3f8","impliedFormat":99},{"version":"91f5dbcdb25d145a56cffe957ec665256827892d779ef108eb2f3864faff523b","impliedFormat":99},{"version":"4fdf56315340bd1770eb52e1601c3a98e45b1d207202831357e99ce29c35b55c","impliedFormat":99},{"version":"927955a3de5857e0a1c575ced5a4245e74e6821d720ed213141347dd1870197f","impliedFormat":99},{"version":"be6fd74528b32986fbf0cd2cfa9192a5ed7f369060b32a7adcb0c8d055708e61","impliedFormat":99},{"version":"d490fd491b1d464673622833af5fcddcecbe16d8e35e4e93b4ffe0be2dbbf24a","impliedFormat":99},{"version":"3ddd84f13846024c7e50a2d8ac6503c4f5839390007a4a78fe49cdda847d6873","impliedFormat":99},{"version":"6d1bc2660ecb2702daf6952d4b60c9421cdc7a70ca801f6c02100308f1b93d25","impliedFormat":99},{"version":"3303b9b6c497d7b4f4ca73431b599a4f1ef95c713d1e25e8d64435ffc435f9d9","impliedFormat":99},{"version":"d12ea568b5ee8b506d79408fb624a266fa07db765147cabf7bde4b1c8e79c78d","signature":"4330acc7b245cbef845d85da21f3d811d36076d96fa500d7c1c500c8dc2d36d9","impliedFormat":1},{"version":"4911d4c3a7f7c11bad0e2cec329a19a385d10ea83b0b69c76e032359e388f624","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"f754e6212ba82c380850516dcb82419f0e02859e53da986b2fd1942c59b96111","affectsGlobalScope":true,"impliedFormat":1},{"version":"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0","impliedFormat":1},{"version":"4ffef5c4698e94e49dcf150e3270bad2b24a2aeab48b24acbe7c1366edff377d","affectsGlobalScope":true,"impliedFormat":1},{"version":"2534e46a52653b55dfb5a41ce427ec430c4afbaaf3bfcb1ae09b185c5d6bf169","impliedFormat":1},{"version":"afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565","impliedFormat":1},{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"67458ffec915caad7ead57f00786c301b37ce7ff1a90506b797f4691337c536c","impliedFormat":1},{"version":"f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","impliedFormat":1},{"version":"73e88763806a21b32aff5a66d4930124606bc5e77f796ea3ff8b6878ff787fa8","impliedFormat":1},{"version":"18f177e442b4cdbc5efb82e7c344201a11e4a4342ff1f19f8765b849e254e2ec","impliedFormat":1},{"version":"0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","impliedFormat":1},{"version":"06ccebc2c2db57d6bdbca63b71c4ae5e6ddc42d972fd8f122d4c1a28aa111b25","impliedFormat":1},{"version":"81e8508d1e82278f5d3fee936f267e00c308af36219bfcee2631f9513c9c4017","affectsGlobalScope":true,"impliedFormat":1},{"version":"413a4be7f94f631235bbc83dad36c4d15e5a2ff02bca1efdbd03636d6454631b","impliedFormat":1},{"version":"20c468256fd68d3ef1fa53526e76d51d6aa91711e84d72c0343589b99238287e","impliedFormat":1},{"version":"4198acced75d48a039c078734c4efca7788ff8c78609c270a2b63ec20e3e1676","impliedFormat":1},{"version":"0034f55fd438f31ba1f0b340dceef3b77d9a89f5218e5875a990b4eff2a5714d","impliedFormat":1},{"version":"288dd0c774a5c6e3964084c7a2bc8cc6b746d70f44a9892d028d04f915cf7ebc","impliedFormat":1},{"version":"d61c7c41eb1960b1285e242fd102c162b65c0522985b839fadda59874308a170","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"f7011a8d17a06e60dc591fd89b7bf40507d36a5a4d5913fa0eff4e18da001759","impliedFormat":1},{"version":"abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","impliedFormat":1},{"version":"fb0989383c6109f20281b3d31265293daefdd76d0d30551782c1654e93704f48","impliedFormat":1},{"version":"a4210a84a82b3e7a8cec5b2f3616e46d523f4f10cc1576d8f2fb89d0987b341e","impliedFormat":1},{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","impliedFormat":1},{"version":"22d48bfb37261136423ac687f1fa7bd4dda3083f767416d409a8260cf92bc8fc","impliedFormat":1},{"version":"29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","impliedFormat":1},{"version":"0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","impliedFormat":1},{"version":"26f686c658456d460b38e819bc7c0c27e752b08d998aa3dda71bd4fc73434471","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"698ab660b477b9c2cd5ccbd99e7e7df8b4a6134c1f5711fa615ed7aab51cb7f7","impliedFormat":1},{"version":"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","impliedFormat":1},{"version":"c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637","impliedFormat":1},{"version":"a4471d2bdba495b2a6a30b8765d5e0282fa7009d88345a9528f73c37869d3b93","impliedFormat":1},{"version":"aee7013623e7632fba449d4df1da92925b27d9b816cb05546044dbfe54c88ef4","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"c9d70d3d7191a66a81cb554557f8ed1cf736ea8397c44a864fe52689de18865a","impliedFormat":1},{"version":"998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","impliedFormat":1},{"version":"ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","impliedFormat":1},{"version":"1aad825534c73852a1f3275e527d729a2c0640f539198fdfdfeb83b839851910","affectsGlobalScope":true,"impliedFormat":1},{"version":"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","impliedFormat":1},{"version":"c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","impliedFormat":1},{"version":"235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","impliedFormat":1},{"version":"bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","impliedFormat":1},{"version":"9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","impliedFormat":1},{"version":"c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"88003d9ab15507806f41b120be6d407c1afe566c2f6689ebe3a034dd5ec0c8dc","impliedFormat":1},{"version":"e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","impliedFormat":1},{"version":"69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","impliedFormat":1},{"version":"eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","impliedFormat":1},{"version":"b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","impliedFormat":1},{"version":"b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","impliedFormat":1},{"version":"5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","impliedFormat":1},{"version":"02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c","impliedFormat":1},{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true,"impliedFormat":1}],"root":[45,56,95],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[57,140],[140,152,154],[140],[140,148,149],[140,148,149,150,151],[140,153],[140,155],[96,140],[99,140],[100,105,131,140],[101,111,112,119,128,139,140],[101,102,111,119,140],[103,140],[104,105,112,120,140],[105,128,136,140],[106,108,111,119,140],[107,140],[108,109,140],[110,111,140],[111,140],[111,112,113,128,139,140],[111,112,113,128,140],[114,119,128,139,140],[111,112,114,115,119,128,136,139,140],[114,116,128,136,139,140],[96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,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],[111,117,140],[118,139,140],[108,111,119,128,140],[120,140],[121,140],[99,122,140],[123,138,140,144],[124,140],[125,140],[111,126,140],[126,127,140,142],[100,111,128,129,130,140],[100,128,130,140],[128,129,140],[131,140],[132,140],[111,134,135,140],[134,135,140],[105,119,136,140],[137,140],[119,138,140],[100,114,125,139,140],[105,140],[128,140,141],[140,142],[140,143],[100,105,111,113,122,128,139,140,142,144],[128,140,145],[93,140],[58,59,74,77,92,140],[91,140],[57,58,59,69,77,90,140],[58,59,140],[70,71,140],[70,140],[57,58,59,63,69,140],[62,140],[60,140],[60,61,140],[79,140],[78,79,140],[78,140],[78,79,80,82,83,86,87,88,89,140],[79,83,140],[78,79,80,82,83,84,85,140],[78,83,140],[83,87,140],[79,80,81,140],[80,140],[78,79,83,140],[64,65,66,67,68,140],[64,65,140],[64,140],[73,140],[76,140],[57,74,75,77,140],[45,51,55,56,72,94,140],[51,140],[52,53,54,140],[47,140],[47,48,49,50,140],[46,140],[46,47,140],[51,56],[51]],"referencedMap":[[58,1],[155,2],[148,3],[150,4],[152,5],[151,4],[149,3],[154,6],[153,3],[156,7],[96,8],[97,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[108,18],[109,18],[110,19],[111,20],[112,21],[113,22],[98,3],[146,3],[114,23],[115,24],[116,25],[147,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,33],[124,34],[125,35],[126,36],[127,37],[128,38],[130,39],[129,40],[131,41],[132,42],[133,3],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[143,52],[144,53],[145,54],[57,3],[94,55],[93,56],[92,57],[91,58],[59,59],[72,60],[71,61],[70,62],[63,63],[61,64],[62,65],[60,3],[80,66],[89,67],[78,3],[79,68],[90,69],[85,70],[86,71],[84,72],[88,73],[82,74],[81,75],[87,76],[83,67],[69,77],[66,78],[67,3],[68,3],[64,3],[65,79],[43,3],[44,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[7,3],[35,3],[40,3],[41,3],[36,3],[37,3],[38,3],[39,3],[1,3],[42,3],[74,80],[73,1],[77,81],[76,82],[75,3],[45,3],[95,83],[56,84],[52,84],[55,85],[53,3],[54,84],[49,3],[48,86],[46,3],[51,87],[47,88],[50,89]],"exportedModulesMap":[[58,1],[155,2],[148,3],[150,4],[152,5],[151,4],[149,3],[154,6],[153,3],[156,7],[96,8],[97,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[108,18],[109,18],[110,19],[111,20],[112,21],[113,22],[98,3],[146,3],[114,23],[115,24],[116,25],[147,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,33],[124,34],[125,35],[126,36],[127,37],[128,38],[130,39],[129,40],[131,41],[132,42],[133,3],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[143,52],[144,53],[145,54],[57,3],[94,55],[93,56],[92,57],[91,58],[59,59],[72,60],[71,61],[70,62],[63,63],[61,64],[62,65],[60,3],[80,66],[89,67],[78,3],[79,68],[90,69],[85,70],[86,71],[84,72],[88,73],[82,74],[81,75],[87,76],[83,67],[69,77],[66,78],[67,3],[68,3],[64,3],[65,79],[43,3],[44,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[7,3],[35,3],[40,3],[41,3],[36,3],[37,3],[38,3],[39,3],[1,3],[42,3],[74,80],[73,1],[77,81],[76,82],[75,3],[45,3],[95,90],[56,91],[52,84],[55,85],[53,3],[54,84],[49,3],[48,86],[46,3],[51,87],[47,88],[50,89]],"semanticDiagnosticsPerFile":[58,155,148,150,152,151,149,154,153,156,96,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,98,146,114,115,116,147,117,118,119,120,121,122,123,124,125,126,127,128,130,129,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,57,94,93,92,91,59,72,71,70,63,61,62,60,80,89,78,79,90,85,86,84,88,82,81,87,83,69,66,67,68,64,65,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,74,73,77,76,75,45,95,56,52,55,53,54,49,48,46,51,47,50]},"version":"5.0.4"}
@@ -0,0 +1,4 @@
1
+ import { UIDLExternalDependency } from '@teleporthq/teleport-types';
2
+ export type SUPPORTED_PROJECT_TYPES = 'teleport-project-html' | 'teleport-project-react' | 'teleport-project-next';
3
+ export declare const JS_EXECUTION_DEPENDENCIES: Record<SUPPORTED_PROJECT_TYPES, Record<string, UIDLExternalDependency>>;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,MAAM,MAAM,uBAAuB,GAC/B,uBAAuB,GACvB,wBAAwB,GACxB,uBAAuB,CAAA;AAE3B,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,uBAAuB,EACvB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAiCvC,CAAA"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JS_EXECUTION_DEPENDENCIES = void 0;
4
+ exports.JS_EXECUTION_DEPENDENCIES = {
5
+ 'teleport-project-react': {
6
+ Script: {
7
+ type: 'package',
8
+ path: 'dangerous-html',
9
+ version: '0.1.13',
10
+ meta: {
11
+ importAlias: 'dangerous-html/react',
12
+ },
13
+ },
14
+ },
15
+ 'teleport-project-next': {
16
+ Script: {
17
+ type: 'library',
18
+ path: 'next',
19
+ version: '0.0.0',
20
+ meta: {
21
+ importAlias: 'next/script',
22
+ },
23
+ },
24
+ },
25
+ 'teleport-project-html': {
26
+ DangerousHTML: {
27
+ type: 'package',
28
+ path: 'dangerous-html',
29
+ version: '0.1.13',
30
+ meta: {
31
+ importJustPath: true,
32
+ importAlias: 'https://unpkg.com/dangerous-html/dist/default/lib.umd.js',
33
+ },
34
+ },
35
+ },
36
+ };
37
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAOa,QAAA,yBAAyB,GAGlC;IACF,wBAAwB,EAAE;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE;gBACJ,WAAW,EAAE,sBAAsB;aACpC;SACF;KACF;IACD,uBAAuB,EAAE;QACvB,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE;gBACJ,WAAW,EAAE,aAAa;aAC3B;SACF;KACF;IACD,uBAAuB,EAAE;QACvB,aAAa,EAAE;YACb,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE;gBACJ,cAAc,EAAE,IAAI;gBACpB,WAAW,EAAE,0DAA0D;aACxE;SACF;KACF;CACF,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { ProjectPluginStructure, ProjectPlugin, UIDLElementNode, UIDLRootComponent, ComponentUIDL } from '@teleporthq/teleport-types';
2
+ import { SUPPORTED_PROJECT_TYPES } from './utils';
3
+ export declare class ProjectPluginParseEmbed implements ProjectPlugin {
4
+ fromHtml: (value: string, opts: {
5
+ fragment: boolean;
6
+ }) => unknown;
7
+ hastToJsxOrHtml: (content: unknown) => string;
8
+ loadFromHTML(): Promise<(value: string, opts: {
9
+ fragment: boolean;
10
+ }) => unknown>;
11
+ loadNodeMapper(id: SUPPORTED_PROJECT_TYPES): Promise<(content: unknown) => string>;
12
+ traverseComponentUIDL(node: UIDLElementNode, id: SUPPORTED_PROJECT_TYPES): Promise<boolean>;
13
+ traverseNodeAndAddImport(componentUIDL: UIDLRootComponent | ComponentUIDL, projectType: SUPPORTED_PROJECT_TYPES): Promise<void>;
14
+ runBefore(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
15
+ runAfter(structure: ProjectPluginStructure): Promise<ProjectPluginStructure>;
16
+ }
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAA6B,MAAM,SAAS,CAAA;AAQ5E,qBAAa,uBAAwB,YAAW,aAAa;IAC3D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAA;IACjE,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAEvC,YAAY,IAAI,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IAOhF,cAAc,CAAC,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAOlF,qBAAqB,CACzB,IAAI,EAAE,eAAe,EACrB,EAAE,EAAE,uBAAuB,GAC1B,OAAO,CAAC,OAAO,CAAC;IAiCb,wBAAwB,CAC5B,aAAa,EAAE,iBAAiB,GAAG,aAAa,EAChD,WAAW,EAAE,uBAAuB;IAYhC,SAAS,CAAC,SAAS,EAAE,sBAAsB;IAsB3C,QAAQ,CAAC,SAAS,EAAE,sBAAsB;CAcjD"}
@@ -0,0 +1,193 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { UIDLUtils } from '@teleporthq/teleport-shared';
49
+ import { JS_EXECUTION_DEPENDENCIES } from './utils';
50
+ var NODE_MAPPER = {
51
+ 'teleport-project-html': import('hast-util-to-html').then(function (mod) { return mod.toHtml; }),
52
+ 'teleport-project-react': import('hast-util-to-jsx-inline-script').then(function (mod) { return mod.default; }),
53
+ 'teleport-project-next': import('hast-util-to-jsx-inline-script').then(function (mod) { return mod.default; }),
54
+ };
55
+ var ProjectPluginParseEmbed = /** @class */ (function () {
56
+ function ProjectPluginParseEmbed() {
57
+ }
58
+ ProjectPluginParseEmbed.prototype.loadFromHTML = function () {
59
+ return __awaiter(this, void 0, void 0, function () {
60
+ var _a;
61
+ return __generator(this, function (_b) {
62
+ switch (_b.label) {
63
+ case 0:
64
+ if (!!this.fromHtml) return [3 /*break*/, 2];
65
+ _a = this;
66
+ return [4 /*yield*/, import('hast-util-from-html')];
67
+ case 1:
68
+ _a.fromHtml = (_b.sent()).fromHtml;
69
+ _b.label = 2;
70
+ case 2: return [2 /*return*/, this.fromHtml];
71
+ }
72
+ });
73
+ });
74
+ };
75
+ ProjectPluginParseEmbed.prototype.loadNodeMapper = function (id) {
76
+ return __awaiter(this, void 0, void 0, function () {
77
+ var _a;
78
+ return __generator(this, function (_b) {
79
+ switch (_b.label) {
80
+ case 0:
81
+ if (!!this.hastToJsxOrHtml) return [3 /*break*/, 2];
82
+ _a = this;
83
+ return [4 /*yield*/, NODE_MAPPER[id]];
84
+ case 1:
85
+ _a.hastToJsxOrHtml = _b.sent();
86
+ _b.label = 2;
87
+ case 2: return [2 /*return*/, this.hastToJsxOrHtml];
88
+ }
89
+ });
90
+ });
91
+ };
92
+ ProjectPluginParseEmbed.prototype.traverseComponentUIDL = function (node, id) {
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ var _this = this;
95
+ return __generator(this, function (_a) {
96
+ return [2 /*return*/, new Promise(function (resolve, reject) {
97
+ try {
98
+ var shouldAddJSDependency_1 = false;
99
+ UIDLUtils.traverseElements(node, function (element) {
100
+ var _a;
101
+ if (element.elementType === 'html-node' && ((_a = element.attrs) === null || _a === void 0 ? void 0 : _a.html) && NODE_MAPPER[id]) {
102
+ var hastNodes = _this.fromHtml(element.attrs.html.content, {
103
+ fragment: true,
104
+ });
105
+ var content = _this.hastToJsxOrHtml(hastNodes);
106
+ element.elementType = 'container';
107
+ element.attrs = {};
108
+ element.style = { display: { type: 'static', content: 'contents' } };
109
+ element.children = [
110
+ {
111
+ type: 'inject',
112
+ content: content,
113
+ },
114
+ ];
115
+ if (content.includes('<Script')) {
116
+ shouldAddJSDependency_1 = true;
117
+ }
118
+ }
119
+ });
120
+ resolve(shouldAddJSDependency_1);
121
+ }
122
+ catch (error) {
123
+ reject(error);
124
+ }
125
+ })];
126
+ });
127
+ });
128
+ };
129
+ ProjectPluginParseEmbed.prototype.traverseNodeAndAddImport = function (componentUIDL, projectType) {
130
+ return __awaiter(this, void 0, void 0, function () {
131
+ var shouldAddJSDependency;
132
+ return __generator(this, function (_a) {
133
+ switch (_a.label) {
134
+ case 0: return [4 /*yield*/, this.traverseComponentUIDL(componentUIDL.node, projectType)];
135
+ case 1:
136
+ shouldAddJSDependency = _a.sent();
137
+ if (shouldAddJSDependency) {
138
+ componentUIDL.importDefinitions = __assign(__assign({}, ((componentUIDL === null || componentUIDL === void 0 ? void 0 : componentUIDL.importDefinitions) || {})), JS_EXECUTION_DEPENDENCIES[projectType]);
139
+ }
140
+ return [2 /*return*/];
141
+ }
142
+ });
143
+ });
144
+ };
145
+ ProjectPluginParseEmbed.prototype.runBefore = function (structure) {
146
+ var _a;
147
+ return __awaiter(this, void 0, void 0, function () {
148
+ var projectType, promises, components, i;
149
+ return __generator(this, function (_b) {
150
+ switch (_b.label) {
151
+ case 0: return [4 /*yield*/, this.loadFromHTML()];
152
+ case 1:
153
+ _b.sent();
154
+ projectType = structure.strategy.id;
155
+ return [4 /*yield*/, this.loadNodeMapper(projectType)];
156
+ case 2:
157
+ _b.sent();
158
+ if (!NODE_MAPPER[projectType]) {
159
+ return [2 /*return*/, structure];
160
+ }
161
+ promises = [];
162
+ promises.push(this.traverseNodeAndAddImport(structure.uidl.root, projectType));
163
+ components = Object.keys(((_a = structure.uidl) === null || _a === void 0 ? void 0 : _a.components) || {});
164
+ for (i = 0; i < components.length; i++) {
165
+ promises.push(this.traverseNodeAndAddImport(structure.uidl.components[components[i]], projectType));
166
+ }
167
+ return [4 /*yield*/, Promise.all(promises)];
168
+ case 3:
169
+ _b.sent();
170
+ return [2 /*return*/, structure];
171
+ }
172
+ });
173
+ });
174
+ };
175
+ ProjectPluginParseEmbed.prototype.runAfter = function (structure) {
176
+ return __awaiter(this, void 0, void 0, function () {
177
+ return __generator(this, function (_a) {
178
+ if (!NODE_MAPPER[structure.strategy.id]) {
179
+ return [2 /*return*/, structure];
180
+ }
181
+ /* tslint:disable no-string-literal */
182
+ delete structure.dependencies['Script'];
183
+ if (structure.strategy.id === 'teleport-project-react') {
184
+ structure.dependencies['dangerous-html'] = '^0.1.13';
185
+ }
186
+ return [2 /*return*/, structure];
187
+ });
188
+ });
189
+ };
190
+ return ProjectPluginParseEmbed;
191
+ }());
192
+ export { ProjectPluginParseEmbed };
193
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ {"program":{"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.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.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.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../src/hast-util-to-jsx-inline-script.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../../teleport-shared/dist/cjs/constants/index.d.ts","../../../teleport-shared/dist/cjs/utils/string-utils.d.ts","../../../teleport-shared/dist/cjs/utils/uidl-utils.d.ts","../../../teleport-shared/dist/cjs/index.d.ts","../../src/utils.ts","../../../../node_modules/@types/unist/index.d.ts","../../../../node_modules/@types/hast/index.d.ts","../../../../node_modules/hast-util-raw/complex-types.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/lib/util/format-smart.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/lib/core.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/lib/index.d.ts","../../../../node_modules/hast-util-to-html/node_modules/stringify-entities/index.d.ts","../../../../node_modules/property-information/lib/util/info.d.ts","../../../../node_modules/property-information/lib/util/schema.d.ts","../../../../node_modules/property-information/lib/find.d.ts","../../../../node_modules/property-information/lib/hast-to-react.d.ts","../../../../node_modules/property-information/lib/normalize.d.ts","../../../../node_modules/property-information/index.d.ts","../../../../node_modules/hast-util-to-html/lib/types.d.ts","../../../../node_modules/hast-util-to-html/lib/index.d.ts","../../../../node_modules/hast-util-to-html/index.d.ts","../../../../node_modules/vfile-message/lib/index.d.ts","../../../../node_modules/vfile-message/index.d.ts","../../../../node_modules/vfile/lib/minurl.shared.d.ts","../../../../node_modules/vfile/lib/index.d.ts","../../../../node_modules/vfile/index.d.ts","../../../../node_modules/parse5/dist/common/html.d.ts","../../../../node_modules/parse5/dist/common/token.d.ts","../../../../node_modules/parse5/dist/common/error-codes.d.ts","../../../../node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../../../node_modules/parse5/dist/tokenizer/index.d.ts","../../../../node_modules/parse5/dist/tree-adapters/interface.d.ts","../../../../node_modules/parse5/dist/parser/open-element-stack.d.ts","../../../../node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../../../node_modules/parse5/dist/parser/index.d.ts","../../../../node_modules/parse5/dist/tree-adapters/default.d.ts","../../../../node_modules/parse5/dist/serializer/index.d.ts","../../../../node_modules/parse5/dist/common/foreign-content.d.ts","../../../../node_modules/parse5/dist/index.d.ts","../../../../node_modules/hast-util-from-parse5/lib/index.d.ts","../../../../node_modules/hast-util-from-parse5/index.d.ts","../../../../node_modules/hast-util-from-html/lib/index.d.ts","../../../../node_modules/hast-util-from-html/index.d.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.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/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/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/repl.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/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"a51ec59808167919b26d173c7f192d531e8aecf80e6dee221144d664f572e11c","b0ad356fc4a8e013847bc92edf176c378bf8067bcd92c1b33da72cd7b0e7f12d","dc7b6fb4e681f2994276f15236dc87eda8b97143c997516fa379a1859b623661","4137c1e9ff2dafc313d40f0f6a53f15c940e8a8c598eb00c180442ce899e7098","d49a625c30294f92976c954fffb2bcc2faeb81957148a363969ee742a43e2913","5621ff944b21af7ee121d246ced471809a583960ea48d688a24845d37ab6658e","cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","28b22326000119f53de35f67ce3096ef475a2224274162b1283ef8718e1efdb5","18aecf77d74ed15ae1e875a0d43f2aa85387794fc447b2bc3c8ab7e2224d0ac6","dec878eee8200aa11e572e49df63ead625013b16713cd183d383b07c1f6df92e","d2ff55204dd4868d11a163c207d4fbe8d99cbf8cb36fa90d2a2f0bfc802b4d38",{"version":"376c03c97a3a883c3e696a4f4c1fee69afd4b30aeaa1989b85df880135c333cc","signature":"ac00e6a637fbff6967140faceb66443ffe7df9ead70f794d075d880b3333b415"},"cddf5c26907c0b8378bc05543161c11637b830da9fadf59e02a11e675d11e180","3d2cd8f3047fff04a71e7037a6a4cb9f4accb28dbd8c0d83164d414811025af0","0e6d87e1af5b3cb046c54714f8afdd0d0fe3c499d96954f29466f92def0f435c","c19d7ac12ed3eba32c4a5de206abad95aff3076b9fca167964c0962796fa2ac7","5e60773fa7b8dd70abf9674592cad48ae23ca0c0c3461bcab2631233ea39db84","3f1434a62a74403ce9c0be66761cb6ee5029b25a4701ab3ababd55b1cc7a71e5","30b3c98174546f26a9c63a622fac4e6dee716dd7a30271a8a6eaf79e467fa702","7bd32cd2e05737c6a5041ca7a31ceca0c14ce065661c5d1ae5f7bfa35ff3fc5e","bdbb3f4e3f608f6034a78af17466f05ee85b1f1414f5e6f25f591c73a2f9b015","74e27c864416d1ad8947d13cef35e7c9afe0608255eb455096026e988c962295","46ab5ea5cdbc0ce75ade44ec0d9aa164f81e42b061d8e573b832a73ed181da57","d752d4dde165ab9bd56ddd111f59a6bf46eebbc6d4ba4e433f2ea21d1d0599e6","6527f50c0513ce908927055546f39578b9aaed6f1a69dec209b9101fd2d41017","b3afe3e29860550105c6b7c090457ffdf379c9cff3af7f971b4b98506156f413","6b8149d07a97d1cae2528d2a9d9592623fda9df6442dfcd8c64d551eb6e96cd9","d361b28568b863d605dffaa71640cea7c70cd8076f9471cd47ee59f5ce87b250","e0c7d85789b8811c90a8d21e25021349e8a756a256ae42d9e816ecd392f00f71","bb8aba28c9589792407d6ae0c1a6568f3ddc40be20da25bc1939e2c9d76436bb","8fa1868ab5af3818ff4746f383ea84206596e284f7dc5ffd40a0fac08ed093f9","8d4537ea6fcdde620af5bfb4e19f88db40d44073f76f567283aa043b81ef8a3e","0bb848976eff244e33741d63372cbfb4d15153a92c171d0a374a3c0ef327a175","3411c785dbe8fd42f7d644d1e05a7e72b624774a08a9356479754999419c3c5a","8fb8fdda477cd7382477ffda92c2bb7d9f7ef583b1aa531eb6b2dc2f0a206c10","66995b0c991b5c5d42eff1d950733f85482c7419f7296ab8952e03718169e379","33f3795a4617f98b1bb8dac36312119d02f31897ae75436a1e109ce042b48ee8","2850c9c5dc28d34ad5f354117d0419f325fc8932d2a62eadc4dc52c018cd569b","c753948f7e0febe7aa1a5b71a714001a127a68861309b2c4127775aa9b6d4f24","3e7a40e023e1d4a9eef1a6f08a3ded8edacb67ae5fce072014205d730f717ba5","a77be6fc44c876bc10c897107f84eaba10790913ebdcad40fcda7e47469b2160","382100b010774614310d994bbf16cc9cd291c14f0d417126c7a7cfad1dc1d3f8","91f5dbcdb25d145a56cffe957ec665256827892d779ef108eb2f3864faff523b","4fdf56315340bd1770eb52e1601c3a98e45b1d207202831357e99ce29c35b55c","927955a3de5857e0a1c575ced5a4245e74e6821d720ed213141347dd1870197f","be6fd74528b32986fbf0cd2cfa9192a5ed7f369060b32a7adcb0c8d055708e61","d490fd491b1d464673622833af5fcddcecbe16d8e35e4e93b4ffe0be2dbbf24a","3ddd84f13846024c7e50a2d8ac6503c4f5839390007a4a78fe49cdda847d6873","6d1bc2660ecb2702daf6952d4b60c9421cdc7a70ca801f6c02100308f1b93d25","3303b9b6c497d7b4f4ca73431b599a4f1ef95c713d1e25e8d64435ffc435f9d9",{"version":"d12ea568b5ee8b506d79408fb624a266fa07db765147cabf7bde4b1c8e79c78d","signature":"4330acc7b245cbef845d85da21f3d811d36076d96fa500d7c1c500c8dc2d36d9"},"4911d4c3a7f7c11bad0e2cec329a19a385d10ea83b0b69c76e032359e388f624","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"f754e6212ba82c380850516dcb82419f0e02859e53da986b2fd1942c59b96111","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"4ffef5c4698e94e49dcf150e3270bad2b24a2aeab48b24acbe7c1366edff377d","affectsGlobalScope":true},"2534e46a52653b55dfb5a41ce427ec430c4afbaaf3bfcb1ae09b185c5d6bf169","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","67458ffec915caad7ead57f00786c301b37ce7ff1a90506b797f4691337c536c","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","73e88763806a21b32aff5a66d4930124606bc5e77f796ea3ff8b6878ff787fa8","18f177e442b4cdbc5efb82e7c344201a11e4a4342ff1f19f8765b849e254e2ec","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","06ccebc2c2db57d6bdbca63b71c4ae5e6ddc42d972fd8f122d4c1a28aa111b25",{"version":"81e8508d1e82278f5d3fee936f267e00c308af36219bfcee2631f9513c9c4017","affectsGlobalScope":true},"413a4be7f94f631235bbc83dad36c4d15e5a2ff02bca1efdbd03636d6454631b","20c468256fd68d3ef1fa53526e76d51d6aa91711e84d72c0343589b99238287e","4198acced75d48a039c078734c4efca7788ff8c78609c270a2b63ec20e3e1676","0034f55fd438f31ba1f0b340dceef3b77d9a89f5218e5875a990b4eff2a5714d","288dd0c774a5c6e3964084c7a2bc8cc6b746d70f44a9892d028d04f915cf7ebc","d61c7c41eb1960b1285e242fd102c162b65c0522985b839fadda59874308a170",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"f7011a8d17a06e60dc591fd89b7bf40507d36a5a4d5913fa0eff4e18da001759","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","fb0989383c6109f20281b3d31265293daefdd76d0d30551782c1654e93704f48","a4210a84a82b3e7a8cec5b2f3616e46d523f4f10cc1576d8f2fb89d0987b341e",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","22d48bfb37261136423ac687f1fa7bd4dda3083f767416d409a8260cf92bc8fc","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","26f686c658456d460b38e819bc7c0c27e752b08d998aa3dda71bd4fc73434471","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","698ab660b477b9c2cd5ccbd99e7e7df8b4a6134c1f5711fa615ed7aab51cb7f7","33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637","a4471d2bdba495b2a6a30b8765d5e0282fa7009d88345a9528f73c37869d3b93",{"version":"aee7013623e7632fba449d4df1da92925b27d9b816cb05546044dbfe54c88ef4","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c9d70d3d7191a66a81cb554557f8ed1cf736ea8397c44a864fe52689de18865a","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"1aad825534c73852a1f3275e527d729a2c0640f539198fdfdfeb83b839851910","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"88003d9ab15507806f41b120be6d407c1afe566c2f6689ebe3a034dd5ec0c8dc","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"root":[45,56,95],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[57,140],[140,152,154],[140],[140,148,149],[140,148,149,150,151],[140,153],[140,155],[96,140],[99,140],[100,105,131,140],[101,111,112,119,128,139,140],[101,102,111,119,140],[103,140],[104,105,112,120,140],[105,128,136,140],[106,108,111,119,140],[107,140],[108,109,140],[110,111,140],[111,140],[111,112,113,128,139,140],[111,112,113,128,140],[114,119,128,139,140],[111,112,114,115,119,128,136,139,140],[114,116,128,136,139,140],[96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,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],[111,117,140],[118,139,140],[108,111,119,128,140],[120,140],[121,140],[99,122,140],[123,138,140,144],[124,140],[125,140],[111,126,140],[126,127,140,142],[100,111,128,129,130,140],[100,128,130,140],[128,129,140],[131,140],[132,140],[111,134,135,140],[134,135,140],[105,119,136,140],[137,140],[119,138,140],[100,114,125,139,140],[105,140],[128,140,141],[140,142],[140,143],[100,105,111,113,122,128,139,140,142,144],[128,140,145],[93,140],[58,59,74,77,92,140],[91,140],[57,58,59,69,77,90,140],[58,59,140],[70,71,140],[70,140],[57,58,59,63,69,140],[62,140],[60,140],[60,61,140],[79,140],[78,79,140],[78,140],[78,79,80,82,83,86,87,88,89,140],[79,83,140],[78,79,80,82,83,84,85,140],[78,83,140],[83,87,140],[79,80,81,140],[80,140],[78,79,83,140],[64,65,66,67,68,140],[64,65,140],[64,140],[73,140],[76,140],[57,74,75,77,140],[45,51,55,56,72,94,140],[51,140],[52,53,54,140],[47,140],[47,48,49,50,140],[46,140],[46,47,140],[51,56],[51]],"referencedMap":[[58,1],[155,2],[148,3],[150,4],[152,5],[151,4],[149,3],[154,6],[153,3],[156,7],[96,8],[97,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[108,18],[109,18],[110,19],[111,20],[112,21],[113,22],[98,3],[146,3],[114,23],[115,24],[116,25],[147,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,33],[124,34],[125,35],[126,36],[127,37],[128,38],[130,39],[129,40],[131,41],[132,42],[133,3],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[143,52],[144,53],[145,54],[57,3],[94,55],[93,56],[92,57],[91,58],[59,59],[72,60],[71,61],[70,62],[63,63],[61,64],[62,65],[60,3],[80,66],[89,67],[78,3],[79,68],[90,69],[85,70],[86,71],[84,72],[88,73],[82,74],[81,75],[87,76],[83,67],[69,77],[66,78],[67,3],[68,3],[64,3],[65,79],[43,3],[44,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[7,3],[35,3],[40,3],[41,3],[36,3],[37,3],[38,3],[39,3],[1,3],[42,3],[74,80],[73,1],[77,81],[76,82],[75,3],[45,3],[95,83],[56,84],[52,84],[55,85],[53,3],[54,84],[49,3],[48,86],[46,3],[51,87],[47,88],[50,89]],"exportedModulesMap":[[58,1],[155,2],[148,3],[150,4],[152,5],[151,4],[149,3],[154,6],[153,3],[156,7],[96,8],[97,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[108,18],[109,18],[110,19],[111,20],[112,21],[113,22],[98,3],[146,3],[114,23],[115,24],[116,25],[147,26],[117,27],[118,28],[119,29],[120,30],[121,31],[122,32],[123,33],[124,34],[125,35],[126,36],[127,37],[128,38],[130,39],[129,40],[131,41],[132,42],[133,3],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[143,52],[144,53],[145,54],[57,3],[94,55],[93,56],[92,57],[91,58],[59,59],[72,60],[71,61],[70,62],[63,63],[61,64],[62,65],[60,3],[80,66],[89,67],[78,3],[79,68],[90,69],[85,70],[86,71],[84,72],[88,73],[82,74],[81,75],[87,76],[83,67],[69,77],[66,78],[67,3],[68,3],[64,3],[65,79],[43,3],[44,3],[8,3],[10,3],[9,3],[2,3],[11,3],[12,3],[13,3],[14,3],[15,3],[16,3],[17,3],[18,3],[3,3],[4,3],[22,3],[19,3],[20,3],[21,3],[23,3],[24,3],[25,3],[5,3],[26,3],[27,3],[28,3],[29,3],[6,3],[33,3],[30,3],[31,3],[32,3],[34,3],[7,3],[35,3],[40,3],[41,3],[36,3],[37,3],[38,3],[39,3],[1,3],[42,3],[74,80],[73,1],[77,81],[76,82],[75,3],[45,3],[95,90],[56,91],[52,84],[55,85],[53,3],[54,84],[49,3],[48,86],[46,3],[51,87],[47,88],[50,89]],"semanticDiagnosticsPerFile":[58,155,148,150,152,151,149,154,153,156,96,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,98,146,114,115,116,147,117,118,119,120,121,122,123,124,125,126,127,128,130,129,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,57,94,93,92,91,59,72,71,70,63,61,62,60,80,89,78,79,90,85,86,84,88,82,81,87,83,69,66,67,68,64,65,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,74,73,77,76,75,45,95,56,52,55,53,54,49,48,46,51,47,50]},"version":"5.0.4"}
@@ -0,0 +1,4 @@
1
+ import { UIDLExternalDependency } from '@teleporthq/teleport-types';
2
+ export type SUPPORTED_PROJECT_TYPES = 'teleport-project-html' | 'teleport-project-react' | 'teleport-project-next';
3
+ export declare const JS_EXECUTION_DEPENDENCIES: Record<SUPPORTED_PROJECT_TYPES, Record<string, UIDLExternalDependency>>;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,MAAM,MAAM,uBAAuB,GAC/B,uBAAuB,GACvB,wBAAwB,GACxB,uBAAuB,CAAA;AAE3B,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,uBAAuB,EACvB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAiCvC,CAAA"}
@@ -0,0 +1,34 @@
1
+ export var JS_EXECUTION_DEPENDENCIES = {
2
+ 'teleport-project-react': {
3
+ Script: {
4
+ type: 'package',
5
+ path: 'dangerous-html',
6
+ version: '0.1.13',
7
+ meta: {
8
+ importAlias: 'dangerous-html/react',
9
+ },
10
+ },
11
+ },
12
+ 'teleport-project-next': {
13
+ Script: {
14
+ type: 'library',
15
+ path: 'next',
16
+ version: '0.0.0',
17
+ meta: {
18
+ importAlias: 'next/script',
19
+ },
20
+ },
21
+ },
22
+ 'teleport-project-html': {
23
+ DangerousHTML: {
24
+ type: 'package',
25
+ path: 'dangerous-html',
26
+ version: '0.1.13',
27
+ meta: {
28
+ importJustPath: true,
29
+ importAlias: 'https://unpkg.com/dangerous-html/dist/default/lib.umd.js',
30
+ },
31
+ },
32
+ },
33
+ };
34
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,yBAAyB,GAGlC;IACF,wBAAwB,EAAE;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE;gBACJ,WAAW,EAAE,sBAAsB;aACpC;SACF;KACF;IACD,uBAAuB,EAAE;QACvB,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE;gBACJ,WAAW,EAAE,aAAa;aAC3B;SACF;KACF;IACD,uBAAuB,EAAE;QACvB,aAAa,EAAE;YACb,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE;gBACJ,cAAc,EAAE,IAAI;gBACpB,WAAW,EAAE,0DAA0D;aACxE;SACF;KACF;CACF,CAAA"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@teleporthq/teleport-project-plugin-parse-embed",
3
+ "version": "0.26.0",
4
+ "description": "A plugin for extracting the html embeds into seperate files",
5
+ "author": "teleportHQ",
6
+ "license": "MIT",
7
+ "homepage": "https://teleporthq.io/",
8
+ "main": "dist/cjs/index.js",
9
+ "module": "dist/esm/index.js",
10
+ "types": "dist/cjs/index.d.ts",
11
+ "sideEffects": false,
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/teleporthq/teleport-code-generators.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/teleporthq/teleport-code-generators/issues"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "scripts": {
23
+ "clean": "rimraf dist",
24
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig.json --module commonjs --moduleResolution node16 --outDir dist/cjs "
25
+ },
26
+ "dependencies": {
27
+ "@teleporthq/teleport-shared": "^0.27.2",
28
+ "@teleporthq/teleport-types": "^0.27.0",
29
+ "hast-util-from-html": "^1.0.1",
30
+ "hast-util-to-html": "^8.0.4",
31
+ "hast-util-to-jsx-inline-script": "^1.1.0"
32
+ },
33
+ "gitHead": "97ac6532967f1c653e1789fabd9466c918fb39ba"
34
+ }
@@ -0,0 +1,4 @@
1
+ declare module 'hast-util-to-jsx-inline-script' {
2
+ const toJSX: (content: unknown) => string
3
+ export default toJSX
4
+ }
package/src/index.ts ADDED
@@ -0,0 +1,121 @@
1
+ import { UIDLUtils } from '@teleporthq/teleport-shared'
2
+ import {
3
+ ProjectPluginStructure,
4
+ ProjectPlugin,
5
+ UIDLElementNode,
6
+ UIDLRootComponent,
7
+ ComponentUIDL,
8
+ } from '@teleporthq/teleport-types'
9
+ import { SUPPORTED_PROJECT_TYPES, JS_EXECUTION_DEPENDENCIES } from './utils'
10
+
11
+ const NODE_MAPPER: Record<SUPPORTED_PROJECT_TYPES, Promise<(content: unknown) => string>> = {
12
+ 'teleport-project-html': import('hast-util-to-html').then((mod) => mod.toHtml),
13
+ 'teleport-project-react': import('hast-util-to-jsx-inline-script').then((mod) => mod.default),
14
+ 'teleport-project-next': import('hast-util-to-jsx-inline-script').then((mod) => mod.default),
15
+ }
16
+
17
+ export class ProjectPluginParseEmbed implements ProjectPlugin {
18
+ fromHtml: (value: string, opts: { fragment: boolean }) => unknown
19
+ hastToJsxOrHtml: (content: unknown) => string
20
+
21
+ async loadFromHTML(): Promise<(value: string, opts: { fragment: boolean }) => unknown> {
22
+ if (!this.fromHtml) {
23
+ this.fromHtml = (await import('hast-util-from-html')).fromHtml
24
+ }
25
+ return this.fromHtml
26
+ }
27
+
28
+ async loadNodeMapper(id: SUPPORTED_PROJECT_TYPES): Promise<(content: unknown) => string> {
29
+ if (!this.hastToJsxOrHtml) {
30
+ this.hastToJsxOrHtml = await NODE_MAPPER[id]
31
+ }
32
+ return this.hastToJsxOrHtml
33
+ }
34
+
35
+ async traverseComponentUIDL(
36
+ node: UIDLElementNode,
37
+ id: SUPPORTED_PROJECT_TYPES
38
+ ): Promise<boolean> {
39
+ return new Promise((resolve, reject) => {
40
+ try {
41
+ let shouldAddJSDependency = false
42
+ UIDLUtils.traverseElements(node, (element) => {
43
+ if (element.elementType === 'html-node' && element.attrs?.html && NODE_MAPPER[id]) {
44
+ const hastNodes = this.fromHtml(element.attrs.html.content as string, {
45
+ fragment: true,
46
+ })
47
+ const content = this.hastToJsxOrHtml(hastNodes)
48
+ element.elementType = 'container'
49
+ element.attrs = {}
50
+ element.style = { display: { type: 'static', content: 'contents' } }
51
+ element.children = [
52
+ {
53
+ type: 'inject',
54
+ content,
55
+ },
56
+ ]
57
+
58
+ if (content.includes('<Script')) {
59
+ shouldAddJSDependency = true
60
+ }
61
+ }
62
+ })
63
+
64
+ resolve(shouldAddJSDependency)
65
+ } catch (error) {
66
+ reject(error)
67
+ }
68
+ })
69
+ }
70
+
71
+ async traverseNodeAndAddImport(
72
+ componentUIDL: UIDLRootComponent | ComponentUIDL,
73
+ projectType: SUPPORTED_PROJECT_TYPES
74
+ ) {
75
+ const shouldAddJSDependency = await this.traverseComponentUIDL(componentUIDL.node, projectType)
76
+
77
+ if (shouldAddJSDependency) {
78
+ componentUIDL.importDefinitions = {
79
+ ...(componentUIDL?.importDefinitions || {}),
80
+ ...JS_EXECUTION_DEPENDENCIES[projectType],
81
+ }
82
+ }
83
+ }
84
+
85
+ async runBefore(structure: ProjectPluginStructure) {
86
+ await this.loadFromHTML()
87
+ const projectType = structure.strategy.id as SUPPORTED_PROJECT_TYPES
88
+ await this.loadNodeMapper(projectType)
89
+
90
+ if (!NODE_MAPPER[projectType]) {
91
+ return structure
92
+ }
93
+
94
+ const promises: Array<Promise<void>> = []
95
+ promises.push(this.traverseNodeAndAddImport(structure.uidl.root, projectType))
96
+ const components = Object.keys(structure.uidl?.components || {})
97
+ for (let i = 0; i < components.length; i++) {
98
+ promises.push(
99
+ this.traverseNodeAndAddImport(structure.uidl.components[components[i]], projectType)
100
+ )
101
+ }
102
+
103
+ await Promise.all(promises)
104
+ return structure
105
+ }
106
+
107
+ async runAfter(structure: ProjectPluginStructure) {
108
+ if (!NODE_MAPPER[structure.strategy.id as SUPPORTED_PROJECT_TYPES]) {
109
+ return structure
110
+ }
111
+
112
+ /* tslint:disable no-string-literal */
113
+ delete structure.dependencies['Script']
114
+
115
+ if (structure.strategy.id === 'teleport-project-react') {
116
+ structure.dependencies['dangerous-html'] = '^0.1.13'
117
+ }
118
+
119
+ return structure
120
+ }
121
+ }
package/src/utils.ts ADDED
@@ -0,0 +1,43 @@
1
+ import { UIDLExternalDependency } from '@teleporthq/teleport-types'
2
+
3
+ export type SUPPORTED_PROJECT_TYPES =
4
+ | 'teleport-project-html'
5
+ | 'teleport-project-react'
6
+ | 'teleport-project-next'
7
+
8
+ export const JS_EXECUTION_DEPENDENCIES: Record<
9
+ SUPPORTED_PROJECT_TYPES,
10
+ Record<string, UIDLExternalDependency>
11
+ > = {
12
+ 'teleport-project-react': {
13
+ Script: {
14
+ type: 'package',
15
+ path: 'dangerous-html',
16
+ version: '0.1.13',
17
+ meta: {
18
+ importAlias: 'dangerous-html/react',
19
+ },
20
+ },
21
+ },
22
+ 'teleport-project-next': {
23
+ Script: {
24
+ type: 'library',
25
+ path: 'next',
26
+ version: '0.0.0',
27
+ meta: {
28
+ importAlias: 'next/script',
29
+ },
30
+ },
31
+ },
32
+ 'teleport-project-html': {
33
+ DangerousHTML: {
34
+ type: 'package',
35
+ path: 'dangerous-html',
36
+ version: '0.1.13',
37
+ meta: {
38
+ importJustPath: true,
39
+ importAlias: 'https://unpkg.com/dangerous-html/dist/default/lib.umd.js',
40
+ },
41
+ },
42
+ },
43
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist/esm",
5
+ "allowJs": true
6
+ },
7
+ "include": [
8
+ "./src"
9
+ ]
10
+ }