@arcgis/lumina-compiler 5.2.0-next.90 → 5.2.0-next.93

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/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- import { externalizeDependencies as vs } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
1
+ import { externalizeDependencies as ys } from "@arcgis/node-toolkit/vite/externalizeDependenciesPlugin";
2
2
  import { isNotUndefined as R } from "@arcgis/toolkit/predicate";
3
3
  import { f as b, l as T } from "./logger-edpIalAo.js";
4
4
  import o from "typescript";
5
- import { camelToKebab as ei, getPreamble as bs, uncapitalize as wt, capitalize as ws } from "@arcgis/toolkit/string";
6
- import { lazyMetaSubItemJoiner as Ss, lazyMetaItemJoiner as Be, lazyMetaGroupJoiner as Cs, propertyFlagAttribute as St, propertyFlagReflect as Es, propertyFlagBoolean as Ts, propertyFlagNumber as $s, propertyFlagState as Ps, propertyFlagReadOnly as ks, propertyFlagNoAccessor as Is, propertyFlagUseDefault as xs } from "@arcgis/lumina/config";
7
- import { path as u, isPosix as ti, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ii } from "@arcgis/node-toolkit/path";
8
- import { isApiMethodAsync as As, globalPackageIdentifier as Ls, isApiMethod as Ns, isApiProperty as js } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as _, findPath as si } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as ot, mkdir as X, writeFile as K, copyFile as Fs, rm as Rs, cp as Ds } from "node:fs/promises";
11
- import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ri } from "@arcgis/node-toolkit/packageJson";
12
- import { build as Os } from "esbuild";
13
- import Ms from "mime-types";
14
- import { forEachWithConcurrency as Js } from "@arcgis/toolkit/promise";
15
- import { glob as Bs } from "tinyglobby";
16
- import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
- import { useApiExtractor as _s } from "@arcgis/api-extractor/vite/plugin";
18
- import { writeFileSync as ni } from "node:fs";
19
- import { styleText as Ks } from "node:util";
20
- import { unsafeGetUndocumentedPrinter as Ws, unsafeUndocumentedTs as Ct } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
5
+ import { camelToKebab as Zt, getPreamble as vs, uncapitalize as bt, capitalize as bs } from "@arcgis/toolkit/string";
6
+ import { lazyMetaSubItemJoiner as ws, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Ss, propertyFlagAttribute as wt, propertyFlagReflect as Cs, propertyFlagBoolean as Es, propertyFlagNumber as Ts, propertyFlagState as $s, propertyFlagReadOnly as Ps, propertyFlagNoAccessor as ks, propertyFlagUseDefault as Is } from "@arcgis/lumina/config";
7
+ import { path as u, isPosix as ei, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as ti } from "@arcgis/node-toolkit/path";
8
+ import { isApiMethodAsync as As, globalPackageIdentifier as xs, isApiMethod as Ls, isApiProperty as Ns } from "@arcgis/api-extractor/utils/apiHelpers";
9
+ import { existsAsync as _, findPath as ii } from "@arcgis/node-toolkit/file";
10
+ import { readFile as z, readdir as nt, mkdir as X, writeFile as K, copyFile as js, rm as Fs, cp as Rs } from "node:fs/promises";
11
+ import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as si } from "@arcgis/node-toolkit/packageJson";
12
+ import { build as Ds } from "esbuild";
13
+ import Os from "mime-types";
14
+ import { forEachWithConcurrency as Ms } from "@arcgis/toolkit/promise";
15
+ import { glob as Js } from "tinyglobby";
16
+ import { renameComponentFolder as Ve } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
17
+ import { useApiExtractor as Bs } from "@arcgis/api-extractor/vite/plugin";
18
+ import { writeFileSync as ri } from "node:fs";
19
+ import { styleText as _s } from "node:util";
20
+ import { unsafeGetUndocumentedPrinter as Ks, unsafeUndocumentedTs as St } from "@arcgis/api-extractor/utils/internalTypeScriptApis";
21
21
  import { pathIsComponentEntrypoint as Pe } from "@arcgis/api-extractor/extractor/webComponent/findComponents";
