remote-components 0.0.1
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 +21 -0
- package/README.md +11 -0
- package/dist/html/host.cjs +758 -0
- package/dist/html/host.cjs.map +1 -0
- package/dist/html/host.d.ts +2 -0
- package/dist/html/host.js +737 -0
- package/dist/html/host.js.map +1 -0
- package/dist/next/config.cjs +347 -0
- package/dist/next/config.cjs.map +1 -0
- package/dist/next/config.d.ts +8 -0
- package/dist/next/config.js +325 -0
- package/dist/next/config.js.map +1 -0
- package/dist/next/host/app-client.cjs +124 -0
- package/dist/next/host/app-client.cjs.map +1 -0
- package/dist/next/host/app-client.d.ts +33 -0
- package/dist/next/host/app-client.js +104 -0
- package/dist/next/host/app-client.js.map +1 -0
- package/dist/next/host/app-server.cjs +61 -0
- package/dist/next/host/app-server.cjs.map +1 -0
- package/dist/next/host/app-server.d.ts +7 -0
- package/dist/next/host/app-server.js +37 -0
- package/dist/next/host/app-server.js.map +1 -0
- package/dist/next/host/pages-client.cjs +52 -0
- package/dist/next/host/pages-client.cjs.map +1 -0
- package/dist/next/host/pages-client.d.ts +17 -0
- package/dist/next/host/pages-client.js +18 -0
- package/dist/next/host/pages-client.js.map +1 -0
- package/dist/next/host/pages-server.cjs +134 -0
- package/dist/next/host/pages-server.cjs.map +1 -0
- package/dist/next/host/pages-server.d.ts +25 -0
- package/dist/next/host/pages-server.js +99 -0
- package/dist/next/host/pages-server.js.map +1 -0
- package/dist/next/remote/pages.cjs +37 -0
- package/dist/next/remote/pages.cjs.map +1 -0
- package/dist/next/remote/pages.d.ts +9 -0
- package/dist/next/remote/pages.js +13 -0
- package/dist/next/remote/pages.js.map +1 -0
- package/dist/next/remote/render-client-turbopack.cjs +51 -0
- package/dist/next/remote/render-client-turbopack.cjs.map +1 -0
- package/dist/next/remote/render-client-turbopack.d.ts +11 -0
- package/dist/next/remote/render-client-turbopack.js +27 -0
- package/dist/next/remote/render-client-turbopack.js.map +1 -0
- package/dist/next/remote/render-client-webpack.cjs +51 -0
- package/dist/next/remote/render-client-webpack.cjs.map +1 -0
- package/dist/next/remote/render-client-webpack.d.ts +11 -0
- package/dist/next/remote/render-client-webpack.js +27 -0
- package/dist/next/remote/render-client-webpack.js.map +1 -0
- package/dist/next/remote/render-client.cjs +106 -0
- package/dist/next/remote/render-client.cjs.map +1 -0
- package/dist/next/remote/render-client.d.ts +15 -0
- package/dist/next/remote/render-client.js +82 -0
- package/dist/next/remote/render-client.js.map +1 -0
- package/dist/next/remote/render-server.cjs +133 -0
- package/dist/next/remote/render-server.cjs.map +1 -0
- package/dist/next/remote/render-server.d.ts +9 -0
- package/dist/next/remote/render-server.js +99 -0
- package/dist/next/remote/render-server.js.map +1 -0
- package/dist/next/remote/server.cjs +29 -0
- package/dist/next/remote/server.cjs.map +1 -0
- package/dist/next/remote/server.d.ts +3 -0
- package/dist/next/remote/server.js +5 -0
- package/dist/next/remote/server.js.map +1 -0
- package/dist/shared/client/remote-component.cjs +558 -0
- package/dist/shared/client/remote-component.cjs.map +1 -0
- package/dist/shared/client/remote-component.d.ts +93 -0
- package/dist/shared/client/remote-component.js +511 -0
- package/dist/shared/client/remote-component.js.map +1 -0
- package/dist/shared/ssr/dom-flight.cjs +185 -0
- package/dist/shared/ssr/dom-flight.cjs.map +1 -0
- package/dist/shared/ssr/dom-flight.d.ts +30 -0
- package/dist/shared/ssr/dom-flight.js +151 -0
- package/dist/shared/ssr/dom-flight.js.map +1 -0
- package/dist/shared/ssr/fetch-remote-component.cjs +162 -0
- package/dist/shared/ssr/fetch-remote-component.cjs.map +1 -0
- package/dist/shared/ssr/fetch-remote-component.d.ts +31 -0
- package/dist/shared/ssr/fetch-remote-component.js +137 -0
- package/dist/shared/ssr/fetch-remote-component.js.map +1 -0
- package/dist/shared/webpack/next-client-pages-loader.cjs +107 -0
- package/dist/shared/webpack/next-client-pages-loader.cjs.map +1 -0
- package/dist/shared/webpack/next-client-pages-loader.d.ts +10 -0
- package/dist/shared/webpack/next-client-pages-loader.js +83 -0
- package/dist/shared/webpack/next-client-pages-loader.js.map +1 -0
- package/dist/shared/webpack/shared-modules.cjs +50 -0
- package/dist/shared/webpack/shared-modules.cjs.map +1 -0
- package/dist/shared/webpack/shared-modules.d.ts +3 -0
- package/dist/shared/webpack/shared-modules.js +26 -0
- package/dist/shared/webpack/shared-modules.js.map +1 -0
- package/dist/types-280a3640.d.ts +8 -0
- package/dist/types-a1bd5b56.d.ts +6 -0
- package/package.json +151 -0
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function __init() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
// src/shared/webpack/shared-modules.ts
|
|
33
|
+
function applySharedModules(bundle, resolve) {
|
|
34
|
+
const self = globalThis;
|
|
35
|
+
if (self.__remote_webpack_require__?.[bundle]) {
|
|
36
|
+
const modulePaths = Object.keys(
|
|
37
|
+
self.__remote_webpack_module_map__?.[bundle] ?? self.__remote_webpack_require__[bundle].m ?? {}
|
|
38
|
+
);
|
|
39
|
+
for (const [key, value] of Object.entries(resolve)) {
|
|
40
|
+
const ids = modulePaths.filter((p) => p.includes(key));
|
|
41
|
+
for (let id of ids) {
|
|
42
|
+
const webpackBundle = self.__remote_webpack_require__[bundle];
|
|
43
|
+
if (webpackBundle.m) {
|
|
44
|
+
if (self.__remote_webpack_module_map__?.[bundle]?.[id]) {
|
|
45
|
+
id = `${self.__remote_webpack_module_map__[bundle][id]}`;
|
|
46
|
+
}
|
|
47
|
+
webpackBundle.m[id] = (module2) => {
|
|
48
|
+
module2.exports = value;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
var init_shared_modules = __esm({
|
|
56
|
+
"src/shared/webpack/shared-modules.ts"() {
|
|
57
|
+
"use strict";
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// src/shared/webpack/next-client-pages-loader.ts
|
|
62
|
+
function nextClientPagesLoader(bundle, route, styleContainer = document.head) {
|
|
63
|
+
const self = globalThis;
|
|
64
|
+
const nextCssOriginal = document.getElementById("__next_css__DO_NOT_USE__");
|
|
65
|
+
if (nextCssOriginal) {
|
|
66
|
+
nextCssOriginal.parentNode?.removeChild(nextCssOriginal);
|
|
67
|
+
}
|
|
68
|
+
const nextCss = document.createElement("noscript");
|
|
69
|
+
nextCss.id = "__next_css__DO_NOT_USE__";
|
|
70
|
+
const lastNode = document.head.childNodes[document.head.childNodes.length - 1];
|
|
71
|
+
document.head.appendChild(nextCss);
|
|
72
|
+
const componentLoaderChunk = Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(
|
|
73
|
+
(key) => key.includes("/webpack/loaders/next-client-pages-loader.js") && key.includes(`page=${encodeURIComponent(route)}`)
|
|
74
|
+
) ?? Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(
|
|
75
|
+
(key) => key.includes("/next/dist/client/page-loader.js")
|
|
76
|
+
) ?? self.__remote_webpack_module_map__?.[bundle]?.[Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(
|
|
77
|
+
(key) => key.includes("/webpack/loaders/next-client-pages-loader.js") && key.includes(`page=${encodeURIComponent(route)}`)
|
|
78
|
+
) ?? Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(
|
|
79
|
+
(key) => key.includes("/next/dist/client/page-loader.js")
|
|
80
|
+
) ?? ""] ?? -1;
|
|
81
|
+
const appLoaderChunk = Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(
|
|
82
|
+
(key) => key.includes("/webpack/loaders/next-client-pages-loader.js") && key.includes(`page=%2F_app`)
|
|
83
|
+
) ?? Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(
|
|
84
|
+
(key) => key.includes("/next/dist/client/page-loader.js")
|
|
85
|
+
) ?? self.__remote_webpack_module_map__?.[bundle]?.[Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(
|
|
86
|
+
(key) => key.includes("/webpack/loaders/next-client-pages-loader.js") && key.includes(`page=%2F_app`)
|
|
87
|
+
) ?? Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(
|
|
88
|
+
(key) => key.includes("/next/dist/client/page-loader.js")
|
|
89
|
+
) ?? ""] ?? -1;
|
|
90
|
+
if (!(componentLoaderChunk && appLoaderChunk)) {
|
|
91
|
+
throw new Error(
|
|
92
|
+
`Next.js client pages loader not found in bundle "${bundle}"`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
const __NEXT_P_ORIGINAL = self.__NEXT_P;
|
|
96
|
+
const selfOriginal = self;
|
|
97
|
+
delete selfOriginal.__NEXT_P;
|
|
98
|
+
self.__remote_webpack_require__?.[bundle]?.(componentLoaderChunk);
|
|
99
|
+
if (typeof appLoaderChunk === "string" || typeof appLoaderChunk === "number" && appLoaderChunk !== -1) {
|
|
100
|
+
self.__remote_webpack_require__?.[bundle]?.(appLoaderChunk);
|
|
101
|
+
}
|
|
102
|
+
if (self.__NEXT_P) {
|
|
103
|
+
const [, componentLoader] = self.__NEXT_P[0] ?? [
|
|
104
|
+
void 0,
|
|
105
|
+
() => ({ default: null })
|
|
106
|
+
];
|
|
107
|
+
const [, appLoader] = self.__NEXT_P[2] ?? [
|
|
108
|
+
void 0,
|
|
109
|
+
() => ({
|
|
110
|
+
default: null
|
|
111
|
+
})
|
|
112
|
+
];
|
|
113
|
+
const { default: Component } = componentLoader();
|
|
114
|
+
const { default: App } = appLoader();
|
|
115
|
+
const cssRE = /\.s?css$/;
|
|
116
|
+
Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).filter((id) => cssRE.test(id)).forEach((id) => {
|
|
117
|
+
self.__remote_webpack_require__?.[bundle]?.(id);
|
|
118
|
+
});
|
|
119
|
+
Object.keys(self.__remote_webpack_module_map__?.[bundle] ?? {}).filter((path) => cssRE.test(path)).forEach((path) => {
|
|
120
|
+
const id = self.__remote_webpack_module_map__?.[bundle]?.[path];
|
|
121
|
+
if (id) {
|
|
122
|
+
self.__remote_webpack_require__?.[bundle]?.(id);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
if (styleContainer) {
|
|
126
|
+
let node = nextCss.previousSibling;
|
|
127
|
+
while (node && node !== lastNode) {
|
|
128
|
+
styleContainer.appendChild(node);
|
|
129
|
+
node = nextCss.previousSibling;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
delete self.__NEXT_P;
|
|
133
|
+
self.__NEXT_P = __NEXT_P_ORIGINAL;
|
|
134
|
+
if (nextCssOriginal) {
|
|
135
|
+
nextCssOriginal.parentNode?.appendChild(nextCssOriginal);
|
|
136
|
+
}
|
|
137
|
+
return { Component, App };
|
|
138
|
+
}
|
|
139
|
+
return { Component: null, App: null };
|
|
140
|
+
}
|
|
141
|
+
var init_next_client_pages_loader = __esm({
|
|
142
|
+
"src/shared/webpack/next-client-pages-loader.ts"() {
|
|
143
|
+
"use strict";
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// src/html/runtime/webpack.ts
|
|
148
|
+
var webpack_exports = {};
|
|
149
|
+
__export(webpack_exports, {
|
|
150
|
+
webpackRuntime: () => webpackRuntime
|
|
151
|
+
});
|
|
152
|
+
async function webpackRuntime() {
|
|
153
|
+
const self = globalThis;
|
|
154
|
+
self.__DISABLE_WEBPACK_EXEC__ = true;
|
|
155
|
+
if (typeof self.__webpack_require__ !== "function" && self.__webpack_require_type__ !== "turbopack") {
|
|
156
|
+
self.__webpack_require__ = (remoteId) => {
|
|
157
|
+
const re = /\[(?<bundle>[a-zA-Z0-9-_]+)\] (?<id>.*)/;
|
|
158
|
+
const match = re.exec(remoteId);
|
|
159
|
+
const bundle = match?.groups?.bundle;
|
|
160
|
+
const id = match?.groups?.id;
|
|
161
|
+
if (!(id && bundle)) {
|
|
162
|
+
throw new Error(`Module not found: "${remoteId}"`);
|
|
163
|
+
}
|
|
164
|
+
if (typeof self.__remote_webpack_require__?.[bundle] !== "function") {
|
|
165
|
+
throw new Error(`Remote component loading error "${bundle}"`);
|
|
166
|
+
}
|
|
167
|
+
return self.__remote_webpack_require__[bundle](id);
|
|
168
|
+
};
|
|
169
|
+
self.__webpack_chunk_load__ = () => {
|
|
170
|
+
return Promise.resolve([]);
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const { createFromReadableStream } = await import("react-server-dom-webpack/client.browser");
|
|
174
|
+
async function preloadScripts(scripts, url, bundle, _) {
|
|
175
|
+
await Promise.all(
|
|
176
|
+
scripts.map((script) => {
|
|
177
|
+
return new Promise((resolve2, reject) => {
|
|
178
|
+
const newScript = document.createElement("script");
|
|
179
|
+
newScript.onload = () => {
|
|
180
|
+
resolve2();
|
|
181
|
+
};
|
|
182
|
+
newScript.onerror = () => {
|
|
183
|
+
reject(
|
|
184
|
+
new Error(
|
|
185
|
+
`Failed to load script ${script.src} for remote component`
|
|
186
|
+
)
|
|
187
|
+
);
|
|
188
|
+
};
|
|
189
|
+
const scriptSrc = script.src || script.getAttribute("data-src");
|
|
190
|
+
if (scriptSrc) {
|
|
191
|
+
newScript.src = new URL(
|
|
192
|
+
scriptSrc.replace(
|
|
193
|
+
/\/_next\/\[remote-component-(?:.+)\](?:%20| )/,
|
|
194
|
+
"/_next/"
|
|
195
|
+
),
|
|
196
|
+
url
|
|
197
|
+
).href;
|
|
198
|
+
}
|
|
199
|
+
newScript.async = true;
|
|
200
|
+
document.body.appendChild(newScript);
|
|
201
|
+
script.parentElement?.removeChild(script);
|
|
202
|
+
});
|
|
203
|
+
})
|
|
204
|
+
);
|
|
205
|
+
const resolve = {
|
|
206
|
+
"/react/index.js": await import("react"),
|
|
207
|
+
"/react/jsx-dev-runtime.js": await import("react/jsx-dev-runtime"),
|
|
208
|
+
"/react/jsx-runtime.js": await import("react/jsx-runtime"),
|
|
209
|
+
"/react-dom/index.js": await import("react-dom")
|
|
210
|
+
};
|
|
211
|
+
applySharedModules(bundle, resolve);
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
self,
|
|
215
|
+
createFromReadableStream,
|
|
216
|
+
applySharedModules,
|
|
217
|
+
nextClientPagesLoader,
|
|
218
|
+
preloadScripts
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
var init_webpack = __esm({
|
|
222
|
+
"src/html/runtime/webpack.ts"() {
|
|
223
|
+
"use strict";
|
|
224
|
+
init_shared_modules();
|
|
225
|
+
init_next_client_pages_loader();
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// src/shared/client/script-loader.ts
|
|
230
|
+
function loadCSS(url) {
|
|
231
|
+
const link = document.createElement("link");
|
|
232
|
+
link.rel = "stylesheet";
|
|
233
|
+
link.href = url;
|
|
234
|
+
document.head.appendChild(link);
|
|
235
|
+
}
|
|
236
|
+
var init_script_loader = __esm({
|
|
237
|
+
"src/shared/client/script-loader.ts"() {
|
|
238
|
+
"use strict";
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// src/shared/client/const.ts
|
|
243
|
+
function getBundleKey(bundle) {
|
|
244
|
+
return bundle.replace(/-/g, "_");
|
|
245
|
+
}
|
|
246
|
+
var RUNTIME_WEBPACK, REMOTE_COMPONENT_REGEX;
|
|
247
|
+
var init_const = __esm({
|
|
248
|
+
"src/shared/client/const.ts"() {
|
|
249
|
+
"use strict";
|
|
250
|
+
RUNTIME_WEBPACK = "webpack";
|
|
251
|
+
REMOTE_COMPONENT_REGEX = /(?<prefix>.*)?\[(?<bundle>remote-component-(?:[^\]]+))\](?:%20| )(?<id>.+)/;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
// src/shared/client/webpack-adapter.ts
|
|
256
|
+
async function setupWebpackRuntime(runtime, scripts = [], bundle, shared = {}, remoteShared = {}) {
|
|
257
|
+
const self = globalThis;
|
|
258
|
+
self.__DISABLE_WEBPACK_EXEC__ = true;
|
|
259
|
+
await initializeSharedModules(bundle ?? "default", shared, remoteShared);
|
|
260
|
+
if (typeof self.__webpack_require__ !== "function" || self.__webpack_require_type__ !== "turbopack") {
|
|
261
|
+
if (!self.__original_webpack_require__ && !self.__original_webpack_chunk_load__) {
|
|
262
|
+
self.__original_webpack_chunk_load__ = self.__webpack_chunk_load__;
|
|
263
|
+
self.__original_webpack_require__ = self.__webpack_require__;
|
|
264
|
+
}
|
|
265
|
+
self.__webpack_chunk_load__ = createChunkLoader(runtime);
|
|
266
|
+
self.__webpack_require__ = createModuleRequire(runtime);
|
|
267
|
+
self.__webpack_require_type__ = runtime;
|
|
268
|
+
if (self.__remote_webpack_require__) {
|
|
269
|
+
const remoteBundle = bundle ?? "default";
|
|
270
|
+
self.__remote_webpack_require__[remoteBundle] = self.__webpack_require__;
|
|
271
|
+
self.__remote_webpack_require__[remoteBundle].type = "turbopack";
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
await Promise.all(
|
|
275
|
+
scripts.map((script) => {
|
|
276
|
+
if (script.src) {
|
|
277
|
+
return self.__webpack_chunk_load__?.(script.src, bundle);
|
|
278
|
+
}
|
|
279
|
+
return Promise.resolve(void 0);
|
|
280
|
+
})
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
function createChunkLoader(runtime) {
|
|
284
|
+
return function __turbopack_chunk_load__(chunkId, scriptBundle) {
|
|
285
|
+
if (runtime === RUNTIME_WEBPACK) {
|
|
286
|
+
return Promise.resolve(void 0);
|
|
287
|
+
}
|
|
288
|
+
const {
|
|
289
|
+
bundle,
|
|
290
|
+
id: path,
|
|
291
|
+
prefix
|
|
292
|
+
} = REMOTE_COMPONENT_REGEX.exec(chunkId)?.groups ?? {
|
|
293
|
+
bundle: scriptBundle ?? "",
|
|
294
|
+
id: chunkId
|
|
295
|
+
};
|
|
296
|
+
const url = new URL(
|
|
297
|
+
path ? `${prefix ?? ""}${path}`.replace(
|
|
298
|
+
/(?<char>[^:])(?<double>\/\/)/g,
|
|
299
|
+
"$1/"
|
|
300
|
+
) : "/",
|
|
301
|
+
location.origin
|
|
302
|
+
).href;
|
|
303
|
+
if (url.endsWith(".css")) {
|
|
304
|
+
loadCSS(url);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
return new Promise((resolve, reject) => {
|
|
308
|
+
fetch(url).then((res) => res.text()).then((code) => {
|
|
309
|
+
if (code.includes("globalThis.TURBOPACK")) {
|
|
310
|
+
return handleTurbopackChunk(code, bundle ?? "", url);
|
|
311
|
+
}
|
|
312
|
+
}).then(resolve).catch(reject);
|
|
313
|
+
});
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
async function handleTurbopackChunk(code, bundle, url) {
|
|
317
|
+
if (code.includes("/next/dist/client/app-next-turbopack.js") && code.includes("importScripts(...self.TURBOPACK_NEXT_CHUNK_URLS")) {
|
|
318
|
+
const preloadLinks = document.querySelectorAll(
|
|
319
|
+
`link[rel="preload"][href="${new URL(url).pathname}"]`
|
|
320
|
+
);
|
|
321
|
+
preloadLinks.forEach((preloadLink) => preloadLink.remove());
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const self = globalThis;
|
|
325
|
+
const bundleKey = getBundleKey(bundle);
|
|
326
|
+
const transformedCode = code.replace(/globalThis\.TURBOPACK/g, `globalThis.TURBOPACK_${bundleKey}`).replace(
|
|
327
|
+
/TURBOPACK_WORKER_LOCATION/g,
|
|
328
|
+
`TURBOPACK_WORKER_LOCATION_${bundleKey}`
|
|
329
|
+
).replace(
|
|
330
|
+
/TURBOPACK_NEXT_CHUNK_URLS/g,
|
|
331
|
+
`TURBOPACK_NEXT_CHUNK_URLS_${bundleKey}`
|
|
332
|
+
).replace(
|
|
333
|
+
/TURBOPACK_CHUNK_UPDATE_LISTENERS/g,
|
|
334
|
+
`TURBOPACK_CHUNK_UPDATE_LISTENERS_${bundleKey}`
|
|
335
|
+
).replace(/__next_require__/g, `__${bundleKey}_next_require__`).replace(
|
|
336
|
+
/\/\/# sourceMappingURL=(?<name>.+)\._\.js\.map/g,
|
|
337
|
+
`//# sourceMappingURL=${new URL(".", new URL(url)).pathname}$1._.js.map`
|
|
338
|
+
);
|
|
339
|
+
await new Promise((scriptResolve, scriptReject) => {
|
|
340
|
+
const blob = new Blob([transformedCode], {
|
|
341
|
+
type: "application/javascript"
|
|
342
|
+
});
|
|
343
|
+
const scriptUrl = URL.createObjectURL(blob);
|
|
344
|
+
const script = document.createElement("script");
|
|
345
|
+
script.src = scriptUrl;
|
|
346
|
+
script.async = true;
|
|
347
|
+
script.onload = () => {
|
|
348
|
+
URL.revokeObjectURL(scriptUrl);
|
|
349
|
+
scriptResolve(void 0);
|
|
350
|
+
};
|
|
351
|
+
script.onerror = (error) => {
|
|
352
|
+
URL.revokeObjectURL(scriptUrl);
|
|
353
|
+
scriptReject(
|
|
354
|
+
new Error(
|
|
355
|
+
`Failed to load script: ${error instanceof Error ? error.message : String(error)}`
|
|
356
|
+
)
|
|
357
|
+
);
|
|
358
|
+
};
|
|
359
|
+
document.head.appendChild(script);
|
|
360
|
+
});
|
|
361
|
+
const chunkLists = self[`TURBOPACK_${bundleKey}_CHUNK_LISTS`];
|
|
362
|
+
const loadChunkLists = [];
|
|
363
|
+
while (chunkLists?.length) {
|
|
364
|
+
const { chunks } = chunkLists.shift() ?? { chunks: [] };
|
|
365
|
+
if (chunks.length > 0) {
|
|
366
|
+
chunks.forEach((id) => {
|
|
367
|
+
const chunkLoadResult = self.__webpack_chunk_load__?.(
|
|
368
|
+
`[${bundle}] ${url.slice(0, url.indexOf("/_next"))}/_next/${id}`
|
|
369
|
+
);
|
|
370
|
+
if (chunkLoadResult) {
|
|
371
|
+
loadChunkLists.push(chunkLoadResult);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
if (loadChunkLists.length > 0) {
|
|
377
|
+
await Promise.all(loadChunkLists);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function createModuleRequire(runtime) {
|
|
381
|
+
return (id) => {
|
|
382
|
+
const self = globalThis;
|
|
383
|
+
try {
|
|
384
|
+
const { bundle, id: moduleId } = id.match(REMOTE_COMPONENT_REGEX)?.groups ?? { bundle: "", id };
|
|
385
|
+
if (runtime === RUNTIME_WEBPACK && bundle && moduleId) {
|
|
386
|
+
return self.__remote_webpack_require__?.[bundle]?.(moduleId);
|
|
387
|
+
}
|
|
388
|
+
const sharedModule = getSharedModule(bundle ?? "default", moduleId ?? id);
|
|
389
|
+
if (sharedModule) {
|
|
390
|
+
return sharedModule;
|
|
391
|
+
}
|
|
392
|
+
if (bundle && moduleId) {
|
|
393
|
+
return handleTurbopackModule(bundle, moduleId, id);
|
|
394
|
+
}
|
|
395
|
+
throw new Error(`Module ${id} not found`);
|
|
396
|
+
} catch {
|
|
397
|
+
return self.__original_webpack_require__?.(id);
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function initializeSharedModules(bundle, shared = {}, remoteShared = {}) {
|
|
402
|
+
const self = globalThis;
|
|
403
|
+
self.__remote_shared_modules__ = self.__remote_shared_modules__ ?? {};
|
|
404
|
+
if (!self.__remote_shared_modules__[bundle]) {
|
|
405
|
+
self.__remote_shared_modules__[bundle] = {};
|
|
406
|
+
}
|
|
407
|
+
return Promise.all(
|
|
408
|
+
Object.entries(remoteShared).map(async ([id, module2]) => {
|
|
409
|
+
if (self.__remote_shared_modules__?.[bundle]) {
|
|
410
|
+
self.__remote_shared_modules__[bundle][id.replace("[app-ssr]", "[app-client]")] = await (shared[module2] ?? (() => {
|
|
411
|
+
console.warn(
|
|
412
|
+
`Shared dependency not found for "${bundle}": ${module2}`
|
|
413
|
+
);
|
|
414
|
+
return Promise.resolve({});
|
|
415
|
+
}))();
|
|
416
|
+
}
|
|
417
|
+
})
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
function getSharedModule(bundle, id) {
|
|
421
|
+
const self = globalThis;
|
|
422
|
+
for (const [key, value] of Object.entries(
|
|
423
|
+
self.__remote_shared_modules__?.[bundle] ?? {}
|
|
424
|
+
)) {
|
|
425
|
+
if (id.includes(key)) {
|
|
426
|
+
return value;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
function handleTurbopackModule(bundle, moduleId, id) {
|
|
432
|
+
const self = globalThis;
|
|
433
|
+
const bundleKey = getBundleKey(bundle);
|
|
434
|
+
const modules = self[`TURBOPACK_${bundleKey}`]?.find((mod) => moduleId in mod[1])?.[1];
|
|
435
|
+
const moduleInit = modules?.[moduleId];
|
|
436
|
+
if (typeof moduleInit !== "function") {
|
|
437
|
+
throw new Error(
|
|
438
|
+
`Module ${id} not found in bundle ${bundle} with id ${moduleId}`
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
const exports = {};
|
|
442
|
+
moduleInit({
|
|
443
|
+
// HMR not implemented for Remote Components
|
|
444
|
+
k: {
|
|
445
|
+
register() {
|
|
446
|
+
},
|
|
447
|
+
registerExports() {
|
|
448
|
+
},
|
|
449
|
+
signature() {
|
|
450
|
+
return () => {
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
s(m) {
|
|
455
|
+
for (const [key, value] of Object.entries(m)) {
|
|
456
|
+
exports[key] = value;
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
i(iid) {
|
|
460
|
+
return self.__webpack_require__?.(`[${bundle}] ${iid}`);
|
|
461
|
+
},
|
|
462
|
+
r(rid) {
|
|
463
|
+
return self.__webpack_require__?.(`[${bundle}] ${rid}`);
|
|
464
|
+
},
|
|
465
|
+
m: {
|
|
466
|
+
exports
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
for (const [key, value] of Object.entries(exports)) {
|
|
470
|
+
if (typeof value === "function") {
|
|
471
|
+
exports[key] = value();
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
return exports;
|
|
475
|
+
}
|
|
476
|
+
var init_webpack_adapter = __esm({
|
|
477
|
+
"src/shared/client/webpack-adapter.ts"() {
|
|
478
|
+
"use strict";
|
|
479
|
+
init_script_loader();
|
|
480
|
+
init_const();
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
// src/html/runtime/turbopack.ts
|
|
485
|
+
var turbopack_exports = {};
|
|
486
|
+
__export(turbopack_exports, {
|
|
487
|
+
turbopackRuntime: () => turbopackRuntime
|
|
488
|
+
});
|
|
489
|
+
async function turbopackRuntime(bundle, shared, remoteShared) {
|
|
490
|
+
const self = globalThis;
|
|
491
|
+
await setupWebpackRuntime(
|
|
492
|
+
"turbopack",
|
|
493
|
+
[],
|
|
494
|
+
bundle,
|
|
495
|
+
self.__remote_component_shared__ ?? shared,
|
|
496
|
+
remoteShared
|
|
497
|
+
);
|
|
498
|
+
const { createFromReadableStream } = await import("react-server-dom-webpack/client.browser");
|
|
499
|
+
function preloadScripts(scripts, __) {
|
|
500
|
+
return setupWebpackRuntime(
|
|
501
|
+
"turbopack",
|
|
502
|
+
scripts.map((script) => ({
|
|
503
|
+
src: script.src || script.getAttribute("data-src")
|
|
504
|
+
})),
|
|
505
|
+
bundle,
|
|
506
|
+
self.__remote_component_shared__ ?? shared,
|
|
507
|
+
remoteShared
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
return {
|
|
511
|
+
self,
|
|
512
|
+
createFromReadableStream,
|
|
513
|
+
applySharedModules,
|
|
514
|
+
nextClientPagesLoader,
|
|
515
|
+
preloadScripts
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
var init_turbopack = __esm({
|
|
519
|
+
"src/html/runtime/turbopack.ts"() {
|
|
520
|
+
"use strict";
|
|
521
|
+
init_shared_modules();
|
|
522
|
+
init_next_client_pages_loader();
|
|
523
|
+
init_webpack_adapter();
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
// src/html/host.tsx
|
|
528
|
+
var import_client = require("react-dom/client");
|
|
529
|
+
|
|
530
|
+
// src/html/runtime/index.ts
|
|
531
|
+
async function getRuntime(type, bundle, shared, remoteShared) {
|
|
532
|
+
if (typeof globalThis.process === "undefined") {
|
|
533
|
+
globalThis.process = {
|
|
534
|
+
env: {}
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
if (type === "webpack") {
|
|
538
|
+
const { webpackRuntime: webpackRuntime2 } = await Promise.resolve().then(() => (init_webpack(), webpack_exports));
|
|
539
|
+
return webpackRuntime2();
|
|
540
|
+
} else if (type === "turbopack") {
|
|
541
|
+
const { turbopackRuntime: turbopackRuntime2 } = await Promise.resolve().then(() => (init_turbopack(), turbopack_exports));
|
|
542
|
+
return turbopackRuntime2(bundle, shared, remoteShared);
|
|
543
|
+
}
|
|
544
|
+
throw new Error(`Runtime ${type} is not supported`);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// src/html/host.tsx
|
|
548
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
549
|
+
if (typeof HTMLElement !== "undefined") {
|
|
550
|
+
class RemoteComponent extends HTMLElement {
|
|
551
|
+
constructor() {
|
|
552
|
+
super();
|
|
553
|
+
this.__next = null;
|
|
554
|
+
this.fouc = null;
|
|
555
|
+
this.isLoading = false;
|
|
556
|
+
this.attachShadow({ mode: "open" });
|
|
557
|
+
this.fallbackSlot = document.createElement("slot");
|
|
558
|
+
this.shadowRoot?.appendChild(this.fallbackSlot);
|
|
559
|
+
this.name = this.getAttribute("name") || "__vercel_remote_component";
|
|
560
|
+
this.bundle = "default";
|
|
561
|
+
if (this.hasAttribute("src") || this.querySelector("div#__REMOTE_COMPONENT__") || this.hasAttribute("data-ssr")) {
|
|
562
|
+
this.load().catch((e) => {
|
|
563
|
+
throw new Error(`Failed to load remote component: ${e}`);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
static get observedAttributes() {
|
|
568
|
+
return ["src"];
|
|
569
|
+
}
|
|
570
|
+
// watch for src attribute changes
|
|
571
|
+
// this is required to reload the remote component when the src attribute is added later
|
|
572
|
+
// this is for rendering the custom element using React
|
|
573
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
574
|
+
if (name === "src" && oldValue !== newValue) {
|
|
575
|
+
this.load().catch((e) => {
|
|
576
|
+
throw new Error(`Failed to load remote component: ${e}`);
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
async load() {
|
|
581
|
+
if (this.isLoading) {
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
this.isLoading = true;
|
|
585
|
+
const src = this.getAttribute("src");
|
|
586
|
+
const remoteComponentChild = this.querySelector(
|
|
587
|
+
"div#__REMOTE_COMPONENT__"
|
|
588
|
+
);
|
|
589
|
+
if (!src && !remoteComponentChild) {
|
|
590
|
+
throw new Error("src attribute is required");
|
|
591
|
+
}
|
|
592
|
+
let url = null;
|
|
593
|
+
let html = this.innerHTML;
|
|
594
|
+
if (!remoteComponentChild && src) {
|
|
595
|
+
url = new URL(src, window.location.href);
|
|
596
|
+
const fetchInit = {
|
|
597
|
+
method: "GET",
|
|
598
|
+
headers: {
|
|
599
|
+
Accept: "text/html",
|
|
600
|
+
// pass the public address of the remote component to the server used for module map mutation
|
|
601
|
+
"Vercel-Remote-Component-Url": url.href
|
|
602
|
+
},
|
|
603
|
+
credentials: "include"
|
|
604
|
+
};
|
|
605
|
+
const res = await fetch(url, fetchInit);
|
|
606
|
+
if (!res.ok) {
|
|
607
|
+
throw new Error(
|
|
608
|
+
`Failed to fetch remote component "${this.name}": ${res.status}`
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
html = await res.text();
|
|
612
|
+
}
|
|
613
|
+
const doc = document.createElement("div");
|
|
614
|
+
doc.innerHTML = html;
|
|
615
|
+
const component = doc.querySelector(`div[data-bundle][data-route][id^="${this.name}"]`) ?? // fallback to the first element with the data-bundle and data-route attributes when not using a named remote component
|
|
616
|
+
doc.querySelector("div[data-bundle][data-route]") ?? // fallback to Next.js Pages Router
|
|
617
|
+
doc.querySelector("div#__next");
|
|
618
|
+
const nextData = JSON.parse(
|
|
619
|
+
(doc.querySelector("#__NEXT_DATA__") ?? doc.querySelector("#__REMOTE_NEXT_DATA__"))?.textContent ?? "null"
|
|
620
|
+
);
|
|
621
|
+
if (nextData && nextData.buildId === "development") {
|
|
622
|
+
this.fouc = document.createElement("style");
|
|
623
|
+
this.fouc.textContent = `:host { display: none; }`;
|
|
624
|
+
this.shadowRoot?.appendChild(this.fouc);
|
|
625
|
+
}
|
|
626
|
+
this.name = component?.getAttribute("id")?.replace(/_ssr$/, "") || (nextData ? "__next" : this.name);
|
|
627
|
+
const rsc = doc.querySelector(`#${this.name}_rsc`);
|
|
628
|
+
this.bundle = component?.getAttribute("data-bundle") || nextData?.props.__REMOTE_COMPONENT__?.bundle || this.bundle;
|
|
629
|
+
const metadata = document.createElement("script");
|
|
630
|
+
metadata.type = "application/json";
|
|
631
|
+
metadata.setAttribute("data-remote-component", "");
|
|
632
|
+
metadata.textContent = JSON.stringify({
|
|
633
|
+
name: this.name,
|
|
634
|
+
bundle: this.bundle,
|
|
635
|
+
route: component?.getAttribute("data-route") ?? nextData?.page ?? "/",
|
|
636
|
+
runtime: component?.getAttribute("data-runtime") ?? nextData?.props.__REMOTE_COMPONENT__?.runtime
|
|
637
|
+
});
|
|
638
|
+
this.parentNode?.insertBefore(metadata, this);
|
|
639
|
+
const remoteSharedEl = doc.querySelector(`#${this.name}_shared`);
|
|
640
|
+
const remoteShared = JSON.parse(remoteSharedEl?.textContent ?? "{}") ?? {};
|
|
641
|
+
remoteSharedEl?.parentElement?.removeChild(remoteSharedEl);
|
|
642
|
+
if (!component || !(rsc || nextData)) {
|
|
643
|
+
throw new Error(`Failed to find component with id "${this.name}"`);
|
|
644
|
+
}
|
|
645
|
+
const removeable = Array.from(this.childNodes);
|
|
646
|
+
const links = doc.querySelectorAll("link[href]");
|
|
647
|
+
await Promise.all(
|
|
648
|
+
Array.from(links).map((link) => {
|
|
649
|
+
return new Promise((resolve, reject) => {
|
|
650
|
+
const newLink = document.createElement("link");
|
|
651
|
+
newLink.onload = () => {
|
|
652
|
+
resolve();
|
|
653
|
+
};
|
|
654
|
+
newLink.onerror = () => {
|
|
655
|
+
reject(
|
|
656
|
+
new Error(
|
|
657
|
+
`Failed to load link ${link.href} for remote component`
|
|
658
|
+
)
|
|
659
|
+
);
|
|
660
|
+
};
|
|
661
|
+
for (const attr of link.attributes) {
|
|
662
|
+
newLink.setAttribute(attr.name, attr.value);
|
|
663
|
+
}
|
|
664
|
+
this.shadowRoot?.appendChild(newLink);
|
|
665
|
+
});
|
|
666
|
+
})
|
|
667
|
+
);
|
|
668
|
+
Array.from(component.children).forEach((el) => {
|
|
669
|
+
this.shadowRoot?.appendChild(el);
|
|
670
|
+
});
|
|
671
|
+
for (const el of removeable) {
|
|
672
|
+
el.parentElement?.removeChild(el);
|
|
673
|
+
}
|
|
674
|
+
this.shadowRoot?.removeChild(this.fallbackSlot);
|
|
675
|
+
const {
|
|
676
|
+
self,
|
|
677
|
+
createFromReadableStream,
|
|
678
|
+
nextClientPagesLoader: nextClientPagesLoader2,
|
|
679
|
+
preloadScripts
|
|
680
|
+
} = await getRuntime(
|
|
681
|
+
component.getAttribute("data-runtime") ?? "webpack",
|
|
682
|
+
this.bundle,
|
|
683
|
+
{
|
|
684
|
+
react: () => import("react"),
|
|
685
|
+
"react/jsx-dev-runtime": () => import("react/jsx-dev-runtime"),
|
|
686
|
+
"react/jsx-runtime": () => import("react/jsx-runtime"),
|
|
687
|
+
"react-dom": () => import("react-dom"),
|
|
688
|
+
"react-dom/client": () => import("react-dom/client")
|
|
689
|
+
},
|
|
690
|
+
remoteShared
|
|
691
|
+
);
|
|
692
|
+
const scripts = doc.querySelectorAll(
|
|
693
|
+
"script[src],script[data-src]"
|
|
694
|
+
);
|
|
695
|
+
if (!url) {
|
|
696
|
+
url = new URL(
|
|
697
|
+
component.getAttribute("data-route") ?? "/",
|
|
698
|
+
window.location.href
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
await preloadScripts(Array.from(scripts), url, this.bundle, this.name);
|
|
702
|
+
if (rsc) {
|
|
703
|
+
rsc.parentElement?.removeChild(rsc);
|
|
704
|
+
const rscClone = document.createElement("script");
|
|
705
|
+
rscClone.id = `${this.name}_rsc`;
|
|
706
|
+
rscClone.textContent = rsc.textContent;
|
|
707
|
+
document.body.appendChild(rscClone);
|
|
708
|
+
let cache;
|
|
709
|
+
const RemoteComponentFromReadableStream = ({
|
|
710
|
+
name
|
|
711
|
+
}) => {
|
|
712
|
+
const Component = cache ?? // cache the component to avoid reloading the RSC flight data
|
|
713
|
+
(cache = createFromReadableStream(
|
|
714
|
+
// convert the RSC flight data array into a ReadableStream
|
|
715
|
+
new ReadableStream({
|
|
716
|
+
type: "bytes",
|
|
717
|
+
start(controller) {
|
|
718
|
+
const encoder = new TextEncoder();
|
|
719
|
+
(self[name] ?? [`0:[null]
|
|
720
|
+
`]).forEach((chunk) => {
|
|
721
|
+
controller.enqueue(encoder.encode(chunk));
|
|
722
|
+
});
|
|
723
|
+
controller.close();
|
|
724
|
+
}
|
|
725
|
+
})
|
|
726
|
+
));
|
|
727
|
+
return Component;
|
|
728
|
+
};
|
|
729
|
+
(0, import_client.hydrateRoot)(
|
|
730
|
+
// hydrateRoot expects a document or element, but it works for the shadow DOM too
|
|
731
|
+
// @ts-expect-error support for shadow DOM
|
|
732
|
+
this.shadowRoot,
|
|
733
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RemoteComponentFromReadableStream, { name: this.name })
|
|
734
|
+
);
|
|
735
|
+
} else if (nextData) {
|
|
736
|
+
const { Component, App } = nextClientPagesLoader2(
|
|
737
|
+
this.bundle,
|
|
738
|
+
nextData.page,
|
|
739
|
+
this.shadowRoot
|
|
740
|
+
);
|
|
741
|
+
if (Component) {
|
|
742
|
+
(0, import_client.hydrateRoot)(
|
|
743
|
+
// hydrateRoot expects a document or element, but it works for the shadow DOM too
|
|
744
|
+
// @ts-expect-error support for shadow DOM
|
|
745
|
+
this.shadowRoot,
|
|
746
|
+
App ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, { Component, ...nextData.props }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...nextData.props })
|
|
747
|
+
);
|
|
748
|
+
}
|
|
749
|
+
if (this.fouc) {
|
|
750
|
+
this.shadowRoot?.removeChild(this.fouc);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
this.isLoading = false;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
customElements.define("remote-component", RemoteComponent);
|
|
757
|
+
}
|
|
758
|
+
//# sourceMappingURL=host.cjs.map
|