@softarc/native-federation-runtime 1.1.1 → 2.0.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/{esm2020 → esm2022}/index.mjs +3 -3
- package/{esm2020 → esm2022}/lib/init-federation.mjs +82 -82
- package/{esm2020 → esm2022}/lib/load-remote-module.mjs +61 -61
- package/{esm2020 → esm2022}/lib/model/externals.mjs +12 -12
- package/{esm2020 → esm2022}/lib/model/federation-info.mjs +1 -1
- package/{esm2020 → esm2022}/lib/model/import-map.mjs +6 -6
- package/{esm2020 → esm2022}/lib/model/remotes.mjs +18 -18
- package/{esm2020 → esm2022}/lib/utils/add-import-map.mjs +6 -6
- package/{esm2020 → esm2022}/lib/utils/path-utils.mjs +14 -14
- package/{esm2020 → esm2022}/softarc-native-federation-runtime.mjs +4 -4
- package/{fesm2020 → fesm2022}/softarc-native-federation-runtime.mjs +185 -185
- package/index.d.ts +3 -3
- package/lib/init-federation.d.ts +3 -3
- package/lib/load-remote-module.d.ts +7 -7
- package/lib/model/externals.d.ts +3 -3
- package/lib/model/federation-info.d.ts +23 -23
- package/lib/model/import-map.d.ts +7 -7
- package/lib/model/remotes.d.ts +9 -9
- package/lib/utils/add-import-map.d.ts +2 -2
- package/lib/utils/path-utils.d.ts +2 -2
- package/package.json +5 -11
- package/fesm2015/softarc-native-federation-runtime.mjs +0 -221
- package/fesm2015/softarc-native-federation-runtime.mjs.map +0 -1
- /package/{fesm2020 → fesm2022}/softarc-native-federation-runtime.mjs.map +0 -0
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { __awaiter } from 'tslib';
|
|
2
|
-
|
|
3
|
-
function mergeImportMaps(map1, map2) {
|
|
4
|
-
return {
|
|
5
|
-
imports: Object.assign(Object.assign({}, map1.imports), map2.imports),
|
|
6
|
-
scopes: Object.assign(Object.assign({}, map1.scopes), map2.scopes),
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const externals = new Map();
|
|
11
|
-
function getExternalKey(shared) {
|
|
12
|
-
return `${shared.packageName}@${shared.version}`;
|
|
13
|
-
}
|
|
14
|
-
function getExternalUrl(shared) {
|
|
15
|
-
const packageKey = getExternalKey(shared);
|
|
16
|
-
return externals.get(packageKey);
|
|
17
|
-
}
|
|
18
|
-
function setExternalUrl(shared, url) {
|
|
19
|
-
const packageKey = getExternalKey(shared);
|
|
20
|
-
externals.set(packageKey, url);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function getDirectory(url) {
|
|
24
|
-
const parts = url.split('/');
|
|
25
|
-
parts.pop();
|
|
26
|
-
return parts.join('/');
|
|
27
|
-
}
|
|
28
|
-
function joinPaths(path1, path2) {
|
|
29
|
-
while (path1.endsWith('/')) {
|
|
30
|
-
path1 = path1.substring(0, path1.length - 1);
|
|
31
|
-
}
|
|
32
|
-
if (path2.startsWith('./')) {
|
|
33
|
-
path2 = path2.substring(2, path2.length);
|
|
34
|
-
}
|
|
35
|
-
return `${path1}/${path2}`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const remoteNamesToRemote = new Map();
|
|
39
|
-
const baseUrlToRemoteNames = new Map();
|
|
40
|
-
function addRemote(remoteName, remote) {
|
|
41
|
-
remoteNamesToRemote.set(remoteName, remote);
|
|
42
|
-
baseUrlToRemoteNames.set(remote.baseUrl, remoteName);
|
|
43
|
-
}
|
|
44
|
-
function getRemoteNameByBaseUrl(baseUrl) {
|
|
45
|
-
return baseUrlToRemoteNames.get(baseUrl);
|
|
46
|
-
}
|
|
47
|
-
function isRemoteInitialized(baseUrl) {
|
|
48
|
-
return baseUrlToRemoteNames.has(baseUrl);
|
|
49
|
-
}
|
|
50
|
-
function getRemote(remoteName) {
|
|
51
|
-
return remoteNamesToRemote.get(remoteName);
|
|
52
|
-
}
|
|
53
|
-
function hasRemote(remoteName) {
|
|
54
|
-
return remoteNamesToRemote.has(remoteName);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function appendImportMap(importMap) {
|
|
58
|
-
document.body.appendChild(Object.assign(document.createElement('script'), {
|
|
59
|
-
type: 'importmap-shim',
|
|
60
|
-
innerHTML: JSON.stringify(importMap),
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function initFederation(remotesOrManifestUrl = {}) {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const remotes = typeof remotesOrManifestUrl === 'string'
|
|
67
|
-
? yield loadManifest(remotesOrManifestUrl)
|
|
68
|
-
: remotesOrManifestUrl;
|
|
69
|
-
const hostImportMap = yield processHostInfo();
|
|
70
|
-
const remotesImportMap = yield processRemoteInfos(remotes);
|
|
71
|
-
const importMap = mergeImportMaps(hostImportMap, remotesImportMap);
|
|
72
|
-
appendImportMap(importMap);
|
|
73
|
-
return importMap;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function loadManifest(remotes) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
return (yield fetch(remotes).then((r) => r.json()));
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function processRemoteInfos(remotes) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
let importMap = {
|
|
84
|
-
imports: {},
|
|
85
|
-
scopes: {},
|
|
86
|
-
};
|
|
87
|
-
for (const remoteName of Object.keys(remotes)) {
|
|
88
|
-
try {
|
|
89
|
-
const url = remotes[remoteName];
|
|
90
|
-
const remoteMap = yield processRemoteInfo(url, remoteName);
|
|
91
|
-
importMap = mergeImportMaps(importMap, remoteMap);
|
|
92
|
-
}
|
|
93
|
-
catch (e) {
|
|
94
|
-
console.error(`Error loading remote entry for ${remoteName} from file ${remotes[remoteName]}`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return importMap;
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function processRemoteInfo(federationInfoUrl, remoteName) {
|
|
101
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
const baseUrl = getDirectory(federationInfoUrl);
|
|
103
|
-
const remoteInfo = yield loadFederationInfo(federationInfoUrl);
|
|
104
|
-
if (!remoteName) {
|
|
105
|
-
remoteName = remoteInfo.name;
|
|
106
|
-
}
|
|
107
|
-
const importMap = createRemoteImportMap(remoteInfo, remoteName, baseUrl);
|
|
108
|
-
addRemote(remoteName, Object.assign(Object.assign({}, remoteInfo), { baseUrl }));
|
|
109
|
-
return importMap;
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
function createRemoteImportMap(remoteInfo, remoteName, baseUrl) {
|
|
113
|
-
const imports = processExposed(remoteInfo, remoteName, baseUrl);
|
|
114
|
-
const scopes = processRemoteImports(remoteInfo, baseUrl);
|
|
115
|
-
return { imports, scopes };
|
|
116
|
-
}
|
|
117
|
-
function loadFederationInfo(url) {
|
|
118
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
-
const info = (yield fetch(url).then((r) => r.json()));
|
|
120
|
-
return info;
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function processRemoteImports(remoteInfo, baseUrl) {
|
|
124
|
-
var _a;
|
|
125
|
-
const scopes = {};
|
|
126
|
-
const scopedImports = {};
|
|
127
|
-
for (const shared of remoteInfo.shared) {
|
|
128
|
-
const outFileName = (_a = getExternalUrl(shared)) !== null && _a !== void 0 ? _a : joinPaths(baseUrl, shared.outFileName);
|
|
129
|
-
setExternalUrl(shared, outFileName);
|
|
130
|
-
scopedImports[shared.packageName] = outFileName;
|
|
131
|
-
}
|
|
132
|
-
scopes[baseUrl + '/'] = scopedImports;
|
|
133
|
-
return scopes;
|
|
134
|
-
}
|
|
135
|
-
function processExposed(remoteInfo, remoteName, baseUrl) {
|
|
136
|
-
const imports = {};
|
|
137
|
-
for (const exposed of remoteInfo.exposes) {
|
|
138
|
-
const key = joinPaths(remoteName, exposed.key);
|
|
139
|
-
const value = joinPaths(baseUrl, exposed.outFileName);
|
|
140
|
-
imports[key] = value;
|
|
141
|
-
}
|
|
142
|
-
return imports;
|
|
143
|
-
}
|
|
144
|
-
function processHostInfo() {
|
|
145
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
const hostInfo = yield loadFederationInfo('./remoteEntry.json');
|
|
147
|
-
const imports = hostInfo.shared.reduce((acc, cur) => (Object.assign(Object.assign({}, acc), { [cur.packageName]: './' + cur.outFileName })), {});
|
|
148
|
-
for (const shared of hostInfo.shared) {
|
|
149
|
-
setExternalUrl(shared, './' + shared.outFileName);
|
|
150
|
-
}
|
|
151
|
-
return { imports, scopes: {} };
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function loadRemoteModule(optionsOrRemoteName, exposedModule) {
|
|
156
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
const options = normalizeOptions(optionsOrRemoteName, exposedModule);
|
|
158
|
-
yield ensureRemoteInitialized(options);
|
|
159
|
-
const remoteName = getRemoteNameByOptions(options);
|
|
160
|
-
const remote = getRemote(remoteName);
|
|
161
|
-
if (!remote) {
|
|
162
|
-
throw new Error('unknown remote ' + remoteName);
|
|
163
|
-
}
|
|
164
|
-
const exposed = remote.exposes.find((e) => e.key === options.exposedModule);
|
|
165
|
-
if (!exposed) {
|
|
166
|
-
throw new Error(`Unknown exposed module ${options.exposedModule} in remote ${remoteName}`);
|
|
167
|
-
}
|
|
168
|
-
const url = joinPaths(remote.baseUrl, exposed.outFileName);
|
|
169
|
-
const module = yield importShim(url);
|
|
170
|
-
return module;
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
function getRemoteNameByOptions(options) {
|
|
174
|
-
let remoteName;
|
|
175
|
-
if (options.remoteName) {
|
|
176
|
-
remoteName = options.remoteName;
|
|
177
|
-
}
|
|
178
|
-
else if (options.remoteEntry) {
|
|
179
|
-
const baseUrl = getDirectory(options.remoteEntry);
|
|
180
|
-
remoteName = getRemoteNameByBaseUrl(baseUrl);
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
throw new Error('unexpcted arguments: Please pass remoteName or remoteEntry');
|
|
184
|
-
}
|
|
185
|
-
if (!remoteName) {
|
|
186
|
-
throw new Error('unknown remoteName ' + remoteName);
|
|
187
|
-
}
|
|
188
|
-
return remoteName;
|
|
189
|
-
}
|
|
190
|
-
function ensureRemoteInitialized(options) {
|
|
191
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
if (options.remoteEntry &&
|
|
193
|
-
!isRemoteInitialized(getDirectory(options.remoteEntry))) {
|
|
194
|
-
const importMap = yield processRemoteInfo(options.remoteEntry);
|
|
195
|
-
appendImportMap(importMap);
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
function normalizeOptions(optionsOrRemoteName, exposedModule) {
|
|
200
|
-
let options;
|
|
201
|
-
if (typeof optionsOrRemoteName === 'string' && exposedModule) {
|
|
202
|
-
options = {
|
|
203
|
-
remoteName: optionsOrRemoteName,
|
|
204
|
-
exposedModule,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
else if (typeof optionsOrRemoteName === 'object' && !exposedModule) {
|
|
208
|
-
options = optionsOrRemoteName;
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
throw new Error('unexpected arguments: please pass options or a remoteName/exposedModule-pair');
|
|
212
|
-
}
|
|
213
|
-
return options;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Generated bundle index. Do not edit.
|
|
218
|
-
*/
|
|
219
|
-
|
|
220
|
-
export { initFederation, loadRemoteModule, processRemoteInfo };
|
|
221
|
-
//# sourceMappingURL=softarc-native-federation-runtime.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"softarc-native-federation-runtime.mjs","sources":["../../../../libs/native-federation-runtime/src/lib/model/import-map.ts","../../../../libs/native-federation-runtime/src/lib/model/externals.ts","../../../../libs/native-federation-runtime/src/lib/utils/path-utils.ts","../../../../libs/native-federation-runtime/src/lib/model/remotes.ts","../../../../libs/native-federation-runtime/src/lib/utils/add-import-map.ts","../../../../libs/native-federation-runtime/src/lib/init-federation.ts","../../../../libs/native-federation-runtime/src/lib/load-remote-module.ts","../../../../libs/native-federation-runtime/src/softarc-native-federation-runtime.ts"],"sourcesContent":["export type Imports = Record<string, string>;\n\nexport type Scopes = Record<string, Imports>;\n\nexport type ImportMap = {\n imports: Imports;\n scopes: Scopes;\n};\n\nexport function mergeImportMaps(map1: ImportMap, map2: ImportMap): ImportMap {\n return {\n imports: { ...map1.imports, ...map2.imports },\n scopes: { ...map1.scopes, ...map2.scopes },\n };\n}\n","import { SharedInfo } from './federation-info';\n\nconst externals = new Map<string, string>();\n\nfunction getExternalKey(shared: SharedInfo) {\n return `${shared.packageName}@${shared.version}`;\n}\n\nexport function getExternalUrl(shared: SharedInfo): string | undefined {\n const packageKey = getExternalKey(shared);\n return externals.get(packageKey);\n}\n\nexport function setExternalUrl(shared: SharedInfo, url: string): void {\n const packageKey = getExternalKey(shared);\n externals.set(packageKey, url);\n}\n","export function getDirectory(url: string) {\n const parts = url.split('/');\n parts.pop();\n return parts.join('/');\n}\n\nexport function joinPaths(path1: string, path2: string): string {\n while (path1.endsWith('/')) {\n path1 = path1.substring(0, path1.length - 1);\n }\n if (path2.startsWith('./')) {\n path2 = path2.substring(2, path2.length);\n }\n\n return `${path1}/${path2}`;\n}\n","import { FederationInfo } from './federation-info';\n\nexport type Remote = FederationInfo & {\n baseUrl: string;\n};\n\nconst remoteNamesToRemote = new Map<string, Remote>();\nconst baseUrlToRemoteNames = new Map<string, string>();\n\nexport function addRemote(remoteName: string, remote: Remote): void {\n remoteNamesToRemote.set(remoteName, remote);\n baseUrlToRemoteNames.set(remote.baseUrl, remoteName);\n}\n\nexport function getRemoteNameByBaseUrl(baseUrl: string): string | undefined {\n return baseUrlToRemoteNames.get(baseUrl);\n}\n\nexport function isRemoteInitialized(baseUrl: string): boolean {\n return baseUrlToRemoteNames.has(baseUrl);\n}\n\nexport function getRemote(remoteName: string): Remote | undefined {\n return remoteNamesToRemote.get(remoteName);\n}\n\nexport function hasRemote(remoteName: string): boolean {\n return remoteNamesToRemote.has(remoteName);\n}\n","import { ImportMap } from '../model/import-map';\n\nexport function appendImportMap(importMap: ImportMap) {\n document.body.appendChild(\n Object.assign(document.createElement('script'), {\n type: 'importmap-shim',\n innerHTML: JSON.stringify(importMap),\n })\n );\n}\n","import {\n Scopes,\n Imports,\n ImportMap,\n mergeImportMaps,\n} from './model/import-map';\nimport { getExternalUrl, setExternalUrl } from './model/externals';\nimport { joinPaths, getDirectory } from './utils/path-utils';\nimport { addRemote } from './model/remotes';\nimport { appendImportMap } from './utils/add-import-map';\nimport { FederationInfo } from './model/federation-info';\n\nexport async function initFederation(\n remotesOrManifestUrl: Record<string, string> | string = {}\n): Promise<ImportMap> {\n const remotes =\n typeof remotesOrManifestUrl === 'string'\n ? await loadManifest(remotesOrManifestUrl)\n : remotesOrManifestUrl;\n\n const hostImportMap = await processHostInfo();\n const remotesImportMap = await processRemoteInfos(remotes);\n\n const importMap = mergeImportMaps(hostImportMap, remotesImportMap);\n appendImportMap(importMap);\n\n return importMap;\n}\n\nasync function loadManifest(remotes: string): Promise<Record<string, string>> {\n return (await fetch(remotes).then((r) => r.json())) as Record<string, string>;\n}\n\nasync function processRemoteInfos(\n remotes: Record<string, string>\n): Promise<ImportMap> {\n let importMap: ImportMap = {\n imports: {},\n scopes: {},\n };\n\n for (const remoteName of Object.keys(remotes)) {\n try {\n const url = remotes[remoteName];\n const remoteMap = await processRemoteInfo(url, remoteName);\n importMap = mergeImportMaps(importMap, remoteMap);\n } catch (e) {\n console.error(\n `Error loading remote entry for ${remoteName} from file ${remotes[remoteName]}`\n );\n }\n }\n\n return importMap;\n}\n\nexport async function processRemoteInfo(\n federationInfoUrl: string,\n remoteName?: string\n): Promise<ImportMap> {\n const baseUrl = getDirectory(federationInfoUrl);\n const remoteInfo = await loadFederationInfo(federationInfoUrl);\n\n if (!remoteName) {\n remoteName = remoteInfo.name;\n }\n\n const importMap = createRemoteImportMap(remoteInfo, remoteName, baseUrl);\n addRemote(remoteName, { ...remoteInfo, baseUrl });\n\n return importMap;\n}\n\nfunction createRemoteImportMap(\n remoteInfo: FederationInfo,\n remoteName: string,\n baseUrl: string\n): ImportMap {\n const imports = processExposed(remoteInfo, remoteName, baseUrl);\n const scopes = processRemoteImports(remoteInfo, baseUrl);\n return { imports, scopes };\n}\n\nasync function loadFederationInfo(url: string): Promise<FederationInfo> {\n const info = (await fetch(url).then((r) => r.json())) as FederationInfo;\n return info;\n}\n\nfunction processRemoteImports(\n remoteInfo: FederationInfo,\n baseUrl: string\n): Scopes {\n const scopes: Scopes = {};\n const scopedImports: Imports = {};\n\n for (const shared of remoteInfo.shared) {\n const outFileName =\n getExternalUrl(shared) ?? joinPaths(baseUrl, shared.outFileName);\n setExternalUrl(shared, outFileName);\n scopedImports[shared.packageName] = outFileName;\n }\n\n scopes[baseUrl + '/'] = scopedImports;\n return scopes;\n}\n\nfunction processExposed(\n remoteInfo: FederationInfo,\n remoteName: string,\n baseUrl: string\n): Imports {\n const imports: Imports = {};\n\n for (const exposed of remoteInfo.exposes) {\n const key = joinPaths(remoteName, exposed.key);\n const value = joinPaths(baseUrl, exposed.outFileName);\n imports[key] = value;\n }\n\n return imports;\n}\n\nasync function processHostInfo(): Promise<ImportMap> {\n const hostInfo = await loadFederationInfo('./remoteEntry.json');\n\n const imports = hostInfo.shared.reduce(\n (acc, cur) => ({ ...acc, [cur.packageName]: './' + cur.outFileName }),\n {}\n ) as Imports;\n\n for (const shared of hostInfo.shared) {\n setExternalUrl(shared, './' + shared.outFileName);\n }\n return { imports, scopes: {} };\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { appendImportMap } from './utils/add-import-map';\nimport { processRemoteInfo } from './init-federation';\nimport {\n getRemote,\n getRemoteNameByBaseUrl,\n isRemoteInitialized,\n} from './model/remotes';\nimport { getDirectory, joinPaths } from './utils/path-utils';\n\ndeclare function importShim<T>(url: string): T;\n\nexport type LoadRemoteModuleOptions = {\n remoteEntry?: string;\n remoteName?: string;\n exposedModule: string;\n};\n\nexport async function loadRemoteModule<T = any>(\n options: LoadRemoteModuleOptions\n): Promise<T>;\nexport async function loadRemoteModule<T = any>(\n remoteName: string,\n exposedModule: string\n): Promise<T>;\nexport async function loadRemoteModule<T = any>(\n optionsOrRemoteName: LoadRemoteModuleOptions | string,\n exposedModule?: string\n): Promise<T> {\n const options = normalizeOptions(optionsOrRemoteName, exposedModule);\n\n await ensureRemoteInitialized(options);\n\n const remoteName = getRemoteNameByOptions(options);\n const remote = getRemote(remoteName);\n\n if (!remote) {\n throw new Error('unknown remote ' + remoteName);\n }\n\n const exposed = remote.exposes.find((e) => e.key === options.exposedModule);\n\n if (!exposed) {\n throw new Error(\n `Unknown exposed module ${options.exposedModule} in remote ${remoteName}`\n );\n }\n\n const url = joinPaths(remote.baseUrl, exposed.outFileName);\n const module = await importShim<T>(url);\n\n return module;\n}\n\nfunction getRemoteNameByOptions(options: LoadRemoteModuleOptions) {\n let remoteName;\n\n if (options.remoteName) {\n remoteName = options.remoteName;\n } else if (options.remoteEntry) {\n const baseUrl = getDirectory(options.remoteEntry);\n remoteName = getRemoteNameByBaseUrl(baseUrl);\n } else {\n throw new Error(\n 'unexpcted arguments: Please pass remoteName or remoteEntry'\n );\n }\n\n if (!remoteName) {\n throw new Error('unknown remoteName ' + remoteName);\n }\n return remoteName;\n}\n\nasync function ensureRemoteInitialized(\n options: LoadRemoteModuleOptions\n): Promise<void> {\n if (\n options.remoteEntry &&\n !isRemoteInitialized(getDirectory(options.remoteEntry))\n ) {\n const importMap = await processRemoteInfo(options.remoteEntry);\n appendImportMap(importMap);\n }\n}\n\nfunction normalizeOptions(\n optionsOrRemoteName: string | LoadRemoteModuleOptions,\n exposedModule: string | undefined\n): LoadRemoteModuleOptions {\n let options: LoadRemoteModuleOptions;\n\n if (typeof optionsOrRemoteName === 'string' && exposedModule) {\n options = {\n remoteName: optionsOrRemoteName,\n exposedModule,\n };\n } else if (typeof optionsOrRemoteName === 'object' && !exposedModule) {\n options = optionsOrRemoteName;\n } else {\n throw new Error(\n 'unexpected arguments: please pass options or a remoteName/exposedModule-pair'\n );\n }\n return options;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AASgB,SAAA,eAAe,CAAC,IAAe,EAAE,IAAe,EAAA;IAC9D,OAAO;QACL,OAAO,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAO,IAAI,CAAC,OAAO,GAAK,IAAI,CAAC,OAAO,CAAE;QAC7C,MAAM,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAO,IAAI,CAAC,MAAM,GAAK,IAAI,CAAC,MAAM,CAAE;KAC3C,CAAC;AACJ;;ACZA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;AAE5C,SAAS,cAAc,CAAC,MAAkB,EAAA;IACxC,OAAO,CAAA,EAAG,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,OAAO,CAAA,CAAE,CAAC;AACnD,CAAC;AAEK,SAAU,cAAc,CAAC,MAAkB,EAAA;AAC/C,IAAA,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAC1C,IAAA,OAAO,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC;AAEe,SAAA,cAAc,CAAC,MAAkB,EAAE,GAAW,EAAA;AAC5D,IAAA,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAC1C,IAAA,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AACjC;;AChBM,SAAU,YAAY,CAAC,GAAW,EAAA;IACtC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,KAAK,CAAC,GAAG,EAAE,CAAC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