@road-labs/map-sdk 0.0.28-rc.9 → 3.0.1-rc.12

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.mjs CHANGED
@@ -101,7 +101,7 @@ const Xr = {
101
101
  "filters.allAccessibility": "All accessibility types",
102
102
  "filters.remoteStartStop": "Supports remote charge",
103
103
  "filters.searchPhrase": "Search",
104
- "filters.searchPhrasePlaceholder": "EVSE ID or name",
104
+ "filters.searchPhrasePlaceholder": "EVSE ID or location name",
105
105
  "filters.operator": "Include operator(s)",
106
106
  "filters.excludeOperator": "Exclude operator(s)",
107
107
  "filters.authMethodCapabilities": "Payment methods",
@@ -212,7 +212,7 @@ const Xr = {
212
212
  "filters.allAccessibility": "Alle toegankelijkheidstypes",
213
213
  "filters.remoteStartStop": "Ondersteunt op afstand laden",
214
214
  "filters.searchPhrase": "Zoeken",
215
- "filters.searchPhrasePlaceholder": "EVSE-ID of naam",
215
+ "filters.searchPhrasePlaceholder": "EVSE-ID of locatienaam",
216
216
  "filters.operator": "Operator(s) opnemen",
217
217
  "filters.excludeOperator": "Operator(s) uitsluiten",
218
218
  "filters.authMethodCapabilities": "Betaalmethoden",
@@ -323,7 +323,7 @@ const Xr = {
323
323
  "filters.allAccessibility": "Alle Zugänglichkeitstypen",
324
324
  "filters.remoteStartStop": "Unterstützt Fernladen",
325
325
  "filters.searchPhrase": "Suche",
326
- "filters.searchPhrasePlaceholder": "EVSE-ID oder Name",
326
+ "filters.searchPhrasePlaceholder": "EVSE-ID oder Standortname",
327
327
  "filters.operator": "Betreiber einschließen",
328
328
  "filters.excludeOperator": "Betreiber ausschließen",
329
329
  "filters.authMethodCapabilities": "Zahlungsmethoden",
@@ -434,7 +434,7 @@ const Xr = {
434
434
  "filters.allAccessibility": "Tous types d'accessibilité",
435
435
  "filters.remoteStartStop": "Prend en charge la recharge à distance",
436
436
  "filters.searchPhrase": "Rechercher",
437
- "filters.searchPhrasePlaceholder": "ID EVSE ou nom",
437
+ "filters.searchPhrasePlaceholder": "ID EVSE ou nom du lieu",
438
438
  "filters.operator": "Inclure le(s) opérateur(s)",
439
439
  "filters.excludeOperator": "Exclure le(s) opérateur(s)",
440
440
  "filters.authMethodCapabilities": "Moyens de paiement",
@@ -545,7 +545,7 @@ const Xr = {
545
545
  "filters.allAccessibility": "Tutti i tipi di accessibilità",
546
546
  "filters.remoteStartStop": "Supporta la ricarica da remoto",
547
547
  "filters.searchPhrase": "Cerca",
548
- "filters.searchPhrasePlaceholder": "ID EVSE o nome",
548
+ "filters.searchPhrasePlaceholder": "ID EVSE o nome della posizione",
549
549
  "filters.operator": "Includi operatore/i",
550
550
  "filters.excludeOperator": "Escludi operatore/i",
551
551
  "filters.authMethodCapabilities": "Metodi di pagamento",
@@ -656,7 +656,7 @@ const Xr = {
656
656
  "filters.allAccessibility": "Todos los tipos de accesibilidad",
657
657
  "filters.remoteStartStop": "Admite carga remota",
658
658
  "filters.searchPhrase": "Buscar",
659
- "filters.searchPhrasePlaceholder": "ID de EVSE o nombre",
659
+ "filters.searchPhrasePlaceholder": "ID de EVSE o nombre de la ubicación",
660
660
  "filters.operator": "Incluir operador(es)",
661
661
  "filters.excludeOperator": "Excluir operador(es)",
662
662
  "filters.authMethodCapabilities": "Métodos de pago",
@@ -734,7 +734,7 @@ function Jt(e) {
734
734
  const t = oi.indexOf((e || "").toLowerCase());
735
735
  return t === -1 ? 0 : t;
736
736
  }
737
- function se(e, t) {
737
+ function oe(e, t) {
738
738
  return Jt(e) >= Jt(t);
739
739
  }
740
740
  async function $e(e, t) {
@@ -746,7 +746,7 @@ async function $e(e, t) {
746
746
  ...t.version && {
747
747
  version: t.version
748
748
  },
749
- ...t.authorization && se(t.version, "v2") && {
749
+ ...t.authorization && oe(t.version, "v2") && {
750
750
  Authorization: `Bearer ${t.authorization}`
751
751
  }
752
752
  },
@@ -832,7 +832,7 @@ async function ci(e, t, n, { ids: r, status: i }) {
832
832
  authorization: n,
833
833
  body: JSON.stringify({
834
834
  ids: r,
835
- ...se(t, "v2") ? { status: i } : {}
835
+ ...oe(t, "v2") ? { status: i } : {}
836
836
  })
837
837
  });
838
838
  }
@@ -886,7 +886,7 @@ const pi = {
886
886
  grey: "#94999e"
887
887
  };
888
888
  function mi(e) {
889
- return se(e, "v3") ? Kn : pi;
889
+ return oe(e, "v3") ? Kn : pi;
890
890
  }
891
891
  const kt = /* @__PURE__ */ new Set([
892
892
  "CHARGING",
@@ -928,7 +928,7 @@ const vi = {
928
928
  offline: "amber"
929
929
  };
930
930
  function bi(e, t) {
931
- return e === "cpo" ? Ci : se(t, "v3") ? yi : vi;
931
+ return e === "cpo" ? Ci : oe(t, "v3") ? yi : vi;
932
932
  }
933
933
  function qn(e, t = "roaming", n) {
934
934
  return mi(n)[bi(t, n)[e]];
@@ -1095,20 +1095,20 @@ const tr = "EUR", Rt = jn({
1095
1095
  type: "success"
1096
1096
  }), [O, g] = Y(!1), [_, q] = Y(), [K, Z] = Y(), te = window.location.search.includes("debug=true");
1097
1097
  te && console.log("map-context options", t.options);
1098
- const oe = ce(
1098
+ const ae = ce(
1099
1099
  () => Jr(t.options.language),
1100
1100
  [t.options.language]
1101
- ), ge = ce(() => (w, M) => ii[oe][w].replace(/\{\{(\w+)\}\}/g, (k, ae) => M[ae]), [oe]), ue = (() => {
1102
- const w = t.options.apiRoot?.replace(/\/+$/, "");
1103
- return w && /\.dev|localhost|127\.0\.0\.1/.test(w) ? w : se(t.options.version, "v2") ? "https://roaming.road.io/v2/map-search" : "https://api.road.io";
1101
+ ), ge = ce(() => (N, M) => ii[ae][N].replace(/\{\{(\w+)\}\}/g, (k, se) => M[se]), [ae]), ue = (() => {
1102
+ const N = t.options.apiRoot?.replace(/\/+$/, "");
1103
+ return N && /\.dev|localhost|127\.0\.0\.1/.test(N) ? N : oe(t.options.version, "v2") ? "https://roaming.road.io/v2/map-search" : "https://api.road.io";
1104
1104
  })();
1105
- let N = t.options.version, $ = t.options.authorization;
1105
+ let w = t.options.version, $ = t.options.authorization;
1106
1106
  const X = window.location.search.split("map_key=")[1];
1107
- X && ($ = X, se(N, "v2") || (N = "v2"));
1107
+ X && ($ = X, oe(w, "v2") || (w = "v2"));
1108
1108
  const le = K?.toLowerCase() === "cpo" ? "cpo" : "roaming", ve = (t.options.currency || n.currency || tr).trim().toUpperCase(), Ie = {
1109
1109
  // every search and analytics request names the currency so the price on
1110
1110
  // each bucket and the price limit agree with what the widget shows
1111
- ...se(N, "v3") && { currency: ve },
1111
+ ...oe(w, "v3") && { currency: ve },
1112
1112
  ...t.options.infraProviderId && {
1113
1113
  infraProviderId: t.options.infraProviderId
1114
1114
  },
@@ -1119,44 +1119,44 @@ const tr = "EUR", Rt = jn({
1119
1119
  ...t.options.evseId && { evseId: t.options.evseId },
1120
1120
  ...t.options.from && { from: t.options.from },
1121
1121
  ...t.options.to && { to: t.options.to }
1122
- }, y = (w) => ai(
1122
+ }, y = (N) => ai(
1123
1123
  ue,
1124
- N,
1124
+ w,
1125
1125
  $,
1126
1126
  t.options.limitToLocationIds || [],
1127
- { ...Ie, ...w },
1127
+ { ...Ie, ...N },
1128
1128
  le
1129
- ), E = (w) => si(
1129
+ ), E = (N) => si(
1130
1130
  ue,
1131
- N,
1131
+ w,
1132
1132
  $,
1133
1133
  t.options.limitToLocationIds || [],
1134
- { ...Ie, ...w },
1134
+ { ...Ie, ...N },
1135
1135
  le
1136
1136
  ), F = ci.bind(
1137
1137
  null,
1138
1138
  ue,
1139
- N,
1139
+ w,
1140
1140
  $
1141
1141
  ), H = li.bind(
1142
1142
  null,
1143
1143
  ue,
1144
- N,
1144
+ w,
1145
1145
  $
1146
1146
  ), I = di.bind(
1147
1147
  null,
1148
1148
  ue,
1149
- N,
1149
+ w,
1150
1150
  $
1151
1151
  );
1152
- async function z({ ids: w, status: M }) {
1152
+ async function z({ ids: N, status: M }) {
1153
1153
  D({ type: "loading" });
1154
1154
  try {
1155
1155
  const { data: k } = await F({
1156
- ids: w,
1157
- ...se(N, "v2") ? { status: Ai(le, M) } : {}
1156
+ ids: N,
1157
+ ...oe(w, "v2") ? { status: Ai(le, M) } : {}
1158
1158
  });
1159
- return R(k.filter((ae) => ae?.evses?.length)), D({ type: "success" }), k;
1159
+ return R(k.filter((se) => se?.evses?.length)), D({ type: "success" }), k;
1160
1160
  } catch (k) {
1161
1161
  D({ type: "error", error: k });
1162
1162
  }
@@ -1165,9 +1165,9 @@ const tr = "EUR", Rt = jn({
1165
1165
  t.options.locationId && z({
1166
1166
  ids: [t.options.locationId],
1167
1167
  status: h.status
1168
- }).then((w) => {
1169
- if (w?.length) {
1170
- const M = w[0];
1168
+ }).then((N) => {
1169
+ if (N?.length) {
1170
+ const M = N[0];
1171
1171
  M.geoLocation?.coordinates && f({
1172
1172
  lng: M.geoLocation?.coordinates[0],
1173
1173
  lat: M.geoLocation?.coordinates[1]
@@ -1175,50 +1175,50 @@ const tr = "EUR", Rt = jn({
1175
1175
  }
1176
1176
  });
1177
1177
  }, [t.options.locationId]), J(() => {
1178
- ui(ue, N, $).then((w) => {
1179
- te && console.log("retrieved remote config", w), o({
1180
- ...w,
1178
+ ui(ue, w, $).then((N) => {
1179
+ te && console.log("retrieved remote config", N), o({
1180
+ ...N,
1181
1181
  ...i
1182
1182
  }), r({
1183
- googleApiKey: w.googleMapsApiKey,
1183
+ googleApiKey: N.googleMapsApiKey,
1184
1184
  ...n,
1185
- ...w
1186
- }), Z(w.context), !n.locationId && !n?.position?.lat && w.ipLatitude ? (te && console.debug("setting position from ip latitude and longitude"), f({
1187
- lat: w.ipLatitude,
1188
- lng: w.ipLongitude
1185
+ ...N
1186
+ }), Z(N.context), !n.locationId && !n?.position?.lat && N.ipLatitude ? (te && console.debug("setting position from ip latitude and longitude"), f({
1187
+ lat: N.ipLatitude,
1188
+ lng: N.ipLongitude
1189
1189
  })) : n.locationId || (te && console.debug("setting position from options position"), f(
1190
1190
  n?.position?.lat ? n.position : {
1191
1191
  lat: 52.3676,
1192
1192
  lng: 4.9041
1193
1193
  }
1194
1194
  ));
1195
- }).catch((w) => c(w));
1195
+ }).catch((N) => c(N));
1196
1196
  }, []), J(() => {
1197
1197
  C?.length && z({
1198
1198
  ids: C,
1199
1199
  status: h.status
1200
1200
  });
1201
1201
  }, [C]), J(() => {
1202
- const { theming: w, shadowRoot: M } = t.options;
1202
+ const { theming: N, shadowRoot: M } = t.options;
1203
1203
  if (M) {
1204
1204
  const k = M.querySelectorAll("#road-map-styles")[0] || document.createElement("style");
1205
1205
  k.setAttribute("type", "text/css"), k.setAttribute("id", "road-map-styles"), k.innerHTML = `
1206
1206
  :host {
1207
- --roadmap-brand-color: ${w?.brandColor || "#6102d3"};
1208
- --roadmap-background-color: ${w?.backgroundColor || "#ffffff"};
1209
- --roadmap-text-color: ${w?.textColor || "#2a2a2a"};
1210
- --roadmap-border-color: ${w?.borderColor || "#dddddd"};
1211
- --roadmap-font-family: ${w?.fontFamily || "Inter"};
1207
+ --roadmap-brand-color: ${N?.brandColor || "#6102d3"};
1208
+ --roadmap-background-color: ${N?.backgroundColor || "#ffffff"};
1209
+ --roadmap-text-color: ${N?.textColor || "#2a2a2a"};
1210
+ --roadmap-border-color: ${N?.borderColor || "#dddddd"};
1211
+ --roadmap-font-family: ${N?.fontFamily || "Inter"};
1212
1212
  }
1213
1213
  `, M.appendChild(k);
1214
1214
  }
1215
1215
  }, [t.options.theming]);
1216
- const L = !!(u && n?.googleApiKey && K), V = ce(() => ({
1216
+ const L = !!(u && n?.googleApiKey && (K || !oe(w, "v2"))), V = ce(() => ({
1217
1217
  options: n,
1218
1218
  setPlace: d,
1219
1219
  place: l,
1220
1220
  t: ge,
1221
- language: oe,
1221
+ language: ae,
1222
1222
  fetchGeohashes: y,
1223
1223
  fetchAnalytics: E,
1224
1224
  searchBounds: _,
@@ -1241,7 +1241,7 @@ const tr = "EUR", Rt = jn({
1241
1241
  setIsSearching: g
1242
1242
  }), [
1243
1243
  u,
1244
- oe,
1244
+ ae,
1245
1245
  b,
1246
1246
  B,
1247
1247
  H,
@@ -2395,7 +2395,7 @@ function Do({
2395
2395
  _.length == 100 && e.setZoom(e.getZoom() + 2), e.panTo({ lat: g.centroid.lat, lng: g.centroid.lon }), _.length !== 100 && r(_);
2396
2396
  },
2397
2397
  [e, r]
2398
- ), D = se(l?.version, "v3"), O = (g) => !!c?.length && g.ids.some((_) => c.includes(_));
2398
+ ), D = oe(l?.version, "v3"), O = (g) => !!c?.length && g.ids.some((_) => c.includes(_));
2399
2399
  return D ? /* @__PURE__ */ p(re, { children: [
2400
2400
  /* @__PURE__ */ a(go, {}),
2401
2401
  f.filter(Boolean).map((g) => {
@@ -2445,7 +2445,7 @@ function Io() {
2445
2445
  mapId: "ced50d4165f3a695",
2446
2446
  center: s,
2447
2447
  // Initial map center coordinates
2448
- zoom: 12,
2448
+ zoom: t.zoomLevel ?? 12,
2449
2449
  // Initial zoom level,
2450
2450
  zoomControl: !0,
2451
2451
  mapTypeControl: !1,
@@ -2633,7 +2633,7 @@ function jo() {
2633
2633
  searchBounds: o,
2634
2634
  fetchAnalytics: s,
2635
2635
  mapKind: c
2636
- } = W(), [l, d] = Y(), [u, f] = Y(!1), [h, v] = Y("ocpp"), C = Ro(), m = se(n?.version, "v2") && !!i?.showAnalytics, b = JSON.stringify(xi(r)), R = ce(
2636
+ } = W(), [l, d] = Y(), [u, f] = Y(!1), [h, v] = Y("ocpp"), C = Ro(), m = oe(n?.version, "v2") && !!i?.showAnalytics, b = JSON.stringify(xi(r)), R = ce(
2637
2637
  () => JSON.parse(b),
2638
2638
  [b]
2639
2639
  );
@@ -2850,7 +2850,7 @@ function Ko() {
2850
2850
  }
2851
2851
  }
2852
2852
  }
2853
- var g = l, _ = d, q = c, K = s, Z = t, te = u, oe = r, ge = C, ue = v, N = n, $ = o, X = i, le = f, ve = !1;
2853
+ var g = l, _ = d, q = c, K = s, Z = t, te = u, ae = r, ge = C, ue = v, w = n, $ = o, X = i, le = f, ve = !1;
2854
2854
  function Ie(T) {
2855
2855
  return ve || (ve = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), y(T) || O(T) === l;
2856
2856
  }
@@ -2878,7 +2878,7 @@ function Ko() {
2878
2878
  function V(T) {
2879
2879
  return O(T) === v;
2880
2880
  }
2881
- function w(T) {
2881
+ function N(T) {
2882
2882
  return O(T) === n;
2883
2883
  }
2884
2884
  function M(T) {
@@ -2887,10 +2887,10 @@ function Ko() {
2887
2887
  function k(T) {
2888
2888
  return O(T) === i;
2889
2889
  }
2890
- function ae(T) {
2890
+ function se(T) {
2891
2891
  return O(T) === f;
2892
2892
  }
2893
- G.AsyncMode = g, G.ConcurrentMode = _, G.ContextConsumer = q, G.ContextProvider = K, G.Element = Z, G.ForwardRef = te, G.Fragment = oe, G.Lazy = ge, G.Memo = ue, G.Portal = N, G.Profiler = $, G.StrictMode = X, G.Suspense = le, G.isAsyncMode = Ie, G.isConcurrentMode = y, G.isContextConsumer = E, G.isContextProvider = F, G.isElement = H, G.isForwardRef = I, G.isFragment = z, G.isLazy = L, G.isMemo = V, G.isPortal = w, G.isProfiler = M, G.isStrictMode = k, G.isSuspense = ae, G.isValidElementType = D, G.typeOf = O;
2893
+ G.AsyncMode = g, G.ConcurrentMode = _, G.ContextConsumer = q, G.ContextProvider = K, G.Element = Z, G.ForwardRef = te, G.Fragment = ae, G.Lazy = ge, G.Memo = ue, G.Portal = w, G.Profiler = $, G.StrictMode = X, G.Suspense = le, G.isAsyncMode = Ie, G.isConcurrentMode = y, G.isContextConsumer = E, G.isContextProvider = F, G.isElement = H, G.isForwardRef = I, G.isFragment = z, G.isLazy = L, G.isMemo = V, G.isPortal = N, G.isProfiler = M, G.isStrictMode = k, G.isSuspense = se, G.isValidElementType = D, G.typeOf = O;
2894
2894
  })()), G;
2895
2895
  }
2896
2896
  var dn;
@@ -3063,31 +3063,31 @@ function Jo() {
3063
3063
  function b(y) {
3064
3064
  if (process.env.NODE_ENV !== "production")
3065
3065
  var E = {}, F = 0;
3066
- function H(z, L, V, w, M, k, ae) {
3067
- if (w = w || h, k = k || V, ae !== n) {
3066
+ function H(z, L, V, N, M, k, se) {
3067
+ if (N = N || h, k = k || V, se !== n) {
3068
3068
  if (l) {
3069
3069
  var T = new Error(
3070
3070
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
3071
3071
  );
3072
3072
  throw T.name = "Invariant Violation", T;
3073
3073
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
3074
- var ye = w + ":" + V;
3074
+ var ye = N + ":" + V;
3075
3075
  !E[ye] && // Avoid spamming the console because they are often not actionable except for lib authors
3076
3076
  F < 3 && (o(
3077
- "You are manually calling a React.PropTypes validation function for the `" + k + "` prop on `" + w + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
3077
+ "You are manually calling a React.PropTypes validation function for the `" + k + "` prop on `" + N + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
3078
3078
  ), E[ye] = !0, F++);
3079
3079
  }
3080
3080
  }
3081
- return L[V] == null ? z ? L[V] === null ? new m("The " + M + " `" + k + "` is marked as required " + ("in `" + w + "`, but its value is `null`.")) : new m("The " + M + " `" + k + "` is marked as required in " + ("`" + w + "`, but its value is `undefined`.")) : null : y(L, V, w, M, k);
3081
+ return L[V] == null ? z ? L[V] === null ? new m("The " + M + " `" + k + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new m("The " + M + " `" + k + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : y(L, V, N, M, k);
3082
3082
  }
3083
3083
  var I = H.bind(null, !1);
3084
3084
  return I.isRequired = H.bind(null, !0), I;
3085
3085
  }
3086
3086
  function R(y) {
3087
3087
  function E(F, H, I, z, L, V) {
3088
- var w = F[H], M = X(w);
3088
+ var N = F[H], M = X(N);
3089
3089
  if (M !== y) {
3090
- var k = le(w);
3090
+ var k = le(N);
3091
3091
  return new m(
3092
3092
  "Invalid " + z + " `" + L + "` of type " + ("`" + k + "` supplied to `" + I + "`, expected ") + ("`" + y + "`."),
3093
3093
  { expectedType: y }
@@ -3106,8 +3106,8 @@ function Jo() {
3106
3106
  return new m("Property `" + L + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
3107
3107
  var V = F[H];
3108
3108
  if (!Array.isArray(V)) {
3109
- var w = X(V);
3110
- return new m("Invalid " + z + " `" + L + "` of type " + ("`" + w + "` supplied to `" + I + "`, expected an array."));
3109
+ var N = X(V);
3110
+ return new m("Invalid " + z + " `" + L + "` of type " + ("`" + N + "` supplied to `" + I + "`, expected an array."));
3111
3111
  }
3112
3112
  for (var M = 0; M < V.length; M++) {
3113
3113
  var k = y(V, M, I, z, L + "[" + M + "]", n);
@@ -3143,8 +3143,8 @@ function Jo() {
3143
3143
  function _(y) {
3144
3144
  function E(F, H, I, z, L) {
3145
3145
  if (!(F[H] instanceof y)) {
3146
- var V = y.name || h, w = Ie(F[H]);
3147
- return new m("Invalid " + z + " `" + L + "` of type " + ("`" + w + "` supplied to `" + I + "`, expected ") + ("instance of `" + V + "`."));
3146
+ var V = y.name || h, N = Ie(F[H]);
3147
+ return new m("Invalid " + z + " `" + L + "` of type " + ("`" + N + "` supplied to `" + I + "`, expected ") + ("instance of `" + V + "`."));
3148
3148
  }
3149
3149
  return null;
3150
3150
  }
@@ -3156,10 +3156,10 @@ function Jo() {
3156
3156
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
3157
3157
  ) : o("Invalid argument supplied to oneOf, expected an array.")), s;
3158
3158
  function E(F, H, I, z, L) {
3159
- for (var V = F[H], w = 0; w < y.length; w++)
3160
- if (C(V, y[w]))
3159
+ for (var V = F[H], N = 0; N < y.length; N++)
3160
+ if (C(V, y[N]))
3161
3161
  return null;
3162
- var M = JSON.stringify(y, function(ae, T) {
3162
+ var M = JSON.stringify(y, function(se, T) {
3163
3163
  var ye = le(T);
3164
3164
  return ye === "symbol" ? String(T) : T;
3165
3165
  });
@@ -3171,9 +3171,9 @@ function Jo() {
3171
3171
  function E(F, H, I, z, L) {
3172
3172
  if (typeof y != "function")
3173
3173
  return new m("Property `" + L + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
3174
- var V = F[H], w = X(V);
3175
- if (w !== "object")
3176
- return new m("Invalid " + z + " `" + L + "` of type " + ("`" + w + "` supplied to `" + I + "`, expected an object."));
3174
+ var V = F[H], N = X(V);
3175
+ if (N !== "object")
3176
+ return new m("Invalid " + z + " `" + L + "` of type " + ("`" + N + "` supplied to `" + I + "`, expected an object."));
3177
3177
  for (var M in V)
3178
3178
  if (r(V, M)) {
3179
3179
  var k = y(V, M, I, z, L + "." + M, n);
@@ -3194,41 +3194,41 @@ function Jo() {
3194
3194
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ve(F) + " at index " + E + "."
3195
3195
  ), s;
3196
3196
  }
3197
- function H(I, z, L, V, w) {
3197
+ function H(I, z, L, V, N) {
3198
3198
  for (var M = [], k = 0; k < y.length; k++) {
3199
- var ae = y[k], T = ae(I, z, L, V, w, n);
3199
+ var se = y[k], T = se(I, z, L, V, N, n);
3200
3200
  if (T == null)
3201
3201
  return null;
3202
3202
  T.data && r(T.data, "expectedType") && M.push(T.data.expectedType);
3203
3203
  }
3204
3204
  var ye = M.length > 0 ? ", expected one of type [" + M.join(", ") + "]" : "";
3205
- return new m("Invalid " + V + " `" + w + "` supplied to " + ("`" + L + "`" + ye + "."));
3205
+ return new m("Invalid " + V + " `" + N + "` supplied to " + ("`" + L + "`" + ye + "."));
3206
3206
  }
3207
3207
  return b(H);
3208
3208
  }
3209
3209
  function te() {
3210
3210
  function y(E, F, H, I, z) {
3211
- return N(E[F]) ? null : new m("Invalid " + I + " `" + z + "` supplied to " + ("`" + H + "`, expected a ReactNode."));
3211
+ return w(E[F]) ? null : new m("Invalid " + I + " `" + z + "` supplied to " + ("`" + H + "`, expected a ReactNode."));
3212
3212
  }
3213
3213
  return b(y);
3214
3214
  }
3215
- function oe(y, E, F, H, I) {
3215
+ function ae(y, E, F, H, I) {
3216
3216
  return new m(
3217
3217
  (y || "React class") + ": " + E + " type `" + F + "." + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
3218
3218
  );
3219
3219
  }
3220
3220
  function ge(y) {
3221
3221
  function E(F, H, I, z, L) {
3222
- var V = F[H], w = X(V);
3223
- if (w !== "object")
3224
- return new m("Invalid " + z + " `" + L + "` of type `" + w + "` " + ("supplied to `" + I + "`, expected `object`."));
3222
+ var V = F[H], N = X(V);
3223
+ if (N !== "object")
3224
+ return new m("Invalid " + z + " `" + L + "` of type `" + N + "` " + ("supplied to `" + I + "`, expected `object`."));
3225
3225
  for (var M in y) {
3226
3226
  var k = y[M];
3227
3227
  if (typeof k != "function")
3228
- return oe(I, z, L, M, le(k));
3229
- var ae = k(V, M, I, z, L + "." + M, n);
3230
- if (ae)
3231
- return ae;
3228
+ return ae(I, z, L, M, le(k));
3229
+ var se = k(V, M, I, z, L + "." + M, n);
3230
+ if (se)
3231
+ return se;
3232
3232
  }
3233
3233
  return null;
3234
3234
  }
@@ -3236,20 +3236,20 @@ function Jo() {
3236
3236
  }
3237
3237
  function ue(y) {
3238
3238
  function E(F, H, I, z, L) {
3239
- var V = F[H], w = X(V);
3240
- if (w !== "object")
3241
- return new m("Invalid " + z + " `" + L + "` of type `" + w + "` " + ("supplied to `" + I + "`, expected `object`."));
3239
+ var V = F[H], N = X(V);
3240
+ if (N !== "object")
3241
+ return new m("Invalid " + z + " `" + L + "` of type `" + N + "` " + ("supplied to `" + I + "`, expected `object`."));
3242
3242
  var M = t({}, F[H], y);
3243
3243
  for (var k in M) {
3244
- var ae = y[k];
3245
- if (r(y, k) && typeof ae != "function")
3246
- return oe(I, z, L, k, le(ae));
3247
- if (!ae)
3244
+ var se = y[k];
3245
+ if (r(y, k) && typeof se != "function")
3246
+ return ae(I, z, L, k, le(se));
3247
+ if (!se)
3248
3248
  return new m(
3249
3249
  "Invalid " + z + " `" + L + "` key `" + k + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(F[H], null, " ") + `
3250
3250
  Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
3251
3251
  );
3252
- var T = ae(V, k, I, z, L + "." + k, n);
3252
+ var T = se(V, k, I, z, L + "." + k, n);
3253
3253
  if (T)
3254
3254
  return T;
3255
3255
  }
@@ -3257,7 +3257,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
3257
3257
  }
3258
3258
  return b(E);
3259
3259
  }
3260
- function N(y) {
3260
+ function w(y) {
3261
3261
  switch (typeof y) {
3262
3262
  case "number":
3263
3263
  case "string":
@@ -3267,7 +3267,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
3267
3267
  return !y;
3268
3268
  case "object":
3269
3269
  if (Array.isArray(y))
3270
- return y.every(N);
3270
+ return y.every(w);
3271
3271
  if (y === null || c(y))
3272
3272
  return !0;
3273
3273
  var E = f(y);
@@ -3275,12 +3275,12 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
3275
3275
  var F = E.call(y), H;
3276
3276
  if (E !== y.entries) {
3277
3277
  for (; !(H = F.next()).done; )
3278
- if (!N(H.value))
3278
+ if (!w(H.value))
3279
3279
  return !1;
3280
3280
  } else
3281
3281
  for (; !(H = F.next()).done; ) {
3282
3282
  var I = H.value;
3283
- if (I && !N(I[1]))
3283
+ if (I && !w(I[1]))
3284
3284
  return !1;
3285
3285
  }
3286
3286
  } else
@@ -4309,13 +4309,13 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4309
4309
  () => new Set(i),
4310
4310
  [i]
4311
4311
  ), { preferred: B, others: D } = ce(() => {
4312
- const N = f.toLowerCase(), $ = n.filter((X) => X.label.toLowerCase().includes(N));
4312
+ const w = f.toLowerCase(), $ = n.filter((X) => X.label.toLowerCase().includes(w));
4313
4313
  return {
4314
4314
  preferred: $.filter((X) => R.has(X.value)),
4315
4315
  others: $.filter((X) => !R.has(X.value))
4316
4316
  };
4317
4317
  }, [n, f, R]), O = ce(() => [...B, ...D], [B, D]), g = ce(
4318
- () => n.filter((N) => r.includes(N.value)),
4318
+ () => n.filter((w) => r.includes(w.value)),
4319
4319
  [n, r]
4320
4320
  );
4321
4321
  J(() => {
@@ -4325,62 +4325,62 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4325
4325
  s || (u(!0), v < 0 && O.length > 0 && C(0));
4326
4326
  }, q = () => {
4327
4327
  u(!1), h(""), C(-1);
4328
- }, K = (N) => {
4329
- if (N.disabled) return;
4330
- const $ = r.includes(N.value) ? r.filter((X) => X !== N.value) : [...r, N.value];
4328
+ }, K = (w) => {
4329
+ if (w.disabled) return;
4330
+ const $ = r.includes(w.value) ? r.filter((X) => X !== w.value) : [...r, w.value];
4331
4331
  l?.($), h(""), u(!0), m.current?.focus();
4332
- }, Z = (N) => {
4333
- l?.(r.filter(($) => $ !== N));
4334
- }, te = (N) => {
4332
+ }, Z = (w) => {
4333
+ l?.(r.filter(($) => $ !== w));
4334
+ }, te = (w) => {
4335
4335
  if (!s)
4336
- switch (N.key) {
4336
+ switch (w.key) {
4337
4337
  case "Backspace":
4338
- f === "" && r.length > 0 && (N.preventDefault(), l?.(r.slice(0, -1)));
4338
+ f === "" && r.length > 0 && (w.preventDefault(), l?.(r.slice(0, -1)));
4339
4339
  return;
4340
4340
  case "ArrowDown":
4341
- N.preventDefault(), d ? O.length > 0 && C(($) => ($ + 1) % O.length) : (u(!0), O.length > 0 && C(0));
4341
+ w.preventDefault(), d ? O.length > 0 && C(($) => ($ + 1) % O.length) : (u(!0), O.length > 0 && C(0));
4342
4342
  return;
4343
4343
  case "ArrowUp":
4344
- N.preventDefault(), d ? O.length > 0 && C(
4344
+ w.preventDefault(), d ? O.length > 0 && C(
4345
4345
  ($) => ($ <= 0 ? O.length : $) - 1
4346
4346
  ) : (u(!0), O.length > 0 && C(O.length - 1));
4347
4347
  return;
4348
4348
  case "Enter":
4349
- d && v >= 0 && O[v] && (N.preventDefault(), K(O[v]));
4349
+ d && v >= 0 && O[v] && (w.preventDefault(), K(O[v]));
4350
4350
  return;
4351
4351
  case "Escape":
4352
- d && (N.preventDefault(), q());
4352
+ d && (w.preventDefault(), q());
4353
4353
  return;
4354
4354
  case "Home":
4355
- d && O.length > 0 && (N.preventDefault(), C(0));
4355
+ d && O.length > 0 && (w.preventDefault(), C(0));
4356
4356
  return;
4357
4357
  case "End":
4358
- d && O.length > 0 && (N.preventDefault(), C(O.length - 1));
4358
+ d && O.length > 0 && (w.preventDefault(), C(O.length - 1));
4359
4359
  return;
4360
4360
  default:
4361
4361
  return;
4362
4362
  }
4363
- }, oe = (N) => {
4364
- const $ = N.relatedTarget;
4363
+ }, ae = (w) => {
4364
+ const $ = w.relatedTarget;
4365
4365
  $ && b.current?.contains($) || q();
4366
4366
  }, ge = () => {
4367
4367
  s || (d ? u(!1) : _(), m.current?.focus());
4368
- }, ue = (N, $, X) => {
4369
- const le = r.includes(N.value);
4368
+ }, ue = (w, $, X) => {
4369
+ const le = r.includes(w.value);
4370
4370
  return /* @__PURE__ */ p(
4371
4371
  "div",
4372
4372
  {
4373
- className: `${Q.option} ${v === $ ? Q.optionFocused : ""} ${le ? Q.optionSelected : ""} ${N.disabled ? Q.optionDisabled : ""} ${X ? Q.optionLast : ""}`,
4373
+ className: `${Q.option} ${v === $ ? Q.optionFocused : ""} ${le ? Q.optionSelected : ""} ${w.disabled ? Q.optionDisabled : ""} ${X ? Q.optionLast : ""}`,
4374
4374
  role: "option",
4375
4375
  "aria-selected": le,
4376
- "aria-disabled": N.disabled || void 0,
4376
+ "aria-disabled": w.disabled || void 0,
4377
4377
  onMouseDown: (ve) => ve.preventDefault(),
4378
4378
  onMouseMove: () => {
4379
4379
  v !== $ && C($);
4380
4380
  },
4381
- onClick: () => K(N),
4381
+ onClick: () => K(w),
4382
4382
  children: [
4383
- /* @__PURE__ */ a("span", { className: Q.optionLabel, children: N.label }),
4383
+ /* @__PURE__ */ a("span", { className: Q.optionLabel, children: w.label }),
4384
4384
  le && /* @__PURE__ */ a(
4385
4385
  "svg",
4386
4386
  {
@@ -4398,7 +4398,7 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4398
4398
  )
4399
4399
  ]
4400
4400
  },
4401
- N.value
4401
+ w.value
4402
4402
  );
4403
4403
  };
4404
4404
  return /* @__PURE__ */ p(
@@ -4412,25 +4412,25 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4412
4412
  "div",
4413
4413
  {
4414
4414
  className: Q.valueContainer,
4415
- onMouseDown: (N) => {
4416
- N.target === N.currentTarget && (N.preventDefault(), m.current?.focus(), _());
4415
+ onMouseDown: (w) => {
4416
+ w.target === w.currentTarget && (w.preventDefault(), m.current?.focus(), _());
4417
4417
  },
4418
4418
  children: [
4419
- g.map((N) => /* @__PURE__ */ p("div", { className: Q.multiValue, children: [
4420
- /* @__PURE__ */ a("span", { className: Q.multiValueLabel, children: N.label }),
4419
+ g.map((w) => /* @__PURE__ */ p("div", { className: Q.multiValue, children: [
4420
+ /* @__PURE__ */ a("span", { className: Q.multiValueLabel, children: w.label }),
4421
4421
  /* @__PURE__ */ a(
4422
4422
  "button",
4423
4423
  {
4424
4424
  type: "button",
4425
4425
  className: Q.multiValueRemove,
4426
4426
  onMouseDown: ($) => $.preventDefault(),
4427
- onClick: () => Z(N.value),
4427
+ onClick: () => Z(w.value),
4428
4428
  disabled: s,
4429
- "aria-label": `Remove ${N.label}`,
4429
+ "aria-label": `Remove ${w.label}`,
4430
4430
  children: "×"
4431
4431
  }
4432
4432
  )
4433
- ] }, N.value)),
4433
+ ] }, w.value)),
4434
4434
  /* @__PURE__ */ a(
4435
4435
  "input",
4436
4436
  {
@@ -4439,12 +4439,12 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4439
4439
  name: t,
4440
4440
  className: Q.input,
4441
4441
  value: f,
4442
- onChange: (N) => {
4443
- h(N.target.value), u(!0), C(0);
4442
+ onChange: (w) => {
4443
+ h(w.target.value), u(!0), C(0);
4444
4444
  },
4445
4445
  onKeyDown: te,
4446
4446
  onFocus: _,
4447
- onBlur: oe,
4447
+ onBlur: ae,
4448
4448
  placeholder: g.length === 0 ? o : "",
4449
4449
  disabled: s,
4450
4450
  autoComplete: "off",
@@ -4461,7 +4461,7 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4461
4461
  {
4462
4462
  type: "button",
4463
4463
  className: Q.dropdownIndicator,
4464
- onMouseDown: (N) => N.preventDefault(),
4464
+ onMouseDown: (w) => w.preventDefault(),
4465
4465
  onClick: ge,
4466
4466
  disabled: s,
4467
4467
  "aria-label": "Toggle menu",
@@ -4487,8 +4487,8 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4487
4487
  B.length > 0 && /* @__PURE__ */ p(re, { children: [
4488
4488
  /* @__PURE__ */ a("div", { className: Q.groupHeading, children: "Preferred" }),
4489
4489
  B.map(
4490
- (N, $) => ue(
4491
- N,
4490
+ (w, $) => ue(
4491
+ w,
4492
4492
  $,
4493
4493
  $ === B.length - 1 && D.length === 0
4494
4494
  )
@@ -4500,8 +4500,8 @@ const za = "MultiSelect-module_multiSelect", Ba = "MultiSelect-module_control",
4500
4500
  /* @__PURE__ */ a("div", { className: Q.groupHeading, children: "All" })
4501
4501
  ] }),
4502
4502
  D.map(
4503
- (N, $) => ue(
4504
- N,
4503
+ (w, $) => ue(
4504
+ w,
4505
4505
  B.length + $,
4506
4506
  $ === D.length - 1
4507
4507
  )
@@ -4736,10 +4736,10 @@ function hs() {
4736
4736
  } = W(), [l, d] = ms({
4737
4737
  ...We,
4738
4738
  ...n
4739
- }), u = se(i.version, "v3") && r?.showPriceFilter, f = typeof l.maxEnergyPrice == "number" ? or(c, {
4739
+ }), u = oe(i.version, "v3") && r?.showPriceFilter, f = typeof l.maxEnergyPrice == "number" ? or(c, {
4740
4740
  amount: l.maxEnergyPrice,
4741
4741
  currency: s
4742
- }) : void 0, { setView: h } = Ve(), v = se(i.version, "v2") && r?.operators?.length > 1, C = be();
4742
+ }) : void 0, { setView: h } = Ve(), v = oe(i.version, "v2") && r?.operators?.length > 1, C = be();
4743
4743
  return J(() => {
4744
4744
  C.current && n !== C.current && d(n);
4745
4745
  }, [n]), J(() => {
@@ -4757,7 +4757,7 @@ function hs() {
4757
4757
  children: t("filters.clearAll")
4758
4758
  }
4759
4759
  ),
4760
- se(i.version, "v2") && r?.showSearchPhraseFilter && /* @__PURE__ */ p("div", { className: S.optionsGroup, children: [
4760
+ oe(i.version, "v2") && r?.showSearchPhraseFilter && /* @__PURE__ */ p("div", { className: S.optionsGroup, children: [
4761
4761
  /* @__PURE__ */ a("div", { className: S.heading, children: t("filters.searchPhrase") }),
4762
4762
  /* @__PURE__ */ a(
4763
4763
  "input",
@@ -4799,7 +4799,7 @@ function hs() {
4799
4799
  }
4800
4800
  )
4801
4801
  ] }),
4802
- !se(i.version, "v2") && /* @__PURE__ */ p("label", { htmlFor: "efluxChargers", className: S.rowLabel, children: [
4802
+ !oe(i.version, "v2") && /* @__PURE__ */ p("label", { htmlFor: "efluxChargers", className: S.rowLabel, children: [
4803
4803
  /* @__PURE__ */ a("div", { className: S.label, children: t("filters.efluxChargers") }),
4804
4804
  /* @__PURE__ */ a(
4805
4805
  fe,
@@ -4814,7 +4814,7 @@ function hs() {
4814
4814
  }
4815
4815
  )
4816
4816
  ] }),
4817
- (!se(i.version, "v2") || r?.showNoAdditionalFeeFilter) && /* @__PURE__ */ p("label", { htmlFor: "noAdditionalFee", className: S.rowLabel, children: [
4817
+ (!oe(i.version, "v2") || r?.showNoAdditionalFeeFilter) && /* @__PURE__ */ p("label", { htmlFor: "noAdditionalFee", className: S.rowLabel, children: [
4818
4818
  /* @__PURE__ */ a("div", { className: S.label, children: t("filters.noAdditionalFee") }),
4819
4819
  /* @__PURE__ */ a(
4820
4820
  fe,
@@ -4844,7 +4844,7 @@ function hs() {
4844
4844
  }
4845
4845
  )
4846
4846
  ] }),
4847
- r.showOperatorOnly && se(i.version, "v2") && /* @__PURE__ */ p("label", { htmlFor: "operatorOnly", className: S.rowLabel, children: [
4847
+ r.showOperatorOnly && oe(i.version, "v2") && /* @__PURE__ */ p("label", { htmlFor: "operatorOnly", className: S.rowLabel, children: [
4848
4848
  /* @__PURE__ */ a(
4849
4849
  "div",
4850
4850
  {
@@ -5187,7 +5187,7 @@ function hs() {
5187
5187
  )
5188
5188
  ] })
5189
5189
  ] }),
5190
- se(i.version, "v2") && r?.showPaymentMethodFilter && /* @__PURE__ */ p("div", { className: S.optionsGroup, children: [
5190
+ oe(i.version, "v2") && r?.showPaymentMethodFilter && /* @__PURE__ */ p("div", { className: S.optionsGroup, children: [
5191
5191
  /* @__PURE__ */ a("div", { className: S.heading, children: t("filters.authMethodCapabilities") }),
5192
5192
  fs.map((m) => {
5193
5193
  const b = `auth-${m.value}`, R = l.authMethodCapabilities?.includes(m.value) ?? !1;
@@ -7240,7 +7240,7 @@ const jc = ({ directions: e }) => {
7240
7240
  default:
7241
7241
  return [s?.address, s?.city];
7242
7242
  }
7243
- }, v = se(r.version, "v2");
7243
+ }, v = oe(r.version, "v2");
7244
7244
  return /* @__PURE__ */ p(re, { children: [
7245
7245
  f && s && /* @__PURE__ */ a(js, { location: s }),
7246
7246
  /* @__PURE__ */ a("div", { className: x.headerContainer, children: /* @__PURE__ */ p("div", { className: x.header, children: [
@@ -7497,7 +7497,7 @@ function o2() {
7497
7497
  ) }),
7498
7498
  _.map((Z) => /* @__PURE__ */ p("div", { style: Et, children: [
7499
7499
  /* @__PURE__ */ a("div", { style: Wn, children: Z.days.map((te) => K[te]).join(" – ") }),
7500
- Z.items.map((te, oe) => /* @__PURE__ */ a(
7500
+ Z.items.map((te, ae) => /* @__PURE__ */ a(
7501
7501
  Ge,
7502
7502
  {
7503
7503
  elements: te.elements || [],
@@ -7505,7 +7505,7 @@ function o2() {
7505
7505
  highlight: !!te.isActive,
7506
7506
  label: te.isFullDay ? void 0 : `${at(te.startTime)} – ${at(te.endTime)}`
7507
7507
  },
7508
- oe
7508
+ ae
7509
7509
  ))
7510
7510
  ] }, Z.days.join("-"))),
7511
7511
  g.map((Z, te) => /* @__PURE__ */ p("div", { style: Et, children: [
@@ -7516,13 +7516,13 @@ function o2() {
7516
7516
  day: "numeric"
7517
7517
  }).format(Z.date)
7518
7518
  }) }),
7519
- Z.items.map((oe, ge) => /* @__PURE__ */ a(
7519
+ Z.items.map((ae, ge) => /* @__PURE__ */ a(
7520
7520
  Ge,
7521
7521
  {
7522
- elements: oe.elements || [],
7522
+ elements: ae.elements || [],
7523
7523
  currency: B,
7524
- highlight: !!oe.isActive,
7525
- label: `${at(oe.startTime)} – ${at(oe.endTime)}`
7524
+ highlight: !!ae.isActive,
7525
+ label: `${at(ae.startTime)} – ${at(ae.endTime)}`
7526
7526
  },
7527
7527
  ge
7528
7528
  ))