@opengis/admin 0.1.85 → 0.1.86

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.
@@ -308,8 +308,8 @@ function qm(t, e, i) {
308
308
  metaTokens: !0,
309
309
  dots: !1,
310
310
  indexes: !1
311
- }, !1, function(N, V) {
312
- return !Ie.isUndefined(V[N]);
311
+ }, !1, function(F, V) {
312
+ return !Ie.isUndefined(V[F]);
313
313
  });
314
314
  const n = i.metaTokens, r = i.visitor || S, l = i.dots, u = i.indexes, g = (i.Blob || typeof Blob < "u" && Blob) && Ie.isSpecCompliantForm(e);
315
315
  if (!Ie.isFunction(r))
@@ -322,39 +322,39 @@ function qm(t, e, i) {
322
322
  throw new Gt("Blob is not supported. Use a Buffer instead.");
323
323
  return Ie.isArrayBuffer(I) || Ie.isTypedArray(I) ? g && typeof Blob == "function" ? new Blob([I]) : Buffer.from(I) : I;
324
324
  }
325
- function S(I, N, V) {
325
+ function S(I, F, V) {
326
326
  let W = I;
327
327
  if (I && !V && typeof I == "object") {
328
- if (Ie.endsWith(N, "{}"))
329
- N = n ? N : N.slice(0, -2), I = JSON.stringify(I);
330
- else if (Ie.isArray(I) && PA(I) || (Ie.isFileList(I) || Ie.endsWith(N, "[]")) && (W = Ie.toArray(I)))
331
- return N = RS(N), W.forEach(function(ce, Q) {
328
+ if (Ie.endsWith(F, "{}"))
329
+ F = n ? F : F.slice(0, -2), I = JSON.stringify(I);
330
+ else if (Ie.isArray(I) && PA(I) || (Ie.isFileList(I) || Ie.endsWith(F, "[]")) && (W = Ie.toArray(I)))
331
+ return F = RS(F), W.forEach(function(ce, Q) {
332
332
  !(Ie.isUndefined(ce) || ce === null) && e.append(
333
333
  // eslint-disable-next-line no-nested-ternary
334
- u === !0 ? Eb([N], Q, l) : u === null ? N : N + "[]",
334
+ u === !0 ? Eb([F], Q, l) : u === null ? F : F + "[]",
335
335
  _(ce)
336
336
  );
337
337
  }), !1;
338
338
  }
339
- return z0(I) ? !0 : (e.append(Eb(V, N, l), _(I)), !1);
339
+ return z0(I) ? !0 : (e.append(Eb(V, F, l), _(I)), !1);
340
340
  }
341
341
  const k = [], M = Object.assign(IA, {
342
342
  defaultVisitor: S,
343
343
  convertValue: _,
344
344
  isVisitable: z0
345
345
  });
346
- function P(I, N) {
346
+ function P(I, F) {
347
347
  if (!Ie.isUndefined(I)) {
348
348
  if (k.indexOf(I) !== -1)
349
- throw Error("Circular reference detected in " + N.join("."));
349
+ throw Error("Circular reference detected in " + F.join("."));
350
350
  k.push(I), Ie.forEach(I, function(W, se) {
351
351
  (!(Ie.isUndefined(W) || W === null) && r.call(
352
352
  e,
353
353
  W,
354
354
  Ie.isString(se) ? se.trim() : se,
355
- N,
355
+ F,
356
356
  M
357
- )) === !0 && P(W, N ? N.concat(se) : [se]);
357
+ )) === !0 && P(W, F ? F.concat(se) : [se]);
358
358
  }), k.pop();
359
359
  }
360
360
  }
@@ -1032,7 +1032,7 @@ const US = (t) => {
1032
1032
  let l = r.data;
1033
1033
  const u = Yr.from(r.headers).normalize();
1034
1034
  let { responseType: a, onUploadProgress: g, onDownloadProgress: _ } = r, S, k, M, P, I;
1035
- function N() {
1035
+ function F() {
1036
1036
  P && P(), I && I(), r.cancelToken && r.cancelToken.unsubscribe(S), r.signal && r.signal.removeEventListener("abort", S);
1037
1037
  }
1038
1038
  let V = new XMLHttpRequest();
@@ -1051,9 +1051,9 @@ const US = (t) => {
1051
1051
  request: V
1052
1052
  };
1053
1053
  VS(function(Pe) {
1054
- i(Pe), N();
1054
+ i(Pe), F();
1055
1055
  }, function(Pe) {
1056
- n(Pe), N();
1056
+ n(Pe), F();
1057
1057
  }, Oe), V = null;
1058
1058
  }
1059
1059
  "onloadend" in V ? V.onloadend = W : V.onreadystatechange = function() {
@@ -1223,7 +1223,7 @@ const dP = async (t) => {
1223
1223
  } = US(t);
1224
1224
  _ = _ ? (_ + "").toLowerCase() : "text";
1225
1225
  let P = oP([r, l && l.toAbortSignal()], u), I;
1226
- const N = P && P.unsubscribe && (() => {
1226
+ const F = P && P.unsubscribe && (() => {
1227
1227
  P.unsubscribe();
1228
1228
  });
1229
1229
  let V;
@@ -1255,7 +1255,7 @@ const dP = async (t) => {
1255
1255
  });
1256
1256
  let se = await fetch(I);
1257
1257
  const ce = L0 && (_ === "stream" || _ === "response");
1258
- if (L0 && (a || ce && N)) {
1258
+ if (L0 && (a || ce && F)) {
1259
1259
  const Oe = {};
1260
1260
  ["status", "statusText", "headers"].forEach((ze) => {
1261
1261
  Oe[ze] = se[ze];
@@ -1266,14 +1266,14 @@ const dP = async (t) => {
1266
1266
  ) || [];
1267
1267
  se = new Response(
1268
1268
  Rb(se.body, Lb, Pe, () => {
1269
- Xe && Xe(), N && N();
1269
+ Xe && Xe(), F && F();
1270
1270
  }),
1271
1271
  Oe
1272
1272
  );
1273
1273
  }
1274
1274
  _ = _ || "text";
1275
1275
  let Q = await cm[Ie.findKey(cm, _) || "text"](se, t);
1276
- return !ce && N && N(), await new Promise((Oe, ke) => {
1276
+ return !ce && F && F(), await new Promise((Oe, ke) => {
1277
1277
  VS(Oe, ke, {
1278
1278
  data: Q,
1279
1279
  headers: Yr.from(se.headers),
@@ -1284,7 +1284,7 @@ const dP = async (t) => {
1284
1284
  });
1285
1285
  });
1286
1286
  } catch (W) {
1287
- throw N && N(), W && W.name === "TypeError" && /fetch/i.test(W.message) ? Object.assign(
1287
+ throw F && F(), W && W.name === "TypeError" && /fetch/i.test(W.message) ? Object.assign(
1288
1288
  new Gt("Network Error", Gt.ERR_NETWORK, t, I),
1289
1289
  {
1290
1290
  cause: W.cause || W
@@ -1461,12 +1461,12 @@ class cc {
1461
1461
  ), i.headers = Yr.concat(u, l);
1462
1462
  const a = [];
1463
1463
  let g = !0;
1464
- this.interceptors.request.forEach(function(N) {
1465
- typeof N.runWhen == "function" && N.runWhen(i) === !1 || (g = g && N.synchronous, a.unshift(N.fulfilled, N.rejected));
1464
+ this.interceptors.request.forEach(function(F) {
1465
+ typeof F.runWhen == "function" && F.runWhen(i) === !1 || (g = g && F.synchronous, a.unshift(F.fulfilled, F.rejected));
1466
1466
  });
1467
1467
  const _ = [];
1468
- this.interceptors.response.forEach(function(N) {
1469
- _.push(N.fulfilled, N.rejected);
1468
+ this.interceptors.response.forEach(function(F) {
1469
+ _.push(F.fulfilled, F.rejected);
1470
1470
  });
1471
1471
  let S, k = 0, M;
1472
1472
  if (!g) {
@@ -1478,11 +1478,11 @@ class cc {
1478
1478
  M = a.length;
1479
1479
  let P = i;
1480
1480
  for (k = 0; k < M; ) {
1481
- const I = a[k++], N = a[k++];
1481
+ const I = a[k++], F = a[k++];
1482
1482
  try {
1483
1483
  P = I(P);
1484
1484
  } catch (V) {
1485
- N.call(this, V);
1485
+ F.call(this, V);
1486
1486
  break;
1487
1487
  }
1488
1488
  }
@@ -2012,14 +2012,14 @@ function nk(t, e) {
2012
2012
  function tI(t, e, i, n) {
2013
2013
  let r = [], l = [], u = null;
2014
2014
  const a = ({ state: M }) => {
2015
- const P = nk(t, location), I = i.value, N = e.value;
2015
+ const P = nk(t, location), I = i.value, F = e.value;
2016
2016
  let V = 0;
2017
2017
  if (M) {
2018
2018
  if (i.value = P, e.value = M, u && u === I) {
2019
2019
  u = null;
2020
2020
  return;
2021
2021
  }
2022
- V = N ? M.position - N.position : 0;
2022
+ V = F ? M.position - F.position : 0;
2023
2023
  } else
2024
2024
  n(P);
2025
2025
  r.forEach((W) => {
@@ -2226,10 +2226,10 @@ function cI(t, e) {
2226
2226
  if (M.type === 0)
2227
2227
  k || (r += "/"), r += M.value.replace(lI, "\\$&"), P += 40;
2228
2228
  else if (M.type === 1) {
2229
- const { value: I, repeatable: N, optional: V, regexp: W } = M;
2229
+ const { value: I, repeatable: F, optional: V, regexp: W } = M;
2230
2230
  l.push({
2231
2231
  name: I,
2232
- repeatable: N,
2232
+ repeatable: F,
2233
2233
  optional: V
2234
2234
  });
2235
2235
  const se = W || Wb;
@@ -2241,10 +2241,10 @@ function cI(t, e) {
2241
2241
  throw new Error(`Invalid custom RegExp for param "${I}" (${se}): ` + Q.message);
2242
2242
  }
2243
2243
  }
2244
- let ce = N ? `((?:${se})(?:/(?:${se}))*)` : `(${se})`;
2244
+ let ce = F ? `((?:${se})(?:/(?:${se}))*)` : `(${se})`;
2245
2245
  k || (ce = // avoid an optional / if there are more segments e.g. /:p?-static
2246
2246
  // or /:p?-:p2
2247
- V && _.length < 2 ? `(?:/${ce})` : "/" + ce), V && (ce += "?"), r += ce, P += 20, V && (P += -8), N && (P += -20), se === ".*" && (P += -50);
2247
+ V && _.length < 2 ? `(?:/${ce})` : "/" + ce), V && (ce += "?"), r += ce, P += 20, V && (P += -8), F && (P += -20), se === ".*" && (P += -50);
2248
2248
  }
2249
2249
  S.push(P);
2250
2250
  }
@@ -2274,8 +2274,8 @@ function cI(t, e) {
2274
2274
  if (P.type === 0)
2275
2275
  S += P.value;
2276
2276
  else if (P.type === 1) {
2277
- const { value: I, repeatable: N, optional: V } = P, W = I in _ ? _[I] : "";
2278
- if (ys(W) && !N)
2277
+ const { value: I, repeatable: F, optional: V } = P, W = I in _ ? _[I] : "";
2278
+ if (ys(W) && !F)
2279
2279
  throw new Error(`Provided param "${I}" is an array but it is not repeatable (* or + modifiers)`);
2280
2280
  const se = ys(W) ? W.join("/") : W;
2281
2281
  if (!se)
@@ -2414,21 +2414,21 @@ function mI(t, e) {
2414
2414
  return n.get(k);
2415
2415
  }
2416
2416
  function l(k, M, P) {
2417
- const I = !P, N = gI(k);
2418
- process.env.NODE_ENV !== "production" && xI(N, M), N.aliasOf = P && P.record;
2417
+ const I = !P, F = gI(k);
2418
+ process.env.NODE_ENV !== "production" && xI(F, M), F.aliasOf = P && P.record;
2419
2419
  const V = Xb(e, k), W = [
2420
- N
2420
+ F
2421
2421
  ];
2422
2422
  if ("alias" in k) {
2423
2423
  const Q = typeof k.alias == "string" ? [k.alias] : k.alias;
2424
2424
  for (const Oe of Q)
2425
- W.push(Ii({}, N, {
2425
+ W.push(Ii({}, F, {
2426
2426
  // this allows us to hold a copy of the `components` option
2427
2427
  // so that async components cache is hold on the original record
2428
- components: P ? P.record.components : N.components,
2428
+ components: P ? P.record.components : F.components,
2429
2429
  path: Oe,
2430
2430
  // we might be the child of an alias
2431
- aliasOf: P ? P.record : N
2431
+ aliasOf: P ? P.record : F
2432
2432
  // the aliases are always of the same kind as the original since they
2433
2433
  // are defined on the same record
2434
2434
  }));
@@ -2443,8 +2443,8 @@ function mI(t, e) {
2443
2443
  if (process.env.NODE_ENV !== "production" && Q.path === "*")
2444
2444
  throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
2445
2445
  See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
2446
- if (se = fI(Q, M, V), process.env.NODE_ENV !== "production" && M && Oe[0] === "/" && bI(se, M), P ? (P.alias.push(se), process.env.NODE_ENV !== "production" && vI(P, se)) : (ce = ce || se, ce !== se && ce.alias.push(se), I && k.name && !Yb(se) && u(k.name)), ok(se) && g(se), N.children) {
2447
- const ke = N.children;
2446
+ if (se = fI(Q, M, V), process.env.NODE_ENV !== "production" && M && Oe[0] === "/" && bI(se, M), P ? (P.alias.push(se), process.env.NODE_ENV !== "production" && vI(P, se)) : (ce = ce || se, ce !== se && ce.alias.push(se), I && k.name && !Yb(se) && u(k.name)), ok(se) && g(se), F.children) {
2447
+ const ke = F.children;
2448
2448
  for (let Pe = 0; Pe < ke.length; Pe++)
2449
2449
  l(ke[Pe], se, P && P.children[Pe]);
2450
2450
  }
@@ -2471,7 +2471,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
2471
2471
  i.splice(M, 0, k), k.record.name && !Yb(k) && n.set(k.record.name, k);
2472
2472
  }
2473
2473
  function _(k, M) {
2474
- let P, I = {}, N, V;
2474
+ let P, I = {}, F, V;
2475
2475
  if ("name" in k && k.name) {
2476
2476
  if (P = n.get(k.name), !P)
2477
2477
  throw Gu(1, {
@@ -2492,16 +2492,16 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
2492
2492
  // discard any existing params in the current location that do not exist here
2493
2493
  // #1497 this ensures better active/exact matching
2494
2494
  k.params && Zb(k.params, P.keys.map((ce) => ce.name))
2495
- ), N = P.stringify(I);
2495
+ ), F = P.stringify(I);
2496
2496
  } else if (k.path != null)
2497
- N = k.path, process.env.NODE_ENV !== "production" && !N.startsWith("/") && ni(`The Matcher cannot resolve relative paths but received "${N}". Unless you directly called \`matcher.resolve("${N}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), P = i.find((ce) => ce.re.test(N)), P && (I = P.parse(N), V = P.record.name);
2497
+ F = k.path, process.env.NODE_ENV !== "production" && !F.startsWith("/") && ni(`The Matcher cannot resolve relative paths but received "${F}". Unless you directly called \`matcher.resolve("${F}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), P = i.find((ce) => ce.re.test(F)), P && (I = P.parse(F), V = P.record.name);
2498
2498
  else {
2499
2499
  if (P = M.name ? n.get(M.name) : i.find((ce) => ce.re.test(M.path)), !P)
2500
2500
  throw Gu(1, {
2501
2501
  location: k,
2502
2502
  currentLocation: M
2503
2503
  });
2504
- V = P.record.name, I = Ii({}, M.params, k.params), N = P.stringify(I);
2504
+ V = P.record.name, I = Ii({}, M.params, k.params), F = P.stringify(I);
2505
2505
  }
2506
2506
  const W = [];
2507
2507
  let se = P;
@@ -2509,7 +2509,7 @@ See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-
2509
2509
  W.unshift(se.record), se = se.parent;
2510
2510
  return {
2511
2511
  name: V,
2512
- path: N,
2512
+ path: F,
2513
2513
  params: I,
2514
2514
  matched: W,
2515
2515
  meta: _I(W)
@@ -2758,14 +2758,14 @@ function Qb(t) {
2758
2758
  const I = P.findIndex(yl.bind(null, M));
2759
2759
  if (I > -1)
2760
2760
  return I;
2761
- const N = e1(S[k - 2]);
2761
+ const F = e1(S[k - 2]);
2762
2762
  return (
2763
2763
  // we are dealing with nested routes
2764
2764
  k > 1 && // if the parent and matched route have the same path, this link is
2765
2765
  // referring to the empty child. Or we currently are on a different
2766
2766
  // child of the same parent
2767
- e1(M) === N && // avoid comparing the child with its parent
2768
- P[P.length - 1].path !== N ? P.findIndex(yl.bind(null, S[k - 2])) : I
2767
+ e1(M) === F && // avoid comparing the child with its parent
2768
+ P[P.length - 1].path !== F ? P.findIndex(yl.bind(null, S[k - 2])) : I
2769
2769
  );
2770
2770
  }), a = Fs(() => u.value > -1 && II(i.params, l.value.params)), g = Fs(() => u.value > -1 && u.value === i.matched.length - 1 && ik(i.params, l.value.params));
2771
2771
  function _(S = {}) {
@@ -2891,7 +2891,7 @@ const t1 = (t, e, i) => t ?? e ?? i, DI = /* @__PURE__ */ so({
2891
2891
  return I_(() => [g.value, a.value, t.name], ([_, S, k], [M, P, I]) => {
2892
2892
  S && (S.instances[k] = _, P && P !== S && _ && _ === M && (S.leaveGuards.size || (S.leaveGuards = P.leaveGuards), S.updateGuards.size || (S.updateGuards = P.updateGuards))), _ && S && // if there is no instance but to and from are the same this might be
2893
2893
  // the first visit
2894
- (!P || !yl(S, P) || !M) && (S.enterCallbacks[k] || []).forEach((N) => N(_));
2894
+ (!P || !yl(S, P) || !M) && (S.enterCallbacks[k] || []).forEach((F) => F(_));
2895
2895
  }, { flush: "post" }), () => {
2896
2896
  const _ = r.value, S = t.name, k = a.value, M = k && k.components[S];
2897
2897
  if (!M)
@@ -2997,11 +2997,11 @@ function LI(t, e, i) {
2997
2997
  });
2998
2998
  }
2999
2999
  ys(k.__vrl_devtools) && (k.__devtoolsApi = r, k.__vrl_devtools.forEach((M) => {
3000
- let P = M.route.path, I = uk, N = "", V = 0;
3001
- M.error ? (P = M.error, I = VI, V = jI) : M.isExactActive ? (I = ck, N = "This is exactly active") : M.isActive && (I = lk, N = "This link is active"), S.tags.push({
3000
+ let P = M.route.path, I = uk, F = "", V = 0;
3001
+ M.error ? (P = M.error, I = VI, V = jI) : M.isExactActive ? (I = ck, F = "This is exactly active") : M.isActive && (I = lk, F = "This link is active"), S.tags.push({
3002
3002
  label: P,
3003
3003
  textColor: V,
3004
- tooltip: N,
3004
+ tooltip: F,
3005
3005
  backgroundColor: I
3006
3006
  });
3007
3007
  }));
@@ -3229,7 +3229,7 @@ function WI(t) {
3229
3229
  const je = e.getRecordMatcher(Ee);
3230
3230
  je ? e.removeRoute(je) : process.env.NODE_ENV !== "production" && ni(`Cannot remove non-existent route "${String(Ee)}"`);
3231
3231
  }
3232
- function N() {
3232
+ function F() {
3233
3233
  return e.getRoutes().map((Ee) => Ee.record);
3234
3234
  }
3235
3235
  function V(Ee) {
@@ -3529,7 +3529,7 @@ ${JSON.stringify(ct, null, 2)}
3529
3529
  removeRoute: I,
3530
3530
  clearRoutes: e.clearRoutes,
3531
3531
  hasRoute: V,
3532
- getRoutes: N,
3532
+ getRoutes: F,
3533
3533
  resolve: W,
3534
3534
  options: t,
3535
3535
  push: Q,
@@ -3588,17 +3588,17 @@ function Fq(t) {
3588
3588
  }
3589
3589
  const ZI = [
3590
3590
  // { name: 'profile', path: '/profile', component: () => import('../components/profile/vs-profile.vue') },
3591
- { name: "edit", path: "/edit", component: () => import("./edit-page-CZ8SDvjo.js") },
3592
- { name: "add", path: "/add", component: () => import("./add-page-DRXx4iOi.js") },
3591
+ { name: "edit", path: "/edit", component: () => import("./edit-page-CtNICp9w.js") },
3592
+ { name: "add", path: "/add", component: () => import("./add-page-DbjBxsHN.js") },
3593
3593
  {
3594
3594
  name: "card-view",
3595
3595
  path: "/card",
3596
- component: () => import("./card-view-p73B3Gbl.js"),
3596
+ component: () => import("./card-view-Dyopcvx4.js"),
3597
3597
  children: [{
3598
3598
  name: "table",
3599
3599
  path: ":table",
3600
- component: () => import("./card-view-p73B3Gbl.js"),
3601
- children: [{ name: "card", path: ":id", component: () => import("./card-page-BAeSkHUO.js") }]
3600
+ component: () => import("./card-view-Dyopcvx4.js"),
3601
+ children: [{ name: "card", path: ":id", component: () => import("./card-page-BNs9nE8c.js") }]
3602
3602
  }]
3603
3603
  }
3604
3604
  ], Pt = (t, e) => {
@@ -3651,14 +3651,14 @@ const QI = /* @__PURE__ */ Pt(YI, [["render", JI]]), eD = (t) => {
3651
3651
  {
3652
3652
  path: "/",
3653
3653
  name: "home",
3654
- component: () => import("./admin-view-BZ75rygK.js"),
3654
+ component: () => import("./admin-view-CyAXWfSU.js"),
3655
3655
  children: [
3656
3656
  ...e,
3657
3657
  ...t,
3658
3658
  // { path: '/', redirect: '/home' },
3659
3659
  {
3660
3660
  path: "/:catchAll(.*)",
3661
- component: () => import("./admin-interface-BY-D9Jvu.js")
3661
+ component: () => import("./admin-interface-CNBVM_7D.js")
3662
3662
  }
3663
3663
  ]
3664
3664
  }
@@ -3788,12 +3788,12 @@ const aD = /* @__PURE__ */ Pt(rD, [["render", oD]]), lD = { class: "w-[170px]" }
3788
3788
  class: Ns(["flex items-center px-3 py-1 rounded-md cursor-pointer group hover:bg-gray-100", { "bg-gray-100": r.value === (I == null ? void 0 : I.id) }])
3789
3789
  }, [
3790
3790
  qd(Z("input", {
3791
- "onUpdate:modelValue": S[1] || (S[1] = (N) => r.value = N),
3791
+ "onUpdate:modelValue": S[1] || (S[1] = (F) => r.value = F),
3792
3792
  value: I == null ? void 0 : I.id,
3793
3793
  type: "checkbox",
3794
3794
  class: "w-1 h-3 border-0 rounded-full appearance-none shrink-0 checked:bg-none",
3795
3795
  style: pa({ backgroundColor: (I == null ? void 0 : I.color) || "#ffffff" }),
3796
- onChange: (N) => g(I == null ? void 0 : I.id)
3796
+ onChange: (F) => g(I == null ? void 0 : I.id)
3797
3797
  }, null, 44, hD), [
3798
3798
  [wS, r.value]
3799
3799
  ]),
@@ -6771,8 +6771,8 @@ const h2 = /* @__PURE__ */ Pt(UL, [["render", qL]]), WL = { class: "text-start"
6771
6771
  };
6772
6772
  function p2(t, e, i) {
6773
6773
  if (t !== null)
6774
- for (var n, r, l, u, a, g, _, S = 0, k = 0, M, P = t.type, I = P === "FeatureCollection", N = P === "Feature", V = I ? t.features.length : 1, W = 0; W < V; W++) {
6775
- _ = I ? t.features[W].geometry : N ? t.geometry : t, M = _ ? _.type === "GeometryCollection" : !1, a = M ? _.geometries.length : 1;
6774
+ for (var n, r, l, u, a, g, _, S = 0, k = 0, M, P = t.type, I = P === "FeatureCollection", F = P === "Feature", V = I ? t.features.length : 1, W = 0; W < V; W++) {
6775
+ _ = I ? t.features[W].geometry : F ? t.geometry : t, M = _ ? _.type === "GeometryCollection" : !1, a = M ? _.geometries.length : 1;
6776
6776
  for (var se = 0; se < a; se++) {
6777
6777
  var ce = 0, Q = 0;
6778
6778
  if (u = M ? _.geometries[se] : _, u !== null) {
@@ -7027,9 +7027,9 @@ var f2 = { exports: {} };
7027
7027
  return this.sampleCurveY(this.solveCurveX(c, o));
7028
7028
  } };
7029
7029
  var I = g(M);
7030
- let N, V;
7030
+ let F, V;
7031
7031
  function W() {
7032
- return N == null && (N = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), N;
7032
+ return F == null && (F = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), F;
7033
7033
  }
7034
7034
  function se() {
7035
7035
  if (V == null && (V = !1, W())) {
@@ -10505,7 +10505,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
10505
10505
  }
10506
10506
  }
10507
10507
  R.prototype.bytesPerElement = 6, ot("StructArrayLayout3i6", R);
10508
- class F extends v {
10508
+ class B extends v {
10509
10509
  _refreshViews() {
10510
10510
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
10511
10511
  }
@@ -10518,8 +10518,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
10518
10518
  return this.int16[w + 0] = h, this.int16[w + 1] = p, this.int16[w + 2] = y, this.int16[w + 3] = b, o;
10519
10519
  }
10520
10520
  }
10521
- F.prototype.bytesPerElement = 8, ot("StructArrayLayout4i8", F);
10522
- class B extends v {
10521
+ B.prototype.bytesPerElement = 8, ot("StructArrayLayout4i8", B);
10522
+ class N extends v {
10523
10523
  _refreshViews() {
10524
10524
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
10525
10525
  }
@@ -10532,7 +10532,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
10532
10532
  return this.int16[E + 0] = h, this.int16[E + 1] = p, this.int16[E + 2] = y, this.int16[E + 3] = b, this.int16[E + 4] = w, this.int16[E + 5] = T, o;
10533
10533
  }
10534
10534
  }
10535
- B.prototype.bytesPerElement = 12, ot("StructArrayLayout2i4i12", B);
10535
+ N.prototype.bytesPerElement = 12, ot("StructArrayLayout2i4i12", N);
10536
10536
  class q extends v {
10537
10537
  _refreshViews() {
10538
10538
  this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
@@ -11060,7 +11060,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
11060
11060
  }
11061
11061
  class Cs extends D {
11062
11062
  }
11063
- class $a extends B {
11063
+ class $a extends N {
11064
11064
  }
11065
11065
  class ru extends q {
11066
11066
  }
@@ -14646,7 +14646,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
14646
14646
  const c = performance.getEntriesByName(Iy)[0].duration, o = performance.getEntriesByName(Dy)[0].duration, h = yd.length, p = 1 / (yd.reduce((b, w) => b + w, 0) / h / 1e3), y = yd.filter((b) => b > Py).reduce((b, w) => b + (w - Py) / Py, 0);
14647
14647
  return { loadTime: c, fullLoadTime: o, fps: p, percentDroppedFrames: y / (h + y) * 100, totalFrames: h };
14648
14648
  } };
14649
- u.$ = class extends F {
14649
+ u.$ = class extends B {
14650
14650
  }, u.A = hu, u.B = $g, u.C = function(c) {
14651
14651
  if (fi == null) {
14652
14652
  const o = c.navigator ? c.navigator.userAgent : null;
@@ -15264,7 +15264,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15264
15264
  }
15265
15265
  j + Y >= 0 != !!U && re.reverse();
15266
15266
  }
15267
- var N = u.by(function re(U, j) {
15267
+ var F = u.by(function re(U, j) {
15268
15268
  var Y, te = U && U.type;
15269
15269
  if (te === "FeatureCollection") for (Y = 0; Y < U.features.length; Y++) re(U.features[Y], j);
15270
15270
  else if (te === "GeometryCollection") for (Y = 0; Y < U.geometries.length; Y++) re(U.geometries[Y], j);
@@ -15961,7 +15961,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
15961
15961
  return u._(this, void 0, void 0, function* () {
15962
15962
  let Y = yield this.loadGeoJSON(U, j);
15963
15963
  if (delete this._pendingRequest, typeof Y != "object") throw new Error(`Input data given to '${U.source}' is not a valid GeoJSON object.`);
15964
- if (N(Y, !0), U.filter) {
15964
+ if (F(Y, !0), U.filter) {
15965
15965
  const te = u.bC(U.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
15966
15966
  if (te.result === "error") throw new Error(te.value.map((fe) => `${fe.key}: ${fe.message}`).join(", "));
15967
15967
  Y = { type: "FeatureCollection", features: Y.features.filter((fe) => te.value.evaluate({ zoom: 0 }, fe)) };
@@ -16178,25 +16178,25 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16178
16178
  }
16179
16179
  M.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, M.selectProp = M.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), M.transformProp = M.testProp(["transform", "WebkitTransform"]);
16180
16180
  const P = { supported: !1, testSupport: function(x) {
16181
- !V && N && (W ? se(x) : I = x);
16181
+ !V && F && (W ? se(x) : I = x);
16182
16182
  } };
16183
- let I, N, V = !1, W = !1;
16183
+ let I, F, V = !1, W = !1;
16184
16184
  function se(x) {
16185
16185
  const s = x.createTexture();
16186
16186
  x.bindTexture(x.TEXTURE_2D, s);
16187
16187
  try {
16188
- if (x.texImage2D(x.TEXTURE_2D, 0, x.RGBA, x.RGBA, x.UNSIGNED_BYTE, N), x.isContextLost()) return;
16188
+ if (x.texImage2D(x.TEXTURE_2D, 0, x.RGBA, x.RGBA, x.UNSIGNED_BYTE, F), x.isContextLost()) return;
16189
16189
  P.supported = !0;
16190
16190
  } catch {
16191
16191
  }
16192
16192
  x.deleteTexture(s), V = !0;
16193
16193
  }
16194
16194
  var ce;
16195
- typeof document < "u" && (N = document.createElement("img"), N.onload = () => {
16195
+ typeof document < "u" && (F = document.createElement("img"), F.onload = () => {
16196
16196
  I && se(I), I = null, W = !0;
16197
- }, N.onerror = () => {
16197
+ }, F.onerror = () => {
16198
16198
  V = !0, I = null;
16199
- }, N.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), function(x) {
16199
+ }, F.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), function(x) {
16200
16200
  let s, d, f, m;
16201
16201
  x.resetRequestQueue = () => {
16202
16202
  s = [], d = 0, f = 0, m = {};
@@ -16205,23 +16205,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16205
16205
  return m[R] = D, R;
16206
16206
  }, x.removeThrottleControl = (D) => {
16207
16207
  delete m[D], C();
16208
- }, x.getImage = (D, R, F = !0) => new Promise((B, q) => {
16209
- P.supported && (D.headers || (D.headers = {}), D.headers.accept = "image/webp,*/*"), a.e(D, { type: "image" }), s.push({ abortController: R, requestParameters: D, supportImageRefresh: F, state: "queued", onError: (K) => {
16208
+ }, x.getImage = (D, R, B = !0) => new Promise((N, q) => {
16209
+ P.supported && (D.headers || (D.headers = {}), D.headers.accept = "image/webp,*/*"), a.e(D, { type: "image" }), s.push({ abortController: R, requestParameters: D, supportImageRefresh: B, state: "queued", onError: (K) => {
16210
16210
  q(K);
16211
16211
  }, onSuccess: (K) => {
16212
- B(K);
16212
+ N(K);
16213
16213
  } }), C();
16214
16214
  });
16215
16215
  const v = (D) => a._(this, void 0, void 0, function* () {
16216
16216
  D.state = "running";
16217
- const { requestParameters: R, supportImageRefresh: F, onError: B, onSuccess: q, abortController: K } = D, J = F === !1 && !a.i(self) && !a.g(R.url) && (!R.headers || Object.keys(R.headers).reduce((le, he) => le && he === "accept", !0));
16217
+ const { requestParameters: R, supportImageRefresh: B, onError: N, onSuccess: q, abortController: K } = D, J = B === !1 && !a.i(self) && !a.g(R.url) && (!R.headers || Object.keys(R.headers).reduce((le, he) => le && he === "accept", !0));
16218
16218
  d++;
16219
16219
  const ne = J ? A(R, K) : a.m(R, K);
16220
16220
  try {
16221
16221
  const le = yield ne;
16222
16222
  delete D.abortController, D.state = "completed", le.data instanceof HTMLImageElement || a.b(le.data) ? q(le) : le.data && q({ data: yield (ae = le.data, typeof createImageBitmap == "function" ? a.d(ae) : a.f(ae)), cacheControl: le.cacheControl, expires: le.expires });
16223
16223
  } catch (le) {
16224
- delete D.abortController, B(le);
16224
+ delete D.abortController, N(le);
16225
16225
  } finally {
16226
16226
  d--, C();
16227
16227
  }
@@ -16232,17 +16232,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16232
16232
  return !1;
16233
16233
  })() ? a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : a.a.MAX_PARALLEL_IMAGE_REQUESTS;
16234
16234
  for (let R = d; R < D && s.length > 0; R++) {
16235
- const F = s.shift();
16236
- F.abortController.signal.aborted ? R-- : v(F);
16235
+ const B = s.shift();
16236
+ B.abortController.signal.aborted ? R-- : v(B);
16237
16237
  }
16238
- }, A = (D, R) => new Promise((F, B) => {
16238
+ }, A = (D, R) => new Promise((B, N) => {
16239
16239
  const q = new Image(), K = D.url, J = D.credentials;
16240
16240
  J && J === "include" ? q.crossOrigin = "use-credentials" : (J && J === "same-origin" || !a.s(K)) && (q.crossOrigin = "anonymous"), R.signal.addEventListener("abort", () => {
16241
- q.src = "", B(a.c());
16241
+ q.src = "", N(a.c());
16242
16242
  }), q.fetchPriority = "high", q.onload = () => {
16243
- q.onerror = q.onload = null, F({ data: q });
16243
+ q.onerror = q.onload = null, B({ data: q });
16244
16244
  }, q.onerror = () => {
16245
- q.onerror = q.onload = null, R.signal.aborted || B(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
16245
+ q.onerror = q.onload = null, R.signal.aborted || N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
16246
16246
  }, q.src = K;
16247
16247
  });
16248
16248
  }(ce || (ce = {})), ce.resetRequestQueue();
@@ -16297,8 +16297,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16297
16297
  const { width: m, height: v } = s, C = !(this.size && this.size[0] === m && this.size[1] === v || f), { context: A } = this, { gl: D } = A;
16298
16298
  if (this.useMipmap = !!(d && d.useMipmap), D.bindTexture(D.TEXTURE_2D, this.texture), A.pixelStoreUnpackFlipY.set(!1), A.pixelStoreUnpack.set(1), A.pixelStoreUnpackPremultiplyAlpha.set(this.format === D.RGBA && (!d || d.premultiply !== !1)), C) this.size = [m, v], s instanceof HTMLImageElement || s instanceof HTMLCanvasElement || s instanceof HTMLVideoElement || s instanceof ImageData || a.b(s) ? D.texImage2D(D.TEXTURE_2D, 0, this.format, this.format, D.UNSIGNED_BYTE, s) : D.texImage2D(D.TEXTURE_2D, 0, this.format, m, v, 0, this.format, D.UNSIGNED_BYTE, s.data);
16299
16299
  else {
16300
- const { x: R, y: F } = f || { x: 0, y: 0 };
16301
- s instanceof HTMLImageElement || s instanceof HTMLCanvasElement || s instanceof HTMLVideoElement || s instanceof ImageData || a.b(s) ? D.texSubImage2D(D.TEXTURE_2D, 0, R, F, D.RGBA, D.UNSIGNED_BYTE, s) : D.texSubImage2D(D.TEXTURE_2D, 0, R, F, m, v, D.RGBA, D.UNSIGNED_BYTE, s.data);
16300
+ const { x: R, y: B } = f || { x: 0, y: 0 };
16301
+ s instanceof HTMLImageElement || s instanceof HTMLCanvasElement || s instanceof HTMLVideoElement || s instanceof ImageData || a.b(s) ? D.texSubImage2D(D.TEXTURE_2D, 0, R, B, D.RGBA, D.UNSIGNED_BYTE, s) : D.texSubImage2D(D.TEXTURE_2D, 0, R, B, m, v, D.RGBA, D.UNSIGNED_BYTE, s.data);
16302
16302
  }
16303
16303
  this.useMipmap && this.isSizePowerOfTwo() && D.generateMipmap(D.TEXTURE_2D);
16304
16304
  }
@@ -16415,8 +16415,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16415
16415
  const { w: d, h: f } = a.p(s), m = this.atlasImage;
16416
16416
  m.resize({ width: d || 1, height: f || 1 });
16417
16417
  for (const v in this.patterns) {
16418
- const { bin: C } = this.patterns[v], A = C.x + 1, D = C.y + 1, R = this.getImage(v).data, F = R.width, B = R.height;
16419
- a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D }, { width: F, height: B }), a.R.copy(R, m, { x: 0, y: B - 1 }, { x: A, y: D - 1 }, { width: F, height: 1 }), a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D + B }, { width: F, height: 1 }), a.R.copy(R, m, { x: F - 1, y: 0 }, { x: A - 1, y: D }, { width: 1, height: B }), a.R.copy(R, m, { x: 0, y: 0 }, { x: A + F, y: D }, { width: 1, height: B });
16418
+ const { bin: C } = this.patterns[v], A = C.x + 1, D = C.y + 1, R = this.getImage(v).data, B = R.width, N = R.height;
16419
+ a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D }, { width: B, height: N }), a.R.copy(R, m, { x: 0, y: N - 1 }, { x: A, y: D - 1 }, { width: B, height: 1 }), a.R.copy(R, m, { x: 0, y: 0 }, { x: A, y: D + N }, { width: B, height: 1 }), a.R.copy(R, m, { x: B - 1, y: 0 }, { x: A - 1, y: D }, { width: 1, height: N }), a.R.copy(R, m, { x: 0, y: 0 }, { x: A + B, y: D }, { width: 1, height: N });
16420
16420
  }
16421
16421
  this.dirty = !0;
16422
16422
  }
@@ -16441,17 +16441,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16441
16441
  v[0] = 0, C[0] = -Nt, C[1] = Nt, m[0] = x[s];
16442
16442
  for (let A = 1, D = 0, R = 0; A < f; A++) {
16443
16443
  m[A] = x[s + A * d];
16444
- const F = A * A;
16444
+ const B = A * A;
16445
16445
  do {
16446
- const B = v[D];
16447
- R = (m[A] - m[B] + F - B * B) / (A - B) / 2;
16446
+ const N = v[D];
16447
+ R = (m[A] - m[N] + B - N * N) / (A - N) / 2;
16448
16448
  } while (R <= C[D] && --D > -1);
16449
16449
  D++, v[D] = A, C[D] = R, C[D + 1] = Nt;
16450
16450
  }
16451
16451
  for (let A = 0, D = 0; A < f; A++) {
16452
16452
  for (; C[D + 1] < A; ) D++;
16453
- const R = v[D], F = A - R;
16454
- x[s + A * d] = m[R] + F * F;
16453
+ const R = v[D], B = A - R;
16454
+ x[s + A * d] = m[R] + B * B;
16455
16455
  }
16456
16456
  }
16457
16457
  class Qt {
@@ -16524,12 +16524,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16524
16524
  return s.width = s.height = x, s;
16525
16525
  }
16526
16526
  draw(x) {
16527
- const { width: s, actualBoundingBoxAscent: d, actualBoundingBoxDescent: f, actualBoundingBoxLeft: m, actualBoundingBoxRight: v } = this.ctx.measureText(x), C = Math.ceil(d), A = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(v - m))), D = Math.min(this.size - this.buffer, C + Math.ceil(f)), R = A + 2 * this.buffer, F = D + 2 * this.buffer, B = Math.max(R * F, 0), q = new Uint8ClampedArray(B), K = { data: q, width: R, height: F, glyphWidth: A, glyphHeight: D, glyphTop: C, glyphLeft: 0, glyphAdvance: s };
16527
+ const { width: s, actualBoundingBoxAscent: d, actualBoundingBoxDescent: f, actualBoundingBoxLeft: m, actualBoundingBoxRight: v } = this.ctx.measureText(x), C = Math.ceil(d), A = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(v - m))), D = Math.min(this.size - this.buffer, C + Math.ceil(f)), R = A + 2 * this.buffer, B = D + 2 * this.buffer, N = Math.max(R * B, 0), q = new Uint8ClampedArray(N), K = { data: q, width: R, height: B, glyphWidth: A, glyphHeight: D, glyphTop: C, glyphLeft: 0, glyphAdvance: s };
16528
16528
  if (A === 0 || D === 0) return K;
16529
16529
  const { ctx: J, buffer: ne, gridInner: ae, gridOuter: le } = this;
16530
16530
  J.clearRect(ne, ne, A, D), J.fillText(x, ne, ne + C);
16531
16531
  const he = J.getImageData(ne, ne, A, D);
16532
- le.fill(Nt, 0, B), ae.fill(0, 0, B);
16532
+ le.fill(Nt, 0, N), ae.fill(0, 0, N);
16533
16533
  for (let ee = 0; ee < D; ee++) for (let me = 0; me < A; me++) {
16534
16534
  const ge = he.data[4 * (ee * A + me) + 3] / 255;
16535
16535
  if (ge === 0) continue;
@@ -16540,8 +16540,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16540
16540
  le[be] = Re > 0 ? Re * Re : 0, ae[be] = Re < 0 ? Re * Re : 0;
16541
16541
  }
16542
16542
  }
16543
- si(le, 0, 0, R, F, R, this.f, this.v, this.z), si(ae, ne, ne, A, D, R, this.f, this.v, this.z);
16544
- for (let ee = 0; ee < B; ee++) {
16543
+ si(le, 0, 0, R, B, R, this.f, this.v, this.z), si(ae, ne, ne, A, D, R, this.f, this.v, this.z);
16544
+ for (let ee = 0; ee < N; ee++) {
16545
16545
  const me = Math.sqrt(le[ee]) - Math.sqrt(ae[ee]);
16546
16546
  q[ee] = Math.round(255 - 255 * (me / this.radius + this.cutoff));
16547
16547
  }
@@ -16634,8 +16634,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16634
16634
  let D = s[0];
16635
16635
  for (let R = 1; R < s.length; R++) {
16636
16636
  A = !A;
16637
- const F = s[R];
16638
- v = D * f, D += F, C = D * f, m.push({ left: v, right: C, isDash: A, zeroLength: F === 0 });
16637
+ const B = s[R];
16638
+ v = D * f, D += B, C = D * f, m.push({ left: v, right: C, isDash: A, zeroLength: B === 0 });
16639
16639
  }
16640
16640
  return m;
16641
16641
  }
@@ -16646,7 +16646,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16646
16646
  let A = 0, D = s[A];
16647
16647
  for (let R = 0; R < this.width; R++) {
16648
16648
  R / D.right > 1 && (D = s[++A]);
16649
- const F = Math.abs(R - D.left), B = Math.abs(R - D.right), q = Math.min(F, B);
16649
+ const B = Math.abs(R - D.left), N = Math.abs(R - D.right), q = Math.min(B, N);
16650
16650
  let K;
16651
16651
  const J = v / f * (m + 1);
16652
16652
  if (D.isDash) {
@@ -16668,8 +16668,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16668
16668
  let v = 0, C = s[v];
16669
16669
  for (let A = 0; A < this.width; A++) {
16670
16670
  A / C.right > 1 && (C = s[++v]);
16671
- const D = Math.abs(A - C.left), R = Math.abs(A - C.right), F = Math.min(D, R);
16672
- this.data[m + A] = Math.max(0, Math.min(255, (C.isDash ? F : -F) + 128));
16671
+ const D = Math.abs(A - C.left), R = Math.abs(A - C.right), B = Math.min(D, R);
16672
+ this.data[m + A] = Math.max(0, Math.min(255, (C.isDash ? B : -B) + 128));
16673
16673
  }
16674
16674
  }
16675
16675
  addDash(s, d) {
@@ -16751,8 +16751,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16751
16751
  return a.J(d, d, [1, 1, 0]), a.K(d, d, [0.5 * x.width, 0.5 * x.height, 1]), a.L(d, d, x.calculatePosMatrix(s.toUnwrapped()));
16752
16752
  }
16753
16753
  function Rt(x, s, d, f, m, v) {
16754
- const C = function(B, q, K) {
16755
- if (B) for (const J of B) {
16754
+ const C = function(N, q, K) {
16755
+ if (N) for (const J of N) {
16756
16756
  const ne = q[J];
16757
16757
  if (ne && ne.source === K && ne.type === "fill-extrusion") return !0;
16758
16758
  }
@@ -16764,10 +16764,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16764
16764
  }(m && m.layers, s, x.id), A = v.maxPitchScaleFactor(), D = x.tilesIn(f, A, C);
16765
16765
  D.sort(Dt);
16766
16766
  const R = [];
16767
- for (const B of D) R.push({ wrappedTileID: B.tileID.wrapped().key, queryResults: B.tile.queryRenderedFeatures(s, d, x._state, B.queryGeometry, B.cameraQueryGeometry, B.scale, m, v, A, ai(x.transform, B.tileID)) });
16768
- const F = function(B) {
16767
+ for (const N of D) R.push({ wrappedTileID: N.tileID.wrapped().key, queryResults: N.tile.queryRenderedFeatures(s, d, x._state, N.queryGeometry, N.cameraQueryGeometry, N.scale, m, v, A, ai(x.transform, N.tileID)) });
16768
+ const B = function(N) {
16769
16769
  const q = {}, K = {};
16770
- for (const J of B) {
16770
+ for (const J of N) {
16771
16771
  const ne = J.queryResults, ae = J.wrappedTileID, le = K[ae] = K[ae] || {};
16772
16772
  for (const he in ne) {
16773
16773
  const ee = ne[he], me = le[he] = le[he] || {}, ge = q[he] = q[he] || [];
@@ -16776,11 +16776,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
16776
16776
  }
16777
16777
  return q;
16778
16778
  }(R);
16779
- for (const B in F) F[B].forEach((q) => {
16779
+ for (const N in B) B[N].forEach((q) => {
16780
16780
  const K = q.feature, J = x.getFeatureState(K.layer["source-layer"], K.id);
16781
16781
  K.source = K.layer.source, K.layer["source-layer"] && (K.sourceLayer = K.layer["source-layer"]), K.state = J;
16782
16782
  });
16783
- return F;
16783
+ return B;
16784
16784
  }
16785
16785
  function Dt(x, s) {
16786
16786
  const d = x.tileID, f = s.tileID;
@@ -17216,8 +17216,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17216
17216
  this.tileID = function(m) {
17217
17217
  let v = 1 / 0, C = 1 / 0, A = -1 / 0, D = -1 / 0;
17218
17218
  for (const q of m) v = Math.min(v, q.x), C = Math.min(C, q.y), A = Math.max(A, q.x), D = Math.max(D, q.y);
17219
- const R = Math.max(A - v, D - C), F = Math.max(0, Math.floor(-Math.log(R) / Math.LN2)), B = Math.pow(2, F);
17220
- return new a.a1(F, Math.floor((v + A) / 2 * B), Math.floor((C + D) / 2 * B));
17219
+ const R = Math.max(A - v, D - C), B = Math.max(0, Math.floor(-Math.log(R) / Math.LN2)), N = Math.pow(2, B);
17220
+ return new a.a1(B, Math.floor((v + A) / 2 * N), Math.floor((C + D) / 2 * N));
17221
17221
  }(d), this.minzoom = this.maxzoom = this.tileID.z;
17222
17222
  const f = d.map((m) => this.tileID.getTilePoint(m)._round());
17223
17223
  return this._boundsArray = new a.$(), this._boundsArray.emplaceBack(f[0].x, f[0].y, 0, 0), this._boundsArray.emplaceBack(f[1].x, f[1].y, a.X, 0), this._boundsArray.emplaceBack(f[3].x, f[3].y, 0, a.X), this._boundsArray.emplaceBack(f[2].x, f[2].y, a.X, a.X), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new a.k("data", { dataType: "source", sourceDataType: "content" })), this;
@@ -17426,7 +17426,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17426
17426
  for (const A of m) {
17427
17427
  const D = A.layerIds.map((R) => v.getLayer(R)).filter(Boolean);
17428
17428
  if (D.length !== 0) {
17429
- A.layers = D, A.stateDependentLayerIds && (A.stateDependentLayers = A.stateDependentLayerIds.map((R) => D.filter((F) => F.id === R)[0]));
17429
+ A.layers = D, A.stateDependentLayerIds && (A.stateDependentLayers = A.stateDependentLayerIds.map((R) => D.filter((B) => B.id === R)[0]));
17430
17430
  for (const R of D) C[R.id] = A;
17431
17431
  }
17432
17432
  }
@@ -17472,23 +17472,23 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17472
17472
  prepare(s) {
17473
17473
  this.imageAtlas && this.imageAtlas.patchUpdatedImages(s, this.imageAtlasTexture);
17474
17474
  }
17475
- queryRenderedFeatures(s, d, f, m, v, C, A, D, R, F) {
17476
- return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: m, cameraQueryGeometry: v, scale: C, tileSize: this.tileSize, pixelPosMatrix: F, transform: D, params: A, queryPadding: this.queryPadding * R }, s, d, f) : {};
17475
+ queryRenderedFeatures(s, d, f, m, v, C, A, D, R, B) {
17476
+ return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: m, cameraQueryGeometry: v, scale: C, tileSize: this.tileSize, pixelPosMatrix: B, transform: D, params: A, queryPadding: this.queryPadding * R }, s, d, f) : {};
17477
17477
  }
17478
17478
  querySourceFeatures(s, d) {
17479
17479
  const f = this.latestFeatureIndex;
17480
17480
  if (!f || !f.rawTileData) return;
17481
17481
  const m = f.loadVTLayers(), v = d && d.sourceLayer ? d.sourceLayer : "", C = m._geojsonTileLayer || m[v];
17482
17482
  if (!C) return;
17483
- const A = a.a7(d && d.filter), { z: D, x: R, y: F } = this.tileID.canonical, B = { z: D, x: R, y: F };
17483
+ const A = a.a7(d && d.filter), { z: D, x: R, y: B } = this.tileID.canonical, N = { z: D, x: R, y: B };
17484
17484
  for (let q = 0; q < C.length; q++) {
17485
17485
  const K = C.feature(q);
17486
17486
  if (A.needGeometry) {
17487
17487
  const ae = a.a8(K, !0);
17488
17488
  if (!A.filter(new a.z(this.tileID.overscaledZ), ae, this.tileID.canonical)) continue;
17489
17489
  } else if (!A.filter(new a.z(this.tileID.overscaledZ), K)) continue;
17490
- const J = f.getId(K, v), ne = new a.a9(K, D, R, F, J);
17491
- ne.tile = B, s.push(ne);
17490
+ const J = f.getId(K, v), ne = new a.a9(K, D, R, B, J);
17491
+ ne.tile = N, s.push(ne);
17492
17492
  }
17493
17493
  }
17494
17494
  hasData() {
@@ -17842,56 +17842,56 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17842
17842
  }
17843
17843
  }
17844
17844
  _updateCoveredAndRetainedTiles(s, d, f, m, v, C) {
17845
- const A = {}, D = {}, R = Object.keys(s), F = k.now();
17846
- for (const B of R) {
17847
- const q = s[B], K = this._tiles[B];
17848
- if (!K || K.fadeEndTime !== 0 && K.fadeEndTime <= F) continue;
17845
+ const A = {}, D = {}, R = Object.keys(s), B = k.now();
17846
+ for (const N of R) {
17847
+ const q = s[N], K = this._tiles[N];
17848
+ if (!K || K.fadeEndTime !== 0 && K.fadeEndTime <= B) continue;
17849
17849
  const J = this.findLoadedParent(q, d), ne = this.findLoadedSibling(q), ae = J || ne || null;
17850
- ae && (this._addTile(ae.tileID), A[ae.tileID.key] = ae.tileID), D[B] = q;
17850
+ ae && (this._addTile(ae.tileID), A[ae.tileID.key] = ae.tileID), D[N] = q;
17851
17851
  }
17852
17852
  this._retainLoadedChildren(D, m, f, s);
17853
- for (const B in A) s[B] || (this._coveredTiles[B] = !0, s[B] = A[B]);
17853
+ for (const N in A) s[N] || (this._coveredTiles[N] = !0, s[N] = A[N]);
17854
17854
  if (C) {
17855
- const B = {}, q = {};
17856
- for (const K of v) this._tiles[K.key].hasData() ? B[K.key] = K : q[K.key] = K;
17855
+ const N = {}, q = {};
17856
+ for (const K of v) this._tiles[K.key].hasData() ? N[K.key] = K : q[K.key] = K;
17857
17857
  for (const K in q) {
17858
17858
  const J = q[K].children(this._source.maxzoom);
17859
- this._tiles[J[0].key] && this._tiles[J[1].key] && this._tiles[J[2].key] && this._tiles[J[3].key] && (B[J[0].key] = s[J[0].key] = J[0], B[J[1].key] = s[J[1].key] = J[1], B[J[2].key] = s[J[2].key] = J[2], B[J[3].key] = s[J[3].key] = J[3], delete q[K]);
17859
+ this._tiles[J[0].key] && this._tiles[J[1].key] && this._tiles[J[2].key] && this._tiles[J[3].key] && (N[J[0].key] = s[J[0].key] = J[0], N[J[1].key] = s[J[1].key] = J[1], N[J[2].key] = s[J[2].key] = J[2], N[J[3].key] = s[J[3].key] = J[3], delete q[K]);
17860
17860
  }
17861
17861
  for (const K in q) {
17862
17862
  const J = q[K], ne = this.findLoadedParent(J, this._source.minzoom), ae = this.findLoadedSibling(J), le = ne || ae || null;
17863
17863
  if (le) {
17864
- B[le.tileID.key] = s[le.tileID.key] = le.tileID;
17865
- for (const he in B) B[he].isChildOf(le.tileID) && delete B[he];
17864
+ N[le.tileID.key] = s[le.tileID.key] = le.tileID;
17865
+ for (const he in N) N[he].isChildOf(le.tileID) && delete N[he];
17866
17866
  }
17867
17867
  }
17868
- for (const K in this._tiles) B[K] || (this._coveredTiles[K] = !0);
17868
+ for (const K in this._tiles) N[K] || (this._coveredTiles[K] = !0);
17869
17869
  }
17870
17870
  }
17871
17871
  update(s, d) {
17872
17872
  if (!this._sourceLoaded || this._paused) return;
17873
17873
  let f;
17874
- this.transform = s, this.terrain = d, this.updateCacheSize(s), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? f = s.getVisibleUnwrappedCoordinates(this._source.tileID).map((F) => new a.S(F.canonical.z, F.wrap, F.canonical.z, F.canonical.x, F.canonical.y)) : (f = s.coveringTiles({ tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: !this.usedForTerrain && this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled, terrain: d }), this._source.hasTile && (f = f.filter((F) => this._source.hasTile(F)))) : f = [];
17874
+ this.transform = s, this.terrain = d, this.updateCacheSize(s), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? f = s.getVisibleUnwrappedCoordinates(this._source.tileID).map((B) => new a.S(B.canonical.z, B.wrap, B.canonical.z, B.canonical.x, B.canonical.y)) : (f = s.coveringTiles({ tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: !this.usedForTerrain && this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled, terrain: d }), this._source.hasTile && (f = f.filter((B) => this._source.hasTile(B)))) : f = [];
17875
17875
  const m = s.coveringZoomLevel(this._source), v = Math.max(m - Fe.maxOverzooming, this._source.minzoom), C = Math.max(m + Fe.maxUnderzooming, this._source.minzoom);
17876
17876
  if (this.usedForTerrain) {
17877
- const F = {};
17878
- for (const B of f) if (B.canonical.z > this._source.minzoom) {
17879
- const q = B.scaledTo(B.canonical.z - 1);
17880
- F[q.key] = q;
17881
- const K = B.scaledTo(Math.max(this._source.minzoom, Math.min(B.canonical.z, 5)));
17882
- F[K.key] = K;
17877
+ const B = {};
17878
+ for (const N of f) if (N.canonical.z > this._source.minzoom) {
17879
+ const q = N.scaledTo(N.canonical.z - 1);
17880
+ B[q.key] = q;
17881
+ const K = N.scaledTo(Math.max(this._source.minzoom, Math.min(N.canonical.z, 5)));
17882
+ B[K.key] = K;
17883
17883
  }
17884
- f = f.concat(Object.values(F));
17884
+ f = f.concat(Object.values(B));
17885
17885
  }
17886
17886
  const A = f.length === 0 && !this._updated && this._didEmitContent;
17887
17887
  this._updated = !0, A && this.fire(new a.k("data", { sourceDataType: "idle", dataType: "source", sourceId: this.id }));
17888
17888
  const D = this._updateRetainedTiles(f, m);
17889
17889
  qt(this._source.type) && this._updateCoveredAndRetainedTiles(D, v, C, m, f, d);
17890
- for (const F in D) this._tiles[F].clearFadeHold();
17890
+ for (const B in D) this._tiles[B].clearFadeHold();
17891
17891
  const R = a.ab(this._tiles, D);
17892
- for (const F of R) {
17893
- const B = this._tiles[F];
17894
- B.hasSymbolBuckets && !B.holdingForFade() ? B.setHoldDuration(this.map._fadeDuration) : B.hasSymbolBuckets && !B.symbolFadeFinished() || this._removeTile(F);
17892
+ for (const B of R) {
17893
+ const N = this._tiles[B];
17894
+ N.hasSymbolBuckets && !N.holdingForFade() ? N.setHoldDuration(this.map._fadeDuration) : N.hasSymbolBuckets && !N.symbolFadeFinished() || this._removeTile(B);
17895
17895
  }
17896
17896
  this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache();
17897
17897
  }
@@ -17902,13 +17902,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17902
17902
  var f;
17903
17903
  const m = {}, v = {}, C = Math.max(d - Fe.maxOverzooming, this._source.minzoom), A = Math.max(d + Fe.maxUnderzooming, this._source.minzoom), D = {};
17904
17904
  for (const R of s) {
17905
- const F = this._addTile(R);
17906
- m[R.key] = R, F.hasData() || d < this._source.maxzoom && (D[R.key] = R);
17905
+ const B = this._addTile(R);
17906
+ m[R.key] = R, B.hasData() || d < this._source.maxzoom && (D[R.key] = R);
17907
17907
  }
17908
17908
  this._retainLoadedChildren(D, d, A, m);
17909
17909
  for (const R of s) {
17910
- let F = this._tiles[R.key];
17911
- if (F.hasData()) continue;
17910
+ let B = this._tiles[R.key];
17911
+ if (B.hasData()) continue;
17912
17912
  if (d + 1 > this._source.maxzoom) {
17913
17913
  const q = R.children(this._source.maxzoom)[0], K = this.getTile(q);
17914
17914
  if (K && K.hasData()) {
@@ -17919,13 +17919,13 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17919
17919
  const q = R.children(this._source.maxzoom);
17920
17920
  if (m[q[0].key] && m[q[1].key] && m[q[2].key] && m[q[3].key]) continue;
17921
17921
  }
17922
- let B = F.wasRequested();
17922
+ let N = B.wasRequested();
17923
17923
  for (let q = R.overscaledZ - 1; q >= C; --q) {
17924
17924
  const K = R.scaledTo(q);
17925
17925
  if (v[K.key]) break;
17926
- if (v[K.key] = !0, F = this.getTile(K), !F && B && (F = this._addTile(K)), F) {
17927
- const J = F.hasData();
17928
- if ((J || !(!((f = this.map) === null || f === void 0) && f.cancelPendingTileRequestsWhileZooming) || B) && (m[K.key] = K), B = F.wasRequested(), J) break;
17926
+ if (v[K.key] = !0, B = this.getTile(K), !B && N && (B = this._addTile(K)), B) {
17927
+ const J = B.hasData();
17928
+ if ((J || !(!((f = this.map) === null || f === void 0) && f.cancelPendingTileRequestsWhileZooming) || N) && (m[K.key] = K), N = B.wasRequested(), J) break;
17929
17929
  }
17930
17930
  }
17931
17931
  }
@@ -17987,12 +17987,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
17987
17987
  const m = [], v = this.transform;
17988
17988
  if (!v) return m;
17989
17989
  const C = f ? v.getCameraQueryGeometry(s) : s, A = s.map((J) => v.pointCoordinate(J, this.terrain)), D = C.map((J) => v.pointCoordinate(J, this.terrain)), R = this.getIds();
17990
- let F = 1 / 0, B = 1 / 0, q = -1 / 0, K = -1 / 0;
17991
- for (const J of D) F = Math.min(F, J.x), B = Math.min(B, J.y), q = Math.max(q, J.x), K = Math.max(K, J.y);
17990
+ let B = 1 / 0, N = 1 / 0, q = -1 / 0, K = -1 / 0;
17991
+ for (const J of D) B = Math.min(B, J.x), N = Math.min(N, J.y), q = Math.max(q, J.x), K = Math.max(K, J.y);
17992
17992
  for (let J = 0; J < R.length; J++) {
17993
17993
  const ne = this._tiles[R[J]];
17994
17994
  if (ne.holdingForFade()) continue;
17995
- const ae = ne.tileID, le = Math.pow(2, v.zoom - ne.tileID.overscaledZ), he = d * ne.queryPadding * a.X / ne.tileSize / le, ee = [ae.getTilePoint(new a.Z(F, B)), ae.getTilePoint(new a.Z(q, K))];
17995
+ const ae = ne.tileID, le = Math.pow(2, v.zoom - ne.tileID.overscaledZ), he = d * ne.queryPadding * a.X / ne.tileSize / le, ee = [ae.getTilePoint(new a.Z(B, N)), ae.getTilePoint(new a.Z(q, K))];
17996
17996
  if (ee[0].x - he < a.X && ee[0].y - he < a.X && ee[1].x + he >= 0 && ee[1].y + he >= 0) {
17997
17997
  const me = A.map((be) => ae.getTilePoint(be)), ge = D.map((be) => ae.getTilePoint(be));
17998
17998
  m.push({ tile: ne, tileID: ae, queryGeometry: me, cameraQueryGeometry: ge, scale: le });
@@ -18091,8 +18091,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18091
18091
  if (v) return [{ key: null, x1: s, y1: d, x2: f, y2: m }];
18092
18092
  for (let R = 0; R < this.boxKeys.length; R++) D.push({ key: this.boxKeys[R], x1: this.bboxes[4 * R], y1: this.bboxes[4 * R + 1], x2: this.bboxes[4 * R + 2], y2: this.bboxes[4 * R + 3] });
18093
18093
  for (let R = 0; R < this.circleKeys.length; R++) {
18094
- const F = this.circles[3 * R], B = this.circles[3 * R + 1], q = this.circles[3 * R + 2];
18095
- D.push({ key: this.circleKeys[R], x1: F - q, y1: B - q, x2: F + q, y2: B + q });
18094
+ const B = this.circles[3 * R], N = this.circles[3 * R + 1], q = this.circles[3 * R + 2];
18095
+ D.push({ key: this.circleKeys[R], x1: B - q, y1: N - q, x2: B + q, y2: N + q });
18096
18096
  }
18097
18097
  } else this._forEachCell(s, d, f, m, this._queryCell, D, { hitTest: v, overlapMode: C, seenUids: { box: {}, circle: {} } }, A);
18098
18098
  return D;
@@ -18106,17 +18106,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18106
18106
  hitTestCircle(s, d, f, m, v) {
18107
18107
  const C = s - f, A = s + f, D = d - f, R = d + f;
18108
18108
  if (A < 0 || C > this.width || R < 0 || D > this.height) return !1;
18109
- const F = [];
18110
- return this._forEachCell(C, D, A, R, this._queryCellCircle, F, { hitTest: !0, overlapMode: m, circle: { x: s, y: d, radius: f }, seenUids: { box: {}, circle: {} } }, v), F.length > 0;
18109
+ const B = [];
18110
+ return this._forEachCell(C, D, A, R, this._queryCellCircle, B, { hitTest: !0, overlapMode: m, circle: { x: s, y: d, radius: f }, seenUids: { box: {}, circle: {} } }, v), B.length > 0;
18111
18111
  }
18112
18112
  _queryCell(s, d, f, m, v, C, A, D) {
18113
- const { seenUids: R, hitTest: F, overlapMode: B } = A, q = this.boxCells[v];
18113
+ const { seenUids: R, hitTest: B, overlapMode: N } = A, q = this.boxCells[v];
18114
18114
  if (q !== null) {
18115
18115
  const J = this.bboxes;
18116
18116
  for (const ne of q) if (!R.box[ne]) {
18117
18117
  R.box[ne] = !0;
18118
18118
  const ae = 4 * ne, le = this.boxKeys[ne];
18119
- if (s <= J[ae + 2] && d <= J[ae + 3] && f >= J[ae + 0] && m >= J[ae + 1] && (!D || D(le)) && (!F || !Ni(B, le.overlapMode)) && (C.push({ key: le, x1: J[ae], y1: J[ae + 1], x2: J[ae + 2], y2: J[ae + 3] }), F)) return !0;
18119
+ if (s <= J[ae + 2] && d <= J[ae + 3] && f >= J[ae + 0] && m >= J[ae + 1] && (!D || D(le)) && (!B || !Ni(N, le.overlapMode)) && (C.push({ key: le, x1: J[ae], y1: J[ae + 1], x2: J[ae + 2], y2: J[ae + 3] }), B)) return !0;
18120
18120
  }
18121
18121
  }
18122
18122
  const K = this.circleCells[v];
@@ -18125,37 +18125,37 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18125
18125
  for (const ne of K) if (!R.circle[ne]) {
18126
18126
  R.circle[ne] = !0;
18127
18127
  const ae = 3 * ne, le = this.circleKeys[ne];
18128
- if (this._circleAndRectCollide(J[ae], J[ae + 1], J[ae + 2], s, d, f, m) && (!D || D(le)) && (!F || !Ni(B, le.overlapMode))) {
18128
+ if (this._circleAndRectCollide(J[ae], J[ae + 1], J[ae + 2], s, d, f, m) && (!D || D(le)) && (!B || !Ni(N, le.overlapMode))) {
18129
18129
  const he = J[ae], ee = J[ae + 1], me = J[ae + 2];
18130
- if (C.push({ key: le, x1: he - me, y1: ee - me, x2: he + me, y2: ee + me }), F) return !0;
18130
+ if (C.push({ key: le, x1: he - me, y1: ee - me, x2: he + me, y2: ee + me }), B) return !0;
18131
18131
  }
18132
18132
  }
18133
18133
  }
18134
18134
  return !1;
18135
18135
  }
18136
18136
  _queryCellCircle(s, d, f, m, v, C, A, D) {
18137
- const { circle: R, seenUids: F, overlapMode: B } = A, q = this.boxCells[v];
18137
+ const { circle: R, seenUids: B, overlapMode: N } = A, q = this.boxCells[v];
18138
18138
  if (q !== null) {
18139
18139
  const J = this.bboxes;
18140
- for (const ne of q) if (!F.box[ne]) {
18141
- F.box[ne] = !0;
18140
+ for (const ne of q) if (!B.box[ne]) {
18141
+ B.box[ne] = !0;
18142
18142
  const ae = 4 * ne, le = this.boxKeys[ne];
18143
- if (this._circleAndRectCollide(R.x, R.y, R.radius, J[ae + 0], J[ae + 1], J[ae + 2], J[ae + 3]) && (!D || D(le)) && !Ni(B, le.overlapMode)) return C.push(!0), !0;
18143
+ if (this._circleAndRectCollide(R.x, R.y, R.radius, J[ae + 0], J[ae + 1], J[ae + 2], J[ae + 3]) && (!D || D(le)) && !Ni(N, le.overlapMode)) return C.push(!0), !0;
18144
18144
  }
18145
18145
  }
18146
18146
  const K = this.circleCells[v];
18147
18147
  if (K !== null) {
18148
18148
  const J = this.circles;
18149
- for (const ne of K) if (!F.circle[ne]) {
18150
- F.circle[ne] = !0;
18149
+ for (const ne of K) if (!B.circle[ne]) {
18150
+ B.circle[ne] = !0;
18151
18151
  const ae = 3 * ne, le = this.circleKeys[ne];
18152
- if (this._circlesCollide(J[ae], J[ae + 1], J[ae + 2], R.x, R.y, R.radius) && (!D || D(le)) && !Ni(B, le.overlapMode)) return C.push(!0), !0;
18152
+ if (this._circlesCollide(J[ae], J[ae + 1], J[ae + 2], R.x, R.y, R.radius) && (!D || D(le)) && !Ni(N, le.overlapMode)) return C.push(!0), !0;
18153
18153
  }
18154
18154
  }
18155
18155
  }
18156
18156
  _forEachCell(s, d, f, m, v, C, A, D) {
18157
- const R = this._convertToXCellCoord(s), F = this._convertToYCellCoord(d), B = this._convertToXCellCoord(f), q = this._convertToYCellCoord(m);
18158
- for (let K = R; K <= B; K++) for (let J = F; J <= q; J++) if (v.call(this, s, d, f, m, this.xCellCount * J + K, C, A, D)) return;
18157
+ const R = this._convertToXCellCoord(s), B = this._convertToYCellCoord(d), N = this._convertToXCellCoord(f), q = this._convertToYCellCoord(m);
18158
+ for (let K = R; K <= N; K++) for (let J = B; J <= q; J++) if (v.call(this, s, d, f, m, this.xCellCount * J + K, C, A, D)) return;
18159
18159
  }
18160
18160
  _convertToXCellCoord(s) {
18161
18161
  return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(s * this.xScale)));
@@ -18170,10 +18170,10 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18170
18170
  _circleAndRectCollide(s, d, f, m, v, C, A) {
18171
18171
  const D = (C - m) / 2, R = Math.abs(s - (m + D));
18172
18172
  if (R > D + f) return !1;
18173
- const F = (A - v) / 2, B = Math.abs(d - (v + F));
18174
- if (B > F + f) return !1;
18175
- if (R <= D || B <= F) return !0;
18176
- const q = R - D, K = B - F;
18173
+ const B = (A - v) / 2, N = Math.abs(d - (v + B));
18174
+ if (N > B + f) return !1;
18175
+ if (R <= D || N <= B) return !0;
18176
+ const q = R - D, K = N - B;
18177
18177
  return q * q + K * K <= f * f;
18178
18178
  }
18179
18179
  }
@@ -18200,7 +18200,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18200
18200
  function j(x, s) {
18201
18201
  return x.x >= -s[0] && x.x <= s[0] && x.y >= -s[1] && x.y <= s[1];
18202
18202
  }
18203
- function Y(x, s, d, f, m, v, C, A, D, R, F, B, q, K, J) {
18203
+ function Y(x, s, d, f, m, v, C, A, D, R, B, N, q, K, J) {
18204
18204
  const ne = f ? x.textSizeData : x.iconSizeData, ae = a.ag(ne, d.transform.zoom), le = [256 / d.width * 2 + 1, 256 / d.height * 2 + 1], he = f ? x.text.dynamicLayoutVertexArray : x.icon.dynamicLayoutVertexArray;
18205
18205
  he.clear();
18206
18206
  const ee = x.lineVertexArray, me = f ? x.text.placedSymbolArray : x.icon.placedSymbolArray, ge = d.transform.width / d.transform.height;
@@ -18217,25 +18217,25 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18217
18217
  kt($e.numGlyphs, he);
18218
18218
  continue;
18219
18219
  }
18220
- const rt = U(d.transform.cameraToCenterDistance, Je.signedDistanceFromCamera), Ge = a.ai(ne, ae, $e), He = C ? Ge / rt : Ge * rt, pt = { getElevation: J, labelPlaneMatrix: m, lineVertexArray: ee, pitchWithMap: C, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: R, tileAnchorPoint: new a.P($e.anchorX, $e.anchorY), unwrappedTileID: F, width: B, height: q, translation: K }, Lt = fe(pt, $e, He, !1, A, s, v, x.glyphOffsetArray, he, ge, D);
18220
+ const rt = U(d.transform.cameraToCenterDistance, Je.signedDistanceFromCamera), Ge = a.ai(ne, ae, $e), He = C ? Ge / rt : Ge * rt, pt = { getElevation: J, labelPlaneMatrix: m, lineVertexArray: ee, pitchWithMap: C, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: R, tileAnchorPoint: new a.P($e.anchorX, $e.anchorY), unwrappedTileID: B, width: N, height: q, translation: K }, Lt = fe(pt, $e, He, !1, A, s, v, x.glyphOffsetArray, he, ge, D);
18221
18221
  be = Lt.useVertical, (Lt.notEnoughRoom || be || Lt.needsFlipping && fe(pt, $e, He, !0, A, s, v, x.glyphOffsetArray, he, ge, D).notEnoughRoom) && kt($e.numGlyphs, he);
18222
18222
  }
18223
18223
  f ? x.text.dynamicLayoutVertexBuffer.updateData(he) : x.icon.dynamicLayoutVertexBuffer.updateData(he);
18224
18224
  }
18225
18225
  function te(x, s, d, f, m, v, C, A) {
18226
- const D = v.glyphStartIndex + v.numGlyphs, R = v.lineStartIndex, F = v.lineStartIndex + v.lineLength, B = s.getoffsetX(v.glyphStartIndex), q = s.getoffsetX(D - 1), K = Ue(x * B, d, f, m, v.segment, R, F, A, C);
18226
+ const D = v.glyphStartIndex + v.numGlyphs, R = v.lineStartIndex, B = v.lineStartIndex + v.lineLength, N = s.getoffsetX(v.glyphStartIndex), q = s.getoffsetX(D - 1), K = Ue(x * N, d, f, m, v.segment, R, B, A, C);
18227
18227
  if (!K) return null;
18228
- const J = Ue(x * q, d, f, m, v.segment, R, F, A, C);
18228
+ const J = Ue(x * q, d, f, m, v.segment, R, B, A, C);
18229
18229
  return J ? A.projectionCache.anyProjectionOccluded ? null : { first: K, last: J } : null;
18230
18230
  }
18231
18231
  function de(x, s, d, f) {
18232
18232
  return x === a.ah.horizontal && Math.abs(d.y - s.y) > Math.abs(d.x - s.x) * f ? { useVertical: !0 } : (x === a.ah.vertical ? s.y < d.y : s.x > d.x) ? { needsFlipping: !0 } : null;
18233
18233
  }
18234
- function fe(x, s, d, f, m, v, C, A, D, R, F) {
18235
- const B = d / 24, q = s.lineOffsetX * B, K = s.lineOffsetY * B;
18234
+ function fe(x, s, d, f, m, v, C, A, D, R, B) {
18235
+ const N = d / 24, q = s.lineOffsetX * N, K = s.lineOffsetY * N;
18236
18236
  let J;
18237
18237
  if (s.numGlyphs > 1) {
18238
- const ne = s.glyphStartIndex + s.numGlyphs, ae = s.lineStartIndex, le = s.lineStartIndex + s.lineLength, he = te(B, A, q, K, f, s, F, x);
18238
+ const ne = s.glyphStartIndex + s.numGlyphs, ae = s.lineStartIndex, le = s.lineStartIndex + s.lineLength, he = te(N, A, q, K, f, s, B, x);
18239
18239
  if (!he) return { notEnoughRoom: !0 };
18240
18240
  const ee = re(he.first.point.x, he.first.point.y, C, x.getElevation).point, me = re(he.last.point.x, he.last.point.y, C, x.getElevation).point;
18241
18241
  if (m && !f) {
@@ -18243,7 +18243,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18243
18243
  if (ge) return ge;
18244
18244
  }
18245
18245
  J = [he.first];
18246
- for (let ge = s.glyphStartIndex + 1; ge < ne - 1; ge++) J.push(Ue(B * A.getoffsetX(ge), q, K, f, s.segment, ae, le, x, F));
18246
+ for (let ge = s.glyphStartIndex + 1; ge < ne - 1; ge++) J.push(Ue(N * A.getoffsetX(ge), q, K, f, s.segment, ae, le, x, B));
18247
18247
  J.push(he.last);
18248
18248
  } else {
18249
18249
  if (m && !f) {
@@ -18252,7 +18252,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18252
18252
  }(x.tileAnchorPoint, he, ae, 0, v, x), ge = de(s.writingMode, ae, me, R);
18253
18253
  if (ge) return ge;
18254
18254
  }
18255
- const ne = Ue(B * A.getoffsetX(s.glyphStartIndex), q, K, f, s.segment, s.lineStartIndex, s.lineStartIndex + s.lineLength, x, F);
18255
+ const ne = Ue(N * A.getoffsetX(s.glyphStartIndex), q, K, f, s.segment, s.lineStartIndex, s.lineStartIndex + s.lineLength, x, B);
18256
18256
  if (!ne || x.projectionCache.anyProjectionOccluded) return { notEnoughRoom: !0 };
18257
18257
  J = [ne];
18258
18258
  }
@@ -18269,8 +18269,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18269
18269
  const m = new a.P(s.lineVertexArray.getx(x), s.lineVertexArray.gety(x)), v = Ae(m.x, m.y, s);
18270
18270
  if (v.signedDistanceFromCamera > 0) return f.projections[x] = v.point, f.anyProjectionOccluded = f.anyProjectionOccluded || v.isOccluded, v.point;
18271
18271
  const C = x - d.direction;
18272
- return function(A, D, R, F, B) {
18273
- return _e(A, D, R, F, void 0, B);
18272
+ return function(A, D, R, B, N) {
18273
+ return _e(A, D, R, B, void 0, N);
18274
18274
  }(d.distanceFromAnchor === 0 ? s.tileAnchorPoint : new a.P(s.lineVertexArray.getx(C), s.lineVertexArray.gety(C)), m, d.previousVertex, d.absOffsetX - d.distanceFromAnchor + 1, s);
18275
18275
  }
18276
18276
  function Ae(x, s, d) {
@@ -18285,31 +18285,31 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18285
18285
  if (A.projectionCache.offsets[x]) return A.projectionCache.offsets[x];
18286
18286
  const R = d.add(s);
18287
18287
  if (x + D.direction < f || x + D.direction >= m) return A.projectionCache.offsets[x] = R, R;
18288
- const F = ue(x + D.direction, A, D), B = Le(F.sub(d), C, D.direction), q = d.add(B), K = F.add(B);
18288
+ const B = ue(x + D.direction, A, D), N = Le(B.sub(d), C, D.direction), q = d.add(N), K = B.add(N);
18289
18289
  return A.projectionCache.offsets[x] = a.ak(v, R, q, K) || R, A.projectionCache.offsets[x];
18290
18290
  }
18291
18291
  function Ue(x, s, d, f, m, v, C, A, D) {
18292
18292
  const R = f ? x - s : x + s;
18293
- let F = R > 0 ? 1 : -1, B = 0;
18294
- f && (F *= -1, B = Math.PI), F < 0 && (B += Math.PI);
18295
- let q, K = F > 0 ? v + m : v + m + 1;
18293
+ let B = R > 0 ? 1 : -1, N = 0;
18294
+ f && (B *= -1, N = Math.PI), B < 0 && (N += Math.PI);
18295
+ let q, K = B > 0 ? v + m : v + m + 1;
18296
18296
  A.projectionCache.cachedAnchorPoint ? q = A.projectionCache.cachedAnchorPoint : (q = Ae(A.tileAnchorPoint.x, A.tileAnchorPoint.y, A).point, A.projectionCache.cachedAnchorPoint = q);
18297
18297
  let J, ne, ae = q, le = q, he = 0, ee = 0;
18298
18298
  const me = Math.abs(R), ge = [];
18299
18299
  let be;
18300
18300
  for (; he + ee <= me; ) {
18301
- if (K += F, K < v || K >= C) return null;
18301
+ if (K += B, K < v || K >= C) return null;
18302
18302
  he += ee, le = ae, ne = J;
18303
- const Je = { absOffsetX: me, direction: F, distanceFromAnchor: he, previousVertex: le };
18303
+ const Je = { absOffsetX: me, direction: B, distanceFromAnchor: he, previousVertex: le };
18304
18304
  if (ae = ue(K, A, Je), d === 0) ge.push(le), be = ae.sub(le);
18305
18305
  else {
18306
18306
  let rt;
18307
18307
  const Ge = ae.sub(le);
18308
- rt = Ge.mag() === 0 ? Le(ue(K + F, A, Je).sub(ae), d, F) : Le(Ge, d, F), ne || (ne = le.add(rt)), J = Te(K, rt, ae, v, C, ne, d, A, Je), ge.push(ne), be = J.sub(ne);
18308
+ rt = Ge.mag() === 0 ? Le(ue(K + B, A, Je).sub(ae), d, B) : Le(Ge, d, B), ne || (ne = le.add(rt)), J = Te(K, rt, ae, v, C, ne, d, A, Je), ge.push(ne), be = J.sub(ne);
18309
18309
  }
18310
18310
  ee = be.mag();
18311
18311
  }
18312
- const Re = be._mult((me - he) / ee)._add(ne || le), $e = B + Math.atan2(ae.y - le.y, ae.x - le.x);
18312
+ const Re = be._mult((me - he) / ee)._add(ne || le), $e = N + Math.atan2(ae.y - le.y, ae.x - le.x);
18313
18313
  return ge.push(Re), { point: Re, angle: D ? $e : 0, path: ge };
18314
18314
  }
18315
18315
  const xt = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
@@ -18328,19 +18328,19 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18328
18328
  constructor(s, d, f = new rn(s.width + 200, s.height + 200, 25), m = new rn(s.width + 200, s.height + 200, 25)) {
18329
18329
  this.transform = s, this.mapProjection = d, this.grid = f, this.ignoredGrid = m, this.pitchFactor = Math.cos(s._pitch) * s.cameraToCenterDistance, this.screenRightBoundary = s.width + Bt, this.screenBottomBoundary = s.height + Bt, this.gridRightBoundary = s.width + 200, this.gridBottomBoundary = s.height + 200, this.perspectiveRatioCutoff = 0.6;
18330
18330
  }
18331
- placeCollisionBox(s, d, f, m, v, C, A, D, R, F, B) {
18332
- const q = s.anchorPointX + D[0], K = s.anchorPointY + D[1], J = this.projectAndGetPerspectiveRatio(m, q, K, v, F), ne = f * J.perspectiveRatio;
18331
+ placeCollisionBox(s, d, f, m, v, C, A, D, R, B, N) {
18332
+ const q = s.anchorPointX + D[0], K = s.anchorPointY + D[1], J = this.projectAndGetPerspectiveRatio(m, q, K, v, B), ne = f * J.perspectiveRatio;
18333
18333
  let ae;
18334
- if (C || A) ae = this._projectCollisionBox(s, ne, m, v, C, A, D, J, F, B);
18334
+ if (C || A) ae = this._projectCollisionBox(s, ne, m, v, C, A, D, J, B, N);
18335
18335
  else {
18336
- const ge = J.point.x + (B ? B.x * ne : 0), be = J.point.y + (B ? B.y * ne : 0);
18336
+ const ge = J.point.x + (N ? N.x * ne : 0), be = J.point.y + (N ? N.y * ne : 0);
18337
18337
  ae = { allPointsOccluded: !1, box: [ge + s.x1 * ne, be + s.y1 * ne, ge + s.x2 * ne, be + s.y2 * ne] };
18338
18338
  }
18339
18339
  const [le, he, ee, me] = ae.box;
18340
18340
  return this.mapProjection.useSpecialProjectionForSymbols && (C ? ae.allPointsOccluded : this.mapProjection.isOccluded(q, K, v)) || J.perspectiveRatio < this.perspectiveRatioCutoff || !this.isInsideGrid(le, he, ee, me) || d !== "always" && this.grid.hitTest(le, he, ee, me, d, R) ? { box: [le, he, ee, me], placeable: !1, offscreen: !1 } : { box: [le, he, ee, me], placeable: !0, offscreen: this.isOffscreen(le, he, ee, me) };
18341
18341
  }
18342
- placeCollisionCircles(s, d, f, m, v, C, A, D, R, F, B, q, K, J, ne, ae) {
18343
- const le = [], he = new a.P(d.anchorX, d.anchorY), ee = this.getPerspectiveRatio(C, he.x, he.y, A, ae), me = (B ? v / ee : v * ee) / a.ap, ge = { getElevation: ae, labelPlaneMatrix: D, lineVertexArray: f, pitchWithMap: B, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: he, unwrappedTileID: A, width: this.transform.width, height: this.transform.height, translation: ne }, be = te(me, m, d.lineOffsetX * me, d.lineOffsetY * me, !1, d, !1, ge);
18342
+ placeCollisionCircles(s, d, f, m, v, C, A, D, R, B, N, q, K, J, ne, ae) {
18343
+ const le = [], he = new a.P(d.anchorX, d.anchorY), ee = this.getPerspectiveRatio(C, he.x, he.y, A, ae), me = (N ? v / ee : v * ee) / a.ap, ge = { getElevation: ae, labelPlaneMatrix: D, lineVertexArray: f, pitchWithMap: N, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: he, unwrappedTileID: A, width: this.transform.width, height: this.transform.height, translation: ne }, be = te(me, m, d.lineOffsetX * me, d.lineOffsetY * me, !1, d, !1, ge);
18344
18344
  let Re = !1, $e = !1, Je = !0;
18345
18345
  if (be) {
18346
18346
  const rt = 0.5 * K * ee + J, Ge = new a.P(-100, -100), He = new a.P(this.screenRightBoundary, this.screenBottomBoundary), pt = new et(), Lt = be.first, Ze = be.last;
@@ -18366,11 +18366,11 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18366
18366
  const Rn = ji / Math.max(Yt - 1, 1), ss = pt.lerp(Rn), Ui = ss.x + Bt, lr = ss.y + Bt;
18367
18367
  le.push(Ui, lr, rt, 0);
18368
18368
  const Xn = Ui - rt, Ln = lr - rt, Kn = Ui + rt, Cs = lr + rt;
18369
- if (Je = Je && this.isOffscreen(Xn, Ln, Kn, Cs), $e = $e || this.isInsideGrid(Xn, Ln, Kn, Cs), s !== "always" && this.grid.hitTestCircle(Ui, lr, rt, s, q) && (Re = !0, !F)) return { circles: [], offscreen: !1, collisionDetected: Re };
18369
+ if (Je = Je && this.isOffscreen(Xn, Ln, Kn, Cs), $e = $e || this.isInsideGrid(Xn, Ln, Kn, Cs), s !== "always" && this.grid.hitTestCircle(Ui, lr, rt, s, q) && (Re = !0, !B)) return { circles: [], offscreen: !1, collisionDetected: Re };
18370
18370
  }
18371
18371
  }
18372
18372
  }
18373
- return { circles: !F && Re || !$e || ee < this.perspectiveRatioCutoff ? [] : le, offscreen: Je, collisionDetected: Re };
18373
+ return { circles: !B && Re || !$e || ee < this.perspectiveRatioCutoff ? [] : le, offscreen: Je, collisionDetected: Re };
18374
18374
  }
18375
18375
  projectPathToScreenSpace(s, d, f) {
18376
18376
  return s.map((m) => re(m.x, m.y, f, d.getElevation));
@@ -18379,16 +18379,16 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18379
18379
  if (s.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {};
18380
18380
  const d = [];
18381
18381
  let f = 1 / 0, m = 1 / 0, v = -1 / 0, C = -1 / 0;
18382
- for (const F of s) {
18383
- const B = new a.P(F.x + Bt, F.y + Bt);
18384
- f = Math.min(f, B.x), m = Math.min(m, B.y), v = Math.max(v, B.x), C = Math.max(C, B.y), d.push(B);
18382
+ for (const B of s) {
18383
+ const N = new a.P(B.x + Bt, B.y + Bt);
18384
+ f = Math.min(f, N.x), m = Math.min(m, N.y), v = Math.max(v, N.x), C = Math.max(C, N.y), d.push(N);
18385
18385
  }
18386
18386
  const A = this.grid.query(f, m, v, C).concat(this.ignoredGrid.query(f, m, v, C)), D = {}, R = {};
18387
- for (const F of A) {
18388
- const B = F.key;
18389
- if (D[B.bucketInstanceId] === void 0 && (D[B.bucketInstanceId] = {}), D[B.bucketInstanceId][B.featureIndex]) continue;
18390
- const q = [new a.P(F.x1, F.y1), new a.P(F.x2, F.y1), new a.P(F.x2, F.y2), new a.P(F.x1, F.y2)];
18391
- a.am(d, q) && (D[B.bucketInstanceId][B.featureIndex] = !0, R[B.bucketInstanceId] === void 0 && (R[B.bucketInstanceId] = []), R[B.bucketInstanceId].push(B.featureIndex));
18387
+ for (const B of A) {
18388
+ const N = B.key;
18389
+ if (D[N.bucketInstanceId] === void 0 && (D[N.bucketInstanceId] = {}), D[N.bucketInstanceId][N.featureIndex]) continue;
18390
+ const q = [new a.P(B.x1, B.y1), new a.P(B.x2, B.y1), new a.P(B.x2, B.y2), new a.P(B.x1, B.y2)];
18391
+ a.am(d, q) && (D[N.bucketInstanceId][N.featureIndex] = !0, R[N.bucketInstanceId] === void 0 && (R[N.bucketInstanceId] = []), R[N.bucketInstanceId].push(N.featureIndex));
18392
18392
  }
18393
18393
  return R;
18394
18394
  }
@@ -18419,26 +18419,26 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18419
18419
  const s = a.an([]);
18420
18420
  return a.J(s, s, [-100, -100, 0]), s;
18421
18421
  }
18422
- _projectCollisionBox(s, d, f, m, v, C, A, D, R, F) {
18423
- let B = new a.P(1, 0), q = new a.P(0, 1);
18422
+ _projectCollisionBox(s, d, f, m, v, C, A, D, R, B) {
18423
+ let N = new a.P(1, 0), q = new a.P(0, 1);
18424
18424
  const K = new a.P(s.anchorPointX + A[0], s.anchorPointY + A[1]);
18425
18425
  if (C && !v) {
18426
18426
  const Je = this.projectAndGetPerspectiveRatio(f, K.x + 1, K.y, m, R).point.sub(D.point).unit(), rt = Math.atan(Je.y / Je.x) + (Je.x < 0 ? Math.PI : 0), Ge = Math.sin(rt), He = Math.cos(rt);
18427
- B = new a.P(He, Ge), q = new a.P(-Ge, He);
18427
+ N = new a.P(He, Ge), q = new a.P(-Ge, He);
18428
18428
  } else if (!C && v) {
18429
18429
  const Je = -this.transform.angle, rt = Math.sin(Je), Ge = Math.cos(Je);
18430
- B = new a.P(Ge, rt), q = new a.P(-rt, Ge);
18430
+ N = new a.P(Ge, rt), q = new a.P(-rt, Ge);
18431
18431
  }
18432
18432
  let J = D.point, ne = d;
18433
18433
  if (v) {
18434
18434
  J = K;
18435
18435
  const Je = this.transform.zoom - Math.floor(this.transform.zoom);
18436
- ne = Math.pow(2, -Je), ne *= this.mapProjection.getPitchedTextCorrection(this.transform, K, m), F || (ne *= a.ac(0.5 + D.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4));
18436
+ ne = Math.pow(2, -Je), ne *= this.mapProjection.getPitchedTextCorrection(this.transform, K, m), B || (ne *= a.ac(0.5 + D.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4));
18437
18437
  }
18438
- F && (J = J.add(B.mult(F.x * ne)).add(q.mult(F.y * ne)));
18438
+ B && (J = J.add(N.mult(B.x * ne)).add(q.mult(B.y * ne)));
18439
18439
  const ae = s.x1 * ne, le = s.x2 * ne, he = (ae + le) / 2, ee = s.y1 * ne, me = s.y2 * ne, ge = (ee + me) / 2, be = [{ offsetX: ae, offsetY: ee }, { offsetX: he, offsetY: ee }, { offsetX: le, offsetY: ee }, { offsetX: le, offsetY: ge }, { offsetX: le, offsetY: me }, { offsetX: he, offsetY: me }, { offsetX: ae, offsetY: me }, { offsetX: ae, offsetY: ge }];
18440
18440
  let Re = [];
18441
- for (const { offsetX: Je, offsetY: rt } of be) Re.push(new a.P(J.x + B.x * Je + q.x * rt, J.y + B.y * Je + q.y * rt));
18441
+ for (const { offsetX: Je, offsetY: rt } of be) Re.push(new a.P(J.x + N.x * Je + q.x * rt, J.y + N.y * Je + q.y * rt));
18442
18442
  let $e = !1;
18443
18443
  if (v) {
18444
18444
  const Je = Re.map((rt) => this.projectAndGetPerspectiveRatio(f, rt.x, rt.y, m, R));
@@ -18509,30 +18509,30 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18509
18509
  getBucketParts(s, d, f, m) {
18510
18510
  const v = f.getBucket(d), C = f.latestFeatureIndex;
18511
18511
  if (!v || !C || d.id !== v.layerIds[0]) return;
18512
- const A = f.collisionBoxArray, D = v.layers[0].layout, R = v.layers[0].paint, F = Math.pow(2, this.transform.zoom - f.tileID.overscaledZ), B = f.tileSize / a.X, q = f.tileID.toUnwrapped(), K = this.transform.calculatePosMatrix(q), J = D.get("text-pitch-alignment") === "map", ne = D.get("text-rotation-alignment") === "map", ae = Zt(f, 1, this.transform.zoom), le = this.collisionIndex.mapProjection.translatePosition(this.transform, f, R.get("text-translate"), R.get("text-translate-anchor")), he = this.collisionIndex.mapProjection.translatePosition(this.transform, f, R.get("icon-translate"), R.get("icon-translate-anchor")), ee = Zn(K, J, ne, this.transform, ae);
18512
+ const A = f.collisionBoxArray, D = v.layers[0].layout, R = v.layers[0].paint, B = Math.pow(2, this.transform.zoom - f.tileID.overscaledZ), N = f.tileSize / a.X, q = f.tileID.toUnwrapped(), K = this.transform.calculatePosMatrix(q), J = D.get("text-pitch-alignment") === "map", ne = D.get("text-rotation-alignment") === "map", ae = Zt(f, 1, this.transform.zoom), le = this.collisionIndex.mapProjection.translatePosition(this.transform, f, R.get("text-translate"), R.get("text-translate-anchor")), he = this.collisionIndex.mapProjection.translatePosition(this.transform, f, R.get("icon-translate"), R.get("icon-translate-anchor")), ee = Zn(K, J, ne, this.transform, ae);
18513
18513
  let me = null;
18514
18514
  if (J) {
18515
18515
  const be = xr(K, J, ne, this.transform, ae);
18516
18516
  me = a.L([], this.transform.labelPlaneMatrix, be);
18517
18517
  }
18518
18518
  this.retainedQueryData[v.bucketInstanceId] = new Gi(v.bucketInstanceId, C, v.sourceLayerIndex, v.index, f.tileID);
18519
- const ge = { bucket: v, layout: D, translationText: le, translationIcon: he, posMatrix: K, unwrappedTileID: q, textLabelPlaneMatrix: ee, labelToScreenMatrix: me, scale: F, textPixelRatio: B, holdingForFade: f.holdingForFade(), collisionBoxArray: A, partiallyEvaluatedTextSize: a.ag(v.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(v.sourceID) };
18519
+ const ge = { bucket: v, layout: D, translationText: le, translationIcon: he, posMatrix: K, unwrappedTileID: q, textLabelPlaneMatrix: ee, labelToScreenMatrix: me, scale: B, textPixelRatio: N, holdingForFade: f.holdingForFade(), collisionBoxArray: A, partiallyEvaluatedTextSize: a.ag(v.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(v.sourceID) };
18520
18520
  if (m) for (const be of v.sortKeyRanges) {
18521
18521
  const { sortKey: Re, symbolInstanceStart: $e, symbolInstanceEnd: Je } = be;
18522
18522
  s.push({ sortKey: Re, symbolInstanceStart: $e, symbolInstanceEnd: Je, parameters: ge });
18523
18523
  }
18524
18524
  else s.push({ symbolInstanceStart: 0, symbolInstanceEnd: v.symbolInstances.length, parameters: ge });
18525
18525
  }
18526
- attemptAnchorPlacement(s, d, f, m, v, C, A, D, R, F, B, q, K, J, ne, ae, le, he, ee) {
18527
- const me = a.aq[s.textAnchor], ge = [s.textOffset0, s.textOffset1], be = Pn(me, f, m, ge, v), Re = this.collisionIndex.placeCollisionBox(d, q, D, R, F, A, C, ae, B.predicate, ee, be);
18528
- if ((!he || this.collisionIndex.placeCollisionBox(he, q, D, R, F, A, C, le, B.predicate, ee, be).placeable) && Re.placeable) {
18526
+ attemptAnchorPlacement(s, d, f, m, v, C, A, D, R, B, N, q, K, J, ne, ae, le, he, ee) {
18527
+ const me = a.aq[s.textAnchor], ge = [s.textOffset0, s.textOffset1], be = Pn(me, f, m, ge, v), Re = this.collisionIndex.placeCollisionBox(d, q, D, R, B, A, C, ae, N.predicate, ee, be);
18528
+ if ((!he || this.collisionIndex.placeCollisionBox(he, q, D, R, B, A, C, le, N.predicate, ee, be).placeable) && Re.placeable) {
18529
18529
  let $e;
18530
18530
  if (this.prevPlacement && this.prevPlacement.variableOffsets[K.crossTileID] && this.prevPlacement.placements[K.crossTileID] && this.prevPlacement.placements[K.crossTileID].text && ($e = this.prevPlacement.variableOffsets[K.crossTileID].anchor), K.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
18531
18531
  return this.variableOffsets[K.crossTileID] = { textOffset: ge, width: f, height: m, anchor: me, textBoxScale: v, prevAnchor: $e }, this.markUsedJustification(J, me, K, ne), J.allowVerticalPlacement && (this.markUsedOrientation(J, ne, K), this.placedOrientations[K.crossTileID] = ne), { shift: be, placedGlyphBoxes: Re };
18532
18532
  }
18533
18533
  }
18534
18534
  placeLayerBucketPart(s, d, f) {
18535
- const { bucket: m, layout: v, translationText: C, translationIcon: A, posMatrix: D, unwrappedTileID: R, textLabelPlaneMatrix: F, labelToScreenMatrix: B, textPixelRatio: q, holdingForFade: K, collisionBoxArray: J, partiallyEvaluatedTextSize: ne, collisionGroup: ae } = s.parameters, le = v.get("text-optional"), he = v.get("icon-optional"), ee = a.ar(v, "text-overlap", "text-allow-overlap"), me = ee === "always", ge = a.ar(v, "icon-overlap", "icon-allow-overlap"), be = ge === "always", Re = v.get("text-rotation-alignment") === "map", $e = v.get("text-pitch-alignment") === "map", Je = v.get("icon-text-fit") !== "none", rt = v.get("symbol-z-order") === "viewport-y", Ge = me && (be || !m.hasIconData() || he), He = be && (me || !m.hasTextData() || le);
18535
+ const { bucket: m, layout: v, translationText: C, translationIcon: A, posMatrix: D, unwrappedTileID: R, textLabelPlaneMatrix: B, labelToScreenMatrix: N, textPixelRatio: q, holdingForFade: K, collisionBoxArray: J, partiallyEvaluatedTextSize: ne, collisionGroup: ae } = s.parameters, le = v.get("text-optional"), he = v.get("icon-optional"), ee = a.ar(v, "text-overlap", "text-allow-overlap"), me = ee === "always", ge = a.ar(v, "icon-overlap", "icon-allow-overlap"), be = ge === "always", Re = v.get("text-rotation-alignment") === "map", $e = v.get("text-pitch-alignment") === "map", Je = v.get("icon-text-fit") !== "none", rt = v.get("symbol-z-order") === "viewport-y", Ge = me && (be || !m.hasIconData() || he), He = be && (me || !m.hasTextData() || le);
18536
18536
  !m.collisionArrays && J && m.deserializeCollisionBoxes(J);
18537
18537
  const pt = this._getTerrainElevationFunc(this.retainedQueryData[m.bucketInstanceId].tileID), Lt = (Ze, it, Ot) => {
18538
18538
  var Vi, Vt;
@@ -18593,7 +18593,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18593
18593
  }
18594
18594
  if (Xn = Ui, Yt = Xn && Xn.placeable, Rn = Xn && Xn.offscreen, Ze.useRuntimeCollisionCircles) {
18595
18595
  const $r = m.text.placedSymbolArray.get(Ze.centerJustifiedTextSymbolIndex), Vr = a.ai(m.textSizeData, ne, $r), ho = v.get("text-padding");
18596
- Ln = this.collisionIndex.placeCollisionCircles(ee, $r, m.lineVertexArray, m.glyphOffsetArray, Vr, D, R, F, B, f, $e, ae.predicate, Ze.collisionCircleDiameter, ho, C, pt), Ln.circles.length && Ln.collisionDetected && !f && a.w("Collisions detected, but collision boxes are not shown"), Yt = me || Ln.circles.length > 0 && !Ln.collisionDetected, Rn = Rn && Ln.offscreen;
18596
+ Ln = this.collisionIndex.placeCollisionCircles(ee, $r, m.lineVertexArray, m.glyphOffsetArray, Vr, D, R, B, N, f, $e, ae.predicate, Ze.collisionCircleDiameter, ho, C, pt), Ln.circles.length && Ln.collisionDetected && !f && a.w("Collisions detected, but collision boxes are not shown"), Yt = me || Ln.circles.length > 0 && !Ln.collisionDetected, Rn = Rn && Ln.offscreen;
18597
18597
  }
18598
18598
  if (it.iconFeatureIndex && (ru = it.iconFeatureIndex), it.iconBox) {
18599
18599
  const $r = (Vr) => this.collisionIndex.placeCollisionBox(Vr, ge, q, D, R, $e, Re, A, ae.predicate, pt, Je && ss ? ss : void 0);
@@ -18649,14 +18649,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18649
18649
  this.prevZoomAdjustment = d ? d.zoomAdjustment(this.transform.zoom) : 0;
18650
18650
  const m = d ? d.symbolFadeChange(s) : 1, v = d ? d.opacities : {}, C = d ? d.variableOffsets : {}, A = d ? d.placedOrientations : {};
18651
18651
  for (const D in this.placements) {
18652
- const R = this.placements[D], F = v[D];
18653
- F ? (this.opacities[D] = new Ki(F, m, R.text, R.icon), f = f || R.text !== F.text.placed || R.icon !== F.icon.placed) : (this.opacities[D] = new Ki(null, m, R.text, R.icon, R.skipFade), f = f || R.text || R.icon);
18652
+ const R = this.placements[D], B = v[D];
18653
+ B ? (this.opacities[D] = new Ki(B, m, R.text, R.icon), f = f || R.text !== B.text.placed || R.icon !== B.icon.placed) : (this.opacities[D] = new Ki(null, m, R.text, R.icon, R.skipFade), f = f || R.text || R.icon);
18654
18654
  }
18655
18655
  for (const D in v) {
18656
18656
  const R = v[D];
18657
18657
  if (!this.opacities[D]) {
18658
- const F = new Ki(R, m, !1, !1);
18659
- F.isHidden() || (this.opacities[D] = F, f = f || R.text.placed || R.icon.placed);
18658
+ const B = new Ki(R, m, !1, !1);
18659
+ B.isHidden() || (this.opacities[D] = B, f = f || R.text.placed || R.icon.placed);
18660
18660
  }
18661
18661
  }
18662
18662
  for (const D in C) this.variableOffsets[D] || !this.opacities[D] || this.opacities[D].isHidden() || (this.variableOffsets[D] = C[D]);
@@ -18673,7 +18673,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18673
18673
  }
18674
18674
  updateBucketOpacities(s, d, f, m) {
18675
18675
  s.hasTextData() && (s.text.opacityVertexArray.clear(), s.text.hasVisibleVertices = !1), s.hasIconData() && (s.icon.opacityVertexArray.clear(), s.icon.hasVisibleVertices = !1), s.hasIconCollisionBoxData() && s.iconCollisionBox.collisionVertexArray.clear(), s.hasTextCollisionBoxData() && s.textCollisionBox.collisionVertexArray.clear();
18676
- const v = s.layers[0], C = v.layout, A = new Ki(null, 0, !1, !1, !0), D = C.get("text-allow-overlap"), R = C.get("icon-allow-overlap"), F = v._unevaluatedLayout.hasValue("text-variable-anchor") || v._unevaluatedLayout.hasValue("text-variable-anchor-offset"), B = C.get("text-rotation-alignment") === "map", q = C.get("text-pitch-alignment") === "map", K = C.get("icon-text-fit") !== "none", J = new Ki(null, 0, D && (R || !s.hasIconData() || C.get("icon-optional")), R && (D || !s.hasTextData() || C.get("text-optional")), !0);
18676
+ const v = s.layers[0], C = v.layout, A = new Ki(null, 0, !1, !1, !0), D = C.get("text-allow-overlap"), R = C.get("icon-allow-overlap"), B = v._unevaluatedLayout.hasValue("text-variable-anchor") || v._unevaluatedLayout.hasValue("text-variable-anchor-offset"), N = C.get("text-rotation-alignment") === "map", q = C.get("text-pitch-alignment") === "map", K = C.get("icon-text-fit") !== "none", J = new Ki(null, 0, D && (R || !s.hasIconData() || C.get("icon-optional")), R && (D || !s.hasTextData() || C.get("text-optional")), !0);
18677
18677
  !s.collisionArrays && m && (s.hasIconCollisionBoxData() || s.hasTextCollisionBoxData()) && s.deserializeCollisionBoxes(m);
18678
18678
  const ne = (le, he, ee) => {
18679
18679
  for (let me = 0; me < he / 4; me++) le.opacityVertexArray.emplaceBack(ee);
@@ -18707,9 +18707,9 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18707
18707
  let pt = new a.P(0, 0);
18708
18708
  if (He.textBox || He.verticalTextBox) {
18709
18709
  let Lt = !0;
18710
- if (F) {
18710
+ if (B) {
18711
18711
  const Ze = this.variableOffsets[ge];
18712
- Ze ? (pt = Pn(Ze.anchor, Ze.width, Ze.height, Ze.textOffset, Ze.textBoxScale), B && pt._rotate(q ? this.transform.angle : -this.transform.angle)) : Lt = !1;
18712
+ Ze ? (pt = Pn(Ze.anchor, Ze.width, Ze.height, Ze.textOffset, Ze.textBoxScale), N && pt._rotate(q ? this.transform.angle : -this.transform.angle)) : Lt = !1;
18713
18713
  }
18714
18714
  if (He.textBox || He.verticalTextBox) {
18715
18715
  let Ze;
@@ -18770,8 +18770,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18770
18770
  if (!C[0] && !C[1]) return [0, 0];
18771
18771
  const R = D ? A === "map" ? m.angle : 0 : A === "viewport" ? -m.angle : 0;
18772
18772
  if (R) {
18773
- const F = Math.sin(R), B = Math.cos(R);
18774
- C = [C[0] * B - C[1] * F, C[0] * F + C[1] * B];
18773
+ const B = Math.sin(R), N = Math.cos(R);
18774
+ C = [C[0] * N - C[1] * B, C[0] * B + C[1] * N];
18775
18775
  }
18776
18776
  return [D ? C[0] : Zt(v, C[0], m.zoom), D ? C[1] : Zt(v, C[1], m.zoom)];
18777
18777
  }(x, s, d, f), getCircleRadiusCorrection: (x) => 1 };
@@ -18823,15 +18823,15 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18823
18823
  const A = { positions: C.map((D) => ({ x: Math.floor(D.anchorX * es), y: Math.floor(D.anchorY * es) })), crossTileIDs: C.map((D) => D.crossTileID) };
18824
18824
  if (A.positions.length > 128) {
18825
18825
  const D = new a.av(A.positions.length, 16, Uint16Array);
18826
- for (const { x: R, y: F } of A.positions) D.add(R, F);
18826
+ for (const { x: R, y: B } of A.positions) D.add(R, B);
18827
18827
  D.finish(), delete A.positions, A.index = D;
18828
18828
  }
18829
18829
  this._symbolsByKey[v] = A;
18830
18830
  }
18831
18831
  }
18832
18832
  getScaledCoordinates(s, d) {
18833
- const { x: f, y: m, z: v } = this.tileID.canonical, { x: C, y: A, z: D } = d.canonical, R = es / Math.pow(2, D - v), F = (A * a.X + s.anchorY) * R, B = m * a.X * es;
18834
- return { x: Math.floor((C * a.X + s.anchorX) * R - f * a.X * es), y: Math.floor(F - B) };
18833
+ const { x: f, y: m, z: v } = this.tileID.canonical, { x: C, y: A, z: D } = d.canonical, R = es / Math.pow(2, D - v), B = (A * a.X + s.anchorY) * R, N = m * a.X * es;
18834
+ return { x: Math.floor((C * a.X + s.anchorX) * R - f * a.X * es), y: Math.floor(B - N) };
18835
18835
  }
18836
18836
  findMatches(s, d, f) {
18837
18837
  const m = this.tileID.canonical.z < d.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - d.canonical.z);
@@ -18843,17 +18843,17 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
18843
18843
  const D = this.getScaledCoordinates(C, d);
18844
18844
  if (A.index) {
18845
18845
  const R = A.index.range(D.x - m, D.y - m, D.x + m, D.y + m).sort();
18846
- for (const F of R) {
18847
- const B = A.crossTileIDs[F];
18848
- if (!f[B]) {
18849
- f[B] = !0, C.crossTileID = B;
18846
+ for (const B of R) {
18847
+ const N = A.crossTileIDs[B];
18848
+ if (!f[N]) {
18849
+ f[N] = !0, C.crossTileID = N;
18850
18850
  break;
18851
18851
  }
18852
18852
  }
18853
18853
  } else if (A.positions) for (let R = 0; R < A.positions.length; R++) {
18854
- const F = A.positions[R], B = A.crossTileIDs[R];
18855
- if (Math.abs(F.x - D.x) <= m && Math.abs(F.y - D.y) <= m && !f[B]) {
18856
- f[B] = !0, C.crossTileID = B;
18854
+ const B = A.positions[R], N = A.crossTileIDs[R];
18855
+ if (Math.abs(B.x - D.x) <= m && Math.abs(B.y - D.y) <= m && !f[N]) {
18856
+ f[N] = !0, C.crossTileID = N;
18857
18857
  break;
18858
18858
  }
18859
18859
  }
@@ -19008,14 +19008,14 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19008
19008
  let m;
19009
19009
  this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController(), function(v, C, A, D) {
19010
19010
  return a._(this, void 0, void 0, function* () {
19011
- const R = ze(v), F = A > 1 ? "@2x" : "", B = {}, q = {};
19011
+ const R = ze(v), B = A > 1 ? "@2x" : "", N = {}, q = {};
19012
19012
  for (const { id: K, url: J } of R) {
19013
- const ne = C.transformRequest(Qe(J, F, ".json"), "SpriteJSON");
19014
- B[K] = a.h(ne, D);
19015
- const ae = C.transformRequest(Qe(J, F, ".png"), "SpriteImage");
19013
+ const ne = C.transformRequest(Qe(J, B, ".json"), "SpriteJSON");
19014
+ N[K] = a.h(ne, D);
19015
+ const ae = C.transformRequest(Qe(J, B, ".png"), "SpriteImage");
19016
19016
  q[K] = ce.getImage(ae, D);
19017
19017
  }
19018
- return yield Promise.all([...Object.values(B), ...Object.values(q)]), function(K, J) {
19018
+ return yield Promise.all([...Object.values(N), ...Object.values(q)]), function(K, J) {
19019
19019
  return a._(this, void 0, void 0, function* () {
19020
19020
  const ne = {};
19021
19021
  for (const ae in K) {
@@ -19028,7 +19028,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19028
19028
  }
19029
19029
  return ne;
19030
19030
  });
19031
- }(B, q);
19031
+ }(N, q);
19032
19032
  });
19033
19033
  }(s, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((v) => {
19034
19034
  if (this._spriteRequest = null, v) for (const C in v) {
@@ -19378,7 +19378,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19378
19378
  f[A] = C;
19379
19379
  for (const D of s) {
19380
19380
  const R = D[A];
19381
- if (R) for (const F of R) m.push(F);
19381
+ if (R) for (const B of R) m.push(B);
19382
19382
  }
19383
19383
  }
19384
19384
  }
@@ -19393,7 +19393,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19393
19393
  }
19394
19394
  else for (const D of s) {
19395
19395
  const R = D[A];
19396
- if (R) for (const F of R) v.push(F.feature);
19396
+ if (R) for (const B of R) v.push(B.feature);
19397
19397
  }
19398
19398
  }
19399
19399
  return v;
@@ -19413,12 +19413,12 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19413
19413
  d.availableImages = this._availableImages;
19414
19414
  const C = this._serializedAllLayers();
19415
19415
  for (const A in this.sourceCaches) d.layers && !m[A] || v.push(Rt(this.sourceCaches[A], this._layers, C, s, d, f));
19416
- return this.placement && v.push(function(A, D, R, F, B, q, K) {
19417
- const J = {}, ne = q.queryRenderedSymbols(F), ae = [];
19416
+ return this.placement && v.push(function(A, D, R, B, N, q, K) {
19417
+ const J = {}, ne = q.queryRenderedSymbols(B), ae = [];
19418
19418
  for (const le of Object.keys(ne).map(Number)) ae.push(K[le]);
19419
19419
  ae.sort(Dt);
19420
19420
  for (const le of ae) {
19421
- const he = le.featureIndex.lookupSymbolFeatures(ne[le.bucketInstanceId], D, le.bucketIndex, le.sourceLayerIndex, B.filter, B.layers, B.availableImages, A);
19421
+ const he = le.featureIndex.lookupSymbolFeatures(ne[le.bucketInstanceId], D, le.bucketIndex, le.sourceLayerIndex, N.filter, N.layers, N.availableImages, A);
19422
19422
  for (const ee in he) {
19423
19423
  const me = J[ee] = J[ee] || [], ge = he[ee];
19424
19424
  ge.sort((be, Re) => {
@@ -19445,8 +19445,8 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19445
19445
  return f ? function(m, v) {
19446
19446
  const C = m.getRenderableIds().map((R) => m.getTileByID(R)), A = [], D = {};
19447
19447
  for (let R = 0; R < C.length; R++) {
19448
- const F = C[R], B = F.tileID.canonical.key;
19449
- D[B] || (D[B] = !0, F.querySourceFeatures(A, v));
19448
+ const B = C[R], N = B.tileID.canonical.key;
19449
+ D[N] || (D[N] = !0, B.querySourceFeatures(A, v));
19450
19450
  }
19451
19451
  return A;
19452
19452
  }(f, d) : [];
@@ -19512,18 +19512,18 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
19512
19512
  let C = !1, A = !1;
19513
19513
  const D = {};
19514
19514
  for (const R of this._order) {
19515
- const F = this._layers[R];
19516
- if (F.type !== "symbol") continue;
19517
- if (!D[F.source]) {
19518
- const q = this.sourceCaches[F.source];
19519
- D[F.source] = q.getRenderableIds(!0).map((K) => q.getTileByID(K)).sort((K, J) => J.tileID.overscaledZ - K.tileID.overscaledZ || (K.tileID.isLessThan(J.tileID) ? -1 : 1));
19515
+ const B = this._layers[R];
19516
+ if (B.type !== "symbol") continue;
19517
+ if (!D[B.source]) {
19518
+ const q = this.sourceCaches[B.source];
19519
+ D[B.source] = q.getRenderableIds(!0).map((K) => q.getTileByID(K)).sort((K, J) => J.tileID.overscaledZ - K.tileID.overscaledZ || (K.tileID.isLessThan(J.tileID) ? -1 : 1));
19520
19520
  }
19521
- const B = this.crossTileSymbolIndex.addLayer(F, D[F.source], s.center.lng);
19522
- C = C || B;
19521
+ const N = this.crossTileSymbolIndex.addLayer(B, D[B.source], s.center.lng);
19522
+ C = C || N;
19523
19523
  }
19524
19524
  if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((v = v || this._layerOrderChanged || f === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(k.now(), s.zoom)) && (this.pauseablePlacement = new kl(s, this.map.terrain, this._order, v, d, f, m, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, D), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(k.now()), A = !0), C && this.pauseablePlacement.placement.setStale()), A || C) for (const R of this._order) {
19525
- const F = this._layers[R];
19526
- F.type === "symbol" && this.placement.updateLayerOpacities(F, D[F.source]);
19525
+ const B = this._layers[R];
19526
+ B.type === "symbol" && this.placement.updateLayerOpacities(B, D[B.source]);
19527
19527
  }
19528
19528
  return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(k.now());
19529
19529
  }
@@ -20098,56 +20098,56 @@ camera_to_anchor_distance/u_camera_to_center_distance :
20098
20098
  u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`), terrain: gi("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"), terrainDepth: gi("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"), terrainCoords: gi("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"), sky: gi("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}", "attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}") };
20099
20099
  function gi(x, s) {
20100
20100
  const d = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, f = s.match(/attribute ([\w]+) ([\w]+)/g), m = x.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), v = s.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), C = v ? v.concat(m) : m, A = {};
20101
- return { fragmentSource: x = x.replace(d, (D, R, F, B, q) => (A[q] = !0, R === "define" ? `
20101
+ return { fragmentSource: x = x.replace(d, (D, R, B, N, q) => (A[q] = !0, R === "define" ? `
20102
20102
  #ifndef HAS_UNIFORM_u_${q}
20103
- varying ${F} ${B} ${q};
20103
+ varying ${B} ${N} ${q};
20104
20104
  #else
20105
- uniform ${F} ${B} u_${q};
20105
+ uniform ${B} ${N} u_${q};
20106
20106
  #endif
20107
20107
  ` : `
20108
20108
  #ifdef HAS_UNIFORM_u_${q}
20109
- ${F} ${B} ${q} = u_${q};
20109
+ ${B} ${N} ${q} = u_${q};
20110
20110
  #endif
20111
- `)), vertexSource: s = s.replace(d, (D, R, F, B, q) => {
20112
- const K = B === "float" ? "vec2" : "vec4", J = q.match(/color/) ? "color" : K;
20111
+ `)), vertexSource: s = s.replace(d, (D, R, B, N, q) => {
20112
+ const K = N === "float" ? "vec2" : "vec4", J = q.match(/color/) ? "color" : K;
20113
20113
  return A[q] ? R === "define" ? `
20114
20114
  #ifndef HAS_UNIFORM_u_${q}
20115
20115
  uniform lowp float u_${q}_t;
20116
- attribute ${F} ${K} a_${q};
20117
- varying ${F} ${B} ${q};
20116
+ attribute ${B} ${K} a_${q};
20117
+ varying ${B} ${N} ${q};
20118
20118
  #else
20119
- uniform ${F} ${B} u_${q};
20119
+ uniform ${B} ${N} u_${q};
20120
20120
  #endif
20121
20121
  ` : J === "vec4" ? `
20122
20122
  #ifndef HAS_UNIFORM_u_${q}
20123
20123
  ${q} = a_${q};
20124
20124
  #else
20125
- ${F} ${B} ${q} = u_${q};
20125
+ ${B} ${N} ${q} = u_${q};
20126
20126
  #endif
20127
20127
  ` : `
20128
20128
  #ifndef HAS_UNIFORM_u_${q}
20129
20129
  ${q} = unpack_mix_${J}(a_${q}, u_${q}_t);
20130
20130
  #else
20131
- ${F} ${B} ${q} = u_${q};
20131
+ ${B} ${N} ${q} = u_${q};
20132
20132
  #endif
20133
20133
  ` : R === "define" ? `
20134
20134
  #ifndef HAS_UNIFORM_u_${q}
20135
20135
  uniform lowp float u_${q}_t;
20136
- attribute ${F} ${K} a_${q};
20136
+ attribute ${B} ${K} a_${q};
20137
20137
  #else
20138
- uniform ${F} ${B} u_${q};
20138
+ uniform ${B} ${N} u_${q};
20139
20139
  #endif
20140
20140
  ` : J === "vec4" ? `
20141
20141
  #ifndef HAS_UNIFORM_u_${q}
20142
- ${F} ${B} ${q} = a_${q};
20142
+ ${B} ${N} ${q} = a_${q};
20143
20143
  #else
20144
- ${F} ${B} ${q} = u_${q};
20144
+ ${B} ${N} ${q} = u_${q};
20145
20145
  #endif
20146
20146
  ` : `
20147
20147
  #ifndef HAS_UNIFORM_u_${q}
20148
- ${F} ${B} ${q} = unpack_mix_${J}(a_${q}, u_${q}_t);
20148
+ ${B} ${N} ${q} = unpack_mix_${J}(a_${q}, u_${q}_t);
20149
20149
  #else
20150
- ${F} ${B} ${q} = u_${q};
20150
+ ${B} ${N} ${q} = u_${q};
20151
20151
  #endif
20152
20152
  `;
20153
20153
  }), staticAttributes: f, staticUniforms: C };
@@ -20158,17 +20158,17 @@ uniform ${F} ${B} u_${q};
20158
20158
  }
20159
20159
  bind(s, d, f, m, v, C, A, D, R) {
20160
20160
  this.context = s;
20161
- let F = this.boundPaintVertexBuffers.length !== m.length;
20162
- for (let B = 0; !F && B < m.length; B++) this.boundPaintVertexBuffers[B] !== m[B] && (F = !0);
20163
- !this.vao || this.boundProgram !== d || this.boundLayoutVertexBuffer !== f || F || this.boundIndexBuffer !== v || this.boundVertexOffset !== C || this.boundDynamicVertexBuffer !== A || this.boundDynamicVertexBuffer2 !== D || this.boundDynamicVertexBuffer3 !== R ? this.freshBind(d, f, m, v, C, A, D, R) : (s.bindVertexArray.set(this.vao), A && A.bind(), v && v.dynamicDraw && v.bind(), D && D.bind(), R && R.bind());
20161
+ let B = this.boundPaintVertexBuffers.length !== m.length;
20162
+ for (let N = 0; !B && N < m.length; N++) this.boundPaintVertexBuffers[N] !== m[N] && (B = !0);
20163
+ !this.vao || this.boundProgram !== d || this.boundLayoutVertexBuffer !== f || B || this.boundIndexBuffer !== v || this.boundVertexOffset !== C || this.boundDynamicVertexBuffer !== A || this.boundDynamicVertexBuffer2 !== D || this.boundDynamicVertexBuffer3 !== R ? this.freshBind(d, f, m, v, C, A, D, R) : (s.bindVertexArray.set(this.vao), A && A.bind(), v && v.dynamicDraw && v.bind(), D && D.bind(), R && R.bind());
20164
20164
  }
20165
20165
  freshBind(s, d, f, m, v, C, A, D) {
20166
- const R = s.numAttributes, F = this.context, B = F.gl;
20167
- this.vao && this.destroy(), this.vao = F.createVertexArray(), F.bindVertexArray.set(this.vao), this.boundProgram = s, this.boundLayoutVertexBuffer = d, this.boundPaintVertexBuffers = f, this.boundIndexBuffer = m, this.boundVertexOffset = v, this.boundDynamicVertexBuffer = C, this.boundDynamicVertexBuffer2 = A, this.boundDynamicVertexBuffer3 = D, d.enableAttributes(B, s);
20168
- for (const q of f) q.enableAttributes(B, s);
20169
- C && C.enableAttributes(B, s), A && A.enableAttributes(B, s), D && D.enableAttributes(B, s), d.bind(), d.setVertexAttribPointers(B, s, v);
20170
- for (const q of f) q.bind(), q.setVertexAttribPointers(B, s, v);
20171
- C && (C.bind(), C.setVertexAttribPointers(B, s, v)), m && m.bind(), A && (A.bind(), A.setVertexAttribPointers(B, s, v)), D && (D.bind(), D.setVertexAttribPointers(B, s, v)), F.currentNumAttributes = R;
20166
+ const R = s.numAttributes, B = this.context, N = B.gl;
20167
+ this.vao && this.destroy(), this.vao = B.createVertexArray(), B.bindVertexArray.set(this.vao), this.boundProgram = s, this.boundLayoutVertexBuffer = d, this.boundPaintVertexBuffers = f, this.boundIndexBuffer = m, this.boundVertexOffset = v, this.boundDynamicVertexBuffer = C, this.boundDynamicVertexBuffer2 = A, this.boundDynamicVertexBuffer3 = D, d.enableAttributes(N, s);
20168
+ for (const q of f) q.enableAttributes(N, s);
20169
+ C && C.enableAttributes(N, s), A && A.enableAttributes(N, s), D && D.enableAttributes(N, s), d.bind(), d.setVertexAttribPointers(N, s, v);
20170
+ for (const q of f) q.bind(), q.setVertexAttribPointers(N, s, v);
20171
+ C && (C.bind(), C.setVertexAttribPointers(N, s, v)), m && m.bind(), A && (A.bind(), A.setVertexAttribPointers(N, s, v)), D && (D.bind(), D.setVertexAttribPointers(N, s, v)), B.currentNumAttributes = R;
20172
20172
  }
20173
20173
  destroy() {
20174
20174
  this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null);
@@ -20188,7 +20188,7 @@ uniform ${F} ${B} u_${q};
20188
20188
  constructor(s, d, f, m, v, C) {
20189
20189
  const A = s.gl;
20190
20190
  this.program = A.createProgram();
20191
- const D = xa(d.staticAttributes), R = f ? f.getBinderAttributes() : [], F = D.concat(R), B = co.prelude.staticUniforms ? xa(co.prelude.staticUniforms) : [], q = d.staticUniforms ? xa(d.staticUniforms) : [], K = f ? f.getBinderUniforms() : [], J = B.concat(q).concat(K), ne = [];
20191
+ const D = xa(d.staticAttributes), R = f ? f.getBinderAttributes() : [], B = D.concat(R), N = co.prelude.staticUniforms ? xa(co.prelude.staticUniforms) : [], q = d.staticUniforms ? xa(d.staticUniforms) : [], K = f ? f.getBinderUniforms() : [], J = N.concat(q).concat(K), ne = [];
20192
20192
  for (const be of J) ne.indexOf(be) < 0 && ne.push(be);
20193
20193
  const ae = f ? f.defines() : [];
20194
20194
  v && ae.push("#define OVERDRAW_INSPECTOR;"), C && ae.push("#define TERRAIN3D;");
@@ -20203,8 +20203,8 @@ uniform ${F} ${B} u_${q};
20203
20203
  if (A.shaderSource(me, he), A.compileShader(me), !A.getShaderParameter(me, A.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${A.getShaderInfoLog(me)}`);
20204
20204
  A.attachShader(this.program, me), this.attributes = {};
20205
20205
  const ge = {};
20206
- this.numAttributes = F.length;
20207
- for (let be = 0; be < this.numAttributes; be++) F[be] && (A.bindAttribLocation(this.program, be, F[be]), this.attributes[F[be]] = be);
20206
+ this.numAttributes = B.length;
20207
+ for (let be = 0; be < this.numAttributes; be++) B[be] && (A.bindAttribLocation(this.program, be, B[be]), this.attributes[B[be]] = be);
20208
20208
  if (A.linkProgram(this.program), !A.getProgramParameter(this.program, A.LINK_STATUS)) throw new Error(`Program failed to link: ${A.getProgramInfoLog(this.program)}`);
20209
20209
  A.deleteShader(me), A.deleteShader(ee);
20210
20210
  for (let be = 0; be < ne.length; be++) {
@@ -20216,7 +20216,7 @@ uniform ${F} ${B} u_${q};
20216
20216
  }
20217
20217
  this.fixedUniforms = m(s, ge), this.terrainUniforms = ((be, Re) => ({ u_depth: new a.aH(be, Re.u_depth), u_terrain: new a.aH(be, Re.u_terrain), u_terrain_dim: new a.aI(be, Re.u_terrain_dim), u_terrain_matrix: new a.aJ(be, Re.u_terrain_matrix), u_terrain_unpack: new a.aK(be, Re.u_terrain_unpack), u_terrain_exaggeration: new a.aI(be, Re.u_terrain_exaggeration) }))(s, ge), this.binderUniforms = f ? f.getUniforms(s, ge) : [];
20218
20218
  }
20219
- draw(s, d, f, m, v, C, A, D, R, F, B, q, K, J, ne, ae, le, he) {
20219
+ draw(s, d, f, m, v, C, A, D, R, B, N, q, K, J, ne, ae, le, he) {
20220
20220
  const ee = s.gl;
20221
20221
  if (this.failedToCreate) return;
20222
20222
  if (s.program.set(this.program), s.setDepthMode(f), s.setStencilMode(m), s.setColorMode(v), s.setCullFace(C), D) {
@@ -20238,7 +20238,7 @@ uniform ${F} ${B} u_${q};
20238
20238
  }
20239
20239
  for (const ge of q.get()) {
20240
20240
  const be = ge.vaos || (ge.vaos = {});
20241
- (be[R] || (be[R] = new fh())).bind(s, this, F, ne ? ne.getPaintVertexBuffers() : [], B, ge.vertexOffset, ae, le, he), ee.drawElements(d, ge.primitiveLength * me, ee.UNSIGNED_SHORT, ge.primitiveOffset * me * 2);
20241
+ (be[R] || (be[R] = new fh())).bind(s, this, B, ne ? ne.getPaintVertexBuffers() : [], N, ge.vertexOffset, ae, le, he), ee.drawElements(d, ge.primitiveLength * me, ee.UNSIGNED_SHORT, ge.primitiveOffset * me * 2);
20242
20242
  }
20243
20243
  }
20244
20244
  }
@@ -20251,12 +20251,12 @@ uniform ${F} ${B} u_${q};
20251
20251
  var R = new a.A(9);
20252
20252
  return a.A != Float32Array && (R[1] = 0, R[2] = 0, R[3] = 0, R[5] = 0, R[6] = 0, R[7] = 0), R[0] = 1, R[4] = 1, R[8] = 1, R;
20253
20253
  }();
20254
- m.properties.get("anchor") === "viewport" && function(R, F) {
20255
- var B = Math.sin(F), q = Math.cos(F);
20256
- R[0] = q, R[1] = B, R[2] = 0, R[3] = -B, R[4] = q, R[5] = 0, R[6] = 0, R[7] = 0, R[8] = 1;
20257
- }(A, -s.transform.angle), function(R, F, B) {
20258
- var q = F[0], K = F[1], J = F[2];
20259
- R[0] = q * B[0] + K * B[3] + J * B[6], R[1] = q * B[1] + K * B[4] + J * B[7], R[2] = q * B[2] + K * B[5] + J * B[8];
20254
+ m.properties.get("anchor") === "viewport" && function(R, B) {
20255
+ var N = Math.sin(B), q = Math.cos(B);
20256
+ R[0] = q, R[1] = N, R[2] = 0, R[3] = -N, R[4] = q, R[5] = 0, R[6] = 0, R[7] = 0, R[8] = 1;
20257
+ }(A, -s.transform.angle), function(R, B, N) {
20258
+ var q = B[0], K = B[1], J = B[2];
20259
+ R[0] = q * N[0] + K * N[3] + J * N[6], R[1] = q * N[1] + K * N[4] + J * N[7], R[2] = q * N[2] + K * N[5] + J * N[8];
20260
20260
  }(C, C, A);
20261
20261
  const D = m.properties.get("color");
20262
20262
  return { u_matrix: x, u_lightpos: C, u_lightintensity: m.properties.get("intensity"), u_lightcolor: [D.r, D.g, D.b], u_vertical_gradient: +d, u_opacity: f };
@@ -20285,8 +20285,8 @@ uniform ${F} ${B} u_${q};
20285
20285
  const v = x.transform, C = Tp(s, v);
20286
20286
  return { u_matrix: Mp(x, s, d, m), u_texsize: s.imageAtlasTexture.size, u_ratio: 1 / Zt(s, 1, v.zoom), u_device_pixel_ratio: x.pixelRatio, u_image: 0, u_scale: [C, f.fromScale, f.toScale], u_fade: f.t, u_units_to_pixels: [1 / v.pixelsToGLUnits[0], 1 / v.pixelsToGLUnits[1]] };
20287
20287
  }, kg = (x, s, d, f, m, v) => {
20288
- const C = x.lineAtlas, A = Tp(s, x.transform), D = d.layout.get("line-cap") === "round", R = C.getDash(f.from, D), F = C.getDash(f.to, D), B = R.width * m.fromScale, q = F.width * m.toScale;
20289
- return a.e(Oc(x, s, d, v), { u_patternscale_a: [A / B, -R.height / 2], u_patternscale_b: [A / q, -F.height / 2], u_sdfgamma: C.width / (256 * Math.min(B, q) * x.pixelRatio) / 2, u_image: 0, u_tex_y_a: R.y, u_tex_y_b: F.y, u_mix: m.t });
20288
+ const C = x.lineAtlas, A = Tp(s, x.transform), D = d.layout.get("line-cap") === "round", R = C.getDash(f.from, D), B = C.getDash(f.to, D), N = R.width * m.fromScale, q = B.width * m.toScale;
20289
+ return a.e(Oc(x, s, d, v), { u_patternscale_a: [A / N, -R.height / 2], u_patternscale_b: [A / q, -B.height / 2], u_sdfgamma: C.width / (256 * Math.min(N, q) * x.pixelRatio) / 2, u_image: 0, u_tex_y_a: R.y, u_tex_y_b: B.y, u_mix: m.t });
20290
20290
  };
20291
20291
  function Tp(x, s) {
20292
20292
  return 1 / Zt(x, 1, s.tileZoom);
@@ -20303,15 +20303,15 @@ uniform ${F} ${B} u_${q};
20303
20303
  const s = Math.sin(x), d = Math.cos(x);
20304
20304
  return [(2 * d + 1) / 3, (-Math.sqrt(3) * s - d + 1) / 3, (Math.sqrt(3) * s - d + 1) / 3];
20305
20305
  }
20306
- const Cp = (x, s, d, f, m, v, C, A, D, R, F, B, q, K) => {
20306
+ const Cp = (x, s, d, f, m, v, C, A, D, R, B, N, q, K) => {
20307
20307
  const J = C.transform;
20308
- return { u_is_size_zoom_constant: +(x === "constant" || x === "source"), u_is_size_feature_constant: +(x === "constant" || x === "camera"), u_size_t: s ? s.uSizeT : 0, u_size: s ? s.uSize : 0, u_camera_to_center_distance: J.cameraToCenterDistance, u_pitch: J.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +d, u_aspect_ratio: J.width / J.height, u_fade_change: C.options.fadeDuration ? C.symbolFadeChange : 1, u_matrix: A, u_label_plane_matrix: D, u_coord_matrix: R, u_is_text: +B, u_pitch_with_map: +f, u_is_along_line: m, u_is_variable_anchor: v, u_texsize: q, u_texture: 0, u_translation: F, u_pitched_scale: K };
20309
- }, Cl = (x, s, d, f, m, v, C, A, D, R, F, B, q, K, J) => {
20308
+ return { u_is_size_zoom_constant: +(x === "constant" || x === "source"), u_is_size_feature_constant: +(x === "constant" || x === "camera"), u_size_t: s ? s.uSizeT : 0, u_size: s ? s.uSize : 0, u_camera_to_center_distance: J.cameraToCenterDistance, u_pitch: J.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +d, u_aspect_ratio: J.width / J.height, u_fade_change: C.options.fadeDuration ? C.symbolFadeChange : 1, u_matrix: A, u_label_plane_matrix: D, u_coord_matrix: R, u_is_text: +N, u_pitch_with_map: +f, u_is_along_line: m, u_is_variable_anchor: v, u_texsize: q, u_texture: 0, u_translation: B, u_pitched_scale: K };
20309
+ }, Cl = (x, s, d, f, m, v, C, A, D, R, B, N, q, K, J) => {
20310
20310
  const ne = C.transform;
20311
- return a.e(Cp(x, s, d, f, m, v, C, A, D, R, F, B, q, J), { u_gamma_scale: f ? Math.cos(ne._pitch) * ne.cameraToCenterDistance : 1, u_device_pixel_ratio: C.pixelRatio, u_is_halo: +K });
20312
- }, yh = (x, s, d, f, m, v, C, A, D, R, F, B, q, K) => a.e(Cl(x, s, d, f, m, v, C, A, D, R, F, !0, B, !0, K), { u_texsize_icon: q, u_texture_icon: 1 }), zc = (x, s, d) => ({ u_matrix: x, u_opacity: s, u_color: d }), _h = (x, s, d, f, m, v) => a.e(function(C, A, D, R) {
20313
- const F = D.imageManager.getPattern(C.from.toString()), B = D.imageManager.getPattern(C.to.toString()), { width: q, height: K } = D.imageManager.getPixelSize(), J = Math.pow(2, R.tileID.overscaledZ), ne = R.tileSize * Math.pow(2, D.transform.tileZoom) / J, ae = ne * (R.tileID.canonical.x + R.tileID.wrap * J), le = ne * R.tileID.canonical.y;
20314
- return { u_image: 0, u_pattern_tl_a: F.tl, u_pattern_br_a: F.br, u_pattern_tl_b: B.tl, u_pattern_br_b: B.br, u_texsize: [q, K], u_mix: A.t, u_pattern_size_a: F.displaySize, u_pattern_size_b: B.displaySize, u_scale_a: A.fromScale, u_scale_b: A.toScale, u_tile_units_to_pixels: 1 / Zt(R, 1, D.transform.tileZoom), u_pixel_coord_upper: [ae >> 16, le >> 16], u_pixel_coord_lower: [65535 & ae, 65535 & le] };
20311
+ return a.e(Cp(x, s, d, f, m, v, C, A, D, R, B, N, q, J), { u_gamma_scale: f ? Math.cos(ne._pitch) * ne.cameraToCenterDistance : 1, u_device_pixel_ratio: C.pixelRatio, u_is_halo: +K });
20312
+ }, yh = (x, s, d, f, m, v, C, A, D, R, B, N, q, K) => a.e(Cl(x, s, d, f, m, v, C, A, D, R, B, !0, N, !0, K), { u_texsize_icon: q, u_texture_icon: 1 }), zc = (x, s, d) => ({ u_matrix: x, u_opacity: s, u_color: d }), _h = (x, s, d, f, m, v) => a.e(function(C, A, D, R) {
20313
+ const B = D.imageManager.getPattern(C.from.toString()), N = D.imageManager.getPattern(C.to.toString()), { width: q, height: K } = D.imageManager.getPixelSize(), J = Math.pow(2, R.tileID.overscaledZ), ne = R.tileSize * Math.pow(2, D.transform.tileZoom) / J, ae = ne * (R.tileID.canonical.x + R.tileID.wrap * J), le = ne * R.tileID.canonical.y;
20314
+ return { u_image: 0, u_pattern_tl_a: B.tl, u_pattern_br_a: B.br, u_pattern_tl_b: N.tl, u_pattern_br_b: N.br, u_texsize: [q, K], u_mix: A.t, u_pattern_size_a: B.displaySize, u_pattern_size_b: N.displaySize, u_scale_a: A.fromScale, u_scale_b: A.toScale, u_tile_units_to_pixels: 1 / Zt(R, 1, D.transform.tileZoom), u_pixel_coord_upper: [ae >> 16, le >> 16], u_pixel_coord_lower: [65535 & ae, 65535 & le] };
20315
20315
  }(f, v, d, m), { u_matrix: x, u_opacity: s }), vh = { fillExtrusion: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_lightpos: new a.aN(x, s.u_lightpos), u_lightintensity: new a.aI(x, s.u_lightintensity), u_lightcolor: new a.aN(x, s.u_lightcolor), u_vertical_gradient: new a.aI(x, s.u_vertical_gradient), u_opacity: new a.aI(x, s.u_opacity) }), fillExtrusionPattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_lightpos: new a.aN(x, s.u_lightpos), u_lightintensity: new a.aI(x, s.u_lightintensity), u_lightcolor: new a.aN(x, s.u_lightcolor), u_vertical_gradient: new a.aI(x, s.u_vertical_gradient), u_height_factor: new a.aI(x, s.u_height_factor), u_image: new a.aH(x, s.u_image), u_texsize: new a.aO(x, s.u_texsize), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade), u_opacity: new a.aI(x, s.u_opacity) }), fill: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix) }), fillPattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_image: new a.aH(x, s.u_image), u_texsize: new a.aO(x, s.u_texsize), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade) }), fillOutline: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_world: new a.aO(x, s.u_world) }), fillOutlinePattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_world: new a.aO(x, s.u_world), u_image: new a.aH(x, s.u_image), u_texsize: new a.aO(x, s.u_texsize), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade) }), circle: (x, s) => ({ u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_scale_with_map: new a.aH(x, s.u_scale_with_map), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_extrude_scale: new a.aO(x, s.u_extrude_scale), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_matrix: new a.aJ(x, s.u_matrix) }), collisionBox: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_pixel_extrude_scale: new a.aO(x, s.u_pixel_extrude_scale) }), collisionCircle: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_inv_matrix: new a.aJ(x, s.u_inv_matrix), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_viewport_size: new a.aO(x, s.u_viewport_size) }), debug: (x, s) => ({ u_color: new a.aL(x, s.u_color), u_matrix: new a.aJ(x, s.u_matrix), u_overlay: new a.aH(x, s.u_overlay), u_overlay_scale: new a.aI(x, s.u_overlay_scale) }), clippingMask: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix) }), heatmap: (x, s) => ({ u_extrude_scale: new a.aI(x, s.u_extrude_scale), u_intensity: new a.aI(x, s.u_intensity), u_matrix: new a.aJ(x, s.u_matrix) }), heatmapTexture: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_world: new a.aO(x, s.u_world), u_image: new a.aH(x, s.u_image), u_color_ramp: new a.aH(x, s.u_color_ramp), u_opacity: new a.aI(x, s.u_opacity) }), hillshade: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_image: new a.aH(x, s.u_image), u_latrange: new a.aO(x, s.u_latrange), u_light: new a.aO(x, s.u_light), u_shadow: new a.aL(x, s.u_shadow), u_highlight: new a.aL(x, s.u_highlight), u_accent: new a.aL(x, s.u_accent) }), hillshadePrepare: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_image: new a.aH(x, s.u_image), u_dimension: new a.aO(x, s.u_dimension), u_zoom: new a.aI(x, s.u_zoom), u_unpack: new a.aK(x, s.u_unpack) }), line: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels) }), lineGradient: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels), u_image: new a.aH(x, s.u_image), u_image_height: new a.aI(x, s.u_image_height) }), linePattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_texsize: new a.aO(x, s.u_texsize), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_image: new a.aH(x, s.u_image), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels), u_scale: new a.aN(x, s.u_scale), u_fade: new a.aI(x, s.u_fade) }), lineSDF: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ratio: new a.aI(x, s.u_ratio), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_units_to_pixels: new a.aO(x, s.u_units_to_pixels), u_patternscale_a: new a.aO(x, s.u_patternscale_a), u_patternscale_b: new a.aO(x, s.u_patternscale_b), u_sdfgamma: new a.aI(x, s.u_sdfgamma), u_image: new a.aH(x, s.u_image), u_tex_y_a: new a.aI(x, s.u_tex_y_a), u_tex_y_b: new a.aI(x, s.u_tex_y_b), u_mix: new a.aI(x, s.u_mix) }), raster: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_tl_parent: new a.aO(x, s.u_tl_parent), u_scale_parent: new a.aI(x, s.u_scale_parent), u_buffer_scale: new a.aI(x, s.u_buffer_scale), u_fade_t: new a.aI(x, s.u_fade_t), u_opacity: new a.aI(x, s.u_opacity), u_image0: new a.aH(x, s.u_image0), u_image1: new a.aH(x, s.u_image1), u_brightness_low: new a.aI(x, s.u_brightness_low), u_brightness_high: new a.aI(x, s.u_brightness_high), u_saturation_factor: new a.aI(x, s.u_saturation_factor), u_contrast_factor: new a.aI(x, s.u_contrast_factor), u_spin_weights: new a.aN(x, s.u_spin_weights) }), symbolIcon: (x, s) => ({ u_is_size_zoom_constant: new a.aH(x, s.u_is_size_zoom_constant), u_is_size_feature_constant: new a.aH(x, s.u_is_size_feature_constant), u_size_t: new a.aI(x, s.u_size_t), u_size: new a.aI(x, s.u_size), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_pitch: new a.aI(x, s.u_pitch), u_rotate_symbol: new a.aH(x, s.u_rotate_symbol), u_aspect_ratio: new a.aI(x, s.u_aspect_ratio), u_fade_change: new a.aI(x, s.u_fade_change), u_matrix: new a.aJ(x, s.u_matrix), u_label_plane_matrix: new a.aJ(x, s.u_label_plane_matrix), u_coord_matrix: new a.aJ(x, s.u_coord_matrix), u_is_text: new a.aH(x, s.u_is_text), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_is_along_line: new a.aH(x, s.u_is_along_line), u_is_variable_anchor: new a.aH(x, s.u_is_variable_anchor), u_texsize: new a.aO(x, s.u_texsize), u_texture: new a.aH(x, s.u_texture), u_translation: new a.aO(x, s.u_translation), u_pitched_scale: new a.aI(x, s.u_pitched_scale) }), symbolSDF: (x, s) => ({ u_is_size_zoom_constant: new a.aH(x, s.u_is_size_zoom_constant), u_is_size_feature_constant: new a.aH(x, s.u_is_size_feature_constant), u_size_t: new a.aI(x, s.u_size_t), u_size: new a.aI(x, s.u_size), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_pitch: new a.aI(x, s.u_pitch), u_rotate_symbol: new a.aH(x, s.u_rotate_symbol), u_aspect_ratio: new a.aI(x, s.u_aspect_ratio), u_fade_change: new a.aI(x, s.u_fade_change), u_matrix: new a.aJ(x, s.u_matrix), u_label_plane_matrix: new a.aJ(x, s.u_label_plane_matrix), u_coord_matrix: new a.aJ(x, s.u_coord_matrix), u_is_text: new a.aH(x, s.u_is_text), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_is_along_line: new a.aH(x, s.u_is_along_line), u_is_variable_anchor: new a.aH(x, s.u_is_variable_anchor), u_texsize: new a.aO(x, s.u_texsize), u_texture: new a.aH(x, s.u_texture), u_gamma_scale: new a.aI(x, s.u_gamma_scale), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_is_halo: new a.aH(x, s.u_is_halo), u_translation: new a.aO(x, s.u_translation), u_pitched_scale: new a.aI(x, s.u_pitched_scale) }), symbolTextAndIcon: (x, s) => ({ u_is_size_zoom_constant: new a.aH(x, s.u_is_size_zoom_constant), u_is_size_feature_constant: new a.aH(x, s.u_is_size_feature_constant), u_size_t: new a.aI(x, s.u_size_t), u_size: new a.aI(x, s.u_size), u_camera_to_center_distance: new a.aI(x, s.u_camera_to_center_distance), u_pitch: new a.aI(x, s.u_pitch), u_rotate_symbol: new a.aH(x, s.u_rotate_symbol), u_aspect_ratio: new a.aI(x, s.u_aspect_ratio), u_fade_change: new a.aI(x, s.u_fade_change), u_matrix: new a.aJ(x, s.u_matrix), u_label_plane_matrix: new a.aJ(x, s.u_label_plane_matrix), u_coord_matrix: new a.aJ(x, s.u_coord_matrix), u_is_text: new a.aH(x, s.u_is_text), u_pitch_with_map: new a.aH(x, s.u_pitch_with_map), u_is_along_line: new a.aH(x, s.u_is_along_line), u_is_variable_anchor: new a.aH(x, s.u_is_variable_anchor), u_texsize: new a.aO(x, s.u_texsize), u_texsize_icon: new a.aO(x, s.u_texsize_icon), u_texture: new a.aH(x, s.u_texture), u_texture_icon: new a.aH(x, s.u_texture_icon), u_gamma_scale: new a.aI(x, s.u_gamma_scale), u_device_pixel_ratio: new a.aI(x, s.u_device_pixel_ratio), u_is_halo: new a.aH(x, s.u_is_halo), u_translation: new a.aO(x, s.u_translation), u_pitched_scale: new a.aI(x, s.u_pitched_scale) }), background: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_opacity: new a.aI(x, s.u_opacity), u_color: new a.aL(x, s.u_color) }), backgroundPattern: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_opacity: new a.aI(x, s.u_opacity), u_image: new a.aH(x, s.u_image), u_pattern_tl_a: new a.aO(x, s.u_pattern_tl_a), u_pattern_br_a: new a.aO(x, s.u_pattern_br_a), u_pattern_tl_b: new a.aO(x, s.u_pattern_tl_b), u_pattern_br_b: new a.aO(x, s.u_pattern_br_b), u_texsize: new a.aO(x, s.u_texsize), u_mix: new a.aI(x, s.u_mix), u_pattern_size_a: new a.aO(x, s.u_pattern_size_a), u_pattern_size_b: new a.aO(x, s.u_pattern_size_b), u_scale_a: new a.aI(x, s.u_scale_a), u_scale_b: new a.aI(x, s.u_scale_b), u_pixel_coord_upper: new a.aO(x, s.u_pixel_coord_upper), u_pixel_coord_lower: new a.aO(x, s.u_pixel_coord_lower), u_tile_units_to_pixels: new a.aI(x, s.u_tile_units_to_pixels) }), terrain: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_texture: new a.aH(x, s.u_texture), u_ele_delta: new a.aI(x, s.u_ele_delta), u_fog_matrix: new a.aJ(x, s.u_fog_matrix), u_fog_color: new a.aL(x, s.u_fog_color), u_fog_ground_blend: new a.aI(x, s.u_fog_ground_blend), u_fog_ground_blend_opacity: new a.aI(x, s.u_fog_ground_blend_opacity), u_horizon_color: new a.aL(x, s.u_horizon_color), u_horizon_fog_blend: new a.aI(x, s.u_horizon_fog_blend) }), terrainDepth: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_ele_delta: new a.aI(x, s.u_ele_delta) }), terrainCoords: (x, s) => ({ u_matrix: new a.aJ(x, s.u_matrix), u_texture: new a.aH(x, s.u_texture), u_terrain_coords_id: new a.aI(x, s.u_terrain_coords_id), u_ele_delta: new a.aI(x, s.u_ele_delta) }), sky: (x, s) => ({ u_sky_color: new a.aL(x, s.u_sky_color), u_horizon_color: new a.aL(x, s.u_horizon_color), u_horizon: new a.aI(x, s.u_horizon), u_sky_horizon_blend: new a.aI(x, s.u_sky_horizon_blend) }) };
20316
20316
  class ks {
20317
20317
  constructor(s, d, f) {
@@ -20812,18 +20812,18 @@ uniform ${F} ${B} u_${q};
20812
20812
  let $o;
20813
20813
  function Al(x, s, d, f, m) {
20814
20814
  const v = x.context, C = v.gl, A = x.useProgram("collisionBox"), D = [];
20815
- let R = 0, F = 0;
20815
+ let R = 0, B = 0;
20816
20816
  for (let le = 0; le < f.length; le++) {
20817
20817
  const he = f[le], ee = s.getTile(he).getBucket(d);
20818
20818
  if (!ee) continue;
20819
20819
  const me = m ? ee.textCollisionBox : ee.iconCollisionBox, ge = ee.collisionCircleArray;
20820
20820
  if (ge.length > 0) {
20821
20821
  const be = a.H();
20822
- a.aQ(be, ee.placementInvProjMatrix, x.transform.glCoordMatrix), a.aQ(be, be, ee.placementViewportMatrix), D.push({ circleArray: ge, circleOffset: F, transform: he.posMatrix, invTransform: be, coord: he }), R += ge.length / 4, F = R;
20822
+ a.aQ(be, ee.placementInvProjMatrix, x.transform.glCoordMatrix), a.aQ(be, be, ee.placementViewportMatrix), D.push({ circleArray: ge, circleOffset: B, transform: he.posMatrix, invTransform: be, coord: he }), R += ge.length / 4, B = R;
20823
20823
  }
20824
- me && A.draw(v, C.LINES, Wt.disabled, Li.disabled, x.colorModeForRenderPass(), Ei.disabled, { u_matrix: he.posMatrix, u_pixel_extrude_scale: [1 / (B = x.transform).width, 1 / B.height] }, x.style.map.terrain && x.style.map.terrain.getTerrainData(he), d.id, me.layoutVertexBuffer, me.indexBuffer, me.segments, null, x.transform.zoom, null, null, me.collisionVertexBuffer);
20824
+ me && A.draw(v, C.LINES, Wt.disabled, Li.disabled, x.colorModeForRenderPass(), Ei.disabled, { u_matrix: he.posMatrix, u_pixel_extrude_scale: [1 / (N = x.transform).width, 1 / N.height] }, x.style.map.terrain && x.style.map.terrain.getTerrainData(he), d.id, me.layoutVertexBuffer, me.indexBuffer, me.segments, null, x.transform.zoom, null, null, me.collisionVertexBuffer);
20825
20825
  }
20826
- var B;
20826
+ var N;
20827
20827
  if (!m || !D.length) return;
20828
20828
  const q = x.useProgram("collisionCircle"), K = new a.aR();
20829
20829
  K.resize(4 * R), K._trim();
@@ -20868,16 +20868,16 @@ uniform ${F} ${B} u_${q};
20868
20868
  }
20869
20869
  return x.add(f);
20870
20870
  }
20871
- function ka(x, s, d, f, m, v, C, A, D, R, F, B, q, K) {
20871
+ function ka(x, s, d, f, m, v, C, A, D, R, B, N, q, K) {
20872
20872
  const J = x.text.placedSymbolArray, ne = x.text.dynamicLayoutVertexArray, ae = x.icon.dynamicLayoutVertexArray, le = {};
20873
20873
  ne.clear();
20874
20874
  for (let he = 0; he < J.length; he++) {
20875
20875
  const ee = J.get(he), me = ee.hidden || !ee.crossTileID || x.allowVerticalPlacement && !ee.placedOrientation ? null : f[ee.crossTileID];
20876
20876
  if (me) {
20877
- const ge = new a.P(ee.anchorX, ee.anchorY), be = { getElevation: K, width: m.width, height: m.height, labelPlaneMatrix: v, lineVertexArray: null, pitchWithMap: d, projection: F, projectionCache: null, tileAnchorPoint: ge, translation: B, unwrappedTileID: q }, Re = d ? re(ge.x, ge.y, C, K) : Ae(ge.x, ge.y, be), $e = U(m.cameraToCenterDistance, Re.signedDistanceFromCamera);
20877
+ const ge = new a.P(ee.anchorX, ee.anchorY), be = { getElevation: K, width: m.width, height: m.height, labelPlaneMatrix: v, lineVertexArray: null, pitchWithMap: d, projection: B, projectionCache: null, tileAnchorPoint: ge, translation: N, unwrappedTileID: q }, Re = d ? re(ge.x, ge.y, C, K) : Ae(ge.x, ge.y, be), $e = U(m.cameraToCenterDistance, Re.signedDistanceFromCamera);
20878
20878
  let Je = a.ai(x.textSizeData, D, ee) * $e / a.ap;
20879
20879
  d && (Je *= x.tilePixelRatio / A);
20880
- const { width: rt, height: Ge, anchor: He, textOffset: pt, textBoxScale: Lt } = me, Ze = Eh(He, rt, Ge, pt, Lt, Je), it = F.getPitchedTextCorrection(m, ge.add(new a.P(B[0], B[1])), q), Ot = Vo(Re.point, be, s, Ze, m.angle, it), Vi = x.allowVerticalPlacement && ee.placedOrientation === a.ah.vertical ? Math.PI / 2 : 0;
20880
+ const { width: rt, height: Ge, anchor: He, textOffset: pt, textBoxScale: Lt } = me, Ze = Eh(He, rt, Ge, pt, Lt, Je), it = B.getPitchedTextCorrection(m, ge.add(new a.P(N[0], N[1])), q), Ot = Vo(Re.point, be, s, Ze, m.angle, it), Vi = x.allowVerticalPlacement && ee.placedOrientation === a.ah.vertical ? Math.PI / 2 : 0;
20881
20881
  for (let Vt = 0; Vt < ee.numGlyphs; Vt++) a.aj(ne, Ot, Vi);
20882
20882
  R && ee.associatedIconIndex >= 0 && (le[ee.associatedIconIndex] = { shiftedAnchor: Ot, angle: Vi });
20883
20883
  } else kt(ee.numGlyphs, ne);
@@ -20901,7 +20901,7 @@ uniform ${F} ${B} u_${q};
20901
20901
  function Lr(x, s, d) {
20902
20902
  return d.iconsInText && s ? "symbolTextAndIcon" : x ? "symbolSDF" : "symbolIcon";
20903
20903
  }
20904
- function Ah(x, s, d, f, m, v, C, A, D, R, F, B) {
20904
+ function Ah(x, s, d, f, m, v, C, A, D, R, B, N) {
20905
20905
  const q = x.context, K = q.gl, J = x.transform, ne = zo(), ae = A === "map", le = D === "map", he = A !== "viewport" && d.layout.get("symbol-placement") !== "point", ee = ae && !le && !he, me = !le && he, ge = !d.layout.get("symbol-sort-key").isConstant();
20906
20906
  let be = !1;
20907
20907
  const Re = x.depthModeForSublayer(0, Wt.ReadOnly), $e = d._unevaluatedLayout.hasValue("text-variable-anchor") || d._unevaluatedLayout.hasValue("text-variable-anchor-offset"), Je = [], rt = ne.getCircleRadiusCorrection(J);
@@ -20937,23 +20937,23 @@ uniform ${F} ${B} u_${q};
20937
20937
  const He = Ge.state;
20938
20938
  if (q.activeTexture.set(K.TEXTURE0), He.atlasTexture.bind(He.atlasInterpolation, K.CLAMP_TO_EDGE), He.atlasTextureIcon && (q.activeTexture.set(K.TEXTURE1), He.atlasTextureIcon && He.atlasTextureIcon.bind(He.atlasInterpolationIcon, K.CLAMP_TO_EDGE)), He.isSDF) {
20939
20939
  const pt = He.uniformValues;
20940
- He.hasHalo && (pt.u_is_halo = 1, Ph(He.buffers, Ge.segments, d, x, He.program, Re, F, B, pt, Ge.terrainData)), pt.u_is_halo = 0;
20940
+ He.hasHalo && (pt.u_is_halo = 1, Ph(He.buffers, Ge.segments, d, x, He.program, Re, B, N, pt, Ge.terrainData)), pt.u_is_halo = 0;
20941
20941
  }
20942
- Ph(He.buffers, Ge.segments, d, x, He.program, Re, F, B, He.uniformValues, Ge.terrainData);
20942
+ Ph(He.buffers, Ge.segments, d, x, He.program, Re, B, N, He.uniformValues, Ge.terrainData);
20943
20943
  }
20944
20944
  }
20945
20945
  function Ph(x, s, d, f, m, v, C, A, D, R) {
20946
- const F = f.context;
20947
- m.draw(F, F.gl.TRIANGLES, v, C, A, Ei.disabled, D, R, d.id, x.layoutVertexBuffer, x.indexBuffer, s, d.paint, f.transform.zoom, x.programConfigurations.get(d.id), x.dynamicLayoutVertexBuffer, x.opacityVertexBuffer);
20946
+ const B = f.context;
20947
+ m.draw(B, B.gl.TRIANGLES, v, C, A, Ei.disabled, D, R, d.id, x.layoutVertexBuffer, x.indexBuffer, s, d.paint, f.transform.zoom, x.programConfigurations.get(d.id), x.dynamicLayoutVertexBuffer, x.opacityVertexBuffer);
20948
20948
  }
20949
20949
  function Ih(x, s, d, f) {
20950
20950
  const m = x.context, v = m.gl, C = Li.disabled, A = new sn([v.ONE, v.ONE], a.aM.transparent, [!0, !0, !0, !0]), D = s.getBucket(d);
20951
20951
  if (!D) return;
20952
20952
  const R = f.key;
20953
- let F = d.heatmapFbos.get(R);
20954
- F || (F = Il(m, s.tileSize, s.tileSize), d.heatmapFbos.set(R, F)), m.bindFramebuffer.set(F.framebuffer), m.viewport.set([0, 0, s.tileSize, s.tileSize]), m.clear({ color: a.aM.transparent });
20955
- const B = D.programConfigurations.get(d.id), q = x.useProgram("heatmap", B), K = x.style.map.terrain.getTerrainData(f);
20956
- q.draw(m, v.TRIANGLES, Wt.disabled, C, A, Ei.disabled, ar(f.posMatrix, s, x.transform.zoom, d.paint.get("heatmap-intensity")), K, d.id, D.layoutVertexBuffer, D.indexBuffer, D.segments, d.paint, x.transform.zoom, B);
20953
+ let B = d.heatmapFbos.get(R);
20954
+ B || (B = Il(m, s.tileSize, s.tileSize), d.heatmapFbos.set(R, B)), m.bindFramebuffer.set(B.framebuffer), m.viewport.set([0, 0, s.tileSize, s.tileSize]), m.clear({ color: a.aM.transparent });
20955
+ const N = D.programConfigurations.get(d.id), q = x.useProgram("heatmap", N), K = x.style.map.terrain.getTerrainData(f);
20956
+ q.draw(m, v.TRIANGLES, Wt.disabled, C, A, Ei.disabled, ar(f.posMatrix, s, x.transform.zoom, d.paint.get("heatmap-intensity")), K, d.id, D.layoutVertexBuffer, D.indexBuffer, D.segments, d.paint, x.transform.zoom, N);
20957
20957
  }
20958
20958
  function jo(x, s, d) {
20959
20959
  const f = x.context, m = f.gl;
@@ -20984,57 +20984,57 @@ uniform ${F} ${B} u_${q};
20984
20984
  C && A && x.setConstantPatternPositions(C, A);
20985
20985
  }
20986
20986
  function Ol(x, s, d, f, m, v, C) {
20987
- const A = x.context.gl, D = "fill-pattern", R = d.paint.get(D), F = R && R.constantOr(1), B = d.getCrossfadeParameters();
20987
+ const A = x.context.gl, D = "fill-pattern", R = d.paint.get(D), B = R && R.constantOr(1), N = d.getCrossfadeParameters();
20988
20988
  let q, K, J, ne, ae;
20989
- C ? (K = F && !d.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", q = A.LINES) : (K = F ? "fillPattern" : "fill", q = A.TRIANGLES);
20989
+ C ? (K = B && !d.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", q = A.LINES) : (K = B ? "fillPattern" : "fill", q = A.TRIANGLES);
20990
20990
  const le = R.constantOr(null);
20991
20991
  for (const he of f) {
20992
20992
  const ee = s.getTile(he);
20993
- if (F && !ee.patternsLoaded()) continue;
20993
+ if (B && !ee.patternsLoaded()) continue;
20994
20994
  const me = ee.getBucket(d);
20995
20995
  if (!me) continue;
20996
20996
  const ge = me.programConfigurations.get(d.id), be = x.useProgram(K, ge), Re = x.style.map.terrain && x.style.map.terrain.getTerrainData(he);
20997
- F && (x.context.activeTexture.set(A.TEXTURE0), ee.imageAtlasTexture.bind(A.LINEAR, A.CLAMP_TO_EDGE), ge.updatePaintBuffers(B)), Ta(ge, D, le, ee, d);
20997
+ B && (x.context.activeTexture.set(A.TEXTURE0), ee.imageAtlasTexture.bind(A.LINEAR, A.CLAMP_TO_EDGE), ge.updatePaintBuffers(N)), Ta(ge, D, le, ee, d);
20998
20998
  const $e = Re ? he : null, Je = x.translatePosMatrix($e ? $e.posMatrix : he.posMatrix, ee, d.paint.get("fill-translate"), d.paint.get("fill-translate-anchor"));
20999
20999
  if (C) {
21000
21000
  ne = me.indexBuffer2, ae = me.segments2;
21001
21001
  const rt = [A.drawingBufferWidth, A.drawingBufferHeight];
21002
- J = K === "fillOutlinePattern" && F ? Sp(Je, x, B, ee, rt) : wg(Je, rt);
21003
- } else ne = me.indexBuffer, ae = me.segments, J = F ? wp(Je, x, B, ee) : ba(Je);
21002
+ J = K === "fillOutlinePattern" && B ? Sp(Je, x, N, ee, rt) : wg(Je, rt);
21003
+ } else ne = me.indexBuffer, ae = me.segments, J = B ? wp(Je, x, N, ee) : ba(Je);
21004
21004
  be.draw(x.context, q, m, x.stencilModeForClipping(he), v, Ei.disabled, J, Re, d.id, me.layoutVertexBuffer, ne, ae, d.paint, x.transform.zoom, ge);
21005
21005
  }
21006
21006
  }
21007
21007
  function $c(x, s, d, f, m, v, C) {
21008
- const A = x.context, D = A.gl, R = "fill-extrusion-pattern", F = d.paint.get(R), B = F.constantOr(1), q = d.getCrossfadeParameters(), K = d.paint.get("fill-extrusion-opacity"), J = F.constantOr(null);
21008
+ const A = x.context, D = A.gl, R = "fill-extrusion-pattern", B = d.paint.get(R), N = B.constantOr(1), q = d.getCrossfadeParameters(), K = d.paint.get("fill-extrusion-opacity"), J = B.constantOr(null);
21009
21009
  for (const ne of f) {
21010
21010
  const ae = s.getTile(ne), le = ae.getBucket(d);
21011
21011
  if (!le) continue;
21012
- const he = x.style.map.terrain && x.style.map.terrain.getTerrainData(ne), ee = le.programConfigurations.get(d.id), me = x.useProgram(B ? "fillExtrusionPattern" : "fillExtrusion", ee);
21013
- B && (x.context.activeTexture.set(D.TEXTURE0), ae.imageAtlasTexture.bind(D.LINEAR, D.CLAMP_TO_EDGE), ee.updatePaintBuffers(q)), Ta(ee, R, J, ae, d);
21014
- const ge = x.translatePosMatrix(ne.posMatrix, ae, d.paint.get("fill-extrusion-translate"), d.paint.get("fill-extrusion-translate-anchor")), be = d.paint.get("fill-extrusion-vertical-gradient"), Re = B ? Pc(ge, x, be, K, ne, q, ae) : Tl(ge, x, be, K);
21012
+ const he = x.style.map.terrain && x.style.map.terrain.getTerrainData(ne), ee = le.programConfigurations.get(d.id), me = x.useProgram(N ? "fillExtrusionPattern" : "fillExtrusion", ee);
21013
+ N && (x.context.activeTexture.set(D.TEXTURE0), ae.imageAtlasTexture.bind(D.LINEAR, D.CLAMP_TO_EDGE), ee.updatePaintBuffers(q)), Ta(ee, R, J, ae, d);
21014
+ const ge = x.translatePosMatrix(ne.posMatrix, ae, d.paint.get("fill-extrusion-translate"), d.paint.get("fill-extrusion-translate-anchor")), be = d.paint.get("fill-extrusion-vertical-gradient"), Re = N ? Pc(ge, x, be, K, ne, q, ae) : Tl(ge, x, be, K);
21015
21015
  me.draw(A, A.gl.TRIANGLES, m, v, C, Ei.backCCW, Re, he, d.id, le.layoutVertexBuffer, le.indexBuffer, le.segments, d.paint, x.transform.zoom, ee, x.style.map.terrain && le.centroidVertexBuffer);
21016
21016
  }
21017
21017
  }
21018
21018
  function Ma(x, s, d, f, m, v, C) {
21019
21019
  const A = x.context, D = A.gl, R = d.fbo;
21020
21020
  if (!R) return;
21021
- const F = x.useProgram("hillshade"), B = x.style.map.terrain && x.style.map.terrain.getTerrainData(s);
21022
- A.activeTexture.set(D.TEXTURE0), D.bindTexture(D.TEXTURE_2D, R.colorAttachment.get()), F.draw(A, D.TRIANGLES, m, v, C, Ei.disabled, ((q, K, J, ne) => {
21021
+ const B = x.useProgram("hillshade"), N = x.style.map.terrain && x.style.map.terrain.getTerrainData(s);
21022
+ A.activeTexture.set(D.TEXTURE0), D.bindTexture(D.TEXTURE_2D, R.colorAttachment.get()), B.draw(A, D.TRIANGLES, m, v, C, Ei.disabled, ((q, K, J, ne) => {
21023
21023
  const ae = J.paint.get("hillshade-shadow-color"), le = J.paint.get("hillshade-highlight-color"), he = J.paint.get("hillshade-accent-color");
21024
21024
  let ee = J.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
21025
21025
  J.paint.get("hillshade-illumination-anchor") === "viewport" && (ee -= q.transform.angle);
21026
21026
  const me = !q.options.moving;
21027
21027
  return { u_matrix: ne ? ne.posMatrix : q.transform.calculatePosMatrix(K.tileID.toUnwrapped(), me), u_image: 0, u_latrange: Dc(0, K.tileID), u_light: [J.paint.get("hillshade-exaggeration"), ee], u_shadow: ae, u_highlight: le, u_accent: he };
21028
- })(x, d, f, B ? s : null), B, f.id, x.rasterBoundsBuffer, x.quadTriangleIndexBuffer, x.rasterBoundsSegments);
21028
+ })(x, d, f, N ? s : null), N, f.id, x.rasterBoundsBuffer, x.quadTriangleIndexBuffer, x.rasterBoundsSegments);
21029
21029
  }
21030
21030
  function Ca(x, s, d, f, m, v) {
21031
21031
  const C = x.context, A = C.gl, D = s.dem;
21032
21032
  if (D && D.data) {
21033
- const R = D.dim, F = D.stride, B = D.getPixels();
21034
- if (C.activeTexture.set(A.TEXTURE1), C.pixelStoreUnpackPremultiplyAlpha.set(!1), s.demTexture = s.demTexture || x.getTileTexture(F), s.demTexture) {
21033
+ const R = D.dim, B = D.stride, N = D.getPixels();
21034
+ if (C.activeTexture.set(A.TEXTURE1), C.pixelStoreUnpackPremultiplyAlpha.set(!1), s.demTexture = s.demTexture || x.getTileTexture(B), s.demTexture) {
21035
21035
  const K = s.demTexture;
21036
- K.update(B, { premultiply: !1 }), K.bind(A.NEAREST, A.CLAMP_TO_EDGE);
21037
- } else s.demTexture = new lt(C, B, A.RGBA, { premultiply: !1 }), s.demTexture.bind(A.NEAREST, A.CLAMP_TO_EDGE);
21036
+ K.update(N, { premultiply: !1 }), K.bind(A.NEAREST, A.CLAMP_TO_EDGE);
21037
+ } else s.demTexture = new lt(C, N, A.RGBA, { premultiply: !1 }), s.demTexture.bind(A.NEAREST, A.CLAMP_TO_EDGE);
21038
21038
  C.activeTexture.set(A.TEXTURE0);
21039
21039
  let q = s.fbo;
21040
21040
  if (!q) {
@@ -21050,7 +21050,7 @@ uniform ${F} ${B} u_${q};
21050
21050
  function $p(x, s, d, f, m, v) {
21051
21051
  const C = f.paint.get("raster-fade-duration");
21052
21052
  if (!v && C > 0) {
21053
- const A = k.now(), D = (A - x.timeAdded) / C, R = s ? (A - s.timeAdded) / C : -1, F = d.getSource(), B = m.coveringZoomLevel({ tileSize: F.tileSize, roundZoom: F.roundZoom }), q = !s || Math.abs(s.tileID.overscaledZ - B) > Math.abs(x.tileID.overscaledZ - B), K = q && x.refreshedUponExpiration ? 1 : a.ac(q ? D : 1 - R, 0, 1);
21053
+ const A = k.now(), D = (A - x.timeAdded) / C, R = s ? (A - s.timeAdded) / C : -1, B = d.getSource(), N = m.coveringZoomLevel({ tileSize: B.tileSize, roundZoom: B.roundZoom }), q = !s || Math.abs(s.tileID.overscaledZ - N) > Math.abs(x.tileID.overscaledZ - N), K = q && x.refreshedUponExpiration ? 1 : a.ac(q ? D : 1 - R, 0, 1);
21054
21054
  return x.refreshedUponExpiration && D >= 1 && (x.refreshedUponExpiration = !1), s ? { opacity: 1, mix: 1 - K } : { opacity: K, mix: 0 };
21055
21055
  }
21056
21056
  return { opacity: 1, mix: 0 };
@@ -21067,7 +21067,7 @@ uniform ${F} ${B} u_${q};
21067
21067
  A.enable(A.SCISSOR_TEST), A.scissor(s * x.pixelRatio, d * x.pixelRatio, f * x.pixelRatio, m * x.pixelRatio), C.clear({ color: v }), A.disable(A.SCISSOR_TEST);
21068
21068
  }
21069
21069
  function Up(x, s, d) {
21070
- const f = x.context, m = f.gl, v = d.posMatrix, C = x.useProgram("debug"), A = Wt.disabled, D = Li.disabled, R = x.colorModeForRenderPass(), F = "$debug", B = x.style.map.terrain && x.style.map.terrain.getTerrainData(d);
21070
+ const f = x.context, m = f.gl, v = d.posMatrix, C = x.useProgram("debug"), A = Wt.disabled, D = Li.disabled, R = x.colorModeForRenderPass(), B = "$debug", N = x.style.map.terrain && x.style.map.terrain.getTerrainData(d);
21071
21071
  f.activeTexture.set(m.TEXTURE0);
21072
21072
  const q = s.getTileByID(d.key).latestRawTileData, K = Math.floor((q && q.byteLength || 0) / 1024), J = s.getTile(d).tileSize, ne = 512 / Math.min(J, 512) * (d.overscaledZ / x.transform.zoom) * 0.5;
21073
21073
  let ae = d.canonical.toString();
@@ -21075,16 +21075,16 @@ uniform ${F} ${B} u_${q};
21075
21075
  le.initDebugOverlayCanvas();
21076
21076
  const ee = le.debugOverlayCanvas, me = le.context.gl, ge = le.debugOverlayCanvas.getContext("2d");
21077
21077
  ge.clearRect(0, 0, ee.width, ee.height), ge.shadowColor = "white", ge.shadowBlur = 2, ge.lineWidth = 1.5, ge.strokeStyle = "white", ge.textBaseline = "top", ge.font = "bold 36px Open Sans, sans-serif", ge.fillText(he, 5, 5), ge.strokeText(he, 5, 5), le.debugOverlayTexture.update(ee), le.debugOverlayTexture.bind(me.LINEAR, me.CLAMP_TO_EDGE);
21078
- }(x, `${ae} ${K}kB`), C.draw(f, m.TRIANGLES, A, D, sn.alphaBlended, Ei.disabled, Ml(v, a.aM.transparent, ne), null, F, x.debugBuffer, x.quadTriangleIndexBuffer, x.debugSegments), C.draw(f, m.LINE_STRIP, A, D, R, Ei.disabled, Ml(v, a.aM.red), B, F, x.debugBuffer, x.tileBorderIndexBuffer, x.debugSegments);
21078
+ }(x, `${ae} ${K}kB`), C.draw(f, m.TRIANGLES, A, D, sn.alphaBlended, Ei.disabled, Ml(v, a.aM.transparent, ne), null, B, x.debugBuffer, x.quadTriangleIndexBuffer, x.debugSegments), C.draw(f, m.LINE_STRIP, A, D, R, Ei.disabled, Ml(v, a.aM.red), N, B, x.debugBuffer, x.tileBorderIndexBuffer, x.debugSegments);
21079
21079
  }
21080
21080
  function Hp(x, s, d) {
21081
21081
  const f = x.context, m = f.gl, v = x.colorModeForRenderPass(), C = new Wt(m.LEQUAL, Wt.ReadWrite, x.depthRangeFor3D), A = x.useProgram("terrain"), D = s.getTerrainMesh();
21082
21082
  f.bindFramebuffer.set(null), f.viewport.set([0, 0, x.width, x.height]);
21083
21083
  for (const R of d) {
21084
- const F = x.renderToTexture.getTexture(R), B = s.getTerrainData(R.tileID);
21085
- f.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, F.texture);
21084
+ const B = x.renderToTexture.getTexture(R), N = s.getTerrainData(R.tileID);
21085
+ f.activeTexture.set(m.TEXTURE0), m.bindTexture(m.TEXTURE_2D, B.texture);
21086
21086
  const q = x.transform.calculatePosMatrix(R.tileID.toUnwrapped()), K = s.getMeshFrameDelta(x.transform.zoom), J = x.transform.calculateFogMatrix(R.tileID.toUnwrapped()), ne = mh(q, K, J, x.style.sky, x.transform.pitch);
21087
- A.draw(f, m.TRIANGLES, C, Li.disabled, v, Ei.backCCW, ne, B, "terrain", D.vertexBuffer, D.indexBuffer, D.segments);
21087
+ A.draw(f, m.TRIANGLES, C, Li.disabled, v, Ei.backCCW, ne, N, "terrain", D.vertexBuffer, D.indexBuffer, D.segments);
21088
21088
  }
21089
21089
  }
21090
21090
  class Uc {
@@ -21183,47 +21183,47 @@ uniform ${F} ${B} u_${q};
21183
21183
  for (const D of f) {
21184
21184
  const R = this.style._layers[D];
21185
21185
  if (!R.hasOffscreenPass() || R.isHidden(this.transform.zoom)) continue;
21186
- const F = C[R.source];
21187
- (R.type === "custom" || F.length) && this.renderLayer(this, m[R.source], R, F);
21186
+ const B = C[R.source];
21187
+ (R.type === "custom" || B.length) && this.renderLayer(this, m[R.source], R, B);
21188
21188
  }
21189
21189
  if (this.context.bindFramebuffer.set(null), this.context.clear({ color: d.showOverdrawInspector ? a.aM.black : a.aM.transparent, depth: 1 }), this.clearStencil(), this.style.sky && function(D, R) {
21190
- const F = D.context, B = F.gl, q = ((le, he, ee) => ({ u_sky_color: le.properties.get("sky-color"), u_horizon_color: le.properties.get("horizon-color"), u_horizon: (he.height / 2 + he.getHorizon()) * ee, u_sky_horizon_blend: le.properties.get("sky-horizon-blend") * he.height / 2 * ee }))(R, D.style.map.transform, D.pixelRatio), K = new Wt(B.LEQUAL, Wt.ReadWrite, [0, 1]), J = Li.disabled, ne = D.colorModeForRenderPass(), ae = D.useProgram("sky");
21190
+ const B = D.context, N = B.gl, q = ((le, he, ee) => ({ u_sky_color: le.properties.get("sky-color"), u_horizon_color: le.properties.get("horizon-color"), u_horizon: (he.height / 2 + he.getHorizon()) * ee, u_sky_horizon_blend: le.properties.get("sky-horizon-blend") * he.height / 2 * ee }))(R, D.style.map.transform, D.pixelRatio), K = new Wt(N.LEQUAL, Wt.ReadWrite, [0, 1]), J = Li.disabled, ne = D.colorModeForRenderPass(), ae = D.useProgram("sky");
21191
21191
  if (!R.mesh) {
21192
21192
  const le = new a.aX();
21193
21193
  le.emplaceBack(-1, -1), le.emplaceBack(1, -1), le.emplaceBack(1, 1), le.emplaceBack(-1, 1);
21194
21194
  const he = new a.aY();
21195
- he.emplaceBack(0, 1, 2), he.emplaceBack(0, 2, 3), R.mesh = new Uc(F.createVertexBuffer(le, Ro.members), F.createIndexBuffer(he), a.a0.simpleSegment(0, 0, le.length, he.length));
21195
+ he.emplaceBack(0, 1, 2), he.emplaceBack(0, 2, 3), R.mesh = new Uc(B.createVertexBuffer(le, Ro.members), B.createIndexBuffer(he), a.a0.simpleSegment(0, 0, le.length, he.length));
21196
21196
  }
21197
- ae.draw(F, B.TRIANGLES, K, J, ne, Ei.disabled, q, void 0, "sky", R.mesh.vertexBuffer, R.mesh.indexBuffer, R.mesh.segments);
21197
+ ae.draw(B, N.TRIANGLES, K, J, ne, Ei.disabled, q, void 0, "sky", R.mesh.vertexBuffer, R.mesh.indexBuffer, R.mesh.segments);
21198
21198
  }(this, this.style.sky), this._showOverdrawInspector = d.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (s._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = "opaque", this.currentLayer = f.length - 1; this.currentLayer >= 0; this.currentLayer--) {
21199
- const D = this.style._layers[f[this.currentLayer]], R = m[D.source], F = v[D.source];
21200
- this._renderTileClippingMasks(D, F), this.renderLayer(this, R, D, F);
21199
+ const D = this.style._layers[f[this.currentLayer]], R = m[D.source], B = v[D.source];
21200
+ this._renderTileClippingMasks(D, B), this.renderLayer(this, R, D, B);
21201
21201
  }
21202
21202
  for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < f.length; this.currentLayer++) {
21203
21203
  const D = this.style._layers[f[this.currentLayer]], R = m[D.source];
21204
21204
  if (this.renderToTexture && this.renderToTexture.renderLayer(D)) continue;
21205
- const F = (D.type === "symbol" ? A : C)[D.source];
21206
- this._renderTileClippingMasks(D, v[D.source]), this.renderLayer(this, R, D, F);
21205
+ const B = (D.type === "symbol" ? A : C)[D.source];
21206
+ this._renderTileClippingMasks(D, v[D.source]), this.renderLayer(this, R, D, B);
21207
21207
  }
21208
21208
  if (this.options.showTileBoundaries) {
21209
- const D = function(R, F) {
21210
- let B = null;
21211
- const q = Object.values(R._layers).flatMap((ae) => ae.source && !ae.isHidden(F) ? [R.sourceCaches[ae.source]] : []), K = q.filter((ae) => ae.getSource().type === "vector"), J = q.filter((ae) => ae.getSource().type !== "vector"), ne = (ae) => {
21212
- (!B || B.getSource().maxzoom < ae.getSource().maxzoom) && (B = ae);
21209
+ const D = function(R, B) {
21210
+ let N = null;
21211
+ const q = Object.values(R._layers).flatMap((ae) => ae.source && !ae.isHidden(B) ? [R.sourceCaches[ae.source]] : []), K = q.filter((ae) => ae.getSource().type === "vector"), J = q.filter((ae) => ae.getSource().type !== "vector"), ne = (ae) => {
21212
+ (!N || N.getSource().maxzoom < ae.getSource().maxzoom) && (N = ae);
21213
21213
  };
21214
- return K.forEach((ae) => ne(ae)), B || J.forEach((ae) => ne(ae)), B;
21214
+ return K.forEach((ae) => ne(ae)), N || J.forEach((ae) => ne(ae)), N;
21215
21215
  }(this.style, this.transform.zoom);
21216
- D && function(R, F, B) {
21217
- for (let q = 0; q < B.length; q++) Up(R, F, B[q]);
21216
+ D && function(R, B, N) {
21217
+ for (let q = 0; q < N.length; q++) Up(R, B, N[q]);
21218
21218
  }(this, D, D.getVisibleCoordinates());
21219
21219
  }
21220
21220
  this.options.showPadding && function(D) {
21221
21221
  const R = D.transform.padding;
21222
21222
  Ea(D, D.transform.height - (R.top || 0), 3, Dh), Ea(D, R.bottom || 0, 3, hi), jp(D, R.left || 0, 3, Vc), jp(D, D.transform.width - (R.right || 0), 3, Fg);
21223
- const F = D.transform.centerPoint;
21224
- (function(B, q, K, J) {
21225
- jc(B, q - 1, K - 10, 2, 20, J), jc(B, q - 10, K - 1, 20, 2, J);
21226
- })(D, F.x, D.transform.height - F.y, Vp);
21223
+ const B = D.transform.centerPoint;
21224
+ (function(N, q, K, J) {
21225
+ jc(N, q - 1, K - 10, 2, 20, J), jc(N, q - 10, K - 1, 20, 2, J);
21226
+ })(D, B.x, D.transform.height - B.y, Vp);
21227
21227
  }(this), this.context.setDefault();
21228
21228
  }
21229
21229
  maybeDrawDepthAndCoords(s) {
@@ -21231,21 +21231,21 @@ uniform ${F} ${B} u_${q};
21231
21231
  const d = this.terrainFacilitator.matrix, f = this.transform.modelViewProjectionMatrix;
21232
21232
  let m = this.terrainFacilitator.dirty;
21233
21233
  m || (m = s ? !a.a_(d, f) : !a.a$(d, f)), m || (m = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length > 0), m && (a.b0(d, f), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, function(v, C) {
21234
- const A = v.context, D = A.gl, R = sn.unblended, F = new Wt(D.LEQUAL, Wt.ReadWrite, [0, 1]), B = C.getTerrainMesh(), q = C.sourceCache.getRenderableTiles(), K = v.useProgram("terrainDepth");
21234
+ const A = v.context, D = A.gl, R = sn.unblended, B = new Wt(D.LEQUAL, Wt.ReadWrite, [0, 1]), N = C.getTerrainMesh(), q = C.sourceCache.getRenderableTiles(), K = v.useProgram("terrainDepth");
21235
21235
  A.bindFramebuffer.set(C.getFramebuffer("depth").framebuffer), A.viewport.set([0, 0, v.width / devicePixelRatio, v.height / devicePixelRatio]), A.clear({ color: a.aM.transparent, depth: 1 });
21236
21236
  for (const J of q) {
21237
21237
  const ne = C.getTerrainData(J.tileID), ae = { u_matrix: v.transform.calculatePosMatrix(J.tileID.toUnwrapped()), u_ele_delta: C.getMeshFrameDelta(v.transform.zoom) };
21238
- K.draw(A, D.TRIANGLES, F, Li.disabled, R, Ei.backCCW, ae, ne, "terrain", B.vertexBuffer, B.indexBuffer, B.segments);
21238
+ K.draw(A, D.TRIANGLES, B, Li.disabled, R, Ei.backCCW, ae, ne, "terrain", N.vertexBuffer, N.indexBuffer, N.segments);
21239
21239
  }
21240
21240
  A.bindFramebuffer.set(null), A.viewport.set([0, 0, v.width, v.height]);
21241
21241
  }(this, this.style.map.terrain), function(v, C) {
21242
- const A = v.context, D = A.gl, R = sn.unblended, F = new Wt(D.LEQUAL, Wt.ReadWrite, [0, 1]), B = C.getTerrainMesh(), q = C.getCoordsTexture(), K = C.sourceCache.getRenderableTiles(), J = v.useProgram("terrainCoords");
21242
+ const A = v.context, D = A.gl, R = sn.unblended, B = new Wt(D.LEQUAL, Wt.ReadWrite, [0, 1]), N = C.getTerrainMesh(), q = C.getCoordsTexture(), K = C.sourceCache.getRenderableTiles(), J = v.useProgram("terrainCoords");
21243
21243
  A.bindFramebuffer.set(C.getFramebuffer("coords").framebuffer), A.viewport.set([0, 0, v.width / devicePixelRatio, v.height / devicePixelRatio]), A.clear({ color: a.aM.transparent, depth: 1 }), C.coordsIndex = [];
21244
21244
  for (const ne of K) {
21245
21245
  const ae = C.getTerrainData(ne.tileID);
21246
21246
  A.activeTexture.set(D.TEXTURE0), D.bindTexture(D.TEXTURE_2D, q.texture);
21247
21247
  const le = { u_matrix: v.transform.calculatePosMatrix(ne.tileID.toUnwrapped()), u_terrain_coords_id: (255 - C.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: C.getMeshFrameDelta(v.transform.zoom) };
21248
- J.draw(A, D.TRIANGLES, F, Li.disabled, R, Ei.backCCW, le, ae, "terrain", B.vertexBuffer, B.indexBuffer, B.segments), C.coordsIndex.push(ne.tileID.key);
21248
+ J.draw(A, D.TRIANGLES, B, Li.disabled, R, Ei.backCCW, le, ae, "terrain", N.vertexBuffer, N.indexBuffer, N.segments), C.coordsIndex.push(ne.tileID.key);
21249
21249
  }
21250
21250
  A.bindFramebuffer.set(null), A.viewport.set([0, 0, v.width, v.height]);
21251
21251
  }(this, this.style.map.terrain));
@@ -21255,7 +21255,7 @@ uniform ${F} ${B} u_${q};
21255
21255
  case "symbol":
21256
21256
  (function(v, C, A, D, R) {
21257
21257
  if (v.renderPass !== "translucent") return;
21258
- const F = Li.disabled, B = v.colorModeForRenderPass();
21258
+ const B = Li.disabled, N = v.colorModeForRenderPass();
21259
21259
  (A._unevaluatedLayout.hasValue("text-variable-anchor") || A._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(q, K, J, ne, ae, le, he, ee, me) {
21260
21260
  const ge = K.transform, be = zo(), Re = ae === "map", $e = le === "map";
21261
21261
  for (const Je of q) {
@@ -21267,14 +21267,14 @@ uniform ${F} ${B} u_${q};
21267
21267
  ka(Ge, Re, $e, me, ge, Lt, Je.posMatrix, it, He, Ze, be, Vi, Je.toUnwrapped(), Ot);
21268
21268
  }
21269
21269
  }
21270
- }(D, v, A, C, A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), R), A.paint.get("icon-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !1, A.paint.get("icon-translate"), A.paint.get("icon-translate-anchor"), A.layout.get("icon-rotation-alignment"), A.layout.get("icon-pitch-alignment"), A.layout.get("icon-keep-upright"), F, B), A.paint.get("text-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !0, A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.layout.get("text-keep-upright"), F, B), C.map.showCollisionBoxes && (Al(v, C, A, D, !0), Al(v, C, A, D, !1));
21270
+ }(D, v, A, C, A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), R), A.paint.get("icon-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !1, A.paint.get("icon-translate"), A.paint.get("icon-translate-anchor"), A.layout.get("icon-rotation-alignment"), A.layout.get("icon-pitch-alignment"), A.layout.get("icon-keep-upright"), B, N), A.paint.get("text-opacity").constantOr(1) !== 0 && Ah(v, C, A, D, !0, A.paint.get("text-translate"), A.paint.get("text-translate-anchor"), A.layout.get("text-rotation-alignment"), A.layout.get("text-pitch-alignment"), A.layout.get("text-keep-upright"), B, N), C.map.showCollisionBoxes && (Al(v, C, A, D, !0), Al(v, C, A, D, !1));
21271
21271
  })(s, d, f, m, this.style.placement.variableOffsets);
21272
21272
  break;
21273
21273
  case "circle":
21274
21274
  (function(v, C, A, D) {
21275
21275
  if (v.renderPass !== "translucent") return;
21276
- const R = A.paint.get("circle-opacity"), F = A.paint.get("circle-stroke-width"), B = A.paint.get("circle-stroke-opacity"), q = !A.layout.get("circle-sort-key").isConstant();
21277
- if (R.constantOr(1) === 0 && (F.constantOr(1) === 0 || B.constantOr(1) === 0)) return;
21276
+ const R = A.paint.get("circle-opacity"), B = A.paint.get("circle-stroke-width"), N = A.paint.get("circle-stroke-opacity"), q = !A.layout.get("circle-sort-key").isConstant();
21277
+ if (R.constantOr(1) === 0 && (B.constantOr(1) === 0 || N.constantOr(1) === 0)) return;
21278
21278
  const K = v.context, J = K.gl, ne = v.depthModeForSublayer(0, Wt.ReadOnly), ae = Li.disabled, le = v.colorModeForRenderPass(), he = [];
21279
21279
  for (let ee = 0; ee < D.length; ee++) {
21280
21280
  const me = D[ee], ge = C.getTile(me), be = ge.getBucket(A);
@@ -21297,42 +21297,42 @@ uniform ${F} ${B} u_${q};
21297
21297
  if (A.paint.get("heatmap-opacity") === 0) return;
21298
21298
  const R = v.context;
21299
21299
  if (v.style.map.terrain) {
21300
- for (const F of D) {
21301
- const B = C.getTile(F);
21302
- C.hasRenderableParent(F) || (v.renderPass === "offscreen" ? Ih(v, B, A, F) : v.renderPass === "translucent" && jo(v, A, F));
21300
+ for (const B of D) {
21301
+ const N = C.getTile(B);
21302
+ C.hasRenderableParent(B) || (v.renderPass === "offscreen" ? Ih(v, N, A, B) : v.renderPass === "translucent" && jo(v, A, B));
21303
21303
  }
21304
21304
  R.viewport.set([0, 0, v.width, v.height]);
21305
- } else v.renderPass === "offscreen" ? function(F, B, q, K) {
21306
- const J = F.context, ne = J.gl, ae = Li.disabled, le = new sn([ne.ONE, ne.ONE], a.aM.transparent, [!0, !0, !0, !0]);
21305
+ } else v.renderPass === "offscreen" ? function(B, N, q, K) {
21306
+ const J = B.context, ne = J.gl, ae = Li.disabled, le = new sn([ne.ONE, ne.ONE], a.aM.transparent, [!0, !0, !0, !0]);
21307
21307
  (function(he, ee, me) {
21308
21308
  const ge = he.gl;
21309
21309
  he.activeTexture.set(ge.TEXTURE1), he.viewport.set([0, 0, ee.width / 4, ee.height / 4]);
21310
21310
  let be = me.heatmapFbos.get(a.aU);
21311
21311
  be ? (ge.bindTexture(ge.TEXTURE_2D, be.colorAttachment.get()), he.bindFramebuffer.set(be.framebuffer)) : (be = Il(he, ee.width / 4, ee.height / 4), me.heatmapFbos.set(a.aU, be));
21312
- })(J, F, q), J.clear({ color: a.aM.transparent });
21312
+ })(J, B, q), J.clear({ color: a.aM.transparent });
21313
21313
  for (let he = 0; he < K.length; he++) {
21314
21314
  const ee = K[he];
21315
- if (B.hasRenderableParent(ee)) continue;
21316
- const me = B.getTile(ee), ge = me.getBucket(q);
21315
+ if (N.hasRenderableParent(ee)) continue;
21316
+ const me = N.getTile(ee), ge = me.getBucket(q);
21317
21317
  if (!ge) continue;
21318
- const be = ge.programConfigurations.get(q.id), Re = F.useProgram("heatmap", be), { zoom: $e } = F.transform;
21319
- Re.draw(J, ne.TRIANGLES, Wt.disabled, ae, le, Ei.disabled, ar(ee.posMatrix, me, $e, q.paint.get("heatmap-intensity")), null, q.id, ge.layoutVertexBuffer, ge.indexBuffer, ge.segments, q.paint, F.transform.zoom, be);
21318
+ const be = ge.programConfigurations.get(q.id), Re = B.useProgram("heatmap", be), { zoom: $e } = B.transform;
21319
+ Re.draw(J, ne.TRIANGLES, Wt.disabled, ae, le, Ei.disabled, ar(ee.posMatrix, me, $e, q.paint.get("heatmap-intensity")), null, q.id, ge.layoutVertexBuffer, ge.indexBuffer, ge.segments, q.paint, B.transform.zoom, be);
21320
21320
  }
21321
- J.viewport.set([0, 0, F.width, F.height]);
21322
- }(v, C, A, D) : v.renderPass === "translucent" && function(F, B) {
21323
- const q = F.context, K = q.gl;
21324
- q.setColorMode(F.colorModeForRenderPass());
21325
- const J = B.heatmapFbos.get(a.aU);
21326
- J && (q.activeTexture.set(K.TEXTURE0), K.bindTexture(K.TEXTURE_2D, J.colorAttachment.get()), q.activeTexture.set(K.TEXTURE1), Dl(q, B).bind(K.LINEAR, K.CLAMP_TO_EDGE), F.useProgram("heatmapTexture").draw(q, K.TRIANGLES, Wt.disabled, Li.disabled, F.colorModeForRenderPass(), Ei.disabled, Ic(F, B, 0, 1), null, B.id, F.viewportBuffer, F.quadTriangleIndexBuffer, F.viewportSegments, B.paint, F.transform.zoom));
21321
+ J.viewport.set([0, 0, B.width, B.height]);
21322
+ }(v, C, A, D) : v.renderPass === "translucent" && function(B, N) {
21323
+ const q = B.context, K = q.gl;
21324
+ q.setColorMode(B.colorModeForRenderPass());
21325
+ const J = N.heatmapFbos.get(a.aU);
21326
+ J && (q.activeTexture.set(K.TEXTURE0), K.bindTexture(K.TEXTURE_2D, J.colorAttachment.get()), q.activeTexture.set(K.TEXTURE1), Dl(q, N).bind(K.LINEAR, K.CLAMP_TO_EDGE), B.useProgram("heatmapTexture").draw(q, K.TRIANGLES, Wt.disabled, Li.disabled, B.colorModeForRenderPass(), Ei.disabled, Ic(B, N, 0, 1), null, N.id, B.viewportBuffer, B.quadTriangleIndexBuffer, B.viewportSegments, N.paint, B.transform.zoom));
21327
21327
  }(v, A);
21328
21328
  })(s, d, f, m);
21329
21329
  break;
21330
21330
  case "line":
21331
21331
  (function(v, C, A, D) {
21332
21332
  if (v.renderPass !== "translucent") return;
21333
- const R = A.paint.get("line-opacity"), F = A.paint.get("line-width");
21334
- if (R.constantOr(1) === 0 || F.constantOr(1) === 0) return;
21335
- const B = v.depthModeForSublayer(0, Wt.ReadOnly), q = v.colorModeForRenderPass(), K = A.paint.get("line-dasharray"), J = A.paint.get("line-pattern"), ne = J.constantOr(1), ae = A.paint.get("line-gradient"), le = A.getCrossfadeParameters(), he = ne ? "linePattern" : K ? "lineSDF" : ae ? "lineGradient" : "line", ee = v.context, me = ee.gl;
21333
+ const R = A.paint.get("line-opacity"), B = A.paint.get("line-width");
21334
+ if (R.constantOr(1) === 0 || B.constantOr(1) === 0) return;
21335
+ const N = v.depthModeForSublayer(0, Wt.ReadOnly), q = v.colorModeForRenderPass(), K = A.paint.get("line-dasharray"), J = A.paint.get("line-pattern"), ne = J.constantOr(1), ae = A.paint.get("line-gradient"), le = A.getCrossfadeParameters(), he = ne ? "linePattern" : K ? "lineSDF" : ae ? "lineGradient" : "line", ee = v.context, me = ee.gl;
21336
21336
  let ge = !0;
21337
21337
  for (const be of D) {
21338
21338
  const Re = C.getTile(be);
@@ -21360,22 +21360,22 @@ uniform ${F} ${B} u_${q};
21360
21360
  }
21361
21361
  ee.activeTexture.set(me.TEXTURE0), Vi.bind(A.stepInterpolant ? me.NEAREST : me.LINEAR, me.CLAMP_TO_EDGE);
21362
21362
  }
21363
- Ge.draw(ee, me.TRIANGLES, B, v.stencilModeForClipping(be), q, Ei.disabled, it, pt, A.id, $e.layoutVertexBuffer, $e.indexBuffer, $e.segments, A.paint, v.transform.zoom, Je, $e.layoutVertexBuffer2), ge = !1;
21363
+ Ge.draw(ee, me.TRIANGLES, N, v.stencilModeForClipping(be), q, Ei.disabled, it, pt, A.id, $e.layoutVertexBuffer, $e.indexBuffer, $e.segments, A.paint, v.transform.zoom, Je, $e.layoutVertexBuffer2), ge = !1;
21364
21364
  }
21365
21365
  })(s, d, f, m);
21366
21366
  break;
21367
21367
  case "fill":
21368
21368
  (function(v, C, A, D) {
21369
- const R = A.paint.get("fill-color"), F = A.paint.get("fill-opacity");
21370
- if (F.constantOr(1) === 0) return;
21371
- const B = v.colorModeForRenderPass(), q = A.paint.get("fill-pattern"), K = v.opaquePassEnabledForLayer() && !q.constantOr(1) && R.constantOr(a.aM.transparent).a === 1 && F.constantOr(0) === 1 ? "opaque" : "translucent";
21369
+ const R = A.paint.get("fill-color"), B = A.paint.get("fill-opacity");
21370
+ if (B.constantOr(1) === 0) return;
21371
+ const N = v.colorModeForRenderPass(), q = A.paint.get("fill-pattern"), K = v.opaquePassEnabledForLayer() && !q.constantOr(1) && R.constantOr(a.aM.transparent).a === 1 && B.constantOr(0) === 1 ? "opaque" : "translucent";
21372
21372
  if (v.renderPass === K) {
21373
21373
  const J = v.depthModeForSublayer(1, v.renderPass === "opaque" ? Wt.ReadWrite : Wt.ReadOnly);
21374
- Ol(v, C, A, D, J, B, !1);
21374
+ Ol(v, C, A, D, J, N, !1);
21375
21375
  }
21376
21376
  if (v.renderPass === "translucent" && A.paint.get("fill-antialias")) {
21377
21377
  const J = v.depthModeForSublayer(A.getPaintProperty("fill-outline-color") ? 2 : 0, Wt.ReadOnly);
21378
- Ol(v, C, A, D, J, B, !0);
21378
+ Ol(v, C, A, D, J, N, !0);
21379
21379
  }
21380
21380
  })(s, d, f, m);
21381
21381
  break;
@@ -21383,11 +21383,11 @@ uniform ${F} ${B} u_${q};
21383
21383
  (function(v, C, A, D) {
21384
21384
  const R = A.paint.get("fill-extrusion-opacity");
21385
21385
  if (R !== 0 && v.renderPass === "translucent") {
21386
- const F = new Wt(v.context.gl.LEQUAL, Wt.ReadWrite, v.depthRangeFor3D);
21387
- if (R !== 1 || A.paint.get("fill-extrusion-pattern").constantOr(1)) $c(v, C, A, D, F, Li.disabled, sn.disabled), $c(v, C, A, D, F, v.stencilModeFor3D(), v.colorModeForRenderPass());
21386
+ const B = new Wt(v.context.gl.LEQUAL, Wt.ReadWrite, v.depthRangeFor3D);
21387
+ if (R !== 1 || A.paint.get("fill-extrusion-pattern").constantOr(1)) $c(v, C, A, D, B, Li.disabled, sn.disabled), $c(v, C, A, D, B, v.stencilModeFor3D(), v.colorModeForRenderPass());
21388
21388
  else {
21389
- const B = v.colorModeForRenderPass();
21390
- $c(v, C, A, D, F, Li.disabled, B);
21389
+ const N = v.colorModeForRenderPass();
21390
+ $c(v, C, A, D, B, Li.disabled, N);
21391
21391
  }
21392
21392
  }
21393
21393
  })(s, d, f, m);
@@ -21395,10 +21395,10 @@ uniform ${F} ${B} u_${q};
21395
21395
  case "hillshade":
21396
21396
  (function(v, C, A, D) {
21397
21397
  if (v.renderPass !== "offscreen" && v.renderPass !== "translucent") return;
21398
- const R = v.context, F = v.depthModeForSublayer(0, Wt.ReadOnly), B = v.colorModeForRenderPass(), [q, K] = v.renderPass === "translucent" ? v.stencilConfigForOverlap(D) : [{}, D];
21398
+ const R = v.context, B = v.depthModeForSublayer(0, Wt.ReadOnly), N = v.colorModeForRenderPass(), [q, K] = v.renderPass === "translucent" ? v.stencilConfigForOverlap(D) : [{}, D];
21399
21399
  for (const J of K) {
21400
21400
  const ne = C.getTile(J);
21401
- ne.needsHillshadePrepare !== void 0 && ne.needsHillshadePrepare && v.renderPass === "offscreen" ? Ca(v, ne, A, F, Li.disabled, B) : v.renderPass === "translucent" && Ma(v, J, ne, A, F, q[J.overscaledZ], B);
21401
+ ne.needsHillshadePrepare !== void 0 && ne.needsHillshadePrepare && v.renderPass === "offscreen" ? Ca(v, ne, A, B, Li.disabled, N) : v.renderPass === "translucent" && Ma(v, J, ne, A, B, q[J.overscaledZ], N);
21402
21402
  }
21403
21403
  R.viewport.set([0, 0, v.width, v.height]);
21404
21404
  })(s, d, f, m);
@@ -21406,33 +21406,33 @@ uniform ${F} ${B} u_${q};
21406
21406
  case "raster":
21407
21407
  (function(v, C, A, D) {
21408
21408
  if (v.renderPass !== "translucent" || A.paint.get("raster-opacity") === 0 || !D.length) return;
21409
- const R = v.context, F = R.gl, B = C.getSource(), q = v.useProgram("raster"), K = v.colorModeForRenderPass(), [J, ne] = B instanceof Cn ? [{}, D] : v.stencilConfigForOverlap(D), ae = ne[ne.length - 1].overscaledZ, le = !v.options.moving;
21409
+ const R = v.context, B = R.gl, N = C.getSource(), q = v.useProgram("raster"), K = v.colorModeForRenderPass(), [J, ne] = N instanceof Cn ? [{}, D] : v.stencilConfigForOverlap(D), ae = ne[ne.length - 1].overscaledZ, le = !v.options.moving;
21410
21410
  for (const he of ne) {
21411
- const ee = v.depthModeForSublayer(he.overscaledZ - ae, A.paint.get("raster-opacity") === 1 ? Wt.ReadWrite : Wt.ReadOnly, F.LESS), me = C.getTile(he);
21411
+ const ee = v.depthModeForSublayer(he.overscaledZ - ae, A.paint.get("raster-opacity") === 1 ? Wt.ReadWrite : Wt.ReadOnly, B.LESS), me = C.getTile(he);
21412
21412
  me.registerFadeDuration(A.paint.get("raster-fade-duration"));
21413
21413
  const ge = C.findLoadedParent(he, 0), be = C.findLoadedSibling(he), Re = $p(me, ge || be || null, C, A, v.transform, v.style.map.terrain);
21414
21414
  let $e, Je;
21415
- const rt = A.paint.get("raster-resampling") === "nearest" ? F.NEAREST : F.LINEAR;
21416
- R.activeTexture.set(F.TEXTURE0), me.texture.bind(rt, F.CLAMP_TO_EDGE, F.LINEAR_MIPMAP_NEAREST), R.activeTexture.set(F.TEXTURE1), ge ? (ge.texture.bind(rt, F.CLAMP_TO_EDGE, F.LINEAR_MIPMAP_NEAREST), $e = Math.pow(2, ge.tileID.overscaledZ - me.tileID.overscaledZ), Je = [me.tileID.canonical.x * $e % 1, me.tileID.canonical.y * $e % 1]) : me.texture.bind(rt, F.CLAMP_TO_EDGE, F.LINEAR_MIPMAP_NEAREST), me.texture.useMipmap && R.extTextureFilterAnisotropic && v.transform.pitch > 20 && F.texParameterf(F.TEXTURE_2D, R.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, R.extTextureFilterAnisotropicMax);
21415
+ const rt = A.paint.get("raster-resampling") === "nearest" ? B.NEAREST : B.LINEAR;
21416
+ R.activeTexture.set(B.TEXTURE0), me.texture.bind(rt, B.CLAMP_TO_EDGE, B.LINEAR_MIPMAP_NEAREST), R.activeTexture.set(B.TEXTURE1), ge ? (ge.texture.bind(rt, B.CLAMP_TO_EDGE, B.LINEAR_MIPMAP_NEAREST), $e = Math.pow(2, ge.tileID.overscaledZ - me.tileID.overscaledZ), Je = [me.tileID.canonical.x * $e % 1, me.tileID.canonical.y * $e % 1]) : me.texture.bind(rt, B.CLAMP_TO_EDGE, B.LINEAR_MIPMAP_NEAREST), me.texture.useMipmap && R.extTextureFilterAnisotropic && v.transform.pitch > 20 && B.texParameterf(B.TEXTURE_2D, R.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, R.extTextureFilterAnisotropicMax);
21417
21417
  const Ge = v.style.map.terrain && v.style.map.terrain.getTerrainData(he), He = Ge ? he : null, pt = He ? He.posMatrix : v.transform.calculatePosMatrix(he.toUnwrapped(), le), Lt = Tg(pt, Je || [0, 0], $e || 1, Re, A);
21418
- B instanceof Cn ? q.draw(R, F.TRIANGLES, ee, Li.disabled, K, Ei.disabled, Lt, Ge, A.id, B.boundsBuffer, v.quadTriangleIndexBuffer, B.boundsSegments) : q.draw(R, F.TRIANGLES, ee, J[he.overscaledZ], K, Ei.disabled, Lt, Ge, A.id, v.rasterBoundsBuffer, v.quadTriangleIndexBuffer, v.rasterBoundsSegments);
21418
+ N instanceof Cn ? q.draw(R, B.TRIANGLES, ee, Li.disabled, K, Ei.disabled, Lt, Ge, A.id, N.boundsBuffer, v.quadTriangleIndexBuffer, N.boundsSegments) : q.draw(R, B.TRIANGLES, ee, J[he.overscaledZ], K, Ei.disabled, Lt, Ge, A.id, v.rasterBoundsBuffer, v.quadTriangleIndexBuffer, v.rasterBoundsSegments);
21419
21419
  }
21420
21420
  })(s, d, f, m);
21421
21421
  break;
21422
21422
  case "background":
21423
21423
  (function(v, C, A, D) {
21424
- const R = A.paint.get("background-color"), F = A.paint.get("background-opacity");
21425
- if (F === 0) return;
21426
- const B = v.context, q = B.gl, K = v.transform, J = K.tileSize, ne = A.paint.get("background-pattern");
21424
+ const R = A.paint.get("background-color"), B = A.paint.get("background-opacity");
21425
+ if (B === 0) return;
21426
+ const N = v.context, q = N.gl, K = v.transform, J = K.tileSize, ne = A.paint.get("background-pattern");
21427
21427
  if (v.isPatternMissing(ne)) return;
21428
- const ae = !ne && R.a === 1 && F === 1 && v.opaquePassEnabledForLayer() ? "opaque" : "translucent";
21428
+ const ae = !ne && R.a === 1 && B === 1 && v.opaquePassEnabledForLayer() ? "opaque" : "translucent";
21429
21429
  if (v.renderPass !== ae) return;
21430
21430
  const le = Li.disabled, he = v.depthModeForSublayer(0, ae === "opaque" ? Wt.ReadWrite : Wt.ReadOnly), ee = v.colorModeForRenderPass(), me = v.useProgram(ne ? "backgroundPattern" : "background"), ge = D || K.coveringTiles({ tileSize: J, terrain: v.style.map.terrain });
21431
- ne && (B.activeTexture.set(q.TEXTURE0), v.imageManager.bind(v.context));
21431
+ ne && (N.activeTexture.set(q.TEXTURE0), v.imageManager.bind(v.context));
21432
21432
  const be = A.getCrossfadeParameters();
21433
21433
  for (const Re of ge) {
21434
- const $e = D ? Re.posMatrix : v.transform.calculatePosMatrix(Re.toUnwrapped()), Je = ne ? _h($e, F, v, ne, { tileID: Re, tileSize: J }, be) : zc($e, F, R), rt = v.style.map.terrain && v.style.map.terrain.getTerrainData(Re);
21435
- me.draw(B, q.TRIANGLES, he, le, ee, Ei.disabled, Je, rt, A.id, v.tileExtentBuffer, v.quadTriangleIndexBuffer, v.tileExtentSegments);
21434
+ const $e = D ? Re.posMatrix : v.transform.calculatePosMatrix(Re.toUnwrapped()), Je = ne ? _h($e, B, v, ne, { tileID: Re, tileSize: J }, be) : zc($e, B, R), rt = v.style.map.terrain && v.style.map.terrain.getTerrainData(Re);
21435
+ me.draw(N, q.TRIANGLES, he, le, ee, Ei.disabled, Je, rt, A.id, v.tileExtentBuffer, v.quadTriangleIndexBuffer, v.tileExtentSegments);
21436
21436
  }
21437
21437
  })(s, 0, f, m);
21438
21438
  break;
@@ -21440,12 +21440,12 @@ uniform ${F} ${B} u_${q};
21440
21440
  (function(v, C, A) {
21441
21441
  const D = v.context, R = A.implementation;
21442
21442
  if (v.renderPass === "offscreen") {
21443
- const F = R.prerender;
21444
- F && (v.setCustomLayerDefaults(), D.setColorMode(v.colorModeForRenderPass()), F.call(R, D.gl, v.transform.customLayerMatrix()), D.setDirty(), v.setBaseState());
21443
+ const B = R.prerender;
21444
+ B && (v.setCustomLayerDefaults(), D.setColorMode(v.colorModeForRenderPass()), B.call(R, D.gl, v.transform.customLayerMatrix()), D.setDirty(), v.setBaseState());
21445
21445
  } else if (v.renderPass === "translucent") {
21446
21446
  v.setCustomLayerDefaults(), D.setColorMode(v.colorModeForRenderPass()), D.setStencilMode(Li.disabled);
21447
- const F = R.renderingMode === "3d" ? new Wt(v.context.gl.LEQUAL, Wt.ReadWrite, v.depthRangeFor3D) : v.depthModeForSublayer(0, Wt.ReadOnly);
21448
- D.setDepthMode(F), R.render(D.gl, v.transform.customLayerMatrix(), { farZ: v.transform.farZ, nearZ: v.transform.nearZ, fov: v.transform._fov, modelViewProjectionMatrix: v.transform.modelViewProjectionMatrix, projectionMatrix: v.transform.projectionMatrix }), D.setDirty(), v.setBaseState(), D.bindFramebuffer.set(null);
21447
+ const B = R.renderingMode === "3d" ? new Wt(v.context.gl.LEQUAL, Wt.ReadWrite, v.depthRangeFor3D) : v.depthModeForSublayer(0, Wt.ReadOnly);
21448
+ D.setDepthMode(B), R.render(D.gl, v.transform.customLayerMatrix(), { farZ: v.transform.farZ, nearZ: v.transform.nearZ, fov: v.transform._fov, modelViewProjectionMatrix: v.transform.modelViewProjectionMatrix, projectionMatrix: v.transform.projectionMatrix }), D.setDirty(), v.setBaseState(), D.bindFramebuffer.set(null);
21449
21449
  }
21450
21450
  })(s, 0, f);
21451
21451
  }
@@ -21454,8 +21454,8 @@ uniform ${F} ${B} u_${q};
21454
21454
  if (!f[0] && !f[1]) return s;
21455
21455
  const C = v ? m === "map" ? this.transform.angle : 0 : m === "viewport" ? -this.transform.angle : 0;
21456
21456
  if (C) {
21457
- const R = Math.sin(C), F = Math.cos(C);
21458
- f = [f[0] * F - f[1] * R, f[0] * R + f[1] * F];
21457
+ const R = Math.sin(C), B = Math.cos(C);
21458
+ f = [f[0] * B - f[1] * R, f[0] * R + f[1] * B];
21459
21459
  }
21460
21460
  const A = [v ? f[0] : Zt(d, f[0], this.transform.zoom), v ? f[1] : Zt(d, f[1], this.transform.zoom), 0], D = new Float32Array(16);
21461
21461
  return a.J(D, s, A), D;
@@ -21512,8 +21512,8 @@ uniform ${F} ${B} u_${q};
21512
21512
  }([], function(q, K, J) {
21513
21513
  var ne = K[0], ae = K[1], le = K[2], he = J[0], ee = J[1], me = J[2];
21514
21514
  return q[0] = ae * me - le * ee, q[1] = le * he - ne * me, q[2] = ne * ee - ae * he, q;
21515
- }([], Pe([], v[A[0]], v[A[1]]), Pe([], v[A[2]], v[A[1]]))), R = -((F = D)[0] * (B = v[A[1]])[0] + F[1] * B[1] + F[2] * B[2]);
21516
- var F, B;
21515
+ }([], Pe([], v[A[0]], v[A[1]]), Pe([], v[A[2]], v[A[1]]))), R = -((B = D)[0] * (N = v[A[1]])[0] + B[1] * N[1] + B[2] * N[2]);
21516
+ var B, N;
21517
21517
  return D.concat(R);
21518
21518
  });
21519
21519
  return new Aa(v, C);
@@ -21642,8 +21642,8 @@ uniform ${F} ${B} u_${q};
21642
21642
  var f = new a.A(4);
21643
21643
  return a.A != Float32Array && (f[1] = 0, f[2] = 0), f[0] = 1, f[3] = 1, f;
21644
21644
  }(), function(f, m, v) {
21645
- var C = m[0], A = m[1], D = m[2], R = m[3], F = Math.sin(v), B = Math.cos(v);
21646
- f[0] = C * B + D * F, f[1] = A * B + R * F, f[2] = C * -F + D * B, f[3] = A * -F + R * B;
21645
+ var C = m[0], A = m[1], D = m[2], R = m[3], B = Math.sin(v), N = Math.cos(v);
21646
+ f[0] = C * N + D * B, f[1] = A * N + R * B, f[2] = C * -B + D * N, f[3] = A * -B + R * N;
21647
21647
  }(this.rotationMatrix, this.rotationMatrix, this.angle));
21648
21648
  }
21649
21649
  get pitch() {
@@ -21701,7 +21701,7 @@ uniform ${F} ${B} u_${q};
21701
21701
  const d = [new a.b4(0, s)];
21702
21702
  if (this._renderWorldCopies) {
21703
21703
  const f = this.pointCoordinate(new a.P(0, 0)), m = this.pointCoordinate(new a.P(this.width, 0)), v = this.pointCoordinate(new a.P(this.width, this.height)), C = this.pointCoordinate(new a.P(0, this.height)), A = Math.floor(Math.min(f.x, m.x, v.x, C.x)), D = Math.floor(Math.max(f.x, m.x, v.x, C.x)), R = 1;
21704
- for (let F = A - R; F <= D + R; F++) F !== 0 && d.push(new a.b4(F, s));
21704
+ for (let B = A - R; B <= D + R; B++) B !== 0 && d.push(new a.b4(B, s));
21705
21705
  }
21706
21706
  return d;
21707
21707
  }
@@ -21711,7 +21711,7 @@ uniform ${F} ${B} u_${q};
21711
21711
  const v = m;
21712
21712
  if (s.minzoom !== void 0 && m < s.minzoom) return [];
21713
21713
  s.maxzoom !== void 0 && m > s.maxzoom && (m = s.maxzoom);
21714
- const C = this.pointCoordinate(this.getCameraPoint()), A = a.Z.fromLngLat(this.center), D = Math.pow(2, m), R = [D * C.x, D * C.y, 0], F = [D * A.x, D * A.y, 0], B = Aa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix, this.worldSize, m);
21714
+ const C = this.pointCoordinate(this.getCameraPoint()), A = a.Z.fromLngLat(this.center), D = Math.pow(2, m), R = [D * C.x, D * C.y, 0], B = [D * A.x, D * A.y, 0], N = Aa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix, this.worldSize, m);
21715
21715
  let q = s.minzoom || 0;
21716
21716
  !s.terrain && this.pitch <= 60 && this._edgeInsets.top < 0.1 && (q = m);
21717
21717
  const K = s.terrain ? 2 / Math.min(this.tileSize, s.tileSize) * this.tileSize : 3, J = (ee) => ({ aabb: new Pa([ee * D, 0, 0], [(ee + 1) * D, D, 0]), zoom: 0, x: 0, y: 0, wrap: ee, fullyVisible: !1 }), ne = [], ae = [], le = m, he = s.reparseOverscaled ? v : m;
@@ -21720,14 +21720,14 @@ uniform ${F} ${B} u_${q};
21720
21720
  const ee = ne.pop(), me = ee.x, ge = ee.y;
21721
21721
  let be = ee.fullyVisible;
21722
21722
  if (!be) {
21723
- const Ge = ee.aabb.intersects(B);
21723
+ const Ge = ee.aabb.intersects(N);
21724
21724
  if (Ge === 0) continue;
21725
21725
  be = Ge === 2;
21726
21726
  }
21727
- const Re = s.terrain ? R : F, $e = ee.aabb.distanceX(Re), Je = ee.aabb.distanceY(Re), rt = Math.max(Math.abs($e), Math.abs(Je));
21727
+ const Re = s.terrain ? R : B, $e = ee.aabb.distanceX(Re), Je = ee.aabb.distanceY(Re), rt = Math.max(Math.abs($e), Math.abs(Je));
21728
21728
  if (ee.zoom === le || rt > K + (1 << le - ee.zoom) - 2 && ee.zoom >= q) {
21729
21729
  const Ge = le - ee.zoom, He = R[0] - 0.5 - (me << Ge), pt = R[1] - 0.5 - (ge << Ge);
21730
- ae.push({ tileID: new a.S(ee.zoom === le ? he : ee.zoom, ee.wrap, ee.zoom, me, ge), distanceSq: Xe([F[0] - 0.5 - me, F[1] - 0.5 - ge]), tileDistanceToCamera: Math.sqrt(He * He + pt * pt) });
21730
+ ae.push({ tileID: new a.S(ee.zoom === le ? he : ee.zoom, ee.wrap, ee.zoom, me, ge), distanceSq: Xe([B[0] - 0.5 - me, B[1] - 0.5 - ge]), tileDistanceToCamera: Math.sqrt(He * He + pt * pt) });
21731
21731
  } else for (let Ge = 0; Ge < 4; Ge++) {
21732
21732
  const He = (me << 1) + Ge % 2, pt = (ge << 1) + (Ge >> 1), Lt = ee.zoom + 1;
21733
21733
  let Ze = ee.aabb.quadrant(Ge);
@@ -21794,8 +21794,8 @@ uniform ${F} ${B} u_${q};
21794
21794
  }
21795
21795
  const f = [s.x, s.y, 0, 1], m = [s.x, s.y, 1, 1];
21796
21796
  a.af(f, f, this.pixelMatrixInverse), a.af(m, m, this.pixelMatrixInverse);
21797
- const v = f[3], C = m[3], A = f[1] / v, D = m[1] / C, R = f[2] / v, F = m[2] / C, B = R === F ? 0 : (0 - R) / (F - R);
21798
- return new a.Z(a.y.number(f[0] / v, m[0] / C, B) / this.worldSize, a.y.number(A, D, B) / this.worldSize);
21797
+ const v = f[3], C = m[3], A = f[1] / v, D = m[1] / C, R = f[2] / v, B = m[2] / C, N = R === B ? 0 : (0 - R) / (B - R);
21798
+ return new a.Z(a.y.number(f[0] / v, m[0] / C, N) / this.worldSize, a.y.number(A, D, N) / this.worldSize);
21799
21799
  }
21800
21800
  coordinatePoint(s, d = 0, f = this.pixelMatrix) {
21801
21801
  const m = [s.x * this.worldSize, s.y * this.worldSize, d, 1];
@@ -21842,18 +21842,18 @@ uniform ${F} ${B} u_${q};
21842
21842
  m = [-ee, ee];
21843
21843
  }
21844
21844
  const v = this.tileSize * this.zoomScale(f.zoom);
21845
- let C = 0, A = v, D = 0, R = v, F = 0, B = 0;
21845
+ let C = 0, A = v, D = 0, R = v, B = 0, N = 0;
21846
21846
  const { x: q, y: K } = this.size;
21847
21847
  if (this.latRange) {
21848
21848
  const ee = this.latRange;
21849
- C = a.Q(ee[1]) * v, A = a.Q(ee[0]) * v, A - C < K && (F = K / (A - C));
21849
+ C = a.Q(ee[1]) * v, A = a.Q(ee[0]) * v, A - C < K && (B = K / (A - C));
21850
21850
  }
21851
- m && (D = a.b3(a.O(m[0]) * v, 0, v), R = a.b3(a.O(m[1]) * v, 0, v), R < D && (R += v), R - D < q && (B = q / (R - D)));
21851
+ m && (D = a.b3(a.O(m[0]) * v, 0, v), R = a.b3(a.O(m[1]) * v, 0, v), R < D && (R += v), R - D < q && (N = q / (R - D)));
21852
21852
  const { x: J, y: ne } = this.project.call({ worldSize: v }, s);
21853
21853
  let ae, le;
21854
- const he = Math.max(B || 0, F || 0);
21854
+ const he = Math.max(N || 0, B || 0);
21855
21855
  if (he) {
21856
- const ee = new a.P(B ? (R + D) / 2 : J, F ? (A + C) / 2 : ne);
21856
+ const ee = new a.P(N ? (R + D) / 2 : J, B ? (A + C) / 2 : ne);
21857
21857
  return f.center = this.unproject.call({ worldSize: v }, ee).wrap(), f.zoom += this.scaleZoom(he), f;
21858
21858
  }
21859
21859
  if (this.latRange) {
@@ -21885,7 +21885,7 @@ uniform ${F} ${B} u_${q};
21885
21885
  this.cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height, this._pixelPerMeter = a.b5(1, this.center.lat) * this.worldSize;
21886
21886
  let m = a.an(new Float64Array(16));
21887
21887
  a.K(m, m, [this.width / 2, -this.height / 2, 1]), a.J(m, m, [1, -1, 0]), this.labelPlaneMatrix = m, m = a.an(new Float64Array(16)), a.K(m, m, [1, -1, 1]), a.J(m, m, [-1, -1, 0]), a.K(m, m, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = m;
21888
- const v = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), C = Math.min(this.elevation, this.minElevationForCurrentTile), A = v - C * this._pixelPerMeter / Math.cos(this._pitch), D = C < 0 ? A : v, R = Math.PI / 2 + this._pitch, F = this._fov * (0.5 + s.y / this.height), B = Math.sin(F) * D / Math.sin(a.ac(Math.PI - R - F, 0.01, Math.PI - 0.01)), q = this.getHorizon(), K = 2 * Math.atan(q / this.cameraToCenterDistance) * (0.5 + s.y / (2 * q)), J = Math.sin(K) * D / Math.sin(a.ac(Math.PI - R - K, 0.01, Math.PI - 0.01)), ne = Math.min(B, J);
21888
+ const v = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), C = Math.min(this.elevation, this.minElevationForCurrentTile), A = v - C * this._pixelPerMeter / Math.cos(this._pitch), D = C < 0 ? A : v, R = Math.PI / 2 + this._pitch, B = this._fov * (0.5 + s.y / this.height), N = Math.sin(B) * D / Math.sin(a.ac(Math.PI - R - B, 0.01, Math.PI - 0.01)), q = this.getHorizon(), K = 2 * Math.atan(q / this.cameraToCenterDistance) * (0.5 + s.y / (2 * q)), J = Math.sin(K) * D / Math.sin(a.ac(Math.PI - R - K, 0.01, Math.PI - 0.01)), ne = Math.min(N, J);
21889
21889
  this.farZ = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * ne + D), this.nearZ = this.height / 50, m = new Float64Array(16), a.b6(m, this._fov, this.width / this.height, this.nearZ, this.farZ), m[8] = 2 * -s.x / this.width, m[9] = 2 * s.y / this.height, this.projectionMatrix = a.ae(m), a.K(m, m, [1, -1, 1]), a.J(m, m, [0, 0, -this.cameraToCenterDistance]), a.b7(m, m, this._pitch), a.ad(m, m, this.angle), a.J(m, m, [-d, -f, 0]), this.mercatorMatrix = a.K([], m, [this.worldSize, this.worldSize, this.worldSize]), a.K(m, m, [1, 1, this._pixelPerMeter]), this.pixelMatrix = a.L(new Float64Array(16), this.labelPlaneMatrix, m), a.J(m, m, [0, 0, -this.elevation]), this.modelViewProjectionMatrix = m, this.invModelViewProjectionMatrix = a.as([], m), this.fogMatrix = new Float64Array(16), a.b6(this.fogMatrix, this._fov, this.width / this.height, v, this.farZ), this.fogMatrix[8] = 2 * -s.x / this.width, this.fogMatrix[9] = 2 * s.y / this.height, a.K(this.fogMatrix, this.fogMatrix, [1, -1, 1]), a.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.cameraToCenterDistance]), a.b7(this.fogMatrix, this.fogMatrix, this._pitch), a.ad(this.fogMatrix, this.fogMatrix, this.angle), a.J(this.fogMatrix, this.fogMatrix, [-d, -f, 0]), a.K(this.fogMatrix, this.fogMatrix, [1, 1, this._pixelPerMeter]), a.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.elevation]), this.pixelMatrix3D = a.L(new Float64Array(16), this.labelPlaneMatrix, m);
21890
21890
  const ae = this.width % 2 / 2, le = this.height % 2 / 2, he = Math.cos(this.angle), ee = Math.sin(this.angle), me = d - Math.round(d) + he * ae + ee * le, ge = f - Math.round(f) + he * le + ee * ae, be = new Float64Array(m);
21891
21891
  if (a.J(be, be, [me > 0.5 ? me - 1 : me, ge > 0.5 ? ge - 1 : ge, 0]), this.alignedModelViewProjectionMatrix = be, m = a.as(new Float64Array(16), this.pixelMatrix), !m) throw new Error("failed to invert matrix");
@@ -21962,17 +21962,17 @@ uniform ${F} ${B} u_${q};
21962
21962
  }
21963
21963
  getHashString(s) {
21964
21964
  const d = this._map.getCenter(), f = Math.round(100 * this._map.getZoom()) / 100, m = Math.ceil((f * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), v = Math.pow(10, m), C = Math.round(d.lng * v) / v, A = Math.round(d.lat * v) / v, D = this._map.getBearing(), R = this._map.getPitch();
21965
- let F = "";
21966
- if (F += s ? `/${C}/${A}/${f}` : `${f}/${A}/${C}`, (D || R) && (F += "/" + Math.round(10 * D) / 10), R && (F += `/${Math.round(R)}`), this._hashName) {
21967
- const B = this._hashName;
21965
+ let B = "";
21966
+ if (B += s ? `/${C}/${A}/${f}` : `${f}/${A}/${C}`, (D || R) && (B += "/" + Math.round(10 * D) / 10), R && (B += `/${Math.round(R)}`), this._hashName) {
21967
+ const N = this._hashName;
21968
21968
  let q = !1;
21969
21969
  const K = window.location.hash.slice(1).split("&").map((J) => {
21970
21970
  const ne = J.split("=")[0];
21971
- return ne === B ? (q = !0, `${ne}=${F}`) : J;
21971
+ return ne === N ? (q = !0, `${ne}=${B}`) : J;
21972
21972
  }).filter((J) => J);
21973
- return q || K.push(`${B}=${F}`), `#${K.join("&")}`;
21973
+ return q || K.push(`${N}=${B}`), `#${K.join("&")}`;
21974
21974
  }
21975
- return `#${F}`;
21975
+ return `#${B}`;
21976
21976
  }
21977
21977
  }
21978
21978
  const Wc = { linearity: 0.3, easing: a.b8(0, 0, 0.3, 1) }, zh = a.e({ deceleration: 2500, maxSpeed: 1400 }, Wc), Bg = a.e({ deceleration: 20, maxSpeed: 1400 }, Wc), qp = a.e({ deceleration: 1e3, maxSpeed: 360 }, Wc), Gc = a.e({ deceleration: 1e3, maxSpeed: 90 }, Wc);
@@ -22045,7 +22045,7 @@ uniform ${F} ${B} u_${q};
22045
22045
  return this._defaultPrevented;
22046
22046
  }
22047
22047
  constructor(s, d, f) {
22048
- const m = s === "touchend" ? f.changedTouches : f.touches, v = M.touchPos(d.getCanvasContainer(), m), C = v.map((D) => d.unproject(D)), A = v.reduce((D, R, F, B) => D.add(R.div(B.length)), new a.P(0, 0));
22048
+ const m = s === "touchend" ? f.changedTouches : f.touches, v = M.touchPos(d.getCanvasContainer(), m), C = v.map((D) => d.unproject(D)), A = v.reduce((D, R, B, N) => D.add(R.div(N.length)), new a.P(0, 0));
22049
22049
  super(s, { points: v, point: A, lngLats: C, lngLat: d.unproject(A), originalEvent: f }), this._defaultPrevented = !1;
22050
22050
  }
22051
22051
  }
@@ -22433,8 +22433,8 @@ uniform ${F} ${B} u_${q};
22433
22433
  const m = Fl(f, d), v = new a.P(0, 0), C = new a.P(0, 0);
22434
22434
  let A = 0;
22435
22435
  for (const R in m) {
22436
- const F = m[R], B = this._touches[R];
22437
- B && (v._add(F), C._add(F.sub(B)), A++, m[R] = F);
22436
+ const B = m[R], N = this._touches[R];
22437
+ N && (v._add(B), C._add(B.sub(N)), A++, m[R] = B);
22438
22438
  }
22439
22439
  if (this._touches = m, this._shouldBePrevented(A) || !C.mag()) return;
22440
22440
  const D = C.div(A);
@@ -22678,8 +22678,8 @@ uniform ${F} ${B} u_${q};
22678
22678
  const D = this._type === "wheel" && Math.abs(this._delta) > qh ? this._wheelZoomRate : this._defaultZoomRate;
22679
22679
  let R = 2 / (1 + Math.exp(-Math.abs(this._delta * D)));
22680
22680
  this._delta < 0 && R !== 0 && (R = 1 / R);
22681
- const F = typeof this._targetZoom == "number" ? s.zoomScale(this._targetZoom) : s.scale;
22682
- this._targetZoom = Math.min(s.maxZoom, Math.max(s.minZoom, s.scaleZoom(F * R))), this._type === "wheel" && (this._startZoom = s.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
22681
+ const B = typeof this._targetZoom == "number" ? s.zoomScale(this._targetZoom) : s.scale;
22682
+ this._targetZoom = Math.min(s.maxZoom, Math.max(s.minZoom, s.scaleZoom(B * R))), this._type === "wheel" && (this._startZoom = s.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
22683
22683
  }
22684
22684
  const d = typeof this._targetZoom == "number" ? this._targetZoom : s.zoom, f = this._startZoom, m = this._easing;
22685
22685
  let v, C = !1;
@@ -22902,11 +22902,11 @@ uniform ${F} ${B} u_${q};
22902
22902
  }, this.handleEvent = (m, v) => {
22903
22903
  if (m.type === "blur") return void this.stop(!0);
22904
22904
  this._updatingCamera = !0;
22905
- const C = m.type === "renderFrame" ? void 0 : m, A = { needsRenderFrame: !1 }, D = {}, R = {}, F = m.touches, B = F ? this._getMapTouches(F) : void 0, q = B ? M.touchPos(this._map.getCanvas(), B) : M.mousePos(this._map.getCanvas(), m);
22905
+ const C = m.type === "renderFrame" ? void 0 : m, A = { needsRenderFrame: !1 }, D = {}, R = {}, B = m.touches, N = B ? this._getMapTouches(B) : void 0, q = N ? M.touchPos(this._map.getCanvas(), N) : M.mousePos(this._map.getCanvas(), m);
22906
22906
  for (const { handlerName: ne, handler: ae, allowed: le } of this._handlers) {
22907
22907
  if (!ae.isEnabled()) continue;
22908
22908
  let he;
22909
- this._blockedByActive(R, le, ne) ? ae.reset() : ae[v || m.type] && (he = ae[v || m.type](m, q, B), this.mergeHandlerResult(A, D, he, ne, C), he && he.needsRenderFrame && this._triggerRenderFrame()), (he || ae.isActive()) && (R[ne] = ae);
22909
+ this._blockedByActive(R, le, ne) ? ae.reset() : ae[v || m.type] && (he = ae[v || m.type](m, q, N), this.mergeHandlerResult(A, D, he, ne, C), he && he.needsRenderFrame && this._triggerRenderFrame()), (he || ae.isActive()) && (R[ne] = ae);
22910
22910
  }
22911
22911
  const K = {};
22912
22912
  for (const ne in this._previousActiveHandlers) R[ne] || (K[ne] = C);
@@ -22934,8 +22934,8 @@ uniform ${F} ${B} u_${q};
22934
22934
  this._add("tapDragZoom", D);
22935
22935
  const R = d.touchPitch = new za(d);
22936
22936
  this._add("touchPitch", R), s.interactive && s.touchPitch && d.touchPitch.enable(s.touchPitch);
22937
- const F = Nh(s), B = $h(s);
22938
- d.dragRotate = new Xp(s, F, B), this._add("mouseRotate", F, ["mousePitch"]), this._add("mousePitch", B, ["mouseRotate"]), s.interactive && s.dragRotate && d.dragRotate.enable();
22937
+ const B = Nh(s), N = $h(s);
22938
+ d.dragRotate = new Xp(s, B, N), this._add("mouseRotate", B, ["mousePitch"]), this._add("mousePitch", N, ["mouseRotate"]), s.interactive && s.dragRotate && d.dragRotate.enable();
22939
22939
  const q = (({ enable: he, clickTolerance: ee }) => {
22940
22940
  const me = new Yc({ checkCorrectEvent: (ge) => M.mouseButton(ge) === 0 && !ge.ctrlKey });
22941
22941
  return new Zs({ clickTolerance: ee, move: (ge, be) => ({ around: be, panDelta: be.sub(ge) }), activateOnStart: !0, moveStateManager: me, enable: he, assignEvents: Xc });
@@ -22993,41 +22993,41 @@ uniform ${F} ${B} u_${q};
22993
22993
  _updateMapTransform(s, d, f) {
22994
22994
  const m = this._map, v = m._getTransformForUpdate(), C = m.terrain;
22995
22995
  if (!(Qc(s) || C && this._terrainMovement)) return this._fireEvents(d, f, !0);
22996
- let { panDelta: A, zoomDelta: D, bearingDelta: R, pitchDelta: F, around: B, pinchAround: q } = s;
22997
- q !== void 0 && (B = q), m._stop(!0), B = B || m.transform.centerPoint;
22998
- const K = v.pointLocation(A ? B.sub(A) : B);
22999
- R && (v.bearing += R), F && (v.pitch += F), D && (v.zoom += D), C ? this._terrainMovement || !d.drag && !d.zoom ? d.drag && this._terrainMovement ? v.center = v.pointLocation(v.centerPoint.sub(A)) : v.setLocationAtPoint(K, B) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, v.setLocationAtPoint(K, B)) : v.setLocationAtPoint(K, B), m._applyUpdatedTransform(v), this._map._update(), s.noInertia || this._inertia.record(s), this._fireEvents(d, f, !0);
22996
+ let { panDelta: A, zoomDelta: D, bearingDelta: R, pitchDelta: B, around: N, pinchAround: q } = s;
22997
+ q !== void 0 && (N = q), m._stop(!0), N = N || m.transform.centerPoint;
22998
+ const K = v.pointLocation(A ? N.sub(A) : N);
22999
+ R && (v.bearing += R), B && (v.pitch += B), D && (v.zoom += D), C ? this._terrainMovement || !d.drag && !d.zoom ? d.drag && this._terrainMovement ? v.center = v.pointLocation(v.centerPoint.sub(A)) : v.setLocationAtPoint(K, N) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, v.setLocationAtPoint(K, N)) : v.setLocationAtPoint(K, N), m._applyUpdatedTransform(v), this._map._update(), s.noInertia || this._inertia.record(s), this._fireEvents(d, f, !0);
23000
23000
  }
23001
23001
  _fireEvents(s, d, f) {
23002
23002
  const m = Br(this._eventsInProgress), v = Br(s), C = {};
23003
- for (const B in s) {
23004
- const { originalEvent: q } = s[B];
23005
- this._eventsInProgress[B] || (C[`${B}start`] = q), this._eventsInProgress[B] = s[B];
23003
+ for (const N in s) {
23004
+ const { originalEvent: q } = s[N];
23005
+ this._eventsInProgress[N] || (C[`${N}start`] = q), this._eventsInProgress[N] = s[N];
23006
23006
  }
23007
23007
  !m && v && this._fireEvent("movestart", v.originalEvent);
23008
- for (const B in C) this._fireEvent(B, C[B]);
23008
+ for (const N in C) this._fireEvent(N, C[N]);
23009
23009
  v && this._fireEvent("move", v.originalEvent);
23010
- for (const B in s) {
23011
- const { originalEvent: q } = s[B];
23012
- this._fireEvent(B, q);
23010
+ for (const N in s) {
23011
+ const { originalEvent: q } = s[N];
23012
+ this._fireEvent(N, q);
23013
23013
  }
23014
23014
  const A = {};
23015
23015
  let D;
23016
- for (const B in this._eventsInProgress) {
23017
- const { handlerName: q, originalEvent: K } = this._eventsInProgress[B];
23018
- this._handlersById[q].isActive() || (delete this._eventsInProgress[B], D = d[q] || K, A[`${B}end`] = D);
23016
+ for (const N in this._eventsInProgress) {
23017
+ const { handlerName: q, originalEvent: K } = this._eventsInProgress[N];
23018
+ this._handlersById[q].isActive() || (delete this._eventsInProgress[N], D = d[q] || K, A[`${N}end`] = D);
23019
23019
  }
23020
- for (const B in A) this._fireEvent(B, A[B]);
23021
- const R = Br(this._eventsInProgress), F = (m || v) && !R;
23022
- if (F && this._terrainMovement) {
23020
+ for (const N in A) this._fireEvent(N, A[N]);
23021
+ const R = Br(this._eventsInProgress), B = (m || v) && !R;
23022
+ if (B && this._terrainMovement) {
23023
23023
  this._map._elevationFreeze = !1, this._terrainMovement = !1;
23024
- const B = this._map._getTransformForUpdate();
23025
- B.recalculateZoom(this._map.terrain), this._map._applyUpdatedTransform(B);
23024
+ const N = this._map._getTransformForUpdate();
23025
+ N.recalculateZoom(this._map.terrain), this._map._applyUpdatedTransform(N);
23026
23026
  }
23027
- if (f && F) {
23027
+ if (f && B) {
23028
23028
  this._updatingCamera = !0;
23029
- const B = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), q = (K) => K !== 0 && -this._bearingSnap < K && K < this._bearingSnap;
23030
- !B || !B.essential && k.prefersReducedMotion ? (this._map.fire(new a.k("moveend", { originalEvent: D })), q(this._map.getBearing()) && this._map.resetNorth()) : (q(B.bearing || this._map.getBearing()) && (B.bearing = 0), B.freezeElevation = !0, this._map.easeTo(B, { originalEvent: D })), this._updatingCamera = !1;
23029
+ const N = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), q = (K) => K !== 0 && -this._bearingSnap < K && K < this._bearingSnap;
23030
+ !N || !N.essential && k.prefersReducedMotion ? (this._map.fire(new a.k("moveend", { originalEvent: D })), q(this._map.getBearing()) && this._map.resetNorth()) : (q(N.bearing || this._map.getBearing()) && (N.bearing = 0), N.freezeElevation = !0, this._map.easeTo(N, { originalEvent: D })), this._updatingCamera = !1;
23031
23031
  }
23032
23032
  }
23033
23033
  _fireEvent(s, d) {
@@ -23120,10 +23120,10 @@ uniform ${F} ${B} u_${q};
23120
23120
  m.padding = { top: Ge, bottom: Ge, right: Ge, left: Ge };
23121
23121
  }
23122
23122
  m.padding = a.e(v, m.padding);
23123
- const C = this.transform, A = C.padding, D = new Se(s, d), R = C.project(D.getNorthWest()), F = C.project(D.getNorthEast()), B = C.project(D.getSouthEast()), q = C.project(D.getSouthWest()), K = a.ba(-f), J = R.rotate(K), ne = F.rotate(K), ae = B.rotate(K), le = q.rotate(K), he = new a.P(Math.max(J.x, ne.x, le.x, ae.x), Math.max(J.y, ne.y, le.y, ae.y)), ee = new a.P(Math.min(J.x, ne.x, le.x, ae.x), Math.min(J.y, ne.y, le.y, ae.y)), me = he.sub(ee), ge = (C.width - (A.left + A.right + m.padding.left + m.padding.right)) / me.x, be = (C.height - (A.top + A.bottom + m.padding.top + m.padding.bottom)) / me.y;
23123
+ const C = this.transform, A = C.padding, D = new Se(s, d), R = C.project(D.getNorthWest()), B = C.project(D.getNorthEast()), N = C.project(D.getSouthEast()), q = C.project(D.getSouthWest()), K = a.ba(-f), J = R.rotate(K), ne = B.rotate(K), ae = N.rotate(K), le = q.rotate(K), he = new a.P(Math.max(J.x, ne.x, le.x, ae.x), Math.max(J.y, ne.y, le.y, ae.y)), ee = new a.P(Math.min(J.x, ne.x, le.x, ae.x), Math.min(J.y, ne.y, le.y, ae.y)), me = he.sub(ee), ge = (C.width - (A.left + A.right + m.padding.left + m.padding.right)) / me.x, be = (C.height - (A.top + A.bottom + m.padding.top + m.padding.bottom)) / me.y;
23124
23124
  if (be < 0 || ge < 0) return void a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
23125
23125
  const Re = Math.min(C.scaleZoom(C.scale * Math.min(ge, be)), m.maxZoom), $e = a.P.convert(m.offset), Je = new a.P((m.padding.left - m.padding.right) / 2, (m.padding.top - m.padding.bottom) / 2).rotate(a.ba(f)), rt = $e.add(Je).mult(C.scale / C.zoomScale(Re));
23126
- return { center: C.unproject(R.add(B).div(2).sub(rt)), zoom: Re, bearing: f };
23126
+ return { center: C.unproject(R.add(N).div(2).sub(rt)), zoom: Re, bearing: f };
23127
23127
  }
23128
23128
  fitBounds(s, d, f) {
23129
23129
  return this._fitInternal(this.cameraForBounds(s, d), d, f);
@@ -23141,16 +23141,16 @@ uniform ${F} ${B} u_${q};
23141
23141
  return "zoom" in s && f.zoom !== +s.zoom && (m = !0, f.zoom = +s.zoom), s.center !== void 0 && (f.center = a.N.convert(s.center)), "bearing" in s && f.bearing !== +s.bearing && (v = !0, f.bearing = +s.bearing), "pitch" in s && f.pitch !== +s.pitch && (C = !0, f.pitch = +s.pitch), s.padding == null || f.isPaddingEqual(s.padding) || (f.padding = s.padding), this._applyUpdatedTransform(f), this.fire(new a.k("movestart", d)).fire(new a.k("move", d)), m && this.fire(new a.k("zoomstart", d)).fire(new a.k("zoom", d)).fire(new a.k("zoomend", d)), v && this.fire(new a.k("rotatestart", d)).fire(new a.k("rotate", d)).fire(new a.k("rotateend", d)), C && this.fire(new a.k("pitchstart", d)).fire(new a.k("pitch", d)).fire(new a.k("pitchend", d)), this.fire(new a.k("moveend", d));
23142
23142
  }
23143
23143
  calculateCameraOptionsFromTo(s, d, f, m = 0) {
23144
- const v = a.Z.fromLngLat(s, d), C = a.Z.fromLngLat(f, m), A = C.x - v.x, D = C.y - v.y, R = C.z - v.z, F = Math.hypot(A, D, R);
23145
- if (F === 0) throw new Error("Can't calculate camera options with same From and To");
23146
- const B = Math.hypot(A, D), q = this.transform.scaleZoom(this.transform.cameraToCenterDistance / F / this.transform.tileSize), K = 180 * Math.atan2(A, -D) / Math.PI;
23147
- let J = 180 * Math.acos(B / F) / Math.PI;
23144
+ const v = a.Z.fromLngLat(s, d), C = a.Z.fromLngLat(f, m), A = C.x - v.x, D = C.y - v.y, R = C.z - v.z, B = Math.hypot(A, D, R);
23145
+ if (B === 0) throw new Error("Can't calculate camera options with same From and To");
23146
+ const N = Math.hypot(A, D), q = this.transform.scaleZoom(this.transform.cameraToCenterDistance / B / this.transform.tileSize), K = 180 * Math.atan2(A, -D) / Math.PI;
23147
+ let J = 180 * Math.acos(N / B) / Math.PI;
23148
23148
  return J = R < 0 ? 90 - J : 90 + J, { center: C.toLngLat(), zoom: q, pitch: J, bearing: K };
23149
23149
  }
23150
23150
  easeTo(s, d) {
23151
23151
  var f;
23152
23152
  this._stop(!1, s.easeId), ((s = a.e({ offset: [0, 0], duration: 500, easing: a.b9 }, s)).animate === !1 || !s.essential && k.prefersReducedMotion) && (s.duration = 0);
23153
- const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C, F = "pitch" in s ? +s.pitch : A, B = "padding" in s ? s.padding : m.padding, q = a.P.convert(s.offset);
23153
+ const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C, B = "pitch" in s ? +s.pitch : A, N = "padding" in s ? s.padding : m.padding, q = a.P.convert(s.offset);
23154
23154
  let K = m.centerPoint.add(q);
23155
23155
  const J = m.pointLocation(K), { center: ne, zoom: ae } = m.getConstrained(a.N.convert(s.center || J), (f = s.zoom) !== null && f !== void 0 ? f : v);
23156
23156
  this._normalizeCenter(ne, m);
@@ -23158,8 +23158,8 @@ uniform ${F} ${B} u_${q};
23158
23158
  let me, ge;
23159
23159
  s.around && (me = a.N.convert(s.around), ge = m.locationPoint(me));
23160
23160
  const be = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
23161
- return this._zooming = this._zooming || ae !== v, this._rotating = this._rotating || C !== R, this._pitching = this._pitching || F !== A, this._padding = !m.isPaddingEqual(B), this._easeId = s.easeId, this._prepareEase(d, s.noMoveStart, be), this.terrain && this._prepareElevation(ne), this._ease((Re) => {
23162
- if (this._zooming && (m.zoom = a.y.number(v, ae, Re)), this._rotating && (m.bearing = a.y.number(C, R, Re)), this._pitching && (m.pitch = a.y.number(A, F, Re)), this._padding && (m.interpolatePadding(D, B, Re), K = m.centerPoint.add(q)), this.terrain && !s.freezeElevation && this._updateElevation(Re), me) m.setLocationAtPoint(me, ge);
23161
+ return this._zooming = this._zooming || ae !== v, this._rotating = this._rotating || C !== R, this._pitching = this._pitching || B !== A, this._padding = !m.isPaddingEqual(N), this._easeId = s.easeId, this._prepareEase(d, s.noMoveStart, be), this.terrain && this._prepareElevation(ne), this._ease((Re) => {
23162
+ if (this._zooming && (m.zoom = a.y.number(v, ae, Re)), this._rotating && (m.bearing = a.y.number(C, R, Re)), this._pitching && (m.pitch = a.y.number(A, B, Re)), this._padding && (m.interpolatePadding(D, N, Re), K = m.centerPoint.add(q)), this.terrain && !s.freezeElevation && this._updateElevation(Re), me) m.setLocationAtPoint(me, ge);
23163
23163
  else {
23164
23164
  const $e = m.zoomScale(m.zoom - v), Je = ae > v ? Math.min(2, ee) : Math.max(0.5, ee), rt = Math.pow(Je, 1 - Re), Ge = m.unproject(le.add(he.mult(Re * rt)).mult($e));
23165
23165
  m.setLocationAtPoint(m.renderWorldCopies ? Ge.wrap() : Ge, K);
@@ -23203,8 +23203,8 @@ uniform ${F} ${B} u_${q};
23203
23203
  if (this.terrain && d.push((m) => this._elevateCameraIfInsideTerrain(m)), this.transformCameraUpdate && d.push((m) => this.transformCameraUpdate(m)), !d.length) return;
23204
23204
  const f = s.clone();
23205
23205
  for (const m of d) {
23206
- const v = f.clone(), { center: C, zoom: A, pitch: D, bearing: R, elevation: F } = m(v);
23207
- C && (v.center = C), A !== void 0 && (v.zoom = A), D !== void 0 && (v.pitch = D), R !== void 0 && (v.bearing = R), F !== void 0 && (v.elevation = F), f.apply(v);
23206
+ const v = f.clone(), { center: C, zoom: A, pitch: D, bearing: R, elevation: B } = m(v);
23207
+ C && (v.center = C), A !== void 0 && (v.zoom = A), D !== void 0 && (v.pitch = D), R !== void 0 && (v.bearing = R), B !== void 0 && (v.elevation = B), f.apply(v);
23208
23208
  }
23209
23209
  this.transform.apply(f);
23210
23210
  }
@@ -23224,7 +23224,7 @@ uniform ${F} ${B} u_${q};
23224
23224
  return this.jumpTo(it, d);
23225
23225
  }
23226
23226
  this.stop(), s = a.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: a.b9 }, s);
23227
- const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C, F = "pitch" in s ? +s.pitch : A, B = "padding" in s ? s.padding : m.padding, q = a.P.convert(s.offset);
23227
+ const m = this._getTransformForUpdate(), v = m.zoom, C = m.bearing, A = m.pitch, D = m.padding, R = "bearing" in s ? this._normalizeBearing(s.bearing, C) : C, B = "pitch" in s ? +s.pitch : A, N = "padding" in s ? s.padding : m.padding, q = a.P.convert(s.offset);
23228
23228
  let K = m.centerPoint.add(q);
23229
23229
  const J = m.pointLocation(K), { center: ne, zoom: ae } = m.getConstrained(a.N.convert(s.center || J), (f = s.zoom) !== null && f !== void 0 ? f : v);
23230
23230
  this._normalizeCenter(ne, m);
@@ -23258,9 +23258,9 @@ uniform ${F} ${B} u_${q};
23258
23258
  const it = be < ge ? -1 : 1;
23259
23259
  Ze = Math.abs(Math.log(be / ge)) / me, Lt = () => 0, pt = (Ot) => Math.exp(it * me * Ot);
23260
23260
  }
23261
- return s.duration = "duration" in s ? +s.duration : 1e3 * Ze / ("screenSpeed" in s ? +s.screenSpeed / me : +s.speed), s.maxDuration && s.duration > s.maxDuration && (s.duration = 0), this._zooming = !0, this._rotating = C !== R, this._pitching = F !== A, this._padding = !m.isPaddingEqual(B), this._prepareEase(d, !1), this.terrain && this._prepareElevation(ne), this._ease((it) => {
23261
+ return s.duration = "duration" in s ? +s.duration : 1e3 * Ze / ("screenSpeed" in s ? +s.screenSpeed / me : +s.speed), s.maxDuration && s.duration > s.maxDuration && (s.duration = 0), this._zooming = !0, this._rotating = C !== R, this._pitching = B !== A, this._padding = !m.isPaddingEqual(N), this._prepareEase(d, !1), this.terrain && this._prepareElevation(ne), this._ease((it) => {
23262
23262
  const Ot = it * Ze, Vi = 1 / pt(Ot);
23263
- m.zoom = it === 1 ? ae : v + m.scaleZoom(Vi), this._rotating && (m.bearing = a.y.number(C, R, it)), this._pitching && (m.pitch = a.y.number(A, F, it)), this._padding && (m.interpolatePadding(D, B, it), K = m.centerPoint.add(q)), this.terrain && !s.freezeElevation && this._updateElevation(it);
23263
+ m.zoom = it === 1 ? ae : v + m.scaleZoom(Vi), this._rotating && (m.bearing = a.y.number(C, R, it)), this._pitching && (m.pitch = a.y.number(A, B, it)), this._padding && (m.interpolatePadding(D, N, it), K = m.centerPoint.add(q)), this.terrain && !s.freezeElevation && this._updateElevation(it);
23264
23264
  const Vt = it === 1 ? ne : m.unproject(he.add(ee.mult(Lt(Ot))).mult(Vi));
23265
23265
  m.setLocationAtPoint(m.renderWorldCopies ? Vt.wrap() : Vt, K), this._applyUpdatedTransform(m), this._fireMoveEvents(d);
23266
23266
  }, () => {
@@ -23464,8 +23464,8 @@ uniform ${F} ${B} u_${q};
23464
23464
  const D = function(J, ne, ae) {
23465
23465
  var le = ne[0], he = ne[1];
23466
23466
  return J[0] = ae[0] * le + ae[4] * he + ae[12], J[1] = ae[1] * le + ae[5] * he + ae[13], J;
23467
- }([], [d / m * a.X, f / m * a.X], C.u_terrain_matrix), R = [D[0] * A.dim, D[1] * A.dim], F = Math.floor(R[0]), B = Math.floor(R[1]), q = R[0] - F, K = R[1] - B;
23468
- return A.get(F, B) * (1 - q) * (1 - K) + A.get(F + 1, B) * q * (1 - K) + A.get(F, B + 1) * (1 - q) * K + A.get(F + 1, B + 1) * q * K;
23467
+ }([], [d / m * a.X, f / m * a.X], C.u_terrain_matrix), R = [D[0] * A.dim, D[1] * A.dim], B = Math.floor(R[0]), N = Math.floor(R[1]), q = R[0] - B, K = R[1] - N;
23468
+ return A.get(B, N) * (1 - q) * (1 - K) + A.get(B + 1, N) * q * (1 - K) + A.get(B, N + 1) * (1 - q) * K + A.get(B + 1, N + 1) * q * K;
23469
23469
  }
23470
23470
  getElevationForLngLatZoom(s, d) {
23471
23471
  if (!a.bb(d, s.wrap())) return 0;
@@ -23511,10 +23511,10 @@ uniform ${F} ${B} u_${q};
23511
23511
  this.painter.maybeDrawDepthAndCoords(!0);
23512
23512
  const d = new Uint8Array(4), f = this.painter.context, m = f.gl, v = Math.round(s.x * this.painter.pixelRatio / devicePixelRatio), C = Math.round(s.y * this.painter.pixelRatio / devicePixelRatio), A = Math.round(this.painter.height / devicePixelRatio);
23513
23513
  f.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), m.readPixels(v, A - C - 1, 1, 1, m.RGBA, m.UNSIGNED_BYTE, d), f.bindFramebuffer.set(null);
23514
- const D = d[0] + (d[2] >> 4 << 8), R = d[1] + ((15 & d[2]) << 8), F = this.coordsIndex[255 - d[3]], B = F && this.sourceCache.getTileByID(F);
23515
- if (!B) return null;
23516
- const q = this._coordsTextureSize, K = (1 << B.tileID.canonical.z) * q;
23517
- return new a.Z((B.tileID.canonical.x * q + D) / K + B.tileID.wrap, (B.tileID.canonical.y * q + R) / K, this.getElevation(B.tileID, D, R, q));
23514
+ const D = d[0] + (d[2] >> 4 << 8), R = d[1] + ((15 & d[2]) << 8), B = this.coordsIndex[255 - d[3]], N = B && this.sourceCache.getTileByID(B);
23515
+ if (!N) return null;
23516
+ const q = this._coordsTextureSize, K = (1 << N.tileID.canonical.z) * q;
23517
+ return new a.Z((N.tileID.canonical.x * q + D) / K + N.tileID.wrap, (N.tileID.canonical.y * q + R) / K, this.getElevation(N.tileID, D, R, q));
23518
23518
  }
23519
23519
  depthAtPoint(s) {
23520
23520
  const d = new Uint8Array(4), f = this.painter.context, m = f.gl;
@@ -23523,14 +23523,14 @@ uniform ${F} ${B} u_${q};
23523
23523
  getTerrainMesh() {
23524
23524
  if (this._mesh) return this._mesh;
23525
23525
  const s = this.painter.context, d = new a.bd(), f = new a.aY(), m = this.meshSize, v = a.X / m, C = m * m;
23526
- for (let B = 0; B <= m; B++) for (let q = 0; q <= m; q++) d.emplaceBack(q * v, B * v, 0);
23527
- for (let B = 0; B < C; B += m + 1) for (let q = 0; q < m; q++) f.emplaceBack(q + B, m + q + B + 1, m + q + B + 2), f.emplaceBack(q + B, m + q + B + 2, q + B + 1);
23526
+ for (let N = 0; N <= m; N++) for (let q = 0; q <= m; q++) d.emplaceBack(q * v, N * v, 0);
23527
+ for (let N = 0; N < C; N += m + 1) for (let q = 0; q < m; q++) f.emplaceBack(q + N, m + q + N + 1, m + q + N + 2), f.emplaceBack(q + N, m + q + N + 2, q + N + 1);
23528
23528
  const A = d.length, D = A + 2 * (m + 1);
23529
- for (const B of [0, 1]) for (let q = 0; q <= m; q++) for (const K of [0, 1]) d.emplaceBack(q * v, B * a.X, K);
23530
- for (let B = 0; B < 2 * m; B += 2) f.emplaceBack(D + B, D + B + 1, D + B + 3), f.emplaceBack(D + B, D + B + 3, D + B + 2), f.emplaceBack(A + B, A + B + 3, A + B + 1), f.emplaceBack(A + B, A + B + 2, A + B + 3);
23531
- const R = d.length, F = R + 2 * (m + 1);
23532
- for (const B of [0, 1]) for (let q = 0; q <= m; q++) for (const K of [0, 1]) d.emplaceBack(B * a.X, q * v, K);
23533
- for (let B = 0; B < 2 * m; B += 2) f.emplaceBack(R + B, R + B + 1, R + B + 3), f.emplaceBack(R + B, R + B + 3, R + B + 2), f.emplaceBack(F + B, F + B + 3, F + B + 1), f.emplaceBack(F + B, F + B + 2, F + B + 3);
23529
+ for (const N of [0, 1]) for (let q = 0; q <= m; q++) for (const K of [0, 1]) d.emplaceBack(q * v, N * a.X, K);
23530
+ for (let N = 0; N < 2 * m; N += 2) f.emplaceBack(D + N, D + N + 1, D + N + 3), f.emplaceBack(D + N, D + N + 3, D + N + 2), f.emplaceBack(A + N, A + N + 3, A + N + 1), f.emplaceBack(A + N, A + N + 2, A + N + 3);
23531
+ const R = d.length, B = R + 2 * (m + 1);
23532
+ for (const N of [0, 1]) for (let q = 0; q <= m; q++) for (const K of [0, 1]) d.emplaceBack(N * a.X, q * v, K);
23533
+ for (let N = 0; N < 2 * m; N += 2) f.emplaceBack(R + N, R + N + 1, R + N + 3), f.emplaceBack(R + N, R + N + 3, R + N + 2), f.emplaceBack(B + N, B + N + 3, B + N + 1), f.emplaceBack(B + N, B + N + 2, B + N + 3);
23534
23534
  return this._mesh = new Uc(s.createVertexBuffer(d, Yh.members), s.createIndexBuffer(f), a.a0.simpleSegment(0, 0, d.length, f.length)), this._mesh;
23535
23535
  }
23536
23536
  getMeshFrameDelta(s) {
@@ -23638,8 +23638,8 @@ uniform ${F} ${B} u_${q};
23638
23638
  const D = this.pool.getOrCreateFreeObject();
23639
23639
  this.pool.useObject(D), this.pool.stampObject(D), A.rtt[v] = { id: D.id, stamp: D.stamp }, f.context.bindFramebuffer.set(D.fbo.framebuffer), f.context.clear({ color: a.aM.transparent, stencil: 0 }), f.currentStencilSource = void 0;
23640
23640
  for (let R = 0; R < C.length; R++) {
23641
- const F = f.style._layers[C[R]], B = F.source ? this._coordsDescendingInv[F.source][A.tileID.key] : [A.tileID];
23642
- f.context.viewport.set([0, 0, D.fbo.width, D.fbo.height]), f._renderTileClippingMasks(F, B), f.renderLayer(f, f.style.sourceCaches[F.source], F, B), F.source && (A.rttCoords[F.source] = this._coordsDescendingInvStr[F.source][A.tileID.key]);
23641
+ const B = f.style._layers[C[R]], N = B.source ? this._coordsDescendingInv[B.source][A.tileID.key] : [A.tileID];
23642
+ f.context.viewport.set([0, 0, D.fbo.width, D.fbo.height]), f._renderTileClippingMasks(B, N), f.renderLayer(f, f.style.sourceCaches[B.source], B, N), B.source && (A.rttCoords[B.source] = this._coordsDescendingInvStr[B.source][A.tileID.key]);
23643
23643
  }
23644
23644
  }
23645
23645
  return Hp(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects(), Ba[d];
@@ -23670,10 +23670,10 @@ uniform ${F} ${B} u_${q};
23670
23670
  const m = s.dragRotate._mouseRotate.getClickTolerance(), v = s.dragRotate._mousePitch.getClickTolerance();
23671
23671
  this.element = d, this.mouseRotate = Nh({ clickTolerance: m, enable: !0 }), this.touchRotate = (({ enable: C, clickTolerance: A, bearingDegreesPerPixelMoved: D = 0.8 }) => {
23672
23672
  const R = new Bh();
23673
- return new Zs({ clickTolerance: A, move: (F, B) => ({ bearingDelta: (B.x - F.x) * D }), moveStateManager: R, enable: C, assignEvents: Jh });
23673
+ return new Zs({ clickTolerance: A, move: (B, N) => ({ bearingDelta: (N.x - B.x) * D }), moveStateManager: R, enable: C, assignEvents: Jh });
23674
23674
  })({ clickTolerance: m, enable: !0 }), this.map = s, f && (this.mousePitch = $h({ clickTolerance: v, enable: !0 }), this.touchPitch = (({ enable: C, clickTolerance: A, pitchDegreesPerPixelMoved: D = -0.5 }) => {
23675
23675
  const R = new Bh();
23676
- return new Zs({ clickTolerance: A, move: (F, B) => ({ pitchDelta: (B.y - F.y) * D }), moveStateManager: R, enable: C, assignEvents: Jh });
23676
+ return new Zs({ clickTolerance: A, move: (B, N) => ({ pitchDelta: (N.y - B.y) * D }), moveStateManager: R, enable: C, assignEvents: Jh });
23677
23677
  })({ clickTolerance: v, enable: !0 })), M.addEventListener(d, "mousedown", this.mousedown), M.addEventListener(d, "touchstart", this.touchstart, { passive: !1 }), M.addEventListener(d, "touchcancel", this.reset);
23678
23678
  }
23679
23679
  startMouse(s, d) {
@@ -23772,12 +23772,12 @@ uniform ${F} ${B} u_${q};
23772
23772
  }
23773
23773
  const R = M.createNS("http://www.w3.org/2000/svg", "g");
23774
23774
  R.setAttributeNS(null, "fill", this._color);
23775
- const F = M.createNS("http://www.w3.org/2000/svg", "path");
23776
- F.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), R.appendChild(F);
23777
- const B = M.createNS("http://www.w3.org/2000/svg", "g");
23778
- B.setAttributeNS(null, "opacity", "0.25"), B.setAttributeNS(null, "fill", "#000000");
23775
+ const B = M.createNS("http://www.w3.org/2000/svg", "path");
23776
+ B.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), R.appendChild(B);
23777
+ const N = M.createNS("http://www.w3.org/2000/svg", "g");
23778
+ N.setAttributeNS(null, "opacity", "0.25"), N.setAttributeNS(null, "fill", "#000000");
23779
23779
  const q = M.createNS("http://www.w3.org/2000/svg", "path");
23780
- q.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), B.appendChild(q);
23780
+ q.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), N.appendChild(q);
23781
23781
  const K = M.createNS("http://www.w3.org/2000/svg", "g");
23782
23782
  K.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), K.setAttributeNS(null, "fill", "#FFFFFF");
23783
23783
  const J = M.createNS("http://www.w3.org/2000/svg", "g");
@@ -23785,7 +23785,7 @@ uniform ${F} ${B} u_${q};
23785
23785
  const ne = M.createNS("http://www.w3.org/2000/svg", "circle");
23786
23786
  ne.setAttributeNS(null, "fill", "#000000"), ne.setAttributeNS(null, "opacity", "0.25"), ne.setAttributeNS(null, "cx", "5.5"), ne.setAttributeNS(null, "cy", "5.5"), ne.setAttributeNS(null, "r", "5.4999962");
23787
23787
  const ae = M.createNS("http://www.w3.org/2000/svg", "circle");
23788
- ae.setAttributeNS(null, "fill", "#FFFFFF"), ae.setAttributeNS(null, "cx", "5.5"), ae.setAttributeNS(null, "cy", "5.5"), ae.setAttributeNS(null, "r", "5.4999962"), J.appendChild(ne), J.appendChild(ae), C.appendChild(A), C.appendChild(R), C.appendChild(B), C.appendChild(K), C.appendChild(J), d.appendChild(C), d.setAttributeNS(null, "height", f * this._scale + "px"), d.setAttributeNS(null, "width", m * this._scale + "px"), this._element.appendChild(d), this._offset = a.P.convert(s && s.offset || [0, -14]);
23788
+ ae.setAttributeNS(null, "fill", "#FFFFFF"), ae.setAttributeNS(null, "cx", "5.5"), ae.setAttributeNS(null, "cy", "5.5"), ae.setAttributeNS(null, "r", "5.4999962"), J.appendChild(ne), J.appendChild(ae), C.appendChild(A), C.appendChild(R), C.appendChild(N), C.appendChild(K), C.appendChild(J), d.appendChild(C), d.setAttributeNS(null, "height", f * this._scale + "px"), d.setAttributeNS(null, "width", m * this._scale + "px"), this._element.appendChild(d), this._offset = a.P.convert(s && s.offset || [0, -14]);
23789
23789
  }
23790
23790
  if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (d) => {
23791
23791
  d.preventDefault();
@@ -23841,8 +23841,8 @@ uniform ${F} ${B} u_${q};
23841
23841
  }
23842
23842
  const m = this._map, v = m.terrain.depthAtPoint(this._pos), C = m.terrain.getElevationForLngLatZoom(this._lngLat, m.transform.tileZoom);
23843
23843
  if (m.transform.lngLatToCameraDepth(this._lngLat, C) - v < 6e-3) return void (this._element.style.opacity = this._opacity);
23844
- const A = -this._offset.y / m.transform._pixelPerMeter, D = Math.sin(m.getPitch() * Math.PI / 180) * A, R = m.terrain.depthAtPoint(new a.P(this._pos.x, this._pos.y - this._offset.y)), F = m.transform.lngLatToCameraDepth(this._lngLat, C + D) - R > 6e-3;
23845
- !((f = this._popup) === null || f === void 0) && f.isOpen() && F && this._popup.remove(), this._element.style.opacity = F ? this._opacityWhenCovered : this._opacity;
23844
+ const A = -this._offset.y / m.transform._pixelPerMeter, D = Math.sin(m.getPitch() * Math.PI / 180) * A, R = m.terrain.depthAtPoint(new a.P(this._pos.x, this._pos.y - this._offset.y)), B = m.transform.lngLatToCameraDepth(this._lngLat, C + D) - R > 6e-3;
23845
+ !((f = this._popup) === null || f === void 0) && f.isOpen() && B && this._popup.remove(), this._element.style.opacity = B ? this._opacityWhenCovered : this._opacity;
23846
23846
  }
23847
23847
  getOffset() {
23848
23848
  return this._offset;
@@ -24436,13 +24436,13 @@ uniform ${F} ${B} u_${q};
24436
24436
  if (this._lazyInitEmptyStyle(), !(s instanceof HTMLImageElement || a.b(s))) {
24437
24437
  if (s.width === void 0 || s.height === void 0) return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
24438
24438
  {
24439
- const { width: F, height: B, data: q } = s, K = s;
24440
- return this.style.addImage(x, { data: new a.R({ width: F, height: B }, new Uint8Array(q)), pixelRatio: f, stretchX: v, stretchY: C, content: A, textFitWidth: D, textFitHeight: R, sdf: m, version: 0, userImage: K }), K.onAdd && K.onAdd(this, x), this;
24439
+ const { width: B, height: N, data: q } = s, K = s;
24440
+ return this.style.addImage(x, { data: new a.R({ width: B, height: N }, new Uint8Array(q)), pixelRatio: f, stretchX: v, stretchY: C, content: A, textFitWidth: D, textFitHeight: R, sdf: m, version: 0, userImage: K }), K.onAdd && K.onAdd(this, x), this;
24441
24441
  }
24442
24442
  }
24443
24443
  {
24444
- const { width: F, height: B, data: q } = k.getImageData(s);
24445
- this.style.addImage(x, { data: new a.R({ width: F, height: B }, q), pixelRatio: f, stretchX: v, stretchY: C, content: A, textFitWidth: D, textFitHeight: R, sdf: m, version: 0 });
24444
+ const { width: B, height: N, data: q } = k.getImageData(s);
24445
+ this.style.addImage(x, { data: new a.R({ width: B, height: N }, q), pixelRatio: f, stretchX: v, stretchY: C, content: A, textFitWidth: D, textFitHeight: R, sdf: m, version: 0 });
24446
24446
  }
24447
24447
  }
24448
24448
  updateImage(x, s) {
@@ -24928,7 +24928,7 @@ function eF(t) {
24928
24928
  return `${((1 << 24) + (parseInt(e[0], 10) << 16) + (parseInt(e[1], 10) << 8) + parseInt(e[2], 10)).toString(16).slice(1)}`;
24929
24929
  }
24930
24930
  Hr.point = async (t = {}, e = {}, i = null) => {
24931
- var k, M, P, I, N, V, W, se, ce, Q, Oe, ke;
24931
+ var k, M, P, I, F, V, W, se, ce, Q, Oe, ke;
24932
24932
  e || (e = {}), ((k = e == null ? void 0 : e.width) == null ? void 0 : k[0]) === "[" && (e.width = { stops: JSON.parse(e.width) }), typeof (e == null ? void 0 : e.width) == "string" && (e.width -= 0), typeof (e == null ? void 0 : e.opacity) == "string" && (e.opacity = (e.opacity - 0) * 100);
24933
24933
  const n = ((M = t.style) == null ? void 0 : M.colorAttr) || ((P = t.style) == null ? void 0 : P.iconCls);
24934
24934
  let r = {
@@ -24938,7 +24938,7 @@ Hr.point = async (t = {}, e = {}, i = null) => {
24938
24938
  pin: "pin-xl-{{marker}}+sdf.png"
24939
24939
  }[e.iconType] || (e == null ? void 0 : e.icon);
24940
24940
  const [l, u] = (r == null ? void 0 : r.split("-")) || [], a = ((I = t.style) == null ? void 0 : I.color) || "blue";
24941
- !((N = t.style) != null && N.iconAttr) && (r != null && r.includes("{{marker}}")) && (r = r.replace("{{marker}}", "fa-star"));
24941
+ !((F = t.style) != null && F.iconAttr) && (r != null && r.includes("{{marker}}")) && (r = r.replace("{{marker}}", "fa-star"));
24942
24942
  const g = "gray", _ = (Pe, Xe) => `${Pe == null ? void 0 : Pe.split("+")[0]}+${Xe.replace("#", "")}.png`;
24943
24943
  if (t.legendAuto = { icon: [], color: [] }, (V = t.style) != null && V.iconAttr && r) {
24944
24944
  const Pe = (se = (W = t.meta) == null ? void 0 : W.columns) == null ? void 0 : se.find((ze) => {
@@ -25270,11 +25270,11 @@ Hr.line = (t = {}, e = {}) => [{
25270
25270
  Hr.linestring = Hr.line;
25271
25271
  Hr.circle = Hr.point;
25272
25272
  async function tF(t, e, i) {
25273
- var a, g, _, S, k, M, P, I, N, V, W, se;
25273
+ var a, g, _, S, k, M, P, I, F, V, W, se;
25274
25274
  typeof e.style == "string" && (e.style = e.style[0] === "{" ? JSON.parse(e.style) : (a = window.YAML.parse(e.style)) == null ? void 0 : a.style), (_ = (g = e.style) == null ? void 0 : g.filter) == null || _.call(g, (ce) => ce.source).forEach((ce) => {
25275
25275
  ce.lsource = `${e.id}-${ce.source}`;
25276
25276
  });
25277
- const n = ((S = e == null ? void 0 : e.style) == null ? void 0 : S.type) || ((W = ((P = (M = (k = e == null ? void 0 : e.meta) == null ? void 0 : k.geom) == null ? void 0 : M.geometry) == null ? void 0 : P.length) > 2 ? ["point"] : [((V = (N = (I = e == null ? void 0 : e.meta) == null ? void 0 : I.geom) == null ? void 0 : N.geometry) == null ? void 0 : V[0].toLowerCase()) || "point"]) == null ? void 0 : W.map((ce) => {
25277
+ const n = ((S = e == null ? void 0 : e.style) == null ? void 0 : S.type) || ((W = ((P = (M = (k = e == null ? void 0 : e.meta) == null ? void 0 : k.geom) == null ? void 0 : M.geometry) == null ? void 0 : P.length) > 2 ? ["point"] : [((V = (F = (I = e == null ? void 0 : e.meta) == null ? void 0 : I.geom) == null ? void 0 : F.geometry) == null ? void 0 : V[0].toLowerCase()) || "point"]) == null ? void 0 : W.map((ce) => {
25278
25278
  var Q;
25279
25279
  return (Q = ce == null ? void 0 : ce.replace) == null ? void 0 : Q.call(ce, "multi", "");
25280
25280
  })), r = Array.isArray(n) ? n : [n], l = (await Promise.all(Array.isArray(e == null ? void 0 : e.style) ? e.style.map(async (ce) => {
@@ -25690,7 +25690,7 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
25690
25690
  (I) => !I.match("__text") && !["id"].includes(I)
25691
25691
  ), { currentLayer: i } = this;
25692
25692
  if ((g = i == null ? void 0 : i.setting) != null && g.popup && (this.popupSettings = (i == null ? void 0 : i.setting.popup) || u1), !(i != null && i.meta)) {
25693
- const I = e.map((N) => ({ title: N, value: t.properties[N] }));
25693
+ const I = e.map((F) => ({ title: F, value: t.properties[F] }));
25694
25694
  this.objectData = [
25695
25695
  ...I,
25696
25696
  {
@@ -25703,7 +25703,7 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
25703
25703
  }
25704
25704
  const n = i.meta.columns, r = e.map((I) => {
25705
25705
  var ce, Q, Oe, ke;
25706
- const N = {}, W = Object.assign(
25706
+ const F = {}, W = Object.assign(
25707
25707
  {
25708
25708
  values: []
25709
25709
  },
@@ -25716,10 +25716,10 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
25716
25716
  // eslint-disable-next-line eqeqeq
25717
25717
  (Pe) => (Pe == null ? void 0 : Pe.id) == t.properties[I]
25718
25718
  )) || null;
25719
- return N.value = (W == null ? void 0 : W.format) === "select" ? this.formatBadge({
25719
+ return F.value = (W == null ? void 0 : W.format) === "select" ? this.formatBadge({
25720
25720
  text: (se == null ? void 0 : se.text) || ((Q = t.properties) == null ? void 0 : Q[`${I}__text`]) || ((Oe = t.properties) == null ? void 0 : Oe[I]) || "-",
25721
25721
  color: (se == null ? void 0 : se.color) || "#1989FA"
25722
- }) : (se == null ? void 0 : se.text) || ((ke = t.properties) == null ? void 0 : ke[`${I}__text`]) || t.properties[I], N.column = I, N.title = (W == null ? void 0 : W[window == null ? void 0 : window.lang]) || (W == null ? void 0 : W.ua) || (W == null ? void 0 : W.title) || I, N;
25722
+ }) : (se == null ? void 0 : se.text) || ((ke = t.properties) == null ? void 0 : ke[`${I}__text`]) || t.properties[I], F.column = I, F.title = (W == null ? void 0 : W[window == null ? void 0 : window.lang]) || (W == null ? void 0 : W.ua) || (W == null ? void 0 : W.title) || I, F;
25723
25723
  });
25724
25724
  this.objectData = [
25725
25725
  ...r,
@@ -25759,7 +25759,7 @@ const hF = /* @__PURE__ */ Pt(nF, [["render", uF], ["__scopeId", "data-v-14698eb
25759
25759
  class: "text-center"
25760
25760
  };
25761
25761
  function vF(t, e, i, n, r, l) {
25762
- var a, g, _, S, k, M, P, I, N, V, W;
25762
+ var a, g, _, S, k, M, P, I, F, V, W;
25763
25763
  const u = At("VsPopupBody");
25764
25764
  return xe(), Me("div", {
25765
25765
  class: Ns((((a = r.popupSettings) == null ? void 0 : a.position) || "horizontal") + "-position")
@@ -25782,7 +25782,7 @@ function vF(t, e, i, n, r, l) {
25782
25782
  Z("b", yF, St(l.noInfoObject().title), 1),
25783
25783
  Z("div", null, [
25784
25784
  Z("b", null, St(((k = (S = l.noInfoObject()) == null ? void 0 : S.column) == null ? void 0 : k.ua) || ((P = (M = l.noInfoObject()) == null ? void 0 : M.column) == null ? void 0 : P.title)) + ":", 1),
25785
- Rs(" " + St(((W = (I = i.object) == null ? void 0 : I.properties) == null ? void 0 : W[(V = (N = l.noInfoObject()) == null ? void 0 : N.column) == null ? void 0 : V.name]) || "-"), 1)
25785
+ Rs(" " + St(((W = (I = i.object) == null ? void 0 : I.properties) == null ? void 0 : W[(V = (F = l.noInfoObject()) == null ? void 0 : F.column) == null ? void 0 : V.name]) || "-"), 1)
25786
25786
  ])
25787
25787
  ], 64)) : (xe(), Me("div", _F, St(l.noInfoObject().title), 1))
25788
25788
  ]))
@@ -25868,10 +25868,10 @@ const xF = /* @__PURE__ */ Pt(dF, [["render", vF], ["__scopeId", "data-v-180f436
25868
25868
  }).setDOMContent((n = (i = this == null ? void 0 : this.$refs) == null ? void 0 : i.popup) == null ? void 0 : n.$el), t && (t.on("mousemove", (g) => {
25869
25869
  var S, k;
25870
25870
  const _ = t.queryRenderedFeatures(g.point).filter((M) => {
25871
- var N, V, W;
25871
+ var F, V, W;
25872
25872
  const P = this.layerList.find(
25873
25873
  (se) => se.id === M.source
25874
- ), I = ((V = (N = P == null ? void 0 : P.setting) == null ? void 0 : N.popup) == null ? void 0 : V.show) === void 0 ? !0 : P.setting.popup.show;
25874
+ ), I = ((V = (F = P == null ? void 0 : P.setting) == null ? void 0 : F.popup) == null ? void 0 : V.show) === void 0 ? !0 : P.setting.popup.show;
25875
25875
  if ((this.interactiveSources.includes(M.source) && !((W = M.properties) != null && W.cluster) && I || !P && Object.keys(M.properties).length) && !e.includes(M.source))
25876
25876
  return M;
25877
25877
  }).filter((M) => {
@@ -26396,7 +26396,7 @@ class _l extends uv {
26396
26396
  const { content: i, contentRect: n } = this, { fitWidth: r, fitHeight: l, fullWidth: u, fullHeight: a } = n;
26397
26397
  let g = u, _ = a;
26398
26398
  if (this.option("zoom") || this.angle !== 0) {
26399
- const S = !(i instanceof HTMLImageElement) && (window.getComputedStyle(i).maxWidth === "none" || window.getComputedStyle(i).maxHeight === "none"), k = S ? u : r, M = S ? a : l, P = this.getMatrix(e), I = new DOMPoint(0, 0).matrixTransform(P), N = new DOMPoint(0 + k, 0).matrixTransform(P), V = new DOMPoint(0 + k, 0 + M).matrixTransform(P), W = new DOMPoint(0, 0 + M).matrixTransform(P), se = Math.abs(V.x - I.x), ce = Math.abs(V.y - I.y), Q = Math.abs(W.x - N.x), Oe = Math.abs(W.y - N.y);
26399
+ const S = !(i instanceof HTMLImageElement) && (window.getComputedStyle(i).maxWidth === "none" || window.getComputedStyle(i).maxHeight === "none"), k = S ? u : r, M = S ? a : l, P = this.getMatrix(e), I = new DOMPoint(0, 0).matrixTransform(P), F = new DOMPoint(0 + k, 0).matrixTransform(P), V = new DOMPoint(0 + k, 0 + M).matrixTransform(P), W = new DOMPoint(0, 0 + M).matrixTransform(P), se = Math.abs(V.x - I.x), ce = Math.abs(V.y - I.y), Q = Math.abs(W.x - F.x), Oe = Math.abs(W.y - F.y);
26400
26400
  g = Math.max(se, Q), _ = Math.max(ce, Oe);
26401
26401
  }
26402
26402
  return { contentWidth: g, contentHeight: _ };
@@ -26426,13 +26426,13 @@ class _l extends uv {
26426
26426
  if (a) {
26427
26427
  const P = a.panzoomChange, I = a.panzoomAction;
26428
26428
  if ((P || I) && e.preventDefault(), P) {
26429
- let N = {};
26429
+ let F = {};
26430
26430
  try {
26431
- N = JSON.parse(P);
26431
+ F = JSON.parse(P);
26432
26432
  } catch {
26433
26433
  console && console.warn("The given data was not valid JSON");
26434
26434
  }
26435
- return void this.applyChange(N);
26435
+ return void this.applyChange(F);
26436
26436
  }
26437
26437
  if (I) return void (this[I] && this[I]());
26438
26438
  }
@@ -26488,8 +26488,8 @@ class _l extends uv {
26488
26488
  } else this.lockedAxis = I;
26489
26489
  if (vm(e.target, this.content) && (I = "x", this.dragOffset.y = 0), I && I !== "xy" && this.lockedAxis !== I && at(this.targetScale) === at(this.minScale)) return;
26490
26490
  e.cancelable && e.preventDefault(), this.container.classList.add(this.cn("isDragging"));
26491
- const N = this.checkBounds(M, P);
26492
- this.option("rubberband") ? (this.isInfinite !== "x" && (N.xDiff > 0 && M < 0 || N.xDiff < 0 && M > 0) && (M *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * N.xDiff))), this.isInfinite !== "y" && (N.yDiff > 0 && P < 0 || N.yDiff < 0 && P > 0) && (P *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * N.yDiff)))) : (N.xDiff && (M = 0), N.yDiff && (P = 0));
26491
+ const F = this.checkBounds(M, P);
26492
+ this.option("rubberband") ? (this.isInfinite !== "x" && (F.xDiff > 0 && M < 0 || F.xDiff < 0 && M > 0) && (M *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * F.xDiff))), this.isInfinite !== "y" && (F.yDiff > 0 && P < 0 || F.yDiff < 0 && P > 0) && (P *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * F.yDiff)))) : (F.xDiff && (M = 0), F.yDiff && (P = 0));
26493
26493
  const V = this.targetScale, W = this.minScale, se = this.maxScale;
26494
26494
  V < 0.5 * W && (k = Math.max(k, W)), V > 1.5 * se && (k = Math.min(k, se)), this.lockedAxis === "y" && at(V) === at(W) && (M = 0), this.lockedAxis === "x" && at(V) === at(W) && (P = 0), this.applyChange({ originX: a, originY: g, panX: M, panY: P, scale: k, friction: this.option("dragFriction"), ignoreBounds: !0 });
26495
26495
  }
@@ -26509,15 +26509,15 @@ class _l extends uv {
26509
26509
  const _ = ((e = window.visualViewport) === null || e === void 0 ? void 0 : e.scale) || 1;
26510
26510
  _ !== 1 && (u *= _, a *= _);
26511
26511
  let S = 0, k = 0, M = 0, P = 0, I = this.option("decelFriction");
26512
- const N = this.targetScale;
26512
+ const F = this.targetScale;
26513
26513
  if (g > 0) {
26514
26514
  M = Math.abs(u) > 3 ? u / (g / 30) : 0, P = Math.abs(a) > 3 ? a / (g / 30) : 0;
26515
26515
  const ce = this.option("maxVelocity");
26516
26516
  ce && (M = Math.max(Math.min(M, ce), -1 * ce), P = Math.max(Math.min(P, ce), -1 * ce));
26517
26517
  }
26518
- M && (S = M / (1 / (1 - I) - 1)), P && (k = P / (1 / (1 - I) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && at(N) === this.minScale) && (S = M = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && at(N) === this.minScale) && (k = P = 0);
26518
+ M && (S = M / (1 / (1 - I) - 1)), P && (k = P / (1 / (1 - I) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && at(F) === this.minScale) && (S = M = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && at(F) === this.minScale) && (k = P = 0);
26519
26519
  const V = this.dragOffset.x, W = this.dragOffset.y, se = this.option("dragMinThreshold") || 0;
26520
- Math.abs(V) < se && Math.abs(W) < se && (S = k = 0, M = P = 0), (this.option("zoom") && (N < this.minScale - 1e-5 || N > this.maxScale + 1e-5) || i && !S && !k) && (I = 0.35), this.applyChange({ panX: S, panY: k, friction: I }), this.emit("decel", M, P, V, W);
26520
+ Math.abs(V) < se && Math.abs(W) < se && (S = k = 0, M = P = 0), (this.option("zoom") && (F < this.minScale - 1e-5 || F > this.maxScale + 1e-5) || i && !S && !k) && (I = 0.35), this.applyChange({ panX: S, panY: k, friction: I }), this.emit("decel", M, P, V, W);
26521
26521
  }
26522
26522
  onWheel(e) {
26523
26523
  var i = [-e.deltaX || 0, -e.deltaY || 0, -e.detail || 0].reduce(function(l, u) {
@@ -26547,8 +26547,8 @@ class _l extends uv {
26547
26547
  let { a: u, b: a, c: g, d: _, e: S, f: k } = l, M = `matrix(${u}, ${a}, ${g}, ${_}, ${S}, ${k})`, P = n.parentElement instanceof HTMLPictureElement ? n.parentElement : n;
26548
26548
  if (this.option("transformParent") && (P = P.parentElement || P), P.style.transform === M) return;
26549
26549
  P.style.transform = M;
26550
- const { contentWidth: I, contentHeight: N } = this.calculateContentDim();
26551
- r.width = I, r.height = N, this.emit("afterTransform");
26550
+ const { contentWidth: I, contentHeight: F } = this.calculateContentDim();
26551
+ r.width = I, r.height = F, this.emit("afterTransform");
26552
26552
  }
26553
26553
  updateMetrics(e = !1) {
26554
26554
  var i;
@@ -26560,13 +26560,13 @@ class _l extends uv {
26560
26560
  const I = parseFloat(l.dataset.width || "") || ((yt) => {
26561
26561
  let Nt = 0;
26562
26562
  return Nt = yt instanceof HTMLImageElement ? yt.naturalWidth : yt instanceof SVGElement ? yt.width.baseVal.value : Math.max(yt.offsetWidth, yt.scrollWidth), Nt || 0;
26563
- })(l), N = parseFloat(l.dataset.height || "") || ((yt) => {
26563
+ })(l), F = parseFloat(l.dataset.height || "") || ((yt) => {
26564
26564
  let Nt = 0;
26565
26565
  return Nt = yt instanceof HTMLImageElement ? yt.naturalHeight : yt instanceof SVGElement ? yt.height.baseVal.value : Math.max(yt.offsetHeight, yt.scrollHeight), Nt || 0;
26566
26566
  })(l);
26567
- let V = this.option("width", I) || Is, W = this.option("height", N) || Is;
26567
+ let V = this.option("width", I) || Is, W = this.option("height", F) || Is;
26568
26568
  const se = V === Is, ce = W === Is;
26569
- typeof V != "number" && (V = I), typeof W != "number" && (W = N), se && (V = I * (W / N)), ce && (W = N / (I / V));
26569
+ typeof V != "number" && (V = I), typeof W != "number" && (W = F), se && (V = I * (W / F)), ce && (W = F / (I / V));
26570
26570
  let Q = l.parentElement instanceof HTMLPictureElement ? l.parentElement : l;
26571
26571
  this.option("transformParent") && (Q = Q.parentElement || Q);
26572
26572
  const Oe = Q.getAttribute("style") || "";
@@ -26586,8 +26586,8 @@ class _l extends uv {
26586
26586
  const k = this.option("infinite");
26587
26587
  if (k === !0 || r && k === r) a = -1 / 0, _ = 1 / 0, g = -1 / 0, S = 1 / 0;
26588
26588
  else {
26589
- let { containerRect: M, contentRect: P } = this, I = at(l * n, Pf), N = at(u * n, Pf), { innerWidth: V, innerHeight: W } = M;
26590
- if (M.width === I && (V = M.width), M.width === N && (W = M.height), e > V) {
26589
+ let { containerRect: M, contentRect: P } = this, I = at(l * n, Pf), F = at(u * n, Pf), { innerWidth: V, innerHeight: W } = M;
26590
+ if (M.width === I && (V = M.width), M.width === F && (W = M.height), e > V) {
26591
26591
  _ = 0.5 * (e - V), a = -1 * _;
26592
26592
  let se = 0.5 * (P.right - P.left);
26593
26593
  a += se, _ += se;
@@ -26613,9 +26613,9 @@ class _l extends uv {
26613
26613
  if (k && (at(l) < at(u) && !this.panOnlyZoomed && (M = !0), (at(r.width, 1) > at(r.fitWidth, 1) || at(r.height, 1) > at(r.fitHeight, 1)) && (M = !0)), at(r.width * l, 1) < at(r.fitWidth, 1) && (M = !1), n === Ps && (M = !1), ko(i, this.cn("isDraggable"), M), !this.option("zoom")) return;
26614
26614
  let P = _ && at(a) > at(l), I = !P && !M && S && at(a) < at(l);
26615
26615
  ko(i, this.cn("canZoomIn"), P), ko(i, this.cn("canZoomOut"), I);
26616
- for (const N of i.querySelectorAll("[data-panzoom-action]")) {
26616
+ for (const F of i.querySelectorAll("[data-panzoom-action]")) {
26617
26617
  let V = !1, W = !1;
26618
- switch (N.dataset.panzoomAction) {
26618
+ switch (F.dataset.panzoomAction) {
26619
26619
  case "zoomIn":
26620
26620
  _ ? V = !0 : W = !0;
26621
26621
  break;
@@ -26625,10 +26625,10 @@ class _l extends uv {
26625
26625
  case "toggleZoom":
26626
26626
  case "iterateZoom":
26627
26627
  _ || S ? V = !0 : W = !0;
26628
- const se = N.querySelector("g");
26628
+ const se = F.querySelector("g");
26629
26629
  se && (se.style.display = _ ? "" : "none");
26630
26630
  }
26631
- V ? (N.removeAttribute("disabled"), N.removeAttribute("tabindex")) : W && (N.setAttribute("disabled", ""), N.setAttribute("tabindex", "-1"));
26631
+ V ? (F.removeAttribute("disabled"), F.removeAttribute("tabindex")) : W && (F.setAttribute("disabled", ""), F.setAttribute("tabindex", "-1"));
26632
26632
  }
26633
26633
  }
26634
26634
  panTo({ x: e = this.target.e, y: i = this.target.f, scale: n = this.targetScale, friction: r = this.option("friction"), angle: l = 0, originX: u = 0, originY: a = 0, flipX: g = !1, flipY: _ = !1, ignoreBounds: S = !1 }) {
@@ -26638,8 +26638,8 @@ class _l extends uv {
26638
26638
  const M = this.state;
26639
26639
  if (M === zi.Destroy) return;
26640
26640
  this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = a || 0, this.ignoreBounds = S;
26641
- const { current: P } = this, I = P.e, N = P.f, V = this.getMatrix(this.target);
26642
- let W = new DOMMatrix().translate(I, N).translate(l, u).translate(e, i);
26641
+ const { current: P } = this, I = P.e, F = P.f, V = this.getMatrix(this.target);
26642
+ let W = new DOMMatrix().translate(I, F).translate(l, u).translate(e, i);
26643
26643
  if (this.option("zoom")) {
26644
26644
  if (!S) {
26645
26645
  const se = this.targetScale, ce = this.minScale, Q = this.maxScale;
@@ -26647,7 +26647,7 @@ class _l extends uv {
26647
26647
  }
26648
26648
  W = W.scale(n);
26649
26649
  }
26650
- W = W.translate(-l, -u).translate(-I, -N).multiply(V), r && (W = W.rotate(r)), g && (W = W.scale(-1, 1)), _ && (W = W.scale(1, -1));
26650
+ W = W.translate(-l, -u).translate(-I, -F).multiply(V), r && (W = W.rotate(r)), g && (W = W.scale(-1, 1)), _ && (W = W.scale(1, -1));
26651
26651
  for (const se of Qo) se !== "e" && se !== "f" && (W[se] > this.minScale + 1e-5 || W[se] < this.minScale - 1e-5) ? this.target[se] = W[se] : this.target[se] = at(W[se], Pf);
26652
26652
  (this.targetScale < this.scale || Math.abs(n - 1) > 0.1 || this.panMode === Ps || k === !1) && !S && this.clampTargetBounds(), M === zi.Init ? this.animate() : this.isResting || (this.state = zi.Panning, this.requestTick());
26653
26653
  }
@@ -26670,8 +26670,8 @@ class _l extends uv {
26670
26670
  P > 1 && (k !== u && (k *= P), M !== a && (M *= P));
26671
26671
  let I = 0.5 * (k - u) - _ / u * 100 / 100 * (k - u);
26672
26672
  I += 0.5 * (l.right - l.left);
26673
- let N = 0.5 * (M - a) - S / a * 100 / 100 * (M - a);
26674
- N += 0.5 * (l.bottom - l.top), this.applyChange({ panX: I - this.target.e, panY: N - this.target.f, friction: i });
26673
+ let F = 0.5 * (M - a) - S / a * 100 / 100 * (M - a);
26674
+ F += 0.5 * (l.bottom - l.top), this.applyChange({ panX: I - this.target.e, panY: F - this.target.f, friction: i });
26675
26675
  }
26676
26676
  zoomWithWheel(e) {
26677
26677
  if (this.state === zi.Destroy || this.state === zi.Init) return;
@@ -27107,16 +27107,16 @@ class pl extends uv {
27107
27107
  return { x: n ? l : { min: 0, max: 0 }, y: n ? { min: 0, max: 0 } : l };
27108
27108
  }
27109
27109
  repositionSlides() {
27110
- let e, { isHorizontal: i, isRTL: n, isInfinite: r, viewport: l, viewportDim: u, contentDim: a, page: g, pages: _, slides: S, panzoom: k } = this, M = 0, P = 0, I = 0, N = 0;
27111
- k ? N = -1 * k.current[this.axis] : _[g] && (N = _[g].pos || 0), e = i ? n ? "right" : "left" : "top", n && i && (N *= -1);
27110
+ let e, { isHorizontal: i, isRTL: n, isInfinite: r, viewport: l, viewportDim: u, contentDim: a, page: g, pages: _, slides: S, panzoom: k } = this, M = 0, P = 0, I = 0, F = 0;
27111
+ k ? F = -1 * k.current[this.axis] : _[g] && (F = _[g].pos || 0), e = i ? n ? "right" : "left" : "top", n && i && (F *= -1);
27112
27112
  for (const ce of S) {
27113
27113
  const Q = ce.el;
27114
27114
  Q ? (e === "top" ? (Q.style.right = "", Q.style.left = "") : Q.style.top = "", ce.index !== M ? Q.style[e] = P === 0 ? "" : `${at(P, 1e3)}px` : Q.style[e] = "", I += ce.dim + ce.gap, M++) : P += ce.dim + ce.gap;
27115
27115
  }
27116
27116
  if (r && I && l) {
27117
27117
  let ce = getComputedStyle(l), Q = "padding", Oe = i ? "Right" : "Bottom", ke = parseFloat(ce[Q + (i ? "Left" : "Top")]);
27118
- N -= ke, u += ke, u += parseFloat(ce[Q + Oe]);
27119
- for (const Pe of S) Pe.el && (at(Pe.pos) < at(u) && at(Pe.pos + Pe.dim + Pe.gap) < at(N) && at(N) > at(a - u) && (Pe.el.style[e] = `${at(P + I, 1e3)}px`), at(Pe.pos + Pe.gap) >= at(a - u) && at(Pe.pos) > at(N + u) && at(N) < at(u) && (Pe.el.style[e] = `-${at(I, 1e3)}px`));
27118
+ F -= ke, u += ke, u += parseFloat(ce[Q + Oe]);
27119
+ for (const Pe of S) Pe.el && (at(Pe.pos) < at(u) && at(Pe.pos + Pe.dim + Pe.gap) < at(F) && at(F) > at(a - u) && (Pe.el.style[e] = `${at(P + I, 1e3)}px`), at(Pe.pos + Pe.gap) >= at(a - u) && at(Pe.pos) > at(F + u) && at(F) < at(u) && (Pe.el.style[e] = `-${at(I, 1e3)}px`));
27120
27120
  }
27121
27121
  let V, W, se = [...this.inTransition];
27122
27122
  if (se.length > 1 && (V = _[se[0]], W = _[se[1]]), V && W) {
@@ -27164,12 +27164,12 @@ class pl extends uv {
27164
27164
  this.clearTransitions();
27165
27165
  const P = _.isResting;
27166
27166
  Et(this.container, this.cn("inTransition"));
27167
- const I = ((l = g[a]) === null || l === void 0 ? void 0 : l.slides[0]) || null, N = ((u = g[S]) === null || u === void 0 ? void 0 : u.slides[0]) || null;
27168
- this.inTransition.add(N.index), this.createSlideEl(N);
27169
- let V = I.el, W = N.el;
27167
+ const I = ((l = g[a]) === null || l === void 0 ? void 0 : l.slides[0]) || null, F = ((u = g[S]) === null || u === void 0 ? void 0 : u.slides[0]) || null;
27168
+ this.inTransition.add(F.index), this.createSlideEl(F);
27169
+ let V = I.el, W = F.el;
27170
27170
  P || i === zf || (i = "fadeFast", V = null);
27171
27171
  const se = this.isRTL ? "next" : "prev", ce = this.isRTL ? "prev" : "next";
27172
- return V && (this.inTransition.add(I.index), I.transition = i, V.addEventListener(Of, this.onAnimationEnd), V.classList.add(`f-${i}Out`, `to-${k > 0 ? ce : se}`)), W && (N.transition = i, W.addEventListener(Of, this.onAnimationEnd), W.classList.add(`f-${i}In`, `from-${k > 0 ? se : ce}`)), _.current[this.axis] = M, _.target[this.axis] = M, _.requestTick(), this.onChange(S), !0;
27172
+ return V && (this.inTransition.add(I.index), I.transition = i, V.addEventListener(Of, this.onAnimationEnd), V.classList.add(`f-${i}Out`, `to-${k > 0 ? ce : se}`)), W && (F.transition = i, W.addEventListener(Of, this.onAnimationEnd), W.classList.add(`f-${i}In`, `from-${k > 0 ? se : ce}`)), _.current[this.axis] = M, _.target[this.axis] = M, _.requestTick(), this.onChange(S), !0;
27173
27173
  }
27174
27174
  manageSlideVisiblity() {
27175
27175
  const e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), n = this.getVisibleSlides(parseFloat(this.option("preload", 0) + "") || 0);
@@ -27234,8 +27234,8 @@ class pl extends uv {
27234
27234
  let M = 0;
27235
27235
  if (M = k > 45 && k < 135 ? a ? 0 : n : a ? i : 0, !S) return;
27236
27236
  let P = this.page, I = u && a ? 1 : -1;
27237
- const N = e.current[g] * I;
27238
- let { pageIndex: V } = this.getPageFromPosition(N);
27237
+ const F = e.current[g] * I;
27238
+ let { pageIndex: V } = this.getPageFromPosition(F);
27239
27239
  Math.abs(M) > 5 ? (_[P].dim < document.documentElement["client" + (this.isHorizontal ? "Width" : "Height")] - 1 && (P = V), P = u && a ? M < 0 ? P - 1 : P + 1 : M < 0 ? P + 1 : P - 1) : P = r === 0 && l === 0 ? P : V, this.slideTo(P, { transition: !1, friction: e.option("decelFriction") });
27240
27240
  }
27241
27241
  onClick(e) {
@@ -27284,8 +27284,8 @@ class pl extends uv {
27284
27284
  let M = g[r].pos;
27285
27285
  if (this.isInfinite) {
27286
27286
  const P = this.contentDim, I = _.target[l] * k;
27287
- S === 2 ? M += P * Math.floor(parseFloat(e + "") / 2) : M = [M, M - P, M + P].reduce(function(N, V) {
27288
- return Math.abs(V - I) < Math.abs(N - I) ? V : N;
27287
+ S === 2 ? M += P * Math.floor(parseFloat(e + "") / 2) : M = [M, M - P, M + P].reduce(function(F, V) {
27288
+ return Math.abs(V - I) < Math.abs(F - I) ? V : F;
27289
27289
  });
27290
27290
  }
27291
27291
  M *= k, Math.abs(_.target[l] - M) < 1 || (_.panTo({ x: u ? M : 0, y: u ? 0 : M, friction: i }), this.onChange(r));
@@ -27325,8 +27325,8 @@ class pl extends uv {
27325
27325
  for (let P = 0; P < this.slides.length; P++) this.slides[P].index = P;
27326
27326
  for (const P of M) this.emit("beforeInitSlide", P, P.index);
27327
27327
  if (this.page >= e && (this.page += M.length), this.updateMetrics(), a) {
27328
- const P = ((l = this.pages[this.page]) === null || l === void 0 ? void 0 : l.pos) || 0, I = ((u = this.pages[this.page]) === null || u === void 0 ? void 0 : u.dim) || 0, N = this.pages.length || 1, V = this.isRTL ? _ - I : I - _, W = this.isRTL ? g - P : P - g;
27329
- S && N === 1 ? (e <= this.page && (a.current[this.axis] -= V, a.target[this.axis] -= V), a.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * P })) : W && e <= this.page && (a.target[this.axis] -= W, a.current[this.axis] -= W, a.requestTick());
27328
+ const P = ((l = this.pages[this.page]) === null || l === void 0 ? void 0 : l.pos) || 0, I = ((u = this.pages[this.page]) === null || u === void 0 ? void 0 : u.dim) || 0, F = this.pages.length || 1, V = this.isRTL ? _ - I : I - _, W = this.isRTL ? g - P : P - g;
27329
+ S && F === 1 ? (e <= this.page && (a.current[this.axis] -= V, a.target[this.axis] -= V), a.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * P })) : W && e <= this.page && (a.target[this.axis] -= W, a.current[this.axis] -= W, a.requestTick());
27330
27330
  }
27331
27331
  for (const P of M) this.emit("initSlide", P, P.index);
27332
27332
  }
@@ -27394,19 +27394,19 @@ class pl extends uv {
27394
27394
  _ = r && r.state !== zi.Init && r.state !== zi.Destroy ? -1 * r.current[this.axis] : a[g] && a[g].pos || 0, this.isInfinite && (_ -= Math.floor(_ / l) * l), this.isRTL && this.isHorizontal && (_ *= -1);
27395
27395
  const S = _ - u * e, k = _ + u * (e + 1), M = this.isInfinite ? [-1, 0, 1] : [0];
27396
27396
  for (const P of this.slides) for (const I of M) {
27397
- const N = P.pos + I * l, V = N + P.dim + P.gap;
27398
- N < k && V > S && n.add(P);
27397
+ const F = P.pos + I * l, V = F + P.dim + P.gap;
27398
+ F < k && V > S && n.add(P);
27399
27399
  }
27400
27400
  }
27401
27401
  return n;
27402
27402
  }
27403
27403
  getPageFromPosition(e) {
27404
27404
  const { viewportDim: i, contentDim: n, slides: r, pages: l, panzoom: u } = this, a = l.length, g = r.length, _ = r[0], S = r[g - 1], k = this.option("center");
27405
- let M = 0, P = 0, I = 0, N = e === void 0 ? -1 * ((u == null ? void 0 : u.target[this.axis]) || 0) : e;
27406
- k && (N += 0.5 * i), this.isInfinite ? (N < _.pos - 0.5 * S.gap && (N -= n, I = -1), N > S.pos + S.dim + 0.5 * S.gap && (N -= n, I = 1)) : N = Math.max(_.pos || 0, Math.min(N, S.pos));
27405
+ let M = 0, P = 0, I = 0, F = e === void 0 ? -1 * ((u == null ? void 0 : u.target[this.axis]) || 0) : e;
27406
+ k && (F += 0.5 * i), this.isInfinite ? (F < _.pos - 0.5 * S.gap && (F -= n, I = -1), F > S.pos + S.dim + 0.5 * S.gap && (F -= n, I = 1)) : F = Math.max(_.pos || 0, Math.min(F, S.pos));
27407
27407
  let V = S, W = r.find((se) => {
27408
27408
  const ce = se.pos - 0.5 * V.gap, Q = se.pos + se.dim + 0.5 * se.gap;
27409
- return V = se, N >= ce && N < Q;
27409
+ return V = se, F >= ce && F < Q;
27410
27410
  });
27411
27411
  return W || (W = S), P = this.getPageForSlide(W.index), M = P + I * a, { page: M, pageIndex: P };
27412
27412
  }
@@ -27542,12 +27542,12 @@ class M2 extends lo {
27542
27542
  (((e = window.visualViewport) === null || e === void 0 ? void 0 : e.scale) || 1) === 1 && Object.assign(n.style, { position: "absolute", top: `${n.offsetTop + window.scrollY}px`, left: `${n.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${S.width}px`, height: `${S.height}px`, overflow: "hidden" });
27543
27543
  const { x: k, y: M, scale: P, opacity: I } = _;
27544
27544
  if (I) {
27545
- const N = ((V, W, se, ce) => {
27545
+ const F = ((V, W, se, ce) => {
27546
27546
  const Q = W - V, Oe = ce - se;
27547
27547
  return (ke) => se + ((ke - V) / Q * Oe || 0);
27548
27548
  })(a.scale, P, 1, 0);
27549
27549
  a.on("afterTransform", () => {
27550
- u.style.opacity = N(a.scale) + "";
27550
+ u.style.opacity = F(a.scale) + "";
27551
27551
  });
27552
27552
  }
27553
27553
  a.on("endAnimation", () => {
@@ -27577,9 +27577,9 @@ class M2 extends lo {
27577
27577
  P && (P.remove(), P = null);
27578
27578
  }, 200));
27579
27579
  };
27580
- (S = a, new Promise((N, V) => {
27580
+ (S = a, new Promise((F, V) => {
27581
27581
  const W = new Image();
27582
- W.onload = N, W.onerror = V, W.src = S;
27582
+ W.onload = F, W.onerror = V, W.src = S;
27583
27583
  })).then(() => {
27584
27584
  n.hideLoading(e), e.state = mr.Opening, this.instance.emit("reveal", e), this.zoomIn(e).then(() => {
27585
27585
  I(), this.instance.done(e);
@@ -27592,8 +27592,8 @@ class M2 extends lo {
27592
27592
  });
27593
27593
  } else {
27594
27594
  const k = this.optionFor(e, "initialSize"), M = this.optionFor(e, "zoom"), P = { event: n.prevMouseMoveEvent || n.options.event, friction: M ? 0.12 : 0 };
27595
- let I = n.optionFor(e, "showClass") || void 0, N = !0;
27596
- n.isOpeningSlide(e) && (k === "full" ? r.zoomToFull(P) : k === "cover" ? r.zoomToCover(P) : k === "max" ? r.zoomToMax(P) : N = !1, r.stop("current")), N && I && (I = r.isDragging ? "f-fadeIn" : ""), n.hideLoading(e), n.revealContent(e, I);
27595
+ let I = n.optionFor(e, "showClass") || void 0, F = !0;
27596
+ n.isOpeningSlide(e) && (k === "full" ? r.zoomToFull(P) : k === "cover" ? r.zoomToCover(P) : k === "max" ? r.zoomToMax(P) : F = !1, r.stop("current")), F && I && (I = r.isDragging ? "f-fadeIn" : ""), n.hideLoading(e), n.revealContent(e, I);
27597
27597
  }
27598
27598
  var S;
27599
27599
  }, () => {
@@ -27642,10 +27642,10 @@ class M2 extends lo {
27642
27642
  if (!(_ && g && a && u && l)) return void n();
27643
27643
  const { x: S, y: k, scale: M, opacity: P } = _, I = () => {
27644
27644
  e.state !== mr.Closing && (P && (a.style.opacity = Math.max(Math.min(1, 1 - (1 - u.scale) / (1 - M)), 0) + ""), u.scale >= 1 && u.scale > u.targetScale - 0.1 && i(u));
27645
- }, N = (se) => {
27646
- (se.scale < 0.99 || se.scale > 1.01) && !se.isDragging || (Di(l, Lf), a.style.opacity = "", se.off("endAnimation", N), se.off("touchStart", N), se.off("afterTransform", I), i(se));
27645
+ }, F = (se) => {
27646
+ (se.scale < 0.99 || se.scale > 1.01) && !se.isDragging || (Di(l, Lf), a.style.opacity = "", se.off("endAnimation", F), se.off("touchStart", F), se.off("afterTransform", I), i(se));
27647
27647
  };
27648
- u.on("endAnimation", N), u.on("touchStart", N), u.on("afterTransform", I), u.on(["error", "destroy"], () => {
27648
+ u.on("endAnimation", F), u.on("touchStart", F), u.on("afterTransform", I), u.on(["error", "destroy"], () => {
27649
27649
  n();
27650
27650
  }), u.panTo({ x: S, y: k, scale: M, friction: 0, ignoreBounds: !0 }), u.stop("current");
27651
27651
  const V = { event: u.panMode === "mousemove" ? r.prevMouseMoveEvent || r.options.event : void 0 }, W = this.optionFor(e, "initialSize");
@@ -27657,13 +27657,13 @@ class M2 extends lo {
27657
27657
  if (!i || !n || !r || !l || x2(r) < 3 || !this.optionFor(e, "zoom") || !a || u.state === jn.Destroy || getComputedStyle(a).getPropertyValue("--f-images-zoom") === "0") return !1;
27658
27658
  const g = window.visualViewport || null;
27659
27659
  if ((g ? g.scale : 1) !== 1) return !1;
27660
- let { top: _, left: S, width: k, height: M } = r.getBoundingClientRect(), { top: P, left: I, fitWidth: N, fitHeight: V } = l.contentRect;
27661
- if (!(k && M && N && V)) return !1;
27660
+ let { top: _, left: S, width: k, height: M } = r.getBoundingClientRect(), { top: P, left: I, fitWidth: F, fitHeight: V } = l.contentRect;
27661
+ if (!(k && M && F && V)) return !1;
27662
27662
  const W = l.container.getBoundingClientRect();
27663
27663
  I += W.left, P += W.top;
27664
- const se = -1 * (I + 0.5 * N - (S + 0.5 * k)), ce = -1 * (P + 0.5 * V - (_ + 0.5 * M)), Q = k / N;
27664
+ const se = -1 * (I + 0.5 * F - (S + 0.5 * k)), ce = -1 * (P + 0.5 * V - (_ + 0.5 * M)), Q = k / F;
27665
27665
  let Oe = this.option("zoomOpacity") || !1;
27666
- return Oe === "auto" && (Oe = Math.abs(k / M - N / V) > 0.1), { x: se, y: ce, scale: Q, opacity: Oe };
27666
+ return Oe === "auto" && (Oe = Math.abs(k / M - F / V) > 0.1), { x: se, y: ce, scale: Q, opacity: Oe };
27667
27667
  }
27668
27668
  attach() {
27669
27669
  const e = this, i = e.instance;
@@ -27802,8 +27802,8 @@ class C2 extends lo {
27802
27802
  if (e.preload !== !1 && l !== !1 && g) try {
27803
27803
  const _ = window.getComputedStyle(r), S = parseFloat(_.paddingLeft) + parseFloat(_.paddingRight), k = parseFloat(_.paddingTop) + parseFloat(_.paddingBottom), M = n.contentWindow;
27804
27804
  if (M) {
27805
- const P = M.document, I = P.getElementsByTagName(Qy)[0], N = P.body;
27806
- g.width = "", N.style.overflow = "hidden", u = u || I.scrollWidth + S, g.width = `${u}px`, N.style.overflow = "", g.flex = "0 0 auto", g.height = `${N.scrollHeight}px`, a = I.scrollHeight + k;
27805
+ const P = M.document, I = P.getElementsByTagName(Qy)[0], F = P.body;
27806
+ g.width = "", F.style.overflow = "hidden", u = u || I.scrollWidth + S, g.width = `${u}px`, F.style.overflow = "", g.flex = "0 0 auto", g.height = `${F.scrollHeight}px`, a = I.scrollHeight + k;
27807
27807
  }
27808
27808
  } catch {
27809
27809
  }
@@ -27849,8 +27849,8 @@ class C2 extends lo {
27849
27849
  var P = {};
27850
27850
  for (var I in k) Object.prototype.hasOwnProperty.call(k, I) && M.indexOf(I) < 0 && (P[I] = k[I]);
27851
27851
  if (k != null && typeof Object.getOwnPropertySymbols == "function") {
27852
- var N = 0;
27853
- for (I = Object.getOwnPropertySymbols(k); N < I.length; N++) M.indexOf(I[N]) < 0 && Object.prototype.propertyIsEnumerable.call(k, I[N]) && (P[I[N]] = k[I[N]]);
27852
+ var F = 0;
27853
+ for (I = Object.getOwnPropertySymbols(k); F < I.length; F++) M.indexOf(I[F]) < 0 && Object.prototype.propertyIsEnumerable.call(k, I[F]) && (P[I[F]] = k[I[F]]);
27854
27854
  }
27855
27855
  return P;
27856
27856
  }(l, ["nocookie"]), g = `www.youtube${u ? "-nocookie" : ""}.com`, _ = k1(i, a), S = encodeURIComponent(r[2]);
@@ -28164,14 +28164,14 @@ let I2 = class extends lo {
28164
28164
  }
28165
28165
  onClick(t) {
28166
28166
  t.preventDefault(), t.stopPropagation();
28167
- const e = this.instance, { pages: i, page: n } = e, r = (N) => {
28168
- if (N) {
28169
- const V = N.closest("[data-carousel-index]");
28167
+ const e = this.instance, { pages: i, page: n } = e, r = (F) => {
28168
+ if (F) {
28169
+ const V = F.closest("[data-carousel-index]");
28170
28170
  if (V) return [parseInt(V.dataset.carouselIndex || "", 10) || 0, V];
28171
28171
  }
28172
28172
  return [-1, void 0];
28173
- }, l = (N, V) => {
28174
- const W = document.elementFromPoint(N, V);
28173
+ }, l = (F, V) => {
28174
+ const W = document.elementFromPoint(F, V);
28175
28175
  return W ? r(W) : [-1, void 0];
28176
28176
  };
28177
28177
  let [u, a] = r(t.target);
@@ -28187,9 +28187,9 @@ let I2 = class extends lo {
28187
28187
  const l = i[Nf], u = i[vo], a = i.thumbGap, g = i.thumbExtraGap;
28188
28188
  if (!(!((e = r.slides[t]) === null || e === void 0) && e.el)) return 0;
28189
28189
  const _ = 0.5 * (l - u), S = n.pages.length - 1;
28190
- let k = n.getProgress(0), M = n.getProgress(S), P = n.getProgress(t, !1, !0), I = 0, N = _ + g + a;
28190
+ let k = n.getProgress(0), M = n.getProgress(S), P = n.getProgress(t, !1, !0), I = 0, F = _ + g + a;
28191
28191
  const V = k < 0 && k > -1, W = M > 0 && M < 1;
28192
- return t === 0 ? (I = N * Math.abs(k), W && k === 1 && (I -= N * Math.abs(M))) : t === S ? (I = N * Math.abs(M) * -1, V && M === -1 && (I += N * Math.abs(k))) : V || W ? (I = -1 * N, I += N * Math.abs(k), I += N * (1 - Math.abs(M))) : I = N * P, I;
28192
+ return t === 0 ? (I = F * Math.abs(k), W && k === 1 && (I -= F * Math.abs(M))) : t === S ? (I = F * Math.abs(M) * -1, V && M === -1 && (I += F * Math.abs(k))) : V || W ? (I = -1 * F, I += F * Math.abs(k), I += F * (1 - Math.abs(M))) : I = F * P, I;
28193
28193
  }
28194
28194
  setProps(t) {
28195
28195
  var e;
@@ -28730,8 +28730,8 @@ class _i extends uv {
28730
28730
  const _ = Array.from(l.querySelectorAll(Jy));
28731
28731
  let S = [], k = null;
28732
28732
  for (let P of _) {
28733
- const I = !P.offsetParent || !!P.closest('[aria-hidden="true"]'), N = g && g.contains(P), V = !u.contains(P);
28734
- if (P === l || (N || V) && !I) {
28733
+ const I = !P.offsetParent || !!P.closest('[aria-hidden="true"]'), F = g && g.contains(P), V = !u.contains(P);
28734
+ if (P === l || (F || V) && !I) {
28735
28735
  S.push(P);
28736
28736
  const W = P.dataset.origTabindex;
28737
28737
  W !== void 0 && W && (P.tabIndex = parseFloat(W)), P.removeAttribute("data-orig-tabindex"), !P.hasAttribute("autoFocus") && k || (k = P);
@@ -28937,12 +28937,12 @@ class _i extends uv {
28937
28937
  let i = e.composedPath()[0];
28938
28938
  const n = i.closest("[data-fancybox-trigger]");
28939
28939
  if (n) {
28940
- const I = n.dataset.fancyboxTrigger || "", N = document.querySelectorAll(`[data-fancybox="${I}"]`), V = parseInt(n.dataset.fancyboxIndex || "", 10) || 0;
28941
- i = N[V] || i;
28940
+ const I = n.dataset.fancyboxTrigger || "", F = document.querySelectorAll(`[data-fancybox="${I}"]`), V = parseInt(n.dataset.fancyboxIndex || "", 10) || 0;
28941
+ i = F[V] || i;
28942
28942
  }
28943
28943
  if (!(i && i instanceof Element)) return;
28944
28944
  let r, l, u, a;
28945
- if ([..._i.openers].reverse().find(([I, N]) => !(!I.contains(i) || ![...N].reverse().find(([V, W]) => {
28945
+ if ([..._i.openers].reverse().find(([I, F]) => !(!I.contains(i) || ![...F].reverse().find(([V, W]) => {
28946
28946
  let se = i.closest(V);
28947
28947
  return !!se && (r = I, l = V, u = se, a = W, !0);
28948
28948
  }))), !r || !l || !u) return;
@@ -29438,8 +29438,8 @@ function HB(t, e, i, n, r, l) {
29438
29438
  key: I,
29439
29439
  id: i.id,
29440
29440
  item: P,
29441
- onUpdate: e[2] || (e[2] = (N) => t.$emit("update", "file-list")),
29442
- onOpenModal: e[3] || (e[3] = (N) => l.handleOpenModal(N))
29441
+ onUpdate: e[2] || (e[2] = (F) => t.$emit("update", "file-list")),
29442
+ onOpenModal: e[3] || (e[3] = (F) => l.handleOpenModal(F))
29443
29443
  }, null, 8, ["id", "item"]))), 128)),
29444
29444
  l.filteredFiles.length ? Gr("", !0) : (xe(), Me("div", $B, e[8] || (e[8] = [
29445
29445
  Z("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
@@ -29499,16 +29499,16 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
29499
29499
  return;
29500
29500
  }
29501
29501
  try {
29502
- const { data: N } = await Ct.get(`/api/widget/gallery/${i == null ? void 0 : i.id}`);
29503
- n.value = N == null ? void 0 : N.rows, e.bind("[data-fancybox='gallery']");
29504
- } catch (N) {
29505
- console.error(N);
29502
+ const { data: F } = await Ct.get(`/api/widget/gallery/${i == null ? void 0 : i.id}`);
29503
+ n.value = F == null ? void 0 : F.rows, e.bind("[data-fancybox='gallery']");
29504
+ } catch (F) {
29505
+ console.error(F);
29506
29506
  }
29507
29507
  }, g = async (I) => {
29508
29508
  var V;
29509
- const N = Array.from((V = I.target) == null ? void 0 : V.files);
29509
+ const F = Array.from((V = I.target) == null ? void 0 : V.files);
29510
29510
  await Promise.all(
29511
- N.map(async (W) => {
29511
+ F.map(async (W) => {
29512
29512
  const se = new FormData();
29513
29513
  se.append("file", W);
29514
29514
  try {
@@ -29519,8 +29519,8 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
29519
29519
  })
29520
29520
  ), await a();
29521
29521
  }, _ = (I) => {
29522
- const N = document.createElement("a");
29523
- N.setAttribute("download", I == null ? void 0 : I.uploaded_name), N.href = I == null ? void 0 : I.file_path, N.click();
29522
+ const F = document.createElement("a");
29523
+ F.setAttribute("download", I == null ? void 0 : I.uploaded_name), F.href = I == null ? void 0 : I.file_path, F.click();
29524
29524
  }, S = (I) => {
29525
29525
  l.value = I, u.value = {
29526
29526
  title: "Ви впевнені?",
@@ -29535,33 +29535,33 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
29535
29535
  }
29536
29536
  }, r.value = !0;
29537
29537
  }, k = async () => {
29538
- var I, N;
29538
+ var I, F;
29539
29539
  try {
29540
29540
  await Ct.delete(
29541
- `/api/widget/gallery/${(I = l.value) == null ? void 0 : I.entity_id}/${(N = l.value) == null ? void 0 : N.file_id}`
29541
+ `/api/widget/gallery/${(I = l.value) == null ? void 0 : I.entity_id}/${(F = l.value) == null ? void 0 : F.file_id}`
29542
29542
  );
29543
29543
  } catch (V) {
29544
29544
  console.error(V);
29545
29545
  }
29546
- }, M = (I, N = 2) => {
29546
+ }, M = (I, F = 2) => {
29547
29547
  if (I === 0) return "0 Bytes";
29548
- const V = 1024, W = N < 0 ? 0 : N, se = ["Bytes", "KB", "MB", "GB", "TB"], ce = Math.floor(Math.log(I) / Math.log(V));
29548
+ const V = 1024, W = F < 0 ? 0 : F, se = ["Bytes", "KB", "MB", "GB", "TB"], ce = Math.floor(Math.log(I) / Math.log(V));
29549
29549
  return `${parseFloat((I / V ** ce).toFixed(W))} ${se[ce]}`;
29550
29550
  }, P = (I) => {
29551
- const N = {
29551
+ const F = {
29552
29552
  day: "numeric",
29553
29553
  month: "long",
29554
29554
  year: "numeric",
29555
29555
  hour: "numeric",
29556
29556
  minute: "numeric"
29557
29557
  };
29558
- return new Date(I).toLocaleDateString("ru-RU", N);
29558
+ return new Date(I).toLocaleDateString("ru-RU", F);
29559
29559
  };
29560
- return I_(() => i.id, a), Vm(a), (I, N) => {
29560
+ return I_(() => i.id, a), Vm(a), (I, F) => {
29561
29561
  const V = At("VsDialog");
29562
29562
  return xe(), Me("div", WB, [
29563
29563
  Z("div", GB, [
29564
- N[3] || (N[3] = Z("h2", { class: "inline-block font-semibold text-gray-800 dark:text-neutral-200" }, null, -1)),
29564
+ F[3] || (F[3] = Z("h2", { class: "inline-block font-semibold text-gray-800 dark:text-neutral-200" }, null, -1)),
29565
29565
  Z("div", ZB, [
29566
29566
  Z("div", null, [
29567
29567
  Z("label", null, [
@@ -29633,7 +29633,7 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
29633
29633
  title: u.value.title,
29634
29634
  size: "small",
29635
29635
  visible: r.value,
29636
- "onUpdate:visible": N[2] || (N[2] = (W) => r.value = W)
29636
+ "onUpdate:visible": F[2] || (F[2] = (W) => r.value = W)
29637
29637
  }, {
29638
29638
  default: cn(() => [
29639
29639
  Z("div", oN, [
@@ -29642,12 +29642,12 @@ const qB = /* @__PURE__ */ Pt(IB, [["render", HB]]), WB = { class: "flex flex-co
29642
29642
  Z("button", {
29643
29643
  type: "button",
29644
29644
  class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
29645
- onClick: N[0] || (N[0] = (...W) => u.value.cancel && u.value.cancel(...W))
29645
+ onClick: F[0] || (F[0] = (...W) => u.value.cancel && u.value.cancel(...W))
29646
29646
  }, St(u.value.cancelButtonText), 1),
29647
29647
  Z("button", {
29648
29648
  type: "button",
29649
29649
  class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600",
29650
- onClick: N[1] || (N[1] = (...W) => u.value.confirm && u.value.confirm(...W))
29650
+ onClick: F[1] || (F[1] = (...W) => u.value.confirm && u.value.confirm(...W))
29651
29651
  }, St(u.value.confirmButtonText), 1)
29652
29652
  ])
29653
29653
  ])
@@ -32552,8 +32552,8 @@ class ps {
32552
32552
  let M = _ ? e == g ? -1 : e == k ? 1 : i : i, P = g + r + (M < 0 ? 0 : S);
32553
32553
  if (n)
32554
32554
  return P;
32555
- let I = e == (i < 0 ? g : k) ? null : ON(a / 3, e - g), N = e == g ? oT : e == k ? sT : rm;
32556
- return (i < 0 ? e != g : e != k) && (N |= aT), new a_(P, N, I);
32555
+ let I = e == (i < 0 ? g : k) ? null : ON(a / 3, e - g), F = e == g ? oT : e == k ? sT : rm;
32556
+ return (i < 0 ? e != g : e != k) && (F |= aT), new a_(P, F, I);
32557
32557
  }
32558
32558
  r += S - _;
32559
32559
  }
@@ -33089,8 +33089,8 @@ function RN(t, e, i, n) {
33089
33089
  let k = g.marks;
33090
33090
  if (!n.isInSet(k) && S.type.allowsMarkType(n.type)) {
33091
33091
  let M = Math.max(_, e), P = Math.min(_ + g.nodeSize, i), I = n.addToSet(k);
33092
- for (let N = 0; N < k.length; N++)
33093
- k[N].isInSet(I) || (u && u.to == M && u.mark.eq(k[N]) ? u.to = P : r.push(u = new To(M, P, k[N])));
33092
+ for (let F = 0; F < k.length; F++)
33093
+ k[F].isInSet(I) || (u && u.to == M && u.mark.eq(k[F]) ? u.to = P : r.push(u = new To(M, P, k[F])));
33094
33094
  a && a.to == M ? a.to = P : l.push(a = new cl(M, P, n));
33095
33095
  }
33096
33096
  }), r.forEach((g) => t.step(g)), l.forEach((g) => t.step(g));
@@ -33161,11 +33161,11 @@ function ch(t) {
33161
33161
  }
33162
33162
  function BN(t, e, i) {
33163
33163
  let { $from: n, $to: r, depth: l } = e, u = n.before(l + 1), a = r.after(l + 1), g = u, _ = a, S = Ve.empty, k = 0;
33164
- for (let I = l, N = !1; I > i; I--)
33165
- N || n.index(I) > 0 ? (N = !0, S = Ve.from(n.node(I).copy(S)), k++) : g--;
33164
+ for (let I = l, F = !1; I > i; I--)
33165
+ F || n.index(I) > 0 ? (F = !0, S = Ve.from(n.node(I).copy(S)), k++) : g--;
33166
33166
  let M = Ve.empty, P = 0;
33167
- for (let I = l, N = !1; I > i; I--)
33168
- N || r.after(I + 1) < r.end(I) ? (N = !0, M = Ve.from(r.node(I).copy(M)), P++) : _++;
33167
+ for (let I = l, F = !1; I > i; I--)
33168
+ F || r.after(I + 1) < r.end(I) ? (F = !0, M = Ve.from(r.node(I).copy(M)), P++) : _++;
33169
33169
  t.step(new Hn(g, _, u, a, new ft(S.append(M), k, P), S.size - k, !0));
33170
33170
  }
33171
33171
  function pv(t, e, i = null, n = t) {
@@ -33268,8 +33268,8 @@ function Uu(t, e, i = 1, n) {
33268
33268
  return !1;
33269
33269
  let P = k.content.cutByIndex(M, k.childCount), I = n && n[S + 1];
33270
33270
  I && (P = P.replaceChild(0, I.type.create(I.attrs)));
33271
- let N = n && n[S] || k;
33272
- if (!k.canReplace(M + 1, k.childCount) || !N.type.validContent(P))
33271
+ let F = n && n[S] || k;
33272
+ if (!k.canReplace(M + 1, k.childCount) || !F.type.validContent(P))
33273
33273
  return !1;
33274
33274
  }
33275
33275
  let a = r.indexAfter(l), g = n && n[0];
@@ -33436,24 +33436,24 @@ class XN {
33436
33436
  for (; this.depth > i; )
33437
33437
  this.closeFrontierNode();
33438
33438
  if (l)
33439
- for (let N = 0; N < l.length; N++)
33440
- this.openFrontierNode(l[N]);
33439
+ for (let F = 0; F < l.length; F++)
33440
+ this.openFrontierNode(l[F]);
33441
33441
  let u = this.unplaced, a = n ? n.content : u.content, g = u.openStart - e, _ = 0, S = [], { match: k, type: M } = this.frontier[i];
33442
33442
  if (r) {
33443
- for (let N = 0; N < r.childCount; N++)
33444
- S.push(r.child(N));
33443
+ for (let F = 0; F < r.childCount; F++)
33444
+ S.push(r.child(F));
33445
33445
  k = k.matchFragment(r);
33446
33446
  }
33447
33447
  let P = a.size + e - (u.content.size - u.openEnd);
33448
33448
  for (; _ < a.childCount; ) {
33449
- let N = a.child(_), V = k.matchType(N.type);
33449
+ let F = a.child(_), V = k.matchType(F.type);
33450
33450
  if (!V)
33451
33451
  break;
33452
- _++, (_ > 1 || g == 0 || N.content.size) && (k = V, S.push(dT(N.mark(M.allowedMarks(N.marks)), _ == 1 ? g : 0, _ == a.childCount ? P : -1)));
33452
+ _++, (_ > 1 || g == 0 || F.content.size) && (k = V, S.push(dT(F.mark(M.allowedMarks(F.marks)), _ == 1 ? g : 0, _ == a.childCount ? P : -1)));
33453
33453
  }
33454
33454
  let I = _ == a.childCount;
33455
33455
  I || (P = -1), this.placed = Pd(this.placed, i, Ve.from(S)), this.frontier[i].match = k, I && P < 0 && n && n.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
33456
- for (let N = 0, V = a; N < P; N++) {
33456
+ for (let F = 0, V = a; F < P; F++) {
33457
33457
  let W = V.lastChild;
33458
33458
  this.frontier.push({ type: W.type, match: W.contentMatchAt(W.childCount) }), V = W.content;
33459
33459
  }
@@ -33571,8 +33571,8 @@ function QN(t, e, i, n) {
33571
33571
  for (let M = n.openStart; M >= 0; M--) {
33572
33572
  let P = (M + S + 1) % (n.openStart + 1), I = _[P];
33573
33573
  if (I)
33574
- for (let N = 0; N < u.length; N++) {
33575
- let V = u[(N + g) % u.length], W = !0;
33574
+ for (let F = 0; F < u.length; F++) {
33575
+ let V = u[(F + g) % u.length], W = !0;
33576
33576
  V < 0 && (W = !1, V = -V);
33577
33577
  let se = r.node(V - 1), ce = r.index(V - 1);
33578
33578
  if (se.canReplaceWith(ce, ce, I.type, I.marks))
@@ -34886,8 +34886,8 @@ function aw(t, e, i) {
34886
34886
  else {
34887
34887
  let M = a.scrollLeft, P = a.scrollTop;
34888
34888
  k && (a.scrollTop += k), S && (a.scrollLeft += S);
34889
- let I = a.scrollLeft - M, N = a.scrollTop - P;
34890
- e = { left: e.left - I, top: e.top - N, right: e.right - I, bottom: e.bottom - N };
34889
+ let I = a.scrollLeft - M, F = a.scrollTop - P;
34890
+ e = { left: e.left - I, top: e.top - F, right: e.right - I, bottom: e.bottom - F };
34891
34891
  }
34892
34892
  if (g || /^(fixed|sticky)$/.test(getComputedStyle(u).position))
34893
34893
  break;
@@ -34950,12 +34950,12 @@ function bT(t, e) {
34950
34950
  let I = M[P];
34951
34951
  if (I.top <= u && I.bottom >= a) {
34952
34952
  u = Math.max(I.bottom, u), a = Math.min(I.top, a);
34953
- let N = I.left > e.left ? I.left - e.left : I.right < e.left ? e.left - I.right : 0;
34954
- if (N < n) {
34955
- i = S, n = N, r = N && i.nodeType == 3 ? {
34953
+ let F = I.left > e.left ? I.left - e.left : I.right < e.left ? e.left - I.right : 0;
34954
+ if (F < n) {
34955
+ i = S, n = F, r = F && i.nodeType == 3 ? {
34956
34956
  left: I.right < e.left ? I.right : I.left,
34957
34957
  top: e.top
34958
- } : e, S.nodeType == 1 && N && (l = k + (e.left >= (I.left + I.right) / 2 ? 1 : 0));
34958
+ } : e, S.nodeType == 1 && F && (l = k + (e.left >= (I.left + I.right) / 2 ? 1 : 0));
34959
34959
  continue;
34960
34960
  }
34961
34961
  } else I.top > e.top && !g && I.left <= e.left && I.right >= e.left && (g = S, _ = { left: Math.max(I.left, Math.min(I.right, e.left)), top: I.top });
@@ -35167,7 +35167,7 @@ function A3(t, e, i) {
35167
35167
  return a ? !E3.test(n.parent.textContent) || !a.modify ? i == "left" || i == "backward" ? l : u : kT(t, e, () => {
35168
35168
  let { focusNode: g, focusOffset: _, anchorNode: S, anchorOffset: k } = t.domSelectionRange(), M = a.caretBidiLevel;
35169
35169
  a.modify("move", i, "character");
35170
- let P = n.depth ? t.docView.domAfterPos(n.before()) : t.dom, { focusNode: I, focusOffset: N } = t.domSelectionRange(), V = I && !P.contains(I.nodeType == 1 ? I : I.parentNode) || g == I && _ == N;
35170
+ let P = n.depth ? t.docView.domAfterPos(n.before()) : t.dom, { focusNode: I, focusOffset: F } = t.domSelectionRange(), V = I && !P.contains(I.nodeType == 1 ? I : I.parentNode) || g == I && _ == F;
35171
35171
  try {
35172
35172
  a.collapse(S, k), g && (g != S || _ != k) && a.extend && a.extend(g, _);
35173
35173
  } catch {
@@ -35427,10 +35427,10 @@ class vp {
35427
35427
  setSelection(e, i, n, r = !1) {
35428
35428
  let l = Math.min(e, i), u = Math.max(e, i);
35429
35429
  for (let M = 0, P = 0; M < this.children.length; M++) {
35430
- let I = this.children[M], N = P + I.size;
35431
- if (l > P && u < N)
35430
+ let I = this.children[M], F = P + I.size;
35431
+ if (l > P && u < F)
35432
35432
  return I.setSelection(e - P - I.border, i - P - I.border, n, r);
35433
- P = N;
35433
+ P = F;
35434
35434
  }
35435
35435
  let a = this.domFromPos(e, e ? -1 : 1), g = i == e ? a : this.domFromPos(i, i ? -1 : 1), _ = n.getSelection(), S = !1;
35436
35436
  if ((ro || Ar) && e == i) {
@@ -35438,9 +35438,9 @@ class vp {
35438
35438
  if (M.nodeType == 3) {
35439
35439
  if (S = !!(P && M.nodeValue[P - 1] == `
35440
35440
  `), S && P == M.nodeValue.length)
35441
- for (let I = M, N; I; I = I.parentNode) {
35442
- if (N = I.nextSibling) {
35443
- N.nodeName == "BR" && (a = g = { node: N.parentNode, offset: tr(N) + 1 });
35441
+ for (let I = M, F; I; I = I.parentNode) {
35442
+ if (F = I.nextSibling) {
35443
+ F.nodeName == "BR" && (a = g = { node: F.parentNode, offset: tr(F) + 1 });
35444
35444
  break;
35445
35445
  }
35446
35446
  let V = I.pmViewDesc;
@@ -36139,8 +36139,8 @@ function F3(t, e, i, n) {
36139
36139
  } else
36140
36140
  for (; u < r.length && r[u].to < I; )
36141
36141
  u++;
36142
- let N = M.isInline && !M.isLeaf ? a.filter((V) => !V.inline) : a.slice();
36143
- n(M, N, e.forChild(l, M), P), l = I;
36142
+ let F = M.isInline && !M.isLeaf ? a.filter((V) => !V.inline) : a.slice();
36143
+ n(M, F, e.forChild(l, M), P), l = I;
36144
36144
  }
36145
36145
  }
36146
36146
  function B3(t) {
@@ -36602,9 +36602,9 @@ function RT(t, e, i, n, r) {
36602
36602
  a = k;
36603
36603
  else {
36604
36604
  let M = r.marks(), { schema: P } = t.state, I = Mc.fromSchema(P);
36605
- u = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((N) => {
36605
+ u = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((F) => {
36606
36606
  let V = u.appendChild(document.createElement("p"));
36607
- N && V.appendChild(I.serializeNode(P.text(N, M)));
36607
+ F && V.appendChild(I.serializeNode(P.text(F, M)));
36608
36608
  });
36609
36609
  }
36610
36610
  } else
@@ -37143,7 +37143,7 @@ Ir.drop = (t, e) => {
37143
37143
  _.setSelection(new Ft(P));
37144
37144
  else {
37145
37145
  let I = _.mapping.map(g);
37146
- _.mapping.maps[_.mapping.maps.length - 1].forEach((N, V, W, se) => I = se), _.setSelection(yv(t, P, _.doc.resolve(I)));
37146
+ _.mapping.maps[_.mapping.maps.length - 1].forEach((F, V, W, se) => I = se), _.setSelection(yv(t, P, _.doc.resolve(I)));
37147
37147
  }
37148
37148
  t.focus(), t.dispatch(_.setMeta("uiEvent", "drop"));
37149
37149
  };
@@ -37548,8 +37548,8 @@ function w5(t, e, i, n, r, l, u) {
37548
37548
  let a = t.slice();
37549
37549
  for (let _ = 0, S = l; _ < i.maps.length; _++) {
37550
37550
  let k = 0;
37551
- i.maps[_].forEach((M, P, I, N) => {
37552
- let V = N - I - (P - M);
37551
+ i.maps[_].forEach((M, P, I, F) => {
37552
+ let V = F - I - (P - M);
37553
37553
  for (let W = 0; W < a.length; W += 3) {
37554
37554
  let se = a[W + 1];
37555
37555
  if (se < 0 || M > se + S - k)
@@ -37572,8 +37572,8 @@ function w5(t, e, i, n, r, l, u) {
37572
37572
  g = !0;
37573
37573
  continue;
37574
37574
  }
37575
- let M = i.map(t[_ + 1] + l, -1), P = M - r, { index: I, offset: N } = n.content.findIndex(k), V = n.maybeChild(I);
37576
- if (V && N == k && N + V.nodeSize == P) {
37575
+ let M = i.map(t[_ + 1] + l, -1), P = M - r, { index: I, offset: F } = n.content.findIndex(k), V = n.maybeChild(I);
37576
+ if (V && F == k && F + V.nodeSize == P) {
37577
37577
  let W = a[_ + 2].mapInner(i, V, S + 1, t[_] + l + 1, u);
37578
37578
  W != fr ? (a[_] = k, a[_ + 1] = P, a[_ + 2] = W) : (a[_ + 1] = -2, g = !0);
37579
37579
  } else
@@ -37889,7 +37889,7 @@ function I5(t, e, i) {
37889
37889
  if (!se || se.size)
37890
37890
  break;
37891
37891
  }
37892
- let k = t.state.doc, M = t.someProp("domParser") || Bd.fromSchema(t.state.schema), P = k.resolve(u), I = null, N = M.parse(n, {
37892
+ let k = t.state.doc, M = t.someProp("domParser") || Bd.fromSchema(t.state.schema), P = k.resolve(u), I = null, F = M.parse(n, {
37893
37893
  topNode: P.parent,
37894
37894
  topMatch: P.parent.contentMatchAt(P.index()),
37895
37895
  topOpen: !0,
@@ -37904,7 +37904,7 @@ function I5(t, e, i) {
37904
37904
  let V = _[0].pos, W = _[1] && _[1].pos;
37905
37905
  W == null && (W = V), I = { anchor: V + u, head: W + u };
37906
37906
  }
37907
- return { doc: N, sel: I, from: u, to: a };
37907
+ return { doc: F, sel: I, from: u, to: a };
37908
37908
  }
37909
37909
  function D5(t) {
37910
37910
  let e = t.pmViewDesc;
@@ -37956,31 +37956,31 @@ function z5(t, e, i, n, r) {
37956
37956
  return;
37957
37957
  }
37958
37958
  t.state.selection.from < t.state.selection.to && I.start == I.endB && t.state.selection instanceof Ut && (I.start > t.state.selection.from && I.start <= t.state.selection.from + 2 && t.state.selection.from >= _.from ? I.start = t.state.selection.from : I.endA < t.state.selection.to && I.endA >= t.state.selection.to - 2 && t.state.selection.to <= _.to && (I.endB += t.state.selection.to - I.endA, I.endA = t.state.selection.to)), Xr && fl <= 11 && I.endB == I.start + 1 && I.endA == I.start && I.start > _.from && _.doc.textBetween(I.start - _.from - 1, I.start - _.from + 1) == "  " && (I.start--, I.endA--, I.endB--);
37959
- let N = _.doc.resolveNoCache(I.start - _.from), V = _.doc.resolveNoCache(I.endB - _.from), W = S.resolve(I.start), se = N.sameParent(V) && N.parent.inlineContent && W.end() >= I.endA, ce;
37960
- if ((Xu && t.input.lastIOSEnter > Date.now() - 225 && (!se || r.some((ze) => ze.nodeName == "DIV" || ze.nodeName == "P")) || !se && N.pos < _.doc.content.size && !N.sameParent(V) && (ce = Jt.findFrom(_.doc.resolve(N.pos + 1), 1, !0)) && ce.head == V.pos) && t.someProp("handleKeyDown", (ze) => ze(t, ic(13, "Enter")))) {
37959
+ let F = _.doc.resolveNoCache(I.start - _.from), V = _.doc.resolveNoCache(I.endB - _.from), W = S.resolve(I.start), se = F.sameParent(V) && F.parent.inlineContent && W.end() >= I.endA, ce;
37960
+ if ((Xu && t.input.lastIOSEnter > Date.now() - 225 && (!se || r.some((ze) => ze.nodeName == "DIV" || ze.nodeName == "P")) || !se && F.pos < _.doc.content.size && !F.sameParent(V) && (ce = Jt.findFrom(_.doc.resolve(F.pos + 1), 1, !0)) && ce.head == V.pos) && t.someProp("handleKeyDown", (ze) => ze(t, ic(13, "Enter")))) {
37961
37961
  t.input.lastIOSEnter = 0;
37962
37962
  return;
37963
37963
  }
37964
- if (t.state.selection.anchor > I.start && L5(S, I.start, I.endA, N, V) && t.someProp("handleKeyDown", (ze) => ze(t, ic(8, "Backspace")))) {
37964
+ if (t.state.selection.anchor > I.start && L5(S, I.start, I.endA, F, V) && t.someProp("handleKeyDown", (ze) => ze(t, ic(8, "Backspace")))) {
37965
37965
  Js && yr && t.domObserver.suppressSelectionUpdates();
37966
37966
  return;
37967
37967
  }
37968
- yr && Js && I.endB == I.start && (t.input.lastAndroidDelete = Date.now()), Js && !se && N.start() != V.start() && V.parentOffset == 0 && N.depth == V.depth && _.sel && _.sel.anchor == _.sel.head && _.sel.head == I.endA && (I.endB -= 2, V = _.doc.resolveNoCache(I.endB - _.from), setTimeout(() => {
37968
+ yr && Js && I.endB == I.start && (t.input.lastAndroidDelete = Date.now()), Js && !se && F.start() != V.start() && V.parentOffset == 0 && F.depth == V.depth && _.sel && _.sel.anchor == _.sel.head && _.sel.head == I.endA && (I.endB -= 2, V = _.doc.resolveNoCache(I.endB - _.from), setTimeout(() => {
37969
37969
  t.someProp("handleKeyDown", function(ze) {
37970
37970
  return ze(t, ic(13, "Enter"));
37971
37971
  });
37972
37972
  }, 20));
37973
37973
  let Q = I.start, Oe = I.endA, ke, Pe, Xe;
37974
37974
  if (se) {
37975
- if (N.pos == V.pos)
37976
- Xr && fl <= 11 && N.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => da(t), 20)), ke = t.state.tr.delete(Q, Oe), Pe = S.resolve(I.start).marksAcross(S.resolve(I.endA));
37975
+ if (F.pos == V.pos)
37976
+ Xr && fl <= 11 && F.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => da(t), 20)), ke = t.state.tr.delete(Q, Oe), Pe = S.resolve(I.start).marksAcross(S.resolve(I.endA));
37977
37977
  else if (
37978
37978
  // Adding or removing a mark
37979
- I.endA == I.endB && (Xe = R5(N.parent.content.cut(N.parentOffset, V.parentOffset), W.parent.content.cut(W.parentOffset, I.endA - W.start())))
37979
+ I.endA == I.endB && (Xe = R5(F.parent.content.cut(F.parentOffset, V.parentOffset), W.parent.content.cut(W.parentOffset, I.endA - W.start())))
37980
37980
  )
37981
37981
  ke = t.state.tr, Xe.type == "add" ? ke.addMark(Q, Oe, Xe.mark) : ke.removeMark(Q, Oe, Xe.mark);
37982
- else if (N.parent.child(N.index()).isText && N.index() == V.index() - (V.textOffset ? 0 : 1)) {
37983
- let ze = N.parent.textBetween(N.parentOffset, V.parentOffset);
37982
+ else if (F.parent.child(F.index()).isText && F.index() == V.index() - (V.textOffset ? 0 : 1)) {
37983
+ let ze = F.parent.textBetween(F.parentOffset, V.parentOffset);
37984
37984
  if (t.someProp("handleTextInput", (Qe) => Qe(t, Q, Oe, ze)))
37985
37985
  return;
37986
37986
  ke = t.state.tr.insertText(ze, Q, Oe);
@@ -38828,8 +38828,8 @@ function iM(t, e, i, n) {
38828
38828
  for (let W = u.length - 1; W >= 0; W--)
38829
38829
  I = Ve.from(u[W].create(null, I));
38830
38830
  I = Ve.from(r.copy(I));
38831
- let N = t.tr.step(new Hn(e.pos - 1, P, e.pos, P, new ft(I, 1, 0), u.length, !0)), V = P + 2 * u.length;
38832
- xl(N.doc, V) && N.join(V), i(N.scrollIntoView());
38831
+ let F = t.tr.step(new Hn(e.pos - 1, P, e.pos, P, new ft(I, 1, 0), u.length, !0)), V = P + 2 * u.length;
38832
+ xl(F.doc, V) && F.join(V), i(F.scrollIntoView());
38833
38833
  }
38834
38834
  return !0;
38835
38835
  }
@@ -38840,10 +38840,10 @@ function iM(t, e, i, n) {
38840
38840
  let P = r, I = [];
38841
38841
  for (; I.push(P), !P.isTextblock; )
38842
38842
  P = P.lastChild;
38843
- let N = l, V = 1;
38844
- for (; !N.isTextblock; N = N.firstChild)
38843
+ let F = l, V = 1;
38844
+ for (; !F.isTextblock; F = F.firstChild)
38845
38845
  V++;
38846
- if (P.canReplace(P.childCount, P.childCount, N.content)) {
38846
+ if (P.canReplace(P.childCount, P.childCount, F.content)) {
38847
38847
  if (i) {
38848
38848
  let W = Ve.empty;
38849
38849
  for (let ce = I.length - 1; ce >= 0; ce--)
@@ -38951,7 +38951,7 @@ function g4(t, e, i, n) {
38951
38951
  }
38952
38952
  function y4(t, e, i) {
38953
38953
  let n = t.tr, r = i.parent;
38954
- for (let P = i.end, I = i.endIndex - 1, N = i.startIndex; I > N; I--)
38954
+ for (let P = i.end, I = i.endIndex - 1, F = i.startIndex; I > F; I--)
38955
38955
  P -= r.child(I).nodeSize, n.delete(P - 1, P + 1);
38956
38956
  let l = n.doc.resolve(i.start), u = l.nodeAfter;
38957
38957
  if (n.mapping.map(i.end) != i.start + l.nodeAfter.nodeSize)
@@ -39030,8 +39030,8 @@ class fg {
39030
39030
  }
39031
39031
  createChain(e, i = !0) {
39032
39032
  const { rawCommands: n, editor: r, state: l } = this, { view: u } = r, a = [], g = !!e, _ = e || l.tr, S = () => (!g && i && !_.getMeta("preventDispatch") && !this.hasCustomState && u.dispatch(_), a.every((M) => M === !0)), k = {
39033
- ...Object.fromEntries(Object.entries(n).map(([M, P]) => [M, (...N) => {
39034
- const V = this.buildProps(_, i), W = P(...N)(V);
39033
+ ...Object.fromEntries(Object.entries(n).map(([M, P]) => [M, (...F) => {
39034
+ const V = this.buildProps(_, i), W = P(...F)(V);
39035
39035
  return a.push(W), k;
39036
39036
  }])),
39037
39037
  run: S
@@ -39259,8 +39259,8 @@ function w4(t, e) {
39259
39259
  }))
39260
39260
  }), I = ri(wt(_, "parseHTML", k));
39261
39261
  I && (P.parseDOM = I.map((W) => Nw(W, S)));
39262
- const N = wt(_, "renderHTML", k);
39263
- N && (P.toDOM = (W) => N({
39262
+ const F = wt(_, "renderHTML", k);
39263
+ F && (P.toDOM = (W) => F({
39264
39264
  node: W,
39265
39265
  HTMLAttributes: v_(W, S)
39266
39266
  }));
@@ -39291,8 +39291,8 @@ function w4(t, e) {
39291
39291
  }))
39292
39292
  }), I = ri(wt(_, "parseHTML", k));
39293
39293
  I && (P.parseDOM = I.map((V) => Nw(V, S)));
39294
- const N = wt(_, "renderHTML", k);
39295
- return N && (P.toDOM = (V) => N({
39294
+ const F = wt(_, "renderHTML", k);
39295
+ return F && (P.toDOM = (V) => F({
39296
39296
  mark: V,
39297
39297
  HTMLAttributes: v_(V, S)
39298
39298
  })), [_.name, P];
@@ -39359,7 +39359,7 @@ function qf(t) {
39359
39359
  const P = k4(k, M.find);
39360
39360
  if (!P)
39361
39361
  return;
39362
- const I = g.state.tr, N = pg({
39362
+ const I = g.state.tr, F = pg({
39363
39363
  state: g.state,
39364
39364
  transaction: I
39365
39365
  }), V = {
@@ -39367,10 +39367,10 @@ function qf(t) {
39367
39367
  to: r
39368
39368
  }, { commands: W, chain: se, can: ce } = new fg({
39369
39369
  editor: i,
39370
- state: N
39370
+ state: F
39371
39371
  });
39372
39372
  M.handler({
39373
- state: N,
39373
+ state: F,
39374
39374
  range: V,
39375
39375
  match: P,
39376
39376
  commands: W,
@@ -39537,11 +39537,11 @@ function P4(t) {
39537
39537
  return i.doc.nodesBetween(n, r, (P, I) => {
39538
39538
  if (!P.isTextblock || P.type.spec.code)
39539
39539
  return;
39540
- const N = Math.max(n, I), V = Math.min(r, I + P.content.size), W = P.textBetween(N - I, V - I, void 0, "");
39540
+ const F = Math.max(n, I), V = Math.min(r, I + P.content.size), W = P.textBetween(F - I, V - I, void 0, "");
39541
39541
  A4(W, l.find, u).forEach((ce) => {
39542
39542
  if (ce.index === void 0)
39543
39543
  return;
39544
- const Q = N + ce.index + 1, Oe = Q + ce[0].length, ke = {
39544
+ const Q = F + ce.index + 1, Oe = Q + ce[0].length, ke = {
39545
39545
  from: i.tr.mapping.map(Q),
39546
39546
  to: i.tr.mapping.map(Oe)
39547
39547
  }, Pe = l.handler({
@@ -39569,9 +39569,9 @@ function D4(t) {
39569
39569
  const { editor: e, rules: i } = t;
39570
39570
  let n = null, r = !1, l = !1, u = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, a = typeof DragEvent < "u" ? new DragEvent("drop") : null;
39571
39571
  const g = ({ state: S, from: k, to: M, rule: P, pasteEvt: I }) => {
39572
- const N = S.tr, V = pg({
39572
+ const F = S.tr, V = pg({
39573
39573
  state: S,
39574
- transaction: N
39574
+ transaction: F
39575
39575
  });
39576
39576
  if (!(!P4({
39577
39577
  editor: e,
@@ -39581,8 +39581,8 @@ function D4(t) {
39581
39581
  rule: P,
39582
39582
  pasteEvent: I,
39583
39583
  dropEvent: a
39584
- }) || !N.steps.length))
39585
- return a = typeof DragEvent < "u" ? new DragEvent("drop") : null, u = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, N;
39584
+ }) || !F.steps.length))
39585
+ return a = typeof DragEvent < "u" ? new DragEvent("drop") : null, u = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, F;
39586
39586
  };
39587
39587
  return i.map((S) => new nr({
39588
39588
  // we register a global drag handler to track the current drag source element
@@ -39608,8 +39608,8 @@ function D4(t) {
39608
39608
  }
39609
39609
  },
39610
39610
  appendTransaction: (k, M, P) => {
39611
- const I = k[0], N = I.getMeta("uiEvent") === "paste" && !r, V = I.getMeta("uiEvent") === "drop" && !l, W = I.getMeta("applyPasteRules"), se = !!W;
39612
- if (!N && !V && !se)
39611
+ const I = k[0], F = I.getMeta("uiEvent") === "paste" && !r, V = I.getMeta("uiEvent") === "drop" && !l, W = I.getMeta("applyPasteRules"), se = !!W;
39612
+ if (!F && !V && !se)
39613
39613
  return;
39614
39614
  if (se) {
39615
39615
  const { from: Oe, text: ke } = W, Pe = Oe + ke.length, Xe = I4(ke);
@@ -39711,8 +39711,8 @@ class Bu {
39711
39711
  }, g = [], _ = wt(u, "addKeyboardShortcuts", a);
39712
39712
  let S = {};
39713
39713
  if (u.type === "mark" && wt(u, "exitable", a) && (S.ArrowRight = () => Po.handleExit({ editor: e, mark: u })), _) {
39714
- const N = Object.fromEntries(Object.entries(_()).map(([V, W]) => [V, () => W({ editor: e })]));
39715
- S = { ...S, ...N };
39714
+ const F = Object.fromEntries(Object.entries(_()).map(([V, W]) => [V, () => W({ editor: e })]));
39715
+ S = { ...S, ...F };
39716
39716
  }
39717
39717
  const k = G5(S);
39718
39718
  g.push(k);
@@ -39722,8 +39722,8 @@ class Bu {
39722
39722
  Vw(u, e.options.enablePasteRules) && P && r.push(...P());
39723
39723
  const I = wt(u, "addProseMirrorPlugins", a);
39724
39724
  if (I) {
39725
- const N = I();
39726
- g.push(...N);
39725
+ const F = I();
39726
+ g.push(...F);
39727
39727
  }
39728
39728
  return g;
39729
39729
  }).flat();
@@ -39896,8 +39896,8 @@ const z4 = Gn.create({
39896
39896
  return;
39897
39897
  const I = ch(P);
39898
39898
  if (a.type.isTextblock) {
39899
- const { defaultType: N } = k.parent.contentMatchAt(k.index());
39900
- e.setNodeMarkup(P.start, N);
39899
+ const { defaultType: F } = k.parent.contentMatchAt(k.index());
39900
+ e.setNodeMarkup(P.start, F);
39901
39901
  }
39902
39902
  (I || I === 0) && e.lift(P, I);
39903
39903
  });
@@ -40349,11 +40349,11 @@ function w_(t, e, i = {}) {
40349
40349
  const a = [];
40350
40350
  if (r.forEach(({ $from: k, $to: M }) => {
40351
40351
  const P = k.pos, I = M.pos;
40352
- t.doc.nodesBetween(P, I, (N, V) => {
40353
- if (!N.isText && !N.marks.length)
40352
+ t.doc.nodesBetween(P, I, (F, V) => {
40353
+ if (!F.isText && !F.marks.length)
40354
40354
  return;
40355
- const W = Math.max(P, V), se = Math.min(I, V + N.nodeSize), ce = se - W;
40356
- u += ce, a.push(...N.marks.map((Q) => ({
40355
+ const W = Math.max(P, V), se = Math.min(I, V + F.nodeSize), ce = se - W;
40356
+ u += ce, a.push(...F.marks.map((Q) => ({
40357
40357
  mark: Q,
40358
40358
  from: W,
40359
40359
  to: se
@@ -40437,7 +40437,7 @@ function D$(t, e, i) {
40437
40437
  if (_)
40438
40438
  return !1;
40439
40439
  if (S.isInline) {
40440
- const P = !M || M.type.allowsMarkType(i), I = !!i.isInSet(S.marks) || !S.marks.some((N) => N.type.excludes(i));
40440
+ const P = !M || M.type.allowsMarkType(i), I = !!i.isInSet(S.marks) || !S.marks.some((F) => F.type.excludes(i));
40441
40441
  _ = P && I;
40442
40442
  }
40443
40443
  return !_;
@@ -40457,13 +40457,13 @@ const O$ = (t, e = {}) => ({ tr: i, state: n, dispatch: r }) => {
40457
40457
  a.forEach((_) => {
40458
40458
  const S = _.$from.pos, k = _.$to.pos;
40459
40459
  n.doc.nodesBetween(S, k, (M, P) => {
40460
- const I = Math.max(P, S), N = Math.min(P + M.nodeSize, k);
40460
+ const I = Math.max(P, S), F = Math.min(P + M.nodeSize, k);
40461
40461
  M.marks.find((W) => W.type === g) ? M.marks.forEach((W) => {
40462
- g === W.type && i.addMark(I, N, g.create({
40462
+ g === W.type && i.addMark(I, F, g.create({
40463
40463
  ...W.attrs,
40464
40464
  ...e
40465
40465
  }));
40466
- }) : i.addMark(I, N, g.create(e));
40466
+ }) : i.addMark(I, F, g.create(e));
40467
40467
  });
40468
40468
  });
40469
40469
  return D$(n, i, g);
@@ -40513,7 +40513,7 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
40513
40513
  }
40514
40514
  ] : void 0), n) {
40515
40515
  if (I && (l instanceof Ut && e.deleteSelection(), e.split(e.mapping.map(a.pos), 1, P), M && !k && !a.parentOffset && a.parent.type !== M)) {
40516
- const N = e.mapping.map(a.before()), V = e.doc.resolve(N);
40516
+ const F = e.mapping.map(a.before()), V = e.doc.resolve(F);
40517
40517
  a.node(-1).canReplaceWith(V.index(), V.index() + 1, M) && e.setNodeMarkup(e.mapping.map(a.before()), M);
40518
40518
  }
40519
40519
  t && Hw(i, r.extensionManager.splittableMarks), e.scrollIntoView();
@@ -40555,14 +40555,14 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
40555
40555
  const P = _.pos === g.end() ? k.contentMatchAt(0).defaultType : null, I = {
40556
40556
  ...sm(M, k.type.name, k.attrs),
40557
40557
  ...e
40558
- }, N = {
40558
+ }, F = {
40559
40559
  ...sm(M, g.node().type.name, g.node().attrs),
40560
40560
  ...e
40561
40561
  };
40562
40562
  i.delete(g.pos, _.pos);
40563
40563
  const V = P ? [
40564
40564
  { type: a, attrs: I },
40565
- { type: P, attrs: N }
40565
+ { type: P, attrs: F }
40566
40566
  ] : [{ type: a, attrs: I }];
40567
40567
  if (!Uu(i.doc, g.pos, 2))
40568
40568
  return !1;
@@ -40593,10 +40593,10 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
40593
40593
  const r = t.doc.nodeAt(n);
40594
40594
  return i.node.type === (r == null ? void 0 : r.type) && xl(t.doc, n) && t.join(n), !0;
40595
40595
  }, V$ = (t, e, i, n = {}) => ({ editor: r, tr: l, state: u, dispatch: a, chain: g, commands: _, can: S }) => {
40596
- const { extensions: k, splittableMarks: M } = r.extensionManager, P = Wn(t, u.schema), I = Wn(e, u.schema), { selection: N, storedMarks: V } = u, { $from: W, $to: se } = N, ce = W.blockRange(se), Q = V || N.$to.parentOffset && N.$from.marks();
40596
+ const { extensions: k, splittableMarks: M } = r.extensionManager, P = Wn(t, u.schema), I = Wn(e, u.schema), { selection: F, storedMarks: V } = u, { $from: W, $to: se } = F, ce = W.blockRange(se), Q = V || F.$to.parentOffset && F.$from.marks();
40597
40597
  if (!ce)
40598
40598
  return !1;
40599
- const Oe = Pv((ke) => Uw(ke.type.name, k))(N);
40599
+ const Oe = Pv((ke) => Uw(ke.type.name, k))(F);
40600
40600
  if (ce.depth >= 1 && Oe && ce.depth - Oe.depth <= 1) {
40601
40601
  if (Oe.node.type === P)
40602
40602
  return _.liftListItem(I);
@@ -40649,8 +40649,8 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
40649
40649
  return !0;
40650
40650
  if (S && u) {
40651
40651
  let { from: M, to: P } = a;
40652
- const I = (l = _.marks().find((V) => V.type === g)) === null || l === void 0 ? void 0 : l.attrs, N = Mv(_, g, I);
40653
- N && (M = N.from, P = N.to), i.removeMark(M, P, g);
40652
+ const I = (l = _.marks().find((V) => V.type === g)) === null || l === void 0 ? void 0 : l.attrs, F = Mv(_, g, I);
40653
+ F && (M = F.from, P = F.to), i.removeMark(M, P, g);
40654
40654
  } else
40655
40655
  k.forEach((M) => {
40656
40656
  i.removeMark(M.$from.pos, M.$to.pos, g);
@@ -40667,8 +40667,8 @@ const N$ = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: i, dispatch: n, edit
40667
40667
  ...e
40668
40668
  }), u && k.marks.length && k.marks.forEach((P) => {
40669
40669
  if (u === P.type) {
40670
- const I = Math.max(M, _), N = Math.min(M + k.nodeSize, S);
40671
- i.addMark(I, N, u.create({
40670
+ const I = Math.max(M, _), F = Math.min(M + k.nodeSize, S);
40671
+ i.addMark(I, F, u.create({
40672
40672
  ...P.attrs,
40673
40673
  ...e
40674
40674
  }));
@@ -40813,7 +40813,7 @@ const J$ = Gn.create({
40813
40813
  () => u.undoInputRule(),
40814
40814
  // maybe convert first text block node to default node
40815
40815
  () => u.command(({ tr: a }) => {
40816
- const { selection: g, doc: _ } = a, { empty: S, $anchor: k } = g, { pos: M, parent: P } = k, I = k.parent.isTextblock && M > 0 ? a.doc.resolve(M - 1) : k, N = I.parent.type.spec.isolating, V = k.pos - k.parentOffset, W = N && I.parent.childCount === 1 ? V === k.pos : Jt.atStart(_).from === M;
40816
+ const { selection: g, doc: _ } = a, { empty: S, $anchor: k } = g, { pos: M, parent: P } = k, I = k.parent.isTextblock && M > 0 ? a.doc.resolve(M - 1) : k, F = I.parent.type.spec.isolating, V = k.pos - k.parentOffset, W = F && I.parent.childCount === 1 ? V === k.pos : Jt.atStart(_).from === M;
40817
40817
  return !S || !P.type.isTextblock || P.textContent.length || !W || W && k.parent.type.name === "paragraph" ? !1 : u.clearNodes();
40818
40818
  }),
40819
40819
  () => u.deleteSelection(),
@@ -40863,7 +40863,7 @@ const J$ = Gn.create({
40863
40863
  new nr({
40864
40864
  key: new Qr("clearDocument"),
40865
40865
  appendTransaction: (t, e, i) => {
40866
- const n = t.some((N) => N.docChanged) && !e.doc.eq(i.doc), r = t.some((N) => N.getMeta("preventClearDocument"));
40866
+ const n = t.some((F) => F.docChanged) && !e.doc.eq(i.doc), r = t.some((F) => F.getMeta("preventClearDocument"));
40867
40867
  if (!n || r)
40868
40868
  return;
40869
40869
  const { empty: l, from: u, to: a } = e.selection, g = Jt.atStart(e.doc).from, _ = Jt.atEnd(e.doc).to;
@@ -41459,7 +41459,7 @@ function Ju(t) {
41459
41459
  const { tr: l } = e, u = n[n.length - 1], a = n[0];
41460
41460
  if (u) {
41461
41461
  const g = a.search(/\S/), _ = i.from + a.indexOf(u), S = _ + u.length;
41462
- if (hM(i.from, i.to, e.doc).filter((P) => P.mark.type.excluded.find((N) => N === t.type && N !== P.mark.type)).filter((P) => P.to > _).length)
41462
+ if (hM(i.from, i.to, e.doc).filter((P) => P.mark.type.excluded.find((F) => F === t.type && F !== P.mark.type)).filter((P) => P.to > _).length)
41463
41463
  return null;
41464
41464
  S < i.to && l.delete(S, i.to), _ > i.from && l.delete(i.from + g, _);
41465
41465
  const M = i.from + g + u.length;
@@ -41510,8 +41510,8 @@ function sp(t) {
41510
41510
  if (u.wrap(g, _), t.keepMarks && t.editor) {
41511
41511
  const { selection: k, storedMarks: M } = e, { splittableMarks: P } = t.editor.extensionManager, I = M || k.$to.parentOffset && k.$from.marks();
41512
41512
  if (I) {
41513
- const N = I.filter((V) => P.includes(V.type.name));
41514
- u.ensureMarks(N);
41513
+ const F = I.filter((V) => P.includes(V.type.name));
41514
+ u.ensureMarks(F);
41515
41515
  }
41516
41516
  }
41517
41517
  if (t.keepAttributes) {
@@ -41787,7 +41787,7 @@ var CV = function(e, i) {
41787
41787
  function EV(t) {
41788
41788
  var e, i = t.state, n = t.name, r = t.options, l = i.elements.arrow, u = i.modifiersData.popperOffsets, a = Mo(i.placement), g = Rv(a), _ = [Jr, Us].indexOf(a) >= 0, S = _ ? "height" : "width";
41789
41789
  if (!(!l || !u)) {
41790
- var k = CV(r.padding, i), M = zv(l), P = g === "y" ? Kr : Jr, I = g === "y" ? js : Us, N = i.rects.reference[S] + i.rects.reference[g] - u[g] - i.rects.popper[S], V = u[g] - i.rects.reference[g], W = bp(l), se = W ? g === "y" ? W.clientHeight || 0 : W.clientWidth || 0 : 0, ce = N / 2 - V / 2, Q = k[P], Oe = se - M[S] - k[I], ke = se / 2 - M[S] / 2 + ce, Pe = jd(Q, ke, Oe), Xe = g;
41790
+ var k = CV(r.padding, i), M = zv(l), P = g === "y" ? Kr : Jr, I = g === "y" ? js : Us, F = i.rects.reference[S] + i.rects.reference[g] - u[g] - i.rects.popper[S], V = u[g] - i.rects.reference[g], W = bp(l), se = W ? g === "y" ? W.clientHeight || 0 : W.clientWidth || 0 : 0, ce = F / 2 - V / 2, Q = k[P], Oe = se - M[S] - k[I], ke = se / 2 - M[S] / 2 + ce, Pe = jd(Q, ke, Oe), Xe = g;
41791
41791
  i.modifiersData[n] = (e = {}, e[Xe] = Pe, e.centerOffset = Pe - ke, e);
41792
41792
  }
41793
41793
  }
@@ -41821,14 +41821,14 @@ function DV(t, e) {
41821
41821
  };
41822
41822
  }
41823
41823
  function Gw(t) {
41824
- var e, i = t.popper, n = t.popperRect, r = t.placement, l = t.variation, u = t.offsets, a = t.position, g = t.gpuAcceleration, _ = t.adaptive, S = t.roundOffsets, k = t.isFixed, M = u.x, P = M === void 0 ? 0 : M, I = u.y, N = I === void 0 ? 0 : I, V = typeof S == "function" ? S({
41824
+ var e, i = t.popper, n = t.popperRect, r = t.placement, l = t.variation, u = t.offsets, a = t.position, g = t.gpuAcceleration, _ = t.adaptive, S = t.roundOffsets, k = t.isFixed, M = u.x, P = M === void 0 ? 0 : M, I = u.y, F = I === void 0 ? 0 : I, V = typeof S == "function" ? S({
41825
41825
  x: P,
41826
- y: N
41826
+ y: F
41827
41827
  }) : {
41828
41828
  x: P,
41829
- y: N
41829
+ y: F
41830
41830
  };
41831
- P = V.x, N = V.y;
41831
+ P = V.x, F = V.y;
41832
41832
  var W = u.hasOwnProperty("x"), se = u.hasOwnProperty("y"), ce = Jr, Q = Kr, Oe = window;
41833
41833
  if (_) {
41834
41834
  var ke = bp(i), Pe = "clientHeight", Xe = "clientWidth";
@@ -41838,7 +41838,7 @@ function Gw(t) {
41838
41838
  // $FlowFixMe[prop-missing]
41839
41839
  ke[Pe]
41840
41840
  );
41841
- N -= ze - n.height, N *= g ? 1 : -1;
41841
+ F -= ze - n.height, F *= g ? 1 : -1;
41842
41842
  }
41843
41843
  if (r === Jr || (r === Kr || r === js) && l === op) {
41844
41844
  ce = Us;
@@ -41853,16 +41853,16 @@ function Gw(t) {
41853
41853
  position: a
41854
41854
  }, _ && IV), Ht = S === !0 ? DV({
41855
41855
  x: P,
41856
- y: N
41856
+ y: F
41857
41857
  }, _s(i)) : {
41858
41858
  x: P,
41859
- y: N
41859
+ y: F
41860
41860
  };
41861
- if (P = Ht.x, N = Ht.y, g) {
41861
+ if (P = Ht.x, F = Ht.y, g) {
41862
41862
  var yt;
41863
- return Object.assign({}, lt, (yt = {}, yt[Q] = se ? "0" : "", yt[ce] = W ? "0" : "", yt.transform = (Oe.devicePixelRatio || 1) <= 1 ? "translate(" + P + "px, " + N + "px)" : "translate3d(" + P + "px, " + N + "px, 0)", yt));
41863
+ return Object.assign({}, lt, (yt = {}, yt[Q] = se ? "0" : "", yt[ce] = W ? "0" : "", yt.transform = (Oe.devicePixelRatio || 1) <= 1 ? "translate(" + P + "px, " + F + "px)" : "translate3d(" + P + "px, " + F + "px, 0)", yt));
41864
41864
  }
41865
- return Object.assign({}, lt, (e = {}, e[Q] = se ? N + "px" : "", e[ce] = W ? P + "px" : "", e.transform = "", e));
41865
+ return Object.assign({}, lt, (e = {}, e[Q] = se ? F + "px" : "", e[ce] = W ? P + "px" : "", e.transform = "", e));
41866
41866
  }
41867
41867
  function OV(t) {
41868
41868
  var e = t.state, i = t.options, n = i.gpuAcceleration, r = n === void 0 ? !0 : n, l = i.adaptive, u = l === void 0 ? !0 : l, a = i.roundOffsets, g = a === void 0 ? !0 : a, _ = {
@@ -42062,7 +42062,7 @@ function SM(t) {
42062
42062
  }
42063
42063
  function ap(t, e) {
42064
42064
  e === void 0 && (e = {});
42065
- var i = e, n = i.placement, r = n === void 0 ? t.placement : n, l = i.strategy, u = l === void 0 ? t.strategy : l, a = i.boundary, g = a === void 0 ? uV : a, _ = i.rootBoundary, S = _ === void 0 ? fM : _, k = i.elementContext, M = k === void 0 ? Cd : k, P = i.altBoundary, I = P === void 0 ? !1 : P, N = i.padding, V = N === void 0 ? 0 : N, W = xM(typeof V != "number" ? V : bM(V, xp)), se = M === Cd ? hV : Cd, ce = t.rects.popper, Q = t.elements[I ? se : M], Oe = UV(Sc(Q) ? Q : Q.contextElement || Sl(t.elements.popper), g, S, u), ke = ih(t.elements.reference), Pe = SM({
42065
+ var i = e, n = i.placement, r = n === void 0 ? t.placement : n, l = i.strategy, u = l === void 0 ? t.strategy : l, a = i.boundary, g = a === void 0 ? uV : a, _ = i.rootBoundary, S = _ === void 0 ? fM : _, k = i.elementContext, M = k === void 0 ? Cd : k, P = i.altBoundary, I = P === void 0 ? !1 : P, F = i.padding, V = F === void 0 ? 0 : F, W = xM(typeof V != "number" ? V : bM(V, xp)), se = M === Cd ? hV : Cd, ce = t.rects.popper, Q = t.elements[I ? se : M], Oe = UV(Sc(Q) ? Q : Q.contextElement || Sl(t.elements.popper), g, S, u), ke = ih(t.elements.reference), Pe = SM({
42066
42066
  reference: ke,
42067
42067
  element: ce,
42068
42068
  strategy: "absolute",
@@ -42090,16 +42090,16 @@ function HV(t, e) {
42090
42090
  return _.indexOf(I) >= 0;
42091
42091
  });
42092
42092
  M.length === 0 && (M = k);
42093
- var P = M.reduce(function(I, N) {
42094
- return I[N] = ap(t, {
42095
- placement: N,
42093
+ var P = M.reduce(function(I, F) {
42094
+ return I[F] = ap(t, {
42095
+ placement: F,
42096
42096
  boundary: r,
42097
42097
  rootBoundary: l,
42098
42098
  padding: u
42099
- })[Mo(N)], I;
42099
+ })[Mo(F)], I;
42100
42100
  }, {});
42101
- return Object.keys(P).sort(function(I, N) {
42102
- return P[I] - P[N];
42101
+ return Object.keys(P).sort(function(I, F) {
42102
+ return P[I] - P[F];
42103
42103
  });
42104
42104
  }
42105
42105
  function qV(t) {
@@ -42111,14 +42111,14 @@ function qV(t) {
42111
42111
  function WV(t) {
42112
42112
  var e = t.state, i = t.options, n = t.name;
42113
42113
  if (!e.modifiersData[n]._skip) {
42114
- for (var r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !0 : u, g = i.fallbackPlacements, _ = i.padding, S = i.boundary, k = i.rootBoundary, M = i.altBoundary, P = i.flipVariations, I = P === void 0 ? !0 : P, N = i.allowedAutoPlacements, V = e.options.placement, W = Mo(V), se = W === V, ce = g || (se || !I ? [om(V)] : qV(V)), Q = [V].concat(ce).reduce(function(Yi, Wi) {
42114
+ for (var r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !0 : u, g = i.fallbackPlacements, _ = i.padding, S = i.boundary, k = i.rootBoundary, M = i.altBoundary, P = i.flipVariations, I = P === void 0 ? !0 : P, F = i.allowedAutoPlacements, V = e.options.placement, W = Mo(V), se = W === V, ce = g || (se || !I ? [om(V)] : qV(V)), Q = [V].concat(ce).reduce(function(Yi, Wi) {
42115
42115
  return Yi.concat(Mo(Wi) === Dv ? HV(e, {
42116
42116
  placement: Wi,
42117
42117
  boundary: S,
42118
42118
  rootBoundary: k,
42119
42119
  padding: _,
42120
42120
  flipVariations: I,
42121
- allowedAutoPlacements: N
42121
+ allowedAutoPlacements: F
42122
42122
  }) : Wi);
42123
42123
  }, []), Oe = e.rects.reference, ke = e.rects.popper, Pe = /* @__PURE__ */ new Map(), Xe = !0, ze = Q[0], Qe = 0; Qe < Q.length; Qe++) {
42124
42124
  var lt = Q[Qe], Ht = Mo(lt), yt = nh(lt) === eh, Nt = [Kr, js].indexOf(Ht) >= 0, si = Nt ? "width" : "height", fi = ap(e, {
@@ -42250,14 +42250,14 @@ function t6(t) {
42250
42250
  return t === "x" ? "y" : "x";
42251
42251
  }
42252
42252
  function i6(t) {
42253
- var e = t.state, i = t.options, n = t.name, r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !1 : u, g = i.boundary, _ = i.rootBoundary, S = i.altBoundary, k = i.padding, M = i.tether, P = M === void 0 ? !0 : M, I = i.tetherOffset, N = I === void 0 ? 0 : I, V = ap(e, {
42253
+ var e = t.state, i = t.options, n = t.name, r = i.mainAxis, l = r === void 0 ? !0 : r, u = i.altAxis, a = u === void 0 ? !1 : u, g = i.boundary, _ = i.rootBoundary, S = i.altBoundary, k = i.padding, M = i.tether, P = M === void 0 ? !0 : M, I = i.tetherOffset, F = I === void 0 ? 0 : I, V = ap(e, {
42254
42254
  boundary: g,
42255
42255
  rootBoundary: _,
42256
42256
  padding: k,
42257
42257
  altBoundary: S
42258
- }), W = Mo(e.placement), se = nh(e.placement), ce = !se, Q = Rv(W), Oe = t6(Q), ke = e.modifiersData.popperOffsets, Pe = e.rects.reference, Xe = e.rects.popper, ze = typeof N == "function" ? N(Object.assign({}, e.rects, {
42258
+ }), W = Mo(e.placement), se = nh(e.placement), ce = !se, Q = Rv(W), Oe = t6(Q), ke = e.modifiersData.popperOffsets, Pe = e.rects.reference, Xe = e.rects.popper, ze = typeof F == "function" ? F(Object.assign({}, e.rects, {
42259
42259
  placement: e.placement
42260
- })) : N, Qe = typeof ze == "number" ? {
42260
+ })) : F, Qe = typeof ze == "number" ? {
42261
42261
  mainAxis: ze,
42262
42262
  altAxis: ze
42263
42263
  } : Object.assign({
@@ -42400,7 +42400,7 @@ function d6(t) {
42400
42400
  state: S,
42401
42401
  setOptions: function(W) {
42402
42402
  var se = typeof W == "function" ? W(S.options) : W;
42403
- N(), S.options = Object.assign({}, l, S.options, se), S.scrollParents = {
42403
+ F(), S.options = Object.assign({}, l, S.options, se), S.scrollParents = {
42404
42404
  reference: Sc(a) ? Ud(a) : a.contextElement ? Ud(a.contextElement) : [],
42405
42405
  popper: Ud(g)
42406
42406
  };
@@ -42448,7 +42448,7 @@ function d6(t) {
42448
42448
  });
42449
42449
  }),
42450
42450
  destroy: function() {
42451
- N(), M = !0;
42451
+ F(), M = !0;
42452
42452
  }
42453
42453
  };
42454
42454
  if (!Qw(a, g))
@@ -42471,7 +42471,7 @@ function d6(t) {
42471
42471
  }
42472
42472
  });
42473
42473
  }
42474
- function N() {
42474
+ function F() {
42475
42475
  k.forEach(function(V) {
42476
42476
  return V();
42477
42477
  }), k = [];
@@ -42585,8 +42585,8 @@ function C6(t, e) {
42585
42585
  var l = r.popperRect, u = r.popperState, a = r.props, g = a.interactiveBorder, _ = b6(u.placement), S = u.modifiersData.offset;
42586
42586
  if (!S)
42587
42587
  return !0;
42588
- var k = _ === "bottom" ? S.top.y : 0, M = _ === "top" ? S.bottom.y : 0, P = _ === "right" ? S.left.x : 0, I = _ === "left" ? S.right.x : 0, N = l.top - n + k > g, V = n - l.bottom - M > g, W = l.left - i + P > g, se = i - l.right - I > g;
42589
- return N || V || W || se;
42588
+ var k = _ === "bottom" ? S.top.y : 0, M = _ === "top" ? S.bottom.y : 0, P = _ === "right" ? S.left.x : 0, I = _ === "left" ? S.right.x : 0, F = l.top - n + k > g, V = n - l.bottom - M > g, W = l.left - i + P > g, se = i - l.right - I > g;
42589
+ return F || V || W || se;
42590
42590
  });
42591
42591
  }
42592
42592
  function E0(t, e, i) {
@@ -42844,7 +42844,7 @@ function zM(t) {
42844
42844
  zM.$$tippy = !0;
42845
42845
  var V6 = 1, Yf = [], A0 = [];
42846
42846
  function j6(t, e) {
42847
- var i = aS(t, Object.assign({}, fs, DM(iS(e)))), n, r, l, u = !1, a = !1, g = !1, _ = !1, S, k, M, P = [], I = eS(Dt, i.interactiveDebounce), N, V = V6++, W = null, se = x6(i.plugins), ce = {
42847
+ var i = aS(t, Object.assign({}, fs, DM(iS(e)))), n, r, l, u = !1, a = !1, g = !1, _ = !1, S, k, M, P = [], I = eS(Dt, i.interactiveDebounce), F, V = V6++, W = null, se = x6(i.plugins), ce = {
42848
42848
  // Is the instance currently enabled?
42849
42849
  isEnabled: !0,
42850
42850
  // Is the tippy currently showing and not transitioning out?
@@ -42900,7 +42900,7 @@ function j6(t, e) {
42900
42900
  return !!((we = Q.props.render) != null && we.$$tippy);
42901
42901
  }
42902
42902
  function yt() {
42903
- return N || t;
42903
+ return F || t;
42904
42904
  }
42905
42905
  function Nt() {
42906
42906
  var we = yt().parentNode;
@@ -43041,7 +43041,7 @@ function j6(t, e) {
43041
43041
  var Fe, bt = !1;
43042
43042
  if (!(!Q.state.isEnabled || Ci(we) || a)) {
43043
43043
  var qt = ((Fe = S) == null ? void 0 : Fe.type) === "focus";
43044
- S = we, N = we.currentTarget, bi(), !Q.state.isVisible && S6(we) && Yf.forEach(function(et) {
43044
+ S = we, F = we.currentTarget, bi(), !Q.state.isVisible && S6(we) && Yf.forEach(function(et) {
43045
43045
  return et(we);
43046
43046
  }), we.type === "click" && (Q.props.trigger.indexOf("mouseenter") < 0 || u) && Q.props.hideOnClick !== !1 && Q.state.isVisible ? bt = !0 : sr(we), we.type === "click" && (u = !bt), bt && !qt && Cn(we);
43047
43047
  }
@@ -43292,8 +43292,8 @@ uh.setDefaultProps({
43292
43292
  class U6 {
43293
43293
  constructor({ editor: e, element: i, view: n, tippyOptions: r = {}, updateDelay: l = 250, shouldShow: u }) {
43294
43294
  this.preventHide = !1, this.shouldShow = ({ view: a, state: g, from: _, to: S }) => {
43295
- const { doc: k, selection: M } = g, { empty: P } = M, I = !k.textBetween(_, S).length && Cv(g.selection), N = this.element.contains(document.activeElement);
43296
- return !(!(a.hasFocus() || N) || P || I || !this.editor.isEditable);
43295
+ const { doc: k, selection: M } = g, { empty: P } = M, I = !k.textBetween(_, S).length && Cv(g.selection), F = this.element.contains(document.activeElement);
43296
+ return !(!(a.hasFocus() || F) || P || I || !this.editor.isEditable);
43297
43297
  }, this.mousedownHandler = () => {
43298
43298
  this.preventHide = !0;
43299
43299
  }, this.dragstartHandler = () => {
@@ -43316,8 +43316,8 @@ class U6 {
43316
43316
  }, this.updateDelay));
43317
43317
  }, this.updateHandler = (a, g, _, S) => {
43318
43318
  var k, M, P;
43319
- const { state: I, composing: N } = a, { selection: V } = I;
43320
- if (N || !g && !_)
43319
+ const { state: I, composing: F } = a, { selection: V } = I;
43320
+ if (F || !g && !_)
43321
43321
  return;
43322
43322
  this.createTooltip();
43323
43323
  const { ranges: se } = V, ce = Math.min(...se.map((ke) => ke.$from.pos)), Q = Math.max(...se.map((ke) => ke.$to.pos));
@@ -44667,8 +44667,8 @@ class Qs {
44667
44667
  u = Math.min(u, P);
44668
44668
  let I = l.maps[P];
44669
44669
  if (M.step) {
44670
- let N = e.steps[P].invert(e.docs[P]), V = M.selection && M.selection.map(l.slice(g + 1, P));
44671
- V && a++, n.push(new xo(I, N, V));
44670
+ let F = e.steps[P].invert(e.docs[P]), V = M.selection && M.selection.map(l.slice(g + 1, P));
44671
+ V && a++, n.push(new xo(I, F, V));
44672
44672
  } else
44673
44673
  n.push(new xo(I));
44674
44674
  }, r);
@@ -45129,9 +45129,9 @@ const $M = NM(!1, !0), VM = NM(!0, !0), Aj = Gn.create({
45129
45129
  }), Vj = Gn.create({
45130
45130
  name: "starterKit",
45131
45131
  addExtensions() {
45132
- var t, e, i, n, r, l, u, a, g, _, S, k, M, P, I, N, V, W;
45132
+ var t, e, i, n, r, l, u, a, g, _, S, k, M, P, I, F, V, W;
45133
45133
  const se = [];
45134
- return this.options.bold !== !1 && se.push(Q6.configure((t = this.options) === null || t === void 0 ? void 0 : t.bold)), this.options.blockquote !== !1 && se.push(Z6.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && se.push(ej.configure((i = this.options) === null || i === void 0 ? void 0 : i.bulletList)), this.options.code !== !1 && se.push(nj.configure((n = this.options) === null || n === void 0 ? void 0 : n.code)), this.options.codeBlock !== !1 && se.push(FM.configure((r = this.options) === null || r === void 0 ? void 0 : r.codeBlock)), this.options.document !== !1 && se.push(oj.configure((l = this.options) === null || l === void 0 ? void 0 : l.document)), this.options.dropcursor !== !1 && se.push(cj.configure((u = this.options) === null || u === void 0 ? void 0 : u.dropcursor)), this.options.gapcursor !== !1 && se.push(yj.configure((a = this.options) === null || a === void 0 ? void 0 : a.gapcursor)), this.options.hardBreak !== !1 && se.push(_j.configure((g = this.options) === null || g === void 0 ? void 0 : g.hardBreak)), this.options.heading !== !1 && se.push(vj.configure((_ = this.options) === null || _ === void 0 ? void 0 : _.heading)), this.options.history !== !1 && se.push(Aj.configure((S = this.options) === null || S === void 0 ? void 0 : S.history)), this.options.horizontalRule !== !1 && se.push(Pj.configure((k = this.options) === null || k === void 0 ? void 0 : k.horizontalRule)), this.options.italic !== !1 && se.push(Rj.configure((M = this.options) === null || M === void 0 ? void 0 : M.italic)), this.options.listItem !== !1 && se.push($v.configure((P = this.options) === null || P === void 0 ? void 0 : P.listItem)), this.options.orderedList !== !1 && se.push(Lj.configure((I = this.options) === null || I === void 0 ? void 0 : I.orderedList)), this.options.paragraph !== !1 && se.push(Fj.configure((N = this.options) === null || N === void 0 ? void 0 : N.paragraph)), this.options.strike !== !1 && se.push($j.configure((V = this.options) === null || V === void 0 ? void 0 : V.strike)), this.options.text !== !1 && se.push(jM.configure((W = this.options) === null || W === void 0 ? void 0 : W.text)), se;
45134
+ return this.options.bold !== !1 && se.push(Q6.configure((t = this.options) === null || t === void 0 ? void 0 : t.bold)), this.options.blockquote !== !1 && se.push(Z6.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && se.push(ej.configure((i = this.options) === null || i === void 0 ? void 0 : i.bulletList)), this.options.code !== !1 && se.push(nj.configure((n = this.options) === null || n === void 0 ? void 0 : n.code)), this.options.codeBlock !== !1 && se.push(FM.configure((r = this.options) === null || r === void 0 ? void 0 : r.codeBlock)), this.options.document !== !1 && se.push(oj.configure((l = this.options) === null || l === void 0 ? void 0 : l.document)), this.options.dropcursor !== !1 && se.push(cj.configure((u = this.options) === null || u === void 0 ? void 0 : u.dropcursor)), this.options.gapcursor !== !1 && se.push(yj.configure((a = this.options) === null || a === void 0 ? void 0 : a.gapcursor)), this.options.hardBreak !== !1 && se.push(_j.configure((g = this.options) === null || g === void 0 ? void 0 : g.hardBreak)), this.options.heading !== !1 && se.push(vj.configure((_ = this.options) === null || _ === void 0 ? void 0 : _.heading)), this.options.history !== !1 && se.push(Aj.configure((S = this.options) === null || S === void 0 ? void 0 : S.history)), this.options.horizontalRule !== !1 && se.push(Pj.configure((k = this.options) === null || k === void 0 ? void 0 : k.horizontalRule)), this.options.italic !== !1 && se.push(Rj.configure((M = this.options) === null || M === void 0 ? void 0 : M.italic)), this.options.listItem !== !1 && se.push($v.configure((P = this.options) === null || P === void 0 ? void 0 : P.listItem)), this.options.orderedList !== !1 && se.push(Lj.configure((I = this.options) === null || I === void 0 ? void 0 : I.orderedList)), this.options.paragraph !== !1 && se.push(Fj.configure((F = this.options) === null || F === void 0 ? void 0 : F.paragraph)), this.options.strike !== !1 && se.push($j.configure((V = this.options) === null || V === void 0 ? void 0 : V.strike)), this.options.text !== !1 && se.push(jM.configure((W = this.options) === null || W === void 0 ? void 0 : W.text)), se;
45135
45135
  }
45136
45136
  }), jj = Gn.create({
45137
45137
  name: "color",
@@ -45174,8 +45174,8 @@ function Uj(t) {
45174
45174
  const M = u.pos - k.length, P = Array.from(k.matchAll(S)).pop();
45175
45175
  if (!P || P.input === void 0 || P.index === void 0)
45176
45176
  return null;
45177
- const I = P.input.slice(Math.max(0, P.index - 1), P.index), N = new RegExp(`^[${r == null ? void 0 : r.join("")}\0]?$`).test(I);
45178
- if (r !== null && !N)
45177
+ const I = P.input.slice(Math.max(0, P.index - 1), P.index), F = new RegExp(`^[${r == null ? void 0 : r.join("")}\0]?$`).test(I);
45178
+ if (r !== null && !F)
45179
45179
  return null;
45180
45180
  const V = M + P.index;
45181
45181
  let W = V + P[0].length;
@@ -45191,7 +45191,7 @@ function Uj(t) {
45191
45191
  const Hj = new Qr("suggestion");
45192
45192
  function qj({ pluginKey: t = Hj, editor: e, char: i = "@", allowSpaces: n = !1, allowedPrefixes: r = [" "], startOfLine: l = !1, decorationTag: u = "span", decorationClass: a = "suggestion", command: g = () => null, items: _ = () => [], render: S = () => ({}), allow: k = () => !0, findSuggestionMatch: M = Uj }) {
45193
45193
  let P;
45194
- const I = S == null ? void 0 : S(), N = new nr({
45194
+ const I = S == null ? void 0 : S(), F = new nr({
45195
45195
  key: t,
45196
45196
  view() {
45197
45197
  return {
@@ -45272,12 +45272,12 @@ function qj({ pluginKey: t = Hj, editor: e, char: i = "@", allowSpaces: n = !1,
45272
45272
  // Call the keydown hook if suggestion is active.
45273
45273
  handleKeyDown(V, W) {
45274
45274
  var se;
45275
- const { active: ce, range: Q } = N.getState(V.state);
45275
+ const { active: ce, range: Q } = F.getState(V.state);
45276
45276
  return ce && ((se = I == null ? void 0 : I.onKeyDown) === null || se === void 0 ? void 0 : se.call(I, { view: V, event: W, range: Q })) || !1;
45277
45277
  },
45278
45278
  // Setup decorator on the currently active suggestion.
45279
45279
  decorations(V) {
45280
- const { active: W, range: se, decorationId: ce } = N.getState(V);
45280
+ const { active: W, range: se, decorationId: ce } = F.getState(V);
45281
45281
  return W ? Tn.create(V.doc, [
45282
45282
  ms.inline(se.from, se.to, {
45283
45283
  nodeName: u,
@@ -45288,7 +45288,7 @@ function qj({ pluginKey: t = Hj, editor: e, char: i = "@", allowSpaces: n = !1,
45288
45288
  }
45289
45289
  }
45290
45290
  });
45291
- return N;
45291
+ return F;
45292
45292
  }
45293
45293
  const Wj = new Qr("mention"), Gj = Ws.create({
45294
45294
  name: "mention",
@@ -46667,18 +46667,18 @@ const XU = /* @__PURE__ */ Pt(qU, [["render", YU]]), KU = { class: "overflow-x-a
46667
46667
  ]),
46668
46668
  Z("tbody", tH, [
46669
46669
  (xe(!0), Me(xi, null, Qi(u.value, (P, I) => (xe(), Me("tr", { key: I }, [
46670
- (xe(!0), Me(xi, null, Qi(t.columns, (N, V) => (xe(), Me("td", {
46670
+ (xe(!0), Me(xi, null, Qi(t.columns, (F, V) => (xe(), Me("td", {
46671
46671
  key: V,
46672
46672
  class: "px-6 py-4 text-sm font-medium text-gray-800 dark:text-neutral-200"
46673
- }, St(P == null ? void 0 : P[N.name]), 1))), 128))
46673
+ }, St(P == null ? void 0 : P[F.name]), 1))), 128))
46674
46674
  ]))), 128))
46675
46675
  ])
46676
46676
  ], 64)) : (xe(), Me("tbody", iH, [
46677
46677
  (xe(!0), Me(xi, null, Qi(u.value, (P, I) => (xe(), Me("tr", { key: I }, [
46678
- (xe(!0), Me(xi, null, Qi(P, (N, V) => (xe(), Me("td", {
46678
+ (xe(!0), Me(xi, null, Qi(P, (F, V) => (xe(), Me("td", {
46679
46679
  key: V,
46680
46680
  class: "px-6 py-4 text-sm font-medium text-gray-800 dark:text-neutral-200"
46681
- }, St(N), 1))), 128))
46681
+ }, St(F), 1))), 128))
46682
46682
  ]))), 128))
46683
46683
  ]))
46684
46684
  ])
@@ -47716,7 +47716,7 @@ const _q = /* @__PURE__ */ Pt(fq, [["render", yq], ["__scopeId", "data-v-293d773
47716
47716
  style: { "max-height": "calc(100vh - 300px)", width: "calc(100vw - 1000px)" }
47717
47717
  }, wq = { class: "flex items-end w-full gap-[4px]" };
47718
47718
  function Sq(t, e, i, n, r, l) {
47719
- var k, M, P, I, N;
47719
+ var k, M, P, I, F;
47720
47720
  const u = At("VsForm"), a = At("VsChoceColor"), g = At("IconCheck"), _ = At("VsReesterUsersList"), S = At("VsNoData");
47721
47721
  return xe(), Me("div", xq, [
47722
47722
  (M = (k = t.$route) == null ? void 0 : k.query) != null && M.name ? (xe(), Me("div", bq, [
@@ -47746,7 +47746,7 @@ function Sq(t, e, i, n, r, l) {
47746
47746
  ]),
47747
47747
  (I = (P = r.data) == null ? void 0 : P.children) != null && I.length ? (xe(), en(_, {
47748
47748
  key: 0,
47749
- list: (N = r.data) == null ? void 0 : N.children,
47749
+ list: (F = r.data) == null ? void 0 : F.children,
47750
47750
  onUpdateList: l.updateChildren
47751
47751
  }, null, 8, ["list", "onUpdateList"])) : Gr("", !0)
47752
47752
  ])) : (xe(), en(S, {
@@ -47782,15 +47782,15 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
47782
47782
  i.menu ? e.push(...qM(i.menu)) : e.push(i);
47783
47783
  }), e;
47784
47784
  }, Pq = gr(null), gS = gr(!1), Iq = ({ token: t, api: e, id: i, form: n }) => new Promise((r) => {
47785
- var S, k;
47786
- const { VsDialog: l, VsForm: u } = (k = (S = window.app) == null ? void 0 : S._context) == null ? void 0 : k.components, a = document.querySelector("#modal");
47787
- if (!a) {
47785
+ var k, M, P, I;
47786
+ const { VsDialog: l, VsForm: u } = (M = (k = window.app) == null ? void 0 : k._context) == null ? void 0 : M.components, { $notify: a } = (I = (P = window.app) == null ? void 0 : P.config) == null ? void 0 : I.globalProperties, g = document.querySelector("#modal");
47787
+ if (!g) {
47788
47788
  console.error('Modal root element with id "#modal" not found!');
47789
47789
  return;
47790
47790
  }
47791
- const g = document.createElement("div");
47792
- a.appendChild(g);
47793
- const _ = kS({
47791
+ const _ = document.createElement("div");
47792
+ g.appendChild(_);
47793
+ const S = kS({
47794
47794
  components: { VsDialog: l, VsForm: u },
47795
47795
  data() {
47796
47796
  return {
@@ -47800,31 +47800,39 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
47800
47800
  };
47801
47801
  },
47802
47802
  methods: {
47803
- close(M) {
47804
- this.visible = !1, this.$el.remove(), _.unmount(), r(M || "Success");
47803
+ close(F) {
47804
+ this.visible = !1, this.$el.remove(), S.unmount(), r(F || "Success");
47805
47805
  },
47806
47806
  async getFormScheme() {
47807
47807
  try {
47808
47808
  if (t) {
47809
- const P = await Ct.get(`/api/table/${t}`);
47810
- this.formValues = P.data;
47809
+ const V = await Ct.get(`/api/table/${t}`);
47810
+ this.formValues = V.data;
47811
47811
  }
47812
- const { data: M } = await Ct.get(`/api/template/form/${t || n}`);
47813
- this.scheme = (M == null ? void 0 : M.schema) || M;
47814
- } catch (M) {
47815
- console.error("Error fetching form scheme:", M);
47812
+ const { data: F } = await Ct.get(`/api/template/form/${t || n}`);
47813
+ this.scheme = (F == null ? void 0 : F.schema) || F;
47814
+ } catch (F) {
47815
+ console.error("Error fetching form scheme:", F);
47816
47816
  } finally {
47817
47817
  this.visible = !0;
47818
47818
  }
47819
47819
  },
47820
47820
  async updateData() {
47821
- const M = this.$refs.form;
47821
+ const F = this.$refs.form;
47822
47822
  try {
47823
- await M.doValidation();
47824
- const { data: P } = await Ct.put(`${e || "/api/table/"}${t || i}`, this.formValues);
47825
- gS.value = !gS.value, this.visible = !1, this.close(P);
47826
- } catch (P) {
47827
- console.error("Error updating data:", P);
47823
+ await F.doValidation();
47824
+ const { data: V } = await Ct.put(`${e || "/api/table/"}${t || i}`, this.formValues);
47825
+ gS.value = !gS.value, this.visible = !1, this.close(V), a({
47826
+ title: "Успішно!",
47827
+ type: "success",
47828
+ message: "Операція виконана успішно"
47829
+ });
47830
+ } catch {
47831
+ a({
47832
+ title: "Помилка!",
47833
+ type: "error",
47834
+ message: "Сталася помилка"
47835
+ });
47828
47836
  }
47829
47837
  }
47830
47838
  },
@@ -47851,17 +47859,17 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
47851
47859
  </div>
47852
47860
  `
47853
47861
  });
47854
- _.mount(g);
47862
+ S.mount(_);
47855
47863
  }), Dq = ({ api: t, confirm: e, method: i }) => new Promise((n) => {
47856
- var g, _;
47857
- const { VsDialog: r } = (_ = (g = window.app) == null ? void 0 : g._context) == null ? void 0 : _.components, l = document.querySelector("#modal");
47858
- if (!l) {
47864
+ var _, S, k, M;
47865
+ const { VsDialog: r } = (S = (_ = window.app) == null ? void 0 : _._context) == null ? void 0 : S.components, { $notify: l } = (M = (k = window.app) == null ? void 0 : k.config) == null ? void 0 : M.globalProperties, u = document.querySelector("#modal");
47866
+ if (!u) {
47859
47867
  console.error('Modal root element with id "#modal" not found!');
47860
47868
  return;
47861
47869
  }
47862
- const u = document.createElement("div");
47863
- l.appendChild(u);
47864
- const a = kS({
47870
+ const a = document.createElement("div");
47871
+ u.appendChild(a);
47872
+ const g = kS({
47865
47873
  components: { VsDialog: r },
47866
47874
  data() {
47867
47875
  return {
@@ -47870,18 +47878,26 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
47870
47878
  };
47871
47879
  },
47872
47880
  methods: {
47873
- close(S) {
47874
- this.visible = !1, this.$el.remove(), a.unmount(), n(S || "Success");
47881
+ close(P) {
47882
+ this.visible = !1, this.$el.remove(), g.unmount(), n(P || "Success");
47875
47883
  },
47876
47884
  async doRequest() {
47877
47885
  try {
47878
- const { data: S } = await Ct({
47886
+ const { data: P } = await Ct({
47879
47887
  url: t || "",
47880
47888
  method: i || "POST"
47881
47889
  });
47882
- this.close(S);
47883
- } catch (S) {
47884
- console.error("Error updating data:", S);
47890
+ this.close(P), l({
47891
+ title: "Успішно!",
47892
+ type: "success",
47893
+ message: "Операція виконана успішно"
47894
+ });
47895
+ } catch {
47896
+ l({
47897
+ title: "Помилка!",
47898
+ type: "error",
47899
+ message: "Сталася помилка"
47900
+ });
47885
47901
  }
47886
47902
  }
47887
47903
  },
@@ -47917,7 +47933,7 @@ const Eq = /* @__PURE__ */ Pt(Tq, [["render", Cq]]), Aq = {
47917
47933
  </div>
47918
47934
  `
47919
47935
  });
47920
- a.mount(u);
47936
+ g.mount(a);
47921
47937
  }), yS = { $form: Iq, $api: Dq }, Oq = async () => {
47922
47938
  try {
47923
47939
  const { data: t } = await Ct.get("/api/user-menu");