22
- import { loadApiExtractorConfig as Us, mergeApiExtractorConfigs as Et } from "@arcgis/api-extractor/extractor/config";
23
- import { loadTypeScriptConfig as zs } from "@arcgis/api-extractor/vite/typeScript";
24
- import { mappedFind as Xe } from "@arcgis/toolkit/array";
25
- import { isPropertyEscapeNeeded as oi, maybeEscapePropertyName as Hs } from "@arcgis/api-extractor/utils/partPrinter";
26
- import { getPackageNameFromExternalSpecifier as qs, getMemberName as ai } from "@arcgis/api-extractor/utils/astHelpers";
27
- import { identity as ci } from "@arcgis/toolkit/function";
28
- function Vs(e) {
29
- const t = e.options?.build?.dependencies ?? {}, i = vs({
22
+ import { loadApiExtractorConfig as Ws, mergeApiExtractorConfigs as Ct } from "@arcgis/api-extractor/extractor/config";
23
+ import { loadTypeScriptConfig as Us } from "@arcgis/node-toolkit/vite/typeScript";
24
+ import { mappedFind as Ge } from "@arcgis/toolkit/array";
25
+ import { isPropertyEscapeNeeded as ni, maybeEscapePropertyName as zs } from "@arcgis/api-extractor/utils/partPrinter";
26
+ import { getPackageNameFromExternalSpecifier as Hs, getMemberName as oi } from "@arcgis/api-extractor/utils/astHelpers";
27
+ import { identity as ai } from "@arcgis/toolkit/function";
28
+ function qs(e) {
29
+ const t = e.options?.build?.dependencies ?? {}, i = ys({
30
30
  bundleIn: t.bundleIn,
31
31
  externalize: [
32
32
  // TODO: remove these once Lit is declared as a peer dependency
@@ -42,7 +42,7 @@ function Vs(e) {
42
42
  e.isInStorybook && (i.resolveId = void 0);
43
43
  }, i;
44
44
  }
45
- const Gs = "Fragment", _e = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), li = /* @__PURE__ */ new Set([
45
+ const Vs = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Xe = /* @__PURE__ */ Symbol("dynamic svg tag name"), ci = /* @__PURE__ */ new Set([
46
46
  /**
47
47
  * There is a "className" property. However, in JSX typings we use "class"
48
48
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -74,7 +74,7 @@ const Gs = "Fragment", _e = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
74
74
  "vocab",
75
75
  // These don't exist as a property, only as an attribute
76
76
  "exportParts"
77
- ]), di = /* @__PURE__ */ new Set([
77
+ ]), li = /* @__PURE__ */ new Set([
78
78
  /*
79
79
  * From https://github.com/preactjs/preact/blob/f3edc902447dae7393de7fccaff3b722dee79467/src/diff/props.js#L107-L118
80
80
  * See also https://github.com/facebook/react/blob/8fd963a1e5ec89459cac27fb1d9ad193a0604110/packages/react-dom-bindings/src/client/ReactDOMComponent.js#L389
@@ -92,7 +92,7 @@ const Gs = "Fragment", _e = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
92
92
  // These don't exist as a property, only as an attribute
93
93
  "hreflang",
94
94
  "media"
95
- ]), Qe = {
95
+ ]), Ye = {
96
96
  button: /* @__PURE__ */ new Set(["popoverTarget"]),
97
97
  input: /* @__PURE__ */ new Set(["list", "capture"]),
98
98
  iframe: /* @__PURE__ */ new Set(["sandbox"]),
@@ -913,9 +913,9 @@ const Gs = "Fragment", _e = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__P
913
913
  }
914
914
  }
915
915
  };
916
- pi(W.common);
917
- Object.values(W.perElement).forEach(pi);
918
- function pi(e) {
916
+ di(W.common);
917
+ Object.values(W.perElement).forEach(di);
918
+ function di(e) {
919
919
  e?.reflected !== void 0 && (e.reflected = Object.assign(/* @__PURE__ */ Object.create(null), e.reflected)), e?.stringifiedReflected !== void 0 && (e.stringifiedReflected = Object.assign(
920
920
  /* @__PURE__ */ Object.create(null),
921
921
  e.stringifiedReflected
@@ -924,7 +924,7 @@ function pi(e) {
924
924
  e.stringifiedNonReflected
925
925
  ));
926
926
  }
927
- const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set([
927
+ const Et = /* @__PURE__ */ new Set(["itemScope"]), pi = /* @__PURE__ */ new Set([
928
928
  "abort",
929
929
  "animationCancel",
930
930
  "animationEnd",
@@ -1023,7 +1023,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1023
1023
  "volumeChange",
1024
1024
  "waiting",
1025
1025
  "wheel"
1026
- ]), Xs = /* @__PURE__ */ new Set([
1026
+ ]), Gs = /* @__PURE__ */ new Set([
1027
1027
  "area",
1028
1028
  "base",
1029
1029
  "br",
@@ -1040,7 +1040,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1040
1040
  "source",
1041
1041
  "track",
1042
1042
  "wbr"
1043
- ]), at = /* @__PURE__ */ new Set([
1043
+ ]), ot = /* @__PURE__ */ new Set([
1044
1044
  "animate",
1045
1045
  "animateMotion",
1046
1046
  "animateTransform",
@@ -1099,7 +1099,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1099
1099
  "tspan",
1100
1100
  "use",
1101
1101
  "view"
1102
- ]), Ys = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), ct = /* @__PURE__ */ new Set([
1102
+ ]), Xs = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), at = /* @__PURE__ */ new Set([
1103
1103
  "annotation-xml",
1104
1104
  "annotation",
1105
1105
  "maction",
@@ -1131,7 +1131,7 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1131
1131
  "munder",
1132
1132
  "munderover",
1133
1133
  "semantics"
1134
- ]), Qs = /* @__PURE__ */ new Set([
1134
+ ]), Ys = /* @__PURE__ */ new Set([
1135
1135
  "annotation-xml",
1136
1136
  "color-profile",
1137
1137
  "font-face",
@@ -1141,24 +1141,24 @@ const Tt = /* @__PURE__ */ new Set(["itemScope"]), ui = /* @__PURE__ */ new Set(
1141
1141
  "font-face-name",
1142
1142
  "missing-glyph"
1143
1143
  ]);
1144
- function Zs(e) {
1144
+ function Qs(e) {
1145
1145
  if (e.length === 0)
1146
1146
  return "";
1147
1147
  const t = e[0];
1148
1148
  if (e.includes(`
1149
1149
  `)) {
1150
- const r = t === `
1151
- `, n = e.lastIndexOf(`
1152
- `), l = e.slice(n + 1).trim().length === 0, d = r ? e.trimStart() : e;
1150
+ const n = t === `
1151
+ `, r = e.lastIndexOf(`
1152
+ `), l = e.slice(r + 1).trim().length === 0, d = n ? e.trimStart() : e;
1153
1153
  return l ? d.trimEnd() : d;
1154
1154
  }
1155
1155
  return e.trim().length === 0 ? t : e;
1156
1156
  }
1157
- const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`", "\\`"), tr = /\$\{/gu, ir = (e) => !sr.test(e), sr = /^[^\s"'=<>`]+$/u, rr = /[&<>]/gu, nr = {
1157
+ const Zs = (e) => e.replaceAll("\\", "\\\\").replace(er, "\\${").replaceAll("`", "\\`"), er = /\$\{/gu, tr = (e) => !ir.test(e), ir = /^[^\s"'=<>`]+$/u, sr = /[&<>]/gu, rr = {
1158
1158
  "&": "&amp;",
1159
1159
  "<": "&lt;",
1160
1160
  ">": "&gt;"
1161
- }, mi = (e) => e.replace(rr, (t) => nr[t]), lt = (e) => typeof e == "string" && e.includes("-") && !Qs.has(e), or = ["keyed", "ref", "repeat", "live"], oe = "staticHtml", Y = "staticSvg", ae = "html", ie = "svg", fi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), gi = "css", hi = "mathml", yi = [gi, ae, hi, oe, Y, ie], ar = new Set(yi), cr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], lr = "nothing", dr = [...or, ...yi, ...cr, lr], pr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), se = {
1161
+ }, ui = (e) => e.replace(sr, (t) => rr[t]), ct = (e) => typeof e == "string" && e.includes("-") && !Ys.has(e), nr = ["keyed", "ref", "repeat", "live"], oe = "staticHtml", Y = "staticSvg", ae = "html", ie = "svg", mi = /* @__PURE__ */ Symbol("maybe HTML namespace or maybe SVG"), fi = "css", gi = "mathml", hi = [fi, ae, gi, oe, Y, ie], or = new Set(hi), ar = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], cr = "nothing", lr = [...nr, ...hi, ...ar, cr], dr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => fe(t)), fe = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), se = {
1162
1162
  [ae]: ["lit", "lit/html.js", "lit-html"],
1163
1163
  /**
1164
1164
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
@@ -1169,8 +1169,8 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1169
1169
  [oe]: ["lit/static-html.js", "lit-html/static.js"],
1170
1170
  [ie]: ["lit", "lit-html", "lit/html.js"],
1171
1171
  [Y]: ["lit/static-html.js", "lit-html/static.js"],
1172
- [hi]: ["lit", "lit-html", "lit/html.js"],
1173
- [gi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1172
+ [gi]: ["lit", "lit-html", "lit/html.js"],
1173
+ [fi]: ["lit", "@lit/reactive-element/css-tag.js", "@lit/reactive-element"],
1174
1174
  safeClassMap: ["@arcgis/lumina"],
1175
1175
  safeStyleMap: ["@arcgis/lumina"],
1176
1176
  deferLoad: ["@arcgis/lumina"],
@@ -1180,7 +1180,7 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1180
1180
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1181
1181
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1182
1182
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1183
- }, ur = /* @__PURE__ */ new Set([
1183
+ }, pr = /* @__PURE__ */ new Set([
1184
1184
  "h",
1185
1185
  "Fragment",
1186
1186
  "state",
@@ -1190,11 +1190,11 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1190
1190
  "bindProperty",
1191
1191
  "bindEvent",
1192
1192
  "bindAttribute"
1193
- ]), mr = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, le = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Ze = "?globalFileLitCss", fr = (e) => ({
1193
+ ]), ur = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, le = "@arcgis/lumina:loadLitCss", Ie = "?litCss", Q = "?layeredLitCss", Qe = "?globalFileLitCss", mr = (e) => ({
1194
1194
  name: le,
1195
1195
  enforce: "pre",
1196
1196
  configResolved(t) {
1197
- const i = t.plugins.find(({ name: n }) => n === "vite:css-post");
1197
+ const i = t.plugins.find(({ name: r }) => r === "vite:css-post");
1198
1198
  if (i === void 0)
1199
1199
  throw Error(
1200
1200
  b(
@@ -1210,34 +1210,34 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1210
1210
  "Expected vite:css-post to declare a transform:{handler()} property. This may indicate you are trying to use Vite 6 with Lumina version that is designed for Vite 7. Use `[p]npm list vite`/`yarn why vite` to check the Vite version you are using."
1211
1211
  )
1212
1212
  );
1213
- const r = Object.keys(s).filter((n) => n !== "filter");
1214
- if (r.length !== 1)
1213
+ const n = Object.keys(s).filter((r) => r !== "filter");
1214
+ if (n.length !== 1)
1215
1215
  throw Error(
1216
1216
  b(
1217
1217
  le,
1218
- `Expected vite:css-post's transform handler to have only a single property: handler. Found: ${r.join(",")}. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use \`[p]npm list vite\`/\`yarn why vite\` to check the Vite version you are using.`
1218
+ `Expected vite:css-post's transform handler to have only a single property: handler. Found: ${n.join(",")}. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use \`[p]npm list vite\`/\`yarn why vite\` to check the Vite version you are using.`
1219
1219
  )
1220
1220
  );
1221
1221
  i.transform = {
1222
1222
  ...s,
1223
1223
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1224
- async handler(n, a) {
1224
+ async handler(r, a) {
1225
1225
  const l = a.endsWith(Ie);
1226
1226
  l && (a = a.slice(0, -Ie.length));
1227
1227
  const d = a.endsWith(Q);
1228
1228
  d && (a = a.slice(0, -Q.length));
1229
- const c = a.endsWith(Ze);
1230
- if (c && (a = a.slice(0, -Ze.length)), !l && !d && !c)
1231
- return await s.handler.call(this, n, a);
1232
- const p = `${a}?inline`, m = await s.handler.call(this, n, p), { code: f, ...g } = typeof m == "string" ? { code: m } : m ?? {};
1233
- return typeof f != "string" || !f.startsWith(vi) || !f.endsWith(gr) ? (T.warn(
1229
+ const c = a.endsWith(Qe);
1230
+ if (c && (a = a.slice(0, -Qe.length)), !l && !d && !c)
1231
+ return await s.handler.call(this, r, a);
1232
+ const p = `${a}?inline`, m = await s.handler.call(this, r, p), { code: f, ...g } = typeof m == "string" ? { code: m } : m ?? {};
1233
+ return typeof f != "string" || !f.startsWith(yi) || !f.endsWith(fr) ? (T.warn(
1234
1234
  le,
1235
1235
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1236
1236
  f
1237
1237
  )}`
1238
- ), m) : c ? (e._globalCssString = bi(f), { code: "", map: { mappings: "" } }) : {
1238
+ ), m) : c ? (e._globalCssString = vi(f), { code: "", map: { mappings: "" } }) : {
1239
1239
  ...g,
1240
- code: br(f, e.hmrEnabled, e.shouldMinify, d),
1240
+ code: vr(f, e.hmrEnabled, e.shouldMinify, d),
1241
1241
  /**
1242
1242
  * Vite's original transform does not generate source maps for inlined
1243
1243
  * css, thus we can't either
@@ -1247,8 +1247,8 @@ const er = (e) => e.replaceAll("\\", "\\\\").replace(tr, "\\${").replaceAll("`",
1247
1247
  }
1248
1248
  };
1249
1249
  }
1250
- }), vi = 'export default "', gr = '"', hr = `import { css } from '${se.css[0]}';
1251
- export const styles = css\``, yr = "`;\nexport default styles;", vr = `
1250
+ }), yi = 'export default "', fr = '"', gr = `import { css } from '${se.css[0]}';
1251
+ export const styles = css\``, hr = "`;\nexport default styles;", yr = `
1252
1252
 
1253
1253
  if(import.meta.hot) {
1254
1254
  import.meta.hot.data.styles ??= styles;
@@ -1259,24 +1259,24 @@ if(import.meta.hot) {
1259
1259
  }
1260
1260
  import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
1261
1261
  });
1262
- }`, bi = (e) => e.slice(vi.length - 1);
1263
- function br(e, t, i, s) {
1264
- const r = bi(e), n = JSON.parse(r), a = er(n), l = s ? `@layer{${i ? "" : `
1262
+ }`, vi = (e) => e.slice(yi.length - 1);
1263
+ function vr(e, t, i, s) {
1264
+ const n = vi(e), r = JSON.parse(n), a = Zs(r), l = s ? `@layer{${i ? "" : `
1265
1265
  `}${a}${i ? "" : `
1266
1266
  `}}` : a;
1267
- return `${hr}${l}${yr}${t ? vr : ""}`;
1267
+ return `${gr}${l}${hr}${t ? yr : ""}`;
1268
1268
  }
1269
- function wr(e) {
1270
- return `import("${Sr}").then(({ setCustomElementsManifest }) => {
1271
- setCustomElementsManifest(${Cr(e)});
1269
+ function br(e) {
1270
+ return `import("${wr}").then(({ setCustomElementsManifest }) => {
1271
+ setCustomElementsManifest(${Sr(e)});
1272
1272
  });`;
1273
1273
  }
1274
- const Sr = "@storybook/web-components-vite", Cr = (e) => `JSON.parse(\`${Er(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
- function Er(e) {
1274
+ const wr = "@storybook/web-components-vite", Sr = (e) => `JSON.parse(\`${Cr(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
1275
+ function Cr(e) {
1276
1276
  return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
1277
1277
  }
1278
- function Tr(e) {
1279
- $r(e);
1278
+ function Er(e) {
1279
+ Tr(e);
1280
1280
  const t = e.options.css?.globalStylesPath;
1281
1281
  if (t === void 0)
1282
1282
  return "";
@@ -1284,21 +1284,21 @@ function Tr(e) {
1284
1284
  return e.viteCommand === "serve" || e.isInStorybook ? [
1285
1285
  `import globalStyles from "${i}${Q}";`,
1286
1286
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
1287
- Si("", e)
1287
+ wi("", e)
1288
1288
  ].join(`
1289
- `) : `import "${i}${Ze}";`;
1289
+ `) : `import "${i}${Qe}";`;
1290
1290
  }
1291
- const wi = "hydrated";
1292
- function $r(e) {
1291
+ const bi = "hydrated";
1292
+ function Tr(e) {
1293
1293
  e._globalHydratedCssString = [
1294
1294
  ":not([",
1295
- e.options.css?.hydratedAttribute ?? wi,
1295
+ e.options.css?.hydratedAttribute ?? bi,
1296
1296
  "]):is(",
1297
1297
  e.apiJsonComponents.map((t) => t.tagName).join(","),
1298
1298
  "){visibility:hidden}"
1299
1299
  ].join("");
1300
1300
  }
1301
- function Si(e, t) {
1301
+ function wi(e, t) {
1302
1302
  return [
1303
1303
  "const globalCss = new CSSStyleSheet;",
1304
1304
  `globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e ? e.slice(1, -1) : ""}`}}");`,
@@ -1306,101 +1306,101 @@ function Si(e, t) {
1306
1306
  ].join(`
1307
1307
  `);
1308
1308
  }
1309
- const Pr = (e) => `@layer{${e.shouldMinify ? "" : `
1309
+ const $r = (e) => `@layer{${e.shouldMinify ? "" : `
1310
1310
  `}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
1311
1311
 
1312
1312
  `}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
1313
1313
  `}}`;
1314
- function kr(e) {
1314
+ function Pr(e) {
1315
1315
  const t = [], i = [];
1316
1316
  for (const s of e.privateApiJson.modules)
1317
- for (const r of s.declarations)
1318
- r.customElement === !0 && (i.push(Ir(r, e, s.sourcePath)), t.push(s.sourcePath));
1317
+ for (const n of s.declarations)
1318
+ n.customElement === !0 && (i.push(kr(n, e, s.sourcePath)), t.push(s.sourcePath));
1319
1319
  return [
1320
1320
  'import { runtime } from "./runtime.ts";',
1321
1321
  'import { makeDefineCustomElements } from "@arcgis/lumina";',
1322
- Tr(e),
1322
+ Er(e),
1323
1323
  e.hmrEnabled ? Ar : "",
1324
1324
  "",
1325
- e.isInStorybook ? wr(e.apiJson) : "",
1325
+ e.isInStorybook ? br(e.apiJson) : "",
1326
1326
  "",
1327
1327
  "export const defineCustomElements = makeDefineCustomElements(runtime, {",
1328
1328
  i.join(`,
1329
1329
  `),
1330
1330
  "});",
1331
- e.hmrEnabled ? Lr(t) : ""
1331
+ e.hmrEnabled ? xr(t) : ""
1332
1332
  ].join(`
1333
1333
  `);
1334
1334
  }
1335
- const Ir = (e, t, i) => [
1335
+ const kr = (e, t, i) => [
1336
1336
  ` "${e.tagName}": [`,
1337
1337
  `()=>import("${u.join(t.dir.root, i)}"),`,
1338
- xr(e),
1338
+ Ir(e),
1339
1339
  "]"
1340
1340
  ].join("");
1341
- function xr(e) {
1342
- const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: r } = Ci(e), n = t.map((g) => g.join(Ss)).join(Be), a = i.join(Be), l = s.join(Be), d = [n, a, l], c = d.findLastIndex((g) => g.length > 0), p = d.slice(0, c + 1);
1343
- return `${p.length > 0 || r ? `"${p.join(Cs)}"` : ""}${r ? ",1" : ""}`;
1341
+ function Ir(e) {
1342
+ const { properties: t, asyncMethods: i, syncMethods: s, formAssociated: n } = Si(e), r = t.map((g) => g.join(ws)).join(Je), a = i.join(Je), l = s.join(Je), d = [r, a, l], c = d.findLastIndex((g) => g.length > 0), p = d.slice(0, c + 1);
1343
+ return `${p.length > 0 || n ? `"${p.join(Ss)}"` : ""}${n ? ",1" : ""}`;
1344
1344
  }
1345
- function Ci(e) {
1345
+ function Si(e) {
1346
1346
  const t = [], i = [], s = [];
1347
- for (let n = 0; n < e.members.length; ++n) {
1348
- const a = e.members[n];
1347
+ for (let r = 0; r < e.members.length; ++r) {
1348
+ const a = e.members[r];
1349
1349
  if (a.kind === "field") {
1350
- const l = typeof a.attribute == "string", d = l && a.attribute !== ei(a.name);
1350
+ const l = typeof a.attribute == "string", d = l && a.attribute !== Zt(a.name);
1351
1351
  t.push(
1352
1352
  l && !d ? [a.name] : [a.name, d ? String(a.attribute) : ""]
1353
1353
  );
1354
1354
  } else a.kind === "method" && a.name !== "componentOnReady" && (As(a) ? i.push(a.name) : s.push(a.name));
1355
1355
  }
1356
- const r = e.formAssociated === !0;
1357
- return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: r };
1356
+ const n = e.formAssociated === !0;
1357
+ return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s, formAssociated: n };
1358
1358
  }
1359
1359
  const Ar = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
1360
- `, Lr = (e) => `
1360
+ `, xr = (e) => `
1361
1361
  if(import.meta.hot) {
1362
1362
  import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
1363
1363
  import.meta.hot.accept([
1364
1364
  ${e.map((t) => ` "/${t}",`).join(`
1365
1365
  `)}
1366
1366
  ], handleHmrUpdate);
1367
- }`, Nr = "@arcgis/lumina-compiler", Ei = {
1368
- name: Nr
1367
+ }`, Lr = "@arcgis/lumina-compiler", Ci = {
1368
+ name: Lr
1369
1369
  };
1370
- async function Ti(e, t) {
1371
- return re ??= Fr(e, t), await re;
1370
+ async function Ei(e, t) {
1371
+ return re ??= jr(e, t), await re;
1372
1372
  }
1373
- function jr() {
1374
- if (xe === void 0)
1373
+ function Nr() {
1374
+ if (Ae === void 0)
1375
1375
  throw Error(
1376
1376
  b(
1377
1377
  "@arcgis/lumina:retrieveComponentDependencies",
1378
1378
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
1379
1379
  )
1380
1380
  );
1381
- return xe;
1381
+ return Ae;
1382
1382
  }
1383
- function $i() {
1384
- if (et === void 0)
1383
+ function Ti() {
1384
+ if (Ze === void 0)
1385
1385
  throw Error(
1386
1386
  b(
1387
1387
  "@arcgis/lumina:retrieveFlatComponentDependencies",
1388
1388
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
1389
1389
  )
1390
1390
  );
1391
- return et;
1391
+ return Ze;
1392
1392
  }
1393
- async function Fr(e, t) {
1394
- const i = j(e), s = i.dependencies ?? {}, r = i.peerDependencies ?? {}, a = (await Promise.all(
1395
- [...Object.keys(s), ...Object.keys(r)].filter((c) => !Rr.has(c)).flatMap(async (c) => await Pi(c, e))
1393
+ async function jr(e, t) {
1394
+ const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
1395
+ [...Object.keys(s), ...Object.keys(n)].filter((c) => !Fr.has(c)).flatMap(async (c) => await $i(c, e))
1396
1396
  )).filter(R);
1397
- xe ??= a, et = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1397
+ Ae ??= a, Ze = Object.fromEntries(a.flatMap((c) => Object.entries(c.components)));
1398
1398
  const l = t?.serve?.extraDependencies?.map(
1399
1399
  (c) => typeof c == "string" ? c : c.name
1400
1400
  ), d = l === void 0 ? a : a.filter((c) => !l.includes(c.packageName));
1401
- return xe ??= d, d;
1401
+ return Ae ??= d, d;
1402
1402
  }
1403
- const Rr = /* @__PURE__ */ new Set([
1403
+ const Fr = /* @__PURE__ */ new Set([
1404
1404
  "@arcgis/arcade-languageservice",
1405
1405
  "@arcgis/node-toolkit",
1406
1406
  "@arcgis/toolkit",
@@ -1439,63 +1439,63 @@ const Rr = /* @__PURE__ */ new Set([
1439
1439
  "vscode-languageserver-textdocument",
1440
1440
  "vscode-languageserver-types"
1441
1441
  ]);
1442
- let xe, et, re;
1443
- async function Pi(e, t) {
1444
- const i = await $e(e, t), s = await ri(i), r = "exports" in s, n = Hr.bind(void 0, r), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1442
+ let Ae, Ze, re;
1443
+ async function $i(e, t) {
1444
+ const i = await $e(e, t), s = await si(i), n = "exports" in s, r = zr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), l = u.join(i, "dist/esm/loader.js");
1445
1445
  if (a ? await _(l) : !1) {
1446
- const g = await z(l, "utf8"), h = Dr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1446
+ const g = await z(l, "utf8"), h = Rr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1447
1447
  try {
1448
- const C = JSON.parse(w), E = Ur(C, { packageName: e, getImportPath: n });
1448
+ const C = JSON.parse(w), E = Wr(C, { packageName: e, getImportPath: r });
1449
1449
  return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
1450
1450
  } catch (C) {
1451
1451
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
1452
1452
  Error: ${String(C)}`);
1453
1453
  }
1454
1454
  }
1455
- const c = $t(s.customElements);
1455
+ const c = Tt(s.customElements);
1456
1456
  if (c != null) {
1457
- const g = u.join(i, c), h = JSON.parse(await z(g, "utf-8")), y = Or(h), v = ki(h, {
1457
+ const g = u.join(i, c), h = JSON.parse(await z(g, "utf-8")), y = Dr(h), v = Pi(h, {
1458
1458
  packageName: e,
1459
- getImportPath: n
1459
+ getImportPath: r
1460
1460
  });
1461
1461
  return { type: y ? "@arcgis/lumina" : "unknown", packageName: e, components: v, packageLocation: i, packageJson: s };
1462
1462
  }
1463
- const p = $t(s["web-types"]);
1463
+ const p = Tt(s["web-types"]);
1464
1464
  if (p != null) {
1465
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Mr(h, {
1465
+ const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Or(h, {
1466
1466
  packageName: e,
1467
- getImportPath: n
1467
+ getImportPath: r
1468
1468
  });
1469
1469
  return { type: "unknown", packageName: e, components: y, packageLocation: i, packageJson: s };
1470
1470
  }
1471
1471
  const m = u.join(i, "dist/components");
1472
1472
  if (await _(m)) {
1473
- const g = await zr(m, {
1473
+ const g = await Ur(m, {
1474
1474
  packageName: e,
1475
- getImportPath: n
1475
+ getImportPath: r
1476
1476
  });
1477
1477
  return { type: "unknown", packageName: e, components: g, packageLocation: i, packageJson: s };
1478
1478
  }
1479
1479
  }
1480
- const $t = (e) => Array.isArray(e) ? e[0] : e;
1481
- function Dr(e, t) {
1480
+ const Tt = (e) => Array.isArray(e) ? e[0] : e;
1481
+ function Rr(e, t) {
1482
1482
  const i = e.indexOf(t);
1483
1483
  return i === -1 ? -1 : i + t.length;
1484
1484
  }
1485
- function ki(e, t, i = !1) {
1485
+ function Pi(e, t, i = !1) {
1486
1486
  const s = /* @__PURE__ */ Object.create(null);
1487
1487
  if (e.modules === void 0)
1488
1488
  return s;
1489
- for (let r = 0; r < e.modules.length; ++r) {
1490
- const n = e.modules[r];
1491
- if (n.declarations !== void 0)
1492
- for (let a = 0; a < n.declarations.length; ++a) {
1493
- const d = n.declarations[a];
1489
+ for (let n = 0; n < e.modules.length; ++n) {
1490
+ const r = e.modules[n];
1491
+ if (r.declarations !== void 0)
1492
+ for (let a = 0; a < r.declarations.length; ++a) {
1493
+ const d = r.declarations[a];
1494
1494
  if (d.customElement !== !0)
1495
1495
  continue;
1496
1496
  const c = (
1497
1497
  // New api.json
1498
- "sourcePath" in n ? n.path : (
1498
+ "sourcePath" in r ? r.path : (
1499
1499
  // Older api.json
1500
1500
  "importPath" in d && typeof d.importPath == "string" ? d.importPath : void 0
1501
1501
  )
@@ -1519,11 +1519,11 @@ function ki(e, t, i = !1) {
1519
1519
  }
1520
1520
  return s;
1521
1521
  }
1522
- const Or = (e) => (
1522
+ const Dr = (e) => (
1523
1523
  // Since 5.0
1524
1524
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1525
- e.compiler?.name === Ei.name
1526
- ), Mr = (e, t) => Object.fromEntries(
1525
+ e.compiler?.name === Ci.name
1526
+ ), Or = (e, t) => Object.fromEntries(
1527
1527
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1528
1528
  (i) => [
1529
1529
  i.name,
@@ -1534,23 +1534,23 @@ const Or = (e) => (
1534
1534
  }
1535
1535
  ]
1536
1536
  ) ?? []
1537
- ), Jr = 1, Br = 2, _r = 4, Kr = 8, Wr = Jr | Br | _r | Kr, Ur = (e, t) => Object.fromEntries(
1537
+ ), Mr = 1, Jr = 2, Br = 4, _r = 8, Kr = Mr | Jr | Br | _r, Wr = (e, t) => Object.fromEntries(
1538
1538
  e.flatMap(
1539
1539
  ([i, s]) => s.map(
1540
- ([r, n, a]) => [
1541
- n,
1540
+ ([n, r, a]) => [
1541
+ r,
1542
1542
  {
1543
1543
  packageName: t.packageName,
1544
- modulePath: t.getImportPath(n),
1544
+ modulePath: t.getImportPath(r),
1545
1545
  propToAttribute: Object.fromEntries(
1546
- Object.entries(a ?? {}).filter(([l, [d]]) => d & Wr).map(([l, [d, c = l]]) => [l, c])
1546
+ Object.entries(a ?? {}).filter(([l, [d]]) => d & Kr).map(([l, [d, c = l]]) => [l, c])
1547
1547
  )
1548
1548
  }
1549
1549
  ]
1550
1550
  )
1551
1551
  )
1552
- ), zr = async (e, t) => Object.fromEntries(
1553
- (await ot(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1552
+ ), Ur = async (e, t) => Object.fromEntries(
1553
+ (await nt(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
1554
1554
  const s = i.slice(0, -5);
1555
1555
  return [
1556
1556
  s,
@@ -1561,64 +1561,64 @@ const Or = (e) => (
1561
1561
  }
1562
1562
  ];
1563
1563
  })
1564
- ), Hr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, qr = (e) => e.startsWith("/") ? e : `/${e}`, dt = (e, t) => `${e}@fs${qr(t)}`;
1565
- function Vr(e, t) {
1566
- const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), r = u.relative(i, s);
1567
- return r === ".." || r.startsWith(`..${u.sep}`) || u.isAbsolute(r) ? void 0 : s;
1564
+ ), zr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Hr = (e) => e.startsWith("/") ? e : `/${e}`, lt = (e, t) => `${e}@fs${Hr(t)}`;
1565
+ function qr(e, t) {
1566
+ const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
1567
+ return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
1568
1568
  }
1569
- function Ii(e) {
1569
+ function ki(e) {
1570
1570
  const t = e?.apiExtractorPluginConfig.unsafeConfigOverride?.types?.typeScriptConfig?.config.options.target ?? o.ScriptTarget.ESNext, i = o.ScriptTarget[t].toLowerCase();
1571
1571
  return i === "latest" ? "esnext" : i;
1572
1572
  }
1573
- const tt = "@arcgis/lumina:provideAssets";
1574
- function te(e, t, i = pt, s = "max-age=31536000, immutable") {
1573
+ const et = "@arcgis/lumina:provideAssets";
1574
+ function te(e, t, i = dt, s = "max-age=31536000, immutable") {
1575
1575
  if (e.viteCommand !== "serve")
1576
- throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
1577
- const r = e._serverConfigured, n = e.server.middlewares.stack.length;
1576
+ throw Error(b(et, "serveAssets() is only available when Vite is running in serve mode"));
1577
+ const n = e._serverConfigured, r = e.server.middlewares.stack.length;
1578
1578
  if (t.forEach((a) => {
1579
- const l = Ai(a), d = Ni(e.dir, Li(l)), c = Xr(e.viteConfig.base, d, e.dir.distCdn);
1579
+ const l = Ai(a), d = Li(e.dir, xi(l)), c = Gr(e.viteConfig.base, d, e.dir.distCdn);
1580
1580
  e.server.middlewares.use(c, (p, m, f) => {
1581
- const g = Yr(p.url), h = l.type === "directory" ? Vr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1581
+ const g = Xr(p.url), h = l.type === "directory" ? qr(l.source, g) : l.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
1582
1582
  return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
1583
1583
  const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
1584
- m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Ms.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1584
+ m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Os.lookup(g) || "application/octet-stream"), m.write(C), m.end();
1585
1585
  }).catch((w) => {
1586
1586
  (l.type !== "directory" || process.env.DEBUG) && T.warn(
1587
- tt,
1587
+ et,
1588
1588
  `Error occurred when trying to serve a file in response to request for "${p.originalUrl ?? g}":${String(w)}`
1589
1589
  ), f();
1590
1590
  }), !0);
1591
1591
  });
1592
- }), r) {
1593
- const a = e.server.middlewares.stack.splice(n);
1592
+ }), n) {
1593
+ const a = e.server.middlewares.stack.splice(r);
1594
1594
  e.server.middlewares.stack.splice(0, 0, ...a);
1595
1595
  }
1596
1596
  }
1597
- async function xi(e, t, i = pt) {
1597
+ async function Ii(e, t, i = dt) {
1598
1598
  await Promise.all(
1599
1599
  t.map(async (s) => {
1600
- const r = Ai(s), n = Ni(e.dir, Li(r));
1601
- if (r.type === "directory") {
1602
- const a = u.resolve(r.source), d = (await ot(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1603
- const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(n, m);
1600
+ const n = Ai(s), r = Li(e.dir, xi(n));
1601
+ if (n.type === "directory") {
1602
+ const a = u.resolve(n.source), d = (await nt(a, { recursive: !0, withFileTypes: !0 })).filter((c) => c.isFile()).map((c) => {
1603
+ const p = u.resolve(c.parentPath, c.name), m = u.relative(a, p), f = u.join(r, m);
1604
1604
  return [p, f];
1605
1605
  });
1606
- await Fi(d.map(([c, p]) => p)), await Js(
1606
+ await ji(d.map(([c, p]) => p)), await Ms(
1607
1607
  d,
1608
1608
  16,
1609
- async ([c, p]) => await Pt(c, p, i, e)
1609
+ async ([c, p]) => await $t(c, p, i, e)
1610
1610
  );
1611
- } else if (r.type === "file")
1612
- await X(u.dirname(n), { recursive: !0 }), await Pt(r.source, n, i, e);
1613
- else if (r.type === "dynamic") {
1614
- await X(u.dirname(n), { recursive: !0 });
1615
- const a = await Promise.resolve(r.source());
1616
- await K(n, a);
1611
+ } else if (n.type === "file")
1612
+ await X(u.dirname(r), { recursive: !0 }), await $t(n.source, r, i, e);
1613
+ else if (n.type === "dynamic") {
1614
+ await X(u.dirname(r), { recursive: !0 });
1615
+ const a = await Promise.resolve(n.source());
1616
+ await K(r, a);
1617
1617
  }
1618
1618
  })
1619
1619
  );
1620
1620
  }
1621
- const Ai = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1621
+ const Ai = ei ? (e) => e : (e) => e.type === "dynamic" ? {
1622
1622
  ...e,
1623
1623
  destination: G(e.destination)
1624
1624
  } : {
@@ -1626,23 +1626,23 @@ const Ai = ti ? (e) => e : (e) => e.type === "dynamic" ? {
1626
1626
  source: G(e.source),
1627
1627
  destination: G(e.destination)
1628
1628
  };
1629
- async function Pt(e, t, i, s) {
1630
- const r = i.find((n) => n.match(t, s));
1631
- if (r === void 0)
1632
- await Fs(e, t);
1629
+ async function $t(e, t, i, s) {
1630
+ const n = i.find((r) => r.match(t, s));
1631
+ if (n === void 0)
1632
+ await js(e, t);
1633
1633
  else {
1634
- const n = await z(e, "utf8"), a = r.transform(n, t, s);
1634
+ const r = await z(e, "utf8"), a = n.transform(r, t, s);
1635
1635
  await K(t, a);
1636
1636
  }
1637
1637
  }
1638
- function Li(e) {
1638
+ function xi(e) {
1639
1639
  if (e.type === "dynamic")
1640
1640
  return e.destination;
1641
1641
  if (e.source.endsWith(u.sep)) {
1642
1642
  if (e.type === "file")
1643
1643
  throw Error(
1644
1644
  b(
1645
- tt,
1645
+ et,
1646
1646
  `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${Re(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
1647
1647
  )
1648
1648
  );
@@ -1650,40 +1650,40 @@ function Li(e) {
1650
1650
  }
1651
1651
  return e.destination === "" ? u.basename(e.source) : e.destination.endsWith(u.sep) ? e.type === "directory" && e.destination === u.sep ? e.destination : u.join(e.destination, u.basename(e.source)) : e.destination;
1652
1652
  }
1653
- function Ni({ dist: e, distCdnAssets: t }, i) {
1654
- const s = Gr(i), r = u.join(
1653
+ function Li({ dist: e, distCdnAssets: t }, i) {
1654
+ const s = Vr(i), n = u.join(
1655
1655
  t,
1656
1656
  s ? u.relative(t, i) : i
1657
- ), n = u.relative(e, r), a = ji(n);
1657
+ ), r = u.relative(e, n), a = Ni(r);
1658
1658
  return u.join(e, a);
1659
1659
  }
1660
- function Gr(e) {
1660
+ function Vr(e) {
1661
1661
  if (e.startsWith(u.sep)) {
1662
- const t = ii(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1662
+ const t = ti(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
1663
1663
  return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
1664
1664
  } else
1665
- return !!(!ti && u.isAbsolute(e));
1665
+ return !!(!ei && u.isAbsolute(e));
1666
1666
  }
1667
- function Xr(e, t, i) {
1668
- const s = ji(u.relative(i, t)), r = s.startsWith("/") ? s.slice(1) : s;
1669
- return `${e}${r}`;
1667
+ function Gr(e, t, i) {
1668
+ const s = Ni(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
1669
+ return `${e}${n}`;
1670
1670
  }
1671
- const ji = (e) => e.replaceAll("../", ""), Yr = (e = "") => e.split("?")[0].split("#")[0];
1672
- async function Fi(e) {
1671
+ const Ni = (e) => e.replaceAll("../", ""), Xr = (e = "") => e.split("?")[0].split("#")[0];
1672
+ async function ji(e) {
1673
1673
  const t = new Set(e.map(u.dirname));
1674
1674
  await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
1675
1675
  }
1676
- const Qr = {
1676
+ const Yr = {
1677
1677
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1678
1678
  transform: (e) => JSON.stringify(JSON.parse(e))
1679
- }, pt = [Qr], Ae = "@arcgis/core", me = "@arcgis/core/assets", We = j(), H = Ae in (We.dependencies ?? {}) || Ae in (We.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1680
- We.name === "@arcgis/lumina";
1681
- async function Zr(e, t, i, s) {
1679
+ }, dt = [Yr], xe = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = xe in (Ke.dependencies ?? {}) || xe in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1680
+ Ke.name === "@arcgis/lumina";
1681
+ async function Qr(e, t, i, s) {
1682
1682
  if (!H)
1683
1683
  return [];
1684
- const r = e._localCdnCore, n = r?.packageLocation ?? await $e(Ae);
1684
+ const n = e._localCdnCore, r = n?.packageLocation ?? await $e(xe);
1685
1685
  if (i === "cdn") {
1686
- const a = await ri(n), l = De({ name: "", version: a.version }, s);
1686
+ const a = await si(r), l = De({ name: "", version: a.version }, s);
1687
1687
  return [
1688
1688
  // Use the ESM CDN
1689
1689
  // <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
@@ -1699,18 +1699,18 @@ async function Zr(e, t, i, s) {
1699
1699
  })
1700
1700
  },
1701
1701
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
1702
- Ri(l)
1702
+ Fi(l)
1703
1703
  ];
1704
1704
  } else
1705
- return en(t, n, r?.sourceLocation !== void 0);
1705
+ return Zr(t, r, n?.sourceLocation !== void 0);
1706
1706
  }
1707
- function en(e, t, i) {
1707
+ function Zr(e, t, i) {
1708
1708
  const s = `${e}${me}`;
1709
1709
  return [
1710
1710
  // Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
1711
1711
  // Core's prebuilt JavaScript assets use the untransformed route configured below.
1712
- Ri(
1713
- i ? `${e}${me}/` : dt(e, `${t}/assets/`)
1712
+ Fi(
1713
+ i ? `${e}${me}/` : lt(e, `${t}/assets/`)
1714
1714
  ),
1715
1715
  {
1716
1716
  // This import is injected dynamically, so external consumers must tell Vite to optimize it. Within the monorepo,
@@ -1723,8 +1723,8 @@ function en(e, t, i) {
1723
1723
  }
1724
1724
  ];
1725
1725
  }
1726
- async function tn(e) {
1727
- const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
1726
+ async function en(e) {
1727
+ const t = e._localCdnCore, i = t?.packageLocation ?? await $e(xe), s = t?.sourceLocation !== void 0 ? [
1728
1728
  {
1729
1729
  type: "directory",
1730
1730
  source: u.join(t.sourceLocation, u.sep),
@@ -1763,41 +1763,41 @@ async function tn(e) {
1763
1763
  destination: "../esri"
1764
1764
  }
1765
1765
  ];
1766
- e.server.middlewares.use("/builddate.txt", (r, n) => {
1767
- n.setHeader("Cache-Control", "no-cache"), n.setHeader("Content-Type", "text/plain"), n.end(JSON.stringify({ version: j(i).version }));
1766
+ e.server.middlewares.use("/builddate.txt", (n, r) => {
1767
+ r.setHeader("Cache-Control", "no-cache"), r.setHeader("Content-Type", "text/plain"), r.end(JSON.stringify({ version: j(i).version }));
1768
1768
  }), te(e, s, [], "no-cache");
1769
1769
  }
1770
- const Ri = (e) => ({
1770
+ const Fi = (e) => ({
1771
1771
  // Not using join() because it would turn https:// into https:/
1772
1772
  cssHref: `${e}esri/themes/light/main.css`,
1773
1773
  // This is used be the theme switcher in `@arcgis/storybook-utils`
1774
1774
  id: "arcgisCoreStylesheet"
1775
- }), ut = "customElement.js";
1776
- function sn(e, t) {
1775
+ }), pt = "customElement.js";
1776
+ function tn(e, t) {
1777
1777
  if (!t.startsWith(e))
1778
1778
  return t;
1779
1779
  const s = t.split(u.sep);
1780
- return s.at(rn) !== s.at(nn) ? t : u.join(s.slice(0, -1).join(u.sep), ut);
1780
+ return s.at(sn) !== s.at(rn) ? t : u.join(s.slice(0, -1).join(u.sep), pt);
1781
1781
  }
1782
- const rn = -1, nn = -2, on = /["']\.\.?\/[^'"]+/gu, an = (e, t, i, s) => e.replaceAll(on, (r) => {
1783
- const n = r.slice(1);
1784
- if (!n.startsWith("./") && !n.startsWith("../"))
1785
- return r;
1786
- const a = u.join(s, n), l = !n.endsWith(".js") && !n.split("/").at(-1).includes(".") ? sn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1782
+ const sn = -1, rn = -2, nn = /["']\.\.?\/[^'"]+/gu, on = (e, t, i, s) => e.replaceAll(nn, (n) => {
1783
+ const r = n.slice(1);
1784
+ if (!r.startsWith("./") && !r.startsWith("../"))
1785
+ return n;
1786
+ const a = u.join(s, r), l = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? tn(t.dir.distComponents, a) : a, d = l.startsWith(t.dir.distComponents) ? t.dir.dist + Ve(l.slice(t.dir.dist.length), t.apiExtractor) : l;
1787
1787
  if (i === s && a === d)
1788
- return r;
1789
- const c = he(i, d), p = r.endsWith("/") ? `${c}/` : c;
1790
- return `${r[0]}${p}`;
1788
+ return n;
1789
+ const c = he(i, d), p = n.endsWith("/") ? `${c}/` : c;
1790
+ return `${n[0]}${p}`;
1791
1791
  }), he = (e, t) => {
1792
1792
  const i = u.relative(e, t);
1793
1793
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
1794
1794
  };
1795
- async function cn(e, t, i) {
1795
+ async function an(e, t, i) {
1796
1796
  const s = u.resolve(e.dir.root, t);
1797
- e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Rs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ds(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1798
- const r = [
1797
+ e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Fs(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Rs(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1798
+ const n = [
1799
1799
  "index.html",
1800
- ...await Bs("**/*.html", {
1800
+ ...await Js("**/*.html", {
1801
1801
  cwd: e.dir.src,
1802
1802
  onlyFiles: !0,
1803
1803
  // The files we are looking for are unlikely to be symbolic links
@@ -1805,7 +1805,7 @@ async function cn(e, t, i) {
1805
1805
  // Not applicable for our glob pattern
1806
1806
  expandDirectories: !1
1807
1807
  })
1808
- ], n = u.relative(e.dir.root, e.dir.src), a = await ne(e), l = u.join(e.dir.src, "loader.ts"), d = a.map((c) => {
1808
+ ], r = u.relative(e.dir.root, e.dir.src), a = await ne(e), l = u.join(e.dir.src, "loader.ts"), d = a.map((c) => {
1809
1809
  if ("cssHref" in c)
1810
1810
  return `<link rel="stylesheet" href="${c.cssHref}">`;
1811
1811
  if ("javascriptCode" in c && c.javascriptCode.at(0)?.includes(l) === !0)
@@ -1819,13 +1819,13 @@ async function cn(e, t, i) {
1819
1819
  }).join(`
1820
1820
  `);
1821
1821
  await Promise.all(
1822
- r.map(async (c, p) => {
1823
- const f = p === 0 ? c : u.join(n, c), g = u.join(e.dir.root, f), h = u.join(s, f);
1822
+ n.map(async (c, p) => {
1823
+ const f = p === 0 ? c : u.join(r, c), g = u.join(e.dir.root, f), h = u.join(s, f);
1824
1824
  await X(u.dirname(h), { recursive: !0 });
1825
1825
  const y = await z(g, "utf-8"), v = he(u.dirname(f), `build/${i}`), w = `${d}<script type="module" src="${v}"><\/script>
1826
1826
  `, C = Math.min(
1827
1827
  ...[y.indexOf("<style>"), y.indexOf("<script"), y.indexOf("</head>")].filter(
1828
- (x) => x !== -1
1828
+ (A) => A !== -1
1829
1829
  )
1830
1830
  );
1831
1831
  if (C === Number.POSITIVE_INFINITY)
@@ -1835,7 +1835,7 @@ async function cn(e, t, i) {
1835
1835
  })
1836
1836
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1837
1837
  }
1838
- const Di = /* @__PURE__ */ new Set([
1838
+ const Ri = /* @__PURE__ */ new Set([
1839
1839
  "chunks",
1840
1840
  "components",
1841
1841
  "docs",
@@ -1848,13 +1848,13 @@ const Di = /* @__PURE__ */ new Set([
1848
1848
  "collection",
1849
1849
  "extras",
1850
1850
  "support"
1851
- ]), O = "@arcgis/lumina:buildCdn", ce = "cdn", Oi = "index", Z = "main";
1852
- function ln(e) {
1853
- const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: r } = e.options.build?.cdn ?? {}, n = e.options.build?.webApp?.destination, a = i !== void 0;
1851
+ ]), O = "@arcgis/lumina:buildCdn", ce = "cdn", Di = "index", Z = "main";
1852
+ function cn(e) {
1853
+ const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1854
1854
  if (a) {
1855
1855
  if (i.toLowerCase() !== i)
1856
1856
  throw new Error(`Expected CDN namespace to be all lowercase. Received: ${i}`);
1857
- if (Di.has(i))
1857
+ if (Ri.has(i))
1858
1858
  throw new Error(
1859
1859
  `Namespace name "${i}" is restricted as it collides with a well-known Lumina dist/ folder name or Stencil dist/ folder name.`
1860
1860
  );
@@ -1862,11 +1862,11 @@ function ln(e) {
1862
1862
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1863
1863
  );
1864
1864
  }
1865
- const l = i ?? Oi;
1865
+ const l = i ?? Di;
1866
1866
  if (e.provideAssets([
1867
1867
  {
1868
1868
  type: "dynamic",
1869
- source: () => Pr(e),
1869
+ source: () => $r(e),
1870
1870
  destination: `../${a ? l : Z}.css`
1871
1871
  }
1872
1872
  ]), !t)
@@ -1882,15 +1882,15 @@ function ln(e) {
1882
1882
  );
1883
1883
  return;
1884
1884
  }
1885
- const d = H && j().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await dn(
1885
+ const d = H && j().name !== "@arcgis/embeddable-components", c = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await ln(
1886
1886
  e,
1887
1887
  l,
1888
1888
  s,
1889
1889
  p,
1890
- r,
1890
+ n,
1891
1891
  d
1892
1892
  );
1893
- await pn(
1893
+ await dn(
1894
1894
  m,
1895
1895
  e,
1896
1896
  a ? `${l}.esm` : l,
@@ -1898,20 +1898,20 @@ function ln(e) {
1898
1898
  d
1899
1899
  );
1900
1900
  const f = Date.now();
1901
- T.info(O, `CDN was built in ${f - c}ms`), n && await cn(e, n, `${a ? `${l}.esm` : l}.js`);
1901
+ T.info(O, `CDN was built in ${f - c}ms`), r && await an(e, r, `${a ? `${l}.esm` : l}.js`);
1902
1902
  }
1903
1903
  };
1904
1904
  }
1905
- async function dn(e, t, i, s, r, n) {
1905
+ async function ln(e, t, i, s, n, r) {
1906
1906
  const a = e.environment;
1907
- if (i.minify && n)
1907
+ if (i.minify && r)
1908
1908
  throw Error(
1909
1909
  b(
1910
1910
  O,
1911
1911
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
1912
1912
  )
1913
1913
  );
1914
- if (i.sourcemap && n)
1914
+ if (i.sourcemap && r)
1915
1915
  throw Error(
1916
1916
  b(
1917
1917
  O,
@@ -1925,12 +1925,12 @@ async function dn(e, t, i, s, r, n) {
1925
1925
  * The script's file name will be stripped inside defineCustomElements.
1926
1926
  **/
1927
1927
  defineCustomElements({resourcesUrl: import.meta.url});
1928
- ${Si(e._globalCssString, e)}`, d = r?.(l, e) ?? l;
1929
- return await Os({
1928
+ ${wi(e._globalCssString, e)}`, d = n?.(l, e) ?? l;
1929
+ return await Ds({
1930
1930
  bundle: !0,
1931
- minify: n ? !0 : a === "production",
1931
+ minify: r ? !0 : a === "production",
1932
1932
  treeShaking: !0,
1933
- sourcemap: n ? !1 : a === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ? "linked" : !1,
1933
+ sourcemap: r ? !1 : a === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ? "linked" : !1,
1934
1934
  format: "esm",
1935
1935
  splitting: !0,
1936
1936
  absWorkingDir: e.dir.dist,
@@ -1951,7 +1951,7 @@ ${Si(e._globalCssString, e)}`, d = r?.(l, e) ?? l;
1951
1951
  chunkNames: "[hash]",
1952
1952
  resolveExtensions: [".js", ".json"],
1953
1953
  banner: { js: e.banner },
1954
- target: Ii(e),
1954
+ target: ki(e),
1955
1955
  ...i,
1956
1956
  write: !1,
1957
1957
  plugins: [
@@ -2010,11 +2010,11 @@ ${Si(e._globalCssString, e)}`, d = r?.(l, e) ?? l;
2010
2010
  }
2011
2011
  });
2012
2012
  }
2013
- const kt = "stdin.js";
2014
- async function pn(e, t, i, s, r) {
2015
- const n = t.dir.distCdn, a = `${i}.js`;
2013
+ const Pt = "stdin.js";
2014
+ async function dn(e, t, i, s, n) {
2015
+ const r = t.dir.distCdn, a = `${i}.js`;
2016
2016
  let l;
2017
- r && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
2017
+ n && (l = new Set(s.map((p) => `${p.out}.js`)), l.add(a));
2018
2018
  const d = new Map(
2019
2019
  e.outputFiles.map((p) => {
2020
2020
  const m = {
@@ -2022,26 +2022,26 @@ async function pn(e, t, i, s, r) {
2022
2022
  isProcessing: !1,
2023
2023
  isAsync: void 0,
2024
2024
  oldSingleExportName: void 0
2025
- }, f = G(p.path.slice(n.length));
2026
- if (f === kt) {
2027
- if (r) {
2028
- const h = p.text.match(un)?.[0];
2025
+ }, f = G(p.path.slice(r.length));
2026
+ if (f === Pt) {
2027
+ if (n) {
2028
+ const h = p.text.match(pn)?.[0];
2029
2029
  if (h === void 0)
2030
2030
  throw Error(
2031
- `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${kt} contents:
2031
+ `Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${Pt} contents:
2032
2032
  ${p.text}`
2033
2033
  );
2034
- m.code = `${m.code.trimEnd()}${mn(h, s)}`, m.isAsync = !1;
2034
+ m.code = `${m.code.trimEnd()}${un(h, s)}`, m.isAsync = !1;
2035
2035
  }
2036
2036
  return [a, m];
2037
2037
  }
2038
2038
  return [f, m];
2039
2039
  })
2040
2040
  );
2041
- r && d.forEach((p, m) => {
2041
+ n && d.forEach((p, m) => {
2042
2042
  if (p.isAsync === void 0)
2043
2043
  if (m.endsWith(".js")) {
2044
- if (Mi(p, d), l?.has(m) === !0 && p.code.includes(Ji))
2044
+ if (Oi(p, d), l?.has(m) === !0 && p.code.includes(Mi))
2045
2045
  throw Error(
2046
2046
  b(
2047
2047
  O,
@@ -2056,13 +2056,13 @@ ${p.text}`
2056
2056
  const m = p.lastIndexOf("/");
2057
2057
  if (m !== -1) {
2058
2058
  const f = p.slice(0, m);
2059
- c.set(f, X(n + f, { recursive: !0 }));
2059
+ c.set(f, X(r + f, { recursive: !0 }));
2060
2060
  }
2061
2061
  }
2062
- await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(n + p, m)));
2062
+ await Promise.all(c.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
2063
2063
  }
2064
- const un = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2065
- function mn(e, t) {
2064
+ const pn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2065
+ function un(e, t) {
2066
2066
  let i = [
2067
2067
  "window.$arcgis",
2068
2068
  "||",
@@ -2071,17 +2071,17 @@ function mn(e, t) {
2071
2071
  ].join("");
2072
2072
  const s = t.length > 0;
2073
2073
  if (i += "(a,r", s && (i += ",p,j,i=(a.importMap??={}).imports??={}"), i += ")=>{", s) {
2074
- const r = [];
2075
- for (const n of t) {
2076
- if (n.in.includes("*")) {
2077
- T.warn(O, `$arcgis.import does not support wildcard imports, so ${n.in} will be ignored.`);
2074
+ const n = [];
2075
+ for (const r of t) {
2076
+ if (r.in.includes("*")) {
2077
+ T.warn(O, `$arcgis.import does not support wildcard imports, so ${r.in} will be ignored.`);
2078
2078
  continue;
2079
2079
  }
2080
- if (n.out.startsWith(".") || n.out.startsWith("/"))
2081
- throw Error(b(O, `CDN entrypoint path must not start with '.' or '/'. Found: ${n.out}`));
2082
- r.push(n.out);
2080
+ if (r.out.startsWith(".") || r.out.startsWith("/"))
2081
+ throw Error(b(O, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
2082
+ n.push(r.out);
2083
2083
  }
2084
- i += `"${r.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
2084
+ i += `"${n.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
2085
2085
  }
2086
2086
  if (i += [
2087
2087
  "a.t=(c,...x)=>",
@@ -2098,39 +2098,39 @@ function mn(e, t) {
2098
2098
  // minified to a variable name that is already used inside the closure).
2099
2099
  `)($arcgis,${e}`
2100
2100
  ].join(""), s) {
2101
- const n = j().name;
2102
- i += `,"${n}/",".js"`;
2101
+ const r = j().name;
2102
+ i += `,"${r}/",".js"`;
2103
2103
  }
2104
2104
  return i += ")", i;
2105
2105
  }
2106
- function Mi(e, t) {
2106
+ function Oi(e, t) {
2107
2107
  if (e.isProcessing) {
2108
- e.isAsync = !0, It(e);
2108
+ e.isAsync = !0, kt(e);
2109
2109
  return;
2110
2110
  }
2111
2111
  e.isProcessing = !0;
2112
- const i = [], s = [], r = [], n = /* @__PURE__ */ new Set(), a = [];
2112
+ const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
2113
2113
  let l = 0;
2114
- const d = e.code.matchAll(fn);
2114
+ const d = e.code.matchAll(mn);
2115
2115
  for (const S of d) {
2116
- const [A, L, U, F, N] = S, B = N.startsWith(Le);
2116
+ const [x, L, U, F, N] = S, B = N.startsWith(Le);
2117
2117
  if (l !== 0 && l !== S.index) {
2118
2118
  const D = e.code.slice(l, S.index);
2119
- r.push(D), a.push([l, D.length, 0, ""]);
2119
+ n.push(D), a.push([l, D.length, 0, ""]);
2120
2120
  }
2121
- if (l = S.index + A.length, B)
2122
- a.push([S.index, A.length, 0, ""]), s.push(`"${_i(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2121
+ if (l = S.index + x.length, B)
2122
+ a.push([S.index, x.length, 0, ""]), s.push(`"${Bi(N.slice(Le.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? U ?? F ?? "");
2123
2123
  else {
2124
- const D = Bi(N, t), M = D?.isAsync === !0;
2124
+ const D = Ji(N, t), M = D?.isAsync === !0;
2125
2125
  if (L !== void 0) {
2126
2126
  const be = [];
2127
- for (const Je of L.slice(1, -1).split(",")) {
2128
- const [vt, bt = vt] = Je.split(" as ");
2129
- M || n.add(bt), be.push(`${vt}:${bt}`);
2127
+ for (const Me of L.slice(1, -1).split(",")) {
2128
+ const [yt, vt = yt] = Me.split(" as ");
2129
+ M || r.add(vt), be.push(`${yt}:${vt}`);
2130
2130
  }
2131
2131
  if (M) {
2132
- const Je = D.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2133
- a.push([S.index + 6, 0, L.length, Je]);
2132
+ const Me = D.oldSingleExportName === void 0 ? `{${be.join(",")}}` : be[0].split(":")[1];
2133
+ a.push([S.index + 6, 0, L.length, Me]);
2134
2134
  }
2135
2135
  } else if (U === void 0 && F === void 0)
2136
2136
  M && a.push([S.index + 6, 0, 0, ""]);
@@ -2139,112 +2139,112 @@ function Mi(e, t) {
2139
2139
  throw Error(
2140
2140
  b(
2141
2141
  O,
2142
- `Expected local import specifiers to use only named or side-effect import syntax. Found ${A} in a chunk:
2142
+ `Expected local import specifiers to use only named or side-effect import syntax. Found ${x} in a chunk:
2143
2143
  ${D.code}`
2144
2144
  )
2145
2145
  );
2146
- n.add(F ?? U);
2146
+ r.add(F ?? U);
2147
2147
  }
2148
2148
  }
2149
2149
  }
2150
2150
  e.isProcessing = !1;
2151
2151
  const c = e.isAsync === !0;
2152
2152
  if (e.isAsync = c || a.length > 0, !e.isAsync) {
2153
- e.code = xt(e.code, t);
2153
+ e.code = It(e.code, t);
2154
2154
  return;
2155
2155
  }
2156
- const p = yn(n);
2156
+ const p = hn(r);
2157
2157
  let m = e.code.slice(0, l);
2158
2158
  for (let S = a.length - 1; S >= 0; S--) {
2159
- const [A, L, U, F] = a[S];
2159
+ const [x, L, U, F] = a[S];
2160
2160
  let N = L, B = "";
2161
2161
  if (L === 0) {
2162
2162
  const M = p();
2163
2163
  s.push(M), B = ` ${M} from`, F !== "" ? (N = U + 4, i.push(F)) : i.push("");
2164
2164
  }
2165
- m = m.slice(0, A) + B + m.slice(A + N);
2165
+ m = m.slice(0, x) + B + m.slice(x + N);
2166
2166
  }
2167
- const [f, g] = It(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Ji}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2167
+ const [f, g] = kt(e), h = i.findLastIndex((S) => S.length > 0), y = i.slice(0, h + 1).join(","), v = i.length === 0 ? "_" : `([${y}])`, w = `${Mi}${v}=>{`, C = s.join(","), E = `${g}},${C})`;
2168
2168
  let P = e.code.slice(l, f);
2169
- P = `${r.join("")}${P}`, P = xt(P, t);
2170
- const x = `${m}${w}${P}${E}`;
2171
- e.code = x;
2169
+ P = `${n.join("")}${P}`, P = It(P, t);
2170
+ const A = `${m}${w}${P}${E}`;
2171
+ e.code = A;
2172
2172
  }
2173
- const Ji = "export default $arcgis.t(";
2174
- function It(e) {
2175
- const t = gn.exec(e.code), i = t?.index ?? e.code.length;
2173
+ const Mi = "export default $arcgis.t(";
2174
+ function kt(e) {
2175
+ const t = fn.exec(e.code), i = t?.index ?? e.code.length;
2176
2176
  let s = "";
2177
2177
  if (t !== null) {
2178
- const r = t[1].split(",");
2179
- if (r.length > 1)
2180
- s = `return{${r.map((n) => {
2181
- const [a, l = a] = n.split(" as ");
2178
+ const n = t[1].split(",");
2179
+ if (n.length > 1)
2180
+ s = `return{${n.map((r) => {
2181
+ const [a, l = a] = r.split(" as ");
2182
2182
  return `${l}:${a}`;
2183
2183
  }).join(",")}}`;
2184
2184
  else {
2185
- const [n, a = n] = r[0].split(" as ");
2186
- e.oldSingleExportName = a, s = `return ${n}`;
2185
+ const [r, a = r] = n[0].split(" as ");
2186
+ e.oldSingleExportName = a, s = `return ${r}`;
2187
2187
  }
2188
2188
  }
2189
2189
  return [i, s];
2190
2190
  }
2191
- const fn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, gn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2192
- function Bi(e, t) {
2191
+ const mn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, fn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
2192
+ function Ji(e, t) {
2193
2193
  if (!e.startsWith("./"))
2194
2194
  return;
2195
2195
  const i = e.slice(2), s = t.get(i);
2196
2196
  if (s === void 0)
2197
2197
  throw Error(b(O, `Failed to find the ${e} module`));
2198
- if (s.isAsync === void 0 && Mi(s, t), s.isAsync === void 0)
2198
+ if (s.isAsync === void 0 && Oi(s, t), s.isAsync === void 0)
2199
2199
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2200
2200
  return s;
2201
2201
  }
2202
- function xt(e, t) {
2203
- return e.replaceAll(hn, (i, s) => {
2202
+ function It(e, t) {
2203
+ return e.replaceAll(gn, (i, s) => {
2204
2204
  if (s.startsWith(Le))
2205
- return `$arcgis.t(m=>m[0],"${_i(s.slice(Le.length))}")`;
2205
+ return `$arcgis.t(m=>m[0],"${Bi(s.slice(Le.length))}")`;
2206
2206
  if (s.startsWith("./")) {
2207
- const r = Bi(s, t);
2208
- if (r?.isAsync === !0)
2209
- return `${i}.then(m=>m.default${r.oldSingleExportName === void 0 ? "" : `.then(e=>({${r.oldSingleExportName}:e}))`})`;
2207
+ const n = Ji(s, t);
2208
+ if (n?.isAsync === !0)
2209
+ return `${i}.then(m=>m.default${n.oldSingleExportName === void 0 ? "" : `.then(e=>({${n.oldSingleExportName}:e}))`})`;
2210
2210
  }
2211
2211
  return i;
2212
2212
  });
2213
2213
  }
2214
- const hn = /(?<![.\w\d])import\("([^"]+)"\)/gu, _i = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2215
- function yn(e) {
2216
- const t = [it];
2214
+ const gn = /(?<![.\w\d])import\("([^"]+)"\)/gu, Bi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
2215
+ function hn(e) {
2216
+ const t = [tt];
2217
2217
  return () => {
2218
2218
  for (; ; ) {
2219
- const i = wn(t);
2220
- if (Sn(t), !e.has(i))
2219
+ const i = bn(t);
2220
+ if (wn(t), !e.has(i))
2221
2221
  return e.add(i), i;
2222
2222
  }
2223
2223
  };
2224
2224
  }
2225
- const it = 0, mt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Ki = `${mt}0123456789`, vn = mt.length, bn = Ki.length;
2226
- function wn(e) {
2227
- let t = mt[e[0]];
2225
+ const tt = 0, ut = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", _i = `${ut}0123456789`, yn = ut.length, vn = _i.length;
2226
+ function bn(e) {
2227
+ let t = ut[e[0]];
2228
2228
  for (let i = 1; i < e.length; ++i)
2229
- t += Ki[e[i]];
2229
+ t += _i[e[i]];
2230
2230
  return t;
2231
2231
  }
2232
- function Sn(e) {
2232
+ function wn(e) {
2233
2233
  let t = e.length - 1;
2234
2234
  for (; t >= 0; ) {
2235
- const i = t === 0 ? vn : bn;
2235
+ const i = t === 0 ? yn : vn;
2236
2236
  if (e[t] += 1, e[t] >= i)
2237
- e[t] = it, t--;
2237
+ e[t] = tt, t--;
2238
2238
  else
2239
2239
  return;
2240
2240
  }
2241
- e.push(it);
2241
+ e.push(tt);
2242
2242
  }
2243
2243
  function De(e = j(), t = !1) {
2244
2244
  const i = e.version.includes("next"), s = e.name === "@esri/calcite-components";
2245
2245
  if (s && i)
2246
2246
  return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/${ce}/`;
2247
- const r = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", n = Cn(e.name), a = En(e.version);
2247
+ const n = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = Sn(e.name), a = Cn(e.version);
2248
2248
  if (a === void 0)
2249
2249
  throw Error(
2250
2250
  b(
@@ -2252,20 +2252,20 @@ function De(e = j(), t = !1) {
2252
2252
  `Failed to parse a semver version: ${e.name}. Ensure the version follows D.D.D format. Package version: ${e.version}`
2253
2253
  )
2254
2254
  );
2255
- return n.length === 0 ? `https://${r}/${a}/` : s ? `https://${r}/${n}/${a}/` : `https://${r}/${a}/${n}/`;
2255
+ return r.length === 0 ? `https://${n}/${a}/` : s ? `https://${n}/${r}/${a}/` : `https://${n}/${a}/${r}/`;
2256
2256
  }
2257
- const Cn = (e) => e.split("/").pop() ?? e;
2258
- function En(e) {
2257
+ const Sn = (e) => e.split("/").pop() ?? e;
2258
+ function Cn(e) {
2259
2259
  const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
2260
2260
  if (i?.groups === void 0)
2261
2261
  return;
2262
- const { major: s, minor: r, patch: n, prerelease: a } = i.groups, l = `${s}.${r}.${n}`;
2262
+ const { major: s, minor: n, patch: r, prerelease: a } = i.groups, l = `${s}.${n}.${r}`;
2263
2263
  return a?.startsWith("-next") ? `${l}-next` : l;
2264
2264
  }
2265
- async function Tn(e, t, i, s, r) {
2266
- const n = t.packageName, { hasCss: a, cdnName: l } = await Wi(t.packageLocation) ?? {};
2265
+ async function En(e, t, i, s, n) {
2266
+ const r = t.packageName, { hasCss: a, cdnName: l } = await Ki(t.packageLocation) ?? {};
2267
2267
  if (i === "cdn") {
2268
- const m = t.cdnUrl ?? De(t.packageJson, r);
2268
+ const m = t.cdnUrl ?? De(t.packageJson, n);
2269
2269
  return [
2270
2270
  ...a ? [
2271
2271
  {
@@ -2285,10 +2285,10 @@ async function Tn(e, t, i, s, r) {
2285
2285
  }
2286
2286
  ];
2287
2287
  }
2288
- const d = `${n}/dist/${l}/${l}.css${Q}`, c = a ? [
2288
+ const d = `${r}/dist/${l}/${l}.css${Q}`, c = a ? [
2289
2289
  `import styles$${s} from "${d}";`,
2290
2290
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2291
- ] : [], p = `${n}/dist/esm/loader.js`;
2291
+ ] : [], p = `${r}/dist/esm/loader.js`;
2292
2292
  return [
2293
2293
  {
2294
2294
  /*
@@ -2300,45 +2300,45 @@ async function Tn(e, t, i, s, r) {
2300
2300
  ...c,
2301
2301
  `import { defineCustomElements as defineCustomElements$${s} } from "${p}";`,
2302
2302
  `defineCustomElements$${s}(globalThis.window, {`,
2303
- ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2303
+ ` resourcesUrl: "${lt(e, t.packageLocation)}/dist/${l}/",`,
2304
2304
  "});"
2305
2305
  ]
2306
2306
  }
2307
2307
  ];
2308
2308
  }
2309
- async function Wi(e) {
2310
- const t = u.join(e, "dist"), i = u.basename(e), r = (await ot(t)).filter(
2311
- (a) => !Di.has(a) && !a.includes(".")
2312
- ), n = r.find(
2309
+ async function Ki(e) {
2310
+ const t = u.join(e, "dist"), i = u.basename(e), n = (await nt(t)).filter(
2311
+ (a) => !Ri.has(a) && !a.includes(".")
2312
+ ), r = n.find(
2313
2313
  (a) => a.startsWith("arcgis-") || // This is the case for template-components and field-apps-custom-elements
2314
2314
  a === i
2315
2315
  );
2316
- return n === void 0 ? await Promise.all(
2317
- r.map(async (a) => await At(t, a))
2318
- ).then((a) => a.find(R)) : await At(t, n);
2316
+ return r === void 0 ? await Promise.all(
2317
+ n.map(async (a) => await At(t, a))
2318
+ ).then((a) => a.find(R)) : await At(t, r);
2319
2319
  }
2320
2320
  async function At(e, t) {
2321
- const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), r = u.join(e, t, `${t}.esm.js`), [n, a, l] = await Promise.all([
2321
+ const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, l] = await Promise.all([
2322
2322
  _(i),
2323
2323
  _(s),
2324
- _(r)
2324
+ _(n)
2325
2325
  ]);
2326
- return n || a || l ? {
2327
- hasCss: n,
2326
+ return r || a || l ? {
2327
+ hasCss: r,
2328
2328
  cdnName: t
2329
2329
  } : void 0;
2330
2330
  }
2331
- async function $n(e, t, i, s, r) {
2332
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Wi(t.packageLocation) : void 0, l = a?.cdnName ?? ce, d = a === void 0 ? `${Oi}.js` : `${a.cdnName}.esm.js`;
2331
+ async function Tn(e, t, i, s, n) {
2332
+ const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await Ki(t.packageLocation) : void 0, l = a?.cdnName ?? ce, d = a === void 0 ? `${Di}.js` : `${a.cdnName}.esm.js`;
2333
2333
  if (i === "cdn")
2334
2334
  return {
2335
2335
  tag: "script",
2336
2336
  attrs: {
2337
2337
  type: "module",
2338
- src: `${t.cdnUrl ?? De(t.packageJson, r)}${d}`
2338
+ src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
2339
2339
  }
2340
2340
  };
2341
- const c = Pn(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Q}`, m = [
2341
+ const c = $n(t.packageJson), p = `${t.packageName}/${u.normalize(c)}${Q}`, m = [
2342
2342
  `import styles$${s} from "${p}";`,
2343
2343
  `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
2344
2344
  ], f = `${t.packageName}/loader`;
@@ -2352,36 +2352,36 @@ async function $n(e, t, i, s, r) {
2352
2352
  ...m,
2353
2353
  `import { defineCustomElements as defineCustomElements$${s} } from "${f}";`,
2354
2354
  `defineCustomElements$${s}({`,
2355
- ` resourcesUrl: "${dt(e, t.packageLocation)}/dist/${l}/",`,
2355
+ ` resourcesUrl: "${lt(e, t.packageLocation)}/dist/${l}/",`,
2356
2356
  "});"
2357
2357
  ]
2358
2358
  };
2359
2359
  }
2360
- function Pn(e) {
2360
+ function $n(e) {
2361
2361
  const { exports: t } = e;
2362
2362
  if (t === void 0)
2363
2363
  throw new Error(
2364
2364
  `Package "${e.name}" does not have an "exports" field. All Lumina packages must include an "exports" field.`
2365
2365
  );
2366
- const i = Object.entries(t).filter(([r]) => u.extname(r) === ".css"), s = i.find(([, r]) => r === `./${Z}.css`);
2366
+ const i = Object.entries(t).filter(([n]) => u.extname(n) === ".css"), s = i.find(([, n]) => n === `./${Z}.css`);
2367
2367
  return s ? s[0] : i.length > 0 ? i[0][0] : `./${Z}.css`;
2368
2368
  }
2369
2369
  async function ne(e, t) {
2370
- return t !== void 0 ? await Lt(e, t) : (e._loadersCache ??= Lt(e), await e._loadersCache);
2370
+ return t !== void 0 ? await xt(e, t) : (e._loadersCache ??= xt(e), await e._loadersCache);
2371
2371
  }
2372
- async function Lt(e, t) {
2373
- const i = e.viteCommand === "build" ? "cdn" : "lazyNpm", s = e.environment === "development", r = t ?? e.viteConfig.base;
2374
- let n = 0;
2372
+ async function xt(e, t) {
2373
+ const i = e.viteCommand === "build" ? "cdn" : "lazyNpm", s = e.environment === "development", n = t ?? e.viteConfig.base;
2374
+ let r = 0;
2375
2375
  const a = async (m) => (await Promise.all(
2376
2376
  m.map(async (f) => {
2377
- const g = n++;
2378
- return f.type === "stencil" ? await Tn(r, f, i, g, s) : f.type === "@arcgis/lumina" ? await $n(r, f, i, g, s) : void 0;
2377
+ const g = r++;
2378
+ return f.type === "stencil" ? await En(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await Tn(n, f, i, g, s) : void 0;
2379
2379
  })
2380
2380
  )).filter(R).flat(), l = await Promise.all([
2381
2381
  // This may contain an import map so must be first
2382
- Zr(e, r, i, s),
2382
+ Qr(e, n, i, s),
2383
2383
  re.then(a),
2384
- Ui(e).then(a)
2384
+ Wi(e).then(a)
2385
2385
  ]), d = u.join(e.dir.src, "loader.ts"), c = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? ce}/` : void 0);
2386
2386
  return [
2387
2387
  ...l.flat(),
@@ -2400,27 +2400,27 @@ async function Lt(e, t) {
2400
2400
  }
2401
2401
  ];
2402
2402
  }
2403
- async function Ui(e) {
2403
+ async function Wi(e) {
2404
2404
  const t = e.options?.serve?.extraDependencies ?? [];
2405
2405
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
2406
2406
  t.map(async (i) => {
2407
- const s = typeof i == "string" ? void 0 : i, r = typeof i == "string" ? i : i.name, n = await Pi(r);
2408
- if (n === void 0)
2407
+ const s = typeof i == "string" ? void 0 : i, n = typeof i == "string" ? i : i.name, r = await $i(n);
2408
+ if (r === void 0)
2409
2409
  throw Error(
2410
2410
  b(
2411
2411
  "@arcgis/lumina:computeServeOnlyDependencies",
2412
- `Unable to resolve extra dependency "${r}". Make sure it is a valid Stencil or Lumina package.`
2412
+ `Unable to resolve extra dependency "${n}". Make sure it is a valid Stencil or Lumina package.`
2413
2413
  )
2414
2414
  );
2415
2415
  return {
2416
- ...n,
2416
+ ...r,
2417
2417
  cdnUrl: s?.getCdnUrl(e)
2418
2418
  };
2419
2419
  })
2420
2420
  ).then((i) => i.filter(R)), await e._serveOnlyDependencies);
2421
2421
  }
2422
- const kn = "/C:@arcgis/lumina-compiler/testSetupFile", In = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, Ue = [kn];
2423
- async function xn(e) {
2422
+ const Pn = "/C:@arcgis/lumina-compiler/testSetupFile", kn = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Pn];
2423
+ async function In(e) {
2424
2424
  if (
2425
2425
  /**
2426
2426
  * Only import custom element dependencies if we are running in Vitest browser mode.
@@ -2432,8 +2432,8 @@ async function xn(e) {
2432
2432
  */
2433
2433
  !e.apiJsonEnabled
2434
2434
  )
2435
- return Nt(e);
2436
- const i = (await ne(e)).map((s, r) => {
2435
+ return Lt(e);
2436
+ const i = (await ne(e)).map((s, n) => {
2437
2437
  if ("javascriptCode" in s)
2438
2438
  return s.javascriptCode.join(`
2439
2439
  `);
@@ -2443,8 +2443,8 @@ async function xn(e) {
2443
2443
  * The $index naming is already used by makeLoaders(), so we use the
2444
2444
  * $t prefix to avoid collisions.
2445
2445
  */
2446
- `import styles$t${r} from "${s.cssHref}${Q}";`,
2447
- `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${r}.styleSheet];`
2446
+ `import styles$t${n} from "${s.cssHref}${Q}";`,
2447
+ `document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$t${n}.styleSheet];`
2448
2448
  ].join(`
2449
2449
  `);
2450
2450
  throw Error(
@@ -2456,18 +2456,18 @@ async function xn(e) {
2456
2456
  }).join(`
2457
2457
 
2458
2458
  `);
2459
- return [Nt(e), i].join("");
2459
+ return [Lt(e), i].join("");
2460
2460
  }
2461
- const Nt = (e) => [e.isInPuppeteerTestBackEnd ? An : "", Ln].join(""), An = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2461
+ const Lt = (e) => [e.isInPuppeteerTestBackEnd ? An : "", xn].join(""), An = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
2462
2462
  setupPuppeteerTest();
2463
- `, Ln = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2463
+ `, xn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
2464
2464
  setupLuminaTest();
2465
- `, Nn = "@arcgis/lumina:generateLoaderTs";
2465
+ `, Ln = "@arcgis/lumina:generateLoaderTs";
2466
2466
  let Ne;
2467
- function jn(e) {
2467
+ function Nn(e) {
2468
2468
  const t = /[\\\/]src[\\\/]loader\.ts$/u;
2469
- return [_s(e.apiExtractorPluginConfig), {
2470
- name: Nn,
2469
+ return [Bs(e.apiExtractorPluginConfig), {
2470
+ name: Ln,
2471
2471
  configResolved() {
2472
2472
  Ne = `${e.dir.root}src/loader.ts`;
2473
2473
  },
@@ -2482,7 +2482,7 @@ function jn(e) {
2482
2482
  id: t
2483
2483
  },
2484
2484
  async handler() {
2485
- return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, kr(e);
2485
+ return e.apiJsonDeferred !== void 0 && await e.apiJsonDeferred.promise, Pr(e);
2486
2486
  }
2487
2487
  },
2488
2488
  async handleHotUpdate() {
@@ -2492,27 +2492,27 @@ function jn(e) {
2492
2492
  name: "@arcgis/lumina:generateTestSetupVirtualFile",
2493
2493
  load: {
2494
2494
  filter: {
2495
- id: In
2495
+ id: kn
2496
2496
  },
2497
- handler: async () => await xn(e)
2497
+ handler: async () => await In(e)
2498
2498
  }
2499
2499
  }];
2500
2500
  }
2501
- function jt(e) {
2501
+ function Nt(e) {
2502
2502
  const t = e.server.moduleGraph.getModuleById(Ne);
2503
2503
  t !== void 0 && e.server.moduleGraph.invalidateModule(t);
2504
2504
  }
2505
- const Ft = (e) => {
2505
+ const jt = (e) => {
2506
2506
  e.server.ws.send({
2507
2507
  type: "full-reload",
2508
2508
  path: u.join("/", u.relative(e.dir.root, Ne))
2509
2509
  });
2510
2510
  };
2511
- function Fn(e) {
2511
+ function jn(e) {
2512
2512
  let t;
2513
2513
  const i = () => [
2514
2514
  ...e.options.assets?.transformers ?? [],
2515
- ...pt
2515
+ ...dt
2516
2516
  ];
2517
2517
  return {
2518
2518
  name: "@arcgis/lumina:handleStaticAssets",
@@ -2531,102 +2531,102 @@ function Fn(e) {
2531
2531
  * `configureServer`.
2532
2532
  */
2533
2533
  configResolved() {
2534
- e.viteCommand === "serve" && (t = Rt(e));
2534
+ e.viteCommand === "serve" && (t = Ft(e));
2535
2535
  },
2536
2536
  options() {
2537
- e.viteCommand === "build" && (t = Rt(e));
2537
+ e.viteCommand === "build" && (t = Ft(e));
2538
2538
  },
2539
2539
  async configureServer(s) {
2540
- e.server = s, te(e, await t, i()), s.watcher.on("addDir", (r) => {
2541
- if (r.endsWith("assets")) {
2542
- const n = u.dirname(r);
2543
- u.join(n, "/") === e.dir.root ? te(e, [Hi], i()) : r.startsWith(e.dir.srcComponents) && te(e, [zi(r, n)], i());
2540
+ e.server = s, te(e, await t, i()), s.watcher.on("addDir", (n) => {
2541
+ if (n.endsWith("assets")) {
2542
+ const r = u.dirname(n);
2543
+ u.join(r, "/") === e.dir.root ? te(e, [zi], i()) : n.startsWith(e.dir.srcComponents) && te(e, [Ui(n, r)], i());
2544
2544
  }
2545
2545
  });
2546
2546
  },
2547
2547
  async writeBundle() {
2548
- await xi(e, await t, i());
2548
+ await Ii(e, await t, i());
2549
2549
  }
2550
2550
  };
2551
2551
  }
2552
- async function Rt(e) {
2552
+ async function Ft(e) {
2553
2553
  const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2554
- i.map(async (r) => {
2555
- const n = u.dirname(r), a = u.join(n, "assets");
2556
- return await _(a) ? zi(a, n) : void 0;
2554
+ i.map(async (n) => {
2555
+ const r = u.dirname(n), a = u.join(r, "assets");
2556
+ return await _(a) ? Ui(a, r) : void 0;
2557
2557
  })
2558
2558
  );
2559
- return await t && s.push(Hi), s.filter(R);
2559
+ return await t && s.push(zi), s.filter(R);
2560
2560
  }
2561
- const zi = (e, t) => ({
2561
+ const Ui = (e, t) => ({
2562
2562
  type: "directory",
2563
2563
  source: e,
2564
2564
  destination: u.basename(t)
2565
- }), Hi = { type: "directory", source: "assets/", destination: "" }, ze = "@arcgis/lumina:printTotalBuildSize", Rn = (e) => ({
2566
- name: ze,
2565
+ }), zi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Fn = (e) => ({
2566
+ name: Ue,
2567
2567
  apply: () => e.viteCommand === "build",
2568
2568
  configResolved(t) {
2569
- const i = t.plugins.find(({ name: r }) => r === "vite:reporter");
2569
+ const i = t.plugins.find(({ name: n }) => n === "vite:reporter");
2570
2570
  if (i === void 0) {
2571
2571
  if ("rolldownVersion" in this.meta)
2572
2572
  return;
2573
- T.warn(ze, "Unable to find the vite's built-in vite:reporter plugin");
2573
+ T.warn(Ue, "Unable to find the vite's built-in vite:reporter plugin");
2574
2574
  return;
2575
2575
  }
2576
2576
  const s = i.writeBundle;
2577
2577
  if (typeof s != "function")
2578
- throw Error(b(ze, "Expected vite:reporter to declare a writeBundle() function"));
2579
- i.writeBundle = async function(n, a) {
2578
+ throw Error(b(Ue, "Expected vite:reporter to declare a writeBundle() function"));
2579
+ i.writeBundle = async function(r, a) {
2580
2580
  let l = 0, d = 0, c = 0, p = 0;
2581
2581
  const m = console.log;
2582
2582
  console.log = function(...g) {
2583
2583
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2584
- const [h, y] = g[0].match(On) ?? [];
2584
+ const [h, y] = g[0].match(Dn) ?? [];
2585
2585
  if (!h)
2586
2586
  return;
2587
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Mn, "").length);
2587
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(On, "").length);
2588
2588
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2589
2589
  y ? (c += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : l += v;
2590
2590
  }
2591
2591
  };
2592
2592
  try {
2593
- await s.call(this, n, a);
2593
+ await s.call(this, r, a);
2594
2594
  } finally {
2595
2595
  console.log = m;
2596
2596
  }
2597
2597
  if (d > 0) {
2598
- const g = c > 0 ? d : l, h = Mt(g), y = e.dir.relativeDist;
2598
+ const g = c > 0 ? d : l, h = Ot(g), y = e.dir.relativeDist;
2599
2599
  console.log(
2600
2600
  [
2601
- Ot,
2601
+ Dt,
2602
2602
  y,
2603
- Dn,
2603
+ Rn,
2604
2604
  "*",
2605
2605
  " ".repeat(p - `${y}*`.length - h.length),
2606
2606
  h,
2607
- Dt,
2608
- c > 0 ? ` ${Ot}│ gzip: ${Mt(c)}${Dt}` : ""
2607
+ Rt,
2608
+ c > 0 ? ` ${Dt}│ gzip: ${Ot(c)}${Rt}` : ""
2609
2609
  ].join("")
2610
2610
  );
2611
2611
  }
2612
2612
  };
2613
2613
  }
2614
- }), Dt = "\x1B[22m\x1B[1m\x1B[22m", Ot = "\x1B[2m", Dn = "\x1B[22m\x1B[36m", On = /\d+(?:,\d+)?\.\d{2} kB/gu, Mn = /\x1B\[\d+m/gu, Jn = new Intl.NumberFormat("en", {
2614
+ }), Rt = "\x1B[22m\x1B[1m\x1B[22m", Dt = "\x1B[2m", Rn = "\x1B[22m\x1B[36m", Dn = /\d+(?:,\d+)?\.\d{2} kB/gu, On = /\x1B\[\d+m/gu, Mn = new Intl.NumberFormat("en", {
2615
2615
  maximumFractionDigits: 2,
2616
2616
  minimumFractionDigits: 2
2617
- }), Mt = (e) => `${Jn.format(e)} kB`, Bn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", ut.slice(0, -3))), qi = "packages/core-packages/core/src", _n = "packages/core-packages/core/output/npm/esm", de = !import.meta.url.includes("node_modules");
2618
- function Vi({ command: e }) {
2617
+ }), Ot = (e) => `${Mn.format(e)} kB`, Jn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", pt.slice(0, -3))), Hi = "packages/core-packages/core/src", Bn = "packages/core-packages/core/output/npm/esm", de = !import.meta.url.includes("node_modules");
2618
+ function qi({ command: e }) {
2619
2619
  return e === "serve" && process.argv.includes("--local-core");
2620
2620
  }
2621
- const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2622
- name: Jt,
2621
+ const Mt = "@arcgis/lumina:configureVite", _n = (e) => ({
2622
+ name: Mt,
2623
2623
  async config({
2624
2624
  server: t,
2625
2625
  publicDir: i,
2626
- build: { cssMinify: s, target: r, sourcemap: n, lib: a, rollupOptions: { output: l = [] } = {}, watch: d, emptyOutDir: c } = {},
2626
+ build: { cssMinify: s, target: n, sourcemap: r, lib: a, rollupOptions: { output: l = [] } = {}, watch: d, emptyOutDir: c } = {},
2627
2627
  test: p = {}
2628
2628
  }, m) {
2629
- const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && de && Vi(m) ? si(qi, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2629
+ const f = d != null, { include: g, browser: h, environment: y, forceRerunTriggers: v } = p, w = H && de && qi(m) ? ii(Hi, import.meta.dirname) : void 0, C = w === void 0 ? [] : [
2630
2630
  G(u.join(w, "**/*.{ts,tsx,mjs}")),
2631
2631
  `!${G(u.join(w, "**/*.d.ts"))}`
2632
2632
  ], E = {
@@ -2637,9 +2637,9 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2637
2637
  * the CDN build
2638
2638
  */
2639
2639
  loader: "src/loader.ts"
2640
- }, { loader: P, ...x } = E, S = e.environment === "development" || e.isInTest ? {
2640
+ }, { loader: P, ...A } = E, S = e.environment === "development" || e.isInTest ? {
2641
2641
  "process.env.ESRI_INTERNAL": "true"
2642
- } : void 0, A = {
2642
+ } : void 0, x = {
2643
2643
  /**
2644
2644
  * Dependency pre-bundling by default scouts all index.html files to find
2645
2645
  * what dependencies are used. Since Lumina adds imports to index.html
@@ -2652,7 +2652,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2652
2652
  * is not visible to dep-optimizer's ESBuild instance.
2653
2653
  */
2654
2654
  entries: [
2655
- ...Object.values(x),
2655
+ ...Object.values(A),
2656
2656
  ...await e.componentFilesPromise,
2657
2657
  ...C,
2658
2658
  // Vitest scans setup files, but misses Lumina's because we add it
@@ -2751,10 +2751,10 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2751
2751
  "@lit/context"
2752
2752
  ]
2753
2753
  };
2754
- if (typeof p.setupFiles == "string" ? p.setupFiles = [...Ue, p.setupFiles] : Array.isArray(p.setupFiles) ? p.setupFiles = [...Ue, ...p.setupFiles] : p.setupFiles = [...Ue], e.isInPuppeteerTestBackEnd) {
2754
+ if (typeof p.setupFiles == "string" ? p.setupFiles = [...We, p.setupFiles] : Array.isArray(p.setupFiles) ? p.setupFiles = [...We, ...p.setupFiles] : p.setupFiles = [...We], e.isInPuppeteerTestBackEnd) {
2755
2755
  if (h?.enabled === !0)
2756
2756
  throw Error(
2757
- b(Jt, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2757
+ b(Mt, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
2758
2758
  );
2759
2759
  return {
2760
2760
  test: {
@@ -2776,7 +2776,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2776
2776
  */
2777
2777
  forceRerunTriggers: v === void 0 ? ["**/*.{ts,tsx}"] : void 0
2778
2778
  },
2779
- optimizeDeps: A,
2779
+ optimizeDeps: x,
2780
2780
  define: S
2781
2781
  };
2782
2782
  }
@@ -2788,8 +2788,8 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2788
2788
  publicDir: i ?? !1,
2789
2789
  build: {
2790
2790
  cssMinify: s ?? (e.environment === "production" ? !0 : void 0),
2791
- target: r ?? Ii(e),
2792
- sourcemap: n ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2791
+ target: n ?? ki(e),
2792
+ sourcemap: r ?? (e.environment === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ?? !1),
2793
2793
  lib: {
2794
2794
  entry: E,
2795
2795
  formats: (a ? a.formats : void 0) ?? ["es"]
@@ -2820,7 +2820,7 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2820
2820
  */
2821
2821
  emptyOutDir: c ?? !f
2822
2822
  },
2823
- optimizeDeps: A,
2823
+ optimizeDeps: x,
2824
2824
  define: S,
2825
2825
  test: {
2826
2826
  /*
@@ -2852,66 +2852,66 @@ const Jt = "@arcgis/lumina:configureVite", Kn = (e) => ({
2852
2852
  const i = await e.componentFilesPromise;
2853
2853
  e._originalRollupInputOptions ??= t.input;
2854
2854
  const s = { ...e._originalRollupInputOptions };
2855
- i.forEach((r) => {
2856
- const n = Bn(r);
2857
- s[n] = r;
2855
+ i.forEach((n) => {
2856
+ const r = Jn(n);
2857
+ s[r] = n;
2858
2858
  }), t.input = s;
2859
2859
  }
2860
- }), Se = "@arcgis/lumina:serveLocalCdn", Wn = /^\/?@arcgis\/core(?=\/|$)/u, Gi = "/index.js", Un = je(Gi), st = `\0${Se}:index`, zn = je(st), Hn = 3e3, qn = [
2860
+ }), Se = "@arcgis/lumina:serveLocalCdn", Kn = /^\/?@arcgis\/core(?=\/|$)/u, Vi = "/index.js", Wn = je(Vi), it = `\0${Se}:index`, Un = je(it), zn = 3e3, Hn = [
2861
2861
  /^https?:\/\/localhost(?::[0-9]+)?$/u,
2862
2862
  /^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
2863
2863
  ];
2864
- function Vn(e) {
2864
+ function qn(e) {
2865
2865
  if (!H)
2866
2866
  return;
2867
- const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, r = je(s), n = `\0${Se}:${i}`, a = je(n);
2867
+ const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
2868
2868
  return {
2869
2869
  name: Se,
2870
2870
  enforce: "pre",
2871
2871
  apply(l) {
2872
- const d = Yn(e, l);
2872
+ const d = Xn(e, l);
2873
2873
  return d || (e._localCdnCore = void 0), d;
2874
2874
  },
2875
2875
  config: {
2876
2876
  order: "post",
2877
2877
  handler(l, d) {
2878
- const c = l.server, p = Vi(d), m = p ? qi : _n, f = si(m, import.meta.dirname);
2878
+ const c = l.server, p = qi(d), m = p ? Hi : Bn, f = ii(m, import.meta.dirname);
2879
2879
  if (f === void 0)
2880
2880
  throw Error(b(Se, `Unable to find ${m}.`));
2881
2881
  return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
2882
2882
  server: {
2883
- port: c?.port ?? Hn,
2884
- cors: c?.cors ?? { origin: qn }
2883
+ port: c?.port ?? zn,
2884
+ cors: c?.cors ?? { origin: Hn }
2885
2885
  },
2886
2886
  resolve: {
2887
2887
  // The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
2888
2888
  // to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
2889
- alias: [{ find: Wn, replacement: f }]
2889
+ alias: [{ find: Kn, replacement: f }]
2890
2890
  }
2891
2891
  };
2892
2892
  }
2893
2893
  },
2894
2894
  resolveId: {
2895
- filter: { id: [Un, r] },
2895
+ filter: { id: [Wn, n] },
2896
2896
  handler(l) {
2897
- if (l === Gi)
2898
- return st;
2897
+ if (l === Vi)
2898
+ return it;
2899
2899
  if (l === s)
2900
- return n;
2900
+ return r;
2901
2901
  }
2902
2902
  },
2903
2903
  load: {
2904
- filter: { id: [zn, a] },
2904
+ filter: { id: [Un, a] },
2905
2905
  async handler(l) {
2906
- if (l === st)
2906
+ if (l === it)
2907
2907
  return `import ${JSON.stringify(s)};
2908
2908
  `;
2909
- if (l === n)
2910
- return await Xn(e);
2909
+ if (l === r)
2910
+ return await Gn(e);
2911
2911
  }
2912
2912
  },
2913
2913
  handleHotUpdate({ file: l, server: d }) {
2914
- if (Gn(l, e._localCdnCore?.sourceLocation))
2914
+ if (Vn(l, e._localCdnCore?.sourceLocation))
2915
2915
  return d.ws.send({ type: "full-reload" }), [];
2916
2916
  }
2917
2917
  };
@@ -2919,30 +2919,30 @@ function Vn(e) {
2919
2919
  function je(e) {
2920
2920
  return new RegExp(`^${RegExp.escape(e)}$`, "u");
2921
2921
  }
2922
- function Gn(e, t) {
2922
+ function Vn(e, t) {
2923
2923
  return t !== void 0 && e.startsWith(u.join(t, u.sep));
2924
2924
  }
2925
- async function Xn(e) {
2925
+ async function Gn(e) {
2926
2926
  const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
2927
- return `${(await ne(e, `${i}/`)).flatMap((r) => "javascriptCode" in r ? r.javascriptCode : []).join(`
2927
+ return `${(await ne(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
2928
2928
  `)}
2929
2929
  `;
2930
2930
  }
2931
- function Yn(e, t) {
2931
+ function Xn(e, t) {
2932
2932
  return de && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
2933
2933
  }
2934
- const Qn = (e) => ({
2934
+ const Yn = (e) => ({
2935
2935
  name: "@arcgis/lumina:setAssetPath",
2936
2936
  apply: () => e.viteCommand === "build",
2937
2937
  config: (t) => ({
2938
2938
  base: t.base ?? e.options.assets?.defaultPath ?? De()
2939
2939
  })
2940
2940
  });
2941
- function Zn(e = j()) {
2941
+ function Qn(e = j()) {
2942
2942
  const t = e.version ?? "0.0.1";
2943
- return bs(t);
2943
+ return vs(t);
2944
2944
  }
2945
- const eo = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2945
+ const Zn = (e) => `/* ${e} */`, k = (e) => (t, i) => {
2946
2946
  Object.defineProperty(t, i, {
2947
2947
  get() {
2948
2948
  throw Error(
@@ -2980,9 +2980,9 @@ const ue = {
2980
2980
  webTypes: "docs/web-types.json",
2981
2981
  apiJson: "docs/api.json",
2982
2982
  stencilLikeDocsJson: "docs/docs.json"
2983
- }, rt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2984
- async function Xi(e, t, i = j()) {
2985
- const s = to(e, i), r = u.join(t, "lumina.ts"), a = await _(r) ? await z(r, "utf8") : "";
2983
+ }, st = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2984
+ async function Gi(e, t, i = j()) {
2985
+ const s = eo(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2986
2986
  if (a.trim().replaceAll(`\r
2987
2987
  `, `
2988
2988
  `) === s.trim())
@@ -3000,31 +3000,31 @@ Current content:
3000
3000
  ${a}`
3001
3001
  )
3002
3002
  );
3003
- return ni(r, s), !0;
3003
+ return ri(n, s), !0;
3004
3004
  }
3005
- function to(e, t = j()) {
3005
+ function eo(e, t = j()) {
3006
3006
  const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
3007
- /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), r = s.map(
3007
+ /// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
3008
3008
  (d, c) => `
3009
3009
  import type { JSX as JSX$${c} } from "${d.packageName}/dist/types/components";`
3010
- ), n = s.length === 0 ? "" : `
3010
+ ), r = s.length === 0 ? "" : `
3011
3011
 
3012
3012
  declare module "@arcgis/lumina" {
3013
3013
  interface ImportStencilElements extends ${s.map((d, c) => `JSX$${c}.IntrinsicElements`).join(", ")} {}
3014
3014
  }`, a = t.devDependencies ?? {};
3015
3015
  return [
3016
- io,
3016
+ to,
3017
3017
  a.vitest ? `
3018
3018
  /// <reference types="vitest/config" />
3019
3019
  /// <reference types="vitest/browser" />` : "",
3020
3020
  ...i,
3021
- ...r,
3022
- n,
3021
+ ...n,
3022
+ r,
3023
3023
  `
3024
3024
  `
3025
3025
  ].join("");
3026
3026
  }
3027
- const io = `/**
3027
+ const to = `/**
3028
3028
  * This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
3029
3029
  * Manual edits will be overwritten.
3030
3030
  *
@@ -3032,7 +3032,7 @@ const io = `/**
3032
3032
  *
3033
3033
  * If you need to provide additional types, create a separate file.
3034
3034
  */
3035
- /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", Yi = (e, t) => e.viteCommand === "serve" && /**
3035
+ /// <reference types="@arcgis/lumina/globalTypes" />`, Ce = "@arcgis/lumina:dependencySupport", Xi = (e, t) => e.viteCommand === "serve" && /**
3036
3036
  * Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
3037
3037
  * However, it is a bit buggy (see
3038
3038
  * https://github.com/vitejs/vite/issues/19213). Instead, we are using test
@@ -3043,13 +3043,13 @@ const io = `/**
3043
3043
  * is doing:
3044
3044
  * https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
3045
3045
  */
3046
- e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, so = (e) => ({
3046
+ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, io = (e) => ({
3047
3047
  name: Ce,
3048
3048
  async configureServer(t) {
3049
- H && (e.server = t, await tn(e));
3049
+ H && (e.server = t, await en(e));
3050
3050
  },
3051
3051
  configResolved() {
3052
- !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ro(e).catch(
3052
+ !e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = so(e).catch(
3053
3053
  (t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
3054
3054
  ));
3055
3055
  },
@@ -3057,22 +3057,22 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3057
3057
  // Add imports to index.html before Vite starts resolving imports
3058
3058
  order: "pre",
3059
3059
  async handler(t, i) {
3060
- return Yi(e, i) ? (await ne(e)).map(
3061
- (r) => "javascriptCode" in r ? {
3060
+ return Xi(e, i) ? (await ne(e)).map(
3061
+ (n) => "javascriptCode" in n ? {
3062
3062
  tag: "script",
3063
3063
  attrs: {
3064
3064
  type: "module"
3065
3065
  },
3066
- children: r.javascriptCode.join(`
3066
+ children: n.javascriptCode.join(`
3067
3067
  `)
3068
- } : "cssHref" in r ? {
3068
+ } : "cssHref" in n ? {
3069
3069
  tag: "link",
3070
3070
  attrs: {
3071
3071
  rel: "stylesheet",
3072
- href: r.cssHref,
3073
- id: r.id
3072
+ href: n.cssHref,
3073
+ id: n.id
3074
3074
  }
3075
- } : r
3075
+ } : n
3076
3076
  ) : void 0;
3077
3077
  }
3078
3078
  },
@@ -3099,38 +3099,38 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
3099
3099
  await e._updateLuminaTsPromise;
3100
3100
  }
3101
3101
  });
3102
- async function ro(e) {
3103
- const i = (await Promise.all([re, Ui(e)])).flat();
3104
- if (!await Xi(i, e.dir.src))
3102
+ async function so(e) {
3103
+ const i = (await Promise.all([re, Wi(e)])).flat();
3104
+ if (!await Gi(i, e.dir.src))
3105
3105
  return;
3106
- let r = !1;
3107
- function n() {
3108
- r || T.warn(Ce, no), r = !0;
3106
+ let n = !1;
3107
+ function r() {
3108
+ n || T.warn(Ce, ro), n = !0;
3109
3109
  }
3110
3110
  process.on("exit", () => {
3111
- n(), clearTimeout(l);
3111
+ r(), clearTimeout(l);
3112
3112
  });
3113
- const l = setTimeout(n, 2e3);
3113
+ const l = setTimeout(r, 2e3);
3114
3114
  }
3115
- const no = Ks(
3115
+ const ro = _s(
3116
3116
  "greenBright",
3117
3117
  `lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
3118
3118
  If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
3119
3119
  );
3120
- async function oo(e) {
3121
- const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Us(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Et(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3120
+ async function no(e) {
3121
+ const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Ws(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Ct(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
3122
3122
  e._documentationFileNames.apiJson = i?.context?.apiJsonEmitPath === void 0 ? e.options.documentation?.apiJsonFileName === !1 ? void 0 : e.options.documentation?.apiJsonFileName ? pe(e.options.documentation.apiJsonFileName) : ue.apiJson : i.context.apiJsonEmitPath || void 0, e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
3123
3123
  {
3124
3124
  type: "dynamic",
3125
- source: () => JSON.stringify(e.apiJson, null, rt(e)),
3125
+ source: () => JSON.stringify(e.apiJson, null, st(e)),
3126
3126
  destination: u.join("../..", e._documentationFileNames.apiJson)
3127
3127
  }
3128
3128
  ]);
3129
- const s = i?.types?.typeScriptConfig ?? zs(
3129
+ const s = i?.types?.typeScriptConfig ?? Us(
3130
3130
  process.cwd(),
3131
3131
  e.options.types?.tsconfigPath ?? i?.types?.typeScriptConfigPath,
3132
3132
  !0
3133
- ), r = {
3133
+ ), n = {
3134
3134
  ...s,
3135
3135
  config: {
3136
3136
  ...s.config,
@@ -3141,7 +3141,7 @@ async function oo(e) {
3141
3141
  }
3142
3142
  }
3143
3143
  };
3144
- let n = !1;
3144
+ let r = !1;
3145
3145
  const a = {
3146
3146
  context: {
3147
3147
  apiJsonEmitPath: "",
@@ -3153,7 +3153,7 @@ async function oo(e) {
3153
3153
  declarationTextTransformers: e.options.types?.declarationTextTransformers?.map(
3154
3154
  (c) => (p) => c(p, e)
3155
3155
  ),
3156
- typeScriptConfig: r,
3156
+ typeScriptConfig: n,
3157
3157
  // Already merged, so pass empty object to avoid merging again
3158
3158
  compilerOptions: {}
3159
3159
  },
@@ -3172,7 +3172,7 @@ async function oo(e) {
3172
3172
  if ([...p.addedModules, ...p.removedModules].some(
3173
3173
  (f) => Pe(f.sourcePath, "src/components/")
3174
3174
  ))
3175
- jt(e), Ft(e);
3175
+ Nt(e), jt(e);
3176
3176
  else {
3177
3177
  for (const f of p.changedModules) {
3178
3178
  if (!Pe(f.new.sourcePath, "src/components/"))
@@ -3185,40 +3185,40 @@ async function oo(e) {
3185
3185
  if (g === void 0 && h === void 0)
3186
3186
  continue;
3187
3187
  if (g !== void 0 && h === void 0 || g === void 0 && h !== void 0 || g.tagName !== h.tagName || g.formAssociated !== h.formAssociated) {
3188
- Ft(e);
3188
+ jt(e);
3189
3189
  break;
3190
3190
  }
3191
- const y = Ci(h);
3191
+ const y = Si(h);
3192
3192
  e.server.ws.send({ type: "custom", event: "component-meta-update", data: y });
3193
3193
  }
3194
- jt(e);
3194
+ Nt(e);
3195
3195
  }
3196
- Bt(e, p.apiJson);
3196
+ Jt(e, p.apiJson);
3197
3197
  }
3198
3198
  }
3199
3199
  },
3200
3200
  afterApiJsonCreate: (c) => {
3201
- e.options.apiJson?.afterCreate?.(c.apiJson, !n), n = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Bt(e, c.apiJson));
3201
+ e.options.apiJson?.afterCreate?.(c.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Jt(e, c.apiJson));
3202
3202
  }
3203
- }, l = i === void 0 ? a : Et(i, a);
3203
+ }, l = i === void 0 ? a : Ct(i, a);
3204
3204
  e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = l;
3205
3205
  const d = e.apiExtractorPluginConfig.afterExtractorCreated;
3206
3206
  e.apiExtractorPluginConfig.afterExtractorCreated = (c) => {
3207
3207
  e.apiExtractor = c, d?.(c);
3208
3208
  };
3209
3209
  }
3210
- function Bt(e, t) {
3211
- const i = { ...t, modules: [] }, s = [], r = e.viteCommand === "build" ? [] : void 0;
3212
- for (const n of t.modules) {
3213
- const a = { ...n, declarations: [] };
3210
+ function Jt(e, t) {
3211
+ const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3212
+ for (const r of t.modules) {
3213
+ const a = { ...r, declarations: [] };
3214
3214
  let l = !1;
3215
- for (const d of n.declarations) {
3215
+ for (const d of r.declarations) {
3216
3216
  if (d.customElement !== !0) {
3217
3217
  a.declarations.push(d);
3218
3218
  continue;
3219
3219
  }
3220
3220
  const c = d;
3221
- if (r?.push(n.sourcePath), c.privacy !== void 0) {
3221
+ if (n?.push(r.sourcePath), c.privacy !== void 0) {
3222
3222
  l = !0;
3223
3223
  continue;
3224
3224
  }
@@ -3230,12 +3230,12 @@ function Bt(e, t) {
3230
3230
  }
3231
3231
  l || i.modules.push(a);
3232
3232
  }
3233
- e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, r !== void 0 && (e.componentFilesPromise = Promise.resolve(r));
3233
+ e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
3234
3234
  }
3235
- var ao = Object.defineProperty, I = (e, t, i, s) => {
3236
- for (var r = void 0, n = e.length - 1, a; n >= 0; n--)
3237
- (a = e[n]) && (r = a(t, i, r) || r);
3238
- return r && ao(t, i, r), r;
3235
+ var oo = Object.defineProperty, I = (e, t, i, s) => {
3236
+ for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
3237
+ (a = e[r]) && (n = a(t, i, n) || n);
3238
+ return n && oo(t, i, n), n;
3239
3239
  };
3240
3240
  const V = "@arcgis/lumina:context";
3241
3241
  class $ {
@@ -3244,14 +3244,14 @@ class $ {
3244
3244
  name: V,
3245
3245
  // Make sure these globals are available to all plugins as soon as possible
3246
3246
  enforce: "pre",
3247
- apply: (n, a) => (this._inferBuildSetup(a, n.define), !0),
3247
+ apply: (r, a) => (this._inferBuildSetup(a, r.define), !0),
3248
3248
  configResolved: {
3249
3249
  order: "pre",
3250
- handler: (n) => {
3251
- this.viteConfig = n;
3252
- const a = n.build.minify !== !1;
3250
+ handler: (r) => {
3251
+ this.viteConfig = r;
3252
+ const a = r.build.minify !== !1;
3253
3253
  this.shouldMinify = a && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
3254
- const l = u.join(n.root, u.sep), d = u.join(l, "src", u.sep), c = u.join(d, "components", u.sep), p = u.join(u.resolve(l, n.build.outDir), u.sep), m = u.join(u.relative(l, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? ce, u.sep), h = u.join(g, "assets", u.sep);
3254
+ const l = u.join(r.root, u.sep), d = u.join(l, "src", u.sep), c = u.join(d, "components", u.sep), p = u.join(u.resolve(l, r.build.outDir), u.sep), m = u.join(u.relative(l, p), u.sep), f = u.join(p, "components", u.sep), g = u.join(p, this.options.build?.cdn?.namespace ?? ce, u.sep), h = u.join(g, "assets", u.sep);
3255
3255
  if (this.dir = {
3256
3256
  root: l,
3257
3257
  src: d,
@@ -3261,7 +3261,7 @@ class $ {
3261
3261
  distComponents: f,
3262
3262
  distCdn: g,
3263
3263
  distCdnAssets: h
3264
- }, T.initialize(n.logger, l), n.root !== ii())
3264
+ }, T.initialize(r.logger, l), r.root !== ti())
3265
3265
  throw Error(
3266
3266
  b(
3267
3267
  V,
@@ -3274,17 +3274,17 @@ class $ {
3274
3274
  ) : m.startsWith("..") && T.warn(
3275
3275
  V,
3276
3276
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
3277
- ), this.isInStorybook = n.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(n.server?.hmr ?? !0), this.isInBuildWatch = n.command === "build" && n.build.watch != null;
3278
- const y = this.isInTest && n.test?.browser?.enabled === !0 && n.resolve.conditions.includes("node"), v = this.isInTest && n.test?.browser?.enabled !== !0 && n.resolve.conditions.includes("node"), w = this.viteCommand === "serve" && process.argv[1].includes("vite-node");
3277
+ ), this.isInStorybook = r.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(r.server?.hmr ?? !0), this.isInBuildWatch = r.command === "build" && r.build.watch != null;
3278
+ const y = this.isInTest && r.test?.browser?.enabled === !0 && r.resolve.conditions.includes("node"), v = this.isInTest && r.test?.browser?.enabled !== !0 && r.resolve.conditions.includes("node"), w = this.viteCommand === "serve" && process.argv[1].includes("vite-node");
3279
3279
  this.apiJsonEnabled = !y && !this.isInPuppeteerTestBackEnd && !v && !w, this.apiJsonEnabled ? (this.apiExtractorPluginConfig.serve = {
3280
3280
  extract: !0
3281
- }, (this.viteCommand === "build" ? n.build.watch : n.server.watch) === null && (this.apiJsonDeferred = Promise.withResolvers())) : (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.apiExtractorPluginConfig.serve = void 0, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0);
3281
+ }, (this.viteCommand === "build" ? r.build.watch : r.server.watch) === null && (this.apiJsonDeferred = Promise.withResolvers())) : (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.apiExtractorPluginConfig.serve = void 0, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0);
3282
3282
  const C = this.viteCommand === "serve" && !this.isInStorybook, E = this.apiExtractorPluginConfig.unsafeConfigOverride;
3283
- C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Ws({
3283
+ C && (E.context.isLuminaMinimalExtraction = !0, E.types.typeCheckedExtraction = !1, E.types.fullTypeCheck = !1), this.isInStorybook && (E.context.dtsEmitPath = ""), this._typeScriptPrinter = Ks({
3284
3284
  // Do not downlevel. ESBuild will do that if needed.
3285
3285
  target: o.ScriptTarget.ESNext,
3286
- sourceMap: n.build.sourcemap !== !1
3287
- }), Yi(this) && ne(this);
3286
+ sourceMap: r.build.sourcemap !== !1
3287
+ }), Xi(this) && ne(this);
3288
3288
  }
3289
3289
  },
3290
3290
  configureServer: {
@@ -3299,9 +3299,9 @@ class $ {
3299
3299
  * @see https://devtopia.esri.com/WebGIS/webgis-sdk/issues/5414
3300
3300
  * @see https://github.com/vitejs/vite/issues/20053
3301
3301
  */
3302
- transformIndexHtml: (n) => {
3302
+ transformIndexHtml: (r) => {
3303
3303
  if (this.isInStorybook && this.viteCommand === "build")
3304
- return n.replaceAll(/<script type="module" crossorigin src="@arcgis\/core\/[^"]+"><\/script>/gu, "");
3304
+ return r.replaceAll(/<script type="module" crossorigin src="@arcgis\/core\/[^"]+"><\/script>/gu, "");
3305
3305
  }
3306
3306
  }, this.apiExtractor = void 0, this.apiJsonDeferred = void 0, this._localDefinedComponents = void 0, this.isInCi = !!process.env.CI, this._serverConfigured = !1, this._localCdnCore = void 0, this.assetsToProvide = [], this._globalCssString = void 0, this._loadersCache = void 0, this._serveOnlyDependencies = void 0, this._customElementDependencies = /* @__PURE__ */ Object.create(null), this._silencedRules = void 0, this._updateLuminaTsPromise = void 0, this._originalRollupInputOptions = void 0, this.options = t;
3307
3307
  const i = t.documentation ?? {};
@@ -3312,23 +3312,23 @@ class $ {
3312
3312
  webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
3313
3313
  vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
3314
3314
  vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
3315
- }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = oo(this);
3315
+ }, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = no(this);
3316
3316
  const s = process.cwd().length + 1;
3317
3317
  this.componentFilesPromise = this.configsPromise.then(() => {
3318
- const n = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
3319
- for (let l = 0; l < n.length; ++l) {
3320
- const c = n[l].slice(s);
3318
+ const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
3319
+ for (let l = 0; l < r.length; ++l) {
3320
+ const c = r[l].slice(s);
3321
3321
  Pe(c, "src/components") && a.push(c);
3322
3322
  }
3323
3323
  return a;
3324
- }), Ti(void 0, t);
3325
- const r = t.build?.preamble ?? Zn();
3326
- this.banner = eo(r);
3324
+ }), Ei(void 0, t);
3325
+ const n = t.build?.preamble ?? Qn();
3326
+ this.banner = Zn(n);
3327
3327
  }
3328
3328
  _inferBuildSetup({ command: t, mode: i }, s) {
3329
- this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(Ei.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3330
- const r = s?.__IS_IN_PUPPETEER__ === !0, n = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3331
- this.isInPuppeteerTestBackEnd = n && !r, this.isInPuppeteerTestFrontEnd = n && r;
3329
+ this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(Ci.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
3330
+ const n = s?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
3331
+ this.isInPuppeteerTestBackEnd = r && !n, this.isInPuppeteerTestFrontEnd = r && n;
3332
3332
  }
3333
3333
  /**
3334
3334
  * Get TypeScript ts.SourceFile based on file name and code. Reuses existing
@@ -3336,9 +3336,9 @@ class $ {
3336
3336
  * changed.
3337
3337
  */
3338
3338
  getSourceFile(t, i) {
3339
- const s = this.apiExtractor?.program, r = s?.getTypeChecker !== void 0;
3340
- let n;
3341
- if (s !== void 0 && (n = s.getSourceFile(t), n === void 0 && r))
3339
+ const s = this.apiExtractor?.program, n = s?.getTypeChecker !== void 0;
3340
+ let r;
3341
+ if (s !== void 0 && (r = s.getSourceFile(t), r === void 0 && n))
3342
3342
  throw Error(
3343
3343
  b(
3344
3344
  V,
@@ -3346,22 +3346,22 @@ class $ {
3346
3346
  "Unable to find the TypeScript source file. Expected all files that are part of Vite's transform to also be part of TypeScript program."
3347
3347
  )
3348
3348
  );
3349
- if (n === void 0 && !r) {
3349
+ if (r === void 0 && !n) {
3350
3350
  const l = this._typeScriptSourceFiles.get(t);
3351
3351
  if (l?.text === i)
3352
3352
  return l;
3353
3353
  }
3354
- return i !== n?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && T.warn(
3354
+ return i !== r?.text && ((this.viteCommand !== "serve" || this.isInStorybook) && T.warn(
3355
3355
  V,
3356
3356
  "The Vite's transform() content didn't match TypeScript's content. This may happen if some plugin transformed a file before Lumina or Vite got out of sync with TypeScript. This may lead to false errors. Debug your build configuration or report it as a bug",
3357
3357
  t
3358
- ), n = o.createSourceFile(
3358
+ ), r = o.createSourceFile(
3359
3359
  t,
3360
3360
  i,
3361
- n?.languageVersion ?? o.ScriptTarget.Latest,
3361
+ r?.languageVersion ?? o.ScriptTarget.Latest,
3362
3362
  !1,
3363
3363
  o.ScriptKind.TSX
3364
- ), r || this._typeScriptSourceFiles.set(t, n)), n;
3364
+ ), n || this._typeScriptSourceFiles.set(t, r)), r;
3365
3365
  }
3366
3366
  /**
3367
3367
  * A utility for making Vite copy assets to the output folder during build or
@@ -3474,26 +3474,26 @@ I([
3474
3474
  I([
3475
3475
  k("configResolved()")
3476
3476
  ], $.prototype, "_typeScriptPrinter");
3477
- function co(e, t, i) {
3478
- const s = $i()[t] ?? Qi(e)[t];
3477
+ function ao(e, t, i) {
3478
+ const s = Ti()[t] ?? Yi(e)[t];
3479
3479
  if (s === void 0) {
3480
3480
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
3481
3481
  return;
3482
- const r = Re(i);
3482
+ const n = Re(i);
3483
3483
  throw Error(
3484
3484
  b(
3485
3485
  "@arcgis/lumina:resolveTagName",
3486
- `Unable to resolve the definition of the "${t}" custom element. Used in ${r}. If this is coming from an external package, make sure that package is installed as a peerDependency or a dependency. If in development-only you wish to use a component package that is defined as a devDependency, then provide serve.extraDependencies option to useLumina()`
3486
+ `Unable to resolve the definition of the "${t}" custom element. Used in ${n}. If this is coming from an external package, make sure that package is installed as a peerDependency or a dependency. If in development-only you wish to use a component package that is defined as a devDependency, then provide serve.extraDependencies option to useLumina()`
3487
3487
  )
3488
3488
  );
3489
3489
  }
3490
3490
  return s;
3491
3491
  }
3492
- function lo(e, t) {
3492
+ function co(e, t) {
3493
3493
  return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
3494
3494
  }
3495
- function Qi(e) {
3496
- return e._localDefinedComponents ??= ki(
3495
+ function Yi(e) {
3496
+ return e._localDefinedComponents ??= Pi(
3497
3497
  e.privateApiJson,
3498
3498
  {
3499
3499
  packageName: void 0,
@@ -3504,35 +3504,35 @@ function Qi(e) {
3504
3504
  e.viteCommand === "build"
3505
3505
  ), e._localDefinedComponents;
3506
3506
  }
3507
- const _t = "makeRuntime(", po = "@arcgis/core", uo = "@arcgis/lumina:injectRuntimeOptions", mo = (e) => ({
3508
- name: uo,
3507
+ const Bt = "makeRuntime(", lo = "@arcgis/core", po = "@arcgis/lumina:injectRuntimeOptions", uo = (e) => ({
3508
+ name: po,
3509
3509
  transform: {
3510
3510
  filter: {
3511
3511
  id: /\/src\/runtime\.ts$/u
3512
3512
  },
3513
3513
  handler(t, i) {
3514
- const s = t.indexOf(_t);
3514
+ const s = t.indexOf(Bt);
3515
3515
  if (s === -1)
3516
3516
  throw new Error(
3517
3517
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3518
3518
  );
3519
- const r = s + _t.length, n = e.options.css?.commonStylesPath;
3519
+ const n = s + Bt.length, r = e.options.css?.commonStylesPath;
3520
3520
  return {
3521
3521
  code: [
3522
- n === void 0 ? "" : `import commonStyles from "${he(e.dir.src, n)}${Ie}";`,
3523
- t.slice(0, r),
3522
+ r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
3523
+ t.slice(0, n),
3524
3524
  "{",
3525
3525
  "defaultAssetPath:import.meta.env.BASE_URL,",
3526
3526
  'hydratedAttribute:"',
3527
- e.options.css?.hydratedAttribute ?? wi,
3527
+ e.options.css?.hydratedAttribute ?? bi,
3528
3528
  '",',
3529
- n === void 0 ? "" : "commonStyles",
3529
+ r === void 0 ? "" : "commonStyles",
3530
3530
  "}",
3531
- t.slice(r),
3531
+ t.slice(n),
3532
3532
  // Dependency injection. Lumina cannot directly import these to avoid
3533
3533
  // a cyclical dependency.
3534
3534
  H ? `
3535
- import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${po}/applications/Components/reactiveUtils.js";
3535
+ import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${lo}/applications/Components/reactiveUtils.js";
3536
3536
  createObservable,
3537
3537
  runtime.t = trackAccess;
3538
3538
  runtime.o = createObservable;
@@ -3544,41 +3544,41 @@ runtime.r = runTracked;` : ""
3544
3544
  }
3545
3545
  }
3546
3546
  });
3547
- function fo(e) {
3547
+ function mo(e) {
3548
3548
  return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${ce}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
3549
3549
  `;
3550
3550
  }
3551
- const we = "@arcgis/lumina:addNonLazyImports", go = (e) => ({
3551
+ const we = "@arcgis/lumina:addNonLazyImports", fo = (e) => ({
3552
3552
  name: we,
3553
3553
  apply: () => e.viteCommand === "build",
3554
3554
  generateBundle(t, i) {
3555
- const r = e.viteConfig.build.sourcemap !== !1 ? " " : `
3555
+ const n = e.viteConfig.build.sourcemap !== !1 ? " " : `
3556
3556
  `;
3557
- let n = !1;
3557
+ let r = !1;
3558
3558
  if (Object.entries(i).forEach(([a, l]) => {
3559
- const d = Ge(a, e.apiExtractor);
3559
+ const d = Ve(a, e.apiExtractor);
3560
3560
  if (d !== a && (l.fileName = d), l.type === "chunk") {
3561
3561
  const c = u.dirname(u.join(e.dir.dist, a)), p = d === a ? c : u.dirname(u.join(e.dir.dist, d));
3562
3562
  let m = l.code;
3563
- m = an(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (n = !0, m = fo(e) + m), m = `${e.banner}${r}${m}`, l.code = m;
3563
+ m = on(m, e, p, c), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = mo(e) + m), m = `${e.banner}${n}${m}`, l.code = m;
3564
3564
  }
3565
- }), !n && !e.isInStorybook)
3565
+ }), !r && !e.isInStorybook)
3566
3566
  throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
3567
3567
  },
3568
3568
  async writeBundle() {
3569
3569
  if (e.isInStorybook)
3570
3570
  return;
3571
3571
  const t = e._customElementDependencies, i = Object.entries(t), s = new Set(
3572
- i.map(([n]) => n).filter((n) => Pe(n, e.dir.srcComponents))
3572
+ i.map(([r]) => r).filter((r) => Pe(r, e.dir.srcComponents))
3573
3573
  );
3574
- i.forEach(([n, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3575
- if (s.has(n) || a.length === 0 && l.length === 0)
3574
+ i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: l, referencedBy: d }]) => {
3575
+ if (s.has(r) || a.length === 0 && l.length === 0)
3576
3576
  return;
3577
- const c = Zi(t, d, s);
3577
+ const c = Qi(t, d, s);
3578
3578
  if (c.forEach((p) => {
3579
3579
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...l);
3580
3580
  }), (a.length > 0 || l.length > 0) && c.length === 0) {
3581
- const p = Re(n);
3581
+ const p = Re(r);
3582
3582
  throw Error(
3583
3583
  b(
3584
3584
  we,
@@ -3592,41 +3592,41 @@ Possible causes:
3592
3592
  );
3593
3593
  }
3594
3594
  });
3595
- const r = i.flatMap(async ([n, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3596
- if (!s.has(n))
3595
+ const n = i.flatMap(async ([r, { referencedTagNames: a, referencedDeferredTagNames: l }]) => {
3596
+ if (!s.has(r))
3597
3597
  return [];
3598
- const d = u.dirname(n), c = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
3598
+ const d = u.dirname(r), c = e.dir.src + Ve(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, c);
3599
3599
  function m(P) {
3600
- const x = co(e, P, n);
3601
- if (x === void 0)
3600
+ const A = ao(e, P, r);
3601
+ if (A === void 0)
3602
3602
  return;
3603
- const S = lo(x, p);
3603
+ const S = co(A, p);
3604
3604
  if (S !== `./${p}`)
3605
- return S.startsWith(".") ? `${S}/${Kt}` : S;
3605
+ return S.startsWith(".") ? `${S}/${_t}` : S;
3606
3606
  }
3607
3607
  const f = new Set(a), g = new Set(l), h = Array.from(f, m).filter(R), y = (P) => `import "${P}";
3608
3608
  `, v = h.map(y).join(""), w = Array.from(g, (P) => {
3609
- const x = m(P);
3610
- if (x !== void 0) {
3609
+ const A = m(P);
3610
+ if (A !== void 0) {
3611
3611
  if (f.has(P)) {
3612
3612
  T.warn(
3613
3613
  we,
3614
- `"${P}" is used both with and without deferLoad in ${n} (either directly in ${n} or via a functional component). deferLoad will be ignored in this case.`
3614
+ `"${P}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
3615
3615
  );
3616
3616
  return;
3617
3617
  }
3618
- return `.set("${P}", () => import("${x}"))
3618
+ return `.set("${P}", () => import("${A}"))
3619
3619
  `;
3620
3620
  }
3621
- }).filter(R), C = `${v}export * from "./${ut}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3621
+ }).filter(R), C = `${v}export * from "./${pt}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3622
3622
  ${C}
3623
3623
  deferredLoaders${w.join("")};` : C;
3624
- return await K(u.join(e.dir.dist, p, Kt), E);
3624
+ return await K(u.join(e.dir.dist, p, _t), E);
3625
3625
  });
3626
- await Promise.all(r);
3626
+ await Promise.all(n);
3627
3627
  }
3628
- }), Kt = "index.js", Zi = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((r) => i.has(r) ? [r] : s.has(r) ? [] : (s.add(r), Zi(e, e[r].referencedBy, i, s)));
3629
- function Wt(e, t, i) {
3628
+ }), _t = "index.js", Qi = (e, t, i, s = /* @__PURE__ */ new Set()) => t.flatMap((n) => i.has(n) ? [n] : s.has(n) ? [] : (s.add(n), Qi(e, e[n].referencedBy, i, s)));
3629
+ function Kt(e, t, i) {
3630
3630
  if (ee(e))
3631
3631
  return e;
3632
3632
  {
@@ -3645,14 +3645,14 @@ function ee(e) {
3645
3645
  return (
3646
3646
  // Inlined string literal
3647
3647
  typeof e == "string" || // Syntax kinds that are never undefined
3648
- ho.has(e.kind) || // Ternary with both branches never undefined
3648
+ go.has(e.kind) || // Ternary with both branches never undefined
3649
3649
  o.isConditionalExpression(e) && ee(e.whenTrue) && ee(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
3650
- o.isBinaryExpression(e) && (yo.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3650
+ o.isBinaryExpression(e) && (ho.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
3651
3651
  (o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
3652
- o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && ar.has(e.tag.text)
3652
+ o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && or.has(e.tag.text)
3653
3653
  );
3654
3654
  }
3655
- const ho = /* @__PURE__ */ new Set([
3655
+ const go = /* @__PURE__ */ new Set([
3656
3656
  o.SyntaxKind.NumericLiteral,
3657
3657
  o.SyntaxKind.BigIntLiteral,
3658
3658
  o.SyntaxKind.StringLiteral,
@@ -3671,7 +3671,7 @@ const ho = /* @__PURE__ */ new Set([
3671
3671
  o.SyntaxKind.ClassExpression,
3672
3672
  // Trust? Trust.
3673
3673
  o.SyntaxKind.NonNullExpression
3674
- ]), yo = /* @__PURE__ */ new Set([
3674
+ ]), ho = /* @__PURE__ */ new Set([
3675
3675
  o.SyntaxKind.PlusEqualsToken,
3676
3676
  o.SyntaxKind.MinusEqualsToken,
3677
3677
  o.SyntaxKind.AsteriskAsteriskEqualsToken,
@@ -3706,42 +3706,42 @@ const ho = /* @__PURE__ */ new Set([
3706
3706
  o.SyntaxKind.SlashToken,
3707
3707
  o.SyntaxKind.PercentToken,
3708
3708
  o.SyntaxKind.AsteriskAsteriskToken
3709
- ]), vo = {
3709
+ ]), yo = {
3710
3710
  property(e, t, i, s) {
3711
- const r = bo(s, i, e), n = r?.type === "stringifiedReflected", a = r?.type === "reflected" || n;
3711
+ const n = vo(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
3712
3712
  if (a) {
3713
- const f = qe(t);
3713
+ const f = He(t);
3714
3714
  if (f === !0)
3715
- return [r.name];
3715
+ return [n.name];
3716
3716
  if (f === !1)
3717
3717
  return [];
3718
3718
  }
3719
3719
  const l = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : Ee(e, t, a), d = l[0] !== "=";
3720
3720
  if (a && d)
3721
- return [r.name, ...l];
3722
- const [c, p] = l, m = r?.type === "stringifiedNonReflected";
3723
- if (n || m) {
3724
- const f = Wt(
3721
+ return [n.name, ...l];
3722
+ const [c, p] = l, m = n?.type === "stringifiedNonReflected";
3723
+ if (r || m) {
3724
+ const f = Kt(
3725
3725
  p,
3726
3726
  e,
3727
3727
  m ? "" : void 0
3728
- ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? So(f, e) : f;
3728
+ ), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? wo(f, e) : f;
3729
3729
  if (h !== p)
3730
- return [m ? `.${i}` : r.name, c, h];
3730
+ return [m ? `.${i}` : n.name, c, h];
3731
3731
  }
3732
3732
  return [`.${i}`, ...l];
3733
3733
  },
3734
3734
  attribute(e, t, i) {
3735
- const s = t === void 0 || qe(t);
3735
+ const s = t === void 0 || He(t);
3736
3736
  if (s === !0)
3737
3737
  return [i];
3738
3738
  if (s === !1)
3739
3739
  return [];
3740
- const r = Ee(e, t, !0), a = r[0] !== "=" ? r : [r[0], Wt(r[1], e)];
3740
+ const n = Ee(e, t, !0), a = n[0] !== "=" ? n : [n[0], Kt(n[1], e)];
3741
3741
  return [i, ...a];
3742
3742
  },
3743
3743
  booleanAttribute(e, t, i) {
3744
- const s = t === void 0 || qe(t);
3744
+ const s = t === void 0 || He(t);
3745
3745
  return s === !0 ? [i] : s === !1 ? [] : [`?${i}`, ...Ee(e, t, !1)];
3746
3746
  },
3747
3747
  event(e, t, i) {
@@ -3749,8 +3749,8 @@ const ho = /* @__PURE__ */ new Set([
3749
3749
  throw new Error(
3750
3750
  `Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3751
3751
  );
3752
- const s = i.slice(2), r = wt(s);
3753
- return [`@${ui.has(r) ? s.toLowerCase() : wt(s)}=`, ...ht(e, t, void 0)];
3752
+ const s = i.slice(2), n = bt(s);
3753
+ return [`@${pi.has(n) ? s.toLowerCase() : bt(s)}=`, ...gt(e, t, void 0)];
3754
3754
  },
3755
3755
  directives(e, t) {
3756
3756
  if (t === void 0 || !o.isJsxExpression(t))
@@ -3761,12 +3761,12 @@ const ho = /* @__PURE__ */ new Set([
3761
3761
  throw new Error(
3762
3762
  `Directives prop must be an array rather than a variable or ternary expression. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3763
3763
  );
3764
- return t.expression.elements.flatMap((r) => {
3765
- if (o.isSpreadElement(r))
3764
+ return t.expression.elements.flatMap((n) => {
3765
+ if (o.isSpreadElement(n))
3766
3766
  throw new Error(
3767
3767
  `Directives prop cannot contain a spread argument - it needs to be statically analyzable. Still, the following are allowed: directives={[directiveA, condition ? a : b, c()]}. Found ${String(t.expression?.getText(e.sourceFile))}`
3768
3768
  );
3769
- return q(e, void 0, r);
3769
+ return q(e, void 0, n);
3770
3770
  });
3771
3771
  },
3772
3772
  ref(e, t) {
@@ -3778,66 +3778,66 @@ const ho = /* @__PURE__ */ new Set([
3778
3778
  (o.isArrowFunction(i) || // ref={this.a.bind(this, args)}
3779
3779
  o.isCallExpression(i) && o.isPropertyAccessExpression(i.expression) && i.expression.name.escapedText === "bind");
3780
3780
  e.neededImports.add(s ? "stabilizedRef" : "ref");
3781
- const r = s ? e.importRenames.stabilizedRef : e.importRenames.ref;
3781
+ const n = s ? e.importRenames.stabilizedRef : e.importRenames.ref;
3782
3782
  return [
3783
- o.factory.createCallExpression(o.factory.createIdentifier(r), void 0, [
3783
+ o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [
3784
3784
  q(e, void 0, t.expression)
3785
3785
  ])
3786
3786
  ];
3787
3787
  },
3788
- class: zt,
3789
- style: zt,
3790
- key: (e, t) => [ft(t, e.sourceFile)],
3788
+ class: Ut,
3789
+ style: Ut,
3790
+ key: (e, t) => [mt(t, e.sourceFile)],
3791
3791
  deferLoad(e, t, i, s) {
3792
3792
  if (typeof s != "string")
3793
3793
  throw Error("deferLoad prop is not currently supported on dynamic tag names.");
3794
- if (!lt(s))
3794
+ if (!ct(s))
3795
3795
  throw Error(`deferLoad prop is only supported on custom elements. Found ${String(s)}`);
3796
3796
  e.neededImports.add("deferLoad");
3797
- const r = e.importRenames.deferLoad;
3798
- return [o.factory.createIdentifier(r)];
3797
+ const n = e.importRenames.deferLoad;
3798
+ return [o.factory.createIdentifier(n)];
3799
3799
  }
3800
3800
  };
3801
- function bo(e, t, i) {
3801
+ function vo(e, t, i) {
3802
3802
  if (typeof e == "string") {
3803
- const n = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3804
- if (n !== void 0)
3805
- return { name: n, type: "reflected" };
3803
+ const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
3804
+ if (r !== void 0)
3805
+ return { name: r, type: "reflected" };
3806
3806
  }
3807
- const s = He(W.common, t);
3807
+ const s = ze(W.common, t);
3808
3808
  if (s !== void 0)
3809
3809
  return s;
3810
3810
  if (typeof e == "string") {
3811
- const r = He(W.perElement[e], t);
3812
- if (r !== void 0)
3813
- return r;
3814
- } else {
3815
- const r = Object.values(W.perElement).map(
3816
- (a) => He(a, t)
3817
- ), n = Xe(r, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Xe(r, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3811
+ const n = ze(W.perElement[e], t);
3818
3812
  if (n !== void 0)
3819
3813
  return n;
3814
+ } else {
3815
+ const n = Object.values(W.perElement).map(
3816
+ (a) => ze(a, t)
3817
+ ), r = Ge(n, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Ge(n, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3818
+ if (r !== void 0)
3819
+ return r;
3820
3820
  }
3821
3821
  }
3822
- function He(e, t) {
3822
+ function ze(e, t) {
3823
3823
  const i = e?.reflected?.[t];
3824
3824
  if (i !== void 0)
3825
3825
  return { name: i, type: "reflected" };
3826
3826
  const s = e?.stringifiedReflected?.[t];
3827
3827
  if (s !== void 0)
3828
3828
  return { name: s, type: "stringifiedReflected" };
3829
- const r = e?.stringifiedNonReflected?.[t];
3830
- if (r !== void 0)
3831
- return { name: r, type: "stringifiedNonReflected" };
3829
+ const n = e?.stringifiedNonReflected?.[t];
3830
+ if (n !== void 0)
3831
+ return { name: n, type: "stringifiedNonReflected" };
3832
3832
  }
3833
- function ft(e, t) {
3833
+ function mt(e, t) {
3834
3834
  if (e !== void 0 && o.isJsxExpression(e) && e.expression !== void 0)
3835
3835
  return e.expression;
3836
3836
  if (e !== void 0 && o.isStringLiteral(e))
3837
3837
  return e;
3838
3838
  throw new Error(`key prop value must be an expression. Found ${String(e?.getText(t))}`);
3839
3839
  }
3840
- function qe(e) {
3840
+ function He(e) {
3841
3841
  if (e === void 0)
3842
3842
  return !0;
3843
3843
  if (o.isJsxExpression(e)) {
@@ -3853,10 +3853,10 @@ function Ee(e, t, i = !1) {
3853
3853
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3854
3854
  );
3855
3855
  if (o.isStringLiteral(t))
3856
- return Ut(t, i);
3856
+ return Wt(t, i);
3857
3857
  if (o.isJsxExpression(t) && t.expression) {
3858
3858
  if (o.isStringLiteral(t.expression))
3859
- return Ut(t.expression, i);
3859
+ return Wt(t.expression, i);
3860
3860
  if (i) {
3861
3861
  if (o.isNumericLiteral(t.expression))
3862
3862
  return [`=${t.expression.text}`];
@@ -3864,27 +3864,27 @@ function Ee(e, t, i = !1) {
3864
3864
  return [`=${t.expression.getText(e.sourceFile)}`];
3865
3865
  }
3866
3866
  }
3867
- return ["=", ...ht(e, t, void 0)];
3867
+ return ["=", ...gt(e, t, void 0)];
3868
3868
  }
3869
- function Ut(e, t) {
3869
+ function Wt(e, t) {
3870
3870
  if (!t)
3871
3871
  return ["=", e];
3872
3872
  const i = e.text;
3873
3873
  if (i.length === 0)
3874
3874
  return [];
3875
- const s = mi(i);
3876
- if (ir(s)) {
3877
- const r = s.replaceAll('"', "&#34;");
3878
- if (r.length > s.length) {
3879
- const n = s.replaceAll("'", "&#39;");
3880
- if (n.length < r.length)
3881
- return [`='${n}'`];
3875
+ const s = ui(i);
3876
+ if (tr(s)) {
3877
+ const n = s.replaceAll('"', "&#34;");
3878
+ if (n.length > s.length) {
3879
+ const r = s.replaceAll("'", "&#39;");
3880
+ if (r.length < n.length)
3881
+ return [`='${r}'`];
3882
3882
  }
3883
- return [`="${r}"`];
3883
+ return [`="${n}"`];
3884
3884
  } else
3885
3885
  return [`=${s}`];
3886
3886
  }
3887
- function zt(e, t, i) {
3887
+ function Ut(e, t, i) {
3888
3888
  if (t !== void 0 && o.isStringLiteral(t))
3889
3889
  return [`${i}="${t.text}"`];
3890
3890
  if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
@@ -3892,28 +3892,28 @@ function zt(e, t, i) {
3892
3892
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3893
3893
  );
3894
3894
  const s = t.expression;
3895
- if (wo(s)) {
3896
- const n = i === "class" ? "safeClassMap" : "safeStyleMap";
3897
- e.neededImports.add(n);
3898
- const a = e.importRenames[n], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3895
+ if (bo(s)) {
3896
+ const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3897
+ e.neededImports.add(r);
3898
+ const a = e.importRenames[r], l = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
3899
3899
  q(e, void 0, s)
3900
3900
  ]);
3901
3901
  return [`${i}=`, l];
3902
3902
  } else
3903
3903
  return [i, ...Ee(e, t, !0)];
3904
3904
  }
3905
- const wo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3906
- function So(e, t) {
3905
+ const bo = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3906
+ function wo(e, t) {
3907
3907
  t.neededImports.add("live");
3908
3908
  const i = t.importRenames.live;
3909
3909
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
3910
3910
  typeof e == "string" ? o.factory.createStringLiteral(e) : e
3911
3911
  ]);
3912
3912
  }
3913
- function Co(e) {
3914
- if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in Ht && e.expression.arguments.length <= 1)
3913
+ function So(e) {
3914
+ if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in zt && e.expression.arguments.length <= 1)
3915
3915
  return {
3916
- propType: Ht[e.expression.expression.text],
3916
+ propType: zt[e.expression.expression.text],
3917
3917
  // To simplify checking logic in convertProps, wrap expression in JSX expression
3918
3918
  initializer: o.factory.createJsxExpression(
3919
3919
  void 0,
@@ -3922,34 +3922,34 @@ function Co(e) {
3922
3922
  )
3923
3923
  };
3924
3924
  }
3925
- const Ht = {
3925
+ const zt = {
3926
3926
  bindProperty: "property",
3927
3927
  bindAttribute: "attribute",
3928
3928
  bindBooleanAttribute: "booleanAttribute",
3929
3929
  bindEvent: "event"
3930
3930
  };
3931
- function Eo(e, t, i) {
3932
- return $o.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : li.has(e) || e.includes("-") ? "attribute" : !lt(i) && (di.has(e) || (i === Ye ? !1 : i === ke ? (
3931
+ function Co(e, t, i) {
3932
+ return To.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : ci.has(e) || e.includes("-") ? "attribute" : !ct(i) && (li.has(e) || (i === Xe ? !1 : i === ke ? (
3933
3933
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3934
- Object.values(Qe).some((n) => n.has(e))
3935
- ) : Qe[i]?.has(e) === !0)) ? Tt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (at.has(i) || ct.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Tt.has(e) ? "booleanAttribute" : "attribute" : "property";
3934
+ Object.values(Ye).some((r) => r.has(e))
3935
+ ) : Ye[i]?.has(e) === !0)) ? Et.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Xe || i !== ke && (ot.has(i) || at.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Et.has(e) ? "booleanAttribute" : "attribute" : "property";
3936
3936
  }
3937
- const To = ["class", "style", "ref", "directives", "key", "deferLoad"], $o = new Set(To), Po = (e) => typeof e != "string" || e.trim().length > 0;
3937
+ const Eo = ["class", "style", "ref", "directives", "key", "deferLoad"], To = new Set(Eo), $o = (e) => typeof e != "string" || e.trim().length > 0;
3938
3938
  function Oe({ key: e, parts: t, litTag: i }, s) {
3939
- const r = ko(t);
3940
- if (r.length % 2 === 0)
3939
+ const n = Po(t);
3940
+ if (n.length % 2 === 0)
3941
3941
  throw new Error("Normalized template parts array length must be odd");
3942
- const [n, ...a] = r;
3943
- if (typeof n != "string")
3942
+ const [r, ...a] = n;
3943
+ if (typeof r != "string")
3944
3944
  throw new Error("First normalized template part must be a string");
3945
3945
  if (i === void 0) {
3946
3946
  if (a.length === 0)
3947
- return Ve(s, e, o.factory.createStringLiteral(n));
3948
- if (n === "" && a.length === 2 && a[1] === "")
3949
- return Ve(
3947
+ return qe(s, e, o.factory.createStringLiteral(r));
3948
+ if (r === "" && a.length === 2 && a[1] === "")
3949
+ return qe(
3950
3950
  s,
3951
3951
  e,
3952
- typeof a[0] == "string" ? o.factory.createStringLiteral(n) : a[0]
3952
+ typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3953
3953
  );
3954
3954
  }
3955
3955
  const l = typeof i == "string" ? i : ae;
@@ -3957,66 +3957,66 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
3957
3957
  const d = s.importRenames[l], c = o.factory.createTaggedTemplateExpression(
3958
3958
  o.factory.createIdentifier(d),
3959
3959
  void 0,
3960
- a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(n) : o.factory.createTemplateExpression(o.factory.createTemplateHead(n), Io(a))
3960
+ a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), ko(a))
3961
3961
  );
3962
- return Ve(s, e, c);
3962
+ return qe(s, e, c);
3963
3963
  }
3964
- const ko = (e) => e.reduce(
3964
+ const Po = (e) => e.reduce(
3965
3965
  (t, i, s) => {
3966
- const r = t.at(-1), n = typeof r == "string", a = typeof i == "string";
3967
- if (n && a)
3968
- return [...t.slice(0, -1), `${r}${i}`];
3966
+ const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
3967
+ if (r && a)
3968
+ return [...t.slice(0, -1), `${n}${i}`];
3969
3969
  const d = s === e.length - 1;
3970
3970
  return !a && d ? [...t, i, ""] : !a && !d ? [...t, i, ""] : [...t, i];
3971
3971
  },
3972
3972
  [""]
3973
3973
  );
3974
- function Io(e) {
3974
+ function ko(e) {
3975
3975
  if (!(e.length % 2 === 0))
3976
3976
  throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
3977
3977
  const i = e.length / 2;
3978
- return Array.from({ length: i }, (s, r) => {
3979
- const n = r * 2, a = e[n];
3978
+ return Array.from({ length: i }, (s, n) => {
3979
+ const r = n * 2, a = e[r];
3980
3980
  if (typeof a == "string")
3981
3981
  throw new Error("Expected to receive a normalized array of parts");
3982
- const l = n + 1, d = e[l];
3982
+ const l = r + 1, d = e[l];
3983
3983
  if (typeof d != "string")
3984
3984
  throw new Error("Expected to receive a normalized array of parts");
3985
- const c = r === i - 1;
3985
+ const c = n === i - 1;
3986
3986
  return o.factory.createTemplateSpan(
3987
3987
  a,
3988
3988
  c ? o.factory.createTemplateTail(d) : o.factory.createTemplateMiddle(d)
3989
3989
  );
3990
3990
  });
3991
3991
  }
3992
- function Ve(e, t, i) {
3992
+ function qe(e, t, i) {
3993
3993
  if (t === void 0)
3994
3994
  return i;
3995
3995
  e.neededImports.add("keyed");
3996
3996
  const s = e.importRenames.keyed;
3997
3997
  return o.factory.createCallExpression(o.factory.createIdentifier(s), void 0, [t, i]);
3998
3998
  }
3999
- const es = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4000
- function ts(e, t) {
4001
- const i = gt(e);
3999
+ const Zi = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
4000
+ function es(e, t) {
4001
+ const i = ft(e);
4002
4002
  return i.length === 0 ? t : o.setSyntheticLeadingComments(
4003
4003
  t,
4004
4004
  i.map((s) => ({
4005
4005
  ...s,
4006
4006
  pos: -1,
4007
4007
  end: -1,
4008
- text: is(e.slice(s.pos, s.end))
4008
+ text: ts(e.slice(s.pos, s.end))
4009
4009
  }))
4010
4010
  );
4011
4011
  }
4012
- const gt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4013
- function xo(e) {
4014
- const t = gt(e);
4012
+ const ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
4013
+ function Io(e) {
4014
+ const t = ft(e);
4015
4015
  if (t.length === 0)
4016
4016
  return [e || " "];
4017
4017
  const i = t.reduceRight(
4018
- ([r, ...n], a) => {
4019
- const l = Ao(r), d = is(l.slice(a.pos, a.end));
4018
+ ([n, ...r], a) => {
4019
+ const l = Ao(n), d = ts(l.slice(a.pos, a.end));
4020
4020
  return [
4021
4021
  l.slice(0, a.pos),
4022
4022
  /**
@@ -4025,7 +4025,7 @@ function xo(e) {
4025
4025
  */
4026
4026
  o.factory.createNoSubstitutionTemplateLiteral(d),
4027
4027
  l.slice(a.end),
4028
- ...n
4028
+ ...r
4029
4029
  ];
4030
4030
  },
4031
4031
  [e]
@@ -4034,25 +4034,25 @@ function xo(e) {
4034
4034
  const s = i.at(-1);
4035
4035
  return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
4036
4036
  }
4037
- const is = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4037
+ const ts = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
4038
4038
  function Ao(e) {
4039
4039
  if (typeof e == "string")
4040
4040
  return e;
4041
4041
  throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
4042
4042
  }
4043
- function Lo(e, t) {
4043
+ function xo(e, t) {
4044
4044
  if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
4045
4045
  return t;
4046
4046
  const s = t.arguments[0];
4047
4047
  if (!(t.arguments.length === 1 && o.isArrowFunction(s)))
4048
4048
  return t;
4049
- const n = s.parameters.at(0);
4050
- if (!(typeof n == "object" && // If .map() callback has 3rd argument, it's not supported
4049
+ const r = s.parameters.at(0);
4050
+ if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
4051
4051
  s.parameters.length <= 2))
4052
4052
  return t;
4053
4053
  const l = ge(s.body);
4054
4054
  let d = !0, c;
4055
- if (qt(l))
4055
+ if (Ht(l))
4056
4056
  c = l;
4057
4057
  else {
4058
4058
  if (!o.isBlock(l))
@@ -4061,20 +4061,20 @@ function Lo(e, t) {
4061
4061
  if (!(v && o.isReturnStatement(v) && v.expression))
4062
4062
  return t;
4063
4063
  const C = ge(v.expression);
4064
- if (!qt(C))
4064
+ if (!Ht(C))
4065
4065
  return t;
4066
4066
  const E = l.statements.slice(0, -1);
4067
- if (E.some(ss))
4067
+ if (E.some(is))
4068
4068
  return t;
4069
4069
  d = E.length === 0, c = C;
4070
4070
  }
4071
- const p = o.isJsxElement(c) ? c.openingElement : c, m = cs(p);
4071
+ const p = o.isJsxElement(c) ? c.openingElement : c, m = as(p);
4072
4072
  if (m === -1)
4073
4073
  return t;
4074
4074
  const f = p.attributes.properties[m];
4075
4075
  if (f === void 0 || !o.isJsxAttribute(f))
4076
4076
  return t;
4077
- const g = ft(f.initializer, e.sourceFile), h = No(n, s, g, d, e);
4077
+ const g = mt(f.initializer, e.sourceFile), h = Lo(r, s, g, d, e);
4078
4078
  if (h === void 0)
4079
4079
  return t;
4080
4080
  e.liftedKeys.add(f.name), e.neededImports.add("repeat");
@@ -4096,34 +4096,34 @@ function Lo(e, t) {
4096
4096
  )
4097
4097
  ]);
4098
4098
  }
4099
- const qt = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4100
- function ss(e) {
4099
+ const Ht = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
4100
+ function is(e) {
4101
4101
  if (o.isReturnStatement(e))
4102
4102
  return !0;
4103
4103
  let t = !1;
4104
4104
  return o.visitEachChild(
4105
4105
  e,
4106
- (i) => (t ||= ss(i), i),
4106
+ (i) => (t ||= is(i), i),
4107
4107
  void 0
4108
4108
  ), t;
4109
4109
  }
4110
- function No(e, t, i, s, r) {
4111
- const n = J(i);
4112
- if (n === void 0)
4110
+ function Lo(e, t, i, s, n) {
4111
+ const r = J(i);
4112
+ if (r === void 0)
4113
4113
  return;
4114
- let a = rs(e.name, n);
4114
+ let a = ss(e.name, r);
4115
4115
  const l = t.parameters.at(1);
4116
4116
  if (l !== void 0 && o.isIdentifier(l.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
4117
- n.every(Fe, l.name)) {
4117
+ r.every(Fe, l.name)) {
4118
4118
  T.warn(
4119
4119
  "@arcgis/lumina:jsxToLitHtml",
4120
4120
  "It looks like you are trying to use .map() index as a key={} prop value. Doing so is potentially pointless and may cause performance degradation. In Lit it is safe to omit the key={} prop. If you really mean to use index as the key, then use the keyed() Lit directive directly, rather than the JSX key={} prop.",
4121
- r.sourceFile.fileName
4121
+ n.sourceFile.fileName
4122
4122
  );
4123
4123
  return;
4124
4124
  }
4125
4125
  if (!s) {
4126
- const d = Fo(n, a, t);
4126
+ const d = jo(r, a, t);
4127
4127
  if (d === void 0)
4128
4128
  return;
4129
4129
  a = d;
@@ -4162,7 +4162,7 @@ function J(e) {
4162
4162
  }
4163
4163
  return t;
4164
4164
  } else {
4165
- if (jo.has(e.kind))
4165
+ if (No.has(e.kind))
4166
4166
  return [];
4167
4167
  {
4168
4168
  const t = ge(e);
@@ -4170,7 +4170,7 @@ function J(e) {
4170
4170
  }
4171
4171
  }
4172
4172
  }
4173
- const jo = /* @__PURE__ */ new Set([
4173
+ const No = /* @__PURE__ */ new Set([
4174
4174
  o.SyntaxKind.NumericLiteral,
4175
4175
  o.SyntaxKind.BigIntLiteral,
4176
4176
  o.SyntaxKind.StringLiteral,
@@ -4179,20 +4179,20 @@ const jo = /* @__PURE__ */ new Set([
4179
4179
  o.SyntaxKind.FalseKeyword,
4180
4180
  o.SyntaxKind.NullKeyword,
4181
4181
  o.SyntaxKind.TrueKeyword
4182
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, rs = (e, t) => o.isObjectBindingPattern(e) ? Oo(e, t) : e;
4183
- function Fo(e, t, i) {
4182
+ ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, ss = (e, t) => o.isObjectBindingPattern(e) ? Do(e, t) : e;
4183
+ function jo(e, t, i) {
4184
4184
  if (e.every(Fe, t))
4185
4185
  return t;
4186
4186
  if (o.isIdentifier(t)) {
4187
- const s = o.isBlock(i.body) ? Xe(i.body.statements, (n) => Ro(n, t)) : void 0;
4187
+ const s = o.isBlock(i.body) ? Ge(i.body.statements, (r) => Fo(r, t)) : void 0;
4188
4188
  if (s === void 0)
4189
4189
  return;
4190
- const r = rs(s, e);
4191
- if (e.every(Fe, r))
4192
- return r;
4190
+ const n = ss(s, e);
4191
+ if (e.every(Fe, n))
4192
+ return n;
4193
4193
  }
4194
4194
  }
4195
- function Ro(e, t) {
4195
+ function Fo(e, t) {
4196
4196
  if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
4197
4197
  return;
4198
4198
  const i = e.declarationList.declarations[0];
@@ -4200,71 +4200,71 @@ function Ro(e, t) {
4200
4200
  }
4201
4201
  function Fe(e) {
4202
4202
  const t = this;
4203
- return o.isIdentifier(t) ? t.text === e : t.elements.some(Do, e);
4203
+ return o.isIdentifier(t) ? t.text === e : t.elements.some(Ro, e);
4204
4204
  }
4205
- function Do(e) {
4205
+ function Ro(e) {
4206
4206
  const t = this;
4207
4207
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4208
4208
  }
4209
- function Oo(e, t) {
4209
+ function Do(e, t) {
4210
4210
  let i = !1;
4211
- const s = e.elements.filter((r) => o.isIdentifier(r.name) ? t.includes(r.name.text) : (i = !0, !0));
4211
+ const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4212
4212
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
4213
4213
  }
4214
- const ns = (e, t) => t.liftedKeys.has(e);
4214
+ const rs = (e, t) => t.liftedKeys.has(e);
4215
4215
  function q(e, t, i) {
4216
4216
  if (fe(i))
4217
- return os(e, i);
4218
- const s = o.isCallExpression(i) ? Lo(e, i) : i, r = o.visitEachChild(
4217
+ return ns(e, i);
4218
+ const s = o.isCallExpression(i) ? xo(e, i) : i, n = o.visitEachChild(
4219
4219
  s,
4220
4220
  // Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
4221
4221
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
4222
4222
  e.transformationContext
4223
4223
  );
4224
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || pr(i.right)) ? Bo(r) : r;
4224
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || dr(i.right)) ? Jo(n) : n;
4225
4225
  }
4226
- function os(e, t) {
4227
- const i = as(e, t);
4226
+ function ns(e, t) {
4227
+ const i = os(e, t);
4228
4228
  return Oe(i, e);
4229
4229
  }
4230
- function as(e, t) {
4230
+ function os(e, t) {
4231
4231
  const i = "children" in t ? t.children : [];
4232
4232
  if (o.isJsxFragment(t))
4233
4233
  return { key: void 0, ...Te(i, e) };
4234
- const r = o.isJsxElement(t) ? t.openingElement : t, n = r.tagName;
4235
- if (o.isJsxNamespacedName(n))
4236
- throw Error(`JSX namespaced elements are not supported. Found ${n.getText(e.sourceFile)} `);
4237
- if (!o.isIdentifier(n) || !n.text.startsWith(n.text[0].toLowerCase()) && n.text !== _e && n.text !== Ke) {
4238
- const S = o.isIdentifier(n) && n.text === Gs ? Te(i, e) : {
4234
+ const n = o.isJsxElement(t) ? t.openingElement : t, r = n.tagName;
4235
+ if (o.isJsxNamespacedName(r))
4236
+ throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4237
+ if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== _e) {
4238
+ const S = o.isIdentifier(r) && r.text === Vs ? Te(i, e) : {
4239
4239
  // No need to wrap the function call in a lit-html tag
4240
4240
  litTag: void 0,
4241
- parts: [Jo(e, t, n, i)]
4241
+ parts: [Mo(e, t, r, i)]
4242
4242
  };
4243
4243
  return {
4244
- key: Mo(r, e),
4244
+ key: Oo(n, e),
4245
4245
  ...S
4246
4246
  };
4247
4247
  }
4248
- const l = n.text === _e ? ke : n.text === Ke ? Ye : n.text, d = n.text === _e ? oe : n.text === Ke ? Y : Ys.has(l) ? fi : at.has(l) ? ie : ae, c = lt(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4248
+ const l = r.text === Be ? ke : r.text === _e ? Xe : r.text, d = r.text === Be ? oe : r.text === _e ? Y : Xs.has(l) ? mi : ot.has(l) ? ie : ae, c = ct(l), p = c ? e.localComponents[l]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4249
4249
  let f;
4250
4250
  const g = [];
4251
4251
  let h = !1;
4252
- const y = r.attributes.properties.flatMap((x) => {
4253
- if (o.isJsxSpreadAttribute(x))
4252
+ const y = n.attributes.properties.flatMap((A) => {
4253
+ if (o.isJsxSpreadAttribute(A))
4254
4254
  throw Error(
4255
4255
  `JSX spread attribute syntax is not supported. See alternatives: https://webgis.esri.com/references/lumina/jsx#spread-attributes
4256
- Found ${x.getText(e.sourceFile)}`
4256
+ Found ${A.getText(e.sourceFile)}`
4257
4257
  );
4258
- const { name: S, initializer: A } = x;
4258
+ const { name: S, initializer: x } = A;
4259
4259
  if (o.isJsxNamespacedName(S))
4260
4260
  throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
4261
- const L = S.text, U = Co(A), F = U?.propType ?? Eo(L, A, l);
4261
+ const L = S.text, U = So(x), F = U?.propType ?? Co(L, x, l);
4262
4262
  m?.delete(L);
4263
- const N = vo[F](e, U?.initializer ?? A, L, l);
4263
+ const N = yo[F](e, U?.initializer ?? x, L, l);
4264
4264
  if (N.length === 0)
4265
4265
  return [];
4266
- const B = e.compiler.shouldMinifyJsx ? [" "] : xo(es(S, e));
4267
- return F === "key" ? (f = typeof N[0] == "object" && !ns(S, e) ? N[0] : void 0, B.some(Po) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4266
+ const B = e.compiler.shouldMinifyJsx ? [" "] : Io(Zi(S, e));
4267
+ return F === "key" ? (f = typeof N[0] == "object" && !rs(S, e) ? N[0] : void 0, B.some($o) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
4268
4268
  ...B,
4269
4269
  ...N.flatMap(
4270
4270
  (D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
@@ -4275,19 +4275,19 @@ Found ${x.getText(e.sourceFile)}`
4275
4275
  "mustIncludeAllRequiredProperties",
4276
4276
  e.sourceFile.fileName,
4277
4277
  `Missing required properties for <${l}> }: ${Array.from(m).join(", ")}`
4278
- ), g.length > 0 && y.push(...g), typeof l == "string" && ct.has(l))
4278
+ ), g.length > 0 && y.push(...g), typeof l == "string" && at.has(l))
4279
4279
  throw Error(
4280
4280
  `JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${l}" element`
4281
4281
  );
4282
4282
  c && (h ? e.customElementsToImportDeferred.add(l) : e.customElementsToImport.add(l));
4283
- const v = typeof l == "string" && Xs.has(l), w = Te(i, e);
4283
+ const v = typeof l == "string" && Gs.has(l), w = Te(i, e);
4284
4284
  if (v && w.parts.length > 0)
4285
4285
  throw Error(
4286
4286
  `Void HTML elements like <${l}> cannot have children. Found ${t.getText(e.sourceFile)}`
4287
4287
  );
4288
4288
  const C = (d === ie || d === Y) && w.parts.length === 0, E = [
4289
4289
  "<",
4290
- typeof l == "string" ? l : n,
4290
+ typeof l == "string" ? l : r,
4291
4291
  ...y,
4292
4292
  C ? `${y.length === 0 ? "" : " "}/>` : ">"
4293
4293
  ], P = v || C ? E : [
@@ -4299,75 +4299,75 @@ Found ${x.getText(e.sourceFile)}`
4299
4299
  */
4300
4300
  ...w.litTag !== void 0 && w.litTag !== d ? [Oe({ key: void 0, ...w }, e)] : w.parts,
4301
4301
  "</",
4302
- typeof l == "string" ? l : n,
4302
+ typeof l == "string" ? l : r,
4303
4303
  ">"
4304
4304
  ];
4305
4305
  return { key: f, parts: P, litTag: d };
4306
4306
  }
4307
- function Mo(e, t) {
4308
- const i = e.attributes.properties[cs(e)];
4309
- return i && o.isJsxAttribute(i) && !ns(i.name, t) ? ft(i.initializer, t.sourceFile) : void 0;
4307
+ function Oo(e, t) {
4308
+ const i = e.attributes.properties[as(e)];
4309
+ return i && o.isJsxAttribute(i) && !rs(i.name, t) ? mt(i.initializer, t.sourceFile) : void 0;
4310
4310
  }
4311
- const cs = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4312
- function Jo(e, t, i, s) {
4313
- const n = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4311
+ const as = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
4312
+ function Mo(e, t, i, s) {
4313
+ const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
4314
4314
  if (o.isJsxSpreadAttribute(d))
4315
- return ts(es(d, e), o.factory.createSpreadAssignment(d.expression));
4315
+ return es(Zi(d, e), o.factory.createSpreadAssignment(d.expression));
4316
4316
  const { name: c, initializer: p } = d;
4317
4317
  if (o.isJsxNamespacedName(c))
4318
4318
  throw Error(`JSX namespaced attributes are not supported. Found ${c.getText(e.sourceFile)}`);
4319
4319
  if (c.text === "key")
4320
4320
  return;
4321
- const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? os(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = oi(c.text) ? o.factory.createStringLiteral(c.text) : c;
4321
+ const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : fe(p) ? ns(e, p) : q(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = ni(c.text) ? o.factory.createStringLiteral(c.text) : c;
4322
4322
  return o.factory.createPropertyAssignment(f, m);
4323
4323
  }), { parts: a, litTag: l } = Te(s, e);
4324
- return a.length > 0 && n.push(
4324
+ return a.length > 0 && r.push(
4325
4325
  o.factory.createPropertyAssignment(
4326
4326
  o.factory.createIdentifier("children"),
4327
4327
  Oe({ key: void 0, parts: a, litTag: l }, e)
4328
4328
  )
4329
4329
  ), o.factory.createCallExpression(i, void 0, [
4330
- o.factory.createObjectLiteralExpression(n.filter(R))
4330
+ o.factory.createObjectLiteralExpression(r.filter(R))
4331
4331
  ]);
4332
4332
  }
4333
4333
  function Te(e, t) {
4334
4334
  let i;
4335
- const s = e.flatMap((r) => {
4336
- if (o.isJsxText(r))
4337
- return [t.compiler.shouldMinifyJsx ? Zs(r.text) : r.text];
4338
- if (o.isJsxExpression(r))
4339
- return ht(t, r, r);
4335
+ const s = e.flatMap((n) => {
4336
+ if (o.isJsxText(n))
4337
+ return [t.compiler.shouldMinifyJsx ? Qs(n.text) : n.text];
4338
+ if (o.isJsxExpression(n))
4339
+ return gt(t, n, n);
4340
4340
  {
4341
- const n = as(t, r);
4342
- if (n.key === void 0 && n.litTag !== oe && n.litTag !== Y) {
4343
- if (n.litTag === fi)
4344
- return n.parts;
4345
- if (i !== void 0 && n.litTag !== void 0 && i !== n.litTag)
4341
+ const r = os(t, n);
4342
+ if (r.key === void 0 && r.litTag !== oe && r.litTag !== Y) {
4343
+ if (r.litTag === mi)
4344
+ return r.parts;
4345
+ if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
4346
4346
  throw new Error(
4347
- `Unexpectedly found both ${i} and ${n.litTag} child elements inside the same element.`
4347
+ `Unexpectedly found both ${i} and ${r.litTag} child elements inside the same element.`
4348
4348
  );
4349
- return i = n.litTag, n.parts;
4349
+ return i = r.litTag, r.parts;
4350
4350
  } else
4351
- return [Oe(n, t)];
4351
+ return [Oe(r, t)];
4352
4352
  }
4353
4353
  });
4354
4354
  return { litTag: i, parts: s };
4355
4355
  }
4356
- function Bo(e) {
4356
+ function Jo(e) {
4357
4357
  return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
4358
4358
  e,
4359
4359
  o.factory.createToken(o.SyntaxKind.BarBarToken),
4360
4360
  o.factory.createStringLiteral("")
4361
4361
  ) : e;
4362
4362
  }
4363
- function ht(e, t, i) {
4363
+ function gt(e, t, i) {
4364
4364
  if (t.expression === void 0) {
4365
4365
  if (e.compiler.shouldMinifyJsx)
4366
4366
  return [];
4367
4367
  const s = t.getText(e.sourceFile).slice(1, -1);
4368
- return gt(s).length === 0 ? [] : [ts(s, o.factory.createIdentifier("undefined"))];
4368
+ return ft(s).length === 0 ? [] : [es(s, o.factory.createIdentifier("undefined"))];
4369
4369
  }
4370
- return o.isStringLiteral(t.expression) ? [mi(t.expression.text)] : (
4370
+ return o.isStringLiteral(t.expression) ? [ui(t.expression.text)] : (
4371
4371
  /**
4372
4372
  * There is a bug in Chrome DevTools, where it won't let you set a
4373
4373
  * breakpoint inside a tagged template literal. It seems like they did
@@ -4404,26 +4404,26 @@ function ht(e, t, i) {
4404
4404
  ] : [q(e, i, t.expression)]
4405
4405
  );
4406
4406
  }
4407
- const ls = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), ds = ls(
4407
+ const cs = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), ls = cs(
4408
4408
  Object.entries(se).flatMap(
4409
4409
  ([e, t]) => t.map((i) => [i, e])
4410
4410
  )
4411
- ), ps = new Set(Object.keys(ds));
4412
- function _o(e, t) {
4413
- const i = t.importClause, s = i === void 0, r = t.moduleSpecifier;
4414
- if (!o.isStringLiteral(r))
4411
+ ), ds = new Set(Object.keys(ls));
4412
+ function Bo(e, t) {
4413
+ const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4414
+ if (!o.isStringLiteral(n))
4415
4415
  return t;
4416
- const n = Ko(e.sourceFile.fileName, r.text, ""), a = !i?.isTypeOnly;
4417
- if (a && e.existingImportedModules.add(n), mr.test(r.text) && // If id already includes ?, bypass our custom behavior
4418
- !r.text.includes("?")) {
4416
+ const r = _o(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4417
+ if (a && e.existingImportedModules.add(r), ur.test(n.text) && // If id already includes ?, bypass our custom behavior
4418
+ !n.text.includes("?")) {
4419
4419
  if (s) {
4420
4420
  if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
4421
4421
  return t;
4422
- const c = e.sourceFile.fileName, p = c.includes("/node_modules/") || c.includes("/dist/"), m = `import "${r.text}"`;
4422
+ const c = e.sourceFile.fileName, p = c.includes("/node_modules/") || c.includes("/dist/"), m = `import "${n.text}"`;
4423
4423
  throw Error(
4424
4424
  p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${c} is not externalized, and it contains a side-effect CSS import \`${m}\`. How should such CSS import be handled? Options:
4425
4425
  1. (suggested) Externalize ${c}, which will make end-user's bundler treat this CSS import as global CSS.
4426
- 2. Write a transform() plugin to drop the CSS import from ${c}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${c}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${r.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4426
+ 2. Write a transform() plugin to drop the CSS import from ${c}, and then manually import the CSS as needed inside your shadow root or your library's global CSS file.` : `${c}: Found a side-effect CSS import \`${m}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "${n.text}";\` instead and then add \`static override styles = styles;\` to your component. If this needs to be global CSS, @import it inside your global CSS file`
4427
4427
  );
4428
4428
  }
4429
4429
  return o.factory.updateImportDeclaration(
@@ -4434,35 +4434,35 @@ function _o(e, t) {
4434
4434
  // runs for .tsx files, so .css imports in .ts files won't work. However,
4435
4435
  // that is unlikely for web component libraries. A workaround is to
4436
4436
  // rename the file or explicitly add (undocumented) ?litCss flag
4437
- o.factory.createStringLiteral(r.text + (e.isInLightDomComponent ? Q : Ie)),
4437
+ o.factory.createStringLiteral(n.text + (e.isInLightDomComponent ? Q : Ie)),
4438
4438
  t.attributes
4439
4439
  );
4440
4440
  }
4441
4441
  if (s)
4442
4442
  return t;
4443
4443
  if (i.name !== void 0) {
4444
- const c = i.name.text, p = i.name.text.startsWith(c[0].toUpperCase()), m = u.isAbsolute(n);
4445
- a && !i.isTypeOnly && p && m && e.importedFunctionComponentsFromModules.add(n);
4444
+ const c = i.name.text, p = i.name.text.startsWith(c[0].toUpperCase()), m = u.isAbsolute(r);
4445
+ a && !i.isTypeOnly && p && m && e.importedFunctionComponentsFromModules.add(r);
4446
4446
  }
4447
4447
  const l = i.namedBindings;
4448
4448
  if (l === void 0 || !o.isNamedImports(l))
4449
4449
  return t;
4450
- const d = ps.has(r.text);
4450
+ const d = ds.has(n.text);
4451
4451
  if (l.elements.forEach((c) => {
4452
4452
  const p = (c.propertyName ?? c.name).text, m = se[p];
4453
4453
  if (d) {
4454
- if (m?.some((h) => h === r.text)) {
4455
- const h = us(p, n);
4454
+ if (m?.some((h) => h === n.text)) {
4455
+ const h = ps(p, r);
4456
4456
  e.existingLitImports.add(h), e.importRenames[h] = c.name?.text ?? h;
4457
4457
  }
4458
4458
  } else (c.name.text === "h" || c.name.text === "createElement") && j().name !== "@arcgis/lumina" && (e.hasNonLuminaJsxImport = !0);
4459
- const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(n);
4460
- a && !c.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(n);
4461
- }), r.text === "@arcgis/lumina") {
4459
+ const f = p.startsWith(p[0].toUpperCase()), g = u.isAbsolute(r);
4460
+ a && !c.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4461
+ }), n.text === "@arcgis/lumina") {
4462
4462
  let c = !1;
4463
4463
  const p = l.elements.filter((f) => {
4464
4464
  const g = (f.propertyName ?? f.name).text;
4465
- return ur.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4465
+ return pr.has(g) ? !1 : (c ||= !f.isTypeOnly, !0);
4466
4466
  });
4467
4467
  if (p.length === 0)
4468
4468
  return;
@@ -4491,22 +4491,22 @@ function _o(e, t) {
4491
4491
  }
4492
4492
  return t;
4493
4493
  }
4494
- const us = (e, t) => e === ae && se.staticHtml.includes(t) ? oe : e === ie && se.staticSvg.includes(t) ? Y : e, Ko = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4495
- function Wo(e) {
4496
- return o.isImportDeclaration(e) ? Uo(this, e) : e;
4494
+ const ps = (e, t) => e === ae && se.staticHtml.includes(t) ? oe : e === ie && se.staticSvg.includes(t) ? Y : e, _o = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
4495
+ function Ko(e) {
4496
+ return o.isImportDeclaration(e) ? Wo(this, e) : e;
4497
4497
  }
4498
- function Uo(e, t) {
4499
- const i = t.importClause, s = i?.namedBindings, r = t.moduleSpecifier;
4500
- if (!o.isStringLiteral(r) || !s || !o.isNamedImports(s) || !ps.has(r.text))
4498
+ function Wo(e, t) {
4499
+ const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4500
+ if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ds.has(n.text))
4501
4501
  return t;
4502
- const n = i.isTypeOnly;
4502
+ const r = i.isTypeOnly;
4503
4503
  let a = !1;
4504
4504
  const l = s.elements.map((d) => {
4505
- const c = (d.propertyName ?? d.name).text, p = us(c, r.text);
4506
- return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(d, !1, d.propertyName, d.name)) : n ? o.factory.updateImportSpecifier(d, !0, d.propertyName, d.name) : d;
4505
+ const c = (d.propertyName ?? d.name).text, p = ps(c, n.text);
4506
+ return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(d, !1, d.propertyName, d.name)) : r ? o.factory.updateImportSpecifier(d, !0, d.propertyName, d.name) : d;
4507
4507
  });
4508
- return ds[r.text]?.forEach((d) => {
4509
- !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(ms(d, e)));
4508
+ return ls[n.text]?.forEach((d) => {
4509
+ !e.neededImports.has(d) || e.existingLitImports.has(d) || (e.neededImports.delete(d), a = !0, l.push(us(d, e)));
4510
4510
  }), a ? o.factory.updateImportDeclaration(
4511
4511
  t,
4512
4512
  t.modifiers,
@@ -4520,8 +4520,8 @@ function Uo(e, t) {
4520
4520
  t.attributes
4521
4521
  ) : t;
4522
4522
  }
4523
- function zo(e) {
4524
- const t = ls(
4523
+ function Uo(e) {
4524
+ const t = cs(
4525
4525
  Array.from(e.neededImports, (i) => [se[i][0], i])
4526
4526
  );
4527
4527
  return Object.entries(t).map(
@@ -4531,14 +4531,14 @@ function zo(e) {
4531
4531
  !1,
4532
4532
  void 0,
4533
4533
  o.factory.createNamedImports(
4534
- s.map((r) => (e.neededImports.delete(r), ms(r, e)))
4534
+ s.map((n) => (e.neededImports.delete(n), us(n, e)))
4535
4535
  )
4536
4536
  ),
4537
4537
  o.factory.createStringLiteral(i)
4538
4538
  )
4539
4539
  );
4540
4540
  }
4541
- function ms(e, t) {
4541
+ function us(e, t) {
4542
4542
  const i = e === oe ? ae : e === Y ? ie : e, s = t.importRenames[e];
4543
4543
  return s === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4544
4544
  !1,
@@ -4546,21 +4546,21 @@ function ms(e, t) {
4546
4546
  o.factory.createIdentifier(s)
4547
4547
  );
4548
4548
  }
4549
- function Ho(e) {
4550
- const t = jr().map(({ packageName: i }) => i);
4549
+ function zo(e) {
4550
+ const t = Nr().map(({ packageName: i }) => i);
4551
4551
  return e.existingImportedModules.forEach((i) => {
4552
4552
  if (u.isAbsolute(i))
4553
4553
  return;
4554
- const s = qs(i), r = i.slice(s.length + 1);
4555
- if (t.includes(s ?? "") && (r.startsWith("dist/components") || r.startsWith("components"))) {
4556
- const n = Re(e.sourceFile.fileName);
4554
+ const s = Hs(i), n = i.slice(s.length + 1);
4555
+ if (t.includes(s ?? "") && (n.startsWith("dist/components") || n.startsWith("components"))) {
4556
+ const r = Re(e.sourceFile.fileName);
4557
4557
  throw new Error(
4558
- `Did not expect to find any explicit imports for "${i}". Found import in ${n}. Imports for web components that your component consumes will be added automatically at build-time as appropriate for a given output target. Type-only imports are still allowed. If you believe this is an error, please notify Lumina maintainers.`
4558
+ `Did not expect to find any explicit imports for "${i}". Found import in ${r}. Imports for web components that your component consumes will be added automatically at build-time as appropriate for a given output target. Type-only imports are still allowed. If you believe this is an error, please notify Lumina maintainers.`
4559
4559
  );
4560
4560
  }
4561
4561
  }), [];
4562
4562
  }
4563
- function qo(e) {
4563
+ function Ho(e) {
4564
4564
  if (e.compiler.viteCommand === "serve")
4565
4565
  return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
4566
4566
  const t = e.compiler._customElementDependencies;
@@ -4575,11 +4575,11 @@ function qo(e) {
4575
4575
  t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
4576
4576
  }), [];
4577
4577
  }
4578
- const Vo = (e, t) => {
4578
+ const qo = (e, t) => {
4579
4579
  const i = e.pragmas;
4580
4580
  if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
4581
4581
  return e.statements;
4582
- let s = !1, r;
4582
+ let s = !1, n;
4583
4583
  if (t.apiModule !== void 0) {
4584
4584
  const d = t.apiModule.declarations;
4585
4585
  for (let c = 0; c < d.length; ++c) {
@@ -4588,22 +4588,22 @@ const Vo = (e, t) => {
4588
4588
  const m = p;
4589
4589
  s = m.encapsulation !== void 0;
4590
4590
  const f = m.superclass;
4591
- f?.module !== void 0 && f.package === void 0 && (r = [f.module.split("/").at(-1)]);
4591
+ f?.module !== void 0 && f.package === void 0 && (n = [f.module.split("/").at(-1)]);
4592
4592
  break;
4593
4593
  }
4594
4594
  }
4595
4595
  }
4596
- const n = {
4596
+ const r = {
4597
4597
  compiler: t.compiler,
4598
- externalComponents: $i(),
4599
- localComponents: Qi(t.compiler),
4598
+ externalComponents: Ti(),
4599
+ localComponents: Yi(t.compiler),
4600
4600
  sourceFile: e,
4601
4601
  transformationContext: t.transformation,
4602
- importRenames: Go(e),
4602
+ importRenames: Vo(e),
4603
4603
  existingImportedModules: /* @__PURE__ */ new Set(),
4604
4604
  importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
4605
4605
  existingLitImports: /* @__PURE__ */ new Set(),
4606
- customElementsToImport: new Set(r),
4606
+ customElementsToImport: new Set(n),
4607
4607
  customElementsToImportDeferred: /* @__PURE__ */ new Set(),
4608
4608
  neededImports: /* @__PURE__ */ new Set(),
4609
4609
  liftedKeys: /* @__PURE__ */ new Set(),
@@ -4613,47 +4613,47 @@ const Vo = (e, t) => {
4613
4613
  let a = [];
4614
4614
  if (e.statements.every((d) => {
4615
4615
  if (o.isImportDeclaration(d)) {
4616
- const c = _o(n, d);
4616
+ const c = Bo(r, d);
4617
4617
  if (c === void 0)
4618
4618
  return !0;
4619
- if (a.push(c), n.hasNonLuminaJsxImport)
4619
+ if (a.push(c), r.hasNonLuminaJsxImport)
4620
4620
  return !1;
4621
4621
  } else
4622
- a.push(q(n, void 0, d));
4622
+ a.push(q(r, void 0, d));
4623
4623
  return !0;
4624
- }), n.hasNonLuminaJsxImport)
4624
+ }), r.hasNonLuminaJsxImport)
4625
4625
  return e.statements;
4626
- if (n.neededImports.size > 0 && (a = a.map(Wo, n), n.existingLitImports.size > 0))
4626
+ if (r.neededImports.size > 0 && (a = a.map(Ko, r), r.existingLitImports.size > 0))
4627
4627
  throw new Error(
4628
- `Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
4628
+ `Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
4629
4629
  );
4630
- const l = [zo, Ho, qo].flatMap(
4631
- (d) => d(n)
4630
+ const l = [Uo, zo, Ho].flatMap(
4631
+ (d) => d(r)
4632
4632
  );
4633
- if (n.neededImports.size > 0)
4633
+ if (r.neededImports.size > 0)
4634
4634
  throw new Error(
4635
- `Expected context.neededLitImports to be empty by now. Found: ${Array.from(n.neededImports).join(", ")}`
4635
+ `Expected context.neededLitImports to be empty by now. Found: ${Array.from(r.neededImports).join(", ")}`
4636
4636
  );
4637
4637
  return [...l, ...a];
4638
4638
  };
4639
- function Go(e) {
4640
- return Xo(e), Object.fromEntries(
4641
- dr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4639
+ function Vo(e) {
4640
+ return Go(e), Object.fromEntries(
4641
+ lr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
4642
4642
  );
4643
4643
  }
4644
- function Xo(e) {
4644
+ function Go(e) {
4645
4645
  if (!("identifiers" in e))
4646
4646
  throw new Error(
4647
4647
  "Expected sourceFile to have an undocumented identifiers property that is a Map<string,string>. If this error is thrown, it may mean Lumina Compiler needs to be updated to support the version of TypeScript being used."
4648
4648
  );
4649
4649
  }
4650
- const Vt = "customElement", Yo = (e, t) => {
4650
+ const qt = "customElement", Xo = (e, t) => {
4651
4651
  const i = [];
4652
- if (t.apiModule?.declarations.forEach((n) => {
4653
- const a = n;
4652
+ if (t.apiModule?.declarations.forEach((r) => {
4653
+ const a = r;
4654
4654
  a.customElement !== void 0 && i.push(
4655
4655
  o.factory.createExpressionStatement(
4656
- o.factory.createCallExpression(o.factory.createIdentifier(Vt), void 0, [
4656
+ o.factory.createCallExpression(o.factory.createIdentifier(qt), void 0, [
4657
4657
  o.factory.createStringLiteral(a.tagName ?? ""),
4658
4658
  o.factory.createIdentifier(a.name)
4659
4659
  ])
@@ -4671,13 +4671,13 @@ const Vt = "customElement", Yo = (e, t) => {
4671
4671
  !1,
4672
4672
  void 0,
4673
4673
  o.factory.createNamedImports([
4674
- o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Vt))
4674
+ o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(qt))
4675
4675
  ])
4676
4676
  ),
4677
4677
  o.factory.createStringLiteral(s)
4678
4678
  ), ...e.statements, ...i];
4679
4679
  };
4680
- function Qo(e, t, i) {
4680
+ function Yo(e, t, i) {
4681
4681
  return t.size === 0 ? e : [
4682
4682
  o.factory.createPropertyDeclaration(
4683
4683
  [
@@ -4690,9 +4690,9 @@ function Qo(e, t, i) {
4690
4690
  o.factory.createObjectLiteralExpression(
4691
4691
  Array.from(
4692
4692
  t.entries(),
4693
- ([s, r]) => o.factory.createPropertyAssignment(
4694
- oi(s) ? o.factory.createStringLiteral(s) : s,
4695
- Zo(r, i)
4693
+ ([s, n]) => o.factory.createPropertyAssignment(
4694
+ ni(s) ? o.factory.createStringLiteral(s) : s,
4695
+ Qo(n, i)
4696
4696
  )
4697
4697
  )
4698
4698
  )
@@ -4700,41 +4700,41 @@ function Qo(e, t, i) {
4700
4700
  ...e
4701
4701
  ];
4702
4702
  }
4703
- function Zo(e, t) {
4703
+ function Qo(e, t) {
4704
4704
  let i = 0, s = !0;
4705
- const r = [], n = [];
4705
+ const n = [], r = [];
4706
4706
  for (const d of e.properties)
4707
- a(d) ? r.push(d) : n.push(d);
4707
+ a(d) ? n.push(d) : r.push(d);
4708
4708
  function a(d) {
4709
4709
  if (!o.isPropertyAssignment(d) || !o.isIdentifier(d.name))
4710
4710
  return !0;
4711
4711
  const c = d.name.text, p = d.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
4712
4712
  if (c === "attribute")
4713
- return s = !1, i |= m ? St : 0, !m && !f;
4713
+ return s = !1, i |= m ? wt : 0, !m && !f;
4714
4714
  if (c === "reflect")
4715
- return i |= m ? Es : 0, !1;
4715
+ return i |= m ? Cs : 0, !1;
4716
4716
  if (c === "type" && o.isIdentifier(p)) {
4717
4717
  if (p.text === "Boolean")
4718
- return i |= Ts, !1;
4718
+ return i |= Es, !1;
4719
4719
  if (p.text === "Number")
4720
- return i |= $s, !1;
4720
+ return i |= Ts, !1;
4721
4721
  } else {
4722
4722
  if (c === "state")
4723
- return s = !1, i |= m ? Ps : 0, !1;
4723
+ return s = !1, i |= m ? $s : 0, !1;
4724
4724
  if (c === "readOnly")
4725
- return i |= m ? ks : 0, !1;
4725
+ return i |= m ? Ps : 0, !1;
4726
4726
  if (c === "noAccessor")
4727
- return i |= m ? Is : 0, !1;
4727
+ return i |= m ? ks : 0, !1;
4728
4728
  if (c === "useDefault")
4729
- return i |= m ? xs : 0, !1;
4729
+ return i |= m ? Is : 0, !1;
4730
4730
  }
4731
4731
  return !0;
4732
4732
  }
4733
- s && (i |= St);
4733
+ s && (i |= wt);
4734
4734
  const l = o.factory.createNumericLiteral(i);
4735
- return r.length === 0 && (t || n.length === 0) ? l : o.factory.createArrayLiteralExpression([
4735
+ return n.length === 0 && (t || r.length === 0) ? l : o.factory.createArrayLiteralExpression([
4736
4736
  l,
4737
- o.factory.createObjectLiteralExpression(r),
4737
+ o.factory.createObjectLiteralExpression(n),
4738
4738
  /**
4739
4739
  * In dev mode, to improve readability for non-source-map developers,
4740
4740
  * while we still insert the compact flags (to keep build vs dev code as
@@ -4742,11 +4742,11 @@ function Zo(e, t) {
4742
4742
  * The subsumed options are in a third array item, which is not accessed
4743
4743
  * by the runtime, thus has no runtime impact.
4744
4744
  */
4745
- ...t ? [] : [o.factory.createObjectLiteralExpression(n)]
4745
+ ...t ? [] : [o.factory.createObjectLiteralExpression(r)]
4746
4746
  ]);
4747
4747
  }
4748
- function ea(e, t, i) {
4749
- let s = -1, r = -1, n = -1;
4748
+ function Zo(e, t, i) {
4749
+ let s = -1, n = -1, r = -1;
4750
4750
  e.options?.properties.forEach((p, m) => {
4751
4751
  if (o.isSpreadAssignment(p))
4752
4752
  throw new Error(
@@ -4754,29 +4754,29 @@ function ea(e, t, i) {
4754
4754
  );
4755
4755
  if (o.isIdentifier(p.name)) {
4756
4756
  const f = p.name.escapedText;
4757
- f === "type" ? s = m : f === "attribute" ? r = m : f === "readOnly" && (n = m);
4757
+ f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
4758
4758
  }
4759
4759
  });
4760
- const a = i.attribute === void 0 && r === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && n === -1, d = ta(e, i, s), c = [
4760
+ const a = i.attribute === void 0 && n === -1, l = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = ea(e, i, s), c = [
4761
4761
  ...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
4762
4762
  ...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
4763
4763
  ...d !== void 0 ? [d] : []
4764
4764
  ];
4765
4765
  return c.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(c, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...c]) : e.options;
4766
4766
  }
4767
- function ta(e, t, i) {
4767
+ function ea(e, t, i) {
4768
4768
  if (t.attribute === void 0)
4769
4769
  return;
4770
- const s = ia(t.type.values);
4770
+ const s = ta(t.type.values);
4771
4771
  return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
4772
4772
  o.factory.createIdentifier("type"),
4773
4773
  o.factory.createIdentifier(s)
4774
4774
  );
4775
4775
  }
4776
- function ia(e) {
4776
+ function ta(e) {
4777
4777
  let t = !1, i = !1, s = !1;
4778
- if (e?.forEach((r) => {
4779
- t ||= r.type === "number", i ||= r.type === "boolean", s ||= r.type === "string" || r.type === "any" || r.type === "unknown";
4778
+ if (e?.forEach((n) => {
4779
+ t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
4780
4780
  }), s ||= t && i, !s) {
4781
4781
  if (t)
4782
4782
  return "Number";
@@ -4785,7 +4785,7 @@ function ia(e) {
4785
4785
  }
4786
4786
  return "Other";
4787
4787
  }
4788
- function sa(e, t, i, s, r, n) {
4788
+ function ia(e, t, i, s, n, r) {
4789
4789
  if (i.modifiers === void 0)
4790
4790
  return i;
4791
4791
  let a = -1, l = -1;
@@ -4795,50 +4795,50 @@ function sa(e, t, i, s, r, n) {
4795
4795
  p === "property" && (a = c), p === "state" && (l = c);
4796
4796
  }
4797
4797
  }), a !== -1) {
4798
- const d = ra(e, t, i, s, r), c = Gt(i, a, r), p = ea(c, r, d);
4799
- return n.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, Xt(i, a);
4798
+ const d = sa(e, t, i, s, n), c = Vt(i, a, n), p = Zo(c, n, d);
4799
+ return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), c.options = p, Gt(i, a);
4800
4800
  } else if (l !== -1) {
4801
- const d = Gt(i, l, r), c = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([c]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, c]), m = ai(i.name);
4801
+ const d = Vt(i, l, n), c = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([c]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, c]), m = oi(i.name);
4802
4802
  if (m === void 0)
4803
4803
  throw new Error("Failed to statically determine the state property name");
4804
- return n.set(m, p), Xt(i, l);
4804
+ return r.set(m, p), Gt(i, l);
4805
4805
  } else
4806
4806
  return i;
4807
4807
  }
4808
- function ra(e, t, i, s, r) {
4809
- const n = t ?? (e.compiler.isInTest ? {
4808
+ function sa(e, t, i, s, n) {
4809
+ const r = t ?? (e.compiler.isInTest ? {
4810
4810
  members: []
4811
4811
  } : void 0);
4812
- if (n === void 0)
4813
- throw Error(`Failed to find API component for ${s} in ${r.fileName}`);
4814
- const a = ai(i.name);
4812
+ if (r === void 0)
4813
+ throw Error(`Failed to find API component for ${s} in ${n.fileName}`);
4814
+ const a = oi(i.name);
4815
4815
  let l;
4816
- for (let d = 0; d < n.members.length; ++d) {
4817
- const c = n.members[d];
4816
+ for (let d = 0; d < r.members.length; ++d) {
4817
+ const c = r.members[d];
4818
4818
  c.name === a && c.kind === "field" && (l = c);
4819
4819
  }
4820
4820
  if (l ??= e.compiler.isInTest ? { kind: "field", attribute: "", name: "", type: { text: "" } } : void 0, l === void 0)
4821
4821
  throw Error(
4822
- `Failed to find API property for ${i.getText(r)} in ${s} in ${r.fileName}`
4822
+ `Failed to find API property for ${i.getText(n)} in ${s} in ${n.fileName}`
4823
4823
  );
4824
4824
  if (l.name === "") {
4825
4825
  if (a === void 0)
4826
4826
  throw Error(
4827
- `Failed to statically determine the property name: ${i.getText(r)} in ${s} in ${r.fileName}`
4827
+ `Failed to statically determine the property name: ${i.getText(n)} in ${s} in ${n.fileName}`
4828
4828
  );
4829
- l.name = a, l.attribute ??= ei(a);
4829
+ l.name = a, l.attribute ??= Zt(a);
4830
4830
  }
4831
4831
  return l;
4832
4832
  }
4833
- function Gt(e, t, i) {
4834
- const s = e.modifiers[t], r = s.expression, n = r.arguments.at(0);
4835
- if (n && !o.isObjectLiteralExpression(n))
4833
+ function Vt(e, t, i) {
4834
+ const s = e.modifiers[t], n = s.expression, r = n.arguments.at(0);
4835
+ if (r && !o.isObjectLiteralExpression(r))
4836
4836
  throw new Error(
4837
- `First argument to @property() or @state() decorator must be an object literal as otherwise it is not statically analyzable. Found ${n.getText(i)}`
4837
+ `First argument to @property() or @state() decorator must be an object literal as otherwise it is not statically analyzable. Found ${r.getText(i)}`
4838
4838
  );
4839
- return { decorator: s, callExpression: r, options: n };
4839
+ return { decorator: s, callExpression: n, options: r };
4840
4840
  }
4841
- function Xt(e, t) {
4841
+ function Gt(e, t) {
4842
4842
  const i = [
4843
4843
  ...e.modifiers.slice(0, t),
4844
4844
  ...e.modifiers.slice(t + 1)
@@ -4865,32 +4865,32 @@ function Xt(e, t) {
4865
4865
  e.initializer
4866
4866
  );
4867
4867
  }
4868
- function na(e, t, i, s) {
4869
- let r;
4868
+ function ra(e, t, i, s) {
4869
+ let n;
4870
4870
  if (e.apiJsonEnabled)
4871
4871
  for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
4872
4872
  const c = e.privateApiJson.modules[d];
4873
4873
  if (c.sourcePath === i.fileName.slice(e.dir.root.length)) {
4874
- r = c;
4874
+ n = c;
4875
4875
  break;
4876
4876
  }
4877
4877
  }
4878
- const n = {
4878
+ const r = {
4879
4879
  compiler: e,
4880
- apiModule: r,
4880
+ apiModule: n,
4881
4881
  transformation: t
4882
4882
  }, a = i.statements;
4883
4883
  let l = a;
4884
4884
  try {
4885
4885
  s.forEach((d) => {
4886
- i.statements = d(i, n);
4886
+ i.statements = d(i, r);
4887
4887
  });
4888
4888
  } finally {
4889
4889
  l = i.statements, i.statements = a;
4890
4890
  }
4891
- return oa(i, l);
4891
+ return na(i, l);
4892
4892
  }
4893
- const oa = (e, t) => o.factory.updateSourceFile(
4893
+ const na = (e, t) => o.factory.updateSourceFile(
4894
4894
  e,
4895
4895
  t,
4896
4896
  /*
@@ -4905,10 +4905,10 @@ const oa = (e, t) => o.factory.updateSourceFile(
4905
4905
  e.hasNoDefaultLib,
4906
4906
  e.libReferenceDirectives
4907
4907
  );
4908
- function aa(e, t) {
4908
+ function oa(e, t) {
4909
4909
  t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
4910
4910
  }
4911
- const ca = (e, t) => {
4911
+ const aa = (e, t) => {
4912
4912
  let i;
4913
4913
  if (t.apiModule !== void 0)
4914
4914
  for (let d = 0; d < t.apiModule.declarations.length; ++d) {
@@ -4921,31 +4921,31 @@ const ca = (e, t) => {
4921
4921
  if (!t.compiler.isInTest && i === void 0)
4922
4922
  return e.statements;
4923
4923
  let s;
4924
- function r() {
4924
+ function n() {
4925
4925
  s = /* @__PURE__ */ new Map();
4926
4926
  }
4927
- const n = (d) => Qo(d, s, t.compiler.shouldMinify);
4927
+ const r = (d) => Yo(d, s, t.compiler.shouldMinify);
4928
4928
  function a(d, c) {
4929
- const p = da(t, i, d, c, e, s);
4930
- return aa(p, t), p;
4929
+ const p = la(t, i, d, c, e, s);
4930
+ return oa(p, t), p;
4931
4931
  }
4932
4932
  return e.statements.map(
4933
- (d) => fs(a, d, t, r, n)
4933
+ (d) => ms(a, d, t, n, r)
4934
4934
  );
4935
4935
  };
4936
- function fs(e, t, i, s, r = ci) {
4936
+ function ms(e, t, i, s, n = ai) {
4937
4937
  if (o.isClassDeclaration(t) && // Ignore classes that don't extend anything - those are definitely not components
4938
- t.heritageClauses?.some((n) => n.token === o.SyntaxKind.ExtendsKeyword)) {
4939
- let n = !1;
4938
+ t.heritageClauses?.some((r) => r.token === o.SyntaxKind.ExtendsKeyword)) {
4939
+ let r = !1;
4940
4940
  const a = t.name?.text;
4941
4941
  s?.();
4942
- const l = r(
4942
+ const l = n(
4943
4943
  t.members.map((c) => {
4944
4944
  const p = e(c, a);
4945
- return n ||= p !== c, p;
4945
+ return r ||= p !== c, p;
4946
4946
  })
4947
4947
  );
4948
- return n ? o.factory.updateClassDeclaration(
4948
+ return r ? o.factory.updateClassDeclaration(
4949
4949
  t,
4950
4950
  t.modifiers,
4951
4951
  t.name,
@@ -4956,15 +4956,15 @@ function fs(e, t, i, s, r = ci) {
4956
4956
  } else
4957
4957
  return i.compiler.isInTest ? o.visitEachChild(
4958
4958
  t,
4959
- (a) => fs(e, a, i, s, r),
4959
+ (a) => ms(e, a, i, s, n),
4960
4960
  i.transformation
4961
4961
  ) : t;
4962
4962
  }
4963
- const la = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4964
- function da(e, t, i, s, r, n) {
4963
+ const ca = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
4964
+ function la(e, t, i, s, n, r) {
4965
4965
  if (o.isMethodDeclaration(i)) {
4966
4966
  const a = i.modifiers?.filter(
4967
- (l) => !o.isDecorator(l) || !pa(l)
4967
+ (l) => !o.isDecorator(l) || !da(l)
4968
4968
  );
4969
4969
  if (a?.length !== i.modifiers?.length)
4970
4970
  return o.factory.updateMethodDeclaration(
@@ -4978,7 +4978,7 @@ function da(e, t, i, s, r, n) {
4978
4978
  i.type,
4979
4979
  i.body
4980
4980
  );
4981
- if ("text" in i.name && la.has(i.name.text) && i.body) {
4981
+ if ("text" in i.name && ca.has(i.name.text) && i.body) {
4982
4982
  const l = i.name.text;
4983
4983
  return i.body.statements.some(
4984
4984
  (c) => o.isExpressionStatement(c) && o.isCallExpression(c.expression) && o.isPropertyAccessExpression(c.expression.expression) && c.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && c.expression.expression.name.text === l
@@ -5004,14 +5004,14 @@ function da(e, t, i, s, r, n) {
5004
5004
  );
5005
5005
  }
5006
5006
  }
5007
- return o.isPropertyDeclaration(i) || o.isAccessor(i) ? sa(e, t, i, s, r, n) : i;
5008
- }
5009
- const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ua = [
5010
- Vo,
5011
- Yo,
5012
- ca
5013
- ], ma = "@arcgis/lumina:transformComponents", fa = (e) => ({
5014
- name: ma,
5007
+ return o.isPropertyDeclaration(i) || o.isAccessor(i) ? ia(e, t, i, s, n, r) : i;
5008
+ }
5009
+ const da = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", pa = [
5010
+ qo,
5011
+ Xo,
5012
+ aa
5013
+ ], ua = "@arcgis/lumina:transformComponents", ma = (e) => ({
5014
+ name: ua,
5015
5015
  transform: {
5016
5016
  // Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
5017
5017
  // Also, we need to run on the original fs file, before other transforms so
@@ -5030,12 +5030,12 @@ const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5030
5030
  // eslint-disable-next-line @typescript-eslint/await-thenable
5031
5031
  e.apiJsonDeferred === void 0 ? [re] : [re, e.apiJsonDeferred.promise]
5032
5032
  );
5033
- const r = e.getSourceFile(i, t), a = o.transform(r, [
5034
- (f) => () => na(e, f, r, [
5033
+ const n = e.getSourceFile(i, t), a = o.transform(n, [
5034
+ (f) => () => ra(e, f, n, [
5035
5035
  ...e.options.types?.sourceFileTransformers ?? [],
5036
- ...ua
5036
+ ...pa
5037
5037
  ])
5038
- ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Ct.createSourceMapGenerator(ga, u.basename(i), "", u.dirname(i), {}), c = Ct.createTextWriter(`
5038
+ ]).transformed[0], l = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : St.createSourceMapGenerator(fa, u.basename(i), "", u.dirname(i), {}), c = St.createTextWriter(`
5039
5039
  `);
5040
5040
  l.writeFile(a, c, d);
5041
5041
  const p = c.getText(), m = d?.toJSON();
@@ -5045,65 +5045,65 @@ const pa = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
5045
5045
  };
5046
5046
  }
5047
5047
  }
5048
- }), ga = {
5048
+ }), fa = {
5049
5049
  getCurrentDirectory: o.sys.getCurrentDirectory,
5050
- getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ci : (e) => e.toLowerCase()
5051
- }, ha = (e) => ({
5050
+ getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? ai : (e) => e.toLowerCase()
5051
+ }, ga = (e) => ({
5052
5052
  name: "@arcgis/lumina:handleDynamicAssets",
5053
5053
  configureServer(t) {
5054
- e.server = t, Yt(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5054
+ e.server = t, Xt(e).forEach(({ assets: i, transformers: s }) => te(e, i, s));
5055
5055
  },
5056
5056
  async writeBundle() {
5057
5057
  await Promise.all(
5058
- Yt(e).map(
5059
- async ({ assets: t, transformers: i }) => await xi(e, t, i)
5058
+ Xt(e).map(
5059
+ async ({ assets: t, transformers: i }) => await Ii(e, t, i)
5060
5060
  )
5061
5061
  );
5062
5062
  }
5063
5063
  });
5064
- function Yt(e) {
5064
+ function Xt(e) {
5065
5065
  const t = [], i = e.assetsToProvide?.filter((s) => s.apply === void 0 || s.apply === e.viteCommand) ?? [];
5066
5066
  return e.options.assets?.extra?.forEach((s) => {
5067
5067
  "type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
5068
5068
  }), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
5069
5069
  }
5070
- const nt = "@arcgis/lumina:updatePackageJson", ya = (e) => ({
5071
- name: nt,
5070
+ const rt = "@arcgis/lumina:updatePackageJson", ha = (e) => ({
5071
+ name: rt,
5072
5072
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
5073
5073
  configResolved() {
5074
- va(e).catch(
5075
- (t) => T.error(nt, `Failed to update package's package.json:${String(t)}`)
5074
+ ya(e).catch(
5075
+ (t) => T.error(rt, `Failed to update package's package.json:${String(t)}`)
5076
5076
  );
5077
5077
  }
5078
5078
  });
5079
- async function va(e) {
5080
- const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = ba(i, e);
5081
- s && ni(t, JSON.stringify(s, null, 2));
5079
+ async function ya(e) {
5080
+ const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = va(i, e);
5081
+ s && ri(t, JSON.stringify(s, null, 2));
5082
5082
  }
5083
- function ba(e, t) {
5083
+ function va(e, t) {
5084
5084
  const i = e?.devDependencies ?? {};
5085
5085
  Object.keys(e?.peerDependencies ?? {}).forEach((c) => {
5086
5086
  c in i || T.warn(
5087
- nt,
5087
+ rt,
5088
5088
  `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${c}" that is not a devDependency. Please edit your package.json`
5089
5089
  );
5090
5090
  });
5091
5091
  let s = !1;
5092
- const r = (c) => u.relative(t.dir.root, u.join(t.dir.dist, c)), n = t._documentationFileNames;
5093
- if (n.vsCodeCss !== void 0) {
5094
- const c = e["css.customData"] ?? [], p = r(n.vsCodeCss);
5092
+ const n = (c) => u.relative(t.dir.root, u.join(t.dir.dist, c)), r = t._documentationFileNames;
5093
+ if (r.vsCodeCss !== void 0) {
5094
+ const c = e["css.customData"] ?? [], p = n(r.vsCodeCss);
5095
5095
  c.includes(p) || (e["css.customData"] = [...c, p], s = !0);
5096
5096
  }
5097
- if (n.apiJson !== void 0) {
5098
- const c = r(n.apiJson);
5097
+ if (r.apiJson !== void 0) {
5098
+ const c = n(r.apiJson);
5099
5099
  e.customElements !== c && (e.customElements = c, s = !0);
5100
5100
  }
5101
- if (n.vsCodeHtml !== void 0) {
5102
- const c = e["html.customData"] ?? [], p = r(n.vsCodeHtml);
5101
+ if (r.vsCodeHtml !== void 0) {
5102
+ const c = e["html.customData"] ?? [], p = n(r.vsCodeHtml);
5103
5103
  c.includes(p) || (e["html.customData"] = [...c, p], s = !0);
5104
5104
  }
5105
- if (n.webTypes !== void 0) {
5106
- const c = r(n.webTypes);
5105
+ if (r.webTypes !== void 0) {
5106
+ const c = n(r.webTypes);
5107
5107
  e["web-types"] !== c && (s = !0, e["web-types"] = c);
5108
5108
  }
5109
5109
  const a = `./${Z}.css`, l = t.options.build?.cdn?.namespace !== void 0, d = he(
@@ -5119,21 +5119,21 @@ function ba(e, t) {
5119
5119
  if (s)
5120
5120
  return e;
5121
5121
  }
5122
- const wa = (e) => ({
5122
+ const ba = (e) => ({
5123
5123
  deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
5124
5124
  timestamp: e.apiJson.timestamp,
5125
5125
  compiler: e.apiJson.compiler,
5126
- components: Sa(e),
5126
+ components: wa(e),
5127
5127
  typeLibrary: {}
5128
5128
  });
5129
- function Sa(e) {
5129
+ function wa(e) {
5130
5130
  const t = [];
5131
5131
  for (const i of e.apiJson.modules)
5132
5132
  for (const s of i.declarations)
5133
- s.customElement === !0 && t.push(Ca(s, i.sourcePath));
5133
+ s.customElement === !0 && t.push(Sa(s, i.sourcePath));
5134
5134
  return t;
5135
5135
  }
5136
- function Ca(e, t) {
5136
+ function Sa(e, t) {
5137
5137
  const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
5138
5138
  return {
5139
5139
  filePath: t,
@@ -5148,31 +5148,37 @@ function Ca(e, t) {
5148
5148
  dependencies: [],
5149
5149
  dependencyGraph: {},
5150
5150
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
5151
- props: e.members.map(Ea).filter(R),
5152
- methods: e.members.map(Ta).filter(R),
5153
- events: e.events?.map($a) ?? [],
5151
+ props: e.members.map(Ca).filter(R),
5152
+ methods: e.members.map(Ea).filter(R),
5153
+ events: e.events?.map(Ta) ?? [],
5154
5154
  styles: e.cssProperties?.map((s) => ({
5155
5155
  name: s.name,
5156
5156
  annotation: "prop",
5157
- docs: s.description ?? "",
5157
+ docs: typeof s.deprecated == "string" ? `DEPRECATED ${s.deprecated}` : s.description ?? "",
5158
5158
  mode: void 0
5159
5159
  })) ?? [],
5160
- slots: e.slots?.map(({ name: s, description: r = "" }) => ({ name: s, docs: r })) ?? [],
5161
- parts: e.cssParts?.map(({ name: s, description: r = "" }) => ({ name: s, docs: r })) ?? [],
5160
+ slots: e.slots?.map(({ name: s, description: n = "", deprecated: r }) => ({
5161
+ name: s,
5162
+ docs: typeof r == "string" ? `DEPRECATED ${r}` : n
5163
+ })) ?? [],
5164
+ parts: e.cssParts?.map(({ name: s, description: n = "", deprecated: r }) => ({
5165
+ name: s,
5166
+ docs: typeof r == "string" ? `DEPRECATED ${r}` : n
5167
+ })) ?? [],
5162
5168
  listeners: []
5163
5169
  };
5164
5170
  }
5165
- function Ea(e) {
5171
+ function Ca(e) {
5166
5172
  if (e.kind !== "field")
5167
5173
  return;
5168
- const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], s = t.readonly ? [{ name: "readonly", text: "" }] : [], r = t.docsTags?.some((n) => n.name === "required") ?? !1;
5174
+ const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], s = t.readonly ? [{ name: "readonly", text: "" }] : [], n = t.docsTags?.some((r) => r.name === "required") ?? !1;
5169
5175
  return {
5170
5176
  name: e.name,
5171
5177
  type: t.type?.text ?? "unknown",
5172
5178
  complexType: t.type === void 0 ? void 0 : {
5173
5179
  original: t.type.text,
5174
5180
  resolved: t.type.text,
5175
- references: yt(t.type.references)
5181
+ references: ht(t.type.references)
5176
5182
  },
5177
5183
  mutable: !0,
5178
5184
  attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
@@ -5187,44 +5193,44 @@ function Ea(e) {
5187
5193
  * practice, all non-required properties are optional, so this is somewhat
5188
5194
  * redundant.
5189
5195
  */
5190
- optional: !r,
5191
- required: r
5196
+ optional: !n,
5197
+ required: n
5192
5198
  };
5193
5199
  }
5194
- const yt = (e) => Object.fromEntries(
5200
+ const ht = (e) => Object.fromEntries(
5195
5201
  e?.map(
5196
5202
  (t) => [
5197
5203
  t.name,
5198
5204
  {
5199
- location: t.package === Ls ? "global" : t.package === void 0 ? "local" : "import",
5205
+ location: t.package === xs ? "global" : t.package === void 0 ? "local" : "import",
5200
5206
  path: typeof t.module == "string" && typeof t.package == "string" ? u.join(t.package, t.module) : t.module ?? t.package,
5201
5207
  id: "notImplemented"
5202
5208
  }
5203
5209
  ]
5204
5210
  ) ?? []
5205
5211
  );
5206
- function Ta(e) {
5212
+ function Ea(e) {
5207
5213
  if (e.kind !== "method")
5208
5214
  return;
5209
- const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: r, type: n, description: a }) => ({
5210
- name: r,
5211
- type: n?.text ?? "unknown",
5215
+ const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
5216
+ name: n,
5217
+ type: r?.text ?? "unknown",
5212
5218
  docs: a ?? ""
5213
5219
  })) ?? [];
5214
5220
  return {
5215
5221
  name: e.name,
5216
5222
  returns: {
5217
5223
  type: t.return?.type?.text ?? "void",
5218
- docs: t.docsTags?.filter(({ name: r }) => r === "return" || r === "returns").map(({ text: r }) => r).join(`
5224
+ docs: t.docsTags?.filter(({ name: n }) => n === "return" || n === "returns").map(({ text: n }) => n).join(`
5219
5225
  `) ?? ""
5220
5226
  },
5221
5227
  complexType: {
5222
5228
  signature: t.signature ?? "()=>unknown",
5223
5229
  parameters: s,
5224
5230
  return: t.return?.type?.text ?? "void",
5225
- references: yt([
5231
+ references: ht([
5226
5232
  ...t.return?.type?.references ?? [],
5227
- ...t.parameters?.flatMap((r) => r.type.references ?? []) ?? []
5233
+ ...t.parameters?.flatMap((n) => n.type.references ?? []) ?? []
5228
5234
  ])
5229
5235
  },
5230
5236
  signature: `${t.name}${t.signature ?? "()=>unknown"}`,
@@ -5234,7 +5240,7 @@ function Ta(e) {
5234
5240
  deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
5235
5241
  };
5236
5242
  }
5237
- function $a(e) {
5243
+ function Ta(e) {
5238
5244
  const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
5239
5245
  return {
5240
5246
  event: e.name,
@@ -5243,7 +5249,7 @@ function $a(e) {
5243
5249
  complexType: {
5244
5250
  original: e.type.text,
5245
5251
  resolved: e.type.text,
5246
- references: yt(e.type.references)
5252
+ references: ht(e.type.references)
5247
5253
  },
5248
5254
  cancelable: e.cancelable ?? !0,
5249
5255
  composed: e.composed ?? !0,
@@ -5252,80 +5258,91 @@ function $a(e) {
5252
5258
  deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
5253
5259
  };
5254
5260
  }
5255
- const gs = (e) => e.flatMap(
5256
- (t) => t.cssProperties?.map((i) => ({
5257
- name: i.name,
5258
- description: i.description || void 0
5259
- })) ?? []
5260
- ), hs = (e) => e.flatMap(
5261
- (t) => t.cssParts?.map((i) => ({
5262
- name: `::part(${i.name})`,
5263
- description: i.description || void 0
5264
- })) ?? []
5265
- );
5266
- function Pa(e) {
5267
- if (e.attributes === void 0)
5268
- return [];
5269
- const t = [];
5270
- for (let i = 0; i < e.members.length; ++i) {
5271
- const s = e.members[i];
5272
- s.kind === "field" && s.attribute !== void 0 && t.push({
5273
- name: s.attribute,
5274
- description: Me(s.description, s.deprecated) || void 0,
5275
- default: s.default,
5276
- value: {
5277
- type: ka(
5278
- s.type.values?.map(
5279
- (r) => r.type === "string" && r.value !== void 0 ? `"${r.value}"` : r.value ?? r.type
5280
- )
5281
- )
5282
- }
5283
- });
5284
- }
5285
- return t;
5286
- }
5287
- const ka = (e) => e?.length === 1 ? e[0] : e, Me = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, ye = {
5261
+ const ye = {
5288
5262
  slots: "Slots",
5289
5263
  events: "Events",
5290
5264
  cssProperties: "CSS Properties",
5291
5265
  cssParts: "CSS Parts",
5292
5266
  methods: "Methods"
5293
5267
  };
5294
- function ys(e) {
5295
- const t = Ia(e.slots), i = xa(e.events), s = Aa(e.cssProperties), r = La(e.cssParts), n = Na(e.members), a = Me(e.description, e.deprecated).trim();
5268
+ function fs(e) {
5269
+ const t = $a(e.slots), i = Pa(e.events), s = ka(e.cssProperties), n = Ia(e.cssParts), r = Aa(e.members), a = e.description?.trim();
5296
5270
  return [...a ? [`${a}
5297
- --`] : [], i, n, t, s, r].filter(Boolean).join(`
5271
+ --`] : [], i, r, t, s, n].filter(Boolean).join(`
5298
5272
 
5299
5273
  `);
5300
5274
  }
5301
5275
  const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
5302
5276
  ${t.join(`
5303
- `)}`, Ia = (e) => ve(
5277
+ `)}`, $a = (e) => ve(
5304
5278
  ye.slots,
5305
- e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
5306
- ), xa = (e) => ve(
5279
+ e?.filter((t) => t.deprecated === void 0).map(
5280
+ (t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
5281
+ )
5282
+ ), Pa = (e) => ve(
5307
5283
  ye.events,
5308
- e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
5309
- ), Aa = (e = []) => ve(
5284
+ e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5285
+ ), ka = (e = []) => ve(
5310
5286
  ye.cssProperties,
5311
- e?.map(
5312
- (t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
5287
+ e?.filter((t) => t.deprecated === void 0).map(
5288
+ (t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
5313
5289
  )
5314
- ), La = (e) => ve(
5290
+ ), Ia = (e) => ve(
5315
5291
  ye.cssParts,
5316
- e?.map((t) => `- **${t.name}** - ${t.description}`)
5317
- ), Na = (e) => ve(
5292
+ e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
5293
+ ), Aa = (e) => ve(
5318
5294
  ye.methods,
5319
- e.filter(Ns).map(
5320
- (t) => [`- \`${t.name}${t.signature}\``, Me(t.description, t.deprecated)].filter(Boolean).join(" - ")
5295
+ e.filter(Ls).filter((t) => t.deprecated === void 0).map(
5296
+ (t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
5321
5297
  )
5298
+ ), gs = (e) => {
5299
+ const t = [], i = /* @__PURE__ */ new Set();
5300
+ for (let s = 0; s < e.length; ++s) {
5301
+ const n = e[s].cssProperties;
5302
+ if (n !== void 0)
5303
+ for (let r = 0; r < n.length; ++r) {
5304
+ const a = n[r];
5305
+ a.deprecated !== void 0 || i.has(a.name) || (i.add(a.name), t.push({
5306
+ name: a.name,
5307
+ description: a.description || void 0
5308
+ }));
5309
+ }
5310
+ }
5311
+ return t;
5312
+ }, hs = (e) => e.flatMap(
5313
+ (t) => t.cssParts?.filter((i) => i.deprecated === void 0).map((i) => ({
5314
+ name: `::part(${i.name})`,
5315
+ description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
5316
+ })) ?? []
5322
5317
  );
5323
- function ja(e, t) {
5324
- const i = Fa(e), s = gs(e), r = hs(e), n = j();
5318
+ function xa(e) {
5319
+ if (e.attributes === void 0)
5320
+ return [];
5321
+ const t = [];
5322
+ for (let i = 0; i < e.members.length; ++i) {
5323
+ const s = e.members[i];
5324
+ s.kind === "field" && s.attribute !== void 0 && s.deprecated === void 0 && t.push({
5325
+ name: s.attribute,
5326
+ description: s.description || void 0,
5327
+ default: s.default,
5328
+ value: {
5329
+ type: La(
5330
+ s.type.values?.map(
5331
+ (n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
5332
+ )
5333
+ )
5334
+ }
5335
+ });
5336
+ }
5337
+ return t;
5338
+ }
5339
+ const La = (e) => e?.length === 1 ? e[0] : e;
5340
+ function Na(e, t) {
5341
+ const i = ja(e), s = gs(e), n = hs(e), r = j();
5325
5342
  return {
5326
5343
  $schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
5327
- name: n.name,
5328
- version: n.version,
5344
+ name: r.name,
5345
+ version: r.version,
5329
5346
  "description-markup": "markdown",
5330
5347
  "default-icon": t.defaultIcon,
5331
5348
  contributions: {
@@ -5334,118 +5351,118 @@ function ja(e, t) {
5334
5351
  },
5335
5352
  css: {
5336
5353
  properties: s,
5337
- "pseudo-elements": r
5354
+ "pseudo-elements": n
5338
5355
  }
5339
5356
  }
5340
5357
  };
5341
5358
  }
5342
- const Fa = (e) => e.map((t) => ({
5359
+ const ja = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5343
5360
  name: t.tagName,
5344
- description: ys(t),
5361
+ description: fs(t),
5345
5362
  "doc-url": t.demos?.[0]?.url,
5346
- attributes: Pa(t),
5363
+ attributes: xa(t),
5347
5364
  slots: t.slots?.map((i) => ({
5348
5365
  name: i.name,
5349
5366
  description: i.description
5350
5367
  })),
5351
5368
  // REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
5352
- events: Qt(t),
5369
+ events: Yt(t),
5353
5370
  js: {
5354
- properties: Ra(t),
5355
- events: Qt(t)
5371
+ properties: Fa(t),
5372
+ events: Yt(t)
5356
5373
  }
5357
- })), Ra = (e) => e.members.filter(js).map((t) => ({
5374
+ })), Fa = (e) => e.members.filter(Ns).filter((t) => t.deprecated === void 0).map((t) => ({
5358
5375
  name: t.name,
5359
5376
  description: t.description,
5360
5377
  type: t.type?.text
5361
- })) ?? [], Qt = (e) => e.events?.map((t) => ({
5378
+ })) ?? [], Yt = (e) => e.events?.filter((t) => t.deprecated === void 0).map((t) => ({
5362
5379
  name: t.name,
5363
5380
  type: t.type?.text,
5364
5381
  description: t.description
5365
- })) ?? [], Da = (e) => e.map((t) => ({
5382
+ })) ?? [], Ra = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5366
5383
  name: t.tagName,
5367
- description: ys(t),
5368
- attributes: Oa(t),
5384
+ description: fs(t),
5385
+ attributes: Da(t),
5369
5386
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5370
- })), Oa = (e) => e.attributes?.map((t) => ({
5387
+ })), Da = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5371
5388
  name: t.name,
5372
- description: Me(t.description, t.deprecated) || void 0,
5373
- values: Ma(t)
5374
- })) ?? [], Ma = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ja = (e) => ({
5389
+ description: t.description || void 0,
5390
+ values: Oa(t)
5391
+ })) ?? [], Oa = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Ma = (e) => ({
5375
5392
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5376
5393
  version: 1.1,
5377
- tags: Da(e)
5378
- }), Ba = (e) => ({
5394
+ tags: Ra(e)
5395
+ }), Ja = (e) => ({
5379
5396
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
5380
5397
  version: 1.1,
5381
5398
  properties: gs(e),
5382
5399
  pseudoElements: hs(e)
5383
- }), _a = "@arcgis/lumina:generateDocs";
5384
- function Ka(e) {
5400
+ }), Ba = "@arcgis/lumina:generateDocs";
5401
+ function _a(e) {
5385
5402
  return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
5386
5403
  {
5387
5404
  type: "dynamic",
5388
- source: () => JSON.stringify(wa(e), null, rt(e)),
5405
+ source: () => JSON.stringify(ba(e), null, st(e)),
5389
5406
  destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
5390
5407
  }
5391
5408
  ]), {
5392
- name: _a,
5409
+ name: Ba,
5393
5410
  async writeBundle() {
5394
5411
  if (e.isInStorybook)
5395
5412
  return;
5396
- const t = rt(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, r = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), n = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [r, n, a].filter(R);
5413
+ const t = st(e), { jetBrains: i } = e.options.documentation ?? {}, s = e._documentationFileNames, n = s.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeHtml), r = s.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, s.vsCodeCss), a = s.webTypes === void 0 ? void 0 : u.join(e.dir.dist, s.webTypes), l = [n, r, a].filter(R);
5397
5414
  if (l.length === 0)
5398
5415
  return;
5399
- await Fi(l);
5416
+ await ji(l);
5400
5417
  const d = [];
5418
+ if (n !== void 0) {
5419
+ const c = JSON.stringify(Ma(e.apiJsonComponents), null, t);
5420
+ d.push(K(n, c));
5421
+ }
5401
5422
  if (r !== void 0) {
5402
5423
  const c = JSON.stringify(Ja(e.apiJsonComponents), null, t);
5403
5424
  d.push(K(r, c));
5404
5425
  }
5405
- if (n !== void 0) {
5406
- const c = JSON.stringify(Ba(e.apiJsonComponents), null, t);
5407
- d.push(K(n, c));
5408
- }
5409
5426
  if (a !== void 0) {
5410
- const c = ja(e.apiJsonComponents, typeof i == "object" ? i : {});
5427
+ const c = Na(e.apiJsonComponents, typeof i == "object" ? i : {});
5411
5428
  d.push(K(a, JSON.stringify(c, null, t)));
5412
5429
  }
5413
5430
  await Promise.all(d);
5414
5431
  }
5415
5432
  };
5416
5433
  }
5417
- function Wa(e) {
5434
+ function Ka(e) {
5418
5435
  return {
5419
5436
  name: "@arcgis/lumina:buildWrappers",
5420
5437
  apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
5421
5438
  async writeBundle() {
5422
5439
  e.isInStorybook || await Promise.all(
5423
5440
  e.options.build?.wrappers?.map(async (t) => {
5424
- t.type === "react18" && await Ha(e, t);
5441
+ t.type === "react18" && await za(e, t);
5425
5442
  }) ?? []
5426
5443
  );
5427
5444
  }
5428
5445
  };
5429
5446
  }
5430
- const Ua = "react", Zt = "@lit/react", za = `
5431
- import React from "${Ua}";
5432
- import { createComponent } from "${Zt}";
5433
- import type { EventName } from "${Zt}";
5447
+ const Wa = "react", Qt = "@lit/react", Ua = `
5448
+ import React from "${Wa}";
5449
+ import { createComponent } from "${Qt}";
5450
+ import type { EventName } from "${Qt}";
5434
5451
  import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
5435
5452
 
5436
5453
  const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
5437
5454
  `;
5438
- async function Ha(e, t) {
5455
+ async function za(e, t) {
5439
5456
  const { name: i } = j(), s = [];
5440
5457
  for (const a of e.apiJson.modules)
5441
5458
  for (const l of a.declarations)
5442
- l.customElement === !0 && s.push(qa(l));
5443
- const r = [`/// <reference types="${i}" preserve="true" />`, za, ...s].join(""), n = u.resolve(t.proxiesFile);
5444
- await X(u.dirname(n), { recursive: !0 }), await K(n, r);
5459
+ l.customElement === !0 && s.push(Ha(l));
5460
+ const n = [`/// <reference types="${i}" preserve="true" />`, Ua, ...s].join(""), r = u.resolve(t.proxiesFile);
5461
+ await X(u.dirname(r), { recursive: !0 }), await K(r, n);
5445
5462
  }
5446
- function qa(e) {
5463
+ function Ha(e) {
5447
5464
  const t = e.events?.map(
5448
- (i) => ` ${Hs(`on${ws(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5465
+ (i) => ` ${zs(`on${bs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
5449
5466
  ).join(`
5450
5467
  `);
5451
5468
  return `
@@ -5460,42 +5477,42 @@ ${t}
5460
5477
  );
5461
5478
  `;
5462
5479
  }
5463
- function Sc(e = {}) {
5480
+ function wc(e = {}) {
5464
5481
  const t = new $(e), s = [
5465
5482
  t._plugin,
5466
- Kn(t),
5467
- Vn(t),
5468
- Qn(t),
5469
- ya(t),
5483
+ _n(t),
5484
+ qn(t),
5485
+ Yn(t),
5486
+ ha(t),
5487
+ Nn(t),
5488
+ _a(t),
5489
+ ma(t),
5490
+ uo(t),
5491
+ mr(t),
5470
5492
  jn(t),
5493
+ ga(t),
5494
+ fo(t),
5495
+ io(t),
5496
+ qs(t),
5497
+ cn(t),
5471
5498
  Ka(t),
5472
- fa(t),
5473
- mo(t),
5474
- fr(t),
5475
- Fn(t),
5476
- ha(t),
5477
- go(t),
5478
- so(t),
5479
- Vs(t),
5480
- ln(t),
5481
- Wa(t),
5482
- Rn(t)
5499
+ Fn(t)
5483
5500
  ].filter(R);
5484
5501
  return s.context = t, s;
5485
5502
  }
5486
- const Cc = {
5487
- initializeComponentDependencies: Ti,
5488
- updateLuminaTs: Xi,
5503
+ const Sc = {
5504
+ initializeComponentDependencies: Ei,
5505
+ updateLuminaTs: Gi,
5489
5506
  propertyToAttributeMappings: W,
5490
- nativeEvents: ui,
5491
- svgElements: at,
5492
- mathMlElements: ct,
5493
- alwaysAttributes: li,
5494
- nativeAlwaysAttributes: di,
5495
- htmlAlwaysAttributes: Qe
5507
+ nativeEvents: pi,
5508
+ svgElements: ot,
5509
+ mathMlElements: at,
5510
+ alwaysAttributes: ci,
5511
+ nativeAlwaysAttributes: li,
5512
+ htmlAlwaysAttributes: Ye
5496
5513
  };
5497
5514
  export {
5498
- Cc as exportsForCodemod,
5515
+ Sc as exportsForCodemod,
5499
5516
  De as inferCdnUrl,
5500
- Sc as useLumina
5517
+ wc as useLumina
5501
5518
  };