bluestar-maplibre 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,44 +1,44 @@
1
- var pn = Object.defineProperty;
2
- var rr = (r) => {
1
+ var Tn = Object.defineProperty;
2
+ var fr = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var mn = (r, e, t) => e in r ? pn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var b = (r, e, t) => mn(r, typeof e != "symbol" ? e + "" : e, t), wt = (r, e, t) => e.has(r) || rr("Cannot " + t);
7
- var a = (r, e, t) => (wt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), E = (r, e, t) => e.has(r) ? rr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), C = (r, e, t, n) => (wt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), w = (r, e, t) => (wt(r, e, "access private method"), t);
8
- var St = (r, e, t, n) => ({
5
+ var wn = (r, e, t) => e in r ? Tn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var g = (r, e, t) => wn(r, typeof e != "symbol" ? e + "" : e, t), Yt = (r, e, t) => e.has(r) || fr("Cannot " + t);
7
+ var a = (r, e, t) => (Yt(r, e, "read from private field"), t ? t.call(r) : e.get(r)), A = (r, e, t) => e.has(r) ? fr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), E = (r, e, t, n) => (Yt(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), S = (r, e, t) => (Yt(r, e, "access private method"), t);
8
+ var Ft = (r, e, t, n) => ({
9
9
  set _(o) {
10
- C(r, e, o, t);
10
+ E(r, e, o, t);
11
11
  },
12
12
  get _() {
13
13
  return a(r, e, n);
14
14
  }
15
15
  });
16
- import { reactive as De, watch as P, provide as vn, onMounted as Ut, onUnmounted as yn, inject as bn, defineComponent as ot, getCurrentInstance as gn, onBeforeUnmount as Qt, openBlock as V, createElementBlock as B, normalizeClass as de, normalizeStyle as pt, renderSlot as jt, Fragment as Te, renderList as Ge, ref as oe, toRaw as nr, createElementVNode as m, createTextVNode as Ue, toDisplayString as ae, createCommentVNode as Ie, withDirectives as Se, vModelText as Qe, withKeys as kt, createVNode as Mt, Transition as In, withCtx as Tr, useModel as Cn, createBlock as Lr, createStaticVNode as xn, unref as En, vModelDynamic as An, vModelSelect as Rn } from "vue";
17
- import { addSourceType as wr, Evented as Sr, Event as _r, Map as Tn, addProtocol as Ln, removeProtocol as wn } from "maplibre-gl";
18
- import { v4 as mt } from "uuid";
19
- import { Color as it, EventListenControl as Sn, createUseApiInterceptor as kr, fontSize as _n, decodeWegFile as or, encodeGzip as kn, WebGLTool as Mn } from "bluestar-util";
20
- const Vn = 8, Bn = "Mapbox Standard", Dn = [
16
+ import { reactive as Ge, watch as X, provide as Ln, onMounted as sr, onUnmounted as Sn, inject as _n, defineComponent as $e, getCurrentInstance as kn, onBeforeUnmount as Bt, openBlock as N, createElementBlock as Z, normalizeClass as pe, normalizeStyle as tt, renderSlot as Dt, Fragment as Ee, renderList as Ze, computed as pr, shallowRef as Mn, unref as Xt, withModifiers as Vn, createCommentVNode as be, ref as le, toRaw as mr, createElementVNode as y, createTextVNode as qe, toDisplayString as ce, withDirectives as ke, vModelText as et, withKeys as Wt, createVNode as zt, Transition as Bn, withCtx as Gr, useModel as Dn, createBlock as Yr, createStaticVNode as Nn, vModelDynamic as Zn, vModelSelect as Gn } from "vue";
17
+ import { addSourceType as Fr, Evented as Pr, Event as Xr, Map as Yn, addProtocol as Fn, removeProtocol as Pn } from "maplibre-gl";
18
+ import { v4 as Ct } from "uuid";
19
+ import { Color as ft, EventListenControl as Xn, createUseApiInterceptor as Wr, fontSize as Ht, decodeWegFile as vr, encodeGzip as Wn, WebGLTool as zn } from "bluestar-util";
20
+ const Hn = 8, Kn = "Mapbox Standard", On = [
21
21
  -10,
22
22
  30
23
- ], Zn = 1.5, Gn = 0, Nn = 0, Yn = {}, Fn = {
23
+ ], Un = 1.5, Qn = 0, jn = 0, Jn = {}, $n = {
24
24
  name: "globe"
25
- }, Pn = [], Xn = "standard", Wn = "mapbox", zn = "public", Hn = !1, Kn = {
26
- version: Vn,
27
- name: Bn,
28
- center: Dn,
29
- zoom: Zn,
30
- bearing: Gn,
31
- pitch: Nn,
32
- sources: Yn,
33
- projection: Fn,
34
- layers: Pn,
35
- id: Xn,
36
- owner: Wn,
37
- visibility: zn,
25
+ }, qn = [], eo = "standard", to = "mapbox", ro = "public", no = !1, oo = {
26
+ version: Hn,
27
+ name: Kn,
28
+ center: On,
29
+ zoom: Un,
30
+ bearing: Qn,
31
+ pitch: jn,
32
+ sources: Jn,
33
+ projection: $n,
34
+ layers: qn,
35
+ id: eo,
36
+ owner: to,
37
+ visibility: ro,
38
38
  protected: !0,
39
- draft: Hn
39
+ draft: no
40
40
  };
41
- var H = /* @__PURE__ */ (() => {
41
+ var O = /* @__PURE__ */ (() => {
42
42
  for (var r = new Uint8Array(128), e = 0; e < 64; e++) r[e < 26 ? e + 65 : e < 52 ? e + 71 : e < 62 ? e - 4 : e * 4 - 205] = e;
43
43
  return (t) => {
44
44
  for (var n = t.length, o = new Uint8Array((n - (t[n - 1] == "=") - (t[n - 2] == "=")) * 3 / 4 | 0), i = 0, s = 0; i < n; ) {
@@ -48,54 +48,54 @@ var H = /* @__PURE__ */ (() => {
48
48
  return o;
49
49
  };
50
50
  })();
51
- function Mr(r, e) {
51
+ function zr(r, e) {
52
52
  const t = Array.isArray(r) ? r[0] : r, n = Array.isArray(e) ? e[0] : e;
53
53
  return t.lon[0] === n.lon[0] && t.lon[1] === n.lon[1] && t.lat[0] === n.lat[0] && t.lat[1] === n.lat[1];
54
54
  }
55
- var je, $, ie, Ne, ct, vr, On = (vr = class extends Sr {
55
+ var rt, re, ue, Xe, vt, Lr, ao = (Lr = class extends Pr {
56
56
  constructor(e, t, n, o) {
57
57
  super();
58
- E(this, Ne);
59
- b(this, "id");
60
- b(this, "maxzoom", 0);
61
- b(this, "minzoom", 22);
62
- b(this, "tileSize", 512);
63
- b(this, "type");
64
- E(this, je);
65
- E(this, $, null);
66
- E(this, ie);
67
- this.id = e, this.type = t.type, C(this, ie, /* @__PURE__ */ new WeakMap());
58
+ A(this, Xe);
59
+ g(this, "id");
60
+ g(this, "maxzoom", 0);
61
+ g(this, "minzoom", 22);
62
+ g(this, "tileSize", 512);
63
+ g(this, "type");
64
+ A(this, rt);
65
+ A(this, re, null);
66
+ A(this, ue);
67
+ this.id = e, this.type = t.type, E(this, ue, /* @__PURE__ */ new WeakMap());
68
68
  }
69
69
  setData(e) {
70
- return a(this, $) === e ? this : (a(this, $) && !a(this, ie).has(a(this, $)) && w(this, Ne, ct).call(this, a(this, $)), C(this, $, e), this.fire(new _r("data", { dataType: "source", data: e })), this);
70
+ return a(this, re) === e ? this : (a(this, re) && !a(this, ue).has(a(this, re)) && S(this, Xe, vt).call(this, a(this, re)), E(this, re, e), this.fire(new Xr("data", { dataType: "source", data: e })), this);
71
71
  }
72
72
  lastData() {
73
- return a(this, $);
73
+ return a(this, re);
74
74
  }
75
75
  /**
76
76
  * @internal
77
77
  */
78
78
  link(e) {
79
- a(this, ie).set(e, a(this, ie).has(e) ? a(this, ie).get(e) + 1 : 1);
79
+ a(this, ue).set(e, a(this, ue).has(e) ? a(this, ue).get(e) + 1 : 1);
80
80
  }
81
81
  /**
82
82
  * @internal
83
83
  */
84
84
  unlink(e) {
85
- const t = a(this, ie).get(e) - 1;
86
- t > 0 ? a(this, ie).set(e, t) : (a(this, ie).delete(e), e !== a(this, $) && w(this, Ne, ct).call(this, e));
85
+ const t = a(this, ue).get(e) - 1;
86
+ t > 0 ? a(this, ue).set(e, t) : (a(this, ue).delete(e), e !== a(this, re) && S(this, Xe, vt).call(this, e));
87
87
  }
88
88
  /**
89
89
  * @internal
90
90
  */
91
91
  onAdd(e) {
92
- C(this, je, e.painter.context.gl);
92
+ E(this, rt, e.painter.context.gl);
93
93
  }
94
94
  /**
95
95
  * @internal
96
96
  */
97
97
  onRemove(e) {
98
- a(this, $) && w(this, Ne, ct).call(this, a(this, $)), C(this, $, null);
98
+ a(this, re) && S(this, Xe, vt).call(this, a(this, re)), E(this, re, null);
99
99
  }
100
100
  /**
101
101
  * @internal
@@ -119,129 +119,129 @@ var je, $, ie, Ne, ct, vr, On = (vr = class extends Sr {
119
119
  */
120
120
  serialize() {
121
121
  }
122
- }, je = new WeakMap(), $ = new WeakMap(), ie = new WeakMap(), Ne = new WeakSet(), ct = function(e) {
122
+ }, rt = new WeakMap(), re = new WeakMap(), ue = new WeakMap(), Xe = new WeakSet(), vt = function(e) {
123
123
  var o, i;
124
- const t = a(this, je), n = (o = e.texture) == null ? void 0 : o.get(t);
124
+ const t = a(this, rt), n = (o = e.texture) == null ? void 0 : o.get(t);
125
125
  n !== void 0 && Object.values(n).forEach((s) => s.forEach((l) => t.deleteTexture(l))), (i = e.texture) == null || i.delete(t);
126
- }, vr);
127
- function Un({ x: r, y: e, z: t }, n) {
126
+ }, Lr);
127
+ function io({ x: r, y: e, z: t }, n) {
128
128
  if (!n) return !0;
129
- const [o, i] = vt([r, e, t]), [s, l] = vt([r + 1, e + 1, t]), u = Math.min(...n.lat), c = Math.max(...n.lat);
129
+ const [o, i] = xt([r, e, t]), [s, l] = xt([r + 1, e + 1, t]), u = Math.min(...n.lat), c = Math.max(...n.lat);
130
130
  let [h, d] = n.lon;
131
131
  return d > 180 && s <= 0 && (h -= 360, d -= 360), !(u > i || c < l || h > s || d < o);
132
132
  }
133
- function Vr({ x: r, y: e, z: t }, n, o, i, s = 1) {
134
- const l = 2 ** t, u = 120 / o / l, { x: c, y: h, lon: d, lat: p } = n, f = Math.abs((d[1] - d[0]) / (c - 1)), v = Math.abs((p[1] - p[0]) / (h - 1)), y = Math.ceil(u / f) * f, x = Math.ceil(u / v) * v;
135
- let [A, I] = vt([r, e, t]), [g, k] = vt([r + 1, e + 1, t]);
136
- if (A -= y * s, g += y * s, I = Math.min(I + y * s, 85), k = Math.max(k - y * s, -85), A = A - (A - d[0]) % y, I = I - (I - p[0]) % x, i) {
137
- let [R, L] = i.lon;
138
- L > 180 && g <= 0 && (R -= 360, L -= 360);
139
- const M = (R - d[0]) % y;
140
- A = Math.max(A, M === 0 ? R : R - M + y), g = Math.min(g, L);
141
- let Z = Math.max(...i.lat);
142
- const N = (Z - p[0]) % x;
143
- I = Math.min(I, N === 0 ? Z : Z - N - x), k = Math.max(k, Math.min(...i.lat));
144
- }
145
- const T = [];
146
- for (let R = A; R <= g; R += y) T.push(R);
147
- const S = [];
148
- for (let R = I; R >= k; R -= x) S.push(R);
149
- return [T, S];
133
+ function Hr({ x: r, y: e, z: t }, n, o, i, s = 1) {
134
+ const l = 2 ** t, u = 120 / o / l, { x: c, y: h, lon: d, lat: p } = n, f = Math.abs((d[1] - d[0]) / (c - 1)), m = Math.abs((p[1] - p[0]) / (h - 1)), v = Math.ceil(u / f) * f, x = Math.ceil(u / m) * m;
135
+ let [R, C] = xt([r, e, t]), [b, B] = xt([r + 1, e + 1, t]);
136
+ if (R -= v * s, b += v * s, C = Math.min(C + v * s, 85), B = Math.max(B - v * s, -85), R = R - (R - d[0]) % v, C = C - (C - p[0]) % x, i) {
137
+ let [T, I] = i.lon;
138
+ I > 180 && b <= 0 && (T -= 360, I -= 360);
139
+ const w = (T - d[0]) % v;
140
+ R = Math.max(R, w === 0 ? T : T - w + v), b = Math.min(b, I);
141
+ let _ = Math.max(...i.lat);
142
+ const k = (_ - p[0]) % x;
143
+ C = Math.min(C, k === 0 ? _ : _ - k - x), B = Math.max(B, Math.min(...i.lat));
144
+ }
145
+ const L = [];
146
+ for (let T = R; T <= b; T += v) L.push(T);
147
+ const M = [];
148
+ for (let T = C; T >= B; T -= x) M.push(T);
149
+ return [L, M];
150
150
  }
151
- function Br(r, e, t, n) {
152
- const [o, i] = Vr(r, e, t, n), s = [];
151
+ function Kr(r, e, t, n) {
152
+ const [o, i] = Hr(r, e, t, n), s = [];
153
153
  for (const l of i)
154
154
  for (const u of o)
155
155
  s.push([u, l]);
156
156
  return s;
157
157
  }
158
- function Dr(r, [e, t]) {
159
- return [Zr(r, e), Gr(r, t)];
158
+ function Or(r, [e, t]) {
159
+ return [Ur(r, e), Qr(r, t)];
160
160
  }
161
- function Zr({ x: r, z: e }, t) {
162
- return Qn(t) * 2 ** e - r;
161
+ function Ur({ x: r, z: e }, t) {
162
+ return so(t) * 2 ** e - r;
163
163
  }
164
- function Gr({ y: r, z: e }, t) {
165
- return jn(t) * 2 ** e - r;
164
+ function Qr({ y: r, z: e }, t) {
165
+ return lo(t) * 2 ** e - r;
166
166
  }
167
- function Qn(r) {
167
+ function so(r) {
168
168
  return (180 + r) / 360;
169
169
  }
170
- function jn(r) {
170
+ function lo(r) {
171
171
  return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + r * Math.PI / 360))) / 360;
172
172
  }
173
- function vt([r, e, t]) {
173
+ function xt([r, e, t]) {
174
174
  const n = 2 ** t, o = r / n, i = e / n;
175
175
  return [o * 360 - 180, 360 / Math.PI * Math.atan(Math.exp((180 - i * 360) * Math.PI / 180)) - 90];
176
176
  }
177
- var Nr = class {
177
+ var jr = class {
178
178
  constructor(r) {
179
- b(this, "id");
180
- b(this, "source");
181
- b(this, "type", "custom");
179
+ g(this, "id");
180
+ g(this, "source");
181
+ g(this, "type", "custom");
182
182
  this.id = r.id, this.source = r.source;
183
183
  }
184
184
  };
185
- function Yr(r, e) {
185
+ function Jr(r, e) {
186
186
  if (!r || !e || r.length !== e.length) return !0;
187
187
  for (let t = 0; t < r.length; t++) if (r[t] !== e[t]) return !0;
188
188
  return !1;
189
189
  }
190
- var Ye, Je, se, _e, Ce, ke, Fe, he, Pe, Le, Vt, $e, yt, bt, gt, Bt, yr, Jt = (yr = class {
190
+ var We, nt, de, Me, Ae, Ve, ze, me, He, Se, Kt, ot, Et, At, Rt, Ot, Sr, lr = (Sr = class {
191
191
  /**
192
192
  * @internal
193
193
  */
194
194
  constructor(r) {
195
- E(this, Le);
196
- b(this, "id");
197
- b(this, "source");
198
- b(this, "type", "raster");
199
- b(this, "minzoom");
200
- b(this, "maxzoom");
201
- b(this, "tileSize");
195
+ A(this, Se);
196
+ g(this, "id");
197
+ g(this, "source");
198
+ g(this, "type", "raster");
199
+ g(this, "minzoom");
200
+ g(this, "maxzoom");
201
+ g(this, "tileSize");
202
202
  /**
203
203
  * @internal
204
204
  */
205
- b(this, "paint", { "raster-fade-duration": 0 });
206
- E(this, Ye);
207
- E(this, Je);
208
- E(this, se);
209
- E(this, _e, 0);
210
- E(this, Ce, 0);
211
- E(this, ke);
212
- E(this, Fe);
205
+ g(this, "paint", { "raster-fade-duration": 0 });
206
+ A(this, We);
207
+ A(this, nt);
208
+ A(this, de);
209
+ A(this, Me, 0);
210
+ A(this, Ae, 0);
211
+ A(this, Ve);
212
+ A(this, ze);
213
213
  // current,next
214
- E(this, he, null);
215
- E(this, Pe, null);
216
- E(this, $e, async (r) => {
217
- if (!r.texture || r.updateTime < Math.max(a(this, _e), a(this, Ce))) {
218
- const e = Date.now(), t = a(this, ke) ?? a(this, se).transition, n = t > 0 ? Math.max(0, a(this, Ce) - e) / t : 0, o = await this.loadTile(r.tileID.canonical, n);
214
+ A(this, me, null);
215
+ A(this, He, null);
216
+ A(this, ot, async (r) => {
217
+ if (!r.texture || r.updateTime < Math.max(a(this, Me), a(this, Ae))) {
218
+ const e = Date.now(), t = a(this, Ve) ?? a(this, de).transition, n = t > 0 ? Math.max(0, a(this, Ae) - e) / t : 0, o = await this.loadTile(r.tileID.canonical, n);
219
219
  if (r.aborted || !o) {
220
220
  r.state = "unloaded";
221
221
  return;
222
222
  }
223
- const { width: i, height: s } = o, l = i, u = a(this, se).painter.context.gl;
223
+ const { width: i, height: s } = o, l = i, u = a(this, de).painter.context.gl;
224
224
  if (r.texture)
225
225
  r.texture.bind();
226
226
  else {
227
- let c = a(this, se).renderFactory.getTexture(l);
227
+ let c = a(this, de).renderFactory.getTexture(l);
228
228
  c ? u.bindTexture(u.TEXTURE_2D, c) : (c = u.createTexture(), u.bindTexture(u.TEXTURE_2D, c), u.texStorage2D(u.TEXTURE_2D, 1, u.RGBA8, i, s), u.texParameteri(u.TEXTURE_2D, u.TEXTURE_MIN_FILTER, u.LINEAR_MIPMAP_LINEAR), u.texParameteri(u.TEXTURE_2D, u.TEXTURE_MAG_FILTER, u.LINEAR), u.texParameteri(u.TEXTURE_2D, u.TEXTURE_WRAP_S, u.CLAMP_TO_EDGE), u.texParameteri(u.TEXTURE_2D, u.TEXTURE_WRAP_T, u.CLAMP_TO_EDGE)), r.texture = { bind: () => u.bindTexture(u.TEXTURE_2D, c), texture: c };
229
229
  }
230
- u.texSubImage2D(u.TEXTURE_2D, 0, 0, 0, i, s, u.RGBA, u.UNSIGNED_BYTE, o), o.close(), r.updateTime = e, r.state = "loaded", n > 0 && requestAnimationFrame(() => a(this, $e).call(this, r));
230
+ u.texSubImage2D(u.TEXTURE_2D, 0, 0, 0, i, s, u.RGBA, u.UNSIGNED_BYTE, o), o.close(), r.updateTime = e, r.state = "loaded", n > 0 && requestAnimationFrame(() => a(this, ot).call(this, r));
231
231
  }
232
232
  });
233
- E(this, yt, async (r) => {
233
+ A(this, Et, async (r) => {
234
234
  var e;
235
- (e = r.texture) != null && e.texture && a(this, se).renderFactory.setTexture(this.tileSize * 2, r.texture.texture);
235
+ (e = r.texture) != null && e.texture && a(this, de).renderFactory.setTexture(this.tileSize * 2, r.texture.texture);
236
236
  });
237
- E(this, bt, ({ canonical: r }) => a(this, he) ? Un(r, a(this, Fe)) : !1);
237
+ A(this, At, ({ canonical: r }) => a(this, me) ? io(r, a(this, ze)) : !1);
238
238
  //
239
239
  // /**
240
240
  // * @internal
241
241
  // */
242
242
  // abstract hasTransition(): boolean;
243
- E(this, gt, () => !0);
244
- this.id = r.id, this.minzoom = r.minzoom ?? 1, this.maxzoom = r.maxzoom ?? 22, this.tileSize = r.tileSize ?? 512, C(this, Ye, r.source), C(this, ke, r.transition), C(this, Fe, r.bound === void 0 ? null : r.bound), this.source = "#proxy-" + this.id;
243
+ A(this, Rt, () => !0);
244
+ this.id = r.id, this.minzoom = r.minzoom ?? 1, this.maxzoom = r.maxzoom ?? 22, this.tileSize = r.tileSize ?? 512, E(this, We, r.source), E(this, Ve, r.transition), E(this, ze, r.bound === void 0 ? null : r.bound), this.source = "#proxy-" + this.id;
245
245
  }
246
246
  /**
247
247
  * @internal
@@ -253,88 +253,88 @@ var Ye, Je, se, _e, Ce, ke, Fe, he, Pe, Le, Vt, $e, yt, bt, gt, Bt, yr, Jt = (yr
253
253
  maxzoom: this.maxzoom,
254
254
  tileSize: this.tileSize,
255
255
  onAdd: (e) => this.onAdd(e),
256
- hasTile: a(this, bt),
257
- loadTile: a(this, $e),
258
- unloadTile: a(this, yt),
259
- hasTransition: a(this, gt),
256
+ hasTile: a(this, At),
257
+ loadTile: a(this, ot),
258
+ unloadTile: a(this, Et),
259
+ hasTransition: a(this, Rt),
260
260
  loaded: () => !0
261
- }), C(this, Je, r.getSource(this.source));
261
+ }), E(this, nt, r.getSource(this.source));
262
262
  }
263
263
  /**
264
264
  * @internal
265
265
  */
266
266
  onAdd(r) {
267
- C(this, se, r);
268
- const e = r.getSource(a(this, Ye));
269
- if (!e) throw new Error(`The source(id:${a(this, Ye)}) not found!`);
267
+ E(this, de, r);
268
+ const e = r.getSource(a(this, We));
269
+ if (!e) throw new Error(`The source(id:${a(this, We)}) not found!`);
270
270
  e.on("data", ({ data: t }) => {
271
- w(this, Le, Bt).call(this, t), w(this, Le, Vt).call(this);
272
- }), w(this, Le, Bt).call(this, e.lastData());
271
+ S(this, Se, Ot).call(this, t), S(this, Se, Kt).call(this);
272
+ }), S(this, Se, Ot).call(this, e.lastData());
273
273
  }
274
274
  /**
275
275
  * @internal
276
276
  */
277
277
  get renderFactory() {
278
- return a(this, se).renderFactory;
278
+ return a(this, de).renderFactory;
279
279
  }
280
280
  /**
281
281
  * @internal
282
282
  */
283
283
  get data0() {
284
- return a(this, he);
284
+ return a(this, me);
285
285
  }
286
286
  /**
287
287
  * @internal
288
288
  */
289
289
  get data1() {
290
- return a(this, Pe);
290
+ return a(this, He);
291
291
  }
292
292
  /**
293
293
  * @internal
294
294
  */
295
295
  setOptions({ transition: r, bound: e }) {
296
- r !== void 0 && C(this, ke, r), e !== void 0 && C(this, Fe, e), C(this, _e, Date.now()), C(this, Ce, 0), w(this, Le, Vt).call(this);
296
+ r !== void 0 && E(this, Ve, r), e !== void 0 && E(this, ze, e), E(this, Me, Date.now()), E(this, Ae, 0), S(this, Se, Kt).call(this);
297
297
  }
298
- }, Ye = new WeakMap(), Je = new WeakMap(), se = new WeakMap(), _e = new WeakMap(), Ce = new WeakMap(), ke = new WeakMap(), Fe = new WeakMap(), he = new WeakMap(), Pe = new WeakMap(), Le = new WeakSet(), /**
298
+ }, We = new WeakMap(), nt = new WeakMap(), de = new WeakMap(), Me = new WeakMap(), Ae = new WeakMap(), Ve = new WeakMap(), ze = new WeakMap(), me = new WeakMap(), He = new WeakMap(), Se = new WeakSet(), /**
299
299
  * @internal
300
300
  */
301
- Vt = function() {
302
- a(this, Je).fire({ type: "data", dataType: "source", sourceDataType: "content", sourceDataChanged: !0 });
303
- }, $e = new WeakMap(), yt = new WeakMap(), bt = new WeakMap(), gt = new WeakMap(), Bt = function(r) {
301
+ Kt = function() {
302
+ a(this, nt).fire({ type: "data", dataType: "source", sourceDataType: "content", sourceDataChanged: !0 });
303
+ }, ot = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Rt = new WeakMap(), Ot = function(r) {
304
304
  if (!r) {
305
- C(this, he, null), C(this, Pe, null);
305
+ E(this, me, null), E(this, He, null);
306
306
  return;
307
307
  }
308
- if (C(this, _e, Date.now()), a(this, he)) {
309
- const e = a(this, ke) ?? a(this, se).transition;
310
- e > 0 && (Mr(a(this, he), r) ? (C(this, Pe, a(this, he)), C(this, Ce, a(this, _e) + e)) : C(this, Ce, 0));
308
+ if (E(this, Me, Date.now()), a(this, me)) {
309
+ const e = a(this, Ve) ?? a(this, de).transition;
310
+ e > 0 && (zr(a(this, me), r) ? (E(this, He, a(this, me)), E(this, Ae, a(this, Me) + e)) : E(this, Ae, 0));
311
311
  }
312
- C(this, he, r), a(this, se).triggerRepaint();
313
- }, yr), Jn = class extends Sr {
312
+ E(this, me, r), a(this, de).triggerRepaint();
313
+ }, Sr), co = class extends Pr {
314
314
  constructor(e, t, n, o) {
315
315
  super();
316
- b(this, "type", "raster");
317
- b(this, "id");
318
- b(this, "tileSize");
319
- b(this, "roundZoom");
320
- b(this, "minzoom");
321
- b(this, "maxzoom");
322
- b(this, "onAdd");
323
- b(this, "onRemove");
324
- b(this, "prepare");
325
- b(this, "hasTile");
326
- b(this, "loadTile");
327
- b(this, "abortTile");
328
- b(this, "unloadTile");
329
- b(this, "hasTransition");
330
- b(this, "loaded");
331
- this.id = e, this.setEventedParent(o), this.minzoom = t.minzoom, this.maxzoom = t.maxzoom, this.tileSize = t.tileSize, this.roundZoom = !0, this.loadTile = t.loadTile, this.loaded = t.loaded, this.hasTransition = t.hasTransition, this.onAdd = t.onAdd, this.onRemove = t.onRemove, this.prepare = t.prepare, this.hasTile = t.hasTile, this.abortTile = t.abortTile, this.unloadTile = t.unloadTile, this.fire(new _r("data", { dataType: "source", sourceDataType: "metadata" }));
316
+ g(this, "type", "raster");
317
+ g(this, "id");
318
+ g(this, "tileSize");
319
+ g(this, "roundZoom");
320
+ g(this, "minzoom");
321
+ g(this, "maxzoom");
322
+ g(this, "onAdd");
323
+ g(this, "onRemove");
324
+ g(this, "prepare");
325
+ g(this, "hasTile");
326
+ g(this, "loadTile");
327
+ g(this, "abortTile");
328
+ g(this, "unloadTile");
329
+ g(this, "hasTransition");
330
+ g(this, "loaded");
331
+ this.id = e, this.setEventedParent(o), this.minzoom = t.minzoom, this.maxzoom = t.maxzoom, this.tileSize = t.tileSize, this.roundZoom = !0, this.loadTile = t.loadTile, this.loaded = t.loaded, this.hasTransition = t.hasTransition, this.onAdd = t.onAdd, this.onRemove = t.onRemove, this.prepare = t.prepare, this.hasTile = t.hasTile, this.abortTile = t.abortTile, this.unloadTile = t.unloadTile, this.fire(new Xr("data", { dataType: "source", sourceDataType: "metadata" }));
332
332
  }
333
333
  serialize() {
334
334
  return { id: this.id, type: "proxy" };
335
335
  }
336
- }, _t = 128;
337
- function $n(r, e, t, n) {
336
+ }, Pt = 128;
337
+ function uo(r, e, t, n) {
338
338
  const o = r.createProgram();
339
339
  if (r.attachShader(o, e), r.attachShader(o, t), n && r.transformFeedbackVaryings(o, n, r.SEPARATE_ATTRIBS), r.linkProgram(o), !r.getProgramParameter(o, r.LINK_STATUS))
340
340
  throw new Error("Unable to initialize the shader program: " + r.getProgramInfoLog(o));
@@ -343,27 +343,27 @@ function $n(r, e, t, n) {
343
343
  function l() {
344
344
  const c = r.getProgramParameter(o, r.ACTIVE_UNIFORMS), h = {};
345
345
  for (let d = 0; d < c; d++) {
346
- const { name: p, type: f, size: v } = r.getActiveUniform(o, d), y = r.getUniformLocation(o, p);
347
- y && (h[p] = { type: f, location: y, size: v });
346
+ const { name: p, type: f, size: m } = r.getActiveUniform(o, d), v = r.getUniformLocation(o, p);
347
+ v && (h[p] = { type: f, location: v, size: m });
348
348
  }
349
349
  return h;
350
350
  }
351
351
  function u() {
352
352
  const c = r.getProgramParameter(o, r.ACTIVE_ATTRIBUTES), h = {};
353
353
  for (let d = 0; d < c; d++) {
354
- const { name: p, type: f } = r.getActiveAttrib(o, d), v = r.getAttribLocation(o, p);
355
- h[p] = { type: f, index: v };
354
+ const { name: p, type: f } = r.getActiveAttrib(o, d), m = r.getAttribLocation(o, p);
355
+ h[p] = { type: f, index: m };
356
356
  }
357
357
  return h;
358
358
  }
359
359
  }
360
- function qn(r, e) {
361
- return Fr(r, r.VERTEX_SHADER, e);
360
+ function ho(r, e) {
361
+ return $r(r, r.VERTEX_SHADER, e);
362
362
  }
363
- function eo(r, e) {
364
- return Fr(r, r.FRAGMENT_SHADER, e);
363
+ function fo(r, e) {
364
+ return $r(r, r.FRAGMENT_SHADER, e);
365
365
  }
366
- function Fr(r, e, t) {
366
+ function $r(r, e, t) {
367
367
  const n = r.createShader(e);
368
368
  if (r.shaderSource(n, t), r.compileShader(n), !r.getShaderParameter(n, r.COMPILE_STATUS)) {
369
369
  const o = "An error occurred compiling the shaders: " + r.getShaderInfoLog(n);
@@ -371,14 +371,14 @@ function Fr(r, e, t) {
371
371
  }
372
372
  return n;
373
373
  }
374
- function Dt(r, e, t, n) {
374
+ function Ut(r, e, t, n) {
375
375
  const o = r.createVertexArray();
376
- r.bindVertexArray(o), ro(e, t), r.bindVertexArray(null);
376
+ r.bindVertexArray(o), mo(e, t), r.bindVertexArray(null);
377
377
  const i = t.count, s = t.attribute.indices, l = s !== void 0, u = r.UNSIGNED_SHORT, c = l ? s.offset ?? 0 : 0;
378
378
  return { gl: r, vao: o, count: i, mode: n, type: u, offset: c, indices: l };
379
379
  }
380
- function to(r, { x: e, y: t } = { x: 64, y: 64 }) {
381
- const n = _t / e, o = _t / t, i = e + 1, s = new Uint8Array(i * (t + 1) * 2), l = new Uint16Array((i * 2 + 1) * t);
380
+ function po(r, { x: e, y: t } = { x: 64, y: 64 }) {
381
+ const n = Pt / e, o = Pt / t, i = e + 1, s = new Uint8Array(i * (t + 1) * 2), l = new Uint16Array((i * 2 + 1) * t);
382
382
  let u = 0, c = 0;
383
383
  for (let h = 0; h < t; h++) {
384
384
  for (let d = 0; d <= e; d++) {
@@ -389,13 +389,13 @@ function to(r, { x: e, y: t } = { x: 64, y: 64 }) {
389
389
  l[c++] = 65535;
390
390
  }
391
391
  for (let h = 0; h <= e; h++)
392
- s[u++] = h * n, s[u++] = _t;
393
- return $t(r, {
392
+ s[u++] = h * n, s[u++] = Pt;
393
+ return cr(r, {
394
394
  a_pos: { size: 2, data: s, type: r.UNSIGNED_BYTE },
395
395
  indices: { size: 1, data: l, type: r.UNSIGNED_SHORT }
396
396
  });
397
397
  }
398
- function $t(r, e) {
398
+ function cr(r, e) {
399
399
  const t = {}, n = e.indices;
400
400
  if (n && n.data.byteLength / n.data.length !== 2)
401
401
  throw new Error("The buffer data of indices must be Uint16Array!");
@@ -403,14 +403,14 @@ function $t(r, e) {
403
403
  for (const i in e) {
404
404
  const { size: s, data: l, divisor: u, stride: c, offset: h, normalize: d, type: p } = e[i], f = r.createBuffer();
405
405
  if (!f) throw new Error("Unable to initialize buffer!");
406
- const v = i === "indices" ? r.ELEMENT_ARRAY_BUFFER : r.ARRAY_BUFFER;
407
- r.bindBuffer(v, f), r.bufferData(v, l, r.STATIC_DRAW), t[i] = { size: s, type: p, normalize: d === !0, stride: c ?? 0, offset: h ?? 0, divisor: u ?? 0, buffer: f };
408
- const y = (l.length - (h ?? 0)) / s;
409
- o = o === 0 ? y : Math.min(o, y);
406
+ const m = i === "indices" ? r.ELEMENT_ARRAY_BUFFER : r.ARRAY_BUFFER;
407
+ r.bindBuffer(m, f), r.bufferData(m, l, r.STATIC_DRAW), t[i] = { size: s, type: p, normalize: d === !0, stride: c ?? 0, offset: h ?? 0, divisor: u ?? 0, buffer: f };
408
+ const v = (l.length - (h ?? 0)) / s;
409
+ o = o === 0 ? v : Math.min(o, v);
410
410
  }
411
411
  return n && (o = n.data.length), r.bindBuffer(r.ELEMENT_ARRAY_BUFFER, null), r.bindBuffer(r.ARRAY_BUFFER, null), { gl: r, count: o, attribute: t };
412
412
  }
413
- function ut(r, e) {
413
+ function yt(r, e) {
414
414
  const { gl: t, uniform: n } = r;
415
415
  let o = 0;
416
416
  for (const i in n) {
@@ -492,18 +492,18 @@ function ut(r, e) {
492
492
  }
493
493
  }
494
494
  }
495
- function ro(r, e) {
495
+ function mo(r, e) {
496
496
  const { gl: t, attribute: n } = r, o = e.attribute, i = o.indices;
497
497
  i && t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, i.buffer);
498
498
  for (const s in n)
499
499
  if (o.hasOwnProperty(s)) {
500
- const { type: l, index: u } = n[s], { buffer: c, type: h, size: d, normalize: p, stride: f, divisor: v, offset: y } = o[s];
500
+ const { type: l, index: u } = n[s], { buffer: c, type: h, size: d, normalize: p, stride: f, divisor: m, offset: v } = o[s];
501
501
  switch (t.bindBuffer(t.ARRAY_BUFFER, c), l) {
502
502
  case WebGL2RenderingContext.FLOAT:
503
503
  case WebGL2RenderingContext.FLOAT_VEC2:
504
504
  case WebGL2RenderingContext.FLOAT_VEC3:
505
505
  case WebGL2RenderingContext.FLOAT_VEC4:
506
- t.vertexAttribPointer(u, d, h, p, f, y);
506
+ t.vertexAttribPointer(u, d, h, p, f, v);
507
507
  break;
508
508
  case WebGL2RenderingContext.BOOL:
509
509
  case WebGL2RenderingContext.INT:
@@ -514,19 +514,19 @@ function ro(r, e) {
514
514
  case WebGL2RenderingContext.UNSIGNED_INT_VEC2:
515
515
  case WebGL2RenderingContext.UNSIGNED_INT_VEC3:
516
516
  case WebGL2RenderingContext.UNSIGNED_INT_VEC4:
517
- t.vertexAttribIPointer(u, d, h, f, y);
517
+ t.vertexAttribIPointer(u, d, h, f, v);
518
518
  break;
519
519
  default:
520
520
  throw new Error("The buffer's type is undefined! type: " + l);
521
521
  }
522
- t.enableVertexAttribArray(u), v && t.vertexAttribDivisor && t.vertexAttribDivisor(u, v);
522
+ t.enableVertexAttribArray(u), m && t.vertexAttribDivisor && t.vertexAttribDivisor(u, m);
523
523
  }
524
524
  }
525
- function Zt(r) {
525
+ function Qt(r) {
526
526
  const { gl: e, vao: t, count: n, mode: o, type: i, offset: s, indices: l } = r;
527
527
  e.bindVertexArray(t), l ? e.drawElements(o, n, i, s) : e.drawArrays(o, s, n), e.bindVertexArray(null);
528
528
  }
529
- var no = H("I3ZlcnNpb24gMzAwIGVzDQo="), oo = H("I3ZlcnNpb24gMzAwIGVzDQo="), ao = H("dW5pZm9ybSBmbG9hdCB1X29wYWNpdHk7DQp1bmlmb3JtIGhpZ2hwIHZlYzIgdV9kYXRhX2JvdW5kOw0KY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LUY5MCksIHV2KTsNCn0NCg0KdmVjMiBtZXJjYXRvclJldmVyc2UodmVjMiB1dikgew0KICAgIHZlYzIgcmUgPSBtaXgodmVjMigtRjE4MCksIHZlYzIoRjE4MCksIHV2KTsNCiAgICByZS55ID0gMTE0LjU5MTU1OTAyNjE2NDY1ICogYXRhbihleHAocmUueSAqIC0wLjAxNzQ1MzI5MjUxOTk0MzI5NSkpIC0gRjkwOw0KICAgIHJldHVybiByZTsNCn0NCg0KdmVjMiBtZXJjYXRvcih2ZWMyIGxsKSB7DQogICAgcmV0dXJuIHZlYzIoKEYxODAgKyBsbC54KSAvIEYzNjAsIChGMTgwIC0gKEYxODAgLyBQSSAqIGxvZyh0YW4oUEkgLyA0LiArIGxsLnkgKiBQSSAvIEYzNjApKSkpIC8gRjM2MCk7DQp9DQo="), Ro = `// src/xmap/layer/text/worker.ts
530
530
  var TYPE_TEXT_TILE = "text-tile";
531
531
  function textTile({ canvas: canvas2, data }) {
532
532
  const { width, height } = canvas2;
@@ -1040,31 +1040,31 @@ self.onmessage = (event) => {
1040
1040
  }
1041
1041
  }
1042
1042
  };
1043
- `, po = { header_vertex: no, header_fragment: oo, use_mask: lo, use_display: ao, use_bound: io, use_color: so, data_grid: co, constant: uo, projection: ho };
1044
- function ar(r, e) {
1043
+ `, To = { header_vertex: vo, header_fragment: yo, use_mask: Co, use_display: go, use_bound: bo, use_color: Io, data_grid: xo, constant: Eo, projection: Ao };
1044
+ function yr(r, e) {
1045
1045
  const t = typeof r == "string";
1046
1046
  let n = t ? r : String.fromCharCode(...r);
1047
- for (const [o, i] of Object.entries(po))
1047
+ for (const [o, i] of Object.entries(To))
1048
1048
  n = n.replaceAll(`#include <${o}>`, t ? i : String.fromCharCode(...i));
1049
1049
  return e !== void 0 && (n = n.replaceAll("#include <define>", e)), n;
1050
1050
  }
1051
- var It, Ct, xt, Et, At, Me, ye, qe, xe, we, Pr, vo, et, Gt, br, mo = (br = class {
1051
+ var Tt, wt, Lt, St, _t, Be, Ie, at, Re, _e, qr, Lo, it, jt, _r, wo = (_r = class {
1052
1052
  constructor(r, e = 2) {
1053
- E(this, we);
1054
- E(this, It, {});
1055
- E(this, Ct, {});
1056
- E(this, xt, {});
1057
- E(this, Et, {});
1058
- E(this, At, {});
1059
- E(this, Me);
1060
- E(this, ye);
1061
- E(this, qe, 0);
1062
- E(this, xe);
1063
- E(this, et, /* @__PURE__ */ new Map());
1064
- C(this, Me, r), r.getExtension("OES_texture_float_linear"), C(this, xe, /* @__PURE__ */ new Map()), C(this, ye, w(this, we, Pr).call(this, e));
1053
+ A(this, _e);
1054
+ A(this, Tt, {});
1055
+ A(this, wt, {});
1056
+ A(this, Lt, {});
1057
+ A(this, St, {});
1058
+ A(this, _t, {});
1059
+ A(this, Be);
1060
+ A(this, Ie);
1061
+ A(this, at, 0);
1062
+ A(this, Re);
1063
+ A(this, it, /* @__PURE__ */ new Map());
1064
+ E(this, Be, r), r.getExtension("OES_texture_float_linear"), E(this, Re, /* @__PURE__ */ new Map()), E(this, Ie, S(this, _e, qr).call(this, e));
1065
1065
  }
1066
1066
  vao(r, e) {
1067
- const t = a(this, It);
1067
+ const t = a(this, Tt);
1068
1068
  if (!t[r]) {
1069
1069
  if (!e) throw new Error("Can't supply the vao! The vao key: " + r);
1070
1070
  t[r] = e();
@@ -1072,7 +1072,7 @@ var It, Ct, xt, Et, At, Me, ye, qe, xe, we, Pr, vo, et, Gt, br, mo = (br = class
1072
1072
  return t[r];
1073
1073
  }
1074
1074
  buffer(r, e) {
1075
- const t = a(this, Ct);
1075
+ const t = a(this, wt);
1076
1076
  if (!t[r]) {
1077
1077
  if (!e) throw new Error("Can't supply the buffer! The buffer key: " + r);
1078
1078
  t[r] = e();
@@ -1080,70 +1080,70 @@ var It, Ct, xt, Et, At, Me, ye, qe, xe, we, Pr, vo, et, Gt, br, mo = (br = class
1080
1080
  return t[r];
1081
1081
  }
1082
1082
  vertex(r, e, t) {
1083
- const n = a(this, xt);
1084
- return n[r] || (n[r] = qn(a(this, Me), ar(e, t ? t() : void 0))), n[r];
1083
+ const n = a(this, Lt);
1084
+ return n[r] || (n[r] = ho(a(this, Be), yr(e, t ? t() : void 0))), n[r];
1085
1085
  }
1086
1086
  fragment(r, e, t) {
1087
- const n = a(this, Et);
1088
- return n[r] || (n[r] = eo(a(this, Me), ar(e, t ? t() : void 0))), n[r];
1087
+ const n = a(this, St);
1088
+ return n[r] || (n[r] = fo(a(this, Be), yr(e, t ? t() : void 0))), n[r];
1089
1089
  }
1090
1090
  program(r, e, t, n) {
1091
- const o = a(this, At);
1092
- return o[r] || (o[r] = $n(a(this, Me), e(), t(), n)), o[r];
1091
+ const o = a(this, _t);
1092
+ return o[r] || (o[r] = uo(a(this, Be), e(), t(), n)), o[r];
1093
1093
  }
1094
1094
  exec(r, e, t) {
1095
- const n = St(this, qe)._++ & 4095;
1095
+ const n = Ft(this, at)._++ & 4095;
1096
1096
  return new Promise((o) => {
1097
- a(this, xe).set(n, o), a(this, ye)[n % a(this, ye).length].postMessage({ key: n, type: r, data: e }, t);
1097
+ a(this, Re).set(n, o), a(this, Ie)[n % a(this, Ie).length].postMessage({ key: n, type: r, data: e }, t);
1098
1098
  });
1099
1099
  }
1100
1100
  execAll(r, e, t) {
1101
1101
  const n = [];
1102
- for (let o = 0; o < a(this, ye).length; o++)
1102
+ for (let o = 0; o < a(this, Ie).length; o++)
1103
1103
  n.push(this.exec(r, e, t));
1104
1104
  return Promise.all(n);
1105
1105
  }
1106
1106
  getTexture(r) {
1107
- return w(this, we, Gt).call(this, r).pop();
1107
+ return S(this, _e, jt).call(this, r).pop();
1108
1108
  }
1109
1109
  setTexture(r, e) {
1110
- w(this, we, Gt).call(this, r).push(e);
1110
+ S(this, _e, jt).call(this, r).push(e);
1111
1111
  }
1112
- }, It = new WeakMap(), Ct = new WeakMap(), xt = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Me = new WeakMap(), ye = new WeakMap(), qe = new WeakMap(), xe = new WeakMap(), we = new WeakSet(), Pr = function(r) {
1112
+ }, Tt = new WeakMap(), wt = new WeakMap(), Lt = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), Be = new WeakMap(), Ie = new WeakMap(), at = new WeakMap(), Re = new WeakMap(), _e = new WeakSet(), qr = function(r) {
1113
1113
  const e = [];
1114
1114
  for (let t = 0; t < r; t++) {
1115
- const n = new Worker(URL.createObjectURL(new Blob([fo], { type: "application/javascript" })), { type: "module" });
1115
+ const n = new Worker(URL.createObjectURL(new Blob([Ro], { type: "application/javascript" })), { type: "module" });
1116
1116
  e.push(n), n.onmessage = (o) => {
1117
1117
  const i = o.data.key;
1118
- a(this, xe).get(i)(o.data.data), a(this, xe).delete(i);
1118
+ a(this, Re).get(i)(o.data.data), a(this, Re).delete(i);
1119
1119
  };
1120
1120
  }
1121
1121
  return e;
1122
- }, vo = function(r, e, t) {
1123
- const n = St(this, qe)._++ & 4095;
1122
+ }, Lo = function(r, e, t) {
1123
+ const n = Ft(this, at)._++ & 4095;
1124
1124
  return new Promise((o) => {
1125
- a(this, xe).set(n, o), a(this, ye)[n % a(this, ye).length].postMessage({ key: n, type: r, data: e }, t);
1125
+ a(this, Re).set(n, o), a(this, Ie)[n % a(this, Ie).length].postMessage({ key: n, type: r, data: e }, t);
1126
1126
  });
1127
- }, et = new WeakMap(), Gt = function(r) {
1128
- let e = a(this, et).get(r);
1129
- return e || (e = [], a(this, et).set(r, e)), e;
1130
- }, br);
1131
- wr("grid", On).then();
1132
- wr("proxy", Jn).then();
1133
- var O, le, tt, Xe, z, Xr, dt, Nt, Yt, Ft, gr, yo = (gr = class extends Tn {
1127
+ }, it = new WeakMap(), jt = function(r) {
1128
+ let e = a(this, it).get(r);
1129
+ return e || (e = [], a(this, it).set(r, e)), e;
1130
+ }, _r);
1131
+ Fr("grid", ao).then();
1132
+ Fr("proxy", co).then();
1133
+ var j, he, st, Ke, K, en, gt, Jt, $t, qt, kr, So = (kr = class extends Yn {
1134
1134
  constructor(e) {
1135
1135
  super(e);
1136
- E(this, z);
1136
+ A(this, K);
1137
1137
  //layer->zIndex
1138
- E(this, O);
1139
- E(this, le);
1140
- E(this, tt);
1141
- E(this, Xe, []);
1138
+ A(this, j);
1139
+ A(this, he);
1140
+ A(this, st);
1141
+ A(this, Ke, []);
1142
1142
  /**
1143
1143
  * 过度动画时间:毫秒
1144
1144
  */
1145
- b(this, "transition");
1146
- C(this, O, /* @__PURE__ */ new Map()), C(this, le, /* @__PURE__ */ new Map()), w(this, z, Xr).call(this, (e == null ? void 0 : e.style).layers), C(this, tt, new mo(this.painter.context.gl, e.workers)), this.transition = e.transition ?? 0;
1145
+ g(this, "transition");
1146
+ E(this, j, /* @__PURE__ */ new Map()), E(this, he, /* @__PURE__ */ new Map()), S(this, K, en).call(this, (e == null ? void 0 : e.style).layers), E(this, st, new wo(this.painter.context.gl, e.workers)), this.transition = e.transition ?? 0;
1147
1147
  }
1148
1148
  addSource(e, t) {
1149
1149
  return super.addSource(e, t);
@@ -1156,10 +1156,10 @@ var O, le, tt, Xe, z, Xr, dt, Nt, Yt, Ft, gr, yo = (gr = class extends Tn {
1156
1156
  addLayer(e, t = 0) {
1157
1157
  const n = e.id;
1158
1158
  if ("beforeAdd" in e && e.beforeAdd(this), typeof t == "string")
1159
- return w(this, z, Nt).call(this, n, t), super.addLayer(e, t), this.sortLayer(), this;
1159
+ return S(this, K, Jt).call(this, n, t), super.addLayer(e, t), this.sortLayer(), this;
1160
1160
  {
1161
- const o = w(this, z, Ft).call(this, t);
1162
- return w(this, z, dt).call(this, n, t), super.addLayer(e, o), this.sortLayer(), this;
1161
+ const o = S(this, K, qt).call(this, t);
1162
+ return S(this, K, gt).call(this, n, t), super.addLayer(e, o), this.sortLayer(), this;
1163
1163
  }
1164
1164
  }
1165
1165
  /**
@@ -1168,12 +1168,12 @@ var O, le, tt, Xe, z, Xr, dt, Nt, Yt, Ft, gr, yo = (gr = class extends Tn {
1168
1168
  * @param zIndex index or beforeId
1169
1169
  */
1170
1170
  moveLayer(e, t = 0) {
1171
- if (!a(this, O).has(e)) throw new Error(`The layer(id:${t}) does not exist!`);
1172
- if (w(this, z, Yt).call(this, e), typeof t == "string")
1173
- return w(this, z, Nt).call(this, e, t), super.moveLayer(e, t), this.sortLayer(), this;
1171
+ if (!a(this, j).has(e)) throw new Error(`The layer(id:${t}) does not exist!`);
1172
+ if (S(this, K, $t).call(this, e), typeof t == "string")
1173
+ return S(this, K, Jt).call(this, e, t), super.moveLayer(e, t), this.sortLayer(), this;
1174
1174
  {
1175
- const n = w(this, z, Ft).call(this, t);
1176
- return w(this, z, dt).call(this, e, t), super.moveLayer(e, n);
1175
+ const n = S(this, K, qt).call(this, t);
1176
+ return S(this, K, gt).call(this, e, t), super.moveLayer(e, n);
1177
1177
  }
1178
1178
  }
1179
1179
  /**
@@ -1181,100 +1181,100 @@ var O, le, tt, Xe, z, Xr, dt, Nt, Yt, Ft, gr, yo = (gr = class extends Tn {
1181
1181
  * @param id layer id
1182
1182
  */
1183
1183
  removeLayer(e) {
1184
- if (!a(this, O).has(e)) throw new Error(`The layer(id:${e}) does not exist!`);
1185
- return w(this, z, Yt).call(this, e), super.removeLayer(e);
1184
+ if (!a(this, j).has(e)) throw new Error(`The layer(id:${e}) does not exist!`);
1185
+ return S(this, K, $t).call(this, e), super.removeLayer(e);
1186
1186
  }
1187
1187
  /**
1188
1188
  * show layer
1189
1189
  * @param id layer id
1190
1190
  */
1191
1191
  show(e) {
1192
- a(this, O).has(e), super.setLayoutProperty(e, "visibility", "visible");
1192
+ a(this, j).has(e), super.setLayoutProperty(e, "visibility", "visible");
1193
1193
  }
1194
1194
  /**
1195
1195
  * hide layer
1196
1196
  * @param id
1197
1197
  */
1198
1198
  hide(e) {
1199
- a(this, O).has(e), super.setLayoutProperty(e, "visibility", "none");
1199
+ a(this, j).has(e), super.setLayoutProperty(e, "visibility", "none");
1200
1200
  }
1201
1201
  /**
1202
1202
  * @internal
1203
1203
  */
1204
1204
  get renderFactory() {
1205
- return a(this, tt);
1205
+ return a(this, st);
1206
1206
  }
1207
1207
  setLayerLevelRule(e) {
1208
- C(this, Xe, e), this.sortLayer();
1208
+ E(this, Ke, e), this.sortLayer();
1209
1209
  }
1210
1210
  sortLayer() {
1211
1211
  let e = this.getLayersOrder().filter((t) => t.includes("__") && !t.includes("baselayer__"));
1212
- a(this, Xe).map((t) => e.filter((n) => n.startsWith(t + "__"))).flat().forEach((t) => this.moveLayer(t));
1212
+ a(this, Ke).map((t) => e.filter((n) => n.startsWith(t + "__"))).flat().forEach((t) => this.moveLayer(t));
1213
1213
  }
1214
1214
  getLayerLevelRule() {
1215
- return a(this, Xe).map((e) => e);
1215
+ return a(this, Ke).map((e) => e);
1216
1216
  }
1217
1217
  //endregion
1218
- }, O = new WeakMap(), le = new WeakMap(), tt = new WeakMap(), Xe = new WeakMap(), z = new WeakSet(), //region private func
1218
+ }, j = new WeakMap(), he = new WeakMap(), st = new WeakMap(), Ke = new WeakMap(), K = new WeakSet(), //region private func
1219
1219
  /**
1220
1220
  * init mapbox layers
1221
1221
  * @param layers
1222
1222
  * @private
1223
1223
  */
1224
- Xr = function(e) {
1224
+ en = function(e) {
1225
1225
  if (e !== void 0)
1226
- for (const t of e) w(this, z, dt).call(this, t.id, 0);
1226
+ for (const t of e) S(this, K, gt).call(this, t.id, 0);
1227
1227
  }, /**
1228
1228
  * update Layer z-index
1229
1229
  * @param id layer id
1230
1230
  * @param zIndex z-index
1231
1231
  * @private
1232
1232
  */
1233
- dt = function(e, t) {
1234
- if (a(this, O).has(e)) throw new Error(`The layer(id:${e}) already exists!`);
1235
- a(this, O).set(e, t), a(this, le).has(t) || a(this, le).set(t, []), a(this, le).get(t).push(e);
1233
+ gt = function(e, t) {
1234
+ if (a(this, j).has(e)) throw new Error(`The layer(id:${e}) already exists!`);
1235
+ a(this, j).set(e, t), a(this, he).has(t) || a(this, he).set(t, []), a(this, he).get(t).push(e);
1236
1236
  }, /**
1237
1237
  * add z-index by before id
1238
1238
  * @param id layer id
1239
1239
  * @param idBefore before layer id
1240
1240
  * @private
1241
1241
  */
1242
- Nt = function(e, t) {
1243
- if (!a(this, O).has(t)) throw new Error(`The before layer(id:${t}) does not exist!`);
1244
- const n = a(this, O).get(t), o = a(this, le).get(n), i = o.findIndex((s) => s === t);
1245
- a(this, O).set(e, n), o.splice(i, 0, t);
1242
+ Jt = function(e, t) {
1243
+ if (!a(this, j).has(t)) throw new Error(`The before layer(id:${t}) does not exist!`);
1244
+ const n = a(this, j).get(t), o = a(this, he).get(n), i = o.findIndex((s) => s === t);
1245
+ a(this, j).set(e, n), o.splice(i, 0, t);
1246
1246
  }, /**
1247
1247
  * remove z-index
1248
1248
  * @param id
1249
1249
  * @private
1250
1250
  */
1251
- Yt = function(e) {
1252
- const t = a(this, O).get(e), n = a(this, le).get(t), o = n.findIndex((i) => i === e);
1253
- n.splice(o, 1), a(this, O).delete(e);
1251
+ $t = function(e) {
1252
+ const t = a(this, j).get(e), n = a(this, he).get(t), o = n.findIndex((i) => i === e);
1253
+ n.splice(o, 1), a(this, j).delete(e);
1254
1254
  }, /**
1255
1255
  * get z-index's before id
1256
1256
  * @param zIndex z-index
1257
1257
  * @return before layer id
1258
1258
  * @private
1259
1259
  */
1260
- Ft = function(e) {
1260
+ qt = function(e) {
1261
1261
  let t;
1262
- for (let n of a(this, le).keys())
1262
+ for (let n of a(this, he).keys())
1263
1263
  n > e && (t === void 0 || t > n) && (t = n);
1264
- return t !== void 0 ? a(this, le).get(t)[0] : void 0;
1265
- }, gr), bo = 63710088e-1, We, Ir, go = (Ir = class {
1264
+ return t !== void 0 ? a(this, he).get(t)[0] : void 0;
1265
+ }, kr), _o = 63710088e-1, Oe, Mr, ko = (Mr = class {
1266
1266
  constructor() {
1267
- E(this, We);
1267
+ A(this, Oe);
1268
1268
  }
1269
1269
  get colorCanvas() {
1270
- return a(this, We) || C(this, We, new OffscreenCanvas(512, 1)), a(this, We);
1270
+ return a(this, Oe) || E(this, Oe, new OffscreenCanvas(512, 1)), a(this, Oe);
1271
1271
  }
1272
- }, We = new WeakMap(), Ir);
1273
- function Wr(r) {
1272
+ }, Oe = new WeakMap(), Mr);
1273
+ function tn(r) {
1274
1274
  return r.data.BYTES_PER_ELEMENT <= 2;
1275
1275
  }
1276
- var Io = new go();
1277
- function zr(r, e, t, n = !1) {
1276
+ var Mo = new ko();
1277
+ function rn(r, e, t, n = !1) {
1278
1278
  if (t.length % 2 === 0 && typeof t[0] != "number")
1279
1279
  throw new Error("Color format error! When the color array length is even,the format is [number,string,...,number].");
1280
1280
  if (t.length % 2 === 1 && typeof t[0] != "string")
@@ -1288,18 +1288,18 @@ function zr(r, e, t, n = !1) {
1288
1288
  o.push(d ? Math.log2(h) : h);
1289
1289
  }
1290
1290
  } else o = t;
1291
- const i = Io.colorCanvas, s = i.getContext("2d"), l = i.width;
1291
+ const i = Mo.colorCanvas, s = i.getContext("2d"), l = i.width;
1292
1292
  if (t.length % 2 === 0) {
1293
1293
  const h = o[0], d = o[o.length - 2], p = d - h, f = s.createLinearGradient(0, 0, l, 0);
1294
- for (let v = 0; v < o.length; v += 2) f.addColorStop((o[v] - h) / p, o[v + 1]);
1294
+ for (let m = 0; m < o.length; m += 2) f.addColorStop((o[m] - h) / p, o[m + 1]);
1295
1295
  s.fillStyle = f, s.fillRect(0, 0, l, 1), e.u_color_range = [h, d];
1296
1296
  } else {
1297
1297
  let h = 0;
1298
1298
  s.fillStyle = t[0], s.fillRect(h++, 0, 1, 1);
1299
1299
  const d = o[1], p = o[o.length - 2], f = p - d;
1300
- for (let v = 2; v < o.length - 1; v += 2) {
1301
- s.fillStyle = o[v];
1302
- const x = ~~((o[v + 1] - d) * (l - 1) / f) - h;
1300
+ for (let m = 2; m < o.length - 1; m += 2) {
1301
+ s.fillStyle = o[m];
1302
+ const x = ~~((o[m + 1] - d) * (l - 1) / f) - h;
1303
1303
  s.fillRect(h, 0, x, 1), h += x;
1304
1304
  }
1305
1305
  s.fillStyle = t[o.length - 1], s.fillRect(l - 1, 0, 1, 1), e.u_color_range = [d, p];
@@ -1309,23 +1309,23 @@ function zr(r, e, t, n = !1) {
1309
1309
  const c = i.transferToImageBitmap();
1310
1310
  r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, l, 1, r.RGBA, r.UNSIGNED_BYTE, c), c.close(), r.bindTexture(r.TEXTURE_2D, null);
1311
1311
  }
1312
- function Hr(r, e) {
1313
- return !e && Wr(r) ? "uint" : "float";
1312
+ function nn(r, e) {
1313
+ return !e && tn(r) ? "uint" : "float";
1314
1314
  }
1315
- function ht(r, e, t, n = !1) {
1315
+ function bt(r, e, t, n = !1) {
1316
1316
  let o, i = 1;
1317
1317
  Array.isArray(e) ? (o = e[0], e.length > 1 && (i = 2)) : o = e;
1318
- const s = Hr(o, n), l = `${s}-${t}-${n}`;
1318
+ const s = nn(o, n), l = `${s}-${t}-${n}`;
1319
1319
  let u = c(e, l);
1320
- return u || (u = {}, Co(r, u, e, t, n), e.texture.get(r)[l] = i === 1 ? [u.u_data00] : [u.u_data00, u.u_data01], e.info[l] = u), { number: i, filter: t, type: s, useLog: n, uniforms: u };
1320
+ return u || (u = {}, Vo(r, u, e, t, n), e.texture.get(r)[l] = i === 1 ? [u.u_data00] : [u.u_data00, u.u_data01], e.info[l] = u), { number: i, filter: t, type: s, useLog: n, uniforms: u };
1321
1321
  function c(h, d) {
1322
1322
  return h.texture || (h.texture = /* @__PURE__ */ new WeakMap()), (!h.texture.get(r) || !h.info) && (h.texture.set(r, {}), h.info = {}), h.info[d];
1323
1323
  }
1324
1324
  }
1325
- function ir(r, e, t, n, o, i) {
1325
+ function gr(r, e, t, n, o, i) {
1326
1326
  const s = t === "linear" ? r.LINEAR : r.NEAREST;
1327
1327
  if (o === 1 && i === 1)
1328
- return Oe(r, r.R8, e.x, e.y, r.RED, r.UNSIGNED_BYTE, e.data, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1328
+ return Je(r, r.R8, e.x, e.y, r.RED, r.UNSIGNED_BYTE, e.data, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1329
1329
  const l = Math.floor(e.x / o), u = Math.floor(e.y / i), c = new Uint8Array(l * u);
1330
1330
  let h = 0;
1331
1331
  for (let d = 0; d < e.y; d += i) {
@@ -1333,20 +1333,20 @@ function ir(r, e, t, n, o, i) {
1333
1333
  for (let f = 0; f < e.x; f += o)
1334
1334
  c[h++] = e.data[p + f];
1335
1335
  }
1336
- return Oe(r, r.R8, l, u, r.RED, r.UNSIGNED_BYTE, c, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1336
+ return Je(r, r.R8, l, u, r.RED, r.UNSIGNED_BYTE, c, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1337
1337
  }
1338
- function sr(r, e, t, n, o, i) {
1338
+ function br(r, e, t, n, o, i) {
1339
1339
  const s = e.data, l = typeof window.Float16Array == "function", u = Math.floor(e.x / o), c = Math.floor(e.y / i), h = l ? new Float16Array(u * c) : new Float32Array(u * c), d = 1 << e.data.BYTES_PER_ELEMENT * 8 - 1, p = e.zeroNaN;
1340
1340
  let f = 0;
1341
- for (let y = 0; y < e.y; y += i) {
1342
- const x = y * e.x;
1343
- for (let A = 0; A < e.x; A += o) {
1344
- const I = s[x + A];
1345
- h[f++] = p && I === 0 ? NaN : I - d;
1341
+ for (let v = 0; v < e.y; v += i) {
1342
+ const x = v * e.x;
1343
+ for (let R = 0; R < e.x; R += o) {
1344
+ const C = s[x + R];
1345
+ h[f++] = p && C === 0 ? NaN : C - d;
1346
1346
  }
1347
1347
  }
1348
- const v = t === "linear" ? r.LINEAR : r.NEAREST;
1349
- return Oe(
1348
+ const m = t === "linear" ? r.LINEAR : r.NEAREST;
1349
+ return Je(
1350
1350
  r,
1351
1351
  r.R16F,
1352
1352
  u,
@@ -1354,14 +1354,14 @@ function sr(r, e, t, n, o, i) {
1354
1354
  r.RED,
1355
1355
  l ? r.HALF_FLOAT : r.FLOAT,
1356
1356
  l ? new Uint16Array(h.buffer) : h,
1357
- v,
1357
+ m,
1358
1358
  n ? r.REPEAT : r.CLAMP_TO_EDGE
1359
1359
  );
1360
1360
  }
1361
- function lr(r, e, t, n, o, i) {
1361
+ function Ir(r, e, t, n, o, i) {
1362
1362
  const s = t === "linear" ? r.LINEAR : r.NEAREST;
1363
1363
  if (o === 1 && i === 1)
1364
- return Oe(r, r.R32F, e.x, e.y, r.RED, r.FLOAT, e.data, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1364
+ return Je(r, r.R32F, e.x, e.y, r.RED, r.FLOAT, e.data, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1365
1365
  const l = Math.floor(e.x / o), u = Math.floor(e.y / i), c = new Float32Array(l * u);
1366
1366
  let h = 0;
1367
1367
  for (let d = 0; d < e.y; d += i) {
@@ -1369,30 +1369,30 @@ function lr(r, e, t, n, o, i) {
1369
1369
  for (let f = 0; f < e.x; f += o)
1370
1370
  c[h++] = e.data[p + f];
1371
1371
  }
1372
- return Oe(r, r.R32F, l, u, r.RED, r.FLOAT, c, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1372
+ return Je(r, r.R32F, l, u, r.RED, r.FLOAT, c, s, n ? r.REPEAT : r.CLAMP_TO_EDGE);
1373
1373
  }
1374
- function cr(r, e, t, n, o, i) {
1374
+ function Cr(r, e, t, n, o, i) {
1375
1375
  const s = e.data, l = typeof window.Float16Array == "function", u = Math.floor(e.x / o), c = Math.floor(e.y / i), h = l ? new Float16Array(u * c) : new Float32Array(u * c);
1376
- if (Wr(e)) {
1377
- const { reference: f, scale: v, zeroNaN: y } = e;
1376
+ if (tn(e)) {
1377
+ const { reference: f, scale: m, zeroNaN: v } = e;
1378
1378
  let x = 0;
1379
- for (let A = 0; A < e.y; A += i) {
1380
- const I = A * e.x;
1381
- for (let g = 0; g < e.x; g += o) {
1382
- const k = s[I + g];
1383
- h[x++] = y && k === 0 ? NaN : Math.log2(k * v + f);
1379
+ for (let R = 0; R < e.y; R += i) {
1380
+ const C = R * e.x;
1381
+ for (let b = 0; b < e.x; b += o) {
1382
+ const B = s[C + b];
1383
+ h[x++] = v && B === 0 ? NaN : Math.log2(B * m + f);
1384
1384
  }
1385
1385
  }
1386
1386
  } else {
1387
1387
  let f = 0;
1388
- for (let v = 0; v < e.y; v += i) {
1389
- const y = v * e.x;
1388
+ for (let m = 0; m < e.y; m += i) {
1389
+ const v = m * e.x;
1390
1390
  for (let x = 0; x < e.x; x += o)
1391
- h[f++] = Math.log2(e.data[y + x]);
1391
+ h[f++] = Math.log2(e.data[v + x]);
1392
1392
  }
1393
1393
  }
1394
1394
  const p = t === "linear" ? r.LINEAR : r.NEAREST;
1395
- return Oe(
1395
+ return Je(
1396
1396
  r,
1397
1397
  r.R16F,
1398
1398
  u,
@@ -1404,122 +1404,122 @@ function cr(r, e, t, n, o, i) {
1404
1404
  n ? r.REPEAT : r.CLAMP_TO_EDGE
1405
1405
  );
1406
1406
  }
1407
- function Oe(r, e, t, n, o, i, s, l, u) {
1407
+ function Je(r, e, t, n, o, i, s, l, u) {
1408
1408
  const c = r.createTexture();
1409
1409
  return r.bindTexture(r.TEXTURE_2D, c), r.pixelStorei(r.UNPACK_ALIGNMENT, 1), r.texStorage2D(r.TEXTURE_2D, 1, e, t, n), r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, t, n, o, i, s), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, l), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, l), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, u), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.bindTexture(r.TEXTURE_2D, null), c;
1410
1410
  }
1411
- function Co(r, e, t, n, o) {
1411
+ function Vo(r, e, t, n, o) {
1412
1412
  let i, s = null;
1413
1413
  Array.isArray(t) ? (i = t[0], t.length === 2 && (s = t[1])) : i = t;
1414
- const l = Hr(i, o), u = r.getParameter(r.MAX_TEXTURE_SIZE), c = Math.ceil(i.x / u), h = Math.ceil(i.y / u), d = i.lon[0], f = (i.lon[1] - d) / (i.x - 1) * c, v = Math.floor(i.x / c);
1415
- e.u_data_lon = [d - f / 2, d + f * (v - 0.5)];
1416
- const y = i.lat[0], A = (i.lat[1] - y) / (i.y - 1) * h, I = Math.floor(i.y / h);
1417
- e.u_data_lat = [y - A / 2, y + A * (I - 0.5)];
1418
- const g = Math.round(e.u_data_lon[1] - e.u_data_lon[0]) === 360;
1414
+ const l = nn(i, o), u = r.getParameter(r.MAX_TEXTURE_SIZE), c = Math.ceil(i.x / u), h = Math.ceil(i.y / u), d = i.lon[0], f = (i.lon[1] - d) / (i.x - 1) * c, m = Math.floor(i.x / c);
1415
+ e.u_data_lon = [d - f / 2, d + f * (m - 0.5)];
1416
+ const v = i.lat[0], R = (i.lat[1] - v) / (i.y - 1) * h, C = Math.floor(i.y / h);
1417
+ e.u_data_lat = [v - R / 2, v + R * (C - 0.5)];
1418
+ const b = Math.round(e.u_data_lon[1] - e.u_data_lon[0]) === 360;
1419
1419
  if (l === "uint") {
1420
- const T = i;
1421
- if (T.zeroNaN || T.data.BYTES_PER_ELEMENT > 1 ? (e.u_data00 = sr(r, T, n, g, c, h), e.u_data00_info = k(T.reference, T.scale, T.data.BYTES_PER_ELEMENT * 8)) : (e.u_data00 = ir(r, T, n, g, c, h), e.u_data00_info = [T.reference, T.scale * 255]), s) {
1422
- const S = s;
1423
- S.zeroNaN || S.data.BYTES_PER_ELEMENT > 1 ? (e.u_data01 = sr(r, S, n, g, c, h), e.u_data01_info = k(S.reference, S.scale, S.data.BYTES_PER_ELEMENT * 8)) : (e.u_data01 = ir(r, S, n, g, c, h), e.u_data01_info = [S.reference, S.scale * 255]);
1420
+ const L = i;
1421
+ if (L.zeroNaN || L.data.BYTES_PER_ELEMENT > 1 ? (e.u_data00 = br(r, L, n, b, c, h), e.u_data00_info = B(L.reference, L.scale, L.data.BYTES_PER_ELEMENT * 8)) : (e.u_data00 = gr(r, L, n, b, c, h), e.u_data00_info = [L.reference, L.scale * 255]), s) {
1422
+ const M = s;
1423
+ M.zeroNaN || M.data.BYTES_PER_ELEMENT > 1 ? (e.u_data01 = br(r, M, n, b, c, h), e.u_data01_info = B(M.reference, M.scale, M.data.BYTES_PER_ELEMENT * 8)) : (e.u_data01 = gr(r, M, n, b, c, h), e.u_data01_info = [M.reference, M.scale * 255]);
1424
1424
  }
1425
1425
  } else if (l === "float")
1426
- e.u_data00 = o ? cr(r, i, n, g, c, h) : lr(r, i, n, g, c, h), s && (e.u_data01 = o ? cr(r, s, n, g, c, h) : lr(r, s, n, g, c, h));
1426
+ e.u_data00 = o ? Cr(r, i, n, b, c, h) : Ir(r, i, n, b, c, h), s && (e.u_data01 = o ? Cr(r, s, n, b, c, h) : Ir(r, s, n, b, c, h));
1427
1427
  else
1428
1428
  throw new Error(`Unknown data texture type: ${l}`);
1429
- function k(T, S, R) {
1430
- return [(1 << R - 1) * S + T, S];
1429
+ function B(L, M, T) {
1430
+ return [(1 << T - 1) * M + L, M];
1431
1431
  }
1432
1432
  }
1433
- function Kr(r, e) {
1433
+ function on(r, e) {
1434
1434
  r.u_bound = e ? [e.lon[0], Math.min(e.lat[0], e.lat[1]), e.lon[1], Math.max(e.lat[0], e.lat[1])] : void 0;
1435
1435
  }
1436
- function Or(r, e) {
1437
- r.u_elevation = (e.elevation ?? 0) / bo;
1436
+ function an(r, e) {
1437
+ r.u_elevation = (e.elevation ?? 0) / _o;
1438
1438
  }
1439
- function xo(r, e) {
1439
+ function Bo(r, e) {
1440
1440
  r.u_opacity = (e == null ? void 0 : e.opacity) ?? 1, r.u_data_bound = [(e == null ? void 0 : e.min) ?? -1e8, (e == null ? void 0 : e.max) ?? 1e8];
1441
1441
  }
1442
- var Eo = H("I2luY2x1ZGUgPGhlYWRlcl92ZXJ0ZXg+DQojaW5jbHVkZSA8ZGVmaW5lPg0KdW5pZm9ybSBtYXQ0IHVfbWF0cml4Ow0KdW5pZm9ybSBmbG9hdCB1X2VsZXZhdGlvbjsNCmluIHZlYzIgYV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nN0YW50Pg0KI2luY2x1ZGUgPHByb2plY3Rpb24+DQojaW5jbHVkZSA8dXNlX2NvbG9yPg0KI2luY2x1ZGUgPHVzZV9kaXNwbGF5Pg0KI2luY2x1ZGUgPHVzZV9ib3VuZD4NCiNpbmNsdWRlIDx1c2VfbWFzaz4NCiNpbmNsdWRlIDxkYXRhX2dyaWQ+DQppbiBoaWdocCB2ZWMyIHZfcG9zOw0Kb3V0IGxvd3AgdmVjNCBvX2NvbG9yOw0Kdm9pZCBtYWluKCkgew0KICAgICNpZmRlZiBVU0VfTUFTSw0KICAgIGlmIChpbnZhbGlkTWFzaygpKWRpc2NhcmQ7DQogICAgI2VuZGlmDQogICAgI2lmZGVmIEdMT0JFDQogICAgdmVjMiBsb25MYXQgPSBzaW1wbGVMb25MYXQodl9wb3MpOw0KICAgICNlbHNlDQogICAgdmVjMiBsb25MYXQgPSBtZXJjYXRvclJldmVyc2UoZnJhY3Qodl9wb3MpKTsNCiAgICAjZW5kaWYNCiAgICBpZiAoaW52YWxpZEJvdW5kKGxvbkxhdCkgfHwgaW52YWxpZERhdGFCb3VuZChsb25MYXQpKWRpc2NhcmQ7DQogICAgZmxvYXQgdmFsID0gcmVhZERhdGEobG9uTGF0KTsNCiAgICBpZiAoaW52YWxpZERpc3BsYXkodmFsKSlkaXNjYXJkOw0KICAgIG9fY29sb3IgPSByZWFkQ29sb3IodmFsKSAqIHVfb3BhY2l0eTsNCn0NCg=="), Zo = {
1443
1443
  color: [],
1444
1444
  dataFilter: "linear",
1445
1445
  min: void 0,
1446
1446
  max: void 0,
1447
1447
  elevation: 0,
1448
1448
  opacity: 1
1449
- }, te, be, re, ne, ze, F, j, q, Ve, Q, Ur, Pt, Xt, Qr, Wt, Cr, To = (Cr = class extends Nr {
1449
+ }, ae, Ce, ie, se, Ue, W, ee, ne, De, $, sn, er, tr, ln, rr, Vr, Go = (Vr = class extends jr {
1450
1450
  constructor(e) {
1451
1451
  super(e);
1452
- E(this, Q);
1453
- E(this, te);
1454
- E(this, be);
1455
- E(this, re);
1456
- E(this, ne);
1457
- E(this, ze);
1452
+ A(this, $);
1453
+ A(this, ae);
1454
+ A(this, Ce);
1455
+ A(this, ie);
1456
+ A(this, se);
1457
+ A(this, Ue);
1458
1458
  // current,next
1459
- E(this, F, null);
1460
- E(this, j, null);
1461
- E(this, q);
1459
+ A(this, W, null);
1460
+ A(this, ee, null);
1461
+ A(this, ne);
1462
1462
  // transition
1463
- E(this, Ve, 0);
1464
- C(this, q, {}), C(this, ne, Object.assign({}, Ro, e)), C(this, ze, e.useLog ?? !1);
1463
+ A(this, De, 0);
1464
+ E(this, ne, {}), E(this, se, Object.assign({}, Zo, e)), E(this, Ue, e.useLog ?? !1);
1465
1465
  }
1466
1466
  /**
1467
1467
  * @internal
1468
1468
  */
1469
1469
  onAdd(e, t) {
1470
- C(this, te, e), C(this, be, e.renderFactory);
1470
+ E(this, ae, e), E(this, Ce, e.renderFactory);
1471
1471
  const n = e.getSource(this.source);
1472
1472
  if (!n)
1473
1473
  throw new Error(`The source(id:${this.source}) not found!`);
1474
- C(this, re, n), n.on("data", ({ data: o }) => w(this, Q, Wt).call(this, o)), w(this, Q, Pt).call(this, a(this, ne), !0), w(this, Q, Wt).call(this, n.lastData());
1474
+ E(this, ie, n), n.on("data", ({ data: o }) => S(this, $, rr).call(this, o)), S(this, $, er).call(this, a(this, se), !0), S(this, $, rr).call(this, n.lastData());
1475
1475
  }
1476
1476
  /**
1477
1477
  * @internal
1478
1478
  */
1479
1479
  onRemove(e, t) {
1480
- a(this, F) && (a(this, re).unlink(a(this, F)), C(this, F, null)), a(this, j) && (a(this, re).unlink(a(this, j)), C(this, j, null)), a(this, q).u_color && t.deleteTexture(a(this, q).u_color);
1480
+ a(this, W) && (a(this, ie).unlink(a(this, W)), E(this, W, null)), a(this, ee) && (a(this, ie).unlink(a(this, ee)), E(this, ee, null)), a(this, ne).u_color && t.deleteTexture(a(this, ne).u_color);
1481
1481
  }
1482
1482
  /**
1483
1483
  * @internal
1484
1484
  */
1485
1485
  render(e, t) {
1486
- if (!a(this, F)) return;
1487
- const n = a(this, ne).dataFilter, o = a(this, ze), i = a(this, Ve) - Date.now(), s = t.shaderData.variantName;
1486
+ if (!a(this, W)) return;
1487
+ const n = a(this, se).dataFilter, o = a(this, Ue), i = a(this, De) - Date.now(), s = t.shaderData.variantName;
1488
1488
  let l;
1489
1489
  if (i > 0) {
1490
- a(this, q).u_transition = i / (a(this, ne).transition ?? a(this, te).transition);
1491
- const c = ht(e, a(this, F), n, o), h = ht(e, a(this, j), n, o);
1492
- l = w(this, Q, Xt).call(this, s, c, h), Object.assign(a(this, q), c.uniforms);
1490
+ a(this, ne).u_transition = i / (a(this, se).transition ?? a(this, ae).transition);
1491
+ const c = bt(e, a(this, W), n, o), h = bt(e, a(this, ee), n, o);
1492
+ l = S(this, $, tr).call(this, s, c, h), Object.assign(a(this, ne), c.uniforms);
1493
1493
  for (let d in h.uniforms)
1494
- a(this, q)[d.replace("u_data0", "u_data1")] = h.uniforms[d];
1495
- a(this, te).triggerRepaint();
1494
+ a(this, ne)[d.replace("u_data0", "u_data1")] = h.uniforms[d];
1495
+ a(this, ae).triggerRepaint();
1496
1496
  } else {
1497
- C(this, Ve, 0), C(this, j, null);
1498
- const c = ht(e, a(this, F), n, o);
1499
- l = w(this, Q, Xt).call(this, s, c), Object.assign(a(this, q), c.uniforms);
1497
+ E(this, De, 0), E(this, ee, null);
1498
+ const c = bt(e, a(this, W), n, o);
1499
+ l = S(this, $, tr).call(this, s, c), Object.assign(a(this, ne), c.uniforms);
1500
1500
  }
1501
- a(this, q).u_matrix = w(this, Q, Ur).call(this, t), e.useProgram(l.program), e.enable(e.CULL_FACE), ut(l, a(this, q));
1502
- const u = a(this, be).vao(s, () => w(this, Q, Qr).call(this, e, s, l));
1503
- Zt(u);
1501
+ a(this, ne).u_matrix = S(this, $, sn).call(this, t), e.useProgram(l.program), e.enable(e.CULL_FACE), yt(l, a(this, ne));
1502
+ const u = a(this, Ce).vao(s, () => S(this, $, ln).call(this, e, s, l));
1503
+ Qt(u);
1504
1504
  }
1505
1505
  setOptions(e) {
1506
1506
  var t;
1507
- w(this, Q, Pt).call(this, e, e.color !== void 0 && Yr((t = a(this, ne)) == null ? void 0 : t.color, e.color)), a(this, te).triggerRepaint();
1507
+ S(this, $, er).call(this, e, e.color !== void 0 && Jr((t = a(this, se)) == null ? void 0 : t.color, e.color)), a(this, ae).triggerRepaint();
1508
1508
  }
1509
- }, te = new WeakMap(), be = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), ze = new WeakMap(), F = new WeakMap(), j = new WeakMap(), q = new WeakMap(), Ve = new WeakMap(), Q = new WeakSet(), Ur = function({ shaderData: e, defaultProjectionData: t }) {
1510
- const n = e.variantName === "globe", { mainMatrix: o } = n ? a(this, te).transform.getProjectionData({ overscaledTileID: null, applyGlobeMatrix: !0 }) : t;
1509
+ }, ae = new WeakMap(), Ce = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), Ue = new WeakMap(), W = new WeakMap(), ee = new WeakMap(), ne = new WeakMap(), De = new WeakMap(), $ = new WeakSet(), sn = function({ shaderData: e, defaultProjectionData: t }) {
1510
+ const n = e.variantName === "globe", { mainMatrix: o } = n ? a(this, ae).transform.getProjectionData({ overscaledTileID: null, applyGlobeMatrix: !0 }) : t;
1511
1511
  return o;
1512
- }, Pt = function(e, t) {
1513
- const n = a(this, ne), o = a(this, q);
1514
- t && e.color && zr(a(this, te).painter.context.gl, o, e.color, a(this, ze)), C(this, ne, Object.assign(n, e)), xo(o, n), Kr(o, n.bound), Or(o, n);
1515
- }, Xt = function(e, t, n) {
1516
- const { number: o, type: i } = t, s = n !== void 0, l = `heatmap:${e}-${o}-${i + (s ? "-" + n.type : "")}-${a(this, ne).mask ? "mask" : "unmask"}`, u = e === "globe";
1517
- return a(this, be).program(
1512
+ }, er = function(e, t) {
1513
+ const n = a(this, se), o = a(this, ne);
1514
+ t && e.color && rn(a(this, ae).painter.context.gl, o, e.color, a(this, Ue)), E(this, se, Object.assign(n, e)), Bo(o, n), on(o, n.bound), an(o, n);
1515
+ }, tr = function(e, t, n) {
1516
+ const { number: o, type: i } = t, s = n !== void 0, l = `heatmap:${e}-${o}-${i + (s ? "-" + n.type : "")}-${a(this, se).mask ? "mask" : "unmask"}`, u = e === "globe";
1517
+ return a(this, Ce).program(
1518
1518
  l,
1519
- () => a(this, be).vertex("heatmap:" + e, Eo, () => u ? "#define GLOBE" : ""),
1520
- () => a(this, be).fragment(
1519
+ () => a(this, Ce).vertex("heatmap:" + e, Do, () => u ? "#define GLOBE" : ""),
1520
+ () => a(this, Ce).fragment(
1521
1521
  l,
1522
- Ao,
1522
+ No,
1523
1523
  () => {
1524
1524
  const c = [];
1525
1525
  if (u && c.push("GLOBE"), c.push(o === 1 ? "DATA_GRID" : "DATA_GRID_UV"), i === "uint" ? c.push("DATA0_UINT") : i === "float" && c.push("DATA0_FLOAT"), s) {
@@ -1531,61 +1531,61 @@ var Eo = H("I2luY2x1ZGUgPGhlYWRlcl92ZXJ0ZXg+DQojaW5jbHVkZSA8ZGVmaW5lPg0KdW5pZm9y
1531
1531
  }
1532
1532
  )
1533
1533
  );
1534
- }, Qr = function(e, t, n) {
1535
- const o = a(this, be).buffer(
1534
+ }, ln = function(e, t, n) {
1535
+ const o = a(this, Ce).buffer(
1536
1536
  t,
1537
- () => t === "globe" ? to(e) : $t(e, {
1537
+ () => t === "globe" ? po(e) : cr(e, {
1538
1538
  a_pos: { size: 2, data: new Int8Array([-3, 0, -3, 1, 4, 0, 4, 1]), type: e.BYTE }
1539
1539
  })
1540
1540
  );
1541
- return Dt(e, n, o, e.TRIANGLE_STRIP);
1542
- }, Wt = function(e) {
1541
+ return Ut(e, n, o, e.TRIANGLE_STRIP);
1542
+ }, rr = function(e) {
1543
1543
  if (!e) {
1544
- a(this, j) && (a(this, re).unlink(a(this, j)), C(this, j, null)), a(this, F) && (a(this, re).unlink(a(this, F)), C(this, F, null), a(this, te).triggerRepaint());
1544
+ a(this, ee) && (a(this, ie).unlink(a(this, ee)), E(this, ee, null)), a(this, W) && (a(this, ie).unlink(a(this, W)), E(this, W, null), a(this, ae).triggerRepaint());
1545
1545
  return;
1546
1546
  }
1547
- if (a(this, F)) {
1548
- const t = a(this, ne).transition ?? a(this, te).transition;
1549
- t === 0 ? a(this, re).unlink(a(this, F)) : (a(this, j) && a(this, re).unlink(a(this, j)), Mr(a(this, F), e) ? (C(this, j, a(this, F)), C(this, Ve, Date.now() + t)) : (a(this, re).unlink(a(this, F)), C(this, Ve, 0)));
1547
+ if (a(this, W)) {
1548
+ const t = a(this, se).transition ?? a(this, ae).transition;
1549
+ t === 0 ? a(this, ie).unlink(a(this, W)) : (a(this, ee) && a(this, ie).unlink(a(this, ee)), zr(a(this, W), e) ? (E(this, ee, a(this, W)), E(this, De, Date.now() + t)) : (a(this, ie).unlink(a(this, W)), E(this, De, 0)));
1550
1550
  }
1551
- a(this, re).link(e), C(this, F, e), a(this, te).triggerRepaint();
1552
- }, Cr), Lo = "text-tile";
1553
- function wo(r) {
1551
+ a(this, ie).link(e), E(this, W, e), a(this, ae).triggerRepaint();
1552
+ }, Vr), Yo = "text-tile";
1553
+ function Fo(r) {
1554
1554
  return r.data.BYTES_PER_ELEMENT <= 2;
1555
1555
  }
1556
- function jr(r, e, t, n, o, i, s, l) {
1556
+ function cn(r, e, t, n, o, i, s, l) {
1557
1557
  const u = Math.round((l - i[0]) / n);
1558
1558
  if (u < 0 || u >= e) return -1;
1559
1559
  s - o[0] >= 360 && (s -= 360), o[1] - s >= 360 && (s += 360);
1560
1560
  const c = Math.round((s - o[0]) / t);
1561
1561
  return c < 0 || c >= r ? -1 : u * r + c;
1562
1562
  }
1563
- function Jr(r, e) {
1563
+ function un(r, e) {
1564
1564
  if (e < 0) return NaN;
1565
1565
  {
1566
1566
  let t = r.data[e];
1567
- return wo(r) && (t = r.zeroNaN && t === 0 ? NaN : r.reference + r.scale * t), t;
1567
+ return Fo(r) && (t = r.zeroNaN && t === 0 ? NaN : r.reference + r.scale * t), t;
1568
1568
  }
1569
1569
  }
1570
- function Re(r, e) {
1570
+ function Le(r, e) {
1571
1571
  const { x: t, y: n, lon: o, lat: i } = r, s = new Float32Array(e.length), l = (o[1] - o[0]) / (t - 1), u = (i[1] - i[0]) / (n - 1);
1572
1572
  for (let c = 0; c < e.length; c++) {
1573
- const [h, d] = e[c], p = jr(t, n, l, u, o, i, h, d);
1574
- s[c] = Jr(r, p);
1573
+ const [h, d] = e[c], p = cn(t, n, l, u, o, i, h, d);
1574
+ s[c] = un(r, p);
1575
1575
  }
1576
1576
  return s;
1577
1577
  }
1578
- function st(r, e, t) {
1578
+ function pt(r, e, t) {
1579
1579
  const { x: n, y: o, lon: i, lat: s } = r, l = new Float32Array(e.length * t.length), u = (i[1] - i[0]) / (n - 1), c = (s[1] - s[0]) / (o - 1);
1580
1580
  let h = 0;
1581
1581
  for (const d of t)
1582
1582
  for (const p of e) {
1583
- const f = jr(n, o, u, c, i, s, p, d);
1584
- l[h++] = Jr(r, f);
1583
+ const f = cn(n, o, u, c, i, s, p, d);
1584
+ l[h++] = un(r, f);
1585
1585
  }
1586
1586
  return l;
1587
1587
  }
1588
- var So = {
1588
+ var Po = {
1589
1589
  // color: 'white',
1590
1590
  color: (r) => "#fff",
1591
1591
  min: void 0,
@@ -1595,67 +1595,67 @@ var So = {
1595
1595
  convert: (r) => r.toFixed(1),
1596
1596
  font: "24px Arial",
1597
1597
  align: "center"
1598
- }, X, Rt, $r, xr, _o = (xr = class extends Jt {
1598
+ }, z, kt, dn, Br, Xo = (Br = class extends lr {
1599
1599
  constructor(e) {
1600
1600
  super(e);
1601
- E(this, Rt);
1602
- E(this, X);
1601
+ A(this, kt);
1602
+ A(this, z);
1603
1603
  /**
1604
1604
  * @internal
1605
1605
  */
1606
- b(this, "loadTile", async (e, t) => {
1606
+ g(this, "loadTile", async (e, t) => {
1607
1607
  var o, i;
1608
- const n = w(this, Rt, $r).call(this, e, t);
1609
- return n ? this.renderFactory.exec(Lo, {
1608
+ const n = S(this, kt, dn).call(this, e, t);
1609
+ return n ? this.renderFactory.exec(Yo, {
1610
1610
  canvas: { type: "2d", size: this.tileSize * 2 },
1611
1611
  data: {
1612
- font: a(this, X).font,
1613
- align: a(this, X).align,
1614
- opacity: a(this, X).opacity,
1615
- convert: (o = a(this, X).convert) == null ? void 0 : o.toString(),
1616
- color: typeof a(this, X).color == "string" ? a(this, X).color : (i = a(this, X).color) == null ? void 0 : i.toString(),
1612
+ font: a(this, z).font,
1613
+ align: a(this, z).align,
1614
+ opacity: a(this, z).opacity,
1615
+ convert: (o = a(this, z).convert) == null ? void 0 : o.toString(),
1616
+ color: typeof a(this, z).color == "string" ? a(this, z).color : (i = a(this, z).color) == null ? void 0 : i.toString(),
1617
1617
  data: n
1618
1618
  }
1619
1619
  }, [n]) : null;
1620
1620
  });
1621
- b(this, "setOptions", (e) => {
1622
- C(this, X, Object.assign(a(this, X), e)), super.setOptions(e);
1621
+ g(this, "setOptions", (e) => {
1622
+ E(this, z, Object.assign(a(this, z), e)), super.setOptions(e);
1623
1623
  });
1624
- C(this, X, Object.assign({}, So, e));
1624
+ E(this, z, Object.assign({}, Po, e));
1625
1625
  }
1626
- }, X = new WeakMap(), Rt = new WeakSet(), $r = function(e, t) {
1627
- const { bound: n } = a(this, X), o = Array.isArray(this.data0) ? this.data0[0] : this.data0, i = Br(e, o, a(this, X).cell, n);
1626
+ }, z = new WeakMap(), kt = new WeakSet(), dn = function(e, t) {
1627
+ const { bound: n } = a(this, z), o = Array.isArray(this.data0) ? this.data0[0] : this.data0, i = Kr(e, o, a(this, z).cell, n);
1628
1628
  if (i.length === 0) return null;
1629
1629
  const s = h(this.data0, i);
1630
1630
  if (t > 0) {
1631
1631
  const d = t, p = 1 - d, f = h(this.data1, i);
1632
- for (let v = 0; v < s.length; v++)
1633
- s[v] = p * s[v] + d * f[v];
1632
+ for (let m = 0; m < s.length; m++)
1633
+ s[m] = p * s[m] + d * f[m];
1634
1634
  }
1635
- const l = [], u = a(this, X).min, c = a(this, X).max;
1635
+ const l = [], u = a(this, z).min, c = a(this, z).max;
1636
1636
  for (let d = 0; d < s.length; d++) {
1637
1637
  const p = s[d];
1638
1638
  if (isNaN(p) || p < u || p > c) continue;
1639
- const [f, v] = Dr(e, i[d]);
1640
- l.push(f, v, p);
1639
+ const [f, m] = Or(e, i[d]);
1640
+ l.push(f, m, p);
1641
1641
  }
1642
1642
  return l.length > 0 ? new Float32Array(l).buffer : null;
1643
1643
  function h(d, p) {
1644
- if (!Array.isArray(d)) return Re(d, p);
1645
- if (d.length === 1) return Re(d[0], p);
1646
- const f = Re(d[0], p), v = Re(d[1], p);
1647
- for (let y = 0; y < f.length; y++)
1648
- f[y] = Math.hypot(f[y], v[y]);
1644
+ if (!Array.isArray(d)) return Le(d, p);
1645
+ if (d.length === 1) return Le(d[0], p);
1646
+ const f = Le(d[0], p), m = Le(d[1], p);
1647
+ for (let v = 0; v < f.length; v++)
1648
+ f[v] = Math.hypot(f[v], m[v]);
1649
1649
  return f;
1650
1650
  }
1651
- }, xr), ko = "vector-init-image", Mo = "vector-tile-image", Vo = "vector-tile-arrow";
1652
- function qr(r, ...e) {
1651
+ }, Br), Wo = "vector-init-image", zo = "vector-tile-image", Ho = "vector-tile-arrow";
1652
+ function hn(r, ...e) {
1653
1653
  for (const t of e)
1654
1654
  for (const [n, o] of Object.entries(t))
1655
- o !== void 0 && (r[n] = Array.isArray(o) || typeof o != "object" || o.byteLength !== void 0 ? o : qr(r[n] ?? {}, o));
1655
+ o !== void 0 && (r[n] = Array.isArray(o) || typeof o != "object" || o.byteLength !== void 0 ? o : hn(r[n] ?? {}, o));
1656
1656
  return r;
1657
1657
  }
1658
- var Bo = {
1658
+ var Ko = {
1659
1659
  type: "uv",
1660
1660
  image: void 0,
1661
1661
  level: [],
@@ -1664,7 +1664,7 @@ var Bo = {
1664
1664
  opacity: 1,
1665
1665
  cell: 6,
1666
1666
  flip: !1
1667
- }, Do = {
1667
+ }, Oo = {
1668
1668
  type: "uv",
1669
1669
  color: "white",
1670
1670
  min: void 0,
@@ -1675,211 +1675,211 @@ var Bo = {
1675
1675
  font: "36px serif",
1676
1676
  text: "↓"
1677
1677
  }
1678
- }, Zo = /* @__PURE__ */ new Set(), D, rt, Tt, en, Er, Go = (Er = class extends Jt {
1678
+ }, Uo = /* @__PURE__ */ new Set(), Y, lt, Mt, fn, Dr, Qo = (Dr = class extends lr {
1679
1679
  constructor(e) {
1680
1680
  super(e);
1681
- E(this, Tt);
1682
- E(this, D);
1683
- E(this, rt, null);
1681
+ A(this, Mt);
1682
+ A(this, Y);
1683
+ A(this, lt, null);
1684
1684
  /**
1685
1685
  * @internal
1686
1686
  */
1687
- b(this, "loadTile", async (e, t) => {
1688
- const n = a(this, D).type, o = w(this, Tt, en).call(this, e, n, t);
1687
+ g(this, "loadTile", async (e, t) => {
1688
+ const n = a(this, Y).type, o = S(this, Mt, fn).call(this, e, n, t);
1689
1689
  if (!o) return null;
1690
1690
  const i = { type: "2d", size: this.tileSize * 2 };
1691
- return a(this, D).image ? a(this, rt).then(() => this.renderFactory.exec(
1692
- Mo,
1691
+ return a(this, Y).image ? a(this, lt).then(() => this.renderFactory.exec(
1692
+ zo,
1693
1693
  {
1694
1694
  cache: "vector",
1695
1695
  canvas: i,
1696
1696
  data: {
1697
1697
  type: n,
1698
- color: a(this, D).color,
1699
- image: a(this, D).image,
1700
- level: a(this, D).level,
1701
- flip: a(this, D).flip,
1702
- opacity: a(this, D).opacity,
1698
+ color: a(this, Y).color,
1699
+ image: a(this, Y).image,
1700
+ level: a(this, Y).level,
1701
+ flip: a(this, Y).flip,
1702
+ opacity: a(this, Y).opacity,
1703
1703
  data: o
1704
1704
  }
1705
1705
  },
1706
1706
  [o]
1707
1707
  )) : this.renderFactory.exec(
1708
- Vo,
1708
+ Ho,
1709
1709
  {
1710
1710
  canvas: i,
1711
1711
  data: {
1712
1712
  type: n,
1713
- color: a(this, D).color,
1714
- opacity: a(this, D).opacity,
1715
- flip: a(this, D).flip,
1716
- arrow: a(this, D).arrow,
1713
+ color: a(this, Y).color,
1714
+ opacity: a(this, Y).opacity,
1715
+ flip: a(this, Y).flip,
1716
+ arrow: a(this, Y).arrow,
1717
1717
  data: o
1718
1718
  }
1719
1719
  },
1720
1720
  [o]
1721
1721
  );
1722
1722
  });
1723
- b(this, "setOptions", (e) => {
1724
- C(this, D, Object.assign(a(this, D), e)), super.setOptions(e);
1723
+ g(this, "setOptions", (e) => {
1724
+ E(this, Y, Object.assign(a(this, Y), e)), super.setOptions(e);
1725
1725
  });
1726
- C(this, D, qr({}, e.image ? Bo : Do, e));
1726
+ E(this, Y, hn({}, e.image ? Ko : Oo, e));
1727
1727
  }
1728
1728
  /**
1729
1729
  * @internal
1730
1730
  */
1731
1731
  onAdd(e) {
1732
- if (super.onAdd(e), a(this, D).image) {
1733
- const t = a(this, D).image.src;
1734
- Zo.add(t);
1732
+ if (super.onAdd(e), a(this, Y).image) {
1733
+ const t = a(this, Y).image.src;
1734
+ Uo.add(t);
1735
1735
  let n;
1736
- C(this, rt, new Promise((o) => n = o)), fetch(t).then((o) => o.blob()).then((o) => this.renderFactory.execAll(ko, {
1736
+ E(this, lt, new Promise((o) => n = o)), fetch(t).then((o) => o.blob()).then((o) => this.renderFactory.execAll(Wo, {
1737
1737
  cache: "vector",
1738
1738
  data: { name: t, blob: o }
1739
1739
  })).then(() => n());
1740
1740
  }
1741
1741
  }
1742
- }, D = new WeakMap(), rt = new WeakMap(), Tt = new WeakSet(), en = function(e, t, n) {
1743
- const { bound: o } = a(this, D), i = Array.isArray(this.data0) ? this.data0[0] : this.data0, s = Br(e, i, a(this, D).cell, o);
1742
+ }, Y = new WeakMap(), lt = new WeakMap(), Mt = new WeakSet(), fn = function(e, t, n) {
1743
+ const { bound: o } = a(this, Y), i = Array.isArray(this.data0) ? this.data0[0] : this.data0, s = Kr(e, i, a(this, Y).cell, o);
1744
1744
  if (s.length === 0) return null;
1745
1745
  const l = p(this.data0, s), u = t === "uv";
1746
1746
  if (n > 0) {
1747
- const f = n, v = 1 - f, y = p(this.data1, s);
1747
+ const f = n, m = 1 - f, v = p(this.data1, s);
1748
1748
  if (u)
1749
1749
  for (let x = 0; x < l.length; x++)
1750
- l[x] = v * l[x] + f * y[x];
1750
+ l[x] = m * l[x] + f * v[x];
1751
1751
  else
1752
1752
  for (let x = 0; x < l.length; x++) {
1753
- let A = y[x] - l[x];
1754
- A > 180 && (A -= 360), A < -180 && (A += 360), l[x] = l[x] + v * A;
1753
+ let R = v[x] - l[x];
1754
+ R > 180 && (R -= 360), R < -180 && (R += 360), l[x] = l[x] + m * R;
1755
1755
  }
1756
1756
  }
1757
- const c = [], h = a(this, D).min, d = a(this, D).max;
1757
+ const c = [], h = a(this, Y).min, d = a(this, Y).max;
1758
1758
  for (let f = 0; f < s.length; f++) {
1759
- const v = l[2 * f], y = l[2 * f + 1], x = u ? Math.hypot(v, y) : v;
1759
+ const m = l[2 * f], v = l[2 * f + 1], x = u ? Math.hypot(m, v) : m;
1760
1760
  if (isNaN(x) || x < h || x > d) continue;
1761
- const [A, I] = Dr(e, s[f]);
1762
- c.push(A, I, v, y);
1761
+ const [R, C] = Or(e, s[f]);
1762
+ c.push(R, C, m, v);
1763
1763
  }
1764
1764
  return c.length > 0 ? new Float32Array(c).buffer : null;
1765
- function p(f, v) {
1766
- let y, x;
1767
- Array.isArray(f) ? f.length === 1 ? y = Re(f[0], v) : (y = Re(f[0], v), x = Re(f[1], v)) : y = Re(f, v);
1768
- const A = new Float32Array(y.length * 2);
1769
- for (let I = 0; I < y.length; I++)
1770
- A[2 * I] = y[I], x && (A[2 * I + 1] = x[I]);
1771
- return A;
1772
- }
1773
- }, Er), No = H("I2luY2x1ZGUgPGhlYWRlcl92ZXJ0ZXg+DQojaW5jbHVkZSA8ZGVmaW5lPg0KI2luY2x1ZGUgPGNvbnN0YW50Pg0KI2luY2x1ZGUgPHByb2plY3Rpb24+DQojaW5jbHVkZSA8dXNlX2Rpc3BsYXk+D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0NCg=="), ue = {
1765
+ function p(f, m) {
1766
+ let v, x;
1767
+ Array.isArray(f) ? f.length === 1 ? v = Le(f[0], m) : (v = Le(f[0], m), x = Le(f[1], m)) : v = Le(f, m);
1768
+ const R = new Float32Array(v.length * 2);
1769
+ for (let C = 0; C < v.length; C++)
1770
+ R[2 * C] = v[C], x && (R[2 * C + 1] = x[C]);
1771
+ return R;
1772
+ }
1773
+ }, Dr), jo = O("I2luY2x1ZGUgPGhlYWRlcl92ZXJ0ZXg+DQojaW5jbHVkZSA8ZGVmaW5lPg0KI2luY2x1ZGUgPGNvbnN0YW50Pg0KI2luY2x1ZGUgPHByb2plY3Rpb24+DQojaW5jbHVkZSA8dXNlX2Rpc3BsYXk+DQojaW5jbHVkZSA8dXNlX2JvdW5kPg0KI2luY2x1ZGUgPHVzZV9tYXNrPg0KI2luY2x1ZGUgPGRhdGFfZ3JpZD4NCnVuaWZvcm0gbWF0NCB1X21hdHJpeDsNCnVuaWZvcm0gbWF0NCB1X21hdHJpeF9pbnZlcnNlOw0KdW5pZm9ybSBmbG9hdCB1X2VsZXZhdGlvbjsNCnVuaWZvcm0gZmxvYXQgdV9zcGVlZDsNCnVuaWZvcm0gZmxvYXQgdV9zY2FsZTsNCg0KaW4gdmVjNCBhX2RhdGE7DQpvdXQgdmVjNCB2X2RhdGE7DQoNCiNpZmRlZiBHTE9CRQ0KdmVjMyB0aWxlKHZlYzMgcCkgew0KICAgIHZlYzQgcDAgPSB1X21hdHJpeF9pbnZlcnNlICogdmVjNChwLnh5LCBGMCwgRjEpOw0KICAgIHZlYzQgcDEgPSB1X21hdHJpeF9pbnZlcnNlICogdmVjNChwLnh5LCBGMSwgRjEpOw0KICAgIHAwID0gcDAgLyBwMC53Ow0KICAgIHAxID0gcDEgLyBwMS53Ow0KICAgIHZlYzMgTyA9IHAwLnh5ejsNCiAgICB2ZWMzIEQgPSBwMS54eXogLSBPOw0KICAgIGZsb2F0IHIgPSBGMSArIHAuejsNCiAgICBmbG9hdCB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gZ2xfUG9zaXRpb24gPSB2ZWM0KGFfcG9zLCAwLjAsIDEuMCk7DQogICAgdl9wb3MgPSBhX3BvcyAqIC41ICsgLjU7DQp9DQo="), qo = O("I2luY2x1ZGUgPGhlYWRlcl9mcmFnbWVudD4NCnByZWNpc2lvbiBtZWRpdW1wIGZsb2F0Ow0KdW5pZm9ybSBsb3dwIHNhbXBsZXIyRCB1X2ZyYW1lOw0KaW4gdmVjMiB2X3BvczsNCm91dCB2ZWM0IG9fY29sb3I7DQp2b2lkIG1haW4oKSB7DQogICAgb19jb2xvciA9IHRleHR1cmUodV9mcmFtZSwgdl9wb3MpOw0KICAgIGlmIChvX2NvbG9yLmEgPCAuNSkgZGlzY2FyZDsNCn0NCg=="), fe = {
1774
1774
  feedback: "particle-feedback",
1775
1775
  blend: "particle-blend",
1776
1776
  screen: "particle-screen",
1777
1777
  draw: "particle-draw"
1778
- }, Xo = {
1778
+ }, ea = {
1779
1779
  type: "uv",
1780
1780
  color: [],
1781
1781
  disappear: 1,
1782
1782
  size: 1,
1783
1783
  speed: 1,
1784
1784
  elevation: 0
1785
- }, fe, Y, He, J, pe, U, Ke, Ee, ee, W, _, tn, rn, nn, on, an, sn, ln, ft, cn, zt, Ht, Kt, un, dn, Ot, Ar, Wo = (Ar = class extends Nr {
1785
+ }, ve, P, Qe, te, ye, J, je, Te, oe, H, V, pn, mn, vn, yn, gn, bn, In, It, Cn, nr, or, ar, xn, En, ir, Nr, ta = (Nr = class extends jr {
1786
1786
  constructor(e) {
1787
1787
  super(e);
1788
- E(this, _);
1789
- E(this, fe);
1790
- E(this, Y);
1791
- E(this, He);
1792
- E(this, J);
1793
- E(this, pe, null);
1794
- E(this, U);
1795
- E(this, Ke, !1);
1796
- E(this, Ee);
1797
- E(this, ee);
1798
- E(this, W);
1799
- b(this, "visible", !0);
1800
- C(this, U, {}), C(this, J, Object.assign({}, Xo, e)), C(this, Ee, e.count ?? 8192), C(this, W, { width: 0, height: 0, buffer: null });
1788
+ A(this, V);
1789
+ A(this, ve);
1790
+ A(this, P);
1791
+ A(this, Qe);
1792
+ A(this, te);
1793
+ A(this, ye, null);
1794
+ A(this, J);
1795
+ A(this, je, !1);
1796
+ A(this, Te);
1797
+ A(this, oe);
1798
+ A(this, H);
1799
+ g(this, "visible", !0);
1800
+ E(this, J, {}), E(this, te, Object.assign({}, ea, e)), E(this, Te, e.count ?? 8192), E(this, H, { width: 0, height: 0, buffer: null });
1801
1801
  }
1802
1802
  /**
1803
1803
  * @internal
1804
1804
  */
1805
1805
  onAdd(e, t) {
1806
- C(this, fe, e), e.on("movestart", () => {
1807
- C(this, Ke, !0), w(this, _, Ot).call(this, t);
1808
- }), e.on("moveend", () => C(this, Ke, !1)), e.on("projectiontransition", () => w(this, _, Ot).call(this, t)), C(this, Y, e.renderFactory);
1806
+ E(this, ve, e), e.on("movestart", () => {
1807
+ E(this, je, !0), S(this, V, ir).call(this, t);
1808
+ }), e.on("moveend", () => E(this, je, !1)), e.on("projectiontransition", () => S(this, V, ir).call(this, t)), E(this, P, e.renderFactory);
1809
1809
  const n = e.getSource(this.source);
1810
1810
  if (!n) throw new Error(`The source(id:${this.source}) not found!`);
1811
- C(this, He, n), n.on("data", ({ data: o }) => w(this, _, Kt).call(this, o)), w(this, _, Ht).call(this, a(this, J), !0), w(this, _, Kt).call(this, n.lastData());
1811
+ E(this, Qe, n), n.on("data", ({ data: o }) => S(this, V, ar).call(this, o)), S(this, V, or).call(this, a(this, te), !0), S(this, V, ar).call(this, n.lastData());
1812
1812
  }
1813
1813
  /**
1814
1814
  * @internal
1815
1815
  */
1816
1816
  render(e, t) {
1817
- if (!a(this, pe) || a(this, Ke) || !this.visible) return;
1818
- w(this, _, tn).call(this, e);
1819
- const n = a(this, U), o = t.shaderData.variantName, i = ht(e, a(this, pe), "linear");
1820
- Object.assign(n, i.uniforms), w(this, _, dn).call(this, t);
1821
- const s = w(this, _, rn).call(this, o, i.type), l = w(this, _, nn).call(this), u = w(this, _, an).call(this), c = w(this, _, cn).call(this, e, s.program, u.program), h = a(this, Ee);
1822
- n.u_scale = 1 / 2 ** Math.max(1, a(this, fe).getZoom() - 1), e.useProgram(s.program), e.bindVertexArray(c.feedbackVao), ut(s, n), e.enable(e.RASTERIZER_DISCARD), e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, c.feedback), e.beginTransformFeedback(e.POINTS), e.drawArrays(e.POINTS, 0, h), e.endTransformFeedback(), e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, null), e.disable(e.RASTERIZER_DISCARD), e.bindFramebuffer(e.FRAMEBUFFER, a(this, W).buffer), e.useProgram(l.program), e.enable(e.BLEND), e.blendColor(0, 0, 0, n.u_disappear), e.blendFunc(e.ZERO, e.CONSTANT_ALPHA), Zt(w(this, _, on).call(this, e, l)), e.disable(e.BLEND), e.useProgram(u.program), e.bindVertexArray(c.drawVao), ut(u, n), e.drawArraysInstanced(e.TRIANGLE_STRIP, 0, 4, h), e.bindFramebuffer(e.FRAMEBUFFER, null);
1823
- const d = w(this, _, sn).call(this);
1824
- e.useProgram(d.program), ut(d, n), Zt(w(this, _, ln).call(this, e, d)), a(this, fe).triggerRepaint();
1817
+ if (!a(this, ye) || a(this, je) || !this.visible) return;
1818
+ S(this, V, pn).call(this, e);
1819
+ const n = a(this, J), o = t.shaderData.variantName, i = bt(e, a(this, ye), "linear");
1820
+ Object.assign(n, i.uniforms), S(this, V, En).call(this, t);
1821
+ const s = S(this, V, mn).call(this, o, i.type), l = S(this, V, vn).call(this), u = S(this, V, gn).call(this), c = S(this, V, Cn).call(this, e, s.program, u.program), h = a(this, Te);
1822
+ n.u_scale = 1 / 2 ** Math.max(1, a(this, ve).getZoom() - 1), e.useProgram(s.program), e.bindVertexArray(c.feedbackVao), yt(s, n), e.enable(e.RASTERIZER_DISCARD), e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, c.feedback), e.beginTransformFeedback(e.POINTS), e.drawArrays(e.POINTS, 0, h), e.endTransformFeedback(), e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, null), e.disable(e.RASTERIZER_DISCARD), e.bindFramebuffer(e.FRAMEBUFFER, a(this, H).buffer), e.useProgram(l.program), e.enable(e.BLEND), e.blendColor(0, 0, 0, n.u_disappear), e.blendFunc(e.ZERO, e.CONSTANT_ALPHA), Qt(S(this, V, yn).call(this, e, l)), e.disable(e.BLEND), e.useProgram(u.program), e.bindVertexArray(c.drawVao), yt(u, n), e.drawArraysInstanced(e.TRIANGLE_STRIP, 0, 4, h), e.bindFramebuffer(e.FRAMEBUFFER, null);
1823
+ const d = S(this, V, bn).call(this);
1824
+ e.useProgram(d.program), yt(d, n), Qt(S(this, V, In).call(this, e, d)), a(this, ve).triggerRepaint();
1825
1825
  }
1826
1826
  setOptions(e) {
1827
1827
  var t;
1828
- w(this, _, Ht).call(this, e, e.color !== void 0 && Yr((t = a(this, J)) == null ? void 0 : t.color, e.color)), a(this, fe).triggerRepaint();
1828
+ S(this, V, or).call(this, e, e.color !== void 0 && Jr((t = a(this, te)) == null ? void 0 : t.color, e.color)), a(this, ve).triggerRepaint();
1829
1829
  }
1830
- }, fe = new WeakMap(), Y = new WeakMap(), He = new WeakMap(), J = new WeakMap(), pe = new WeakMap(), U = new WeakMap(), Ke = new WeakMap(), Ee = new WeakMap(), ee = new WeakMap(), W = new WeakMap(), _ = new WeakSet(), tn = function(e) {
1830
+ }, ve = new WeakMap(), P = new WeakMap(), Qe = new WeakMap(), te = new WeakMap(), ye = new WeakMap(), J = new WeakMap(), je = new WeakMap(), Te = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), V = new WeakSet(), pn = function(e) {
1831
1831
  const t = e.drawingBufferWidth, n = e.drawingBufferHeight;
1832
- if (a(this, W).width === t && a(this, W).height === n)
1832
+ if (a(this, H).width === t && a(this, H).height === n)
1833
1833
  return;
1834
- a(this, W).width = t, a(this, W).height = n, a(this, W).buffer || (a(this, W).buffer = e.createFramebuffer());
1835
- const o = a(this, W).buffer;
1834
+ a(this, H).width = t, a(this, H).height = n, a(this, H).buffer || (a(this, H).buffer = e.createFramebuffer());
1835
+ const o = a(this, H).buffer;
1836
1836
  e.bindFramebuffer(e.FRAMEBUFFER, o);
1837
1837
  const i = e.createTexture();
1838
- e.bindTexture(e.TEXTURE_2D, i), e.pixelStorei(e.UNPACK_ALIGNMENT, 1), e.texStorage2D(e.TEXTURE_2D, 1, e.RGBA8, t, n), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, i, 0), e.bindTexture(e.TEXTURE_2D, null), e.bindFramebuffer(e.FRAMEBUFFER, null), a(this, U).u_frame = i;
1839
- const s = a(this, J).size * devicePixelRatio;
1840
- a(this, U).u_size = [s / t, s / n];
1841
- }, rn = function(e, t) {
1842
- const n = `${ue.feedback}:${e}-${t}-${a(this, J).type}-${a(this, J).mask ? "mask" : "unmask"}`, o = e === "globe";
1843
- return a(this, Y).program(
1838
+ e.bindTexture(e.TEXTURE_2D, i), e.pixelStorei(e.UNPACK_ALIGNMENT, 1), e.texStorage2D(e.TEXTURE_2D, 1, e.RGBA8, t, n), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, i, 0), e.bindTexture(e.TEXTURE_2D, null), e.bindFramebuffer(e.FRAMEBUFFER, null), a(this, J).u_frame = i;
1839
+ const s = a(this, te).size * devicePixelRatio;
1840
+ a(this, J).u_size = [s / t, s / n];
1841
+ }, mn = function(e, t) {
1842
+ const n = `${fe.feedback}:${e}-${t}-${a(this, te).type}-${a(this, te).mask ? "mask" : "unmask"}`, o = e === "globe";
1843
+ return a(this, P).program(
1844
1844
  n,
1845
- () => a(this, Y).vertex(n, No, () => {
1845
+ () => a(this, P).vertex(n, jo, () => {
1846
1846
  const i = ["DATA_GRID_UV"];
1847
1847
  return o && i.push("GLOBE"), t === "uint" ? i.push("DATA0_UINT") : t === "float" && i.push("DATA0_FLOAT"), i.map((s) => "#define " + s).join(`
1848
1848
  `);
1849
1849
  }),
1850
- () => a(this, Y).fragment(ue.blend, ur),
1850
+ () => a(this, P).fragment(fe.blend, xr),
1851
1851
  ["v_data"]
1852
1852
  );
1853
- }, nn = function() {
1854
- return a(this, Y).program(ue.blend, () => a(this, Y).vertex(ue.screen, dr), () => a(this, Y).fragment(ue.blend, ur));
1855
- }, on = function(e, t) {
1856
- return a(this, Y).vao(ue.blend, () => {
1857
- const n = w(this, _, ft).call(this, e);
1858
- return Dt(e, t, n, e.TRIANGLE_STRIP);
1853
+ }, vn = function() {
1854
+ return a(this, P).program(fe.blend, () => a(this, P).vertex(fe.screen, Er), () => a(this, P).fragment(fe.blend, xr));
1855
+ }, yn = function(e, t) {
1856
+ return a(this, P).vao(fe.blend, () => {
1857
+ const n = S(this, V, It).call(this, e);
1858
+ return Ut(e, t, n, e.TRIANGLE_STRIP);
1859
1859
  });
1860
- }, an = function() {
1861
- const e = ue.draw;
1862
- return a(this, Y).program(e, () => a(this, Y).vertex(e, Yo), () => a(this, Y).fragment(e, Fo));
1863
- }, sn = function() {
1864
- const e = ue.screen;
1865
- return a(this, Y).program(e, () => a(this, Y).vertex(e, dr), () => a(this, Y).fragment(e, Po));
1866
- }, ln = function(e, t) {
1867
- return a(this, Y).vao(ue.screen, () => {
1868
- const n = w(this, _, ft).call(this, e);
1869
- return Dt(e, t, n, e.TRIANGLE_STRIP);
1860
+ }, gn = function() {
1861
+ const e = fe.draw;
1862
+ return a(this, P).program(e, () => a(this, P).vertex(e, Jo), () => a(this, P).fragment(e, $o));
1863
+ }, bn = function() {
1864
+ const e = fe.screen;
1865
+ return a(this, P).program(e, () => a(this, P).vertex(e, Er), () => a(this, P).fragment(e, qo));
1866
+ }, In = function(e, t) {
1867
+ return a(this, P).vao(fe.screen, () => {
1868
+ const n = S(this, V, It).call(this, e);
1869
+ return Ut(e, t, n, e.TRIANGLE_STRIP);
1870
1870
  });
1871
- }, ft = function(e) {
1872
- return a(this, Y).buffer(
1873
- ue.screen,
1874
- () => $t(e, { a_pos: { size: 2, data: new Int8Array([-1, 1, -1, -1, 1, 1, 1, -1]), type: e.BYTE } })
1871
+ }, It = function(e) {
1872
+ return a(this, P).buffer(
1873
+ fe.screen,
1874
+ () => cr(e, { a_pos: { size: 2, data: new Int8Array([-1, 1, -1, -1, 1, 1, 1, -1]), type: e.BYTE } })
1875
1875
  );
1876
- }, cn = function(e, t, n) {
1877
- if (a(this, ee)) {
1878
- const d = a(this, ee)[0];
1879
- return a(this, ee)[0] = a(this, ee)[1], a(this, ee)[1] = d, d;
1876
+ }, Cn = function(e, t, n) {
1877
+ if (a(this, oe)) {
1878
+ const d = a(this, oe)[0];
1879
+ return a(this, oe)[0] = a(this, oe)[1], a(this, oe)[1] = d, d;
1880
1880
  }
1881
- const o = w(this, _, ft).call(this, e).attribute.a_pos.buffer, i = l(a(this, Ee) * 16, e.DYNAMIC_DRAW), s = l(a(this, Ee) * 16, e.DYNAMIC_DRAW);
1882
- return C(this, ee, [{
1881
+ const o = S(this, V, It).call(this, e).attribute.a_pos.buffer, i = l(a(this, Te) * 16, e.DYNAMIC_DRAW), s = l(a(this, Te) * 16, e.DYNAMIC_DRAW);
1882
+ return E(this, oe, [{
1883
1883
  buffer: i,
1884
1884
  feedbackVao: c(t, i),
1885
1885
  feedback: u(s),
@@ -1889,7 +1889,7 @@ var Bo = {
1889
1889
  feedbackVao: c(t, s),
1890
1890
  feedback: u(null),
1891
1891
  drawVao: h(n, o, [i, s])
1892
- }]), w(this, _, zt).call(this, e), a(this, ee)[0];
1892
+ }]), S(this, V, nr).call(this, e), a(this, oe)[0];
1893
1893
  function l(d, p) {
1894
1894
  const f = e.createBuffer();
1895
1895
  return e.bindBuffer(e.ARRAY_BUFFER, f), e.bufferData(e.ARRAY_BUFFER, d, p), f;
@@ -1901,63 +1901,63 @@ var Bo = {
1901
1901
  function c(d, p) {
1902
1902
  const f = e.createVertexArray();
1903
1903
  e.bindVertexArray(f), e.bindBuffer(e.ARRAY_BUFFER, p);
1904
- const v = e.getAttribLocation(d, "a_data");
1905
- return e.enableVertexAttribArray(v), e.vertexAttribPointer(v, 4, e.FLOAT, !1, 0, 0), f;
1904
+ const m = e.getAttribLocation(d, "a_data");
1905
+ return e.enableVertexAttribArray(m), e.vertexAttribPointer(m, 4, e.FLOAT, !1, 0, 0), f;
1906
1906
  }
1907
1907
  function h(d, p, f) {
1908
- const v = e.createVertexArray();
1909
- e.bindVertexArray(v);
1908
+ const m = e.createVertexArray();
1909
+ e.bindVertexArray(m);
1910
1910
  for (let x = 0; x < f.length; x++) {
1911
1911
  e.bindBuffer(e.ARRAY_BUFFER, f[x]);
1912
- const A = e.getAttribLocation(d, "a_data" + x);
1913
- e.enableVertexAttribArray(A), e.vertexAttribPointer(A, 4, e.FLOAT, !1, 0, 0), e.vertexAttribDivisor(A, 1);
1912
+ const R = e.getAttribLocation(d, "a_data" + x);
1913
+ e.enableVertexAttribArray(R), e.vertexAttribPointer(R, 4, e.FLOAT, !1, 0, 0), e.vertexAttribDivisor(R, 1);
1914
1914
  }
1915
1915
  e.bindBuffer(e.ARRAY_BUFFER, p);
1916
- const y = e.getAttribLocation(d, "a_pos");
1917
- return e.enableVertexAttribArray(y), e.vertexAttribPointer(y, 2, e.BYTE, !1, 0, 0), v;
1916
+ const v = e.getAttribLocation(d, "a_pos");
1917
+ return e.enableVertexAttribArray(v), e.vertexAttribPointer(v, 2, e.BYTE, !1, 0, 0), m;
1918
1918
  }
1919
- }, zt = function(e) {
1920
- if (!a(this, ee)) return;
1921
- e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, a(this, ee)[1].feedback), e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER, 0, null);
1922
- const t = a(this, ee)[0].buffer, n = new Float32Array(a(this, Ee) * 4);
1919
+ }, nr = function(e) {
1920
+ if (!a(this, oe)) return;
1921
+ e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, a(this, oe)[1].feedback), e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER, 0, null);
1922
+ const t = a(this, oe)[0].buffer, n = new Float32Array(a(this, Te) * 4);
1923
1923
  for (let o = 0; o < n.length; o += 4)
1924
1924
  n[o] = Math.random() * 2 - 1, n[o + 1] = Math.random() * 2 - 1, n[o + 2] = Math.random() * 0.5 + 0.5;
1925
1925
  e.bindBuffer(e.ARRAY_BUFFER, t), e.bufferSubData(e.ARRAY_BUFFER, 0, n), e.bindBuffer(e.ARRAY_BUFFER, null), e.bindBufferBase(e.TRANSFORM_FEEDBACK_BUFFER, 0, t), e.bindTransformFeedback(e.TRANSFORM_FEEDBACK, null);
1926
- }, Ht = function(e, t) {
1927
- const n = a(this, J), o = a(this, U);
1928
- if (t && e.color && zr(a(this, fe).painter.context.gl, o, e.color), C(this, J, Object.assign(n, e)), Kr(o, n.bound), Or(o, n), o.u_disappear = 1 - 0.03 * n.disappear, o.u_speed = a(this, J).speed, a(this, W).buffer) {
1929
- const i = a(this, J).size * devicePixelRatio;
1930
- a(this, U).u_size = [i / a(this, W).width, i / a(this, W).height];
1926
+ }, or = function(e, t) {
1927
+ const n = a(this, te), o = a(this, J);
1928
+ if (t && e.color && rn(a(this, ve).painter.context.gl, o, e.color), E(this, te, Object.assign(n, e)), on(o, n.bound), an(o, n), o.u_disappear = 1 - 0.03 * n.disappear, o.u_speed = a(this, te).speed, a(this, H).buffer) {
1929
+ const i = a(this, te).size * devicePixelRatio;
1930
+ a(this, J).u_size = [i / a(this, H).width, i / a(this, H).height];
1931
1931
  }
1932
- }, Kt = function(e) {
1932
+ }, ar = function(e) {
1933
1933
  if (e && (!Array.isArray(e) || e.length < 2))
1934
1934
  throw new Error("particle data must be uv | dv data!");
1935
- a(this, pe) && a(this, He).unlink(a(this, pe)), C(this, pe, w(this, _, un).call(this, e)), a(this, pe) && a(this, He).link(a(this, pe)), a(this, fe).triggerRepaint();
1936
- }, un = function(e) {
1937
- if (a(this, J).type === "uv" || !e || !Array.isArray(e) || e.length != 2) return e;
1935
+ a(this, ye) && a(this, Qe).unlink(a(this, ye)), E(this, ye, S(this, V, xn).call(this, e)), a(this, ye) && a(this, Qe).link(a(this, ye)), a(this, ve).triggerRepaint();
1936
+ }, xn = function(e) {
1937
+ if (a(this, te).type === "uv" || !e || !Array.isArray(e) || e.length != 2) return e;
1938
1938
  const t = e[0].data, n = "reference" in e[0] ? e[0].reference : 0, o = "scale" in e[0] ? e[0].scale : 1, i = "reference" in e[1] ? e[1].reference : 0, s = "scale" in e[1] ? e[1].scale : 1, { x: l, y: u, lon: c, lat: h, data: d } = e[1], p = new Float32Array(d.length), f = new Float32Array(d.length);
1939
- for (let v = 0; v < d.length; v++) {
1940
- const y = (t[v] * o + n) * Math.PI / 180, x = -(d[v] * s + i);
1941
- p[v] = x * Math.sin(y), f[v] = x * Math.cos(y);
1939
+ for (let m = 0; m < d.length; m++) {
1940
+ const v = (t[m] * o + n) * Math.PI / 180, x = -(d[m] * s + i);
1941
+ p[m] = x * Math.sin(v), f[m] = x * Math.cos(v);
1942
1942
  }
1943
1943
  return [{ x: l, y: u, lon: c, lat: h, data: p }, { x: l, y: u, lon: c, lat: h, data: f }];
1944
- }, dn = function({ shaderData: e, defaultProjectionData: t }) {
1944
+ }, En = function({ shaderData: e, defaultProjectionData: t }) {
1945
1945
  const n = e.variantName === "globe";
1946
- a(this, U).u_matrix = n ? a(this, fe).transform.getProjectionData({
1946
+ a(this, J).u_matrix = n ? a(this, ve).transform.getProjectionData({
1947
1947
  overscaledTileID: null,
1948
1948
  applyGlobeMatrix: !0
1949
- }).mainMatrix : t.mainMatrix, a(this, U).u_matrix_inverse || (a(this, U).u_matrix_inverse = new Float32Array(16), zo(a(this, U).u_matrix_inverse, a(this, U).u_matrix));
1950
- }, Ot = function(e) {
1951
- a(this, U).u_matrix_inverse = void 0, a(this, W).buffer && (w(this, _, zt).call(this, e), e.bindFramebuffer(e.FRAMEBUFFER, a(this, W).buffer), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.bindFramebuffer(e.FRAMEBUFFER, null));
1952
- }, Ar);
1953
- function zo(r, e) {
1954
- const t = e[0], n = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], h = e[8], d = e[9], p = e[10], f = e[11], v = e[12], y = e[13], x = e[14], A = e[15], I = t * l - n * s, g = t * u - o * s, k = t * c - i * s, T = n * u - o * l, S = n * c - i * l, R = o * c - i * u, L = h * y - d * v, M = h * x - p * v, Z = h * A - f * v, N = d * x - p * y, ce = d * A - f * y, ve = p * A - f * x;
1955
- let G = I * ve - g * ce + k * N + T * Z - S * M + R * L;
1956
- G && (G = 1 / G, r[0] = (l * ve - u * ce + c * N) * G, r[1] = (o * ce - n * ve - i * N) * G, r[2] = (y * R - x * S + A * T) * G, r[3] = (p * S - d * R - f * T) * G, r[4] = (u * Z - s * ve - c * M) * G, r[5] = (t * ve - o * Z + i * M) * G, r[6] = (x * k - v * R - A * g) * G, r[7] = (h * R - p * k + f * g) * G, r[8] = (s * ce - l * Z + c * L) * G, r[9] = (n * Z - t * ce - i * L) * G, r[10] = (v * S - y * k + A * I) * G, r[11] = (d * k - h * S - f * I) * G, r[12] = (l * M - s * N - u * L) * G, r[13] = (t * N - n * M + o * L) * G, r[14] = (y * g - v * T - x * I) * G, r[15] = (h * T - d * g + p * I) * G);
1949
+ }).mainMatrix : t.mainMatrix, a(this, J).u_matrix_inverse || (a(this, J).u_matrix_inverse = new Float32Array(16), ra(a(this, J).u_matrix_inverse, a(this, J).u_matrix));
1950
+ }, ir = function(e) {
1951
+ a(this, J).u_matrix_inverse = void 0, a(this, H).buffer && (S(this, V, nr).call(this, e), e.bindFramebuffer(e.FRAMEBUFFER, a(this, H).buffer), e.clearColor(0, 0, 0, 0), e.clear(e.COLOR_BUFFER_BIT), e.bindFramebuffer(e.FRAMEBUFFER, null));
1952
+ }, Nr);
1953
+ function ra(r, e) {
1954
+ const t = e[0], n = e[1], o = e[2], i = e[3], s = e[4], l = e[5], u = e[6], c = e[7], h = e[8], d = e[9], p = e[10], f = e[11], m = e[12], v = e[13], x = e[14], R = e[15], C = t * l - n * s, b = t * u - o * s, B = t * c - i * s, L = n * u - o * l, M = n * c - i * l, T = o * c - i * u, I = h * v - d * m, w = h * x - p * m, _ = h * R - f * m, k = d * x - p * v, G = d * R - f * v, F = p * R - f * x;
1955
+ let D = C * F - b * G + B * k + L * _ - M * w + T * I;
1956
+ D && (D = 1 / D, r[0] = (l * F - u * G + c * k) * D, r[1] = (o * G - n * F - i * k) * D, r[2] = (v * T - x * M + R * L) * D, r[3] = (p * M - d * T - f * L) * D, r[4] = (u * _ - s * F - c * w) * D, r[5] = (t * F - o * _ + i * w) * D, r[6] = (x * B - m * T - R * b) * D, r[7] = (h * T - p * B + f * b) * D, r[8] = (s * G - l * _ + c * I) * D, r[9] = (n * _ - t * G - i * I) * D, r[10] = (m * M - v * B + R * C) * D, r[11] = (d * B - h * M - f * C) * D, r[12] = (l * w - s * k - u * I) * D, r[13] = (t * k - n * w + o * I) * D, r[14] = (v * b - m * L - x * C) * D, r[15] = (h * L - d * b + p * C) * D);
1957
1957
  }
1958
- var Ho = "isoline-tile", Ko = 2;
1959
- Oo(Ko * 2 + 1, 1);
1960
- function Oo(r, e) {
1958
+ var na = "isoline-tile", oa = 2;
1959
+ aa(oa * 2 + 1, 1);
1960
+ function aa(r, e) {
1961
1961
  const t = r + 1, n = new Float32Array(t * e);
1962
1962
  for (let o = 0; o < e; o++) {
1963
1963
  const i = new Float32Array(r), s = new Float32Array(r);
@@ -1967,15 +1967,15 @@ function Oo(r, e) {
1967
1967
  i[c] = c + l, s[c] = c + u;
1968
1968
  let h = 0;
1969
1969
  for (let d = 0; d < c + 1; ++d) {
1970
- const p = s[d], f = i[c - d], v = n[t * o + d] / (p + f);
1971
- n[t * o + d] = h + p * v, h = f * v;
1970
+ const p = s[d], f = i[c - d], m = n[t * o + d] / (p + f);
1971
+ n[t * o + d] = h + p * m, h = f * m;
1972
1972
  }
1973
1973
  n[t * o + c + 1] = h;
1974
1974
  }
1975
1975
  }
1976
1976
  return n;
1977
1977
  }
1978
- var lt = {
1978
+ var mt = {
1979
1979
  interval: 0,
1980
1980
  offset: 0,
1981
1981
  tension: 1,
@@ -1993,27 +1993,27 @@ var lt = {
1993
1993
  },
1994
1994
  style: void 0,
1995
1995
  opacity: 1
1996
- }, me, Lt, hn, Rr, Uo = (Rr = class extends Jt {
1996
+ }, ge, Vt, An, Zr, ia = (Zr = class extends lr {
1997
1997
  constructor(e) {
1998
1998
  super(e);
1999
- E(this, Lt);
2000
- E(this, me);
1999
+ A(this, Vt);
2000
+ A(this, ge);
2001
2001
  /**
2002
2002
  * @internal
2003
2003
  */
2004
- b(this, "loadTile", async (e, t) => {
2005
- var d, p, f, v, y, x, A, I, g;
2006
- const n = w(this, Lt, hn).call(this, e, t);
2004
+ g(this, "loadTile", async (e, t) => {
2005
+ var d, p, f, m, v, x, R, C, b;
2006
+ const n = S(this, Vt, An).call(this, e, t);
2007
2007
  if (!n) return null;
2008
- const o = a(this, me), i = t > 0 || o.label === null ? void 0 : {
2008
+ const o = a(this, ge), i = t > 0 || o.label === null ? void 0 : {
2009
2009
  ...o.label,
2010
2010
  convert: o.label.convert.toString()
2011
2011
  }, { width: s, color: l, dash: u } = o, c = o.style ?? {}, h = {
2012
2012
  below: { width: ((d = c.below) == null ? void 0 : d.width) ?? s, color: ((p = c.below) == null ? void 0 : p.color) ?? l, dash: ((f = c.below) == null ? void 0 : f.dash) ?? u },
2013
- at: { width: ((v = c.at) == null ? void 0 : v.width) ?? s, color: ((y = c.at) == null ? void 0 : y.color) ?? l, dash: ((x = c.at) == null ? void 0 : x.dash) ?? u },
2014
- above: { width: ((A = c.above) == null ? void 0 : A.width) ?? s, color: ((I = c.above) == null ? void 0 : I.color) ?? l, dash: ((g = c.above) == null ? void 0 : g.dash) ?? u }
2013
+ at: { width: ((m = c.at) == null ? void 0 : m.width) ?? s, color: ((v = c.at) == null ? void 0 : v.color) ?? l, dash: ((x = c.at) == null ? void 0 : x.dash) ?? u },
2014
+ above: { width: ((R = c.above) == null ? void 0 : R.width) ?? s, color: ((C = c.above) == null ? void 0 : C.color) ?? l, dash: ((b = c.above) == null ? void 0 : b.dash) ?? u }
2015
2015
  };
2016
- return this.renderFactory.exec(Ho, {
2016
+ return this.renderFactory.exec(na, {
2017
2017
  canvas: { type: "2d", size: this.tileSize * 2 },
2018
2018
  data: {
2019
2019
  interval: o.interval,
@@ -2027,38 +2027,38 @@ var lt = {
2027
2027
  }
2028
2028
  }, [n]);
2029
2029
  });
2030
- C(this, me, Object.assign({}, lt, e)), a(this, me).label = e.label === null ? null : Object.assign({}, lt.label, e.label);
2030
+ E(this, ge, Object.assign({}, mt, e)), a(this, ge).label = e.label === null ? null : Object.assign({}, mt.label, e.label);
2031
2031
  }
2032
2032
  setOptions(e) {
2033
- C(this, me, Object.assign({}, lt, e)), a(this, me).label = e.label === null ? null : Object.assign({}, lt.label, e.label), super.setOptions(e);
2033
+ E(this, ge, Object.assign({}, mt, e)), a(this, ge).label = e.label === null ? null : Object.assign({}, mt.label, e.label), super.setOptions(e);
2034
2034
  }
2035
- }, me = new WeakMap(), Lt = new WeakSet(), hn = function(e, t) {
2036
- const { bound: n } = a(this, me), o = Array.isArray(this.data0) ? this.data0[0] : this.data0, [i, s] = Vr(e, o, a(this, me).cell, n, 5);
2035
+ }, ge = new WeakMap(), Vt = new WeakSet(), An = function(e, t) {
2036
+ const { bound: n } = a(this, ge), o = Array.isArray(this.data0) ? this.data0[0] : this.data0, [i, s] = Hr(e, o, a(this, ge).cell, n, 5);
2037
2037
  if (i.length === 0 || s.length === 0) return null;
2038
2038
  const l = d(this.data0, i, s);
2039
2039
  if (t > 0) {
2040
- const p = t, f = 1 - p, v = d(this.data1, i, s);
2041
- for (let y = 0; y < l.length; y++)
2042
- l[y] = f * l[y] + p * v[y];
2040
+ const p = t, f = 1 - p, m = d(this.data1, i, s);
2041
+ for (let v = 0; v < l.length; v++)
2042
+ l[v] = f * l[v] + p * m[v];
2043
2043
  }
2044
2044
  const u = 2 + i.length + s.length, c = new Float32Array(u + l.length);
2045
2045
  let h = 0;
2046
2046
  c[h++] = i.length, c[h++] = s.length;
2047
- for (const p of i) c[h++] = Zr(e, p);
2048
- for (const p of s) c[h++] = Gr(e, p);
2047
+ for (const p of i) c[h++] = Ur(e, p);
2048
+ for (const p of s) c[h++] = Qr(e, p);
2049
2049
  return c.set(l, u), c.buffer;
2050
- function d(p, f, v) {
2051
- if (!Array.isArray(p)) return st(p, f, v);
2052
- if (p.length === 1) return st(p[0], f, v);
2053
- const y = st(p[0], f, v), x = st(p[1], f, v);
2054
- for (let A = 0; A < y.length; A++)
2055
- y[A] = Math.hypot(y[A], x[A]);
2056
- return y;
2057
- }
2058
- }, Rr);
2059
- function hr(r, e) {
2050
+ function d(p, f, m) {
2051
+ if (!Array.isArray(p)) return pt(p, f, m);
2052
+ if (p.length === 1) return pt(p[0], f, m);
2053
+ const v = pt(p[0], f, m), x = pt(p[1], f, m);
2054
+ for (let R = 0; R < v.length; R++)
2055
+ v[R] = Math.hypot(v[R], x[R]);
2056
+ return v;
2057
+ }
2058
+ }, Zr);
2059
+ function Ar(r, e) {
2060
2060
  var o;
2061
- const t = new yo({
2061
+ const t = new So({
2062
2062
  interactive: !0,
2063
2063
  attributionControl: !1,
2064
2064
  maplibreLogo: !1,
@@ -2080,7 +2080,7 @@ function hr(r, e) {
2080
2080
  validateStyle: !1,
2081
2081
  ...r,
2082
2082
  // @ts-ignore
2083
- style: Kn
2083
+ style: oo
2084
2084
  }), n = r.tiandituToken ?? ((o = window == null ? void 0 : window.present) == null ? void 0 : o.tiandituToken) ?? "";
2085
2085
  return t.on("load", () => {
2086
2086
  t.resize(), n && (t.addSource("baselayersource__tian-di-tu", {
@@ -2128,7 +2128,7 @@ function hr(r, e) {
2128
2128
  }), n && t.setLayoutProperty("baselayer__bing-map-layer", "visibility", "none"), t.setMinZoom(2);
2129
2129
  }), t;
2130
2130
  }
2131
- class Qo {
2131
+ class sa {
2132
2132
  /**
2133
2133
  * 创建渲染器实例
2134
2134
  * @param name - 渲染器名称(可选),用作 ID 前缀
@@ -2138,7 +2138,7 @@ class Qo {
2138
2138
  * 渲染器名称标识
2139
2139
  * 用于生成的 ID 前缀,便于调试和识别
2140
2140
  */
2141
- b(this, "name");
2141
+ g(this, "name");
2142
2142
  this.name = e ?? "";
2143
2143
  }
2144
2144
  /**
@@ -2155,44 +2155,44 @@ class Qo {
2155
2155
  * ```
2156
2156
  */
2157
2157
  createId() {
2158
- return this.name ? `${this.name}__${mt()}` : mt();
2158
+ return this.name ? `${this.name}__${Ct()}` : Ct();
2159
2159
  }
2160
2160
  }
2161
- const jo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFACAYAAADNkKWqAAAKyUlEQVR4Xu3Wy5LcOBIFUf7/T6sVaiGLuOIDuUS4n01ryCDNPIoJm+OQJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEm68eu3vCYJog4A4iEwuontEh71AKB2S5doPwbqAUDtRvOPfY/2g6D1DtTuP5DRJ/T+K7QfBK23nJtJ3f9Axx/X/dSPYnRT2mm9Z980fzO7ndZxC879Pz8H1k7I3XmNYqUd8V20jltw/iPTdkHtHqjd5a79/E3czbSCiHyA+UNfoHYP2T++hbzeUTaS2ie44EDuJ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ZWY35/a3trf7W1uJW13Ujt6aure/dXXvz2tn5PbSuf/jLu4cfzfTwV0bub2Q+23v3/+Rkaj4g91/1Ujut53RPhnB1AWQ+8+t5H7bWe0T+gJW+t/u7+rc/tb3dn9H37S/zeyG3D5pHbfgqX/88Z9mdrbS1nkHb02292yf3AUi4o/r/tF+da+Tu75z/91MB3dttvdun2QobQHnTnL7+N/U/nM7oT8bSe2Tc/iQM53R28d/qf3k9vFfYv8HOv5g9492en9eT6tzOxlNb10rM1trHbeA3E9uL2/948f/Nrejt6bO7ZP2gS/I/VftmA//uO4vhB3ctRHaJ5jQG+T+czvuwz/+/duTdpCNpPYJLjiQ+88fPXEP2V9ypqvRSmyfYMP/IveT2wv5hz/aqf0f9AWQ+8nthdx/1T4OxKt7baFiL5D7ye2F3H9uH4cech/I6BNyP7m9kPt/jrz/5X0MdPzB7ie3F3I/uX1CXwS5n9xeyP3k9gl9EeR+cnsh95PbJUmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSfvz6K69LUnvjALyT85LURh54q/I9krSdPNhW5DskaUt5uD3JZyVpa3nIXclnJKmFPOzOclaSWvHQk4TlwScJ6/z//oackaSW8vB7k89L0rbygFuV75Gk7eTBtiLfIUlbysPtST4rSVvLQy7lvCS1kQfekHOS1I4HnyQsDz5JWB5+krA8ACVheQBKwvIAlITlASgJywNQEpYHoCQsD0BJWB6AkrA8ACVheQBKwvIAlITlASgJywNQEpYHoCQsD0BJWB6AkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRpxX+Za5BAn/xiHwAAAABJRU5ErkJggg==";
2162
+ class ca {
2163
2163
  constructor(e, t, n) {
2164
- b(this, "bluestar");
2165
- b(this, "viewer");
2166
- b(this, "state");
2167
- b(this, "wegRenderer");
2164
+ g(this, "bluestar");
2165
+ g(this, "viewer");
2166
+ g(this, "state");
2167
+ g(this, "wegRenderer");
2168
2168
  /** 主数据源 ID */
2169
- b(this, "sourceId");
2169
+ g(this, "sourceId");
2170
2170
  /** 热力图图层 ID */
2171
- b(this, "colorMapId");
2171
+ g(this, "colorMapId");
2172
2172
  /** 文本图层 ID */
2173
- b(this, "gridValueId");
2173
+ g(this, "gridValueId");
2174
2174
  /** 等值线图层 ID */
2175
- b(this, "contourLayerId");
2175
+ g(this, "contourLayerId");
2176
2176
  /** 向量图层 ID */
2177
- b(this, "vectorLayerId");
2177
+ g(this, "vectorLayerId");
2178
2178
  /** 粒子图层 ID */
2179
- b(this, "particleLayerId");
2179
+ g(this, "particleLayerId");
2180
2180
  /** 值与方向数据源 ID */
2181
- b(this, "valueDirectionSourceId");
2181
+ g(this, "valueDirectionSourceId");
2182
2182
  /** 热力图图层实例 */
2183
- b(this, "colorMapLayer");
2183
+ g(this, "colorMapLayer");
2184
2184
  /** 文本图层实例 */
2185
- b(this, "gridValueLayer");
2185
+ g(this, "gridValueLayer");
2186
2186
  /** 等值线图层实例 */
2187
- b(this, "contourLayer");
2187
+ g(this, "contourLayer");
2188
2188
  /** 向量图层实例 */
2189
- b(this, "vectorLayer");
2189
+ g(this, "vectorLayer");
2190
2190
  /** 粒子图层实例 */
2191
- b(this, "particleLayer");
2191
+ g(this, "particleLayer");
2192
2192
  /** 热力图数据源 */
2193
- b(this, "mainSource");
2193
+ g(this, "mainSource");
2194
2194
  /** 值与方向数据源 */
2195
- b(this, "valueDirectionSource");
2195
+ g(this, "valueDirectionSource");
2196
2196
  this.bluestar = e, this.viewer = e.viewer, this.state = t, this.wegRenderer = n, this.sourceId = this.createId("VSOURCE"), this.colorMapId = this.createId("color"), this.gridValueId = this.createId("grid"), this.contourLayerId = this.createId("contour"), this.vectorLayerId = this.createId("vector"), this.particleLayerId = this.createId("particle"), this.valueDirectionSourceId = this.createId("DSOURCE");
2197
2197
  }
2198
2198
  /** 生成唯一 ID */
@@ -2216,27 +2216,29 @@ class Jo {
2216
2216
  data: e.block.V.data,
2217
2217
  bitLength: e.block.V.bitLength,
2218
2218
  reference: e.block.V.offset,
2219
- scale: e.block.V.scale
2219
+ scale: e.block.V.scale,
2220
+ zeroNaN: this.state.zeroToNaN
2220
2221
  }) : this.mainSource.setData({
2221
2222
  lon: [e.west, e.east],
2222
2223
  lat: [e.north, e.south],
2223
2224
  x: e.width,
2224
2225
  y: e.height,
2225
- data: e.block.V.data
2226
+ data: e.block.V.data,
2227
+ zeroNaN: this.state.zeroToNaN
2226
2228
  });
2227
2229
  let t = e.block.U ?? e.block.D ?? void 0;
2228
2230
  t && this.valueDirectionSource && (e.dtype === "uint8" || e.dtype === "uint16" ? this.valueDirectionSource.setData([
2229
- { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: t.data, bitLength: t.bitLength, reference: t.offset, scale: t.scale },
2230
- { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: e.block.V.data, bitLength: e.block.V.bitLength, reference: e.block.V.offset, scale: e.block.V.scale }
2231
+ { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: t.data, bitLength: t.bitLength, reference: t.offset, scale: t.scale, zeroNaN: this.state.zeroToNaN },
2232
+ { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: e.block.V.data, bitLength: e.block.V.bitLength, reference: e.block.V.offset, scale: e.block.V.scale, zeroNaN: this.state.zeroToNaN }
2231
2233
  ]) : this.valueDirectionSource.setData([
2232
- { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: t.data },
2233
- { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: e.block.V.data }
2234
+ { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: t.data, zeroNaN: this.state.zeroToNaN },
2235
+ { lon: [e.west, e.east], lat: [e.north, e.south], x: e.width, y: e.height, data: e.block.V.data, zeroNaN: this.state.zeroToNaN }
2234
2236
  ]));
2235
2237
  }
2236
2238
  /** 创建热力图图层 */
2237
2239
  createColorMapLayer(e) {
2238
2240
  const { colorRamp: t, colorRampDefaultColor: n, linearValue: o, alpha: i } = this.state, s = t.map((l) => [l.value, l.color]).flat();
2239
- n && s.unshift(n), this.colorMapLayer = new To({
2241
+ n && s.unshift(n), this.colorMapLayer = new Go({
2240
2242
  id: this.colorMapId,
2241
2243
  source: e.ftype === "UV" ? this.valueDirectionSourceId : this.sourceId,
2242
2244
  dataFilter: o ? "linear" : "nearest",
@@ -2248,7 +2250,7 @@ class Jo {
2248
2250
  /** 创建文本图层(网格数值) */
2249
2251
  createTextLayer(e) {
2250
2252
  const { gridValueStyle: t, gridValueFormat: n, cell: o } = this.state;
2251
- this.gridValueLayer = new _o({
2253
+ this.gridValueLayer = new Xo({
2252
2254
  id: this.gridValueId,
2253
2255
  source: e.ftype === "UV" ? this.valueDirectionSourceId : this.sourceId,
2254
2256
  cell: o,
@@ -2279,12 +2281,12 @@ class Jo {
2279
2281
  convert: o.format ?? i ?? ((l) => l.toFixed(1))
2280
2282
  } : null
2281
2283
  };
2282
- n.cell && (s.cell = n.cell), this.contourLayer = new Uo(s);
2284
+ n.cell && (s.cell = n.cell), this.contourLayer = new ia(s);
2283
2285
  }
2284
2286
  /** 创建向量和粒子图层 */
2285
2287
  createVectorAndParticleLayers(e) {
2286
2288
  const { level: t, vectorColor: n, cell: o, vectorImage: i, particleConfig: s, colorRamp: l } = this.state, u = e.ftype.toLowerCase();
2287
- this.vectorLayer = new Go({
2289
+ this.vectorLayer = new Qo({
2288
2290
  id: this.vectorLayerId,
2289
2291
  source: this.valueDirectionSourceId,
2290
2292
  level: [...t],
@@ -2292,7 +2294,7 @@ class Jo {
2292
2294
  color: n,
2293
2295
  cell: o,
2294
2296
  image: {
2295
- src: (i == null ? void 0 : i.url) ?? jo,
2297
+ src: (i == null ? void 0 : i.url) ?? la,
2296
2298
  count: [
2297
2299
  (i == null ? void 0 : i.column) ?? 5,
2298
2300
  (i == null ? void 0 : i.row) ?? 5
@@ -2301,7 +2303,7 @@ class Jo {
2301
2303
  }
2302
2304
  });
2303
2305
  const h = (s.colorRamp ?? l).map((d) => [d.value, d.color]).flat();
2304
- this.particleLayer = new Wo({
2306
+ this.particleLayer = new ta({
2305
2307
  id: this.particleLayerId,
2306
2308
  source: this.valueDirectionSourceId,
2307
2309
  color: h,
@@ -2326,7 +2328,7 @@ class Jo {
2326
2328
  this.colorMapId && this.viewer.removeLayer(this.colorMapId), this.gridValueId && this.viewer.removeLayer(this.gridValueId), this.contourLayerId && this.viewer.removeLayer(this.contourLayerId), this.vectorLayer && this.viewer.removeLayer(this.vectorLayerId), this.particleLayer && this.viewer.removeLayer(this.particleLayerId), this.valueDirectionSource && this.viewer.removeSource(this.valueDirectionSourceId), this.viewer.removeSource(this.sourceId);
2327
2329
  }
2328
2330
  }
2329
- function $o() {
2331
+ function ua() {
2330
2332
  return {
2331
2333
  name: void 0,
2332
2334
  fillFulling: !0,
@@ -2370,36 +2372,37 @@ function $o() {
2370
2372
  speed: 0.3,
2371
2373
  disappear: 1,
2372
2374
  colorRamp: void 0
2373
- }
2375
+ },
2376
+ zeroToNaN: !1
2374
2377
  };
2375
2378
  }
2376
- class qt {
2379
+ class ur {
2377
2380
  constructor(e, t, n) {
2378
- b(this, "bluestar");
2379
- b(this, "viewer");
2381
+ g(this, "bluestar");
2382
+ g(this, "viewer");
2380
2383
  /** 响应式完整状态 */
2381
- b(this, "state");
2384
+ g(this, "state");
2382
2385
  // —— 图层引用 ——
2383
- b(this, "sourceId", "");
2384
- b(this, "colorMapId", "");
2385
- b(this, "gridValueId", "");
2386
- b(this, "contourLayerId", "");
2387
- b(this, "vectorLayerId", "");
2388
- b(this, "colorMapLayer");
2389
- b(this, "gridValueLayer");
2390
- b(this, "contourLayer");
2391
- b(this, "vectorLayer");
2392
- b(this, "particleLayer");
2393
- b(this, "mainSource");
2394
- b(this, "valueDirectionSource");
2395
- b(this, "_watchersSetup", !1);
2396
- b(this, "wegRenderer");
2397
- this.bluestar = e, this.viewer = e.viewer, this.wegRenderer = n, this.state = De($o()), this.applyConfig(t);
2386
+ g(this, "sourceId", "");
2387
+ g(this, "colorMapId", "");
2388
+ g(this, "gridValueId", "");
2389
+ g(this, "contourLayerId", "");
2390
+ g(this, "vectorLayerId", "");
2391
+ g(this, "colorMapLayer");
2392
+ g(this, "gridValueLayer");
2393
+ g(this, "contourLayer");
2394
+ g(this, "vectorLayer");
2395
+ g(this, "particleLayer");
2396
+ g(this, "mainSource");
2397
+ g(this, "valueDirectionSource");
2398
+ g(this, "_watchersSetup", !1);
2399
+ g(this, "wegRenderer");
2400
+ this.bluestar = e, this.viewer = e.viewer, this.wegRenderer = n, this.state = Ge(ua()), this.applyConfig(t);
2398
2401
  }
2399
2402
  /** 将用户配置合并到响应式 state 中 */
2400
2403
  applyConfig(e) {
2401
2404
  const t = this.state;
2402
- e.name !== void 0 && (t.name = e.name), e.colorRamp && (t.colorRamp = e.colorRamp), e.colorRampDefaultColor !== void 0 && (t.colorRampDefaultColor = e.colorRampDefaultColor), e.fillFulling !== void 0 && (t.fillFulling = e.fillFulling), e.linearValue !== void 0 && (t.linearValue = e.linearValue), e.gridValue !== void 0 && (t.gridValue = e.gridValue), e.gridValueFormat && (t.gridValueFormat = e.gridValueFormat), e.direction !== void 0 && (t.direction = e.direction), e.alpha !== void 0 && (t.alpha = e.alpha), e.particle !== void 0 && (t.particle = e.particle), e.level && (t.level = [...e.level]), e.cell !== void 0 && (t.cell = e.cell), e.vectorColor !== void 0 && (t.vectorColor = e.vectorColor), e.vectorImage && (t.vectorImage = { ...e.vectorImage }), e.contour && (t.contour = [...e.contour]), e.contourStyle && Object.assign(t.contourStyle, e.contourStyle), e.contourLabel && Object.assign(t.contourLabel, e.contourLabel), e.gridValueStyle && Object.assign(t.gridValueStyle, e.gridValueStyle), e.particleConfig && Object.assign(t.particleConfig, e.particleConfig), e.particleSize !== void 0 && (t.particleConfig.size = e.particleSize), e.particleSpeed !== void 0 && (t.particleConfig.speed = e.particleSpeed), e.particleDisappear !== void 0 && (t.particleConfig.disappear = e.particleDisappear), e.particleColorRamp && (t.particleConfig.colorRamp = e.particleColorRamp);
2405
+ e.name !== void 0 && (t.name = e.name), e.colorRamp && (t.colorRamp = e.colorRamp), e.colorRampDefaultColor !== void 0 && (t.colorRampDefaultColor = e.colorRampDefaultColor), e.fillFulling !== void 0 && (t.fillFulling = e.fillFulling), e.linearValue !== void 0 && (t.linearValue = e.linearValue), e.gridValue !== void 0 && (t.gridValue = e.gridValue), e.gridValueFormat && (t.gridValueFormat = e.gridValueFormat), e.direction !== void 0 && (t.direction = e.direction), e.alpha !== void 0 && (t.alpha = e.alpha), e.zeroToNaN !== void 0 && (t.zeroToNaN = e.zeroToNaN), e.particle !== void 0 && (t.particle = e.particle), e.level && (t.level = [...e.level]), e.cell !== void 0 && (t.cell = e.cell), e.vectorColor !== void 0 && (t.vectorColor = e.vectorColor), e.vectorImage && (t.vectorImage = { ...e.vectorImage }), e.contour && (t.contour = [...e.contour]), e.contourStyle && Object.assign(t.contourStyle, e.contourStyle), e.contourLabel && Object.assign(t.contourLabel, e.contourLabel), e.gridValueStyle && Object.assign(t.gridValueStyle, e.gridValueStyle), e.particleConfig && Object.assign(t.particleConfig, e.particleConfig), e.particleSize !== void 0 && (t.particleConfig.size = e.particleSize), e.particleSpeed !== void 0 && (t.particleConfig.speed = e.particleSpeed), e.particleDisappear !== void 0 && (t.particleConfig.disappear = e.particleDisappear), e.particleColorRamp && (t.particleConfig.colorRamp = e.particleColorRamp);
2403
2406
  }
2404
2407
  /**
2405
2408
  * 绑定图层引用并启动 watcher 监听
@@ -2410,21 +2413,21 @@ class qt {
2410
2413
  }
2411
2414
  /** 建立 watch 监听:state 变化 → 自动更新图层 */
2412
2415
  setupWatchers() {
2413
- this._watchersSetup || (this._watchersSetup = !0, P(() => this.state.fillFulling, (e) => {
2416
+ this._watchersSetup || (this._watchersSetup = !0, X(() => this.state.fillFulling, (e) => {
2414
2417
  this.colorMapId && this.viewer.setLayoutProperty(this.colorMapId, "visibility", e ? "visible" : "none");
2415
- }), P(() => this.state.particle, (e) => {
2418
+ }), X(() => this.state.particle, (e) => {
2416
2419
  this.particleLayer && (this.particleLayer.visible = e);
2417
- }), P(() => this.state.gridValue, (e) => {
2420
+ }), X(() => this.state.gridValue, (e) => {
2418
2421
  this.gridValueId && this.viewer.setLayoutProperty(this.gridValueId, "visibility", e ? "visible" : "none");
2419
- }), P(() => this.state.direction, (e) => {
2422
+ }), X(() => this.state.direction, (e) => {
2420
2423
  this.vectorLayerId && this.viewer.setLayoutProperty(this.vectorLayerId, "visibility", e ? "visible" : "none");
2421
- }), P(() => this.state.level, (e) => {
2424
+ }), X(() => this.state.level, (e) => {
2422
2425
  this.vectorLayer && this.vectorLayer.setOptions({ level: [...this.state.level], color: this.state.vectorColor });
2423
- }), P(() => this.state.vectorColor, (e) => {
2426
+ }), X(() => this.state.vectorColor, (e) => {
2424
2427
  this.vectorLayer && this.vectorLayer.setOptions({ color: e, level: [...this.state.level], cell: this.state.cell });
2425
- }), P(() => this.state.cell, (e) => {
2428
+ }), X(() => this.state.cell, (e) => {
2426
2429
  this.vectorLayer && this.vectorLayer.setOptions({ cell: e, level: [...this.state.level], color: this.state.vectorColor }), this.gridValueLayer && this.gridValueLayer.setOptions({ cell: e ?? 4 });
2427
- }), P(() => this.state.colorRamp, () => this.updateHeatmapLayer()), P(() => this.state.colorRampDefaultColor, () => this.updateHeatmapLayer()), P(() => this.state.alpha, () => this.updateHeatmapLayer()), P(() => this.state.linearValue, () => this.updateHeatmapLayer()), P(() => this.state.contour, () => this.updateIsolineLayer(), { deep: !0 }), P(() => this.state.contourStyle, () => this.updateIsolineLayer(), { deep: !0 }), P(() => this.state.contourLabel, () => this.updateIsolineLayer(), { deep: !0 }), P(() => this.state.gridValueStyle, () => this.updateTextLayer(), { deep: !0 }), P(() => this.state.gridValueFormat, () => this.updateTextLayer()));
2430
+ }), X(() => this.state.colorRamp, () => this.updateHeatmapLayer()), X(() => this.state.colorRampDefaultColor, () => this.updateHeatmapLayer()), X(() => this.state.alpha, () => this.updateHeatmapLayer()), X(() => this.state.linearValue, () => this.updateHeatmapLayer()), X(() => this.state.contour, () => this.updateIsolineLayer(), { deep: !0 }), X(() => this.state.contourStyle, () => this.updateIsolineLayer(), { deep: !0 }), X(() => this.state.contourLabel, () => this.updateIsolineLayer(), { deep: !0 }), X(() => this.state.gridValueStyle, () => this.updateTextLayer(), { deep: !0 }), X(() => this.state.gridValueFormat, () => this.updateTextLayer()));
2428
2431
  }
2429
2432
  // ======================== 图层更新方法 ========================
2430
2433
  updateHeatmapLayer() {
@@ -2462,7 +2465,7 @@ class qt {
2462
2465
  }
2463
2466
  updateTextLayer() {
2464
2467
  if (!this.gridValueLayer) return;
2465
- const { gridValueStyle: e, gridValueFormat: t } = this.state, n = qt.checkGridValueColor(
2468
+ const { gridValueStyle: e, gridValueFormat: t } = this.state, n = ur.checkGridValueColor(
2466
2469
  e.color ?? ((o) => "#000")
2467
2470
  );
2468
2471
  this.gridValueLayer.setOptions({
@@ -2474,7 +2477,7 @@ class qt {
2474
2477
  // ======================== 静态工具方法 ========================
2475
2478
  static checkGridValueColor(e) {
2476
2479
  if (typeof e == "string") {
2477
- if (it.rgbaMatcher.test(e) || it.rrggbbaaMatcher.test(e) || it.rgbParenthesesMatcher.test(e) || it.hslParenthesesMatcher.test(e)) return () => e;
2480
+ if (ft.rgbaMatcher.test(e) || ft.rrggbbaaMatcher.test(e) || ft.rgbParenthesesMatcher.test(e) || ft.hslParenthesesMatcher.test(e)) return () => e;
2478
2481
  try {
2479
2482
  const n = new Function(`return (${e})`)();
2480
2483
  return n(1), n;
@@ -2501,7 +2504,7 @@ class qt {
2501
2504
  this.wegRenderer.layerManager.createSource(e);
2502
2505
  }
2503
2506
  }
2504
- class qo extends Qo {
2507
+ class da extends sa {
2505
2508
  /**
2506
2509
  * 构造函数,初始化 Weg 渲染器并添加对应的地图图层
2507
2510
  * @param bluestar - BlueStar 实例
@@ -2510,14 +2513,14 @@ class qo extends Qo {
2510
2513
  */
2511
2514
  constructor(t, n, o) {
2512
2515
  super(o.name);
2513
- b(this, "bluestar");
2516
+ g(this, "bluestar");
2514
2517
  /** 图层管理器 */
2515
- b(this, "layerManager");
2518
+ g(this, "layerManager");
2516
2519
  /** 属性控制器(持有响应式 state + watch) */
2517
- b(this, "propertyController");
2520
+ g(this, "propertyController");
2518
2521
  if (this.bluestar = t, !o)
2519
2522
  throw new Error("weg config 不能为空");
2520
- this.propertyController = new qt(t, o, this), this.layerManager = new Jo(t, this.propertyController.state, this), this.layerManager.createLayers(n), this.propertyController.bindLayers({
2523
+ this.propertyController = new ur(t, o, this), this.layerManager = new ca(t, this.propertyController.state, this), this.layerManager.createLayers(n), this.propertyController.bindLayers({
2521
2524
  sourceId: this.layerManager.sourceId,
2522
2525
  colorMapId: this.layerManager.colorMapId,
2523
2526
  gridValueId: this.layerManager.gridValueId,
@@ -2927,14 +2930,14 @@ class qo extends Qo {
2927
2930
  this.layerManager.destroy();
2928
2931
  }
2929
2932
  }
2930
- function ea(r) {
2933
+ function ha(r) {
2931
2934
  return new Promise((e, t) => {
2932
2935
  r.toBlob((n) => {
2933
2936
  n ? e(URL.createObjectURL(n)) : t(new Error("Failed to convert canvas to blob."));
2934
2937
  }, "image/png");
2935
2938
  });
2936
2939
  }
2937
- async function fr(r, e = 1) {
2940
+ async function Rr(r, e = 1) {
2938
2941
  const { width: t, height: n, block: o, ftype: i, pixelFormat: s } = r;
2939
2942
  if (s !== "RGB")
2940
2943
  throw new Error(`Weg 文件格式错误:期望 pixelFormat 为 "RGB",实际为 "${s}"`);
@@ -2950,13 +2953,13 @@ async function fr(r, e = 1) {
2950
2953
  throw new Error("无法获取 Canvas 2D 上下文");
2951
2954
  const h = c.createImageData(t, n), d = h.data;
2952
2955
  for (let f = 0; f < t * n; f++) {
2953
- const v = f * 3, y = f * 4, x = l[v], A = l[v + 1], I = l[v + 2];
2954
- d[y] = isNaN(x) ? 0 : Math.round(x), d[y + 1] = isNaN(A) ? 0 : Math.round(A), d[y + 2] = isNaN(I) ? 0 : Math.round(I);
2955
- let g = 255;
2956
- e !== 1 && (g = Math.round(255 * e)), g = Math.min(255, Math.max(0, g)), d[y + 3] = g;
2956
+ const m = f * 3, v = f * 4, x = l[m], R = l[m + 1], C = l[m + 2];
2957
+ d[v] = isNaN(x) ? 0 : Math.round(x), d[v + 1] = isNaN(R) ? 0 : Math.round(R), d[v + 2] = isNaN(C) ? 0 : Math.round(C);
2958
+ let b = 255;
2959
+ e !== 1 && (b = Math.round(255 * e)), b = Math.min(255, Math.max(0, b)), d[v + 3] = b;
2957
2960
  }
2958
2961
  return c.putImageData(h, 0, 0), {
2959
- uri: await ea(u),
2962
+ uri: await ha(u),
2960
2963
  west: r.west,
2961
2964
  north: r.north,
2962
2965
  east: r.east,
@@ -2964,7 +2967,7 @@ async function fr(r, e = 1) {
2964
2967
  alpha: e
2965
2968
  };
2966
2969
  }
2967
- class ta {
2970
+ class fa {
2968
2971
  /**
2969
2972
  * 创建图片渲染器实例
2970
2973
  * @param bluestar - BlueStar 实例
@@ -2972,46 +2975,46 @@ class ta {
2972
2975
  * @param imageRenderOptions - 可选的渲染选项配置
2973
2976
  */
2974
2977
  constructor(e, t, n) {
2975
- b(this, "bluestar");
2978
+ g(this, "bluestar");
2976
2979
  /**
2977
2980
  * MapLibre GL 地图实例
2978
2981
  */
2979
- b(this, "map");
2982
+ g(this, "map");
2980
2983
  /**
2981
2984
  * 图片透明度(内部存储)
2982
2985
  */
2983
- b(this, "_alpha");
2986
+ g(this, "_alpha");
2984
2987
  /**
2985
2988
  * 图片源唯一标识符
2986
2989
  */
2987
- b(this, "sourceId");
2990
+ g(this, "sourceId");
2988
2991
  /**
2989
2992
  * 图片图层唯一标识符
2990
2993
  */
2991
- b(this, "imageLayerId");
2994
+ g(this, "imageLayerId");
2992
2995
  /**
2993
2996
  * 图片显示地理范围
2994
2997
  */
2995
- b(this, "bound");
2998
+ g(this, "bound");
2996
2999
  /**
2997
3000
  * 是否使用线性插值
2998
3001
  */
2999
- b(this, "linerValue", !0);
3002
+ g(this, "linerValue", !0);
3000
3003
  /**
3001
3004
  * 当前 WegFile 数据(用于 getter 返回)
3002
3005
  */
3003
- b(this, "_wegFile", null);
3006
+ g(this, "_wegFile", null);
3004
3007
  /**
3005
3008
  * 当前图片 URI(用于内存管理)
3006
3009
  */
3007
- b(this, "uri", "");
3010
+ g(this, "uri", "");
3008
3011
  this.bluestar = e;
3009
3012
  const o = e.viewer;
3010
3013
  n || (n = {
3011
3014
  alpha: 1,
3012
3015
  linerValue: !0
3013
3016
  }), this.map = o;
3014
- const i = mt(), s = mt();
3017
+ const i = Ct(), s = Ct();
3015
3018
  this.sourceId = i, this.imageLayerId = s, this.bound = {
3016
3019
  west: t.west,
3017
3020
  south: t.south,
@@ -3028,7 +3031,7 @@ class ta {
3028
3031
  const t = this.map;
3029
3032
  let n, o;
3030
3033
  if ("dtype" in e)
3031
- this._wegFile = e, o = await fr(e), n = o.uri, this.uri = n;
3034
+ this._wegFile = e, o = await Rr(e), n = o.uri, this.uri = n;
3032
3035
  else {
3033
3036
  if (o = e, !o.url) throw new Error("url is required");
3034
3037
  n = o.url;
@@ -3123,7 +3126,7 @@ class ta {
3123
3126
  async setWegData(e) {
3124
3127
  if (!("dtype" in e))
3125
3128
  throw new Error("数据不是 weg");
3126
- const t = await fr(e);
3129
+ const t = await Rr(e);
3127
3130
  this._wegFile = e, this.setImage(t.uri, t), this.uri = t.uri;
3128
3131
  }
3129
3132
  /**
@@ -3174,8 +3177,8 @@ class ta {
3174
3177
  this.map.removeLayer(this.imageLayerId), this.map.removeSource(this.sourceId), this.uri && URL.revokeObjectURL(this.uri);
3175
3178
  }
3176
3179
  }
3177
- const pi = new Sn();
3178
- class ra {
3180
+ const _i = new Xn();
3181
+ class pa {
3179
3182
  /**
3180
3183
  * 创建 BlueStar 实例
3181
3184
  *
@@ -3190,20 +3193,20 @@ class ra {
3190
3193
  */
3191
3194
  constructor(e, t) {
3192
3195
  /** MapLibre GL 地图实例(通过 viewer 访问) */
3193
- b(this, "viewer");
3194
- b(this, "map");
3196
+ g(this, "viewer");
3197
+ g(this, "map");
3195
3198
  /** 地图容器 DOM 元素或 ID */
3196
- b(this, "domId");
3199
+ g(this, "domId");
3197
3200
  /** 地图是否已准备就绪 */
3198
- b(this, "ready", !1);
3201
+ g(this, "ready", !1);
3199
3202
  /** 事件监听器注册表 */
3200
- b(this, "listener", { "BlueStar:ready": [] });
3203
+ g(this, "listener", { "BlueStar:ready": [] });
3201
3204
  /** 浮窗组件实例列表 */
3202
- b(this, "bubbleList", []);
3205
+ g(this, "bubbleList", []);
3203
3206
  this.domId = e.domId;
3204
- const n = kr();
3205
- e.incomponent === void 0 || e.incomponent === !0 ? (vn("blueStar", this), Ut(() => {
3206
- e.domId && e.domId.value && (this.domId = e.domId.value), this.map = hr({
3207
+ const n = Wr();
3208
+ e.incomponent === void 0 || e.incomponent === !0 ? (Ln("blueStar", this), sr(() => {
3209
+ e.domId && e.domId.value && (this.domId = e.domId.value), this.map = Ar({
3207
3210
  ...e.config,
3208
3211
  container: this.domId
3209
3212
  }), this.viewer = this.map, this.map.on("load", () => {
@@ -3217,9 +3220,9 @@ class ra {
3217
3220
  o.loadResult.blueStar = this, o.callback(this, o.loadResult.useApiInterceptor);
3218
3221
  }), this.listener["BlueStar:ready"] = [], this.initBubbleClick();
3219
3222
  });
3220
- }), yn(() => {
3223
+ }), Sn(() => {
3221
3224
  this.destroy();
3222
- })) : (this.map = hr({
3225
+ })) : (this.map = Ar({
3223
3226
  ...e.config,
3224
3227
  container: this.domId
3225
3228
  }), this.viewer = this.map, this.map.on("load", () => {
@@ -3252,8 +3255,8 @@ class ra {
3252
3255
  bottom: p.bottom - l.top
3253
3256
  };
3254
3257
  if (f.left < n.offsetX && f.right > n.offsetX && f.top < n.offsetY && f.bottom > n.offsetY) {
3255
- let v = i.indexOf(d);
3256
- v > c && (u = d, c = v);
3258
+ let m = i.indexOf(d);
3259
+ m > c && (u = d, c = m);
3257
3260
  }
3258
3261
  }
3259
3262
  if (u) {
@@ -3319,7 +3322,7 @@ class ra {
3319
3322
  */
3320
3323
  renderWeg(e, t) {
3321
3324
  if (!this.map) throw new Error("请先初始化地图");
3322
- return new qo(this, e, t);
3325
+ return new da(this, e, t);
3323
3326
  }
3324
3327
  /**
3325
3328
  * 渲染图片叠加层
@@ -3356,7 +3359,7 @@ class ra {
3356
3359
  */
3357
3360
  renderImage(e, t) {
3358
3361
  if (!this.map) throw new Error("请先初始化地图");
3359
- return new ta(this, e, t);
3362
+ return new fa(this, e, t);
3360
3363
  }
3361
3364
  /**
3362
3365
  * 添加事件监听器
@@ -3451,13 +3454,13 @@ class ra {
3451
3454
  return this.map.getLayerLevelRule();
3452
3455
  }
3453
3456
  }
3454
- function er(r = () => {
3457
+ function Nt(r = () => {
3455
3458
  }) {
3456
- const e = bn("blueStar", null), t = kr(), n = {
3459
+ const e = _n("blueStar", null), t = Wr(), n = {
3457
3460
  blueStar: e,
3458
3461
  useApiInterceptor: t
3459
3462
  };
3460
- return Ut(() => {
3463
+ return sr(() => {
3461
3464
  const o = e;
3462
3465
  if (o)
3463
3466
  o.viewer ? (n.blueStar = o, r(o, t)) : o.addEventListener("BlueStar:ready", r, n);
@@ -3465,7 +3468,7 @@ function er(r = () => {
3465
3468
  throw new Error("请检查上级组件是否创建了 BlueStar 实例");
3466
3469
  }), n;
3467
3470
  }
3468
- const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3471
+ const ma = ["data-bluestar-bubble-id"], va = /* @__PURE__ */ $e({
3469
3472
  __name: "bubble",
3470
3473
  props: {
3471
3474
  lon: {},
@@ -3479,7 +3482,7 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3479
3482
  },
3480
3483
  emits: ["click"],
3481
3484
  setup(r, { expose: e, emit: t }) {
3482
- const n = gn(), o = r, i = t, s = De({
3485
+ const n = kn(), o = r, i = t, s = Ge({
3483
3486
  x: 0,
3484
3487
  y: 0,
3485
3488
  active: !0
@@ -3499,27 +3502,27 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3499
3502
  o.window || i("click", o.data, o.id);
3500
3503
  }
3501
3504
  });
3502
- const h = er((d) => {
3505
+ const h = Nt((d) => {
3503
3506
  u = d.viewer, c(), u.on("move", c), o.window || h.blueStar.bubbleList.push(n);
3504
3507
  });
3505
- return Qt(() => {
3508
+ return Bt(() => {
3506
3509
  const d = h.blueStar.bubbleList.findIndex((p) => n === p);
3507
3510
  d >= 0 && h.blueStar.bubbleList.splice(d, 1), u.off("move", c);
3508
- }), (d, p) => (V(), B("div", {
3509
- class: de(["bluestar-bubble-container", { "no-event": o.window ? "" : "no-event" }]),
3511
+ }), (d, p) => (N(), Z("div", {
3512
+ class: pe(["bluestar-bubble-container", { "no-event": o.window ? "" : "no-event" }]),
3510
3513
  "data-bluestar-bubble-id": o.id,
3511
- style: pt(`position: absolute;left: calc(${s.x}px + ${o.offsetX}rem); top: calc(${s.y}px + ${o.offsetY}rem)`),
3514
+ style: tt(`position: absolute;left: calc(${s.x}px + ${o.offsetX}rem); top: calc(${s.y}px + ${o.offsetY}rem)`),
3512
3515
  onClick: p[0] || (p[0] = (f) => i("click", o.data, o.id))
3513
3516
  }, [
3514
- jt(d.$slots, "default", {}, void 0, !0)
3515
- ], 14, na));
3517
+ Dt(d.$slots, "default", {}, void 0, !0)
3518
+ ], 14, ma));
3516
3519
  }
3517
- }), at = (r, e) => {
3520
+ }), ut = (r, e) => {
3518
3521
  const t = r.__vccOpts || r;
3519
3522
  for (const [n, o] of e)
3520
3523
  t[n] = o;
3521
3524
  return t;
3522
- }, aa = /* @__PURE__ */ at(oa, [["__scopeId", "data-v-fb281ccf"]]), ia = /* @__PURE__ */ ot({
3525
+ }, ya = /* @__PURE__ */ ut(va, [["__scopeId", "data-v-fb281ccf"]]), ga = /* @__PURE__ */ $e({
3523
3526
  __name: "bubble-manager",
3524
3527
  props: {
3525
3528
  data: { default: () => [] },
@@ -3529,39 +3532,245 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3529
3532
  clusterPixelRange: { default: 100 }
3530
3533
  },
3531
3534
  setup(r) {
3532
- const e = r, t = De({
3535
+ const e = r, t = Ge({
3533
3536
  list: [],
3534
3537
  groupCountList: []
3535
- }), n = er(() => {
3538
+ }), n = Nt(() => {
3536
3539
  i(), n.blueStar.viewer.on("move", i);
3537
3540
  });
3538
- Qt(() => {
3541
+ Bt(() => {
3539
3542
  n.blueStar.viewer.off("move", i);
3540
- }), P(() => [e.data, e.idKey, e.latKey, e.lonKey], i);
3543
+ }), X(() => [e.data, e.idKey, e.latKey, e.lonKey], i);
3541
3544
  let o;
3542
3545
  function i() {
3543
3546
  o && clearTimeout(o), o = setTimeout(() => {
3544
3547
  const s = n.blueStar.viewer.getBounds(), l = s.getWest(), u = s.getEast(), c = s.getSouth(), h = s.getNorth(), d = [], p = [], f = [];
3545
- for (let v = 0; v < e.data.length; v++) {
3546
- const y = e.data[v];
3547
- if (y[e.lonKey] >= l && y[e.lonKey] <= u && y[e.latKey] >= c && y[e.latKey] <= h) {
3548
- const x = n.blueStar.viewer.project([y[e.lonKey], y[e.latKey]]);
3548
+ for (let m = 0; m < e.data.length; m++) {
3549
+ const v = e.data[m];
3550
+ if (v[e.lonKey] >= l && v[e.lonKey] <= u && v[e.latKey] >= c && v[e.latKey] <= h) {
3551
+ const x = n.blueStar.viewer.project([v[e.lonKey], v[e.latKey]]);
3549
3552
  if (!x) break;
3550
- const A = p.findIndex((I) => Math.sqrt((I.x - x.x) ** 2 + (I.y - x.y) ** 2) < _n(e.clusterPixelRange));
3551
- A < 0 ? (d.push(y), p.push(x), f.push([y])) : f[A].push(y);
3553
+ const R = p.findIndex((C) => Math.sqrt((C.x - x.x) ** 2 + (C.y - x.y) ** 2) < Ht(e.clusterPixelRange));
3554
+ R < 0 ? (d.push(v), p.push(x), f.push([v])) : f[R].push(v);
3552
3555
  }
3553
3556
  }
3554
3557
  t.list = d, t.groupCountList = f;
3555
3558
  }, 100);
3556
3559
  }
3557
- return (s, l) => (V(!0), B(Te, null, Ge(t.list, (u, c) => jt(s.$slots, "default", {
3560
+ return (s, l) => (N(!0), Z(Ee, null, Ze(t.list, (u, c) => Dt(s.$slots, "default", {
3558
3561
  value: u,
3559
3562
  count: t.groupCountList[c].length,
3560
3563
  group: t.groupCountList[c],
3561
3564
  key: u[e.idKey]
3562
3565
  })), 128));
3563
3566
  }
3564
- }), sa = { class: "map-contaienr" }, la = {
3567
+ }), ba = {
3568
+ key: 0,
3569
+ style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", "pointer-events": "none", overflow: "hidden" }
3570
+ }, Ia = ["onClick"], Ca = 5e3, xa = /* @__PURE__ */ $e({
3571
+ __name: "bubble-overlay",
3572
+ props: {
3573
+ data: {},
3574
+ lonKey: { default: "lon" },
3575
+ latKey: { default: "lat" },
3576
+ idKey: { default: "id" },
3577
+ clusterPixelRange: { default: 100 },
3578
+ offsetX: { default: 0 },
3579
+ offsetY: { default: 0 },
3580
+ clickable: { type: Boolean, default: !0 },
3581
+ window: { type: Boolean, default: !0 }
3582
+ },
3583
+ emits: ["click"],
3584
+ setup(r, { emit: e }) {
3585
+ const t = r, n = e, o = pr(() => Array.isArray(t.data) ? t.data : t.data ? [t.data] : []), i = pr(() => o.value.length > 0), s = Mn([]), l = {};
3586
+ let u = 16;
3587
+ function c() {
3588
+ return parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
3589
+ }
3590
+ let h, d = null;
3591
+ Nt((I) => {
3592
+ h = I.viewer, u = c(), x(), h.on("move", p), h.on("zoomend", f), h.on("click", T);
3593
+ }), Bt(() => {
3594
+ h && (h.off("move", p), h.off("zoomend", f), h.off("click", T)), d == null || d.terminate();
3595
+ }), X(
3596
+ () => [o.value.length, t.lonKey, t.latKey, t.clusterPixelRange],
3597
+ () => x(),
3598
+ { flush: "post" }
3599
+ );
3600
+ function p() {
3601
+ R();
3602
+ }
3603
+ function f() {
3604
+ u = c(), x();
3605
+ }
3606
+ function m(I) {
3607
+ return new Promise((w) => setTimeout(w, I));
3608
+ }
3609
+ let v = 0;
3610
+ async function x() {
3611
+ const I = ++v;
3612
+ if (await m(80), I !== v) return;
3613
+ const w = o.value;
3614
+ if (!w.length || !h) {
3615
+ s.value = [];
3616
+ return;
3617
+ }
3618
+ const _ = h.getBounds(), k = _.getWest(), G = _.getEast(), F = _.getSouth(), D = _.getNorth(), Q = [], Ye = 5e3;
3619
+ for (let q = 0; q < w.length; q += Ye) {
3620
+ if (I !== v) return;
3621
+ const dr = Math.min(q + Ye, w.length);
3622
+ for (let Zt = q; Zt < dr; Zt++) {
3623
+ const Gt = w[Zt], dt = Gt[t.lonKey], ht = Gt[t.latKey];
3624
+ if (dt == null || ht == null || dt < k || dt > G || ht < F || ht > D) continue;
3625
+ const hr = h.project([dt, ht]);
3626
+ Q.push({ item: { ...Gt }, x: hr.x, y: hr.y });
3627
+ }
3628
+ if (dr < w.length && (await m(0), I !== v))
3629
+ return;
3630
+ }
3631
+ const Fe = w.length >= Ca ? await B(Q) : C(Q);
3632
+ I === v && (s.value = Fe.map((q) => ({
3633
+ id: q.item[t.idKey] ?? `${q.x}-${q.y}`,
3634
+ x: q.x,
3635
+ y: q.y,
3636
+ count: q.group.length,
3637
+ group: q.group,
3638
+ original: q.item
3639
+ })));
3640
+ }
3641
+ function R() {
3642
+ const I = s.value;
3643
+ if (!I.length || !h) return;
3644
+ const w = t.offsetX * u, _ = t.offsetY * u;
3645
+ for (const k of I) {
3646
+ const G = h.project([
3647
+ k.original[t.lonKey],
3648
+ k.original[t.latKey]
3649
+ ]), F = l[k.id];
3650
+ F && (F.style.transform = `translate3d(${G.x + w}px,${G.y + _}px,0)`);
3651
+ }
3652
+ }
3653
+ function C(I) {
3654
+ const w = Ht(t.clusterPixelRange) || t.clusterPixelRange, _ = /* @__PURE__ */ new Map();
3655
+ for (const k of I) {
3656
+ const G = Math.floor(k.x / w), F = Math.floor(k.y / w);
3657
+ let D = !1;
3658
+ for (let Q = -1; Q <= 1 && !D; Q++)
3659
+ for (let Ye = -1; Ye <= 1 && !D; Ye++) {
3660
+ const Fe = _.get(`${G + Q},${F + Ye}`);
3661
+ Fe && Math.sqrt(
3662
+ (k.x - Fe.x) ** 2 + (k.y - Fe.y) ** 2
3663
+ ) < w && (Fe.group.push(k.item), D = !0);
3664
+ }
3665
+ D || _.set(`${G},${F}`, {
3666
+ item: k.item,
3667
+ x: k.x,
3668
+ y: k.y,
3669
+ group: [k.item]
3670
+ });
3671
+ }
3672
+ return Array.from(_.values());
3673
+ }
3674
+ function b() {
3675
+ if (!d) {
3676
+ const I = `
3677
+ self.onmessage = function(e) {
3678
+ const { visible, cellSize } = e.data
3679
+ const grid = new Map()
3680
+
3681
+ for (const v of visible) {
3682
+ const cellX = Math.floor(v.x / cellSize)
3683
+ const cellY = Math.floor(v.y / cellSize)
3684
+ let merged = false
3685
+
3686
+ for (let dx = -1; dx <= 1 && !merged; dx++) {
3687
+ for (let dy = -1; dy <= 1 && !merged; dy++) {
3688
+ const key = (cellX + dx) + ',' + (cellY + dy)
3689
+ const neighbor = grid.get(key)
3690
+ if (neighbor) {
3691
+ const dist = Math.sqrt((v.x - neighbor.x) ** 2 + (v.y - neighbor.y) ** 2)
3692
+ if (dist < cellSize) {
3693
+ neighbor.group.push(v.item)
3694
+ merged = true
3695
+ }
3696
+ }
3697
+ }
3698
+ }
3699
+
3700
+ if (!merged) {
3701
+ grid.set(cellX + ',' + cellY, {
3702
+ item: v.item,
3703
+ x: v.x,
3704
+ y: v.y,
3705
+ group: [v.item],
3706
+ })
3707
+ }
3708
+ }
3709
+
3710
+ self.postMessage({ result: Array.from(grid.values()) })
3711
+ }
3712
+ `, w = new Blob([I], { type: "application/javascript" });
3713
+ d = new Worker(URL.createObjectURL(w));
3714
+ }
3715
+ return d;
3716
+ }
3717
+ function B(I) {
3718
+ return new Promise((w) => {
3719
+ const _ = b(), k = (G) => {
3720
+ _.removeEventListener("message", k), w(G.data.result);
3721
+ };
3722
+ _.addEventListener("message", k), _.postMessage({
3723
+ visible: I,
3724
+ cellSize: Ht(t.clusterPixelRange) || t.clusterPixelRange
3725
+ });
3726
+ });
3727
+ }
3728
+ function L(I, w) {
3729
+ w ? l[I] = w : delete l[I];
3730
+ }
3731
+ function M(I) {
3732
+ t.clickable && n("click", I.original, I.id);
3733
+ }
3734
+ function T(I) {
3735
+ if (t.window || !t.clickable) return;
3736
+ const { clientX: w, clientY: _ } = I.originalEvent, k = s.value;
3737
+ for (let G = k.length - 1; G >= 0; G--) {
3738
+ const F = k[G], D = l[F.id];
3739
+ if (!D) continue;
3740
+ const Q = D.getBoundingClientRect();
3741
+ if (w >= Q.left && w <= Q.right && _ >= Q.top && _ <= Q.bottom) {
3742
+ n("click", F.original, F.id);
3743
+ return;
3744
+ }
3745
+ }
3746
+ }
3747
+ return (I, w) => i.value ? (N(), Z("div", ba, [
3748
+ (N(!0), Z(Ee, null, Ze(s.value, (_) => (N(), Z("div", {
3749
+ key: _.id,
3750
+ ref_for: !0,
3751
+ ref: (k) => L(_.id, k),
3752
+ style: tt({
3753
+ position: "absolute",
3754
+ left: 0,
3755
+ top: 0,
3756
+ transform: `translate3d(${_.x + I.offsetX * Xt(u)}px,${_.y + I.offsetY * Xt(u)}px,0)`,
3757
+ // window=false 时始终穿透,拖拽不阻塞,点击由 map.click 命中检测处理
3758
+ pointerEvents: I.window && I.clickable ? "auto" : "none",
3759
+ willChange: "transform"
3760
+ }),
3761
+ onClick: Vn((k) => M(_), ["stop"])
3762
+ }, [
3763
+ Dt(I.$slots, "default", {
3764
+ item: _.original,
3765
+ count: _.count,
3766
+ group: _.group,
3767
+ x: _.x,
3768
+ y: _.y
3769
+ })
3770
+ ], 12, Ia))), 128))
3771
+ ])) : be("", !0);
3772
+ }
3773
+ }), Ea = { class: "map-contaienr" }, Aa = {
3565
3774
  __name: "map",
3566
3775
  props: {
3567
3776
  config: {
@@ -3570,23 +3779,23 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3570
3779
  },
3571
3780
  emits: ["load"],
3572
3781
  setup(r, { emit: e }) {
3573
- const t = e, n = r, o = oe(null), i = new ra({
3782
+ const t = e, n = r, o = le(null), i = new pa({
3574
3783
  // @ts-ignore
3575
- domId: nr(o),
3576
- config: nr(n.config)
3784
+ domId: mr(o),
3785
+ config: mr(n.config)
3577
3786
  }, () => {
3578
3787
  t("load", i);
3579
3788
  });
3580
- return (s, l) => (V(), B("div", sa, [
3581
- m("div", {
3789
+ return (s, l) => (N(), Z("div", Ea, [
3790
+ y("div", {
3582
3791
  ref_key: "mapContainer",
3583
3792
  ref: o,
3584
3793
  class: "map-contaienr"
3585
3794
  }, null, 512),
3586
- jt(s.$slots, "default", {}, void 0, !0)
3795
+ Dt(s.$slots, "default", {}, void 0, !0)
3587
3796
  ]));
3588
3797
  }
3589
- }, fn = /* @__PURE__ */ at(la, [["__scopeId", "data-v-151cd952"]]), ca = [
3798
+ }, Rn = /* @__PURE__ */ ut(Aa, [["__scopeId", "data-v-151cd952"]]), Ra = [
3590
3799
  {
3591
3800
  name: "降水",
3592
3801
  colors: [
@@ -3709,57 +3918,57 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3709
3918
  { color: "#000000", value: 100 }
3710
3919
  ]
3711
3920
  }
3712
- ], ua = { class: "color-bar-dialog" }, da = { class: "dialog-body" }, ha = { class: "preset-management" }, fa = { class: "preset-list" }, pa = ["onClick"], ma = { class: "preset-colors-preview" }, va = {
3921
+ ], Ta = { class: "color-bar-dialog" }, wa = { class: "dialog-body" }, La = { class: "preset-management" }, Sa = { class: "preset-list" }, _a = ["onClick"], ka = { class: "preset-colors-preview" }, Ma = {
3713
3922
  key: 0,
3714
3923
  class: "more-count"
3715
- }, ya = { class: "preset-info" }, ba = { class: "preset-name-wrapper" }, ga = { class: "preset-name" }, Ia = {
3924
+ }, Va = { class: "preset-info" }, Ba = { class: "preset-name-wrapper" }, Da = { class: "preset-name" }, Na = {
3716
3925
  key: 0,
3717
3926
  class: "preset-badge"
3718
- }, Ca = { class: "preset-count" }, xa = ["onClick"], Ea = {
3927
+ }, Za = { class: "preset-count" }, Ga = ["onClick"], Ya = {
3719
3928
  key: 0,
3720
3929
  class: "empty-preset-tip"
3721
- }, Aa = { class: "section-title-wrapper" }, Ra = { class: "color-actions" }, Ta = { class: "current-count" }, La = { class: "color-list" }, wa = { class: "color-index" }, Sa = { class: "color-input-wrapper" }, _a = ["onUpdate:modelValue"], ka = { class: "color-input-wrapper" }, Ma = ["onUpdate:modelValue"], Va = ["onClick"], Ba = {
3930
+ }, Fa = { class: "section-title-wrapper" }, Pa = { class: "color-actions" }, Xa = { class: "current-count" }, Wa = { class: "color-list" }, za = { class: "color-index" }, Ha = { class: "color-input-wrapper" }, Ka = ["onUpdate:modelValue"], Oa = { class: "color-input-wrapper" }, Ua = ["onUpdate:modelValue"], Qa = ["onClick"], ja = {
3722
3931
  key: 0,
3723
3932
  class: "save-dialog-overlay"
3724
- }, Da = { class: "save-dialog" }, pr = "bluestar-color-presets", Za = /* @__PURE__ */ ot({
3933
+ }, Ja = { class: "save-dialog" }, Tr = "bluestar-color-presets", $a = /* @__PURE__ */ $e({
3725
3934
  __name: "color-bar-edit",
3726
3935
  props: {
3727
3936
  modelValue: { default: () => [] }
3728
3937
  },
3729
3938
  emits: ["confirm", "cancel"],
3730
3939
  setup(r, { emit: e }) {
3731
- const t = r, n = e, o = oe([...t.modelValue]), i = oe([]), s = oe(-1), l = oe(!1), u = oe(""), c = oe(!1), h = oe(""), d = oe("success");
3732
- Ut(() => {
3733
- i.value = ca.map((L) => ({
3734
- ...L,
3940
+ const t = r, n = e, o = le([...t.modelValue]), i = le([]), s = le(-1), l = le(!1), u = le(""), c = le(!1), h = le(""), d = le("success");
3941
+ sr(() => {
3942
+ i.value = Ra.map((I) => ({
3943
+ ...I,
3735
3944
  isPreset: !0
3736
3945
  }));
3737
- const R = localStorage.getItem(pr);
3738
- if (R)
3946
+ const T = localStorage.getItem(Tr);
3947
+ if (T)
3739
3948
  try {
3740
- JSON.parse(R).forEach((M) => {
3949
+ JSON.parse(T).forEach((w) => {
3741
3950
  i.value.push({
3742
- ...M,
3951
+ ...w,
3743
3952
  isPreset: !1
3744
3953
  });
3745
3954
  });
3746
- } catch (L) {
3747
- console.error("解析色卡数据失败", L);
3955
+ } catch (I) {
3956
+ console.error("解析色卡数据失败", I);
3748
3957
  }
3749
3958
  });
3750
3959
  function p() {
3751
- const R = i.value.filter((L) => !L.isPreset);
3752
- localStorage.setItem(pr, JSON.stringify(R));
3960
+ const T = i.value.filter((I) => !I.isPreset);
3961
+ localStorage.setItem(Tr, JSON.stringify(T));
3753
3962
  }
3754
- function f(R, L = "success") {
3755
- h.value = R, d.value = L, c.value = !0, setTimeout(() => {
3963
+ function f(T, I = "success") {
3964
+ h.value = T, d.value = I, c.value = !0, setTimeout(() => {
3756
3965
  c.value = !1;
3757
3966
  }, 2e3);
3758
3967
  }
3759
- function v() {
3968
+ function m() {
3760
3969
  u.value = "", l.value = !0;
3761
3970
  }
3762
- function y() {
3971
+ function v() {
3763
3972
  l.value = !1, u.value = "";
3764
3973
  }
3765
3974
  function x() {
@@ -3767,243 +3976,243 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
3767
3976
  f("请输入色卡名称", "error");
3768
3977
  return;
3769
3978
  }
3770
- const R = i.value.findIndex((L) => !L.isPreset && L.name === u.value.trim());
3771
- if (R !== -1)
3979
+ const T = i.value.findIndex((I) => !I.isPreset && I.name === u.value.trim());
3980
+ if (T !== -1)
3772
3981
  if (confirm(`色卡"${u.value}"已存在,是否覆盖?`))
3773
- i.value[R].colors = [...o.value], p(), f("色卡已更新", "success");
3982
+ i.value[T].colors = [...o.value], p(), f("色卡已更新", "success");
3774
3983
  else {
3775
- y();
3984
+ v();
3776
3985
  return;
3777
3986
  }
3778
3987
  else {
3779
- const L = {
3988
+ const I = {
3780
3989
  name: u.value.trim(),
3781
3990
  colors: [...o.value],
3782
3991
  isPreset: !1
3783
3992
  };
3784
- i.value.push(L), p(), f("色卡保存成功", "success");
3993
+ i.value.push(I), p(), f("色卡保存成功", "success");
3785
3994
  }
3786
- y();
3995
+ v();
3787
3996
  }
3788
- function A(R) {
3789
- R < 0 || R >= i.value.length || (s.value = R, o.value = JSON.parse(JSON.stringify(i.value[R].colors)), f(`已加载色卡:${i.value[R].name}`, "success"));
3997
+ function R(T) {
3998
+ T < 0 || T >= i.value.length || (s.value = T, o.value = JSON.parse(JSON.stringify(i.value[T].colors)), f(`已加载色卡:${i.value[T].name}`, "success"));
3790
3999
  }
3791
- function I(R, L) {
3792
- L.stopPropagation();
3793
- const M = i.value[R];
3794
- if (M.isPreset) {
4000
+ function C(T, I) {
4001
+ I.stopPropagation();
4002
+ const w = i.value[T];
4003
+ if (w.isPreset) {
3795
4004
  f("预置色卡不能删除", "error");
3796
4005
  return;
3797
4006
  }
3798
- confirm(`确定要删除色卡"${M.name}"吗?`) && (i.value.splice(R, 1), p(), s.value === R ? s.value = -1 : s.value > R && s.value--, f("色卡已删除", "success"));
4007
+ confirm(`确定要删除色卡"${w.name}"吗?`) && (i.value.splice(T, 1), p(), s.value === T ? s.value = -1 : s.value > T && s.value--, f("色卡已删除", "success"));
3799
4008
  }
3800
- function g() {
3801
- const R = o.value.length > 0 ? o.value[o.value.length - 1].value : 0;
4009
+ function b() {
4010
+ const T = o.value.length > 0 ? o.value[o.value.length - 1].value : 0;
3802
4011
  o.value.push({
3803
4012
  color: "#ffffff",
3804
- value: R + 10
4013
+ value: T + 10
3805
4014
  }), s.value !== -1 && i.value[s.value] && (i.value[s.value].colors = [...o.value], p()), f("颜色已添加", "success");
3806
4015
  }
3807
- function k(R, L) {
3808
- if (L.stopPropagation(), o.value.length <= 2) {
4016
+ function B(T, I) {
4017
+ if (I.stopPropagation(), o.value.length <= 2) {
3809
4018
  f("至少保留两个颜色", "error");
3810
4019
  return;
3811
4020
  }
3812
- o.value.splice(R, 1), s.value !== -1 && i.value[s.value] && (i.value[s.value].colors = [...o.value], p()), f("颜色已删除", "success");
4021
+ o.value.splice(T, 1), s.value !== -1 && i.value[s.value] && (i.value[s.value].colors = [...o.value], p()), f("颜色已删除", "success");
3813
4022
  }
3814
- const T = () => {
4023
+ const L = () => {
3815
4024
  n("confirm", o.value);
3816
- }, S = () => {
4025
+ }, M = () => {
3817
4026
  n("cancel");
3818
4027
  };
3819
- return (R, L) => (V(), B("div", ua, [
3820
- L[10] || (L[10] = m("div", { class: "dialog-header" }, [
3821
- m("h3", null, "颜色编辑")
4028
+ return (T, I) => (N(), Z("div", Ta, [
4029
+ I[10] || (I[10] = y("div", { class: "dialog-header" }, [
4030
+ y("h3", null, "颜色编辑")
3822
4031
  ], -1)),
3823
- m("div", da, [
3824
- m("div", ha, [
3825
- m("div", { class: "preset-header" }, [
3826
- L[2] || (L[2] = m("span", { class: "section-title" }, "我的色卡", -1)),
3827
- m("button", {
4032
+ y("div", wa, [
4033
+ y("div", La, [
4034
+ y("div", { class: "preset-header" }, [
4035
+ I[2] || (I[2] = y("span", { class: "section-title" }, "我的色卡", -1)),
4036
+ y("button", {
3828
4037
  class: "btn-save-preset",
3829
- onClick: v,
4038
+ onClick: m,
3830
4039
  title: "保存当前色卡"
3831
- }, L[1] || (L[1] = [
3832
- m("svg", {
4040
+ }, I[1] || (I[1] = [
4041
+ y("svg", {
3833
4042
  width: "16",
3834
4043
  height: "16",
3835
4044
  viewBox: "0 0 16 16",
3836
4045
  fill: "currentColor"
3837
4046
  }, [
3838
- m("path", { d: "M14 1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm-3 14H5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2zm0-4H5V4h6v7z" })
4047
+ y("path", { d: "M14 1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zm-3 14H5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2zm0-4H5V4h6v7z" })
3839
4048
  ], -1),
3840
- Ue(" 保存色卡 ", -1)
4049
+ qe(" 保存色卡 ", -1)
3841
4050
  ]))
3842
4051
  ]),
3843
- m("div", fa, [
3844
- (V(!0), B(Te, null, Ge(i.value, (M, Z) => (V(), B("div", {
3845
- key: Z,
3846
- class: de(["preset-item", { active: s.value === Z }]),
3847
- onClick: (N) => A(Z)
4052
+ y("div", Sa, [
4053
+ (N(!0), Z(Ee, null, Ze(i.value, (w, _) => (N(), Z("div", {
4054
+ key: _,
4055
+ class: pe(["preset-item", { active: s.value === _ }]),
4056
+ onClick: (k) => R(_)
3848
4057
  }, [
3849
- m("div", ma, [
3850
- (V(!0), B(Te, null, Ge(M.colors.slice(0, 5), (N, ce) => (V(), B("div", {
3851
- key: ce,
4058
+ y("div", ka, [
4059
+ (N(!0), Z(Ee, null, Ze(w.colors.slice(0, 5), (k, G) => (N(), Z("div", {
4060
+ key: G,
3852
4061
  class: "preview-color-block",
3853
- style: pt({ backgroundColor: N.color })
4062
+ style: tt({ backgroundColor: k.color })
3854
4063
  }, null, 4))), 128)),
3855
- M.colors.length > 5 ? (V(), B("div", va, "+" + ae(M.colors.length - 5), 1)) : Ie("", !0)
4064
+ w.colors.length > 5 ? (N(), Z("div", Ma, "+" + ce(w.colors.length - 5), 1)) : be("", !0)
3856
4065
  ]),
3857
- m("div", ya, [
3858
- m("div", ba, [
3859
- m("span", ga, ae(M.name), 1),
3860
- M.isPreset ? (V(), B("span", Ia, "预置")) : Ie("", !0)
4066
+ y("div", Va, [
4067
+ y("div", Ba, [
4068
+ y("span", Da, ce(w.name), 1),
4069
+ w.isPreset ? (N(), Z("span", Na, "预置")) : be("", !0)
3861
4070
  ]),
3862
- m("span", Ca, ae(M.colors.length) + "个颜色", 1)
4071
+ y("span", Za, ce(w.colors.length) + "个颜色", 1)
3863
4072
  ]),
3864
- M.isPreset ? Ie("", !0) : (V(), B("button", {
4073
+ w.isPreset ? be("", !0) : (N(), Z("button", {
3865
4074
  key: 0,
3866
4075
  class: "btn-delete-preset",
3867
- onClick: (N) => I(Z, N),
4076
+ onClick: (k) => C(_, k),
3868
4077
  title: "删除色卡"
3869
- }, L[3] || (L[3] = [
3870
- m("svg", {
4078
+ }, I[3] || (I[3] = [
4079
+ y("svg", {
3871
4080
  width: "14",
3872
4081
  height: "14",
3873
4082
  viewBox: "0 0 14 14",
3874
4083
  fill: "currentColor"
3875
4084
  }, [
3876
- m("path", { d: "M11.867 2.533l-.933-.933-3.734 3.733L3.467 1.6 2.533 2.533l3.734 3.734L2.533 10l.934.933 3.734-3.733 3.733 3.733.934-.933-3.734-3.733 3.734-3.734z" })
4085
+ y("path", { d: "M11.867 2.533l-.933-.933-3.734 3.733L3.467 1.6 2.533 2.533l3.734 3.734L2.533 10l.934.933 3.734-3.733 3.733 3.733.934-.933-3.734-3.733 3.734-3.734z" })
3877
4086
  ], -1)
3878
- ]), 8, xa))
3879
- ], 10, pa))), 128)),
3880
- i.value.length === 0 ? (V(), B("div", Ea, ' 暂无保存的色卡,点击"保存色卡"创建 ')) : Ie("", !0)
4087
+ ]), 8, Ga))
4088
+ ], 10, _a))), 128)),
4089
+ i.value.length === 0 ? (N(), Z("div", Ya, ' 暂无保存的色卡,点击"保存色卡"创建 ')) : be("", !0)
3881
4090
  ])
3882
4091
  ]),
3883
- m("div", Aa, [
3884
- L[5] || (L[5] = m("span", { class: "section-title" }, "使用色卡", -1)),
3885
- m("div", Ra, [
3886
- m("button", {
4092
+ y("div", Fa, [
4093
+ I[5] || (I[5] = y("span", { class: "section-title" }, "使用色卡", -1)),
4094
+ y("div", Pa, [
4095
+ y("button", {
3887
4096
  class: "btn-add-color",
3888
- onClick: g,
4097
+ onClick: b,
3889
4098
  title: "添加颜色"
3890
- }, L[4] || (L[4] = [
3891
- m("svg", {
4099
+ }, I[4] || (I[4] = [
4100
+ y("svg", {
3892
4101
  width: "16",
3893
4102
  height: "16",
3894
4103
  viewBox: "0 0 16 16",
3895
4104
  fill: "currentColor"
3896
4105
  }, [
3897
- m("path", { d: "M8 0a1 1 0 0 1 1 1v6h6a1 1 0 1 1 0 2H9v6a1 1 0 1 1-2 0V9H1a1 1 0 0 1 0-2h6V1a1 1 0 0 1 1-1z" })
4106
+ y("path", { d: "M8 0a1 1 0 0 1 1 1v6h6a1 1 0 1 1 0 2H9v6a1 1 0 1 1-2 0V9H1a1 1 0 0 1 0-2h6V1a1 1 0 0 1 1-1z" })
3898
4107
  ], -1),
3899
- Ue(" 添加颜色 ", -1)
4108
+ qe(" 添加颜色 ", -1)
3900
4109
  ])),
3901
- m("span", Ta, "共 " + ae(o.value.length) + " 个颜色", 1)
4110
+ y("span", Xa, "共 " + ce(o.value.length) + " 个颜色", 1)
3902
4111
  ])
3903
4112
  ]),
3904
- m("div", La, [
3905
- (V(!0), B(Te, null, Ge(o.value, (M, Z) => (V(), B("div", {
4113
+ y("div", Wa, [
4114
+ (N(!0), Z(Ee, null, Ze(o.value, (w, _) => (N(), Z("div", {
3906
4115
  class: "color-item",
3907
- key: Z
4116
+ key: _
3908
4117
  }, [
3909
- m("div", wa, ae(Z + 1), 1),
3910
- m("div", {
4118
+ y("div", za, ce(_ + 1), 1),
4119
+ y("div", {
3911
4120
  class: "color-preview",
3912
- style: pt({ backgroundColor: M.color })
4121
+ style: tt({ backgroundColor: w.color })
3913
4122
  }, null, 4),
3914
- m("div", Sa, [
3915
- L[6] || (L[6] = m("label", null, "数值:", -1)),
3916
- Se(m("input", {
4123
+ y("div", Ha, [
4124
+ I[6] || (I[6] = y("label", null, "数值:", -1)),
4125
+ ke(y("input", {
3917
4126
  class: "color-set",
3918
4127
  type: "number",
3919
- "onUpdate:modelValue": (N) => M.value = N,
4128
+ "onUpdate:modelValue": (k) => w.value = k,
3920
4129
  step: "0.1"
3921
- }, null, 8, _a), [
4130
+ }, null, 8, Ka), [
3922
4131
  [
3923
- Qe,
3924
- M.value,
4132
+ et,
4133
+ w.value,
3925
4134
  void 0,
3926
4135
  { number: !0 }
3927
4136
  ]
3928
4137
  ])
3929
4138
  ]),
3930
- m("div", ka, [
3931
- L[7] || (L[7] = m("label", null, "颜色:", -1)),
3932
- Se(m("input", {
4139
+ y("div", Oa, [
4140
+ I[7] || (I[7] = y("label", null, "颜色:", -1)),
4141
+ ke(y("input", {
3933
4142
  class: "color-picker",
3934
4143
  type: "color",
3935
- "onUpdate:modelValue": (N) => M.color = N
3936
- }, null, 8, Ma), [
3937
- [Qe, M.color]
4144
+ "onUpdate:modelValue": (k) => w.color = k
4145
+ }, null, 8, Ua), [
4146
+ [et, w.color]
3938
4147
  ])
3939
4148
  ]),
3940
- m("button", {
4149
+ y("button", {
3941
4150
  class: "btn-delete-color",
3942
- onClick: (N) => k(Z, N),
4151
+ onClick: (k) => B(_, k),
3943
4152
  title: "删除此颜色"
3944
- }, L[8] || (L[8] = [
3945
- m("svg", {
4153
+ }, I[8] || (I[8] = [
4154
+ y("svg", {
3946
4155
  width: "16",
3947
4156
  height: "16",
3948
4157
  viewBox: "0 0 16 16",
3949
4158
  fill: "currentColor"
3950
4159
  }, [
3951
- m("path", { d: "M2.5 1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1H3v9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4h.5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1H2.5zm3 4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5zM8 5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7A.5.5 0 0 1 8 5zm3 .5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0z" })
4160
+ y("path", { d: "M2.5 1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1H3v9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4h.5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1H2.5zm3 4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5zM8 5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7A.5.5 0 0 1 8 5zm3 .5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0z" })
3952
4161
  ], -1)
3953
- ]), 8, Va)
4162
+ ]), 8, Qa)
3954
4163
  ]))), 128))
3955
4164
  ])
3956
4165
  ]),
3957
- m("div", { class: "dialog-footer" }, [
3958
- m("button", {
4166
+ y("div", { class: "dialog-footer" }, [
4167
+ y("button", {
3959
4168
  class: "btn btn-cancel",
3960
- onClick: S
4169
+ onClick: M
3961
4170
  }, "取消"),
3962
- m("button", {
4171
+ y("button", {
3963
4172
  class: "btn btn-confirm",
3964
- onClick: T
4173
+ onClick: L
3965
4174
  }, "确认")
3966
4175
  ]),
3967
- l.value ? (V(), B("div", Ba, [
3968
- m("div", Da, [
3969
- L[9] || (L[9] = m("h4", null, "保存色卡", -1)),
3970
- Se(m("input", {
4176
+ l.value ? (N(), Z("div", ja, [
4177
+ y("div", Ja, [
4178
+ I[9] || (I[9] = y("h4", null, "保存色卡", -1)),
4179
+ ke(y("input", {
3971
4180
  type: "text",
3972
- "onUpdate:modelValue": L[0] || (L[0] = (M) => u.value = M),
4181
+ "onUpdate:modelValue": I[0] || (I[0] = (w) => u.value = w),
3973
4182
  placeholder: "请输入色卡名称",
3974
4183
  class: "preset-name-input",
3975
4184
  onKeyup: [
3976
- kt(x, ["enter"]),
3977
- kt(y, ["esc"])
4185
+ Wt(x, ["enter"]),
4186
+ Wt(v, ["esc"])
3978
4187
  ],
3979
4188
  autofocus: ""
3980
4189
  }, null, 544), [
3981
- [Qe, u.value]
4190
+ [et, u.value]
3982
4191
  ]),
3983
- m("div", { class: "save-dialog-buttons" }, [
3984
- m("button", {
4192
+ y("div", { class: "save-dialog-buttons" }, [
4193
+ y("button", {
3985
4194
  class: "btn btn-small btn-cancel",
3986
- onClick: y
4195
+ onClick: v
3987
4196
  }, "取消"),
3988
- m("button", {
4197
+ y("button", {
3989
4198
  class: "btn btn-small btn-confirm",
3990
4199
  onClick: x
3991
4200
  }, "保存")
3992
4201
  ])
3993
4202
  ])
3994
- ])) : Ie("", !0),
3995
- Mt(In, { name: "toast" }, {
3996
- default: Tr(() => [
3997
- c.value ? (V(), B("div", {
4203
+ ])) : be("", !0),
4204
+ zt(Bn, { name: "toast" }, {
4205
+ default: Gr(() => [
4206
+ c.value ? (N(), Z("div", {
3998
4207
  key: 0,
3999
- class: de(["toast", "toast-" + d.value])
4000
- }, ae(h.value), 3)) : Ie("", !0)
4208
+ class: pe(["toast", "toast-" + d.value])
4209
+ }, ce(h.value), 3)) : be("", !0)
4001
4210
  ]),
4002
4211
  _: 1
4003
4212
  })
4004
4213
  ]));
4005
4214
  }
4006
- }), Ga = /* @__PURE__ */ at(Za, [["__scopeId", "data-v-b42a8bd9"]]), Na = { class: "color-value" }, Ya = /* @__PURE__ */ ot({
4215
+ }), qa = /* @__PURE__ */ ut($a, [["__scopeId", "data-v-b42a8bd9"]]), ei = { class: "color-value" }, ti = /* @__PURE__ */ $e({
4007
4216
  __name: "color-bar",
4008
4217
  props: {
4009
4218
  modelValue: { default: () => [] },
@@ -4011,7 +4220,7 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4011
4220
  },
4012
4221
  emits: ["update:modelValue"],
4013
4222
  setup(r) {
4014
- const e = Cn(r, "modelValue"), t = De({
4223
+ const e = Dn(r, "modelValue"), t = Ge({
4015
4224
  editColor: [],
4016
4225
  isEdit: !1
4017
4226
  });
@@ -4021,33 +4230,33 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4021
4230
  function o(i) {
4022
4231
  e.value = i, t.isEdit = !1, t.editColor = [];
4023
4232
  }
4024
- return (i, s) => (V(), B(Te, null, [
4025
- m("div", {
4233
+ return (i, s) => (N(), Z(Ee, null, [
4234
+ y("div", {
4026
4235
  class: "colorRamp",
4027
4236
  onClick: n
4028
4237
  }, [
4029
- (V(!0), B(Te, null, Ge(e.value, (l) => (V(), B("div", null, [
4030
- m("div", {
4238
+ (N(!0), Z(Ee, null, Ze(e.value, (l) => (N(), Z("div", null, [
4239
+ y("div", {
4031
4240
  class: "color",
4032
- style: pt({ backgroundColor: l.color })
4241
+ style: tt({ backgroundColor: l.color })
4033
4242
  }, [
4034
- m("div", Na, ae(l.value), 1)
4243
+ y("div", ei, ce(l.value), 1)
4035
4244
  ], 4)
4036
4245
  ]))), 256))
4037
4246
  ]),
4038
- t.isEdit ? (V(), Lr(Ga, {
4247
+ t.isEdit ? (N(), Yr(qa, {
4039
4248
  key: 0,
4040
4249
  "model-value": t.editColor,
4041
4250
  onCancel: n,
4042
4251
  onConfirm: o
4043
- }, null, 8, ["model-value"])) : Ie("", !0)
4252
+ }, null, 8, ["model-value"])) : be("", !0)
4044
4253
  ], 64));
4045
4254
  }
4046
- }), Fa = /* @__PURE__ */ at(Ya, [["__scopeId", "data-v-0e80ba0d"]]), Pa = /* @__PURE__ */ ot({
4255
+ }), ri = /* @__PURE__ */ ut(ti, [["__scopeId", "data-v-0e80ba0d"]]), ni = /* @__PURE__ */ $e({
4047
4256
  __name: "render",
4048
4257
  setup(r, { expose: e }) {
4049
- const t = er(() => {
4050
- }), n = De({
4258
+ const t = Nt(() => {
4259
+ }), n = Ge({
4051
4260
  colors: [
4052
4261
  { value: 0, color: "#0000" },
4053
4262
  { value: 2, color: "#b9f297" },
@@ -4086,7 +4295,7 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4086
4295
  function s() {
4087
4296
  o && (o.colorRamp = n.colors);
4088
4297
  }
4089
- return Qt(() => o == null ? void 0 : o.destroy()), e({ renderWeg: i }), (l, u) => (V(), Lr(Fa, {
4298
+ return Bt(() => o == null ? void 0 : o.destroy()), e({ renderWeg: i }), (l, u) => (N(), Yr(ri, {
4090
4299
  modelValue: n.colors,
4091
4300
  "onUpdate:modelValue": [
4092
4301
  u[0] || (u[0] = (c) => n.colors = c),
@@ -4094,16 +4303,16 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4094
4303
  ]
4095
4304
  }, null, 8, ["modelValue"]));
4096
4305
  }
4097
- }), Xa = ["title"], Wa = {
4306
+ }), oi = ["title"], ai = {
4098
4307
  key: 0,
4099
4308
  class: "attribute-panel"
4100
- }, za = { class: "panel-header" }, Ha = { class: "file-info" }, Ka = { class: "attribute-table" }, Oa = { class: "field-name" }, Ua = {
4309
+ }, ii = { class: "panel-header" }, si = { class: "file-info" }, li = { class: "attribute-table" }, ci = { class: "field-name" }, ui = {
4101
4310
  key: 0,
4102
4311
  class: "edit-cell"
4103
- }, Qa = ["type", "onUpdate:modelValue", "onBlur", "onKeypress"], ja = ["onClick"], Ja = { class: "type-cell" }, $a = { class: "status-cell" }, qa = { class: "action-cell" }, ei = ["onClick"], ti = ["onClick"], ri = { class: "add-field-section" }, ni = { class: "add-field-form" }, oi = { class: "export-section" }, ai = { class: "export-form" }, ii = {
4312
+ }, di = ["type", "onUpdate:modelValue", "onBlur", "onKeypress"], hi = ["onClick"], fi = { class: "type-cell" }, pi = { class: "status-cell" }, mi = { class: "action-cell" }, vi = ["onClick"], yi = ["onClick"], gi = { class: "add-field-section" }, bi = { class: "add-field-form" }, Ii = { class: "export-section" }, Ci = { class: "export-form" }, xi = {
4104
4313
  __name: "tool",
4105
4314
  setup(r) {
4106
- const e = De({
4315
+ const e = Ge({
4107
4316
  baseInfo: null,
4108
4317
  attributes: {
4109
4318
  dtype: null,
@@ -4119,71 +4328,71 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4119
4328
  addType: "number",
4120
4329
  fileName: ""
4121
4330
  });
4122
- let t = De({
4331
+ let t = Ge({
4123
4332
  wegFile: null,
4124
4333
  data: null,
4125
4334
  directionData: null
4126
4335
  });
4127
- const n = oe(null), o = oe(!1), i = oe(!1);
4336
+ const n = le(null), o = le(!1), i = le(!1);
4128
4337
  function s() {
4129
4338
  o.value = !o.value;
4130
4339
  }
4131
4340
  function l() {
4132
- var g;
4133
- const I = (g = window.present) == null ? void 0 : g.wegCache;
4134
- I && confirm("已存在缓存文件,是否加载?") && p(I);
4341
+ var b;
4342
+ const C = (b = window.present) == null ? void 0 : b.wegCache;
4343
+ C && confirm("已存在缓存文件,是否加载?") && p(C);
4135
4344
  }
4136
- async function u(I) {
4137
- let g = await I.target.files[0].arrayBuffer(), k = await or(g);
4138
- p(k);
4345
+ async function u(C) {
4346
+ let b = await C.target.files[0].arrayBuffer(), B = await vr(b);
4347
+ p(B);
4139
4348
  }
4140
- async function c(I) {
4141
- var T;
4142
- I.preventDefault(), I.stopPropagation(), i.value = !1;
4143
- const g = (T = I.dataTransfer) == null ? void 0 : T.files;
4144
- if (!g || g.length === 0) return;
4145
- const k = g[0];
4146
- if (!k.name.endsWith(".weg") && !k.name.endsWith(".weg.gz")) {
4349
+ async function c(C) {
4350
+ var L;
4351
+ C.preventDefault(), C.stopPropagation(), i.value = !1;
4352
+ const b = (L = C.dataTransfer) == null ? void 0 : L.files;
4353
+ if (!b || b.length === 0) return;
4354
+ const B = b[0];
4355
+ if (!B.name.endsWith(".weg") && !B.name.endsWith(".weg.gz")) {
4147
4356
  alert("仅支持 .weg 和 .weg.gz 格式的文件");
4148
4357
  return;
4149
4358
  }
4150
4359
  try {
4151
- let S = await k.arrayBuffer(), R = await or(S);
4152
- p(R);
4153
- } catch (S) {
4154
- console.error("文件解析失败:", S), alert("文件解析失败,请确认文件格式正确");
4360
+ let M = await B.arrayBuffer(), T = await vr(M);
4361
+ p(T);
4362
+ } catch (M) {
4363
+ console.error("文件解析失败:", M), alert("文件解析失败,请确认文件格式正确");
4155
4364
  }
4156
4365
  }
4157
- function h(I) {
4158
- I.preventDefault(), I.stopPropagation(), i.value = !0;
4366
+ function h(C) {
4367
+ C.preventDefault(), C.stopPropagation(), i.value = !0;
4159
4368
  }
4160
- function d(I) {
4161
- I.preventDefault(), I.stopPropagation(), i.value = !1;
4369
+ function d(C) {
4370
+ C.preventDefault(), C.stopPropagation(), i.value = !1;
4162
4371
  }
4163
- function p(I) {
4164
- var T;
4165
- (T = n == null ? void 0 : n.value) == null || T.renderWeg(I);
4166
- const g = I.data, k = I.directionData;
4167
- for (const S in e.attributes)
4168
- S !== "block" && (e.attributes[S] = {
4169
- value: I[S],
4372
+ function p(C) {
4373
+ var L;
4374
+ (L = n == null ? void 0 : n.value) == null || L.renderWeg(C);
4375
+ const b = C.data, B = C.directionData;
4376
+ for (const M in e.attributes)
4377
+ M !== "block" && (e.attributes[M] = {
4378
+ value: C[M],
4170
4379
  status: "初始值",
4171
4380
  modify: !1,
4172
- type: typeof I[S] == "number" ? "number" : "text"
4381
+ type: typeof C[M] == "number" ? "number" : "text"
4173
4382
  });
4174
- for (const S in I)
4175
- S !== "block" && (e.attributes[S] = {
4176
- value: I[S],
4383
+ for (const M in C)
4384
+ M !== "block" && (e.attributes[M] = {
4385
+ value: C[M],
4177
4386
  status: "初始值",
4178
4387
  modify: !1,
4179
- type: typeof I[S] == "number" ? "number" : "text"
4388
+ type: typeof C[M] == "number" ? "number" : "text"
4180
4389
  });
4181
- e.loaded = !0, t.wegFile = I, t.data = g, t.directionData = k ?? null;
4390
+ e.loaded = !0, t.wegFile = C, t.data = b, t.directionData = B ?? null;
4182
4391
  }
4183
- function f(I, g) {
4184
- I.modify = !1, I.value != t.wegFile[g] && (I.status = "已修改");
4392
+ function f(C, b) {
4393
+ C.modify = !1, C.value != t.wegFile[b] && (C.status = "已修改");
4185
4394
  }
4186
- function v() {
4395
+ function m() {
4187
4396
  e.addName && (e.attributes[e.addName] = {
4188
4397
  value: "",
4189
4398
  status: "初始值",
@@ -4191,8 +4400,8 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4191
4400
  type: e.addType
4192
4401
  });
4193
4402
  }
4194
- function y(I) {
4195
- switch (I) {
4403
+ function v(C) {
4404
+ switch (C) {
4196
4405
  case "已修改":
4197
4406
  return "attribute-change";
4198
4407
  case "已删除":
@@ -4201,147 +4410,147 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4201
4410
  return "";
4202
4411
  }
4203
4412
  }
4204
- function x(I, g) {
4205
- I.value = t.wegFile[g] ?? "", I.type = typeof I.value == "string" ? "text" : "number", I.status = "初始值";
4413
+ function x(C, b) {
4414
+ C.value = t.wegFile[b] ?? "", C.type = typeof C.value == "string" ? "text" : "number", C.status = "初始值";
4206
4415
  }
4207
- async function A() {
4208
- const { data: I, directionData: g } = t, k = {};
4209
- for (const G in e.attributes) {
4210
- const tr = e.attributes[G];
4211
- tr.status !== "已删除" && (k[G] = tr.value);
4416
+ async function R() {
4417
+ const { data: C, directionData: b } = t, B = {};
4418
+ for (const D in e.attributes) {
4419
+ const Q = e.attributes[D];
4420
+ Q.status !== "已删除" && (B[D] = Q.value);
4212
4421
  }
4213
- const T = JSON.stringify(k), R = new TextEncoder().encode(T).buffer, L = new Int32Array([R.byteLength]), M = I.buffer;
4214
- let Z;
4215
- g ? Z = new Blob([L, R, M, g], { type: "application/octet-stream" }) : Z = new Blob([L, R, M], { type: "application/octet-stream" });
4216
- const N = await kn(Z), ce = URL.createObjectURL(N), ve = document.createElement("a");
4217
- ve.href = ce, ve.download = (e.fileName ? e.fileName : "rebuild") + ".weg.gz", ve.click(), URL.revokeObjectURL(ce), alert("导出成功");
4422
+ const L = JSON.stringify(B), T = new TextEncoder().encode(L).buffer, I = new Int32Array([T.byteLength]), w = C.buffer;
4423
+ let _;
4424
+ b ? _ = new Blob([I, T, w, b], { type: "application/octet-stream" }) : _ = new Blob([I, T, w], { type: "application/octet-stream" });
4425
+ const k = await Wn(_), G = URL.createObjectURL(k), F = document.createElement("a");
4426
+ F.href = G, F.download = (e.fileName ? e.fileName : "rebuild") + ".weg.gz", F.click(), URL.revokeObjectURL(G), alert("导出成功");
4218
4427
  }
4219
- return (I, g) => {
4220
- var k;
4221
- return V(), B(Te, null, [
4222
- Mt(fn, { onLoad: l }, {
4223
- default: Tr(() => [
4224
- Mt(Pa, {
4428
+ return (C, b) => {
4429
+ var B;
4430
+ return N(), Z(Ee, null, [
4431
+ zt(Rn, { onLoad: l }, {
4432
+ default: Gr(() => [
4433
+ zt(ni, {
4225
4434
  ref_key: "render",
4226
4435
  ref: n
4227
4436
  }, null, 512)
4228
4437
  ]),
4229
4438
  _: 1
4230
4439
  }),
4231
- m("div", {
4232
- class: de(["tool-container", { collapsed: o.value }])
4440
+ y("div", {
4441
+ class: pe(["tool-container", { collapsed: o.value }])
4233
4442
  }, [
4234
- m("button", {
4443
+ y("button", {
4235
4444
  class: "collapse-btn",
4236
4445
  onClick: s,
4237
4446
  title: o.value ? "展开" : "折叠"
4238
4447
  }, [
4239
- (V(), B("svg", {
4448
+ (N(), Z("svg", {
4240
4449
  width: "20",
4241
4450
  height: "20",
4242
4451
  viewBox: "0 0 24 24",
4243
4452
  fill: "none",
4244
4453
  stroke: "currentColor",
4245
4454
  "stroke-width": "2",
4246
- class: de({ rotated: o.value })
4247
- }, g[3] || (g[3] = [
4248
- m("polyline", { points: "15 18 9 12 15 6" }, null, -1)
4455
+ class: pe({ rotated: o.value })
4456
+ }, b[3] || (b[3] = [
4457
+ y("polyline", { points: "15 18 9 12 15 6" }, null, -1)
4249
4458
  ]), 2))
4250
- ], 8, Xa),
4251
- g[15] || (g[15] = m("div", { class: "tool-header" }, [
4252
- m("h2", null, "WEG 文件工具")
4459
+ ], 8, oi),
4460
+ b[15] || (b[15] = y("div", { class: "tool-header" }, [
4461
+ y("h2", null, "WEG 文件工具")
4253
4462
  ], -1)),
4254
- m("div", {
4255
- class: de(["file-upload-area", { "drag-over": i.value }]),
4463
+ y("div", {
4464
+ class: pe(["file-upload-area", { "drag-over": i.value }]),
4256
4465
  onDrop: c,
4257
4466
  onDragover: h,
4258
4467
  onDragleave: d
4259
4468
  }, [
4260
- m("input", {
4469
+ y("input", {
4261
4470
  type: "file",
4262
4471
  onInput: u,
4263
4472
  id: "file-input",
4264
4473
  class: "file-input",
4265
4474
  accept: ".weg,.weg.gz"
4266
4475
  }, null, 32),
4267
- g[4] || (g[4] = xn('<label for="file-input" class="upload-label" data-v-19a6b16d><div class="upload-content" data-v-19a6b16d><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-19a6b16d><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" data-v-19a6b16d></path><polyline points="17 8 12 3 7 8" data-v-19a6b16d></polyline><line x1="12" y1="3" x2="12" y2="15" data-v-19a6b16d></line></svg><span data-v-19a6b16d>点击选择文件或拖动文件到此处</span><span class="upload-tip" data-v-19a6b16d>支持 .weg 和 .weg.gz 格式</span></div></label>', 1))
4476
+ b[4] || (b[4] = Nn('<label for="file-input" class="upload-label" data-v-19a6b16d><div class="upload-content" data-v-19a6b16d><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-19a6b16d><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" data-v-19a6b16d></path><polyline points="17 8 12 3 7 8" data-v-19a6b16d></polyline><line x1="12" y1="3" x2="12" y2="15" data-v-19a6b16d></line></svg><span data-v-19a6b16d>点击选择文件或拖动文件到此处</span><span class="upload-tip" data-v-19a6b16d>支持 .weg 和 .weg.gz 格式</span></div></label>', 1))
4268
4477
  ], 34),
4269
- e.loaded ? (V(), B("div", Wa, [
4270
- m("div", za, [
4271
- g[5] || (g[5] = m("h3", null, "文件属性", -1)),
4272
- m("span", Ha, ae(((k = En(t).wegFile) == null ? void 0 : k.filename) || "未命名"), 1)
4478
+ e.loaded ? (N(), Z("div", ai, [
4479
+ y("div", ii, [
4480
+ b[5] || (b[5] = y("h3", null, "文件属性", -1)),
4481
+ y("span", si, ce(((B = Xt(t).wegFile) == null ? void 0 : B.filename) || "未命名"), 1)
4273
4482
  ]),
4274
- m("table", Ka, [
4275
- g[9] || (g[9] = m("thead", null, [
4276
- m("tr", null, [
4277
- m("th", { width: "20%" }, "字段"),
4278
- m("th", { width: "30%" }, "值"),
4279
- m("th", { width: "15%" }, "类型"),
4280
- m("th", { width: "15%" }, "状态"),
4281
- m("th", { width: "20%" }, "操作")
4483
+ y("table", li, [
4484
+ b[9] || (b[9] = y("thead", null, [
4485
+ y("tr", null, [
4486
+ y("th", { width: "20%" }, "字段"),
4487
+ y("th", { width: "30%" }, "值"),
4488
+ y("th", { width: "15%" }, "类型"),
4489
+ y("th", { width: "15%" }, "状态"),
4490
+ y("th", { width: "20%" }, "操作")
4282
4491
  ])
4283
4492
  ], -1)),
4284
- m("tbody", null, [
4285
- (V(!0), B(Te, null, Ge(e.attributes, (T, S) => (V(), B("tr", {
4286
- class: de(y(T.status))
4493
+ y("tbody", null, [
4494
+ (N(!0), Z(Ee, null, Ze(e.attributes, (L, M) => (N(), Z("tr", {
4495
+ class: pe(v(L.status))
4287
4496
  }, [
4288
- m("td", Oa, ae(S), 1),
4289
- m("td", null, [
4290
- T.modify ? (V(), B("div", Ua, [
4291
- Se(m("input", {
4292
- type: T.type === "text" ? "text" : "number",
4293
- "onUpdate:modelValue": (R) => T.value = R,
4294
- onBlur: (R) => f(T, S),
4295
- onKeypress: kt((R) => f(T, S), ["enter"]),
4296
- class: de(["edit-input", T.type === "text" ? "text-input" : "number-input"])
4297
- }, null, 42, Qa), [
4497
+ y("td", ci, ce(M), 1),
4498
+ y("td", null, [
4499
+ L.modify ? (N(), Z("div", ui, [
4500
+ ke(y("input", {
4501
+ type: L.type === "text" ? "text" : "number",
4502
+ "onUpdate:modelValue": (T) => L.value = T,
4503
+ onBlur: (T) => f(L, M),
4504
+ onKeypress: Wt((T) => f(L, M), ["enter"]),
4505
+ class: pe(["edit-input", L.type === "text" ? "text-input" : "number-input"])
4506
+ }, null, 42, di), [
4298
4507
  [
4299
- An,
4300
- T.value,
4508
+ Zn,
4509
+ L.value,
4301
4510
  void 0,
4302
4511
  { trim: !0 }
4303
4512
  ]
4304
4513
  ])
4305
- ])) : (V(), B("div", {
4514
+ ])) : (N(), Z("div", {
4306
4515
  key: 1,
4307
4516
  class: "value-cell",
4308
- onClick: (R) => T.modify = !0
4517
+ onClick: (T) => L.modify = !0
4309
4518
  }, [
4310
- Ue(ae(T.value) + " ", 1),
4311
- g[6] || (g[6] = m("span", { class: "edit-icon" }, "✏️", -1))
4312
- ], 8, ja))
4519
+ qe(ce(L.value) + " ", 1),
4520
+ b[6] || (b[6] = y("span", { class: "edit-icon" }, "✏️", -1))
4521
+ ], 8, hi))
4313
4522
  ]),
4314
- m("td", Ja, [
4315
- m("span", {
4316
- class: de(["type-badge", T.type === "text" ? "type-string" : "type-number"])
4317
- }, ae(T.type === "text" ? "string" : "number"), 3)
4523
+ y("td", fi, [
4524
+ y("span", {
4525
+ class: pe(["type-badge", L.type === "text" ? "type-string" : "type-number"])
4526
+ }, ce(L.type === "text" ? "string" : "number"), 3)
4318
4527
  ]),
4319
- m("td", $a, [
4320
- m("span", {
4321
- class: de(["status-badge", "status-" + T.status.replace("已", "")])
4322
- }, ae(T.status), 3)
4528
+ y("td", pi, [
4529
+ y("span", {
4530
+ class: pe(["status-badge", "status-" + L.status.replace("已", "")])
4531
+ }, ce(L.status), 3)
4323
4532
  ]),
4324
- m("td", qa, [
4325
- m("button", {
4326
- onClick: (R) => T.status = "已删除",
4533
+ y("td", mi, [
4534
+ y("button", {
4535
+ onClick: (T) => L.status = "已删除",
4327
4536
  class: "btn btn-delete",
4328
4537
  title: "删除"
4329
- }, g[7] || (g[7] = [
4330
- m("svg", {
4538
+ }, b[7] || (b[7] = [
4539
+ y("svg", {
4331
4540
  width: "14",
4332
4541
  height: "14",
4333
4542
  viewBox: "0 0 14 14",
4334
4543
  fill: "currentColor"
4335
4544
  }, [
4336
- m("path", { d: "M11.867 2.533l-.933-.933-3.734 3.733L3.467 1.6 2.533 2.533l3.734 3.734L2.533 10l.934.933 3.733-3.733 3.733 3.733.934-.933-3.734-3.733 3.734-3.734z" })
4545
+ y("path", { d: "M11.867 2.533l-.933-.933-3.734 3.733L3.467 1.6 2.533 2.533l3.734 3.734L2.533 10l.934.933 3.733-3.733 3.733 3.733.934-.933-3.734-3.733 3.734-3.734z" })
4337
4546
  ], -1)
4338
- ]), 8, ei),
4339
- m("button", {
4340
- onClick: (R) => x(T, S),
4547
+ ]), 8, vi),
4548
+ y("button", {
4549
+ onClick: (T) => x(L, M),
4341
4550
  class: "btn btn-reset",
4342
4551
  title: "重置"
4343
- }, g[8] || (g[8] = [
4344
- m("svg", {
4552
+ }, b[8] || (b[8] = [
4553
+ y("svg", {
4345
4554
  width: "14",
4346
4555
  height: "14",
4347
4556
  viewBox: "0 0 24 24",
@@ -4351,44 +4560,44 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4351
4560
  "stroke-linecap": "round",
4352
4561
  "stroke-linejoin": "round"
4353
4562
  }, [
4354
- m("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
4355
- m("path", { d: "M3 3v5h5" })
4563
+ y("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
4564
+ y("path", { d: "M3 3v5h5" })
4356
4565
  ], -1)
4357
- ]), 8, ti)
4566
+ ]), 8, yi)
4358
4567
  ])
4359
4568
  ], 2))), 256))
4360
4569
  ])
4361
4570
  ]),
4362
- m("div", ri, [
4363
- g[12] || (g[12] = m("h4", null, "添加新字段", -1)),
4364
- m("div", ni, [
4365
- Se(m("select", {
4366
- "onUpdate:modelValue": g[0] || (g[0] = (T) => e.addType = T),
4571
+ y("div", gi, [
4572
+ b[12] || (b[12] = y("h4", null, "添加新字段", -1)),
4573
+ y("div", bi, [
4574
+ ke(y("select", {
4575
+ "onUpdate:modelValue": b[0] || (b[0] = (L) => e.addType = L),
4367
4576
  class: "type-select"
4368
- }, g[10] || (g[10] = [
4369
- m("option", { value: "number" }, "数值型 (number)", -1),
4370
- m("option", { value: "text" }, "文本型 (string)", -1)
4577
+ }, b[10] || (b[10] = [
4578
+ y("option", { value: "number" }, "数值型 (number)", -1),
4579
+ y("option", { value: "text" }, "文本型 (string)", -1)
4371
4580
  ]), 512), [
4372
- [Rn, e.addType]
4581
+ [Gn, e.addType]
4373
4582
  ]),
4374
- Se(m("input", {
4583
+ ke(y("input", {
4375
4584
  type: "text",
4376
- "onUpdate:modelValue": g[1] || (g[1] = (T) => e.addName = T),
4585
+ "onUpdate:modelValue": b[1] || (b[1] = (L) => e.addName = L),
4377
4586
  placeholder: "请输入字段名称",
4378
4587
  class: "field-name-input"
4379
4588
  }, null, 512), [
4380
4589
  [
4381
- Qe,
4590
+ et,
4382
4591
  e.addName,
4383
4592
  void 0,
4384
4593
  { trim: !0 }
4385
4594
  ]
4386
4595
  ]),
4387
- m("button", {
4388
- onClick: v,
4596
+ y("button", {
4597
+ onClick: m,
4389
4598
  class: "btn btn-add"
4390
- }, g[11] || (g[11] = [
4391
- m("svg", {
4599
+ }, b[11] || (b[11] = [
4600
+ y("svg", {
4392
4601
  width: "16",
4393
4602
  height: "16",
4394
4603
  viewBox: "0 0 24 24",
@@ -4398,44 +4607,44 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4398
4607
  "stroke-linecap": "round",
4399
4608
  "stroke-linejoin": "round"
4400
4609
  }, [
4401
- m("line", {
4610
+ y("line", {
4402
4611
  x1: "12",
4403
4612
  y1: "5",
4404
4613
  x2: "12",
4405
4614
  y2: "19"
4406
4615
  }),
4407
- m("line", {
4616
+ y("line", {
4408
4617
  x1: "5",
4409
4618
  y1: "12",
4410
4619
  x2: "19",
4411
4620
  y2: "12"
4412
4621
  })
4413
4622
  ], -1),
4414
- Ue(" 添加字段 ", -1)
4623
+ qe(" 添加字段 ", -1)
4415
4624
  ]))
4416
4625
  ])
4417
4626
  ]),
4418
- m("div", oi, [
4419
- g[14] || (g[14] = m("h4", null, "导出文件", -1)),
4420
- m("div", ai, [
4421
- Se(m("input", {
4627
+ y("div", Ii, [
4628
+ b[14] || (b[14] = y("h4", null, "导出文件", -1)),
4629
+ y("div", Ci, [
4630
+ ke(y("input", {
4422
4631
  type: "text",
4423
- "onUpdate:modelValue": g[2] || (g[2] = (T) => e.fileName = T),
4632
+ "onUpdate:modelValue": b[2] || (b[2] = (L) => e.fileName = L),
4424
4633
  placeholder: "文件名(不包含扩展名)",
4425
4634
  class: "filename-input"
4426
4635
  }, null, 512), [
4427
4636
  [
4428
- Qe,
4637
+ et,
4429
4638
  e.fileName,
4430
4639
  void 0,
4431
4640
  { trim: !0 }
4432
4641
  ]
4433
4642
  ]),
4434
- m("button", {
4435
- onClick: A,
4643
+ y("button", {
4644
+ onClick: R,
4436
4645
  class: "btn btn-export"
4437
- }, g[13] || (g[13] = [
4438
- m("svg", {
4646
+ }, b[13] || (b[13] = [
4647
+ y("svg", {
4439
4648
  width: "16",
4440
4649
  height: "16",
4441
4650
  viewBox: "0 0 24 24",
@@ -4445,25 +4654,25 @@ const na = ["data-bluestar-bubble-id"], oa = /* @__PURE__ */ ot({
4445
4654
  "stroke-linecap": "round",
4446
4655
  "stroke-linejoin": "round"
4447
4656
  }, [
4448
- m("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
4449
- m("polyline", { points: "7 10 12 15 17 10" }),
4450
- m("line", {
4657
+ y("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
4658
+ y("polyline", { points: "7 10 12 15 17 10" }),
4659
+ y("line", {
4451
4660
  x1: "12",
4452
4661
  y1: "15",
4453
4662
  x2: "12",
4454
4663
  y2: "3"
4455
4664
  })
4456
4665
  ], -1),
4457
- Ue(" 重新导出 ", -1)
4666
+ qe(" 重新导出 ", -1)
4458
4667
  ]))
4459
4668
  ])
4460
4669
  ])
4461
- ])) : Ie("", !0)
4670
+ ])) : be("", !0)
4462
4671
  ], 2)
4463
4672
  ], 64);
4464
4673
  };
4465
4674
  }
4466
- }, si = /* @__PURE__ */ at(ii, [["__scopeId", "data-v-19a6b16d"]]), mi = si, vi = aa, yi = ia, bi = fn, li = `#version 300 es\r
4675
+ }, Ei = /* @__PURE__ */ ut(xi, [["__scopeId", "data-v-19a6b16d"]]), ki = Ei, Mi = ya, Vi = ga, Bi = xa, Di = Rn, Ai = `#version 300 es\r
4467
4676
  \r
4468
4677
  precision mediump float;\r
4469
4678
  \r
@@ -4475,23 +4684,23 @@ void main() {\r
4475
4684
  v_uv = a_uv;\r
4476
4685
  gl_Position = vec4(a_position, 0.0f, 1.0f);\r
4477
4686
  }`;
4478
- var Ae, ge, K, Be, nt;
4479
- const Ze = class Ze {
4687
+ var we, xe, U, Ne, ct;
4688
+ const Pe = class Pe {
4480
4689
  constructor(e, t) {
4481
- E(this, Ae);
4482
- E(this, ge);
4483
- E(this, K);
4484
- E(this, Be);
4485
- E(this, nt);
4486
- C(this, K, Object.assign({}, t)), this.addProtocol(), C(this, nt, `${a(this, K).name}://{z}/{x}/{y}`), C(this, ge, new Mn({ gl: e.map.painter.context.gl })), C(this, Be, a(this, ge).gl.createTexture()), this.initWebGLTool(), C(this, Ae, e.map), a(this, Ae).addSource(`${t.name}__source`, {
4690
+ A(this, we);
4691
+ A(this, xe);
4692
+ A(this, U);
4693
+ A(this, Ne);
4694
+ A(this, ct);
4695
+ E(this, U, Object.assign({}, t)), this.addProtocol(), E(this, ct, `${a(this, U).name}://{z}/{x}/{y}`), E(this, xe, new zn({ gl: e.map.painter.context.gl })), E(this, Ne, a(this, xe).gl.createTexture()), this.initWebGLTool(), E(this, we, e.map), a(this, we).addSource(`${t.name}__source`, {
4487
4696
  type: "raster",
4488
4697
  tiles: [
4489
- a(this, nt)
4698
+ a(this, ct)
4490
4699
  ],
4491
4700
  tileSize: 256,
4492
4701
  minzoom: 0,
4493
4702
  maxzoom: 18
4494
- }), a(this, Ae).addLayer({
4703
+ }), a(this, we).addLayer({
4495
4704
  id: `${t.name}__layer`,
4496
4705
  type: "raster",
4497
4706
  source: `${t.name}__source`,
@@ -4501,9 +4710,9 @@ const Ze = class Ze {
4501
4710
  });
4502
4711
  }
4503
4712
  addProtocol() {
4504
- if (!a(this, K).name) throw new Error("TileLayerRender: name is required");
4505
- if (Ze.protocalRegister.has(a(this, K).name)) throw new Error(`TileLayerRender: ${a(this, K).name} is already registered`);
4506
- Ln(a(this, K).name, async (e, t) => {
4713
+ if (!a(this, U).name) throw new Error("TileLayerRender: name is required");
4714
+ if (Pe.protocalRegister.has(a(this, U).name)) throw new Error(`TileLayerRender: ${a(this, U).name} is already registered`);
4715
+ Fn(a(this, U).name, async (e, t) => {
4507
4716
  t.signal.addEventListener("abort", () => {
4508
4717
  });
4509
4718
  const n = e.url.match(/(\d+)\/(\d+)\/(\d+)$/);
@@ -4515,10 +4724,10 @@ const Ze = class Ze {
4515
4724
  cacheControl: "public, max-age=2592000",
4516
4725
  expires: new Date(Date.now() + 30 * 24 * 60 * 60 * 1e3).toUTCString()
4517
4726
  };
4518
- }), Ze.protocalRegister.add(a(this, K).name);
4727
+ }), Pe.protocalRegister.add(a(this, U).name);
4519
4728
  }
4520
- initWebGLTool(e = a(this, ge)) {
4521
- e.createFrameBuffer("tileFrameBuffer", 256, 256), e.createProgram("tile", li, a(this, K).fragmentShader), e.createProgramVertexArray("tile"), e.bindProgramVertexArray("tile");
4729
+ initWebGLTool(e = a(this, xe)) {
4730
+ e.createFrameBuffer("tileFrameBuffer", 256, 256), e.createProgram("tile", Ai, a(this, U).fragmentShader), e.createProgramVertexArray("tile"), e.bindProgramVertexArray("tile");
4522
4731
  const t = e.setProgramAttribute({
4523
4732
  programName: "tile",
4524
4733
  name: "a_position",
@@ -4557,7 +4766,7 @@ const Ze = class Ze {
4557
4766
  }), e.bindProgramVertexArray("tile", null);
4558
4767
  }
4559
4768
  destroy() {
4560
- wn(a(this, K).name), a(this, ge).destroy(), a(this, ge).gl.deleteTexture(a(this, Be)), Ze.protocalRegister.delete(a(this, K).name), a(this, Ae).removeLayer(`${a(this, K).name}__layer`), a(this, Ae).removeSource(`${a(this, K).name}__source`);
4769
+ Pn(a(this, U).name), a(this, xe).destroy(), a(this, xe).gl.deleteTexture(a(this, Ne)), Pe.protocalRegister.delete(a(this, U).name), a(this, we).removeLayer(`${a(this, U).name}__layer`), a(this, we).removeSource(`${a(this, U).name}__source`);
4561
4770
  }
4562
4771
  /** 从 tianditu CDN 加载原始瓦片图片 */
4563
4772
  loadTile(e, t, n) {
@@ -4565,42 +4774,43 @@ const Ze = class Ze {
4565
4774
  const s = new Image();
4566
4775
  s.onload = () => o(s), s.onerror = i, s.crossOrigin = "Anonymous";
4567
4776
  const l = ~~(Math.random() * 7);
4568
- s.src = a(this, K).tileURL.replace("{r}", l.toString()).replace("{z}", n.toString()).replace("{x}", e.toString()).replace("{y}", t.toString());
4777
+ s.src = a(this, U).tileURL.replace("{r}", l.toString()).replace("{z}", n.toString()).replace("{x}", e.toString()).replace("{y}", t.toString());
4569
4778
  });
4570
4779
  }
4571
4780
  /** 使用 WebGL 着色器处理瓦片图片 */
4572
4781
  async applyTileFilter(e) {
4573
- const t = a(this, ge);
4574
- t.createTexture({ data: e, flipY: !1 }, a(this, Be)), t.setProgramUniform({
4782
+ const t = a(this, xe);
4783
+ t.createTexture({ data: e, flipY: !1 }, a(this, Ne)), t.setProgramUniform({
4575
4784
  programName: "tile",
4576
4785
  name: "u_texture",
4577
4786
  type: "texture2D",
4578
- value: a(this, Be)
4787
+ value: a(this, Ne)
4579
4788
  }), t.setFrameBuffer("tileFrameBuffer", 256, 256), t.useProgram("tile"), t.useProgramUniform("tile"), t.bindProgramVertexArray("tile"), t.gl.clearColor(0, 0, 0, 1), t.gl.clear(t.gl.COLOR_BUFFER_BIT | t.gl.DEPTH_BUFFER_BIT), t.gl.drawArrays(t.gl.TRIANGLE_STRIP, 0, 4);
4580
4789
  const n = new Uint8ClampedArray(256 * 256 * 4);
4581
4790
  return t.gl.readPixels(0, 0, 256, 256, t.gl.RGBA, t.gl.UNSIGNED_BYTE, n), t.setFrameBuffer(null), createImageBitmap(new ImageData(n, 256, 256));
4582
4791
  }
4583
4792
  };
4584
- Ae = new WeakMap(), ge = new WeakMap(), K = new WeakMap(), Be = new WeakMap(), nt = new WeakMap(), b(Ze, "protocalRegister", /* @__PURE__ */ new Set());
4585
- let mr = Ze;
4793
+ we = new WeakMap(), xe = new WeakMap(), U = new WeakMap(), Ne = new WeakMap(), ct = new WeakMap(), g(Pe, "protocalRegister", /* @__PURE__ */ new Set());
4794
+ let wr = Pe;
4586
4795
  export {
4587
- ra as BlueStar,
4588
- vi as Bubble,
4589
- yi as BubbleManager,
4590
- On as GridSource,
4591
- To as HeatmapLayer,
4592
- ta as ImageRender,
4593
- Uo as IsolineLayer,
4594
- bi as Map,
4595
- Wo as ParticleLayer,
4596
- fr as RGBWegFileToWegImage,
4597
- _o as TextLayer,
4598
- Jt as TileLayer,
4599
- mr as TileLayerRender,
4600
- mi as Tool,
4601
- Go as VectorLayer,
4602
- qo as WegRenderer,
4603
- yo as XMap,
4604
- pi as mapController,
4605
- er as onMapLoaded
4796
+ pa as BlueStar,
4797
+ Mi as Bubble,
4798
+ Vi as BubbleManager,
4799
+ Bi as BubbleOverlay,
4800
+ ao as GridSource,
4801
+ Go as HeatmapLayer,
4802
+ fa as ImageRender,
4803
+ ia as IsolineLayer,
4804
+ Di as Map,
4805
+ ta as ParticleLayer,
4806
+ Rr as RGBWegFileToWegImage,
4807
+ Xo as TextLayer,
4808
+ lr as TileLayer,
4809
+ wr as TileLayerRender,
4810
+ ki as Tool,
4811
+ Qo as VectorLayer,
4812
+ da as WegRenderer,
4813
+ So as XMap,
4814
+ _i as mapController,
4815
+ Nt as onMapLoaded
4606
4816
  };