ArcGIS = {
const imports = await Promise.all(
[
{ path: "/config" },
{ path: "/Map" },
{ path: "/views/MapView" },
{ path: "/views/SceneView" },
{ path: "/Graphic" },
{ path: "/core/reactiveUtils", def: false },
{ path: "/core/promiseUtils", def: false }
].map((d) => getImport(d))
);
const importNames = [
"Config",
"Map",
"MapView",
"SceneView",
"Graphic",
"reactiveUtils",
"promiseUtils"
];
const ArcGIS = Object.fromEntries(imports.map((d, i) => [importNames[i], d]));
const { Config } = ArcGIS;
Config.apiKey = JS_API_KEY;
if (!Config._style) {
const href = await require.resolve(
`${JS_API_BASE_URL}/assets/esri/themes/light/main.css`
);
document.head.appendChild(
(Config._style = html`<link href=${href} rel=stylesheet>`)
);
}
return ArcGIS;
}